#[non_exhaustive]pub struct InstanceMetadataOptionsBuilder { /* private fields */ }Expand description
A builder for InstanceMetadataOptions.
Implementations§
source§impl InstanceMetadataOptionsBuilder
impl InstanceMetadataOptionsBuilder
sourcepub fn http_tokens(self, input: InstanceMetadataHttpTokensState) -> Self
pub fn http_tokens(self, input: InstanceMetadataHttpTokensState) -> Self
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 set_http_tokens(
self,
input: Option<InstanceMetadataHttpTokensState>
) -> Self
pub fn set_http_tokens( self, input: Option<InstanceMetadataHttpTokensState> ) -> Self
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 get_http_tokens(&self) -> &Option<InstanceMetadataHttpTokensState>
pub fn get_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, input: i32) -> Self
pub fn http_put_response_hop_limit(self, input: i32) -> Self
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 set_http_put_response_hop_limit(self, input: Option<i32>) -> Self
pub fn set_http_put_response_hop_limit(self, input: Option<i32>) -> Self
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 get_http_put_response_hop_limit(&self) -> &Option<i32>
pub fn get_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, input: InstanceMetadataEndpointState) -> Self
pub fn http_endpoint(self, input: InstanceMetadataEndpointState) -> Self
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.
sourcepub fn set_http_endpoint(
self,
input: Option<InstanceMetadataEndpointState>
) -> Self
pub fn set_http_endpoint( self, input: Option<InstanceMetadataEndpointState> ) -> Self
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.
sourcepub fn get_http_endpoint(&self) -> &Option<InstanceMetadataEndpointState>
pub fn get_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.
sourcepub fn build(self) -> InstanceMetadataOptions
pub fn build(self) -> InstanceMetadataOptions
Consumes the builder and constructs a InstanceMetadataOptions.
Trait Implementations§
source§impl Clone for InstanceMetadataOptionsBuilder
impl Clone for InstanceMetadataOptionsBuilder
source§fn clone(&self) -> InstanceMetadataOptionsBuilder
fn clone(&self) -> InstanceMetadataOptionsBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for InstanceMetadataOptionsBuilder
impl Default for InstanceMetadataOptionsBuilder
source§fn default() -> InstanceMetadataOptionsBuilder
fn default() -> InstanceMetadataOptionsBuilder
source§impl PartialEq for InstanceMetadataOptionsBuilder
impl PartialEq for InstanceMetadataOptionsBuilder
source§fn eq(&self, other: &InstanceMetadataOptionsBuilder) -> bool
fn eq(&self, other: &InstanceMetadataOptionsBuilder) -> bool
self and other values to be equal, and is used
by ==.