AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

AssociateAddressInput

import "github.com/aws/aws-sdk-go/service/ec2"

type AssociateAddressInput struct { AllocationId *string `type:"string"` AllowReassociation *bool `locationName:"allowReassociation" type:"boolean"` DryRun *bool `locationName:"dryRun" type:"boolean"` InstanceId *string `type:"string"` NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` PublicIp *string `type:"string"` }

AllocationId

Type: *string

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

AllowReassociation

Type: *bool

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

DryRun

Type: *bool

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.

InstanceId

Type: *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.

NetworkInterfaceId

Type: *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.

PrivateIpAddress

Type: *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.

PublicIp

Type: *string

The Elastic IP address. This is required for EC2-Classic.

Method

GoString

func (s AssociateAddressInput) GoString() string

GoString returns the string representation

SetAllocationId

func (s *AssociateAddressInput) SetAllocationId(v string) *AssociateAddressInput

SetAllocationId sets the AllocationId field's value.

SetAllowReassociation

func (s *AssociateAddressInput) SetAllowReassociation(v bool) *AssociateAddressInput

SetAllowReassociation sets the AllowReassociation field's value.

SetDryRun

func (s *AssociateAddressInput) SetDryRun(v bool) *AssociateAddressInput

SetDryRun sets the DryRun field's value.

SetInstanceId

func (s *AssociateAddressInput) SetInstanceId(v string) *AssociateAddressInput

SetInstanceId sets the InstanceId field's value.

SetNetworkInterfaceId

func (s *AssociateAddressInput) SetNetworkInterfaceId(v string) *AssociateAddressInput

SetNetworkInterfaceId sets the NetworkInterfaceId field's value.

SetPrivateIpAddress

func (s *AssociateAddressInput) SetPrivateIpAddress(v string) *AssociateAddressInput

SetPrivateIpAddress sets the PrivateIpAddress field's value.

SetPublicIp

func (s *AssociateAddressInput) SetPublicIp(v string) *AssociateAddressInput

SetPublicIp sets the PublicIp field's value.

String

func (s AssociateAddressInput) String() string

String returns the string representation

On this page: