KeyPair

Create a KeyPair Resource

new KeyPair(name: string, args?: KeyPairArgs, opts?: CustomResourceOptions);
def KeyPair(resource_name, opts=None, key_file=None, key_name=None, key_name_prefix=None, public_key=None, resource_group_id=None, tags=None, __props__=None);
func NewKeyPair(ctx *Context, name string, args *KeyPairArgs, opts ...ResourceOption) (*KeyPair, error)
public KeyPair(string name, KeyPairArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args KeyPairArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args KeyPairArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args KeyPairArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

KeyPair Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The KeyPair resource accepts the following input properties:

KeyFile string

The name of file to save your new key pair’s private key. Strongly suggest you to specified it when you creating key pair, otherwise, you wouldn’t get its private key ever.

KeyName string

The key pair’s name. It is the only in one Alicloud account.

KeyNamePrefix string
PublicKey string

You can import an existing public key and using Alicloud key pair to manage it.

ResourceGroupId string

The Id of resource group which the key pair belongs.

Tags Dictionary<string, object>
KeyFile string

The name of file to save your new key pair’s private key. Strongly suggest you to specified it when you creating key pair, otherwise, you wouldn’t get its private key ever.

KeyName string

The key pair’s name. It is the only in one Alicloud account.

KeyNamePrefix string
PublicKey string

You can import an existing public key and using Alicloud key pair to manage it.

ResourceGroupId string

The Id of resource group which the key pair belongs.

Tags map[string]interface{}
keyFile string

The name of file to save your new key pair’s private key. Strongly suggest you to specified it when you creating key pair, otherwise, you wouldn’t get its private key ever.

keyName string

The key pair’s name. It is the only in one Alicloud account.

keyNamePrefix string
publicKey string

You can import an existing public key and using Alicloud key pair to manage it.

resourceGroupId string

The Id of resource group which the key pair belongs.

tags {[key: string]: any}
key_file str

The name of file to save your new key pair’s private key. Strongly suggest you to specified it when you creating key pair, otherwise, you wouldn’t get its private key ever.

key_name str

The key pair’s name. It is the only in one Alicloud account.

key_name_prefix str
public_key str

You can import an existing public key and using Alicloud key pair to manage it.

resource_group_id str

The Id of resource group which the key pair belongs.

tags Dict[str, Any]

Outputs

All input properties are implicitly available as output properties. Additionally, the KeyPair resource produces the following output properties:

FingerPrint string
Id string
The provider-assigned unique ID for this managed resource.
FingerPrint string
Id string
The provider-assigned unique ID for this managed resource.
fingerPrint string
id string
The provider-assigned unique ID for this managed resource.
finger_print str
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing KeyPair Resource

Get an existing KeyPair resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: KeyPairState, opts?: CustomResourceOptions): KeyPair
static get(resource_name, id, opts=None, finger_print=None, key_file=None, key_name=None, key_name_prefix=None, public_key=None, resource_group_id=None, tags=None, __props__=None);
func GetKeyPair(ctx *Context, name string, id IDInput, state *KeyPairState, opts ...ResourceOption) (*KeyPair, error)
public static KeyPair Get(string name, Input<string> id, KeyPairState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

FingerPrint string
KeyFile string

The name of file to save your new key pair’s private key. Strongly suggest you to specified it when you creating key pair, otherwise, you wouldn’t get its private key ever.

KeyName string

The key pair’s name. It is the only in one Alicloud account.

KeyNamePrefix string
PublicKey string

You can import an existing public key and using Alicloud key pair to manage it.

ResourceGroupId string

The Id of resource group which the key pair belongs.

Tags Dictionary<string, object>
FingerPrint string
KeyFile string

The name of file to save your new key pair’s private key. Strongly suggest you to specified it when you creating key pair, otherwise, you wouldn’t get its private key ever.

KeyName string

The key pair’s name. It is the only in one Alicloud account.

KeyNamePrefix string
PublicKey string

You can import an existing public key and using Alicloud key pair to manage it.

ResourceGroupId string

The Id of resource group which the key pair belongs.

Tags map[string]interface{}
fingerPrint string
keyFile string

The name of file to save your new key pair’s private key. Strongly suggest you to specified it when you creating key pair, otherwise, you wouldn’t get its private key ever.

keyName string

The key pair’s name. It is the only in one Alicloud account.

keyNamePrefix string
publicKey string

You can import an existing public key and using Alicloud key pair to manage it.

resourceGroupId string

The Id of resource group which the key pair belongs.

tags {[key: string]: any}
finger_print str
key_file str

The name of file to save your new key pair’s private key. Strongly suggest you to specified it when you creating key pair, otherwise, you wouldn’t get its private key ever.

key_name str

The key pair’s name. It is the only in one Alicloud account.

key_name_prefix str
public_key str

You can import an existing public key and using Alicloud key pair to manage it.

resource_group_id str

The Id of resource group which the key pair belongs.

tags Dict[str, Any]

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.