Skip to content

LaunchTemplateInstanceMetadataOptions

Source code in docs_src/capo_ec2/types/launch_template_instance_metadata_options.py
class LaunchTemplateInstanceMetadataOptions(TypedDict, closed=True):
    state: NotRequired[
        "capo_ec2.types.launch_template_instance_metadata_options_state.LaunchTemplateInstanceMetadataOptionsState"
    ]
    """<p>The state of the metadata option changes.</p> <p> <code>pending</code> - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.</p> <p> <code>applied</code> - The metadata options have been successfully applied on the instance.</p>"""
    http_tokens: NotRequired[
        "capo_ec2.types.launch_template_http_tokens_state.LaunchTemplateHttpTokensState"
    ]
    """<p>Indicates whether IMDSv2 is required.</p> <ul> <li> <p> <code>optional</code> - IMDSv2 is optional. You can choose whether to send a session token in your instance metadata retrieval requests. If you retrieve IAM role credentials without a session token, you receive the IMDSv1 role credentials. If you retrieve IAM role credentials using a valid session token, you receive the IMDSv2 role credentials.</p> </li> <li> <p> <code>required</code> - IMDSv2 is required. You must send a session token in your instance metadata retrieval requests. With this option, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li> </ul>"""
    http_put_response_hop_limit: NotRequired["capo_ec2.types.integer.Integer"]
    """<p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p> <p>Possible values: Integers from 1 to 64</p>"""
    http_endpoint: NotRequired[
        "capo_ec2.types.launch_template_instance_metadata_endpoint_state.LaunchTemplateInstanceMetadataEndpointState"
    ]
    """<p>Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is <code>enabled</code>.</p> <note> <p>If you specify a value of <code>disabled</code>, you will not be able to access your instance metadata. </p> </note>"""
    http_protocol_ipv6: NotRequired[
        "capo_ec2.types.launch_template_instance_metadata_protocol_ipv6.LaunchTemplateInstanceMetadataProtocolIpv6"
    ]
    """<p>Enables or disables the IPv6 endpoint for the instance metadata service.</p> <p>Default: <code>disabled</code> </p>"""
    instance_metadata_tags: NotRequired[
        "capo_ec2.types.launch_template_instance_metadata_tags_state.LaunchTemplateInstanceMetadataTagsState"
    ]
    """<p>Set to <code>enabled</code> to allow access to instance tags from the instance metadata. Set to <code>disabled</code> to turn off access to instance tags from the instance metadata. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/work-with-tags-in-IMDS.html">View tags for your EC2 instances using instance metadata</a>.</p> <p>Default: <code>disabled</code> </p>"""

http_endpoint instance-attribute

http_endpoint: NotRequired[LaunchTemplateInstanceMetadataEndpointState]

Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is enabled.

If you specify a value of disabled, you will not be able to access your instance metadata.

http_protocol_ipv6 instance-attribute

http_protocol_ipv6: NotRequired[LaunchTemplateInstanceMetadataProtocolIpv6]

Enables or disables the IPv6 endpoint for the instance metadata service.

Default: disabled

http_put_response_hop_limit instance-attribute

http_put_response_hop_limit: NotRequired[Integer]

The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

Possible values: Integers from 1 to 64

http_tokens instance-attribute

http_tokens: NotRequired[LaunchTemplateHttpTokensState]

Indicates whether IMDSv2 is required.

  • optional - IMDSv2 is optional. You can choose whether to send a session token in your instance metadata retrieval requests. If you retrieve IAM role credentials without a session token, you receive the IMDSv1 role credentials. If you retrieve IAM role credentials using a valid session token, you receive the IMDSv2 role credentials.

  • required - IMDSv2 is required. You must send a session token in your instance metadata retrieval requests. With this option, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.

instance_metadata_tags instance-attribute

instance_metadata_tags: NotRequired[LaunchTemplateInstanceMetadataTagsState]

Set to enabled to allow access to instance tags from the instance metadata. Set to disabled to turn off access to instance tags from the instance metadata. For more information, see View tags for your EC2 instances using instance metadata.

Default: disabled

state instance-attribute

The state of the metadata option changes.

pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

applied - The metadata options have been successfully applied on the instance.