File Coverage

blib/lib/Paws/EC2/CopySnapshot.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1              
2             package Paws::EC2::CopySnapshot;
3 1     1   528 use Moose;
  1     1   5  
  1         10  
  1         602  
  1         2  
  1         11  
4             has Description => (is => 'ro', isa => 'Str');
5             has DestinationRegion => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'destinationRegion' );
6             has DryRun => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'dryRun' );
7             has Encrypted => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'encrypted' );
8             has KmsKeyId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'kmsKeyId' );
9             has PresignedUrl => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'presignedUrl' );
10             has SourceRegion => (is => 'ro', isa => 'Str', required => 1);
11             has SourceSnapshotId => (is => 'ro', isa => 'Str', required => 1);
12              
13 1     1   7624 use MooseX::ClassAttribute;
  1     1   3  
  1         10  
  1         7158  
  1         3  
  1         9  
14              
15             class_has _api_call => (isa => 'Str', is => 'ro', default => 'CopySnapshot');
16             class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::EC2::CopySnapshotResult');
17             class_has _result_key => (isa => 'Str', is => 'ro');
18             1;
19              
20             ### main pod documentation begin ###
21              
22             =head1 NAME
23              
24             Paws::EC2::CopySnapshot - Arguments for method CopySnapshot on Paws::EC2
25              
26             =head1 DESCRIPTION
27              
28             This class represents the parameters used for calling the method CopySnapshot on the
29             Amazon Elastic Compute Cloud service. Use the attributes of this class
30             as arguments to method CopySnapshot.
31              
32             You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CopySnapshot.
33              
34             As an example:
35              
36             $service_obj->CopySnapshot(Att1 => $value1, Att2 => $value2, ...);
37              
38             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.
39              
40             =head1 ATTRIBUTES
41              
42              
43             =head2 Description => Str
44              
45             A description for the EBS snapshot.
46              
47              
48              
49             =head2 DestinationRegion => Str
50              
51             The destination region to use in the C<PresignedUrl> parameter of a
52             snapshot copy operation. This parameter is only valid for specifying
53             the destination region in a C<PresignedUrl> parameter, where it is
54             required.
55              
56             C<CopySnapshot> sends the snapshot copy to the regional endpoint that
57             you send the HTTP request to, such as C<ec2.us-east-1.amazonaws.com>
58             (in the AWS CLI, this is specified with the C<--region> parameter or
59             the default region in your AWS configuration file).
60              
61              
62              
63             =head2 DryRun => Bool
64              
65             Checks whether you have the required permissions for the action,
66             without actually making the request, and provides an error response. If
67             you have the required permissions, the error response is
68             C<DryRunOperation>. Otherwise, it is C<UnauthorizedOperation>.
69              
70              
71              
72             =head2 Encrypted => Bool
73              
74             Specifies whether the destination snapshot should be encrypted. You can
75             encrypt a copy of an unencrypted snapshot using this flag, but you
76             cannot use it to create an unencrypted copy from an encrypted snapshot.
77             Your default CMK for EBS is used unless a non-default AWS Key
78             Management Service (AWS KMS) CMK is specified with C<KmsKeyId>. For
79             more information, see Amazon EBS Encryption in the I<Amazon Elastic
80             Compute Cloud User Guide>.
81              
82              
83              
84             =head2 KmsKeyId => Str
85              
86             The full ARN of the AWS Key Management Service (AWS KMS) CMK to use
87             when creating the snapshot copy. This parameter is only required if you
88             want to use a non-default CMK; if this parameter is not specified, the
89             default CMK for EBS is used. The ARN contains the C<arn:aws:kms>
90             namespace, followed by the region of the CMK, the AWS account ID of the
91             CMK owner, the C<key> namespace, and then the CMK ID. For example,
92             arn:aws:kms:I<us-east-1>:I<012345678910>:key/I<abcd1234-a123-456a-a12b-a123b4cd56ef>.
93             The specified CMK must exist in the region that the snapshot is being
94             copied to. If a C<KmsKeyId> is specified, the C<Encrypted> flag must
95             also be set.
96              
97              
98              
99             =head2 PresignedUrl => Str
100              
101             The pre-signed URL that facilitates copying an encrypted snapshot. This
102             parameter is only required when copying an encrypted snapshot with the
103             Amazon EC2 Query API; it is available as an optional parameter in all
104             other cases. The C<PresignedUrl> should use the snapshot source
105             endpoint, the C<CopySnapshot> action, and include the C<SourceRegion>,
106             C<SourceSnapshotId>, and C<DestinationRegion> parameters. The
107             C<PresignedUrl> must be signed using AWS Signature Version 4. Because
108             EBS snapshots are stored in Amazon S3, the signing algorithm for this
109             parameter uses the same logic that is described in Authenticating
110             Requests by Using Query Parameters (AWS Signature Version 4) in the
111             I<Amazon Simple Storage Service API Reference>. An invalid or
112             improperly signed C<PresignedUrl> will cause the copy operation to fail
113             asynchronously, and the snapshot will move to an C<error> state.
114              
115              
116              
117             =head2 B<REQUIRED> SourceRegion => Str
118              
119             The ID of the region that contains the snapshot to be copied.
120              
121              
122              
123             =head2 B<REQUIRED> SourceSnapshotId => Str
124              
125             The ID of the EBS snapshot to copy.
126              
127              
128              
129              
130             =head1 SEE ALSO
131              
132             This class forms part of L<Paws>, documenting arguments for method CopySnapshot in L<Paws::EC2>
133              
134             =head1 BUGS and CONTRIBUTIONS
135              
136             The source code is located here: https://github.com/pplu/aws-sdk-perl
137              
138             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
139              
140             =cut
141