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

filter: Statementstmt 0.0% 0 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 26 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::EC2::CreateCapacityReservation;
3 use Moose;
4 has AvailabilityZone => (is => 'ro', isa => 'Str');
5 has AvailabilityZoneId => (is => 'ro', isa => 'Str');
6 has ClientToken => (is => 'ro', isa => 'Str');
7 has DryRun => (is => 'ro', isa => 'Bool');
8 has EbsOptimized => (is => 'ro', isa => 'Bool');
9 has EndDate => (is => 'ro', isa => 'Str');
10 has EndDateType => (is => 'ro', isa => 'Str');
11 has EphemeralStorage => (is => 'ro', isa => 'Bool');
12 has InstanceCount => (is => 'ro', isa => 'Int', required => 1);
13 has InstanceMatchCriteria => (is => 'ro', isa => 'Str');
14 has InstancePlatform => (is => 'ro', isa => 'Str', required => 1);
15 has InstanceType => (is => 'ro', isa => 'Str', required => 1);
16 has OutpostArn => (is => 'ro', isa => 'Str');
17 has TagSpecifications => (is => 'ro', isa => 'ArrayRef[Paws::EC2::TagSpecification]');
18 has Tenancy => (is => 'ro', isa => 'Str');
19  
20 use MooseX::ClassAttribute;
21  
22 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateCapacityReservation');
23 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::EC2::CreateCapacityReservationResult');
24 class_has _result_key => (isa => 'Str', is => 'ro');
25 1;
26  
27 ### main pod documentation begin ###
28  
29 =head1 NAME
30  
31 Paws::EC2::CreateCapacityReservation - Arguments for method CreateCapacityReservation on L<Paws::EC2>
32  
33 =head1 DESCRIPTION
34  
35 This class represents the parameters used for calling the method CreateCapacityReservation on the
36 L<Amazon Elastic Compute Cloud|Paws::EC2> service. Use the attributes of this class
37 as arguments to method CreateCapacityReservation.
38  
39 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateCapacityReservation.
40  
41 =head1 SYNOPSIS
42  
43 my $ec2 = Paws->service('EC2');
44 my $CreateCapacityReservationResult = $ec2->CreateCapacityReservation(
45 InstanceCount => 1,
46 InstancePlatform => 'Linux/UNIX',
47 InstanceType => 'MyString',
48 AvailabilityZone => 'MyString', # OPTIONAL
49 AvailabilityZoneId => 'MyString', # OPTIONAL
50 ClientToken => 'MyString', # OPTIONAL
51 DryRun => 1, # OPTIONAL
52 EbsOptimized => 1, # OPTIONAL
53 EndDate => '1970-01-01T01:00:00', # OPTIONAL
54 EndDateType => 'unlimited', # OPTIONAL
55 EphemeralStorage => 1, # OPTIONAL
56 InstanceMatchCriteria => 'open', # OPTIONAL
57 OutpostArn => 'MyOutpostArn', # OPTIONAL
58 TagSpecifications => [
59 {
60 ResourceType => 'client-vpn-endpoint'
61 , # 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
62 Tags => [
63 {
64 Key => 'MyString',
65 Value => 'MyString',
66 },
67 ...
68 ], # OPTIONAL
69 },
70 ...
71 ], # OPTIONAL
72 Tenancy => 'default', # OPTIONAL
73 );
74  
75 # Results:
76 my $CapacityReservation =
77 $CreateCapacityReservationResult->CapacityReservation;
78  
79 # Returns a L<Paws::EC2::CreateCapacityReservationResult> object.
80  
81 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.
82 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ec2/CreateCapacityReservation>
83  
84 =head1 ATTRIBUTES
85  
86  
87 =head2 AvailabilityZone => Str
88  
89 The Availability Zone in which to create the Capacity Reservation.
90  
91  
92  
93 =head2 AvailabilityZoneId => Str
94  
95 The ID of the Availability Zone in which to create the Capacity
96 Reservation.
97  
98  
99  
100 =head2 ClientToken => Str
101  
102 Unique, case-sensitive identifier that you provide to ensure the
103 idempotency of the request. For more information, see Ensure
104 Idempotency
105 (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html).
106  
107  
108  
109 =head2 DryRun => Bool
110  
111 Checks whether you have the required permissions for the action,
112 without actually making the request, and provides an error response. If
113 you have the required permissions, the error response is
114 C<DryRunOperation>. Otherwise, it is C<UnauthorizedOperation>.
115  
116  
117  
118 =head2 EbsOptimized => Bool
119  
120 Indicates whether the Capacity Reservation supports EBS-optimized
121 instances. This optimization provides dedicated throughput to Amazon
122 EBS and an optimized configuration stack to provide optimal I/O
123 performance. This optimization isn't available with all instance types.
124 Additional usage charges apply when using an EBS- optimized instance.
125  
126  
127  
128 =head2 EndDate => Str
129  
130 The date and time at which the Capacity Reservation expires. When a
131 Capacity Reservation expires, the reserved capacity is released and you
132 can no longer launch instances into it. The Capacity Reservation's
133 state changes to C<expired> when it reaches its end date and time.
134  
135 You must provide an C<EndDate> value if C<EndDateType> is C<limited>.
136 Omit C<EndDate> if C<EndDateType> is C<unlimited>.
137  
138 If the C<EndDateType> is C<limited>, the Capacity Reservation is
139 cancelled within an hour from the specified time. For example, if you
140 specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to
141 end between 13:30:55 and 14:30:55 on 5/31/2019.
142  
143  
144  
145 =head2 EndDateType => Str
146  
147 Indicates the way in which the Capacity Reservation ends. A Capacity
148 Reservation can have one of the following end types:
149  
150 =over
151  
152 =item *
153  
154 C<unlimited> - The Capacity Reservation remains active until you
155 explicitly cancel it. Do not provide an C<EndDate> if the
156 C<EndDateType> is C<unlimited>.
157  
158 =item *
159  
160 C<limited> - The Capacity Reservation expires automatically at a
161 specified date and time. You must provide an C<EndDate> value if the
162 C<EndDateType> value is C<limited>.
163  
164 =back
165  
166  
167 Valid values are: C<"unlimited">, C<"limited">
168  
169 =head2 EphemeralStorage => Bool
170  
171 Indicates whether the Capacity Reservation supports instances with
172 temporary, block-level storage.
173  
174  
175  
176 =head2 B<REQUIRED> InstanceCount => Int
177  
178 The number of instances for which to reserve capacity.
179  
180  
181  
182 =head2 InstanceMatchCriteria => Str
183  
184 Indicates the type of instance launches that the Capacity Reservation
185 accepts. The options include:
186  
187 =over
188  
189 =item *
190  
191 C<open> - The Capacity Reservation automatically matches all instances
192 that have matching attributes (instance type, platform, and
193 Availability Zone). Instances that have matching attributes run in the
194 Capacity Reservation automatically without specifying any additional
195 parameters.
196  
197 =item *
198  
199 C<targeted> - The Capacity Reservation only accepts instances that have
200 matching attributes (instance type, platform, and Availability Zone),
201 and explicitly target the Capacity Reservation. This ensures that only
202 permitted instances can use the reserved capacity.
203  
204 =back
205  
206 Default: C<open>
207  
208 Valid values are: C<"open">, C<"targeted">
209  
210 =head2 B<REQUIRED> InstancePlatform => Str
211  
212 The type of operating system for which to reserve capacity.
213  
214 Valid values are: C<"Linux/UNIX">, C<"Red Hat Enterprise Linux">, C<"SUSE Linux">, C<"Windows">, C<"Windows with SQL Server">, C<"Windows with SQL Server Enterprise">, C<"Windows with SQL Server Standard">, C<"Windows with SQL Server Web">, C<"Linux with SQL Server Standard">, C<"Linux with SQL Server Web">, C<"Linux with SQL Server Enterprise">
215  
216 =head2 B<REQUIRED> InstanceType => Str
217  
218 The instance type for which to reserve capacity. For more information,
219 see Instance types
220 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html)
221 in the I<Amazon EC2 User Guide>.
222  
223  
224  
225 =head2 OutpostArn => Str
226  
227 The Amazon Resource Name (ARN) of the Outpost on which to create the
228 Capacity Reservation.
229  
230  
231  
232 =head2 TagSpecifications => ArrayRef[L<Paws::EC2::TagSpecification>]
233  
234 The tags to apply to the Capacity Reservation during launch.
235  
236  
237  
238 =head2 Tenancy => Str
239  
240 Indicates the tenancy of the Capacity Reservation. A Capacity
241 Reservation can have one of the following tenancy settings:
242  
243 =over
244  
245 =item *
246  
247 C<default> - The Capacity Reservation is created on hardware that is
248 shared with other accounts.
249  
250 =item *
251  
252 C<dedicated> - The Capacity Reservation is created on single-tenant
253 hardware that is dedicated to a single account.
254  
255 =back
256  
257  
258 Valid values are: C<"default">, C<"dedicated">
259  
260  
261 =head1 SEE ALSO
262  
263 This class forms part of L<Paws>, documenting arguments for method CreateCapacityReservation in L<Paws::EC2>
264  
265 =head1 BUGS and CONTRIBUTIONS
266  
267 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
268  
269 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
270  
271 =cut
272