Class CfnKeyPairMixinProps.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.ec2.CfnKeyPairMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnKeyPairMixinProps>
- Enclosing interface:
CfnKeyPairMixinProps
@Stability(Stable)
public static final class CfnKeyPairMixinProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnKeyPairMixinProps>
A builder for
CfnKeyPairMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnKeyPairMixinProps.getKeyFormat()Sets the value ofCfnKeyPairMixinProps.getKeyName()Sets the value ofCfnKeyPairMixinProps.getKeyType()publicKeyMaterial(String publicKeyMaterial) Sets the value ofCfnKeyPairMixinProps.getPublicKeyMaterial()Sets the value ofCfnKeyPairMixinProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
keyFormat
Sets the value ofCfnKeyPairMixinProps.getKeyFormat()- Parameters:
keyFormat- The format of the key pair. Default:pem- Returns:
this
-
keyName
Sets the value ofCfnKeyPairMixinProps.getKeyName()- Parameters:
keyName- A unique name for the key pair. Constraints: Up to 255 ASCII characters- Returns:
this
-
keyType
Sets the value ofCfnKeyPairMixinProps.getKeyType()- Parameters:
keyType- The type of key pair. Note that ED25519 keys are not supported for Windows instances. If thePublicKeyMaterialproperty is specified, theKeyTypeproperty is ignored, and the key type is inferred from thePublicKeyMaterialvalue.Default:
rsa- Returns:
this
-
publicKeyMaterial
Sets the value ofCfnKeyPairMixinProps.getPublicKeyMaterial()- Parameters:
publicKeyMaterial- The public key material. ThePublicKeyMaterialproperty is used to import a key pair. If this property is not specified, then a new key pair will be created.- Returns:
this
-
tags
Sets the value ofCfnKeyPairMixinProps.getTags()- Parameters:
tags- The tags to apply to the key pair.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnKeyPairMixinProps>- Returns:
- a new instance of
CfnKeyPairMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-