Class CfnKeyPair.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnKeyPair.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnKeyPair>
- Enclosing class:
CfnKeyPair
@Stability(Stable)
public static final class CfnKeyPair.Builder
extends Object
implements software.amazon.jsii.Builder<CfnKeyPair>
A fluent builder for
CfnKeyPair
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
static CfnKeyPair.Builder
The format of the key pair.A unique name for the key pair.The type of key pair.publicKeyMaterial
(String publicKeyMaterial) The public key material.The tags to apply to the key pair.
-
Method Details
-
create
@Stability(Stable) public static CfnKeyPair.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.- Returns:
- a new instance of
CfnKeyPair.Builder
.
-
keyName
A unique name for the key pair.Constraints: Up to 255 ASCII characters
- Parameters:
keyName
- A unique name for the key pair. This parameter is required.- Returns:
this
- See Also:
-
keyFormat
The format of the key pair.Default:
pem
Default: - "pem"
- Parameters:
keyFormat
- The format of the key pair. This parameter is required.- Returns:
this
- See Also:
-
keyType
The type of key pair. Note that ED25519 keys are not supported for Windows instances.If the
PublicKeyMaterial
property is specified, theKeyType
property is ignored, and the key type is inferred from thePublicKeyMaterial
value.Default:
rsa
Default: - "rsa"
- Parameters:
keyType
- The type of key pair. Note that ED25519 keys are not supported for Windows instances. This parameter is required.- Returns:
this
- See Also:
-
publicKeyMaterial
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.- Parameters:
publicKeyMaterial
- The public key material. This parameter is required.- Returns:
this
- See Also:
-
tags
The tags to apply to the key pair.- Parameters:
tags
- The tags to apply to the key pair. This parameter is required.- Returns:
this
- See Also:
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnKeyPair>
- Returns:
- a newly built instance of
CfnKeyPair
.
-