Enum LaunchTemplateHttpTokens

java.lang.Object
java.lang.Enum<LaunchTemplateHttpTokens>
software.amazon.awscdk.services.ec2.LaunchTemplateHttpTokens
All Implemented Interfaces:
Serializable, Comparable<LaunchTemplateHttpTokens>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-15T10:24:58.414Z") @Stability(Stable) public enum LaunchTemplateHttpTokens extends Enum<LaunchTemplateHttpTokens>
The state of token usage for your instance metadata requests.

Example:

 LaunchTemplate.Builder.create(this, "LaunchTemplate")
         .httpEndpoint(true)
         .httpProtocolIpv6(true)
         .httpPutResponseHopLimit(1)
         .httpTokens(LaunchTemplateHttpTokens.REQUIRED)
         .instanceMetadataTags(true)
         .build();
 

See Also:
  • Enum Constant Details

    • OPTIONAL

      @Stability(Stable) public static final LaunchTemplateHttpTokens OPTIONAL
      If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request.
    • REQUIRED

      @Stability(Stable) public static final LaunchTemplateHttpTokens REQUIRED
      If the state is required, you must send a signed token header with any instance metadata retrieval requests.

      In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

  • Method Details

    • values

      public static LaunchTemplateHttpTokens[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static LaunchTemplateHttpTokens valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null