#[non_exhaustive]pub struct InstanceMetadataOptionsResponse { /* private fields */ }
Expand description
The metadata options for the instance.
Implementations§
source§impl InstanceMetadataOptionsResponse
impl InstanceMetadataOptionsResponse
sourcepub fn state(&self) -> Option<&InstanceMetadataOptionsState>
pub fn state(&self) -> Option<&InstanceMetadataOptionsState>
The state of the metadata option changes.
pending
- The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.
applied
- The metadata options have been successfully applied on the instance.
sourcepub fn http_tokens(&self) -> Option<&HttpTokensState>
pub fn http_tokens(&self) -> Option<&HttpTokensState>
The state of token usage for your instance metadata requests.
If the state is optional
, you can choose to retrieve instance metadata with or without a session token 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 session token, the version 2.0 role credentials are returned.
If the state is required
, you must send a session token 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.
Default: optional
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
Possible values: Integers from 1 to 64
sourcepub fn http_endpoint(&self) -> Option<&InstanceMetadataEndpointState>
pub fn http_endpoint(&self) -> Option<&InstanceMetadataEndpointState>
Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.
If the value is disabled
, you cannot access your instance metadata.
sourcepub fn http_protocol_ipv6(&self) -> Option<&InstanceMetadataProtocolState>
pub fn http_protocol_ipv6(&self) -> Option<&InstanceMetadataProtocolState>
Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.
Indicates whether access to instance tags from the instance metadata is enabled or disabled. For more information, see Work with instance tags using the instance metadata.
source§impl InstanceMetadataOptionsResponse
impl InstanceMetadataOptionsResponse
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture InstanceMetadataOptionsResponse
.
Examples found in repository?
37500 37501 37502 37503 37504 37505 37506 37507 37508 37509 37510 37511 37512 37513 37514 37515 37516 37517 37518 37519 37520 37521 37522 37523 37524 37525 37526 37527 37528 37529 37530 37531 37532 37533 37534 37535 37536 37537 37538 37539 37540 37541 37542 37543 37544 37545 37546 37547 37548 37549 37550 37551 37552 37553 37554 37555 37556 37557 37558 37559 37560 37561 37562 37563 37564 37565 37566 37567 37568 37569 37570 37571 37572 37573 37574 37575 37576 37577 37578 37579 37580 37581 37582 37583 37584 37585 37586 37587 37588 37589 37590 37591 37592 37593 37594 37595 37596
pub fn deser_structure_crate_model_instance_metadata_options_response(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceMetadataOptionsResponse, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceMetadataOptionsResponse::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("state") /* State com.amazonaws.ec2#InstanceMetadataOptionsResponse$State */ => {
let var_1565 =
Some(
Result::<crate::model::InstanceMetadataOptionsState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMetadataOptionsState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1565);
}
,
s if s.matches("httpTokens") /* HttpTokens com.amazonaws.ec2#InstanceMetadataOptionsResponse$HttpTokens */ => {
let var_1566 =
Some(
Result::<crate::model::HttpTokensState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::HttpTokensState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_http_tokens(var_1566);
}
,
s if s.matches("httpPutResponseHopLimit") /* HttpPutResponseHopLimit com.amazonaws.ec2#InstanceMetadataOptionsResponse$HttpPutResponseHopLimit */ => {
let var_1567 =
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.ec2#Integer`)"))
}
?
)
;
builder = builder.set_http_put_response_hop_limit(var_1567);
}
,
s if s.matches("httpEndpoint") /* HttpEndpoint com.amazonaws.ec2#InstanceMetadataOptionsResponse$HttpEndpoint */ => {
let var_1568 =
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_1568);
}
,
s if s.matches("httpProtocolIpv6") /* HttpProtocolIpv6 com.amazonaws.ec2#InstanceMetadataOptionsResponse$HttpProtocolIpv6 */ => {
let var_1569 =
Some(
Result::<crate::model::InstanceMetadataProtocolState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMetadataProtocolState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_http_protocol_ipv6(var_1569);
}
,
s if s.matches("instanceMetadataTags") /* InstanceMetadataTags com.amazonaws.ec2#InstanceMetadataOptionsResponse$InstanceMetadataTags */ => {
let var_1570 =
Some(
Result::<crate::model::InstanceMetadataTagsState, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceMetadataTagsState::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_metadata_tags(var_1570);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for InstanceMetadataOptionsResponse
impl Clone for InstanceMetadataOptionsResponse
source§fn clone(&self) -> InstanceMetadataOptionsResponse
fn clone(&self) -> InstanceMetadataOptionsResponse
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more