Class CfnInstance.MetadataOptionsProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnInstance.MetadataOptionsProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstance.MetadataOptionsProperty>
- Enclosing interface:
CfnInstance.MetadataOptionsProperty
@Stability(Stable)
public static final class CfnInstance.MetadataOptionsProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInstance.MetadataOptionsProperty>
A builder for
CfnInstance.MetadataOptionsProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.httpEndpoint(String httpEndpoint) Sets the value ofCfnInstance.MetadataOptionsProperty.getHttpEndpoint()httpProtocolIpv6(String httpProtocolIpv6) Sets the value ofCfnInstance.MetadataOptionsProperty.getHttpProtocolIpv6()httpPutResponseHopLimit(Number httpPutResponseHopLimit) Sets the value ofCfnInstance.MetadataOptionsProperty.getHttpPutResponseHopLimit()httpTokens(String httpTokens) Sets the value ofCfnInstance.MetadataOptionsProperty.getHttpTokens()instanceMetadataTags(String instanceMetadataTags) Sets the value ofCfnInstance.MetadataOptionsProperty.getInstanceMetadataTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
httpEndpoint
@Stability(Stable) public CfnInstance.MetadataOptionsProperty.Builder httpEndpoint(String httpEndpoint) Sets the value ofCfnInstance.MetadataOptionsProperty.getHttpEndpoint()- Parameters:
httpEndpoint- Enables or disables the HTTP metadata endpoint on your instances. If you specify a value of disabled, you cannot access your instance metadata.- Returns:
this
-
httpProtocolIpv6
@Stability(Stable) public CfnInstance.MetadataOptionsProperty.Builder httpProtocolIpv6(String httpProtocolIpv6) Sets the value ofCfnInstance.MetadataOptionsProperty.getHttpProtocolIpv6()- Parameters:
httpProtocolIpv6- Enables or disables the IPv6 endpoint for the instance metadata service. To use this option, the instance must be a Nitro-based instance launched in a subnet that supports IPv6.- Returns:
this
-
httpPutResponseHopLimit
@Stability(Stable) public CfnInstance.MetadataOptionsProperty.Builder httpPutResponseHopLimit(Number httpPutResponseHopLimit) Sets the value ofCfnInstance.MetadataOptionsProperty.getHttpPutResponseHopLimit()- Parameters:
httpPutResponseHopLimit- The number of network hops that the metadata token can travel. Maximum is 64.- Returns:
this
-
httpTokens
Sets the value ofCfnInstance.MetadataOptionsProperty.getHttpTokens()- Parameters:
httpTokens- Indicates whether IMDSv2 is required.- Returns:
this
-
instanceMetadataTags
@Stability(Stable) public CfnInstance.MetadataOptionsProperty.Builder instanceMetadataTags(String instanceMetadataTags) Sets the value ofCfnInstance.MetadataOptionsProperty.getInstanceMetadataTags()- Parameters:
instanceMetadataTags- Indicates whether tags from the instance are propagated to the EBS volumes.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnInstance.MetadataOptionsProperty>- Returns:
- a new instance of
CfnInstance.MetadataOptionsProperty - Throws:
NullPointerException- if any required attribute was not provided
-