Struct aws_sdk_ec2::operation::modify_instance_metadata_defaults::builders::ModifyInstanceMetadataDefaultsInputBuilder
source · #[non_exhaustive]pub struct ModifyInstanceMetadataDefaultsInputBuilder { /* private fields */ }
Expand description
A builder for ModifyInstanceMetadataDefaultsInput
.
Implementations§
source§impl ModifyInstanceMetadataDefaultsInputBuilder
impl ModifyInstanceMetadataDefaultsInputBuilder
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. To indicate no preference, specify -1
.
Possible values: Integers from 1
to 64
, and -1
to indicate no preference
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. To indicate no preference, specify -1
.
Possible values: Integers from 1
to 64
, and -1
to indicate no preference
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. To indicate no preference, specify -1
.
Possible values: Integers from 1
to 64
, and -1
to indicate no preference
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
.
sourcepub fn build(self) -> Result<ModifyInstanceMetadataDefaultsInput, BuildError>
pub fn build(self) -> Result<ModifyInstanceMetadataDefaultsInput, BuildError>
Consumes the builder and constructs a ModifyInstanceMetadataDefaultsInput
.
source§impl ModifyInstanceMetadataDefaultsInputBuilder
impl ModifyInstanceMetadataDefaultsInputBuilder
sourcepub async fn send_with(
self,
client: &Client,
) -> Result<ModifyInstanceMetadataDefaultsOutput, SdkError<ModifyInstanceMetadataDefaultsError, HttpResponse>>
pub async fn send_with( self, client: &Client, ) -> Result<ModifyInstanceMetadataDefaultsOutput, SdkError<ModifyInstanceMetadataDefaultsError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
source§impl Clone for ModifyInstanceMetadataDefaultsInputBuilder
impl Clone for ModifyInstanceMetadataDefaultsInputBuilder
source§fn clone(&self) -> ModifyInstanceMetadataDefaultsInputBuilder
fn clone(&self) -> ModifyInstanceMetadataDefaultsInputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for ModifyInstanceMetadataDefaultsInputBuilder
impl Default for ModifyInstanceMetadataDefaultsInputBuilder
source§fn default() -> ModifyInstanceMetadataDefaultsInputBuilder
fn default() -> ModifyInstanceMetadataDefaultsInputBuilder
source§impl PartialEq for ModifyInstanceMetadataDefaultsInputBuilder
impl PartialEq for ModifyInstanceMetadataDefaultsInputBuilder
source§fn eq(&self, other: &ModifyInstanceMetadataDefaultsInputBuilder) -> bool
fn eq(&self, other: &ModifyInstanceMetadataDefaultsInputBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ModifyInstanceMetadataDefaultsInputBuilder
Auto Trait Implementations§
impl Freeze for ModifyInstanceMetadataDefaultsInputBuilder
impl RefUnwindSafe for ModifyInstanceMetadataDefaultsInputBuilder
impl Send for ModifyInstanceMetadataDefaultsInputBuilder
impl Sync for ModifyInstanceMetadataDefaultsInputBuilder
impl Unpin for ModifyInstanceMetadataDefaultsInputBuilder
impl UnwindSafe for ModifyInstanceMetadataDefaultsInputBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more