pub struct Builder { /* private fields */ }
Expand description

Implementations§

The ID of the instance.

Examples found in repository?
src/client.rs (line 65553)
65552
65553
65554
65555
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.instance_id(input.into());
            self
        }

The ID of the instance.

Examples found in repository?
src/client.rs (line 65558)
65557
65558
65559
65560
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_instance_id(input);
            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 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.

Examples found in repository?
src/client.rs (line 65565)
65564
65565
65566
65567
        pub fn http_tokens(mut self, input: crate::model::HttpTokensState) -> Self {
            self.inner = self.inner.http_tokens(input);
            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 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.

Examples found in repository?
src/client.rs (line 65575)
65571
65572
65573
65574
65575
65576
65577
        pub fn set_http_tokens(
            mut self,
            input: std::option::Option<crate::model::HttpTokensState>,
        ) -> Self {
            self.inner = self.inner.set_http_tokens(input);
            self
        }

The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. If no parameter is specified, the existing state is maintained.

Possible values: Integers from 1 to 64

Examples found in repository?
src/client.rs (line 65581)
65580
65581
65582
65583
        pub fn http_put_response_hop_limit(mut self, input: i32) -> Self {
            self.inner = self.inner.http_put_response_hop_limit(input);
            self
        }

The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. If no parameter is specified, the existing state is maintained.

Possible values: Integers from 1 to 64

Examples found in repository?
src/client.rs (line 65587)
65586
65587
65588
65589
        pub fn set_http_put_response_hop_limit(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_http_put_response_hop_limit(input);
            self
        }

Enables or disables the HTTP metadata endpoint on your instances. If this parameter is not specified, the existing state is maintained.

If you specify a value of disabled, you cannot access your instance metadata.

Examples found in repository?
src/client.rs (line 65593)
65592
65593
65594
65595
        pub fn http_endpoint(mut self, input: crate::model::InstanceMetadataEndpointState) -> Self {
            self.inner = self.inner.http_endpoint(input);
            self
        }

Enables or disables the HTTP metadata endpoint on your instances. If this parameter is not specified, the existing state is maintained.

If you specify a value of disabled, you cannot access your instance metadata.

Examples found in repository?
src/client.rs (line 65602)
65598
65599
65600
65601
65602
65603
65604
        pub fn set_http_endpoint(
            mut self,
            input: std::option::Option<crate::model::InstanceMetadataEndpointState>,
        ) -> Self {
            self.inner = self.inner.set_http_endpoint(input);
            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.

Examples found in repository?
src/client.rs (line 65607)
65606
65607
65608
65609
        pub fn dry_run(mut self, input: bool) -> Self {
            self.inner = self.inner.dry_run(input);
            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.

Examples found in repository?
src/client.rs (line 65612)
65611
65612
65613
65614
        pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_dry_run(input);
            self
        }

Enables or disables the IPv6 endpoint for the instance metadata service. This setting applies only if you have enabled the HTTP metadata endpoint.

Examples found in repository?
src/client.rs (line 65620)
65616
65617
65618
65619
65620
65621
65622
        pub fn http_protocol_ipv6(
            mut self,
            input: crate::model::InstanceMetadataProtocolState,
        ) -> Self {
            self.inner = self.inner.http_protocol_ipv6(input);
            self
        }

Enables or disables the IPv6 endpoint for the instance metadata service. This setting applies only if you have enabled the HTTP metadata endpoint.

Examples found in repository?
src/client.rs (line 65628)
65624
65625
65626
65627
65628
65629
65630
        pub fn set_http_protocol_ipv6(
            mut self,
            input: std::option::Option<crate::model::InstanceMetadataProtocolState>,
        ) -> Self {
            self.inner = self.inner.set_http_protocol_ipv6(input);
            self
        }

Set to enabled to allow access to instance tags from the instance metadata. Set to disabled to turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata.

Default: disabled

Examples found in repository?
src/client.rs (line 65637)
65633
65634
65635
65636
65637
65638
65639
        pub fn instance_metadata_tags(
            mut self,
            input: crate::model::InstanceMetadataTagsState,
        ) -> Self {
            self.inner = self.inner.instance_metadata_tags(input);
            self
        }

Set to enabled to allow access to instance tags from the instance metadata. Set to disabled to turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata.

Default: disabled

Examples found in repository?
src/client.rs (line 65646)
65642
65643
65644
65645
65646
65647
65648
        pub fn set_instance_metadata_tags(
            mut self,
            input: std::option::Option<crate::model::InstanceMetadataTagsState>,
        ) -> Self {
            self.inner = self.inner.set_instance_metadata_tags(input);
            self
        }

Consumes the builder and constructs a ModifyInstanceMetadataOptionsInput.

Examples found in repository?
src/client.rs (line 65520)
65508
65509
65510
65511
65512
65513
65514
65515
65516
65517
65518
65519
65520
65521
65522
65523
65524
65525
65526
65527
65528
65529
65530
65531
65532
65533
65534
65535
65536
65537
65538
65539
65540
65541
65542
65543
65544
65545
65546
65547
65548
65549
65550
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::ModifyInstanceMetadataOptions,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::ModifyInstanceMetadataOptionsError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// 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](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ModifyInstanceMetadataOptionsOutput,
            aws_smithy_http::result::SdkError<crate::error::ModifyInstanceMetadataOptionsError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more