aws-sdk-ec2 1.218.0

AWS SDK for Amazon Elastic Compute Cloud
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeAvailabilityZonesInput {
    /// <p>The names of the Availability Zones, Local Zones, and Wavelength Zones.</p>
    pub zone_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The IDs of the Availability Zones, Local Zones, and Wavelength Zones.</p>
    pub zone_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Include all Availability Zones, Local Zones, and Wavelength Zones regardless of your opt-in status.</p>
    /// <p>If you do not use this parameter, the results include only the zones for the Regions where you have chosen the option to opt in.</p>
    pub all_availability_zones: ::std::option::Option<bool>,
    /// <p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub dry_run: ::std::option::Option<bool>,
    /// <p>The filters.</p>
    /// <ul>
    /// <li>
    /// <p><code>group-long-name</code> - The long name of the zone group for the Availability Zone (for example, <code>US West (Oregon) 1</code>), the Local Zone (for example, for Zone group <code>us-west-2-lax-1</code>, it is <code>US West (Los Angeles)</code>, or the Wavelength Zone (for example, for Zone group <code>us-east-1-wl1</code>, it is <code>US East (Verizon)</code>.</p></li>
    /// <li>
    /// <p><code>group-name</code> - The name of the zone group for the Availability Zone (for example, <code>us-east-1-zg-1</code>), the Local Zone (for example, <code>us-west-2-lax-1</code>), or the Wavelength Zone (for example, <code>us-east-1-wl1</code>).</p></li>
    /// <li>
    /// <p><code>message</code> - The Zone message.</p></li>
    /// <li>
    /// <p><code>opt-in-status</code> - The opt-in status (<code>opted-in</code> | <code>not-opted-in</code> | <code>opt-in-not-required</code>).</p></li>
    /// <li>
    /// <p><code>parent-zone-id</code> - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.</p></li>
    /// <li>
    /// <p><code>parent-zone-name</code> - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.</p></li>
    /// <li>
    /// <p><code>region-name</code> - The name of the Region for the Zone (for example, <code>us-east-1</code>).</p></li>
    /// <li>
    /// <p><code>state</code> - The state of the Availability Zone, the Local Zone, or the Wavelength Zone (<code>available</code> | <code>unavailable</code> | <code>constrained</code>).</p></li>
    /// <li>
    /// <p><code>zone-id</code> - The ID of the Availability Zone (for example, <code>use1-az1</code>), the Local Zone (for example, <code>usw2-lax1-az1</code>), or the Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p></li>
    /// <li>
    /// <p><code>zone-name</code> - The name of the Availability Zone (for example, <code>us-east-1a</code>), the Local Zone (for example, <code>us-west-2-lax-1a</code>), or the Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p></li>
    /// <li>
    /// <p><code>zone-type</code> - The type of zone (<code>availability-zone</code> | <code>local-zone</code> | <code>wavelength-zone</code>).</p></li>
    /// </ul>
    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
}
impl DescribeAvailabilityZonesInput {
    /// <p>The names of the Availability Zones, Local Zones, and Wavelength Zones.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.zone_names.is_none()`.
    pub fn zone_names(&self) -> &[::std::string::String] {
        self.zone_names.as_deref().unwrap_or_default()
    }
    /// <p>The IDs of the Availability Zones, Local Zones, and Wavelength Zones.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.zone_ids.is_none()`.
    pub fn zone_ids(&self) -> &[::std::string::String] {
        self.zone_ids.as_deref().unwrap_or_default()
    }
    /// <p>Include all Availability Zones, Local Zones, and Wavelength Zones regardless of your opt-in status.</p>
    /// <p>If you do not use this parameter, the results include only the zones for the Regions where you have chosen the option to opt in.</p>
    pub fn all_availability_zones(&self) -> ::std::option::Option<bool> {
        self.all_availability_zones
    }
    /// <p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn dry_run(&self) -> ::std::option::Option<bool> {
        self.dry_run
    }
    /// <p>The filters.</p>
    /// <ul>
    /// <li>
    /// <p><code>group-long-name</code> - The long name of the zone group for the Availability Zone (for example, <code>US West (Oregon) 1</code>), the Local Zone (for example, for Zone group <code>us-west-2-lax-1</code>, it is <code>US West (Los Angeles)</code>, or the Wavelength Zone (for example, for Zone group <code>us-east-1-wl1</code>, it is <code>US East (Verizon)</code>.</p></li>
    /// <li>
    /// <p><code>group-name</code> - The name of the zone group for the Availability Zone (for example, <code>us-east-1-zg-1</code>), the Local Zone (for example, <code>us-west-2-lax-1</code>), or the Wavelength Zone (for example, <code>us-east-1-wl1</code>).</p></li>
    /// <li>
    /// <p><code>message</code> - The Zone message.</p></li>
    /// <li>
    /// <p><code>opt-in-status</code> - The opt-in status (<code>opted-in</code> | <code>not-opted-in</code> | <code>opt-in-not-required</code>).</p></li>
    /// <li>
    /// <p><code>parent-zone-id</code> - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.</p></li>
    /// <li>
    /// <p><code>parent-zone-name</code> - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.</p></li>
    /// <li>
    /// <p><code>region-name</code> - The name of the Region for the Zone (for example, <code>us-east-1</code>).</p></li>
    /// <li>
    /// <p><code>state</code> - The state of the Availability Zone, the Local Zone, or the Wavelength Zone (<code>available</code> | <code>unavailable</code> | <code>constrained</code>).</p></li>
    /// <li>
    /// <p><code>zone-id</code> - The ID of the Availability Zone (for example, <code>use1-az1</code>), the Local Zone (for example, <code>usw2-lax1-az1</code>), or the Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p></li>
    /// <li>
    /// <p><code>zone-name</code> - The name of the Availability Zone (for example, <code>us-east-1a</code>), the Local Zone (for example, <code>us-west-2-lax-1a</code>), or the Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p></li>
    /// <li>
    /// <p><code>zone-type</code> - The type of zone (<code>availability-zone</code> | <code>local-zone</code> | <code>wavelength-zone</code>).</p></li>
    /// </ul>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
    pub fn filters(&self) -> &[crate::types::Filter] {
        self.filters.as_deref().unwrap_or_default()
    }
}
impl DescribeAvailabilityZonesInput {
    /// Creates a new builder-style object to manufacture [`DescribeAvailabilityZonesInput`](crate::operation::describe_availability_zones::DescribeAvailabilityZonesInput).
    pub fn builder() -> crate::operation::describe_availability_zones::builders::DescribeAvailabilityZonesInputBuilder {
        crate::operation::describe_availability_zones::builders::DescribeAvailabilityZonesInputBuilder::default()
    }
}

