com.amazonaws.services.ec2.model.DescribeVpnConnectionsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ec2 Show documentation
/*
* Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.DescribeVpnConnectionsRequestMarshaller;
/**
*
* Contains the parameters for DescribeVpnConnections.
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeVpnConnectionsRequest extends AmazonWebServiceRequest implements Serializable, Cloneable,
DryRunSupportedRequest {
/**
*
* One or more filters.
*
*
* -
*
* customer-gateway-configuration
- The configuration information for the customer gateway.
*
*
* -
*
* customer-gateway-id
- The ID of a customer gateway associated with the VPN connection.
*
*
* -
*
* state
- The state of the VPN connection (pending
| available
|
* deleting
| deleted
).
*
*
* -
*
* option.static-routes-only
- Indicates whether the connection has static routes only. Used for
* devices that do not support Border Gateway Protocol (BGP).
*
*
* -
*
* route.destination-cidr-block
- The destination CIDR block. This corresponds to the subnet used in a
* customer data center.
*
*
* -
*
* bgp-asn
- The BGP Autonomous System Number (ASN) associated with a BGP device.
*
*
* -
*
* tag
:<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 Owner
and the value TeamA
, specify tag:Owner
for the filter name
* and TeamA
for the filter value.
*
*
* -
*
* tag-key
- 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.
*
*
* -
*
* type
- The type of VPN connection. Currently the only supported type is ipsec.1
.
*
*
* -
*
* vpn-connection-id
- The ID of the VPN connection.
*
*
* -
*
* vpn-gateway-id
- The ID of a virtual private gateway associated with the VPN connection.
*
*
*
*/
private com.amazonaws.internal.SdkInternalList filters;
/**
*
* One or more VPN connection IDs.
*
*
* Default: Describes your VPN connections.
*
*/
private com.amazonaws.internal.SdkInternalList vpnConnectionIds;
/**
*
* One or more filters.
*
*
* -
*
* customer-gateway-configuration
- The configuration information for the customer gateway.
*
*
* -
*
* customer-gateway-id
- The ID of a customer gateway associated with the VPN connection.
*
*
* -
*
* state
- The state of the VPN connection (pending
| available
|
* deleting
| deleted
).
*
*
* -
*
* option.static-routes-only
- Indicates whether the connection has static routes only. Used for
* devices that do not support Border Gateway Protocol (BGP).
*
*
* -
*
* route.destination-cidr-block
- The destination CIDR block. This corresponds to the subnet used in a
* customer data center.
*
*
* -
*
* bgp-asn
- The BGP Autonomous System Number (ASN) associated with a BGP device.
*
*
* -
*
* tag
:<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 Owner
and the value TeamA
, specify tag:Owner
for the filter name
* and TeamA
for the filter value.
*
*
* -
*
* tag-key
- 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.
*
*
* -
*
* type
- The type of VPN connection. Currently the only supported type is ipsec.1
.
*
*
* -
*
* vpn-connection-id
- The ID of the VPN connection.
*
*
* -
*
* vpn-gateway-id
- The ID of a virtual private gateway associated with the VPN connection.
*
*
*
*
* @return One or more filters.
*
* -
*
* customer-gateway-configuration
- The configuration information for the customer gateway.
*
*
* -
*
* customer-gateway-id
- The ID of a customer gateway associated with the VPN connection.
*
*
* -
*
* state
- The state of the VPN connection (pending
| available
|
* deleting
| deleted
).
*
*
* -
*
* option.static-routes-only
- Indicates whether the connection has static routes only. Used
* for devices that do not support Border Gateway Protocol (BGP).
*
*
* -
*
* route.destination-cidr-block
- The destination CIDR block. This corresponds to the subnet
* used in a customer data center.
*
*
* -
*
* bgp-asn
- The BGP Autonomous System Number (ASN) associated with a BGP device.
*
*
* -
*
* tag
:<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 Owner
and the value TeamA
, specify
* tag:Owner
for the filter name and TeamA
for the filter value.
*
*
* -
*
* tag-key
- 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.
*
*
* -
*
* type
- The type of VPN connection. Currently the only supported type is ipsec.1
* .
*
*
* -
*
* vpn-connection-id
- The ID of the VPN connection.
*
*
* -
*
* vpn-gateway-id
- The ID of a virtual private gateway associated with the VPN connection.
*
*
*/
public java.util.List getFilters() {
if (filters == null) {
filters = new com.amazonaws.internal.SdkInternalList();
}
return filters;
}
/**
*
* One or more filters.
*
*
* -
*
* customer-gateway-configuration
- The configuration information for the customer gateway.
*
*
* -
*
* customer-gateway-id
- The ID of a customer gateway associated with the VPN connection.
*
*
* -
*
* state
- The state of the VPN connection (pending
| available
|
* deleting
| deleted
).
*
*
* -
*
* option.static-routes-only
- Indicates whether the connection has static routes only. Used for
* devices that do not support Border Gateway Protocol (BGP).
*
*
* -
*
* route.destination-cidr-block
- The destination CIDR block. This corresponds to the subnet used in a
* customer data center.
*
*
* -
*
* bgp-asn
- The BGP Autonomous System Number (ASN) associated with a BGP device.
*
*
* -
*
* tag
:<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 Owner
and the value TeamA
, specify tag:Owner
for the filter name
* and TeamA
for the filter value.
*
*
* -
*
* tag-key
- 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.
*
*
* -
*
* type
- The type of VPN connection. Currently the only supported type is ipsec.1
.
*
*
* -
*
* vpn-connection-id
- The ID of the VPN connection.
*
*
* -
*
* vpn-gateway-id
- The ID of a virtual private gateway associated with the VPN connection.
*
*
*
*
* @param filters
* One or more filters.
*
* -
*
* customer-gateway-configuration
- The configuration information for the customer gateway.
*
*
* -
*
* customer-gateway-id
- The ID of a customer gateway associated with the VPN connection.
*
*
* -
*
* state
- The state of the VPN connection (pending
| available
|
* deleting
| deleted
).
*
*
* -
*
* option.static-routes-only
- Indicates whether the connection has static routes only. Used for
* devices that do not support Border Gateway Protocol (BGP).
*
*
* -
*
* route.destination-cidr-block
- The destination CIDR block. This corresponds to the subnet
* used in a customer data center.
*
*
* -
*
* bgp-asn
- The BGP Autonomous System Number (ASN) associated with a BGP device.
*
*
* -
*
* tag
:<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 Owner
and the value TeamA
, specify tag:Owner
for
* the filter name and TeamA
for the filter value.
*
*
* -
*
* tag-key
- 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.
*
*
* -
*
* type
- The type of VPN connection. Currently the only supported type is ipsec.1
.
*
*
* -
*
* vpn-connection-id
- The ID of the VPN connection.
*
*
* -
*
* vpn-gateway-id
- The ID of a virtual private gateway associated with the VPN connection.
*
*
*/
public void setFilters(java.util.Collection filters) {
if (filters == null) {
this.filters = null;
return;
}
this.filters = new com.amazonaws.internal.SdkInternalList(filters);
}
/**
*
* One or more filters.
*
*
* -
*
* customer-gateway-configuration
- The configuration information for the customer gateway.
*
*
* -
*
* customer-gateway-id
- The ID of a customer gateway associated with the VPN connection.
*
*
* -
*
* state
- The state of the VPN connection (pending
| available
|
* deleting
| deleted
).
*
*
* -
*
* option.static-routes-only
- Indicates whether the connection has static routes only. Used for
* devices that do not support Border Gateway Protocol (BGP).
*
*
* -
*
* route.destination-cidr-block
- The destination CIDR block. This corresponds to the subnet used in a
* customer data center.
*
*
* -
*
* bgp-asn
- The BGP Autonomous System Number (ASN) associated with a BGP device.
*
*
* -
*
* tag
:<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 Owner
and the value TeamA
, specify tag:Owner
for the filter name
* and TeamA
for the filter value.
*
*
* -
*
* tag-key
- 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.
*
*
* -
*
* type
- The type of VPN connection. Currently the only supported type is ipsec.1
.
*
*
* -
*
* vpn-connection-id
- The ID of the VPN connection.
*
*
* -
*
* vpn-gateway-id
- The ID of a virtual private gateway associated with the VPN connection.
*
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setFilters(java.util.Collection)} or {@link #withFilters(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param filters
* One or more filters.
*
* -
*
* customer-gateway-configuration
- The configuration information for the customer gateway.
*
*
* -
*
* customer-gateway-id
- The ID of a customer gateway associated with the VPN connection.
*
*
* -
*
* state
- The state of the VPN connection (pending
| available
|
* deleting
| deleted
).
*
*
* -
*
* option.static-routes-only
- Indicates whether the connection has static routes only. Used for
* devices that do not support Border Gateway Protocol (BGP).
*
*
* -
*
* route.destination-cidr-block
- The destination CIDR block. This corresponds to the subnet
* used in a customer data center.
*
*
* -
*
* bgp-asn
- The BGP Autonomous System Number (ASN) associated with a BGP device.
*
*
* -
*
* tag
:<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 Owner
and the value TeamA
, specify tag:Owner
for
* the filter name and TeamA
for the filter value.
*
*
* -
*
* tag-key
- 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.
*
*
* -
*
* type
- The type of VPN connection. Currently the only supported type is ipsec.1
.
*
*
* -
*
* vpn-connection-id
- The ID of the VPN connection.
*
*
* -
*
* vpn-gateway-id
- The ID of a virtual private gateway associated with the VPN connection.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeVpnConnectionsRequest withFilters(Filter... filters) {
if (this.filters == null) {
setFilters(new com.amazonaws.internal.SdkInternalList(filters.length));
}
for (Filter ele : filters) {
this.filters.add(ele);
}
return this;
}
/**
*
* One or more filters.
*
*
* -
*
* customer-gateway-configuration
- The configuration information for the customer gateway.
*
*
* -
*
* customer-gateway-id
- The ID of a customer gateway associated with the VPN connection.
*
*
* -
*
* state
- The state of the VPN connection (pending
| available
|
* deleting
| deleted
).
*
*
* -
*
* option.static-routes-only
- Indicates whether the connection has static routes only. Used for
* devices that do not support Border Gateway Protocol (BGP).
*
*
* -
*
* route.destination-cidr-block
- The destination CIDR block. This corresponds to the subnet used in a
* customer data center.
*
*
* -
*
* bgp-asn
- The BGP Autonomous System Number (ASN) associated with a BGP device.
*
*
* -
*
* tag
:<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 Owner
and the value TeamA
, specify tag:Owner
for the filter name
* and TeamA
for the filter value.
*
*
* -
*
* tag-key
- 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.
*
*
* -
*
* type
- The type of VPN connection. Currently the only supported type is ipsec.1
.
*
*
* -
*
* vpn-connection-id
- The ID of the VPN connection.
*
*
* -
*
* vpn-gateway-id
- The ID of a virtual private gateway associated with the VPN connection.
*
*
*
*
* @param filters
* One or more filters.
*
* -
*
* customer-gateway-configuration
- The configuration information for the customer gateway.
*
*
* -
*
* customer-gateway-id
- The ID of a customer gateway associated with the VPN connection.
*
*
* -
*
* state
- The state of the VPN connection (pending
| available
|
* deleting
| deleted
).
*
*
* -
*
* option.static-routes-only
- Indicates whether the connection has static routes only. Used for
* devices that do not support Border Gateway Protocol (BGP).
*
*
* -
*
* route.destination-cidr-block
- The destination CIDR block. This corresponds to the subnet
* used in a customer data center.
*
*
* -
*
* bgp-asn
- The BGP Autonomous System Number (ASN) associated with a BGP device.
*
*
* -
*
* tag
:<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 Owner
and the value TeamA
, specify tag:Owner
for
* the filter name and TeamA
for the filter value.
*
*
* -
*
* tag-key
- 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.
*
*
* -
*
* type
- The type of VPN connection. Currently the only supported type is ipsec.1
.
*
*
* -
*
* vpn-connection-id
- The ID of the VPN connection.
*
*
* -
*
* vpn-gateway-id
- The ID of a virtual private gateway associated with the VPN connection.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeVpnConnectionsRequest withFilters(java.util.Collection filters) {
setFilters(filters);
return this;
}
/**
*
* One or more VPN connection IDs.
*
*
* Default: Describes your VPN connections.
*
*
* @return One or more VPN connection IDs.
*
* Default: Describes your VPN connections.
*/
public java.util.List getVpnConnectionIds() {
if (vpnConnectionIds == null) {
vpnConnectionIds = new com.amazonaws.internal.SdkInternalList();
}
return vpnConnectionIds;
}
/**
*
* One or more VPN connection IDs.
*
*
* Default: Describes your VPN connections.
*
*
* @param vpnConnectionIds
* One or more VPN connection IDs.
*
* Default: Describes your VPN connections.
*/
public void setVpnConnectionIds(java.util.Collection vpnConnectionIds) {
if (vpnConnectionIds == null) {
this.vpnConnectionIds = null;
return;
}
this.vpnConnectionIds = new com.amazonaws.internal.SdkInternalList(vpnConnectionIds);
}
/**
*
* One or more VPN connection IDs.
*
*
* Default: Describes your VPN connections.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setVpnConnectionIds(java.util.Collection)} or {@link #withVpnConnectionIds(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param vpnConnectionIds
* One or more VPN connection IDs.
*
* Default: Describes your VPN connections.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeVpnConnectionsRequest withVpnConnectionIds(String... vpnConnectionIds) {
if (this.vpnConnectionIds == null) {
setVpnConnectionIds(new com.amazonaws.internal.SdkInternalList(vpnConnectionIds.length));
}
for (String ele : vpnConnectionIds) {
this.vpnConnectionIds.add(ele);
}
return this;
}
/**
*
* One or more VPN connection IDs.
*
*
* Default: Describes your VPN connections.
*
*
* @param vpnConnectionIds
* One or more VPN connection IDs.
*
* Default: Describes your VPN connections.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeVpnConnectionsRequest withVpnConnectionIds(java.util.Collection vpnConnectionIds) {
setVpnConnectionIds(vpnConnectionIds);
return this;
}
/**
* This method is intended for internal use only. Returns the marshaled request configured with additional
* parameters to enable operation dry-run.
*/
@Override
public Request getDryRunRequest() {
Request request = new DescribeVpnConnectionsRequestMarshaller().marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getFilters() != null)
sb.append("Filters: ").append(getFilters()).append(",");
if (getVpnConnectionIds() != null)
sb.append("VpnConnectionIds: ").append(getVpnConnectionIds());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeVpnConnectionsRequest == false)
return false;
DescribeVpnConnectionsRequest other = (DescribeVpnConnectionsRequest) obj;
if (other.getFilters() == null ^ this.getFilters() == null)
return false;
if (other.getFilters() != null && other.getFilters().equals(this.getFilters()) == false)
return false;
if (other.getVpnConnectionIds() == null ^ this.getVpnConnectionIds() == null)
return false;
if (other.getVpnConnectionIds() != null && other.getVpnConnectionIds().equals(this.getVpnConnectionIds()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getFilters() == null) ? 0 : getFilters().hashCode());
hashCode = prime * hashCode + ((getVpnConnectionIds() == null) ? 0 : getVpnConnectionIds().hashCode());
return hashCode;
}
@Override
public DescribeVpnConnectionsRequest clone() {
return (DescribeVpnConnectionsRequest) super.clone();
}
}