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.

/// <p>Contains the parameters for DescribeVpnGateways.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeVpnGatewaysInput {
    /// <p>One or more filters.</p>
    /// <ul>
    /// <li>
    /// <p><code>amazon-side-asn</code> - The Autonomous System Number (ASN) for the Amazon side of the gateway.</p></li>
    /// <li>
    /// <p><code>attachment.state</code> - The current state of the attachment between the gateway and the VPC (<code>attaching</code> | <code>attached</code> | <code>detaching</code> | <code>detached</code>).</p></li>
    /// <li>
    /// <p><code>attachment.vpc-id</code> - The ID of an attached VPC.</p></li>
    /// <li>
    /// <p><code>availability-zone</code> - The Availability Zone for the virtual private gateway (if applicable).</p></li>
    /// <li>
    /// <p><code>state</code> - The state of the virtual private gateway (<code>pending</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>).</p></li>
    /// <li>
    /// <p><code>tag</code>:<key>
    /// - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key
    /// <code>Owner</code> and the value
    /// <code>TeamA</code>, specify
    /// <code>tag:Owner</code> for the filter name and
    /// <code>TeamA</code> for the filter value.
    /// </key></p></li>
    /// <li>
    /// <p><code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p></li>
    /// <li>
    /// <p><code>type</code> - The type of virtual private gateway. Currently the only supported type is <code>ipsec.1</code>.</p></li>
    /// <li>
    /// <p><code>vpn-gateway-id</code> - The ID of the virtual private gateway.</p></li>
    /// </ul>
    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
    /// <p>One or more virtual private gateway IDs.</p>
    /// <p>Default: Describes all your virtual private gateways.</p>
    pub vpn_gateway_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <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>,
}
impl DescribeVpnGatewaysInput {
    /// <p>One or more filters.</p>
    /// <ul>
    /// <li>
    /// <p><code>amazon-side-asn</code> - The Autonomous System Number (ASN) for the Amazon side of the gateway.</p></li>
    /// <li>
    /// <p><code>attachment.state</code> - The current state of the attachment between the gateway and the VPC (<code>attaching</code> | <code>attached</code> | <code>detaching</code> | <code>detached</code>).</p></li>
    /// <li>
    /// <p><code>attachment.vpc-id</code> - The ID of an attached VPC.</p></li>
    /// <li>
    /// <p><code>availability-zone</code> - The Availability Zone for the virtual private gateway (if applicable).</p></li>
    /// <li>
    /// <p><code>state</code> - The state of the virtual private gateway (<code>pending</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>).</p></li>
    /// <li>
    /// <p><code>tag</code>:<key>
    /// - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key
    /// <code>Owner</code> and the value
    /// <code>TeamA</code>, specify
    /// <code>tag:Owner</code> for the filter name and
    /// <code>TeamA</code> for the filter value.
    /// </key></p></li>
    /// <li>
    /// <p><code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p></li>
    /// <li>
    /// <p><code>type</code> - The type of virtual private gateway. Currently the only supported type is <code>ipsec.1</code>.</p></li>
    /// <li>
    /// <p><code>vpn-gateway-id</code> - The ID of the virtual private gateway.</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()
    }
    /// <p>One or more virtual private gateway IDs.</p>
    /// <p>Default: Describes all your virtual private gateways.</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 `.vpn_gateway_ids.is_none()`.
    pub fn vpn_gateway_ids(&self) -> &[::std::string::String] {
        self.vpn_gateway_ids.as_deref().unwrap_or_default()
    }
    /// <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
    }
}
impl DescribeVpnGatewaysInput {
    /// Creates a new builder-style object to manufacture [`DescribeVpnGatewaysInput`](crate::operation::describe_vpn_gateways::DescribeVpnGatewaysInput).
    pub fn builder() -> crate::operation::describe_vpn_gateways::builders::DescribeVpnGatewaysInputBuilder {
        crate::operation::describe_vpn_gateways::builders::DescribeVpnGatewaysInputBuilder::default()
    }
}

