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

filter: Statementstmt 0.0% 0 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 21 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::EC2::ImportSnapshot;
3 use Moose;
4 has ClientData => (is => 'ro', isa => 'Paws::EC2::ClientData');
5 has ClientToken => (is => 'ro', isa => 'Str');
6 has Description => (is => 'ro', isa => 'Str');
7 has DiskContainer => (is => 'ro', isa => 'Paws::EC2::SnapshotDiskContainer');
8 has DryRun => (is => 'ro', isa => 'Bool');
9 has Encrypted => (is => 'ro', isa => 'Bool');
10 has KmsKeyId => (is => 'ro', isa => 'Str');
11 has RoleName => (is => 'ro', isa => 'Str');
12 has TagSpecifications => (is => 'ro', isa => 'ArrayRef[Paws::EC2::TagSpecification]', traits => ['NameInRequest'], request_name => 'TagSpecification' );
13  
14 use MooseX::ClassAttribute;
15  
16 class_has _api_call => (isa => 'Str', is => 'ro', default => 'ImportSnapshot');
17 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::EC2::ImportSnapshotResult');
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::ImportSnapshot - Arguments for method ImportSnapshot on L<Paws::EC2>
26  
27 =head1 DESCRIPTION
28  
29 This class represents the parameters used for calling the method ImportSnapshot on the
30 L<Amazon Elastic Compute Cloud|Paws::EC2> service. Use the attributes of this class
31 as arguments to method ImportSnapshot.
32  
33 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to ImportSnapshot.
34  
35 =head1 SYNOPSIS
36  
37 my $ec2 = Paws->service('EC2');
38 my $ImportSnapshotResult = $ec2->ImportSnapshot(
39 ClientData => {
40 Comment => 'MyString', # OPTIONAL
41 UploadEnd => '1970-01-01T01:00:00', # OPTIONAL
42 UploadSize => 1, # OPTIONAL
43 UploadStart => '1970-01-01T01:00:00', # OPTIONAL
44 }, # OPTIONAL
45 ClientToken => 'MyString', # OPTIONAL
46 Description => 'MyString', # OPTIONAL
47 DiskContainer => {
48 Description => 'MyString', # OPTIONAL
49 Format => 'MyString', # OPTIONAL
50 Url => 'MyString', # OPTIONAL
51 UserBucket => {
52 S3Bucket => 'MyString', # OPTIONAL
53 S3Key => 'MyString', # OPTIONAL
54 }, # OPTIONAL
55 }, # OPTIONAL
56 DryRun => 1, # OPTIONAL
57 Encrypted => 1, # OPTIONAL
58 KmsKeyId => 'MyKmsKeyId', # OPTIONAL
59 RoleName => 'MyString', # OPTIONAL
60 TagSpecifications => [
61 {
62 ResourceType => 'client-vpn-endpoint'
63 , # values: client-vpn-endpoint, customer-gateway, dedicated-host, dhcp-options, egress-only-internet-gateway, elastic-ip, elastic-gpu, export-image-task, export-instance-task, fleet, fpga-image, host-reservation, image, import-image-task, import-snapshot-task, instance, internet-gateway, key-pair, launch-template, local-gateway-route-table-vpc-association, natgateway, network-acl, network-interface, network-insights-analysis, network-insights-path, placement-group, reserved-instances, route-table, security-group, snapshot, spot-fleet-request, spot-instances-request, subnet, traffic-mirror-filter, traffic-mirror-session, traffic-mirror-target, transit-gateway, transit-gateway-attachment, transit-gateway-connect-peer, transit-gateway-multicast-domain, transit-gateway-route-table, volume, vpc, vpc-peering-connection, vpn-connection, vpn-gateway, vpc-flow-log; OPTIONAL
64 Tags => [
65 {
66 Key => 'MyString', # OPTIONAL
67 Value => 'MyString', # OPTIONAL
68 },
69 ...
70 ], # OPTIONAL
71 },
72 ...
73 ], # OPTIONAL
74 );
75  
76 # Results:
77 my $Description = $ImportSnapshotResult->Description;
78 my $ImportTaskId = $ImportSnapshotResult->ImportTaskId;
79 my $SnapshotTaskDetail = $ImportSnapshotResult->SnapshotTaskDetail;
80 my $Tags = $ImportSnapshotResult->Tags;
81  
82 # Returns a L<Paws::EC2::ImportSnapshotResult> object.
83  
84 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.
85 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ec2/ImportSnapshot>
86  
87 =head1 ATTRIBUTES
88  
89  
90 =head2 ClientData => L<Paws::EC2::ClientData>
91  
92 The client-specific data.
93  
94  
95  
96 =head2 ClientToken => Str
97  
98 Token to enable idempotency for VM import requests.
99  
100  
101  
102 =head2 Description => Str
103  
104 The description string for the import snapshot task.
105  
106  
107  
108 =head2 DiskContainer => L<Paws::EC2::SnapshotDiskContainer>
109  
110 Information about the disk container.
111  
112  
113  
114 =head2 DryRun => Bool
115  
116 Checks whether you have the required permissions for the action,
117 without actually making the request, and provides an error response. If
118 you have the required permissions, the error response is
119 C<DryRunOperation>. Otherwise, it is C<UnauthorizedOperation>.
120  
121  
122  
123 =head2 Encrypted => Bool
124  
125 Specifies whether the destination snapshot of the imported image should
126 be encrypted. The default CMK for EBS is used unless you specify a
127 non-default AWS Key Management Service (AWS KMS) CMK using C<KmsKeyId>.
128 For more information, see Amazon EBS Encryption
129 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html)
130 in the I<Amazon Elastic Compute Cloud User Guide>.
131  
132  
133  
134 =head2 KmsKeyId => Str
135  
136 An identifier for the symmetric AWS Key Management Service (AWS KMS)
137 customer master key (CMK) to use when creating the encrypted snapshot.
138 This parameter is only required if you want to use a non-default CMK;
139 if this parameter is not specified, the default CMK for EBS is used. If
140 a C<KmsKeyId> is specified, the C<Encrypted> flag must also be set.
141  
142 The CMK identifier may be provided in any of the following formats:
143  
144 =over
145  
146 =item *
147  
148 Key ID
149  
150 =item *
151  
152 Key alias. The alias ARN contains the C<arn:aws:kms> namespace,
153 followed by the Region of the CMK, the AWS account ID of the CMK owner,
154 the C<alias> namespace, and then the CMK alias. For example,
155 arn:aws:kms:I<us-east-1>:I<012345678910>:alias/I<ExampleAlias>.
156  
157 =item *
158  
159 ARN using key ID. The ID ARN contains the C<arn:aws:kms> namespace,
160 followed by the Region of the CMK, the AWS account ID of the CMK owner,
161 the C<key> namespace, and then the CMK ID. For example,
162 arn:aws:kms:I<us-east-1>:I<012345678910>:key/I<abcd1234-a123-456a-a12b-a123b4cd56ef>.
163  
164 =item *
165  
166 ARN using key alias. The alias ARN contains the C<arn:aws:kms>
167 namespace, followed by the Region of the CMK, the AWS account ID of the
168 CMK owner, the C<alias> namespace, and then the CMK alias. For example,
169 arn:aws:kms:I<us-east-1>:I<012345678910>:alias/I<ExampleAlias>.
170  
171 =back
172  
173 AWS parses C<KmsKeyId> asynchronously, meaning that the action you call
174 may appear to complete even though you provided an invalid identifier.
175 This action will eventually report failure.
176  
177 The specified CMK must exist in the Region that the snapshot is being
178 copied to.
179  
180 Amazon EBS does not support asymmetric CMKs.
181  
182  
183  
184 =head2 RoleName => Str
185  
186 The name of the role to use when not using the default role,
187 'vmimport'.
188  
189  
190  
191 =head2 TagSpecifications => ArrayRef[L<Paws::EC2::TagSpecification>]
192  
193 The tags to apply to the import snapshot task during creation.
194  
195  
196  
197  
198 =head1 SEE ALSO
199  
200 This class forms part of L<Paws>, documenting arguments for method ImportSnapshot in L<Paws::EC2>
201  
202 =head1 BUGS and CONTRIBUTIONS
203  
204 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
205  
206 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
207  
208 =cut
209