/// A builder for [`DescribeAvailabilityZonesInput`](crate::operation::describe_availability_zones::DescribeAvailabilityZonesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeAvailabilityZonesInputBuilder {
    pub(crate) zone_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) zone_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) all_availability_zones: ::std::option::Option<bool>,
    pub(crate) dry_run: ::std::option::Option<bool>,
    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
}
impl DescribeAvailabilityZonesInputBuilder {
    /// Appends an item to `zone_names`.
    ///
    /// To override the contents of this collection use [`set_zone_names`](Self::set_zone_names).
    ///
    /// <p>The names of the Availability Zones, Local Zones, and Wavelength Zones.</p>
    pub fn zone_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.zone_names.unwrap_or_default();
        v.push(input.into());
        self.zone_names = ::std::option::Option::Some(v);
        self
    }
    /// <p>The names of the Availability Zones, Local Zones, and Wavelength Zones.</p>
    pub fn set_zone_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.zone_names = input;
        self
    }
    /// <p>The names of the Availability Zones, Local Zones, and Wavelength Zones.</p>
    pub fn get_zone_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.zone_names
    }
    /// Appends an item to `zone_ids`.
    ///
    /// To override the contents of this collection use [`set_zone_ids`](Self::set_zone_ids).
    ///
    /// <p>The IDs of the Availability Zones, Local Zones, and Wavelength Zones.</p>
    pub fn zone_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.zone_ids.unwrap_or_default();
        v.push(input.into());
        self.zone_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>The IDs of the Availability Zones, Local Zones, and Wavelength Zones.</p>
    pub fn set_zone_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.zone_ids = input;
        self
    }
    /// <p>The IDs of the Availability Zones, Local Zones, and Wavelength Zones.</p>
    pub fn get_zone_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.zone_ids
    }
    /// <p>Include all Availability Zones, Local Zones, and Wavelength Zones regardless of your opt-in status.</p>
    /// <p>If you do not use this parameter, the results include only the zones for the Regions where you have chosen the option to opt in.</p>
    pub fn all_availability_zones(mut self, input: bool) -> Self {
        self.all_availability_zones = ::std::option::Option::Some(input);
        self
    }
    /// <p>Include all Availability Zones, Local Zones, and Wavelength Zones regardless of your opt-in status.</p>
    /// <p>If you do not use this parameter, the results include only the zones for the Regions where you have chosen the option to opt in.</p>
    pub fn set_all_availability_zones(mut self, input: ::std::option::Option<bool>) -> Self {
        self.all_availability_zones = input;
        self
    }
    /// <p>Include all Availability Zones, Local Zones, and Wavelength Zones regardless of your opt-in status.</p>
    /// <p>If you do not use this parameter, the results include only the zones for the Regions where you have chosen the option to opt in.</p>
    pub fn get_all_availability_zones(&self) -> &::std::option::Option<bool> {
        &self.all_availability_zones
    }
    /// <p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn dry_run(mut self, input: bool) -> Self {
        self.dry_run = ::std::option::Option::Some(input);
        self
    }
    /// <p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
        self.dry_run = input;
        self
    }
    /// <p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
        &self.dry_run
    }
    /// Appends an item to `filters`.
    ///
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
    ///
    /// <p>The filters.</p>
    /// <ul>
    /// <li>
    /// <p><code>group-long-name</code> - The long name of the zone group for the Availability Zone (for example, <code>US West (Oregon) 1</code>), the Local Zone (for example, for Zone group <code>us-west-2-lax-1</code>, it is <code>US West (Los Angeles)</code>, or the Wavelength Zone (for example, for Zone group <code>us-east-1-wl1</code>, it is <code>US East (Verizon)</code>.</p></li>
    /// <li>
    /// <p><code>group-name</code> - The name of the zone group for the Availability Zone (for example, <code>us-east-1-zg-1</code>), the Local Zone (for example, <code>us-west-2-lax-1</code>), or the Wavelength Zone (for example, <code>us-east-1-wl1</code>).</p></li>
    /// <li>
    /// <p><code>message</code> - The Zone message.</p></li>
    /// <li>
    /// <p><code>opt-in-status</code> - The opt-in status (<code>opted-in</code> | <code>not-opted-in</code> | <code>opt-in-not-required</code>).</p></li>
    /// <li>
    /// <p><code>parent-zone-id</code> - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.</p></li>
    /// <li>
    /// <p><code>parent-zone-name</code> - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.</p></li>
    /// <li>
    /// <p><code>region-name</code> - The name of the Region for the Zone (for example, <code>us-east-1</code>).</p></li>
    /// <li>
    /// <p><code>state</code> - The state of the Availability Zone, the Local Zone, or the Wavelength Zone (<code>available</code> | <code>unavailable</code> | <code>constrained</code>).</p></li>
    /// <li>
    /// <p><code>zone-id</code> - The ID of the Availability Zone (for example, <code>use1-az1</code>), the Local Zone (for example, <code>usw2-lax1-az1</code>), or the Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p></li>
    /// <li>
    /// <p><code>zone-name</code> - The name of the Availability Zone (for example, <code>us-east-1a</code>), the Local Zone (for example, <code>us-west-2-lax-1a</code>), or the Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p></li>
    /// <li>
    /// <p><code>zone-type</code> - The type of zone (<code>availability-zone</code> | <code>local-zone</code> | <code>wavelength-zone</code>).</p></li>
    /// </ul>
    pub fn filters(mut self, input: crate::types::Filter) -> Self {
        let mut v = self.filters.unwrap_or_default();
        v.push(input);
        self.filters = ::std::option::Option::Some(v);
        self
    }
    /// <p>The filters.</p>
    /// <ul>
    /// <li>
    /// <p><code>group-long-name</code> - The long name of the zone group for the Availability Zone (for example, <code>US West (Oregon) 1</code>), the Local Zone (for example, for Zone group <code>us-west-2-lax-1</code>, it is <code>US West (Los Angeles)</code>, or the Wavelength Zone (for example, for Zone group <code>us-east-1-wl1</code>, it is <code>US East (Verizon)</code>.</p></li>
    /// <li>
    /// <p><code>group-name</code> - The name of the zone group for the Availability Zone (for example, <code>us-east-1-zg-1</code>), the Local Zone (for example, <code>us-west-2-lax-1</code>), or the Wavelength Zone (for example, <code>us-east-1-wl1</code>).</p></li>
    /// <li>
    /// <p><code>message</code> - The Zone message.</p></li>
    /// <li>
    /// <p><code>opt-in-status</code> - The opt-in status (<code>opted-in</code> | <code>not-opted-in</code> | <code>opt-in-not-required</code>).</p></li>
    /// <li>
    /// <p><code>parent-zone-id</code> - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.</p></li>
    /// <li>
    /// <p><code>parent-zone-name</code> - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.</p></li>
    /// <li>
    /// <p><code>region-name</code> - The name of the Region for the Zone (for example, <code>us-east-1</code>).</p></li>
    /// <li>
    /// <p><code>state</code> - The state of the Availability Zone, the Local Zone, or the Wavelength Zone (<code>available</code> | <code>unavailable</code> | <code>constrained</code>).</p></li>
    /// <li>
    /// <p><code>zone-id</code> - The ID of the Availability Zone (for example, <code>use1-az1</code>), the Local Zone (for example, <code>usw2-lax1-az1</code>), or the Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p></li>
    /// <li>
    /// <p><code>zone-name</code> - The name of the Availability Zone (for example, <code>us-east-1a</code>), the Local Zone (for example, <code>us-west-2-lax-1a</code>), or the Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p></li>
    /// <li>
    /// <p><code>zone-type</code> - The type of zone (<code>availability-zone</code> | <code>local-zone</code> | <code>wavelength-zone</code>).</p></li>
    /// </ul>
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
        self.filters = input;
        self
    }
    /// <p>The filters.</p>
    /// <ul>
    /// <li>
    /// <p><code>group-long-name</code> - The long name of the zone group for the Availability Zone (for example, <code>US West (Oregon) 1</code>), the Local Zone (for example, for Zone group <code>us-west-2-lax-1</code>, it is <code>US West (Los Angeles)</code>, or the Wavelength Zone (for example, for Zone group <code>us-east-1-wl1</code>, it is <code>US East (Verizon)</code>.</p></li>
    /// <li>
    /// <p><code>group-name</code> - The name of the zone group for the Availability Zone (for example, <code>us-east-1-zg-1</code>), the Local Zone (for example, <code>us-west-2-lax-1</code>), or the Wavelength Zone (for example, <code>us-east-1-wl1</code>).</p></li>
    /// <li>
    /// <p><code>message</code> - The Zone message.</p></li>
    /// <li>
    /// <p><code>opt-in-status</code> - The opt-in status (<code>opted-in</code> | <code>not-opted-in</code> | <code>opt-in-not-required</code>).</p></li>
    /// <li>
    /// <p><code>parent-zone-id</code> - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.</p></li>
    /// <li>
    /// <p><code>parent-zone-name</code> - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.</p></li>
    /// <li>
    /// <p><code>region-name</code> - The name of the Region for the Zone (for example, <code>us-east-1</code>).</p></li>
    /// <li>
    /// <p><code>state</code> - The state of the Availability Zone, the Local Zone, or the Wavelength Zone (<code>available</code> | <code>unavailable</code> | <code>constrained</code>).</p></li>
    /// <li>
    /// <p><code>zone-id</code> - The ID of the Availability Zone (for example, <code>use1-az1</code>), the Local Zone (for example, <code>usw2-lax1-az1</code>), or the Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p></li>
    /// <li>
    /// <p><code>zone-name</code> - The name of the Availability Zone (for example, <code>us-east-1a</code>), the Local Zone (for example, <code>us-west-2-lax-1a</code>), or the Wavelength Zone (for example, <code>us-east-1-wl1-bos-wlz-1</code>).</p></li>
    /// <li>
    /// <p><code>zone-type</code> - The type of zone (<code>availability-zone</code> | <code>local-zone</code> | <code>wavelength-zone</code>).</p></li>
    /// </ul>
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
        &self.filters
    }
    /// Consumes the builder and constructs a [`DescribeAvailabilityZonesInput`](crate::operation::describe_availability_zones::DescribeAvailabilityZonesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::describe_availability_zones::DescribeAvailabilityZonesInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::describe_availability_zones::DescribeAvailabilityZonesInput {
            zone_names: self.zone_names,
            zone_ids: self.zone_ids,
            all_availability_zones: self.all_availability_zones,
            dry_run: self.dry_run,
            filters: self.filters,
        })
    }
}