Class: AWSCDK::ImageBuilder::CfnInfrastructureConfiguration::InstanceMetadataOptionsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ImageBuilder::CfnInfrastructureConfiguration::InstanceMetadataOptionsProperty
- Defined in:
- image_builder/cfn_infrastructure_configuration.rb
Overview
The instance metadata options that apply to the HTTP requests that pipeline builds use to launch EC2 build and test instances.
For more information about instance metadata options, see Configure the instance metadata options in the Amazon EC2 User Guide for Linux instances, or Configure the instance metadata options in the Amazon EC2 Windows Guide for Windows instances.
Instance Attribute Summary collapse
-
#http_put_response_hop_limit ⇒ Numeric?
readonly
Limit the number of hops that an instance metadata request can traverse to reach its destination.
-
#http_tokens ⇒ String?
readonly
Indicates whether a signed token header is required for instance metadata retrieval requests.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(http_put_response_hop_limit: nil, http_tokens: nil) ⇒ InstanceMetadataOptionsProperty
constructor
A new instance of InstanceMetadataOptionsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(http_put_response_hop_limit: nil, http_tokens: nil) ⇒ InstanceMetadataOptionsProperty
Returns a new instance of InstanceMetadataOptionsProperty.
703 704 705 706 707 708 |
# File 'image_builder/cfn_infrastructure_configuration.rb', line 703 def initialize(http_put_response_hop_limit: nil, http_tokens: nil) @http_put_response_hop_limit = http_put_response_hop_limit Jsii::Type.check_type(@http_put_response_hop_limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "httpPutResponseHopLimit") unless @http_put_response_hop_limit.nil? @http_tokens = http_tokens Jsii::Type.check_type(@http_tokens, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "httpTokens") unless @http_tokens.nil? end |
Instance Attribute Details
#http_put_response_hop_limit ⇒ Numeric? (readonly)
Limit the number of hops that an instance metadata request can traverse to reach its destination.
The default is one hop. However, if HTTP tokens are required, container image builds need a minimum of two hops.
716 717 718 |
# File 'image_builder/cfn_infrastructure_configuration.rb', line 716 def http_put_response_hop_limit @http_put_response_hop_limit end |
#http_tokens ⇒ String? (readonly)
Indicates whether a signed token header is required for instance metadata retrieval requests.
The values affect the response as follows:
- required – When you retrieve the IAM role credentials, version 2.0 credentials are returned in all cases.
- optional – You can include a signed token header in your request to retrieve instance metadata, or you can leave it out. If you include it, version 2.0 credentials are returned for the IAM role. Otherwise, version 1.0 credentials are returned.
The default setting is optional .
728 729 730 |
# File 'image_builder/cfn_infrastructure_configuration.rb', line 728 def http_tokens @http_tokens end |
Class Method Details
.jsii_properties ⇒ Object
730 731 732 733 734 735 |
# File 'image_builder/cfn_infrastructure_configuration.rb', line 730 def self.jsii_properties { :http_put_response_hop_limit => "httpPutResponseHopLimit", :http_tokens => "httpTokens", } end |
Instance Method Details
#to_jsii ⇒ Object
737 738 739 740 741 742 743 744 |
# File 'image_builder/cfn_infrastructure_configuration.rb', line 737 def to_jsii result = {} result.merge!({ "httpPutResponseHopLimit" => @http_put_response_hop_limit, "httpTokens" => @http_tokens, }) result.compact end |