blib/lib/Paws/EC2/CopyImage.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 23 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::EC2::CopyImage;
3 use Moose;
4 has ClientToken => (is => 'ro', isa => 'Str');
5 has Description => (is => 'ro', isa => 'Str');
6 has DestinationOutpostArn => (is => 'ro', isa => 'Str');
7 has DryRun => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'dryRun' );
8 has Encrypted => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'encrypted' );
9 has KmsKeyId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'kmsKeyId' );
10 has Name => (is => 'ro', isa => 'Str', required => 1);
11 has SourceImageId => (is => 'ro', isa => 'Str', required => 1);
12 has SourceRegion => (is => 'ro', isa => 'Str', required => 1);
13  
14 use MooseX::ClassAttribute;
15  
16 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CopyImage');
17 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::EC2::CopyImageResult');
18 class_has _result_key => (isa => 'Str', is => 'ro');
19 1;
20  
21 ### main pod documentation begin ###
22  
23 =head1 NAME
24  
25 Paws::EC2::CopyImage - Arguments for method CopyImage on L<Paws::EC2>
26  
27 =head1 DESCRIPTION
28  
29 This class represents the parameters used for calling the method CopyImage on the
30 L<Amazon Elastic Compute Cloud|Paws::EC2> service. Use the attributes of this class
31 as arguments to method CopyImage.
32  
33 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CopyImage.
34  
35 =head1 SYNOPSIS
36  
37 my $ec2 = Paws->service('EC2');
38 # To copy an AMI to another region
39 # This example copies the specified AMI from the us-east-1 region to the current
40 # region.
41 my $CopyImageResult = $ec2->CopyImage(
42 'Description' => '',
43 'Name' => 'My server',
44 'SourceImageId' => 'ami-5731123e',
45 'SourceRegion' => 'us-east-1'
46 );
47  
48 # Results:
49 my $ImageId = $CopyImageResult->ImageId;
50  
51 # Returns a L<Paws::EC2::CopyImageResult> object.
52  
53 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.
54 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ec2/CopyImage>
55  
56 =head1 ATTRIBUTES
57  
58  
59 =head2 ClientToken => Str
60  
61 Unique, case-sensitive identifier you provide to ensure idempotency of
62 the request. For more information, see Ensuring idempotency
63 (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html)
64 in the I<Amazon EC2 API Reference>.
65  
66  
67  
68 =head2 Description => Str
69  
70 A description for the new AMI in the destination Region.
71  
72  
73  
74 =head2 DestinationOutpostArn => Str
75  
76 The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI.
77 Only specify this parameter when copying an AMI from an AWS Region to
78 an Outpost. The AMI must be in the Region of the destination Outpost.
79 You cannot copy an AMI from an Outpost to a Region, from one Outpost to
80 another, or within the same Outpost.
81  
82 For more information, see Copying AMIs from an AWS Region to an Outpost
83 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#copy-amis)
84 in the I<Amazon Elastic Compute Cloud User Guide>.
85  
86  
87  
88 =head2 DryRun => Bool
89  
90 Checks whether you have the required permissions for the action,
91 without actually making the request, and provides an error response. If
92 you have the required permissions, the error response is
93 C<DryRunOperation>. Otherwise, it is C<UnauthorizedOperation>.
94  
95  
96  
97 =head2 Encrypted => Bool
98  
99 Specifies whether the destination snapshots of the copied image should
100 be encrypted. You can encrypt a copy of an unencrypted snapshot, but
101 you cannot create an unencrypted copy of an encrypted snapshot. The
102 default CMK for EBS is used unless you specify a non-default AWS Key
103 Management Service (AWS KMS) CMK using C<KmsKeyId>. For more
104 information, see Amazon EBS Encryption
105 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html)
106 in the I<Amazon Elastic Compute Cloud User Guide>.
107  
108  
109  
110 =head2 KmsKeyId => Str
111  
112 The identifier of the symmetric AWS Key Management Service (AWS KMS)
113 customer master key (CMK) to use when creating encrypted volumes. If
114 this parameter is not specified, your AWS managed CMK for EBS is used.
115 If you specify a CMK, you must also set the encrypted state to C<true>.
116  
117 You can specify a CMK using any of the following:
118  
119 =over
120  
121 =item *
122  
123 Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
124  
125 =item *
126  
127 Key alias. For example, alias/ExampleAlias.
128  
129 =item *
130  
131 Key ARN. For example,
132 arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
133  
134 =item *
135  
136 Alias ARN. For example,
137 arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
138  
139 =back
140  
141 AWS authenticates the CMK asynchronously. Therefore, if you specify an
142 identifier that is not valid, the action can appear to complete, but
143 eventually fails.
144  
145 The specified CMK must exist in the destination Region.
146  
147 Amazon EBS does not support asymmetric CMKs.
148  
149  
150  
151 =head2 B<REQUIRED> Name => Str
152  
153 The name of the new AMI in the destination Region.
154  
155  
156  
157 =head2 B<REQUIRED> SourceImageId => Str
158  
159 The ID of the AMI to copy.
160  
161  
162  
163 =head2 B<REQUIRED> SourceRegion => Str
164  
165 The name of the Region that contains the AMI to copy.
166  
167  
168  
169  
170 =head1 SEE ALSO
171  
172 This class forms part of L<Paws>, documenting arguments for method CopyImage in L<Paws::EC2>
173  
174 =head1 BUGS and CONTRIBUTIONS
175  
176 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
177  
178 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
179  
180 =cut
181