LaunchTemplateHttpTokens

class aws_cdk.aws_ec2.LaunchTemplateHttpTokens(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

The state of token usage for your instance metadata requests.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata-metadataoptions.html#cfn-ec2-launchtemplate-launchtemplatedata-metadataoptions-httptokens

ExampleMetadata:

infused

Example:

ec2.LaunchTemplate(self, "LaunchTemplate",
    http_endpoint=True,
    http_protocol_ipv6=True,
    http_put_response_hop_limit=1,
    http_tokens=ec2.LaunchTemplateHttpTokens.REQUIRED,
    instance_metadata_tags=True
)

Attributes

OPTIONAL

If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request.

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.