Struct aws_sdk_ec2::operation::modify_instance_metadata_defaults::builders::ModifyInstanceMetadataDefaultsFluentBuilder
source · pub struct ModifyInstanceMetadataDefaultsFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to ModifyInstanceMetadataDefaults
.
Modifies the default instance metadata service (IMDS) settings at the account level in the specified Amazon Web Services Region.
To remove a parameter's account-level default setting, specify no-preference
. At instance launch, the value will come from the AMI, or from the launch parameter if specified. For more information, see Order of precedence for instance metadata options in the Amazon EC2 User Guide.
Implementations§
source§impl ModifyInstanceMetadataDefaultsFluentBuilder
impl ModifyInstanceMetadataDefaultsFluentBuilder
sourcepub fn as_input(&self) -> &ModifyInstanceMetadataDefaultsInputBuilder
pub fn as_input(&self) -> &ModifyInstanceMetadataDefaultsInputBuilder
Access the ModifyInstanceMetadataDefaults as a reference.
sourcepub async fn send(
self
) -> Result<ModifyInstanceMetadataDefaultsOutput, SdkError<ModifyInstanceMetadataDefaultsError, HttpResponse>>
pub async fn send( self ) -> Result<ModifyInstanceMetadataDefaultsOutput, SdkError<ModifyInstanceMetadataDefaultsError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self
) -> CustomizableOperation<ModifyInstanceMetadataDefaultsOutput, ModifyInstanceMetadataDefaultsError, Self>
pub fn customize( self ) -> CustomizableOperation<ModifyInstanceMetadataDefaultsOutput, ModifyInstanceMetadataDefaultsError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn http_tokens(self, input: MetadataDefaultHttpTokensState) -> Self
pub fn http_tokens(self, input: MetadataDefaultHttpTokensState) -> Self
Indicates whether IMDSv2 is required.
-
optional
– IMDSv2 is optional, which means that you can use either IMDSv2 or IMDSv1. -
required
– IMDSv2 is required, which means that IMDSv1 is disabled, and you must use IMDSv2.
sourcepub fn set_http_tokens(
self,
input: Option<MetadataDefaultHttpTokensState>
) -> Self
pub fn set_http_tokens( self, input: Option<MetadataDefaultHttpTokensState> ) -> Self
Indicates whether IMDSv2 is required.
-
optional
– IMDSv2 is optional, which means that you can use either IMDSv2 or IMDSv1. -
required
– IMDSv2 is required, which means that IMDSv1 is disabled, and you must use IMDSv2.
sourcepub fn get_http_tokens(&self) -> &Option<MetadataDefaultHttpTokensState>
pub fn get_http_tokens(&self) -> &Option<MetadataDefaultHttpTokensState>
Indicates whether IMDSv2 is required.
-
optional
– IMDSv2 is optional, which means that you can use either IMDSv2 or IMDSv1. -
required
– IMDSv2 is required, which means that IMDSv1 is disabled, and you must use IMDSv2.
sourcepub fn http_put_response_hop_limit(self, input: i32) -> Self
pub fn http_put_response_hop_limit(self, input: i32) -> Self
The maximum number of hops that the metadata token can travel.
Minimum: 1
Maximum: 64
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 maximum number of hops that the metadata token can travel.
Minimum: 1
Maximum: 64
sourcepub fn get_http_put_response_hop_limit(&self) -> &Option<i32>
pub fn get_http_put_response_hop_limit(&self) -> &Option<i32>
The maximum number of hops that the metadata token can travel.
Minimum: 1
Maximum: 64
sourcepub fn http_endpoint(self, input: DefaultInstanceMetadataEndpointState) -> Self
pub fn http_endpoint(self, input: DefaultInstanceMetadataEndpointState) -> Self
Enables or disables the IMDS endpoint on an instance. When disabled, the instance metadata can't be accessed.
sourcepub fn set_http_endpoint(
self,
input: Option<DefaultInstanceMetadataEndpointState>
) -> Self
pub fn set_http_endpoint( self, input: Option<DefaultInstanceMetadataEndpointState> ) -> Self
Enables or disables the IMDS endpoint on an instance. When disabled, the instance metadata can't be accessed.
sourcepub fn get_http_endpoint(&self) -> &Option<DefaultInstanceMetadataEndpointState>
pub fn get_http_endpoint(&self) -> &Option<DefaultInstanceMetadataEndpointState>
Enables or disables the IMDS endpoint on an instance. When disabled, the instance metadata can't be accessed.
Enables or disables access to an instance's tags from the instance metadata. For more information, see Work with instance tags using the instance metadata in the Amazon EC2 User Guide.
Enables or disables access to an instance's tags from the instance metadata. For more information, see Work with instance tags using the instance metadata in the Amazon EC2 User Guide.
Enables or disables access to an instance's tags from the instance metadata. For more information, see Work with instance tags using the instance metadata in the Amazon EC2 User Guide.
sourcepub fn dry_run(self, input: bool) -> Self
pub fn dry_run(self, input: bool) -> Self
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
sourcepub fn set_dry_run(self, input: Option<bool>) -> Self
pub fn set_dry_run(self, input: Option<bool>) -> Self
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
sourcepub fn get_dry_run(&self) -> &Option<bool>
pub fn get_dry_run(&self) -> &Option<bool>
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
Trait Implementations§
source§impl Clone for ModifyInstanceMetadataDefaultsFluentBuilder
impl Clone for ModifyInstanceMetadataDefaultsFluentBuilder
source§fn clone(&self) -> ModifyInstanceMetadataDefaultsFluentBuilder
fn clone(&self) -> ModifyInstanceMetadataDefaultsFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more