Class AssociateAddressRequest
- All Implemented Interfaces:
ReadLimitInfo
,DryRunSupportedRequest<AssociateAddressRequest>
,Serializable
,Cloneable
Contains the parameters for AssociateAddress.
- See Also:
-
Field Summary
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for AssociateAddressRequest object.AssociateAddressRequest
(String instanceId, String publicIp) Constructs a new AssociateAddressRequest object. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a shallow clone of this request.boolean
[EC2-VPC] The allocation ID.[EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface.This method is intended for internal use only.The ID of the instance.[EC2-VPC] The ID of the network interface.[EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address.The Elastic IP address.int
hashCode()
[EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface.void
setAllocationId
(String allocationId) [EC2-VPC] The allocation ID.void
setAllowReassociation
(Boolean allowReassociation) [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface.void
setInstanceId
(String instanceId) The ID of the instance.void
setNetworkInterfaceId
(String networkInterfaceId) [EC2-VPC] The ID of the network interface.void
setPrivateIpAddress
(String privateIpAddress) [EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address.void
setPublicIp
(String publicIp) The Elastic IP address.toString()
Returns a string representation of this object; useful for testing and debugging.withAllocationId
(String allocationId) [EC2-VPC] The allocation ID.withAllowReassociation
(Boolean allowReassociation) [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface.withInstanceId
(String instanceId) The ID of the instance.withNetworkInterfaceId
(String networkInterfaceId) [EC2-VPC] The ID of the network interface.withPrivateIpAddress
(String privateIpAddress) [EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address.withPublicIp
(String publicIp) The Elastic IP address.Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
Constructor Details
-
AssociateAddressRequest
public AssociateAddressRequest()Default constructor for AssociateAddressRequest object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it. -
AssociateAddressRequest
Constructs a new AssociateAddressRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
instanceId
- The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.publicIp
- The Elastic IP address. This is required for EC2-Classic.
-
-
Method Details
-
setInstanceId
The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.
- Parameters:
instanceId
- The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.
-
getInstanceId
The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.
- Returns:
- The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.
-
withInstanceId
The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.
- Parameters:
instanceId
- The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. The operation fails if you specify an instance ID unless exactly one network interface is attached.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPublicIp
The Elastic IP address. This is required for EC2-Classic.
- Parameters:
publicIp
- The Elastic IP address. This is required for EC2-Classic.
-
getPublicIp
The Elastic IP address. This is required for EC2-Classic.
- Returns:
- The Elastic IP address. This is required for EC2-Classic.
-
withPublicIp
The Elastic IP address. This is required for EC2-Classic.
- Parameters:
publicIp
- The Elastic IP address. This is required for EC2-Classic.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAllocationId
[EC2-VPC] The allocation ID. This is required for EC2-VPC.
- Parameters:
allocationId
- [EC2-VPC] The allocation ID. This is required for EC2-VPC.
-
getAllocationId
[EC2-VPC] The allocation ID. This is required for EC2-VPC.
- Returns:
- [EC2-VPC] The allocation ID. This is required for EC2-VPC.
-
withAllocationId
[EC2-VPC] The allocation ID. This is required for EC2-VPC.
- Parameters:
allocationId
- [EC2-VPC] The allocation ID. This is required for EC2-VPC.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setNetworkInterfaceId
[EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.
- Parameters:
networkInterfaceId
- [EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.
-
getNetworkInterfaceId
[EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.
- Returns:
- [EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.
-
withNetworkInterfaceId
[EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.
- Parameters:
networkInterfaceId
- [EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPrivateIpAddress
[EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.
- Parameters:
privateIpAddress
- [EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.
-
getPrivateIpAddress
[EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.
- Returns:
- [EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.
-
withPrivateIpAddress
[EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.
- Parameters:
privateIpAddress
- [EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAllowReassociation
[EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.
- Parameters:
allowReassociation
- [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.
-
getAllowReassociation
[EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.
- Returns:
- [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.
-
withAllowReassociation
[EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.
- Parameters:
allowReassociation
- [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isAllowReassociation
[EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.
- Returns:
- [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.
-
getDryRunRequest
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.- Specified by:
getDryRunRequest
in interfaceDryRunSupportedRequest<AssociateAddressRequest>
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
Description copied from class:AmazonWebServiceRequest
Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clone
in classAmazonWebServiceRequest
- See Also:
-