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

A builder for CreateNatGatewayInput.

Implementations§

[Public NAT gateways only] The allocation ID of an Elastic IP address to associate with the NAT gateway. You cannot specify an Elastic IP address with a private NAT gateway. If the Elastic IP address is associated with another resource, you must first disassociate it.

Examples found in repository?
src/client.rs (line 18833)
18832
18833
18834
18835
        pub fn allocation_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.allocation_id(input.into());
            self
        }

[Public NAT gateways only] The allocation ID of an Elastic IP address to associate with the NAT gateway. You cannot specify an Elastic IP address with a private NAT gateway. If the Elastic IP address is associated with another resource, you must first disassociate it.

Examples found in repository?
src/client.rs (line 18841)
18837
18838
18839
18840
18841
18842
18843
        pub fn set_allocation_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_allocation_id(input);
            self
        }

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.

Constraint: Maximum 64 ASCII characters.

Examples found in repository?
src/client.rs (line 18847)
18846
18847
18848
18849
        pub fn client_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.client_token(input.into());
            self
        }

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency.

Constraint: Maximum 64 ASCII characters.

Examples found in repository?
src/client.rs (line 18853)
18852
18853
18854
18855
        pub fn set_client_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_client_token(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 18858)
18857
18858
18859
18860
        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 18863)
18862
18863
18864
18865
        pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_dry_run(input);
            self
        }

The subnet in which to create the NAT gateway.

Examples found in repository?
src/client.rs (line 18868)
18867
18868
18869
18870
        pub fn subnet_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.subnet_id(input.into());
            self
        }

The subnet in which to create the NAT gateway.

Examples found in repository?
src/client.rs (line 18873)
18872
18873
18874
18875
        pub fn set_subnet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_subnet_id(input);
            self
        }

Appends an item to tag_specifications.

To override the contents of this collection use set_tag_specifications.

The tags to assign to the NAT gateway.

Examples found in repository?
src/client.rs (line 18882)
18881
18882
18883
18884
        pub fn tag_specifications(mut self, input: crate::model::TagSpecification) -> Self {
            self.inner = self.inner.tag_specifications(input);
            self
        }

The tags to assign to the NAT gateway.

Examples found in repository?
src/client.rs (line 18890)
18886
18887
18888
18889
18890
18891
18892
        pub fn set_tag_specifications(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::TagSpecification>>,
        ) -> Self {
            self.inner = self.inner.set_tag_specifications(input);
            self
        }

Indicates whether the NAT gateway supports public or private connectivity. The default is public connectivity.

Examples found in repository?
src/client.rs (line 18895)
18894
18895
18896
18897
        pub fn connectivity_type(mut self, input: crate::model::ConnectivityType) -> Self {
            self.inner = self.inner.connectivity_type(input);
            self
        }

Indicates whether the NAT gateway supports public or private connectivity. The default is public connectivity.

Examples found in repository?
src/client.rs (line 18903)
18899
18900
18901
18902
18903
18904
18905
        pub fn set_connectivity_type(
            mut self,
            input: std::option::Option<crate::model::ConnectivityType>,
        ) -> Self {
            self.inner = self.inner.set_connectivity_type(input);
            self
        }

Consumes the builder and constructs a CreateNatGatewayInput.

Examples found in repository?
src/client.rs (line 18800)
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateNatGateway,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateNatGatewayError>,
        > {
            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::CreateNatGatewayOutput,
            aws_smithy_http::result::SdkError<crate::error::CreateNatGatewayError>,
        > {
            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