« blib/lib/Paws/EC2/AssignedPrivateIpAddress.pm
↑ Summary
blib/lib/Paws/EC2/AssociateAddressResult.pm »
| 1 | |||
| 2 | package Paws::EC2::AssociateAddress; | ||
| 3 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | has AllocationId => (is => 'ro', isa => 'Str'); | |
| 5 | 1 | has AllowReassociation => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'allowReassociation' ); | |
| 6 | 1 | has DryRun => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'dryRun' ); | |
| 7 | 1 | has InstanceId => (is => 'ro', isa => 'Str'); | |
| 8 | 1 | has NetworkInterfaceId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'networkInterfaceId' ); | |
| 9 | 1 | has PrivateIpAddress => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'privateIpAddress' ); | |
| 10 | 1 | has PublicIp => (is => 'ro', isa => 'Str'); | |
| 11 | |||
| 12 | 1 | ▶ | use MooseX::ClassAttribute; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 1 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'AssociateAddress'); | |
| 15 | 1 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::EC2::AssociateAddressResult'); | |
| 16 | 1 | class_has _result_key => (isa => 'Str', is => 'ro'); | |
| 17 | 1 | 1; | |
| 18 | |||
| 19 | ### main pod documentation begin ### | ||
| 20 | |||
| 21 | =head1 NAME | ||
| 22 | |||
| 23 | Paws::EC2::AssociateAddress - Arguments for method AssociateAddress on L<Paws::EC2> | ||
| 24 | |||
| 25 | =head1 DESCRIPTION | ||
| 26 | |||
| 27 | This class represents the parameters used for calling the method AssociateAddress on the | ||
| 28 | L<Amazon Elastic Compute Cloud|Paws::EC2> service. Use the attributes of this class | ||
| 29 | as arguments to method AssociateAddress. | ||
| 30 | |||
| 31 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to AssociateAddress. | ||
| 32 | |||
| 33 | =head1 SYNOPSIS | ||
| 34 | |||
| 35 | my $ec2 = Paws->service('EC2'); | ||
| 36 | # To associate an Elastic IP address in EC2-VPC | ||
| 37 | # This example associates the specified Elastic IP address with the specified | ||
| 38 | # instance in a VPC. | ||
| 39 | my $AssociateAddressResult = $ec2->AssociateAddress( | ||
| 40 | 'AllocationId' => 'eipalloc-64d5890a', | ||
| 41 | 'InstanceId' => 'i-0b263919b6498b123' | ||
| 42 | ); | ||
| 43 | |||
| 44 | # Results: | ||
| 45 | my $AssociationId = $AssociateAddressResult->AssociationId; | ||
| 46 | |||
| 47 | # Returns a L<Paws::EC2::AssociateAddressResult> object. | ||
| 48 | # To associate an Elastic IP address with a network interface | ||
| 49 | # This example associates the specified Elastic IP address with the specified | ||
| 50 | # network interface. | ||
| 51 | my $AssociateAddressResult = $ec2->AssociateAddress( | ||
| 52 | 'AllocationId' => 'eipalloc-64d5890a', | ||
| 53 | 'NetworkInterfaceId' => 'eni-1a2b3c4d' | ||
| 54 | ); | ||
| 55 | |||
| 56 | # Results: | ||
| 57 | my $AssociationId = $AssociateAddressResult->AssociationId; | ||
| 58 | |||
| 59 | # Returns a L<Paws::EC2::AssociateAddressResult> object. | ||
| 60 | # To associate an Elastic IP address in EC2-Classic | ||
| 61 | # This example associates an Elastic IP address with an instance in EC2-Classic. | ||
| 62 | my $AssociateAddressResult = $ec2->AssociateAddress( | ||
| 63 | 'InstanceId' => 'i-07ffe74c7330ebf53', | ||
| 64 | 'PublicIp' => '198.51.100.0' | ||
| 65 | ); | ||
| 66 | |||
| 67 | |||
| 68 | Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. | ||
| 69 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ec2/AssociateAddress> | ||
| 70 | |||
| 71 | =head1 ATTRIBUTES | ||
| 72 | |||
| 73 | |||
| 74 | =head2 AllocationId => Str | ||
| 75 | |||
| 76 | [EC2-VPC] The allocation ID. This is required for EC2-VPC. | ||
| 77 | |||
| 78 | |||
| 79 | |||
| 80 | =head2 AllowReassociation => Bool | ||
| 81 | |||
| 82 | [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an | ||
| 83 | Elastic IP address that is already associated with an instance or | ||
| 84 | network interface to be reassociated with the specified instance or | ||
| 85 | network interface. Otherwise, the operation fails. In a VPC in an | ||
| 86 | EC2-VPC-only account, reassociation is automatic, therefore you can | ||
| 87 | specify false to ensure the operation fails if the Elastic IP address | ||
| 88 | is already associated with another resource. | ||
| 89 | |||
| 90 | |||
| 91 | |||
| 92 | =head2 DryRun => Bool | ||
| 93 | |||
| 94 | Checks whether you have the required permissions for the action, | ||
| 95 | without actually making the request, and provides an error response. If | ||
| 96 | you have the required permissions, the error response is | ||
| 97 | C<DryRunOperation>. Otherwise, it is C<UnauthorizedOperation>. | ||
| 98 | |||
| 99 | |||
| 100 | |||
| 101 | =head2 InstanceId => Str | ||
| 102 | |||
| 103 | The ID of the instance. The instance must have exactly one attached | ||
| 104 | network interface. For EC2-VPC, you can specify either the instance ID | ||
| 105 | or the network interface ID, but not both. For EC2-Classic, you must | ||
| 106 | specify an instance ID and the instance must be in the running state. | ||
| 107 | |||
| 108 | |||
| 109 | |||
| 110 | =head2 NetworkInterfaceId => Str | ||
| 111 | |||
| 112 | [EC2-VPC] The ID of the network interface. If the instance has more | ||
| 113 | than one network interface, you must specify a network interface ID. | ||
| 114 | |||
| 115 | For EC2-VPC, you can specify either the instance ID or the network | ||
| 116 | interface ID, but not both. | ||
| 117 | |||
| 118 | |||
| 119 | |||
| 120 | =head2 PrivateIpAddress => Str | ||
| 121 | |||
| 122 | [EC2-VPC] The primary or secondary private IP address to associate with | ||
| 123 | the Elastic IP address. If no private IP address is specified, the | ||
| 124 | Elastic IP address is associated with the primary private IP address. | ||
| 125 | |||
| 126 | |||
| 127 | |||
| 128 | =head2 PublicIp => Str | ||
| 129 | |||
| 130 | [EC2-Classic] The Elastic IP address to associate with the instance. | ||
| 131 | This is required for EC2-Classic. | ||
| 132 | |||
| 133 | |||
| 134 | |||
| 135 | |||
| 136 | =head1 SEE ALSO | ||
| 137 | |||
| 138 | This class forms part of L<Paws>, documenting arguments for method AssociateAddress in L<Paws::EC2> | ||
| 139 | |||
| 140 | =head1 BUGS and CONTRIBUTIONS | ||
| 141 | |||
| 142 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 143 | |||
| 144 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 145 | |||
| 146 | =cut | ||
| 147 | |||