Interface CfnKeyPairProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnKeyPairProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:38.678Z") @Stability(Stable) public interface CfnKeyPairProps extends software.amazon.jsii.JsiiSerializable
Properties for defining a CfnKeyPair.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.ec2.*;
 CfnKeyPairProps cfnKeyPairProps = CfnKeyPairProps.builder()
         .keyName("keyName")
         // the properties below are optional
         .keyType("keyType")
         .publicKeyMaterial("publicKeyMaterial")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
  • Method Details

    • getKeyName

      @Stability(Stable) @NotNull String getKeyName()
      A unique name for the key pair.

      Constraints: Up to 255 ASCII characters

    • getKeyType

      @Stability(Stable) @Nullable default String getKeyType()
      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

    • getPublicKeyMaterial

      @Stability(Stable) @Nullable default String getPublicKeyMaterial()
      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.

    • getTags

      @Stability(Stable) @Nullable default List<CfnTag> getTags()
      The tags to apply to the key pair.
    • builder

      @Stability(Stable) static CfnKeyPairProps.Builder builder()
      Returns:
      a CfnKeyPairProps.Builder of CfnKeyPairProps