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

A builder for CreateSubnetInput.

Implementations§

Appends an item to tag_specifications.

To override the contents of this collection use set_tag_specifications.

The tags to assign to the subnet.

Examples found in repository?
src/client.rs (line 21615)
21614
21615
21616
21617
        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 subnet.

Examples found in repository?
src/client.rs (line 21623)
21619
21620
21621
21622
21623
21624
21625
        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
        }

The Availability Zone or Local Zone for the subnet.

Default: Amazon Web Services selects one for you. If you create more than one subnet in your VPC, we do not necessarily select a different zone for each subnet.

To create a subnet in a Local Zone, set this value to the Local Zone ID, for example us-west-2-lax-1a. For information about the Regions that support Local Zones, see Available Regions in the Amazon Elastic Compute Cloud User Guide.

To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the Outpost ARN.

Examples found in repository?
src/client.rs (line 21631)
21630
21631
21632
21633
        pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.availability_zone(input.into());
            self
        }

The Availability Zone or Local Zone for the subnet.

Default: Amazon Web Services selects one for you. If you create more than one subnet in your VPC, we do not necessarily select a different zone for each subnet.

To create a subnet in a Local Zone, set this value to the Local Zone ID, for example us-west-2-lax-1a. For information about the Regions that support Local Zones, see Available Regions in the Amazon Elastic Compute Cloud User Guide.

To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the Outpost ARN.

Examples found in repository?
src/client.rs (line 21642)
21638
21639
21640
21641
21642
21643
21644
        pub fn set_availability_zone(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_availability_zone(input);
            self
        }

The AZ ID or the Local Zone ID of the subnet.

Examples found in repository?
src/client.rs (line 21647)
21646
21647
21648
21649
        pub fn availability_zone_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.availability_zone_id(input.into());
            self
        }

The AZ ID or the Local Zone ID of the subnet.

Examples found in repository?
src/client.rs (line 21655)
21651
21652
21653
21654
21655
21656
21657
        pub fn set_availability_zone_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_availability_zone_id(input);
            self
        }

The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18.

This parameter is not supported for an IPv6 only subnet.

Examples found in repository?
src/client.rs (line 21661)
21660
21661
21662
21663
        pub fn cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.cidr_block(input.into());
            self
        }

The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18, we modify it to 100.68.0.0/18.

This parameter is not supported for an IPv6 only subnet.

Examples found in repository?
src/client.rs (line 21667)
21666
21667
21668
21669
        pub fn set_cidr_block(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_cidr_block(input);
            self
        }

The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.

This parameter is required for an IPv6 only subnet.

Examples found in repository?
src/client.rs (line 21673)
21672
21673
21674
21675
        pub fn ipv6_cidr_block(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.ipv6_cidr_block(input.into());
            self
        }

The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.

This parameter is required for an IPv6 only subnet.

Examples found in repository?
src/client.rs (line 21682)
21678
21679
21680
21681
21682
21683
21684
        pub fn set_ipv6_cidr_block(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_ipv6_cidr_block(input);
            self
        }

The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also specify the Availability Zone of the Outpost subnet.

Examples found in repository?
src/client.rs (line 21687)
21686
21687
21688
21689
        pub fn outpost_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.outpost_arn(input.into());
            self
        }

The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also specify the Availability Zone of the Outpost subnet.

Examples found in repository?
src/client.rs (line 21692)
21691
21692
21693
21694
        pub fn set_outpost_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_outpost_arn(input);
            self
        }

The ID of the VPC.

Examples found in repository?
src/client.rs (line 21697)
21696
21697
21698
21699
        pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.vpc_id(input.into());
            self
        }

The ID of the VPC.

Examples found in repository?
src/client.rs (line 21702)
21701
21702
21703
21704
        pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_vpc_id(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 21707)
21706
21707
21708
21709
        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 21712)
21711
21712
21713
21714
        pub fn set_dry_run(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_dry_run(input);
            self
        }

Indicates whether to create an IPv6 only subnet.

Examples found in repository?
src/client.rs (line 21717)
21716
21717
21718
21719
        pub fn ipv6_native(mut self, input: bool) -> Self {
            self.inner = self.inner.ipv6_native(input);
            self
        }

Indicates whether to create an IPv6 only subnet.

Examples found in repository?
src/client.rs (line 21722)
21721
21722
21723
21724
        pub fn set_ipv6_native(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_ipv6_native(input);
            self
        }

Consumes the builder and constructs a CreateSubnetInput.

Examples found in repository?
src/client.rs (line 21578)
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateSubnet,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateSubnetError>,
        > {
            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::CreateSubnetOutput,
            aws_smithy_http::result::SdkError<crate::error::CreateSubnetError>,
        > {
            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