blib/lib/Paws/EC2/CreateVolume.pm

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 24 / 24 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Paws/EC2/CreateSubnetResult.pm ↑ Summary blib/lib/Paws/EC2/CreateVpc.pm »
1  
2 package Paws::EC2::CreateVolume;
3 1 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 has AvailabilityZone => (is => 'ro', isa => 'Str', required => 1);
5 1 has DryRun => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'dryRun' );
6 1 has Encrypted => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'encrypted' );
7 1 has Iops => (is => 'ro', isa => 'Int');
8 1 has KmsKeyId => (is => 'ro', isa => 'Str');
9 1 has MultiAttachEnabled => (is => 'ro', isa => 'Bool');
10 1 has OutpostArn => (is => 'ro', isa => 'Str');
11 1 has Size => (is => 'ro', isa => 'Int');
12 1 has SnapshotId => (is => 'ro', isa => 'Str');
13 1 has TagSpecifications => (is => 'ro', isa => 'ArrayRef[Paws::EC2::TagSpecification]', traits => ['NameInRequest'], request_name => 'TagSpecification' );
14 1 has Throughput => (is => 'ro', isa => 'Int');
15 1 has VolumeType => (is => 'ro', isa => 'Str');
16  
17 1 ▶ use MooseX::ClassAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 1 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateVolume');
20 1 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::EC2::Volume');
21 1 class_has _result_key => (isa => 'Str', is => 'ro');
22 1 1;
23  
24 ### main pod documentation begin ###
25  
26 =head1 NAME
27  
28 Paws::EC2::CreateVolume - Arguments for method CreateVolume on L<Paws::EC2>
29  
30 =head1 DESCRIPTION
31  
32 This class represents the parameters used for calling the method CreateVolume on the
33 L<Amazon Elastic Compute Cloud|Paws::EC2> service. Use the attributes of this class
34 as arguments to method CreateVolume.
35  
36 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateVolume.
37  
38 =head1 SYNOPSIS
39  
40 my $ec2 = Paws->service('EC2');
41 # To create a new volume
42 # This example creates an 80 GiB General Purpose (SSD) volume in the
43 # Availability Zone ``us-east-1a``.
44 my $Volume = $ec2->CreateVolume(
45 'AvailabilityZone' => 'us-east-1a',
46 'Size' => 80,
47 'VolumeType' => 'gp2'
48 );
49  
50 # Results:
51 my $AvailabilityZone = $Volume->AvailabilityZone;
52 my $CreateTime = $Volume->CreateTime;
53 my $Encrypted = $Volume->Encrypted;
54 my $Iops = $Volume->Iops;
55 my $Size = $Volume->Size;
56 my $SnapshotId = $Volume->SnapshotId;
57 my $State = $Volume->State;
58 my $VolumeId = $Volume->VolumeId;
59 my $VolumeType = $Volume->VolumeType;
60  
61 # Returns a L<Paws::EC2::Volume> object.
62 # To create a new Provisioned IOPS (SSD) volume from a snapshot
63 # This example creates a new Provisioned IOPS (SSD) volume with 1000 provisioned
64 # IOPS from a snapshot in the Availability Zone ``us-east-1a``.
65 my $Volume = $ec2->CreateVolume(
66 'AvailabilityZone' => 'us-east-1a',
67 'Iops' => 1000,
68 'SnapshotId' => 'snap-066877671789bd71b',
69 'VolumeType' => 'io1'
70 );
71  
72 # Results:
73 my $Attachments = $Volume->Attachments;
74 my $AvailabilityZone = $Volume->AvailabilityZone;
75 my $CreateTime = $Volume->CreateTime;
76 my $Iops = $Volume->Iops;
77 my $Size = $Volume->Size;
78 my $SnapshotId = $Volume->SnapshotId;
79 my $State = $Volume->State;
80 my $Tags = $Volume->Tags;
81 my $VolumeId = $Volume->VolumeId;
82 my $VolumeType = $Volume->VolumeType;
83  
84 # Returns a L<Paws::EC2::Volume> object.
85  
86 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.
87 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ec2/CreateVolume>
88  
89 =head1 ATTRIBUTES
90  
91  
92 =head2 B<REQUIRED> AvailabilityZone => Str
93  
94 The Availability Zone in which to create the volume.
95  
96  
97  
98 =head2 DryRun => Bool
99  
100 Checks whether you have the required permissions for the action,
101 without actually making the request, and provides an error response. If
102 you have the required permissions, the error response is
103 C<DryRunOperation>. Otherwise, it is C<UnauthorizedOperation>.
104  
105  
106  
107 =head2 Encrypted => Bool
108  
109 Indicates whether the volume should be encrypted. The effect of setting
110 the encryption state to C<true> depends on the volume origin (new or
111 from a snapshot), starting encryption state, ownership, and whether
112 encryption by default is enabled. For more information, see Encryption
113 by default
114 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-by-default)
115 in the I<Amazon Elastic Compute Cloud User Guide>.
116  
117 Encrypted Amazon EBS volumes must be attached to instances that support
118 Amazon EBS encryption. For more information, see Supported instance
119 types
120 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances).
121  
122  
123  
124 =head2 Iops => Int
125  
126 The number of I/O operations per second (IOPS). For C<gp3>, C<io1>, and
127 C<io2> volumes, this represents the number of IOPS that are provisioned
128 for the volume. For C<gp2> volumes, this represents the baseline
129 performance of the volume and the rate at which the volume accumulates
130 I/O credits for bursting.
131  
132 The following are the supported values for each volume type:
133  
134 =over
135  
136 =item *
137  
138 C<gp3>: 3,000-16,000 IOPS
139  
140 =item *
141  
142 C<io1>: 100-64,000 IOPS
143  
144 =item *
145  
146 C<io2>: 100-64,000 IOPS
147  
148 =back
149  
150 For C<io1> and C<io2> volumes, we guarantee 64,000 IOPS only for
151 Instances built on the Nitro System
152 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances).
153 Other instance families guarantee performance up to 32,000 IOPS.
154  
155 This parameter is required for C<io1> and C<io2> volumes. The default
156 for C<gp3> volumes is 3,000 IOPS. This parameter is not supported for
157 C<gp2>, C<st1>, C<sc1>, or C<standard> volumes.
158  
159  
160  
161 =head2 KmsKeyId => Str
162  
163 The identifier of the AWS Key Management Service (AWS KMS) customer
164 master key (CMK) to use for Amazon EBS encryption. If this parameter is
165 not specified, your AWS managed CMK for EBS is used. If C<KmsKeyId> is
166 specified, the encrypted state must be C<true>.
167  
168 You can specify the CMK using any of the following:
169  
170 =over
171  
172 =item *
173  
174 Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
175  
176 =item *
177  
178 Key alias. For example, alias/ExampleAlias.
179  
180 =item *
181  
182 Key ARN. For example,
183 arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
184  
185 =item *
186  
187 Alias ARN. For example,
188 arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.
189  
190 =back
191  
192 AWS authenticates the CMK asynchronously. Therefore, if you specify an
193 ID, alias, or ARN that is not valid, the action can appear to complete,
194 but eventually fails.
195  
196  
197  
198 =head2 MultiAttachEnabled => Bool
199  
200 Indicates whether to enable Amazon EBS Multi-Attach. If you enable
201 Multi-Attach, you can attach the volume to up to 16 Instances built on
202 the Nitro System
203 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances)
204 in the same Availability Zone. This parameter is supported with C<io1>
205 and C<io2> volumes only. For more information, see Amazon EBS
206 Multi-Attach
207 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html)
208 in the I<Amazon Elastic Compute Cloud User Guide>.
209  
210  
211  
212 =head2 OutpostArn => Str
213  
214 The Amazon Resource Name (ARN) of the Outpost.
215  
216  
217  
218 =head2 Size => Int
219  
220 The size of the volume, in GiBs. You must specify either a snapshot ID
221 or a volume size. If you specify a snapshot, the default is the
222 snapshot size. You can specify a volume size that is equal to or larger
223 than the snapshot size.
224  
225 The following are the supported volumes sizes for each volume type:
226  
227 =over
228  
229 =item *
230  
231 C<gp2> and C<gp3>: 1-16,384
232  
233 =item *
234  
235 C<io1> and C<io2>: 4-16,384
236  
237 =item *
238  
239 C<st1> and C<sc1>: 125-16,384
240  
241 =item *
242  
243 C<standard>: 1-1,024
244  
245 =back
246  
247  
248  
249  
250 =head2 SnapshotId => Str
251  
252 The snapshot from which to create the volume. You must specify either a
253 snapshot ID or a volume size.
254  
255  
256  
257 =head2 TagSpecifications => ArrayRef[L<Paws::EC2::TagSpecification>]
258  
259 The tags to apply to the volume during creation.
260  
261  
262  
263 =head2 Throughput => Int
264  
265 The throughput to provision for a volume, with a maximum of 1,000
266 MiB/s.
267  
268 This parameter is valid only for C<gp3> volumes.
269  
270 Valid Range: Minimum value of 125. Maximum value of 1000.
271  
272  
273  
274 =head2 VolumeType => Str
275  
276 The volume type. This parameter can be one of the following values:
277  
278 =over
279  
280 =item *
281  
282 General Purpose SSD: C<gp2> | C<gp3>
283  
284 =item *
285  
286 Provisioned IOPS SSD: C<io1> | C<io2>
287  
288 =item *
289  
290 Throughput Optimized HDD: C<st1>
291  
292 =item *
293  
294 Cold HDD: C<sc1>
295  
296 =item *
297  
298 Magnetic: C<standard>
299  
300 =back
301  
302 For more information, see Amazon EBS volume types
303 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html)
304 in the I<Amazon Elastic Compute Cloud User Guide>.
305  
306 Default: C<gp2>
307  
308 Valid values are: C<"standard">, C<"io1">, C<"io2">, C<"gp2">, C<"sc1">, C<"st1">, C<"gp3">
309  
310  
311 =head1 SEE ALSO
312  
313 This class forms part of L<Paws>, documenting arguments for method CreateVolume in L<Paws::EC2>
314  
315 =head1 BUGS and CONTRIBUTIONS
316  
317 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
318  
319 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
320  
321 =cut
322  
« blib/lib/Paws/EC2/CreateSubnetResult.pm ↑ Summary blib/lib/Paws/EC2/CreateVpc.pm »