Paws::EC2::CopySnapshot - Arguments for method CopySnapshot on Paws::EC2
This class represents the parameters used for calling the method CopySnapshot on the Amazon Elastic Compute Cloud service. Use the attributes of this class as arguments to method CopySnapshot.
You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CopySnapshot.
my $ec2 = Paws->service('EC2'); # To copy a snapshot # This example copies a snapshot with the snapshot ID of # ``snap-066877671789bd71b`` from the ``us-west-2`` region to the # ``us-east-1`` region and adds a short description to identify the snapshot. my $CopySnapshotResult = $ec2->CopySnapshot( 'Description' => 'This is my copied snapshot.', 'DestinationRegion' => 'us-east-1', 'SourceRegion' => 'us-west-2', 'SourceSnapshotId' => 'snap-066877671789bd71b' ); # Results: my $SnapshotId = $CopySnapshotResult->SnapshotId; # Returns a L<Paws::EC2::CopySnapshotResult> object.
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. For the AWS API documentation, see https://docs.aws.amazon.com/goto/WebAPI/ec2/CopySnapshot
A description for the EBS snapshot.
The destination Region to use in the PresignedUrl parameter of a snapshot copy operation. This parameter is only valid for specifying the destination Region in a PresignedUrl parameter, where it is required.
PresignedUrl
The snapshot copy is sent to the regional endpoint that you sent the HTTP request to (for example, ec2.us-east-1.amazonaws.com). With the AWS CLI, this is specified using the --region parameter or the default Region in your AWS configuration file.
ec2.us-east-1.amazonaws.com
--region
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.
DryRunOperation
UnauthorizedOperation
To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. Otherwise, omit this parameter. Encrypted snapshots are encrypted, even if you omit this parameter and encryption by default is not enabled. You cannot set this parameter to false. For more information, see Amazon EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in the Amazon Elastic Compute Cloud User Guide.
The identifier of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use for Amazon EBS encryption. If this parameter is not specified, your AWS managed CMK for EBS is used. If KmsKeyId is specified, the encrypted state must be true.
KmsKeyId
true
You can specify the CMK using any of the following:
Key ID. For example, key/1234abcd-12ab-34cd-56ef-1234567890ab.
Key alias. For example, alias/ExampleAlias.
Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef.
Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
AWS authenticates the CMK asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.
When you copy an encrypted source snapshot using the Amazon EC2 Query API, you must supply a pre-signed URL. This parameter is optional for unencrypted snapshots. For more information, see Query Requests (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html).
The PresignedUrl should use the snapshot source endpoint, the CopySnapshot action, and include the SourceRegion, SourceSnapshotId, and DestinationRegion parameters. The PresignedUrl must be signed using AWS Signature Version 4. Because EBS snapshots are stored in Amazon S3, the signing algorithm for this parameter uses the same logic that is described in Authenticating Requests by Using Query Parameters (AWS Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) in the Amazon Simple Storage Service API Reference. An invalid or improperly signed PresignedUrl will cause the copy operation to fail asynchronously, and the snapshot will move to an error state.
CopySnapshot
SourceRegion
SourceSnapshotId
DestinationRegion
error
The ID of the Region that contains the snapshot to be copied.
The ID of the EBS snapshot to copy.
The tags to apply to the new snapshot.
This class forms part of Paws, documenting arguments for method CopySnapshot in Paws::EC2
The source code is located here: https://github.com/pplu/aws-sdk-perl
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
To install Paws::SDK::Config, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Paws::SDK::Config
CPAN shell
perl -MCPAN -e shell install Paws::SDK::Config
For more information on module installation, please visit the detailed CPAN module installation guide.