blib/lib/Paws/Lightsail/CreateInstancesFromSnapshot.pm untested

filter: Statementstmt 0.0% 0 / 35 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 37 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::Lightsail::CreateInstancesFromSnapshot;
3 use Moose;
4 has AddOns => (is => 'ro', isa => 'ArrayRef[Paws::Lightsail::AddOnRequest]', traits => ['NameInRequest'], request_name => 'addOns' );
5 has AttachedDiskMapping => (is => 'ro', isa => 'Paws::Lightsail::AttachedDiskMap', traits => ['NameInRequest'], request_name => 'attachedDiskMapping' );
6 has AvailabilityZone => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'availabilityZone' , required => 1);
7 has BundleId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'bundleId' , required => 1);
8 has InstanceNames => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'instanceNames' , required => 1);
9 has InstanceSnapshotName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'instanceSnapshotName' );
10 has IpAddressType => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'ipAddressType' );
11 has KeyPairName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'keyPairName' );
12 has RestoreDate => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'restoreDate' );
13 has SourceInstanceName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'sourceInstanceName' );
14 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::Lightsail::Tag]', traits => ['NameInRequest'], request_name => 'tags' );
15 has UseLatestRestorableAutoSnapshot => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'useLatestRestorableAutoSnapshot' );
16 has UserData => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'userData' );
17  
18 use MooseX::ClassAttribute;
19  
20 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateInstancesFromSnapshot');
21 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Lightsail::CreateInstancesFromSnapshotResult');
22 class_has _result_key => (isa => 'Str', is => 'ro');
23 1;
24  
25 ### main pod documentation begin ###
26  
27 =head1 NAME
28  
29 Paws::Lightsail::CreateInstancesFromSnapshot - Arguments for method CreateInstancesFromSnapshot on L<Paws::Lightsail>
30  
31 =head1 DESCRIPTION
32  
33 This class represents the parameters used for calling the method CreateInstancesFromSnapshot on the
34 L<Amazon Lightsail|Paws::Lightsail> service. Use the attributes of this class
35 as arguments to method CreateInstancesFromSnapshot.
36  
37 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateInstancesFromSnapshot.
38  
39 =head1 SYNOPSIS
40  
41 my $lightsail = Paws->service('Lightsail');
42 my $CreateInstancesFromSnapshotResult =
43 $lightsail->CreateInstancesFromSnapshot(
44 AvailabilityZone => 'Mystring',
45 BundleId => 'MyNonEmptyString',
46 InstanceNames => [ 'Mystring', ... ],
47 AddOns => [
48 {
49 AddOnType => 'AutoSnapshot', # values: AutoSnapshot
50 AutoSnapshotAddOnRequest => {
51 SnapshotTimeOfDay => 'MyTimeOfDay', # OPTIONAL
52 }, # OPTIONAL
53 },
54 ...
55 ], # OPTIONAL
56 AttachedDiskMapping => {
57 'MyResourceName' => [
58 {
59 NewDiskName => 'MyResourceName',
60 OriginalDiskPath => 'MyNonEmptyString',
61 },
62 ...
63 ],
64 }, # OPTIONAL
65 InstanceSnapshotName => 'MyResourceName', # OPTIONAL
66 IpAddressType => 'dualstack', # OPTIONAL
67 KeyPairName => 'MyResourceName', # OPTIONAL
68 RestoreDate => 'Mystring', # OPTIONAL
69 SourceInstanceName => 'Mystring', # OPTIONAL
70 Tags => [
71 {
72 Key => 'MyTagKey', # OPTIONAL
73 Value => 'MyTagValue', # OPTIONAL
74 },
75 ...
76 ], # OPTIONAL
77 UseLatestRestorableAutoSnapshot => 1, # OPTIONAL
78 UserData => 'Mystring', # OPTIONAL
79 );
80  
81 # Results:
82 my $Operations = $CreateInstancesFromSnapshotResult->Operations;
83  
84 # Returns a L<Paws::Lightsail::CreateInstancesFromSnapshotResult> 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/lightsail/CreateInstancesFromSnapshot>
88  
89 =head1 ATTRIBUTES
90  
91  
92 =head2 AddOns => ArrayRef[L<Paws::Lightsail::AddOnRequest>]
93  
94 An array of objects representing the add-ons to enable for the new
95 instance.
96  
97  
98  
99 =head2 AttachedDiskMapping => L<Paws::Lightsail::AttachedDiskMap>
100  
101 An object containing information about one or more disk mappings.
102  
103  
104  
105 =head2 B<REQUIRED> AvailabilityZone => Str
106  
107 The Availability Zone where you want to create your instances. Use the
108 following formatting: C<us-east-2a> (case sensitive). You can get a
109 list of Availability Zones by using the get regions
110 (http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html)
111 operation. Be sure to add the C<include Availability Zones> parameter
112 to your request.
113  
114  
115  
116 =head2 B<REQUIRED> BundleId => Str
117  
118 The bundle of specification information for your virtual private server
119 (or I<instance>), including the pricing plan (e.g., C<micro_1_0>).
120  
121  
122  
123 =head2 B<REQUIRED> InstanceNames => ArrayRef[Str|Undef]
124  
125 The names for your new instances.
126  
127  
128  
129 =head2 InstanceSnapshotName => Str
130  
131 The name of the instance snapshot on which you are basing your new
132 instances. Use the get instance snapshots operation to return
133 information about your existing snapshots.
134  
135 Constraint:
136  
137 =over
138  
139 =item *
140  
141 This parameter cannot be defined together with the C<source instance
142 name> parameter. The C<instance snapshot name> and C<source instance
143 name> parameters are mutually exclusive.
144  
145 =back
146  
147  
148  
149  
150 =head2 IpAddressType => Str
151  
152 The IP address type for the instance.
153  
154 The possible values are C<ipv4> for IPv4 only, and C<dualstack> for
155 IPv4 and IPv6.
156  
157 The default value is C<dualstack>.
158  
159 Valid values are: C<"dualstack">, C<"ipv4">
160  
161 =head2 KeyPairName => Str
162  
163 The name for your key pair.
164  
165  
166  
167 =head2 RestoreDate => Str
168  
169 The date of the automatic snapshot to use for the new instance. Use the
170 C<get auto snapshots> operation to identify the dates of the available
171 automatic snapshots.
172  
173 Constraints:
174  
175 =over
176  
177 =item *
178  
179 Must be specified in C<YYYY-MM-DD> format.
180  
181 =item *
182  
183 This parameter cannot be defined together with the C<use latest
184 restorable auto snapshot> parameter. The C<restore date> and C<use
185 latest restorable auto snapshot> parameters are mutually exclusive.
186  
187 =item *
188  
189 Define this parameter only when creating a new instance from an
190 automatic snapshot. For more information, see the Lightsail Dev Guide
191 (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots).
192  
193 =back
194  
195  
196  
197  
198 =head2 SourceInstanceName => Str
199  
200 The name of the source instance from which the source automatic
201 snapshot was created.
202  
203 Constraints:
204  
205 =over
206  
207 =item *
208  
209 This parameter cannot be defined together with the C<instance snapshot
210 name> parameter. The C<source instance name> and C<instance snapshot
211 name> parameters are mutually exclusive.
212  
213 =item *
214  
215 Define this parameter only when creating a new instance from an
216 automatic snapshot. For more information, see the Lightsail Dev Guide
217 (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots).
218  
219 =back
220  
221  
222  
223  
224 =head2 Tags => ArrayRef[L<Paws::Lightsail::Tag>]
225  
226 The tag keys and optional values to add to the resource during create.
227  
228 Use the C<TagResource> action to tag a resource after it's created.
229  
230  
231  
232 =head2 UseLatestRestorableAutoSnapshot => Bool
233  
234 A Boolean value to indicate whether to use the latest available
235 automatic snapshot.
236  
237 Constraints:
238  
239 =over
240  
241 =item *
242  
243 This parameter cannot be defined together with the C<restore date>
244 parameter. The C<use latest restorable auto snapshot> and C<restore
245 date> parameters are mutually exclusive.
246  
247 =item *
248  
249 Define this parameter only when creating a new instance from an
250 automatic snapshot. For more information, see the Lightsail Dev Guide
251 (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots).
252  
253 =back
254  
255  
256  
257  
258 =head2 UserData => Str
259  
260 You can create a launch script that configures a server with additional
261 user data. For example, C<apt-get -y update>.
262  
263 Depending on the machine image you choose, the command to get software
264 on your instance varies. Amazon Linux and CentOS use C<yum>, Debian and
265 Ubuntu use C<apt-get>, and FreeBSD uses C<pkg>. For a complete list,
266 see the Dev Guide
267 (https://lightsail.aws.amazon.com/ls/docs/getting-started/article/compare-options-choose-lightsail-instance-image).
268  
269  
270  
271  
272 =head1 SEE ALSO
273  
274 This class forms part of L<Paws>, documenting arguments for method CreateInstancesFromSnapshot in L<Paws::Lightsail>
275  
276 =head1 BUGS and CONTRIBUTIONS
277  
278 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
279  
280 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
281  
282 =cut
283