Class: Aws::EC2::Types::AssociateAddressRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb

Overview

Note:

When making an API call, you may pass AssociateAddressRequest data as a hash:

{
  allocation_id: "AllocationId",
  instance_id: "InstanceId",
  public_ip: "String",
  allow_reassociation: false,
  dry_run: false,
  network_interface_id: "NetworkInterfaceId",
  private_ip_address: "String",
}

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#allocation_idString

[EC2-VPC] The allocation ID. This is required for EC2-VPC.

Returns:

  • (String)


1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 1400

class AssociateAddressRequest < Struct.new(
  :allocation_id,
  :instance_id,
  :public_ip,
  :allow_reassociation,
  :dry_run,
  :network_interface_id,
  :private_ip_address)
  SENSITIVE = []
  include Aws::Structure
end

#allow_reassociationBoolean

[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:

  • (Boolean)


1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 1400

class AssociateAddressRequest < Struct.new(
  :allocation_id,
  :instance_id,
  :public_ip,
  :allow_reassociation,
  :dry_run,
  :network_interface_id,
  :private_ip_address)
  SENSITIVE = []
  include Aws::Structure
end

#dry_runBoolean

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.

Returns:

  • (Boolean)


1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 1400

class AssociateAddressRequest < Struct.new(
  :allocation_id,
  :instance_id,
  :public_ip,
  :allow_reassociation,
  :dry_run,
  :network_interface_id,
  :private_ip_address)
  SENSITIVE = []
  include Aws::Structure
end

#instance_idString

The ID of the instance. The instance must have exactly one attached network interface. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. For EC2-Classic, you must specify an instance ID and the instance must be in the running state.

Returns:

  • (String)


1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 1400

class AssociateAddressRequest < Struct.new(
  :allocation_id,
  :instance_id,
  :public_ip,
  :allow_reassociation,
  :dry_run,
  :network_interface_id,
  :private_ip_address)
  SENSITIVE = []
  include Aws::Structure
end

#network_interface_idString

[EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.

For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both.

Returns:

  • (String)


1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 1400

class AssociateAddressRequest < Struct.new(
  :allocation_id,
  :instance_id,
  :public_ip,
  :allow_reassociation,
  :dry_run,
  :network_interface_id,
  :private_ip_address)
  SENSITIVE = []
  include Aws::Structure
end

#private_ip_addressString

[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:

  • (String)


1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 1400

class AssociateAddressRequest < Struct.new(
  :allocation_id,
  :instance_id,
  :public_ip,
  :allow_reassociation,
  :dry_run,
  :network_interface_id,
  :private_ip_address)
  SENSITIVE = []
  include Aws::Structure
end

#public_ipString

[EC2-Classic] The Elastic IP address to associate with the instance. This is required for EC2-Classic.

Returns:

  • (String)


1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 1400

class AssociateAddressRequest < Struct.new(
  :allocation_id,
  :instance_id,
  :public_ip,
  :allow_reassociation,
  :dry_run,
  :network_interface_id,
  :private_ip_address)
  SENSITIVE = []
  include Aws::Structure
end