Interface CfnLaunchTemplate.IMetadataOptionsProperty
The metadata options for the instance.
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public interface IMetadataOptionsProperty
Syntax (vb)
Public Interface IMetadataOptionsProperty
Remarks
For more information, see Instance metadata and user data in the Amazon EC2 User Guide .
MetadataOptions
is a property of AWS::EC2::LaunchTemplate LaunchTemplateData .
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var metadataOptionsProperty = new MetadataOptionsProperty {
HttpEndpoint = "httpEndpoint",
HttpProtocolIpv6 = "httpProtocolIpv6",
HttpPutResponseHopLimit = 123,
HttpTokens = "httpTokens",
InstanceMetadataTags = "instanceMetadataTags"
};
Synopsis
Properties
HttpEndpoint | Enables or disables the HTTP metadata endpoint on your instances. |
HttpProtocolIpv6 | Enables or disables the IPv6 endpoint for the instance metadata service. |
HttpPutResponseHopLimit | The desired HTTP PUT response hop limit for instance metadata requests. |
HttpTokens | IMDSv2 uses token-backed sessions. |
InstanceMetadataTags | Set to |
Properties
HttpEndpoint
Enables or disables the HTTP metadata endpoint on your instances.
virtual string HttpEndpoint { get; }
Property Value
System.String
Remarks
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.
HttpProtocolIpv6
Enables or disables the IPv6 endpoint for the instance metadata service.
virtual string HttpProtocolIpv6 { get; }
Property Value
System.String
Remarks
HttpPutResponseHopLimit
The desired HTTP PUT response hop limit for instance metadata requests.
virtual Nullable<double> HttpPutResponseHopLimit { get; }
Property Value
System.Nullable<System.Double>
Remarks
The larger the number, the further instance metadata requests can travel.
Default: 1
Possible values: Integers from 1 to 64
HttpTokens
IMDSv2 uses token-backed sessions.
virtual string HttpTokens { get; }
Property Value
System.String
Remarks
Set the use of HTTP tokens to optional
(in other words, set the use of IMDSv2 to optional
) or required
(in other words, set the use of IMDSv2 to required
).
Default: optional
InstanceMetadataTags
Set to enabled
to allow access to instance tags from the instance metadata.
virtual string InstanceMetadataTags { get; }
Property Value
System.String
Remarks
Set to disabled
to turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata .
Default: disabled