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
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
- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
- 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
-
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
- Parameters:
keyType
- The type of key pair. Note that ED25519 keys are not supported for Windows instances. This parameter is required.- Returns:
this
-
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
-
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
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnKeyPair>
- Returns:
- a newly built instance of
CfnKeyPair
.
-