#[non_exhaustive]pub struct InstanceMetadataOptions { /* private fields */ }Expand description
The metadata options for the instances. For more information, see Configuring the Instance Metadata Options in the Amazon EC2 Auto Scaling User Guide.
Implementations§
source§impl InstanceMetadataOptions
impl InstanceMetadataOptions
sourcepub fn http_tokens(&self) -> Option<&InstanceMetadataHttpTokensState>
pub fn http_tokens(&self) -> Option<&InstanceMetadataHttpTokensState>
The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional.
If the state is optional, you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.
If the state is required, you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.
sourcepub fn http_put_response_hop_limit(&self) -> Option<i32>
pub fn http_put_response_hop_limit(&self) -> Option<i32>
The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.
Default: 1
sourcepub fn http_endpoint(&self) -> Option<&InstanceMetadataEndpointState>
pub fn http_endpoint(&self) -> Option<&InstanceMetadataEndpointState>
This parameter enables or disables the HTTP metadata endpoint on your instances. 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.
source§impl InstanceMetadataOptions
impl InstanceMetadataOptions
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture InstanceMetadataOptions.
Examples found in repository?
5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475
pub fn deser_structure_crate_model_instance_metadata_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceMetadataOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceMetadataOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("HttpTokens") /* HttpTokens com.amazonaws.autoscaling#InstanceMetadataOptions$HttpTokens */ => {
let var_238 =
Some(
Result::<crate::model::InstanceMetadataHttpTokensState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMetadataHttpTokensState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_http_tokens(var_238);
}
,
s if s.matches("HttpPutResponseHopLimit") /* HttpPutResponseHopLimit com.amazonaws.autoscaling#InstanceMetadataOptions$HttpPutResponseHopLimit */ => {
let var_239 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.autoscaling#InstanceMetadataHttpPutResponseHopLimit`)"))
}
?
)
;
builder = builder.set_http_put_response_hop_limit(var_239);
}
,
s if s.matches("HttpEndpoint") /* HttpEndpoint com.amazonaws.autoscaling#InstanceMetadataOptions$HttpEndpoint */ => {
let var_240 =
Some(
Result::<crate::model::InstanceMetadataEndpointState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMetadataEndpointState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_http_endpoint(var_240);
}
,
_ => {}
}
}
Ok(builder.build())
}Trait Implementations§
source§impl Clone for InstanceMetadataOptions
impl Clone for InstanceMetadataOptions
source§fn clone(&self) -> InstanceMetadataOptions
fn clone(&self) -> InstanceMetadataOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more