Class: Aws::EC2::Types::AssociateAddressRequest
- Inherits:
-
Struct
- Object
- Struct
- Aws::EC2::Types::AssociateAddressRequest
- Includes:
- Structure
- Defined in:
- lib/aws-sdk-ec2/types.rb
Overview
When making an API call, you may pass AssociateAddressRequest data as a hash:
{
allocation_id: "String",
instance_id: "String",
public_ip: "String",
allow_reassociation: false,
dry_run: false,
network_interface_id: "String",
private_ip_address: "String",
}
Instance Attribute Summary collapse
-
#allocation_id ⇒ String
[EC2-VPC] The allocation ID.
-
#allow_reassociation ⇒ Boolean
[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.
-
#dry_run ⇒ Boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response.
-
#instance_id ⇒ String
The ID of the instance.
-
#network_interface_id ⇒ String
[EC2-VPC] The ID of the network interface.
-
#private_ip_address ⇒ String
[EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address.
-
#public_ip ⇒ String
The Elastic IP address.
Instance Attribute Details
#allocation_id ⇒ String
[EC2-VPC] The allocation ID. This is required for EC2-VPC.
738 739 740 741 742 743 744 745 746 747 |
# File 'lib/aws-sdk-ec2/types.rb', line 738 class AssociateAddressRequest < Struct.new( :allocation_id, :instance_id, :public_ip, :allow_reassociation, :dry_run, :network_interface_id, :private_ip_address) include Aws::Structure end |
#allow_reassociation ⇒ Boolean
[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.
738 739 740 741 742 743 744 745 746 747 |
# File 'lib/aws-sdk-ec2/types.rb', line 738 class AssociateAddressRequest < Struct.new( :allocation_id, :instance_id, :public_ip, :allow_reassociation, :dry_run, :network_interface_id, :private_ip_address) include Aws::Structure end |
#dry_run ⇒ Boolean
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`.
738 739 740 741 742 743 744 745 746 747 |
# File 'lib/aws-sdk-ec2/types.rb', line 738 class AssociateAddressRequest < Struct.new( :allocation_id, :instance_id, :public_ip, :allow_reassociation, :dry_run, :network_interface_id, :private_ip_address) include Aws::Structure end |
#instance_id ⇒ String
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.
738 739 740 741 742 743 744 745 746 747 |
# File 'lib/aws-sdk-ec2/types.rb', line 738 class AssociateAddressRequest < Struct.new( :allocation_id, :instance_id, :public_ip, :allow_reassociation, :dry_run, :network_interface_id, :private_ip_address) include Aws::Structure end |
#network_interface_id ⇒ String
[EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.
738 739 740 741 742 743 744 745 746 747 |
# File 'lib/aws-sdk-ec2/types.rb', line 738 class AssociateAddressRequest < Struct.new( :allocation_id, :instance_id, :public_ip, :allow_reassociation, :dry_run, :network_interface_id, :private_ip_address) include Aws::Structure end |
#private_ip_address ⇒ String
[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.
738 739 740 741 742 743 744 745 746 747 |
# File 'lib/aws-sdk-ec2/types.rb', line 738 class AssociateAddressRequest < Struct.new( :allocation_id, :instance_id, :public_ip, :allow_reassociation, :dry_run, :network_interface_id, :private_ip_address) include Aws::Structure end |
#public_ip ⇒ String
The Elastic IP address. This is required for EC2-Classic.
738 739 740 741 742 743 744 745 746 747 |
# File 'lib/aws-sdk-ec2/types.rb', line 738 class AssociateAddressRequest < Struct.new( :allocation_id, :instance_id, :public_ip, :allow_reassociation, :dry_run, :network_interface_id, :private_ip_address) include Aws::Structure end |