Interface CfnInstance.IMetadataOptionsProperty
Specifies the metadata options for the instance.
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface CfnInstance.IMetadataOptionsProperty
Syntax (vb)
Public Interface CfnInstance.IMetadataOptionsProperty
Remarks
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 maximum number of hops that the metadata token can travel. |
HttpTokens | Indicates whether IMDSv2 is required. |
InstanceMetadataTags | Set to |
Properties
HttpEndpoint
Enables or disables the HTTP metadata endpoint on your instances.
string? HttpEndpoint { get; }
Property Value
Remarks
If you specify a value of disabled
, you cannot access your instance metadata.
Default: enabled
HttpProtocolIpv6
Enables or disables the IPv6 endpoint for the instance metadata service.
string? HttpProtocolIpv6 { get; }
Property Value
Remarks
HttpPutResponseHopLimit
The maximum number of hops that the metadata token can travel.
double? HttpPutResponseHopLimit { get; }
Property Value
Remarks
Possible values: Integers from 1 to 64
Default: - 1
HttpTokens
Indicates whether IMDSv2 is required.
string? HttpTokens { get; }
Property Value
Remarks
Default:
The default value can also be affected by other combinations of parameters. For more information, see Order of precedence for instance metadata options in the Amazon EC2 User Guide .
InstanceMetadataTags
Set to enabled
to allow access to instance tags from the instance metadata.
string? InstanceMetadataTags { get; }
Property Value
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