Class KeyPairAttributes.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.KeyPairAttributes.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<KeyPairAttributes>
- Enclosing interface:
KeyPairAttributes
@Stability(Stable)
public static final class KeyPairAttributes.Builder
extends Object
implements software.amazon.jsii.Builder<KeyPairAttributes>
A builder for
KeyPairAttributes-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.keyPairName(String keyPairName) Sets the value ofKeyPairAttributes.getKeyPairName()type(KeyPairType type) Sets the value ofKeyPairAttributes.getType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
keyPairName
Sets the value ofKeyPairAttributes.getKeyPairName()- Parameters:
keyPairName- The unique name of the key pair. This parameter is required.- Returns:
this
-
type
Sets the value ofKeyPairAttributes.getType()- Parameters:
type- The type of the key pair.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<KeyPairAttributes>- Returns:
- a new instance of
KeyPairAttributes - Throws:
NullPointerException- if any required attribute was not provided
-