/// A builder for [`DescribeVpnGatewaysInput`](crate::operation::describe_vpn_gateways::DescribeVpnGatewaysInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeVpnGatewaysInputBuilder {
    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
    pub(crate) vpn_gateway_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) dry_run: ::std::option::Option<bool>,
}
impl DescribeVpnGatewaysInputBuilder {
    /// Appends an item to `filters`.
    ///
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
    ///
    /// <p>One or more filters.</p>
    /// <ul>
    /// <li>
    /// <p><code>amazon-side-asn</code> - The Autonomous System Number (ASN) for the Amazon side of the gateway.</p></li>
    /// <li>
    /// <p><code>attachment.state</code> - The current state of the attachment between the gateway and the VPC (<code>attaching</code> | <code>attached</code> | <code>detaching</code> | <code>detached</code>).</p></li>
    /// <li>
    /// <p><code>attachment.vpc-id</code> - The ID of an attached VPC.</p></li>
    /// <li>
    /// <p><code>availability-zone</code> - The Availability Zone for the virtual private gateway (if applicable).</p></li>
    /// <li>
    /// <p><code>state</code> - The state of the virtual private gateway (<code>pending</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>).</p></li>
    /// <li>
    /// <p><code>tag</code>:<key>
    /// - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key
    /// <code>Owner</code> and the value
    /// <code>TeamA</code>, specify
    /// <code>tag:Owner</code> for the filter name and
    /// <code>TeamA</code> for the filter value.
    /// </key></p></li>
    /// <li>
    /// <p><code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p></li>
    /// <li>
    /// <p><code>type</code> - The type of virtual private gateway. Currently the only supported type is <code>ipsec.1</code>.</p></li>
    /// <li>
    /// <p><code>vpn-gateway-id</code> - The ID of the virtual private gateway.</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>One or more filters.</p>
    /// <ul>
    /// <li>
    /// <p><code>amazon-side-asn</code> - The Autonomous System Number (ASN) for the Amazon side of the gateway.</p></li>
    /// <li>
    /// <p><code>attachment.state</code> - The current state of the attachment between the gateway and the VPC (<code>attaching</code> | <code>attached</code> | <code>detaching</code> | <code>detached</code>).</p></li>
    /// <li>
    /// <p><code>attachment.vpc-id</code> - The ID of an attached VPC.</p></li>
    /// <li>
    /// <p><code>availability-zone</code> - The Availability Zone for the virtual private gateway (if applicable).</p></li>
    /// <li>
    /// <p><code>state</code> - The state of the virtual private gateway (<code>pending</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>).</p></li>
    /// <li>
    /// <p><code>tag</code>:<key>
    /// - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key
    /// <code>Owner</code> and the value
    /// <code>TeamA</code>, specify
    /// <code>tag:Owner</code> for the filter name and
    /// <code>TeamA</code> for the filter value.
    /// </key></p></li>
    /// <li>
    /// <p><code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p></li>
    /// <li>
    /// <p><code>type</code> - The type of virtual private gateway. Currently the only supported type is <code>ipsec.1</code>.</p></li>
    /// <li>
    /// <p><code>vpn-gateway-id</code> - The ID of the virtual private gateway.</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>One or more filters.</p>
    /// <ul>
    /// <li>
    /// <p><code>amazon-side-asn</code> - The Autonomous System Number (ASN) for the Amazon side of the gateway.</p></li>
    /// <li>
    /// <p><code>attachment.state</code> - The current state of the attachment between the gateway and the VPC (<code>attaching</code> | <code>attached</code> | <code>detaching</code> | <code>detached</code>).</p></li>
    /// <li>
    /// <p><code>attachment.vpc-id</code> - The ID of an attached VPC.</p></li>
    /// <li>
    /// <p><code>availability-zone</code> - The Availability Zone for the virtual private gateway (if applicable).</p></li>
    /// <li>
    /// <p><code>state</code> - The state of the virtual private gateway (<code>pending</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code>).</p></li>
    /// <li>
    /// <p><code>tag</code>:<key>
    /// - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key
    /// <code>Owner</code> and the value
    /// <code>TeamA</code>, specify
    /// <code>tag:Owner</code> for the filter name and
    /// <code>TeamA</code> for the filter value.
    /// </key></p></li>
    /// <li>
    /// <p><code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p></li>
    /// <li>
    /// <p><code>type</code> - The type of virtual private gateway. Currently the only supported type is <code>ipsec.1</code>.</p></li>
    /// <li>
    /// <p><code>vpn-gateway-id</code> - The ID of the virtual private gateway.</p></li>
    /// </ul>
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
        &self.filters
    }
    /// Appends an item to `vpn_gateway_ids`.
    ///
    /// To override the contents of this collection use [`set_vpn_gateway_ids`](Self::set_vpn_gateway_ids).
    ///
    /// <p>One or more virtual private gateway IDs.</p>
    /// <p>Default: Describes all your virtual private gateways.</p>
    pub fn vpn_gateway_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.vpn_gateway_ids.unwrap_or_default();
        v.push(input.into());
        self.vpn_gateway_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>One or more virtual private gateway IDs.</p>
    /// <p>Default: Describes all your virtual private gateways.</p>
    pub fn set_vpn_gateway_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.vpn_gateway_ids = input;
        self
    }
    /// <p>One or more virtual private gateway IDs.</p>
    /// <p>Default: Describes all your virtual private gateways.</p>
    pub fn get_vpn_gateway_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.vpn_gateway_ids
    }
    /// <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
    }
    /// Consumes the builder and constructs a [`DescribeVpnGatewaysInput`](crate::operation::describe_vpn_gateways::DescribeVpnGatewaysInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_vpn_gateways::DescribeVpnGatewaysInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::describe_vpn_gateways::DescribeVpnGatewaysInput {
            filters: self.filters,
            vpn_gateway_ids: self.vpn_gateway_ids,
            dry_run: self.dry_run,
        })
    }
}