interface CfnKeyPairProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.EC2.CfnKeyPairProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#CfnKeyPairProps |
![]() | software.amazon.awscdk.services.ec2.CfnKeyPairProps |
![]() | aws_cdk.aws_ec2.CfnKeyPairProps |
![]() | aws-cdk-lib » aws_ec2 » CfnKeyPairProps |
Properties for defining a CfnKeyPair
.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-keypair.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const cfnKeyPairProps: ec2.CfnKeyPairProps = {
keyName: 'keyName',
// the properties below are optional
keyFormat: 'keyFormat',
keyType: 'keyType',
publicKeyMaterial: 'publicKeyMaterial',
tags: [{
key: 'key',
value: 'value',
}],
};
Properties
Name | Type | Description |
---|---|---|
key | string | A unique name for the key pair. |
key | string | The format of the key pair. |
key | string | The type of key pair. Note that ED25519 keys are not supported for Windows instances. |
public | string | The public key material. |
tags? | Cfn [] | The tags to apply to the key pair. |
keyName
Type:
string
A unique name for the key pair.
Constraints: Up to 255 ASCII characters
keyFormat?
Type:
string
(optional, default: "pem")
The format of the key pair.
Default: pem
keyType?
Type:
string
(optional, default: "rsa")
The type of key pair. Note that ED25519 keys are not supported for Windows instances.
If the PublicKeyMaterial
property is specified, the KeyType
property is ignored, and the key type is inferred from the PublicKeyMaterial
value.
Default: rsa
publicKeyMaterial?
Type:
string
(optional)
The public key material.
The PublicKeyMaterial
property is used to import a key pair. If this property is not specified, then a new key pair will be created.
tags?
Type:
Cfn
[]
(optional)
The tags to apply to the key pair.