Class CfnInstancePropsMixin.MetadataOptionsProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.ec2.CfnInstancePropsMixin.MetadataOptionsProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstancePropsMixin.MetadataOptionsProperty>
- Enclosing interface:
CfnInstancePropsMixin.MetadataOptionsProperty
@Stability(Stable)
public static final class CfnInstancePropsMixin.MetadataOptionsProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInstancePropsMixin.MetadataOptionsProperty>
A builder for
CfnInstancePropsMixin.MetadataOptionsProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.httpEndpoint(String httpEndpoint) Sets the value ofCfnInstancePropsMixin.MetadataOptionsProperty.getHttpEndpoint()httpProtocolIpv6(String httpProtocolIpv6) Sets the value ofCfnInstancePropsMixin.MetadataOptionsProperty.getHttpProtocolIpv6()httpPutResponseHopLimit(Number httpPutResponseHopLimit) httpTokens(String httpTokens) Sets the value ofCfnInstancePropsMixin.MetadataOptionsProperty.getHttpTokens()instanceMetadataTags(String instanceMetadataTags) Sets the value ofCfnInstancePropsMixin.MetadataOptionsProperty.getInstanceMetadataTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
httpEndpoint
@Stability(Stable) public CfnInstancePropsMixin.MetadataOptionsProperty.Builder httpEndpoint(String httpEndpoint) Sets the value ofCfnInstancePropsMixin.MetadataOptionsProperty.getHttpEndpoint()- Parameters:
httpEndpoint- Enables or disables the HTTP metadata endpoint on your instances. If you specify a value ofdisabled, you cannot access your instance metadata.Default:
enabled- Returns:
this
-
httpProtocolIpv6
@Stability(Stable) public CfnInstancePropsMixin.MetadataOptionsProperty.Builder httpProtocolIpv6(String httpProtocolIpv6) Sets the value ofCfnInstancePropsMixin.MetadataOptionsProperty.getHttpProtocolIpv6()- Parameters:
httpProtocolIpv6- Enables or disables the IPv6 endpoint for the instance metadata service. Default:disabled- Returns:
this
-
httpPutResponseHopLimit
@Stability(Stable) public CfnInstancePropsMixin.MetadataOptionsProperty.Builder httpPutResponseHopLimit(Number httpPutResponseHopLimit) - Parameters:
httpPutResponseHopLimit- The maximum number of hops that the metadata token can travel. Possible values: Integers from 1 to 64- Returns:
this
-
httpTokens
@Stability(Stable) public CfnInstancePropsMixin.MetadataOptionsProperty.Builder httpTokens(String httpTokens) Sets the value ofCfnInstancePropsMixin.MetadataOptionsProperty.getHttpTokens()- Parameters:
httpTokens- Indicates whether IMDSv2 is required.optional- IMDSv2 is optional, which means that you can use either IMDSv2 or IMDSv1.required- IMDSv2 is required, which means that IMDSv1 is disabled, and you must use IMDSv2.
Default:
- If the value of
ImdsSupportfor the Amazon Machine Image (AMI) for your instance isv2.0and the account level default is set tono-preference, the default isrequired. - If the value of
ImdsSupportfor the Amazon Machine Image (AMI) for your instance isv2.0, but the account level default is set toV1 or V2, the default isoptional.
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 .
- Returns:
this
-
instanceMetadataTags
@Stability(Stable) public CfnInstancePropsMixin.MetadataOptionsProperty.Builder instanceMetadataTags(String instanceMetadataTags) Sets the value ofCfnInstancePropsMixin.MetadataOptionsProperty.getInstanceMetadataTags()- Parameters:
instanceMetadataTags- Set toenabledto allow access to instance tags from the instance metadata. Set todisabledto turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata .Default:
disabled- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnInstancePropsMixin.MetadataOptionsProperty>- Returns:
- a new instance of
CfnInstancePropsMixin.MetadataOptionsProperty - Throws:
NullPointerException- if any required attribute was not provided
-