| 1 | |||
| 2 | package Paws::EC2::CopySnapshot; | ||
| 3 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | has Description => (is => 'ro', isa => 'Str'); | |
| 5 | 1 | has DestinationOutpostArn => (is => 'ro', isa => 'Str'); | |
| 6 | 1 | has DestinationRegion => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'destinationRegion' ); | |
| 7 | 1 | has DryRun => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'dryRun' ); | |
| 8 | 1 | has Encrypted => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'encrypted' ); | |
| 9 | 1 | has KmsKeyId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'kmsKeyId' ); | |
| 10 | 1 | has PresignedUrl => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'presignedUrl' ); | |
| 11 | 1 | has SourceRegion => (is => 'ro', isa => 'Str', required => 1); | |
| 12 | 1 | has SourceSnapshotId => (is => 'ro', isa => 'Str', required => 1); | |
| 13 | 1 | has TagSpecifications => (is => 'ro', isa => 'ArrayRef[Paws::EC2::TagSpecification]', traits => ['NameInRequest'], request_name => 'TagSpecification' ); | |
| 14 | |||
| 15 | 1 | ▶ | use MooseX::ClassAttribute; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | |||
| 17 | 1 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CopySnapshot'); | |
| 18 | 1 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::EC2::CopySnapshotResult'); | |
| 19 | 1 | class_has _result_key => (isa => 'Str', is => 'ro'); | |
| 20 | 1 | 1; | |
| 21 | |||
| 22 | ### main pod documentation begin ### | ||
| 23 | |||
| 24 | =head1 NAME | ||
| 25 | |||
| 26 | Paws::EC2::CopySnapshot - Arguments for method CopySnapshot on L<Paws::EC2> | ||
| 27 | |||
| 28 | =head1 DESCRIPTION | ||
| 29 | |||
| 30 | This class represents the parameters used for calling the method CopySnapshot on the | ||
| 31 | L<Amazon Elastic Compute Cloud|Paws::EC2> service. Use the attributes of this class | ||
| 32 | as arguments to method CopySnapshot. | ||
| 33 | |||
| 34 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CopySnapshot. | ||
| 35 | |||
| 36 | =head1 SYNOPSIS | ||
| 37 | |||
| 38 | my $ec2 = Paws->service('EC2'); | ||
| 39 | # To copy a snapshot | ||
| 40 | # This example copies a snapshot with the snapshot ID of | ||
| 41 | # ``snap-066877671789bd71b`` from the ``us-west-2`` region to the ``us-east-1`` | ||
| 42 | # region and adds a short description to identify the snapshot. | ||
| 43 | my $CopySnapshotResult = $ec2->CopySnapshot( | ||
| 44 | 'Description' => 'This is my copied snapshot.', | ||
| 45 | 'DestinationRegion' => 'us-east-1', | ||
| 46 | 'SourceRegion' => 'us-west-2', | ||
| 47 | 'SourceSnapshotId' => 'snap-066877671789bd71b' | ||
| 48 | ); | ||
| 49 | |||
| 50 | # Results: | ||
| 51 | my $SnapshotId = $CopySnapshotResult->SnapshotId; | ||
| 52 | |||
| 53 | # Returns a L<Paws::EC2::CopySnapshotResult> object. | ||
| 54 | |||
| 55 | 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. | ||
| 56 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ec2/CopySnapshot> | ||
| 57 | |||
| 58 | =head1 ATTRIBUTES | ||
| 59 | |||
| 60 | |||
| 61 | =head2 Description => Str | ||
| 62 | |||
| 63 | A description for the EBS snapshot. | ||
| 64 | |||
| 65 | |||
| 66 | |||
| 67 | =head2 DestinationOutpostArn => Str | ||
| 68 | |||
| 69 | The Amazon Resource Name (ARN) of the Outpost to which to copy the | ||
| 70 | snapshot. Only specify this parameter when copying a snapshot from an | ||
| 71 | AWS Region to an Outpost. The snapshot must be in the Region for the | ||
| 72 | destination Outpost. You cannot copy a snapshot from an Outpost to a | ||
| 73 | Region, from one Outpost to another, or within the same Outpost. | ||
| 74 | |||
| 75 | For more information, see Copying snapshots from an AWS Region to an | ||
| 76 | Outpost | ||
| 77 | (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#copy-snapshots) | ||
| 78 | in the I<Amazon Elastic Compute Cloud User Guide>. | ||
| 79 | |||
| 80 | |||
| 81 | |||
| 82 | =head2 DestinationRegion => Str | ||
| 83 | |||
| 84 | The destination Region to use in the C<PresignedUrl> parameter of a | ||
| 85 | snapshot copy operation. This parameter is only valid for specifying | ||
| 86 | the destination Region in a C<PresignedUrl> parameter, where it is | ||
| 87 | required. | ||
| 88 | |||
| 89 | The snapshot copy is sent to the regional endpoint that you sent the | ||
| 90 | HTTP request to (for example, C<ec2.us-east-1.amazonaws.com>). With the | ||
| 91 | AWS CLI, this is specified using the C<--region> parameter or the | ||
| 92 | default Region in your AWS configuration file. | ||
| 93 | |||
| 94 | |||
| 95 | |||
| 96 | =head2 DryRun => Bool | ||
| 97 | |||
| 98 | Checks whether you have the required permissions for the action, | ||
| 99 | without actually making the request, and provides an error response. If | ||
| 100 | you have the required permissions, the error response is | ||
| 101 | C<DryRunOperation>. Otherwise, it is C<UnauthorizedOperation>. | ||
| 102 | |||
| 103 | |||
| 104 | |||
| 105 | =head2 Encrypted => Bool | ||
| 106 | |||
| 107 | To encrypt a copy of an unencrypted snapshot if encryption by default | ||
| 108 | is not enabled, enable encryption using this parameter. Otherwise, omit | ||
| 109 | this parameter. Encrypted snapshots are encrypted, even if you omit | ||
| 110 | this parameter and encryption by default is not enabled. You cannot set | ||
| 111 | this parameter to false. For more information, see Amazon EBS | ||
| 112 | encryption | ||
| 113 | (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) | ||
| 114 | in the I<Amazon Elastic Compute Cloud User Guide>. | ||
| 115 | |||
| 116 | |||
| 117 | |||
| 118 | =head2 KmsKeyId => Str | ||
| 119 | |||
| 120 | The identifier of the AWS Key Management Service (AWS KMS) customer | ||
| 121 | master key (CMK) to use for Amazon EBS encryption. If this parameter is | ||
| 122 | not specified, your AWS managed CMK for EBS is used. If C<KmsKeyId> is | ||
| 123 | specified, the encrypted state must be C<true>. | ||
| 124 | |||
| 125 | You can specify the CMK using any of the following: | ||
| 126 | |||
| 127 | =over | ||
| 128 | |||
| 129 | =item * | ||
| 130 | |||
| 131 | Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. | ||
| 132 | |||
| 133 | =item * | ||
| 134 | |||
| 135 | Key alias. For example, alias/ExampleAlias. | ||
| 136 | |||
| 137 | =item * | ||
| 138 | |||
| 139 | Key ARN. For example, | ||
| 140 | arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab. | ||
| 141 | |||
| 142 | =item * | ||
| 143 | |||
| 144 | Alias ARN. For example, | ||
| 145 | arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. | ||
| 146 | |||
| 147 | =back | ||
| 148 | |||
| 149 | AWS authenticates the CMK asynchronously. Therefore, if you specify an | ||
| 150 | ID, alias, or ARN that is not valid, the action can appear to complete, | ||
| 151 | but eventually fails. | ||
| 152 | |||
| 153 | |||
| 154 | |||
| 155 | =head2 PresignedUrl => Str | ||
| 156 | |||
| 157 | When you copy an encrypted source snapshot using the Amazon EC2 Query | ||
| 158 | API, you must supply a pre-signed URL. This parameter is optional for | ||
| 159 | unencrypted snapshots. For more information, see Query requests | ||
| 160 | (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html). | ||
| 161 | |||
| 162 | The C<PresignedUrl> should use the snapshot source endpoint, the | ||
| 163 | C<CopySnapshot> action, and include the C<SourceRegion>, | ||
| 164 | C<SourceSnapshotId>, and C<DestinationRegion> parameters. The | ||
| 165 | C<PresignedUrl> must be signed using AWS Signature Version 4. Because | ||
| 166 | EBS snapshots are stored in Amazon S3, the signing algorithm for this | ||
| 167 | parameter uses the same logic that is described in Authenticating | ||
| 168 | Requests: Using Query Parameters (AWS Signature Version 4) | ||
| 169 | (https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) | ||
| 170 | in the I<Amazon Simple Storage Service API Reference>. An invalid or | ||
| 171 | improperly signed C<PresignedUrl> will cause the copy operation to fail | ||
| 172 | asynchronously, and the snapshot will move to an C<error> state. | ||
| 173 | |||
| 174 | |||
| 175 | |||
| 176 | =head2 B<REQUIRED> SourceRegion => Str | ||
| 177 | |||
| 178 | The ID of the Region that contains the snapshot to be copied. | ||
| 179 | |||
| 180 | |||
| 181 | |||
| 182 | =head2 B<REQUIRED> SourceSnapshotId => Str | ||
| 183 | |||
| 184 | The ID of the EBS snapshot to copy. | ||
| 185 | |||
| 186 | |||
| 187 | |||
| 188 | =head2 TagSpecifications => ArrayRef[L<Paws::EC2::TagSpecification>] | ||
| 189 | |||
| 190 | The tags to apply to the new snapshot. | ||
| 191 | |||
| 192 | |||
| 193 | |||
| 194 | |||
| 195 | =head1 SEE ALSO | ||
| 196 | |||
| 197 | This class forms part of L<Paws>, documenting arguments for method CopySnapshot in L<Paws::EC2> | ||
| 198 | |||
| 199 | =head1 BUGS and CONTRIBUTIONS | ||
| 200 | |||
| 201 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 202 | |||
| 203 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 204 | |||
| 205 | =cut | ||
| 206 | |||