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

filter: Statementstmt 0.0% 0 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 29 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::Lightsail::CreateDiskFromSnapshot;
3 use Moose;
4 has AddOns => (is => 'ro', isa => 'ArrayRef[Paws::Lightsail::AddOnRequest]', traits => ['NameInRequest'], request_name => 'addOns' );
5 has AvailabilityZone => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'availabilityZone' , required => 1);
6 has DiskName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'diskName' , required => 1);
7 has DiskSnapshotName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'diskSnapshotName' );
8 has RestoreDate => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'restoreDate' );
9 has SizeInGb => (is => 'ro', isa => 'Int', traits => ['NameInRequest'], request_name => 'sizeInGb' , required => 1);
10 has SourceDiskName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'sourceDiskName' );
11 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::Lightsail::Tag]', traits => ['NameInRequest'], request_name => 'tags' );
12 has UseLatestRestorableAutoSnapshot => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'useLatestRestorableAutoSnapshot' );
13  
14 use MooseX::ClassAttribute;
15  
16 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateDiskFromSnapshot');
17 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Lightsail::CreateDiskFromSnapshotResult');
18 class_has _result_key => (isa => 'Str', is => 'ro');
19 1;
20  
21 ### main pod documentation begin ###
22  
23 =head1 NAME
24  
25 Paws::Lightsail::CreateDiskFromSnapshot - Arguments for method CreateDiskFromSnapshot on L<Paws::Lightsail>
26  
27 =head1 DESCRIPTION
28  
29 This class represents the parameters used for calling the method CreateDiskFromSnapshot on the
30 L<Amazon Lightsail|Paws::Lightsail> service. Use the attributes of this class
31 as arguments to method CreateDiskFromSnapshot.
32  
33 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateDiskFromSnapshot.
34  
35 =head1 SYNOPSIS
36  
37 my $lightsail = Paws->service('Lightsail');
38 my $CreateDiskFromSnapshotResult = $lightsail->CreateDiskFromSnapshot(
39 AvailabilityZone => 'MyNonEmptyString',
40 DiskName => 'MyResourceName',
41 SizeInGb => 1,
42 AddOns => [
43 {
44 AddOnType => 'AutoSnapshot', # values: AutoSnapshot
45 AutoSnapshotAddOnRequest => {
46 SnapshotTimeOfDay => 'MyTimeOfDay', # OPTIONAL
47 }, # OPTIONAL
48 },
49 ...
50 ], # OPTIONAL
51 DiskSnapshotName => 'MyResourceName', # OPTIONAL
52 RestoreDate => 'Mystring', # OPTIONAL
53 SourceDiskName => 'Mystring', # OPTIONAL
54 Tags => [
55 {
56 Key => 'MyTagKey', # OPTIONAL
57 Value => 'MyTagValue', # OPTIONAL
58 },
59 ...
60 ], # OPTIONAL
61 UseLatestRestorableAutoSnapshot => 1, # OPTIONAL
62 );
63  
64 # Results:
65 my $Operations = $CreateDiskFromSnapshotResult->Operations;
66  
67 # Returns a L<Paws::Lightsail::CreateDiskFromSnapshotResult> object.
68  
69 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.
70 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/lightsail/CreateDiskFromSnapshot>
71  
72 =head1 ATTRIBUTES
73  
74  
75 =head2 AddOns => ArrayRef[L<Paws::Lightsail::AddOnRequest>]
76  
77 An array of objects that represent the add-ons to enable for the new
78 disk.
79  
80  
81  
82 =head2 B<REQUIRED> AvailabilityZone => Str
83  
84 The Availability Zone where you want to create the disk (e.g.,
85 C<us-east-2a>). Choose the same Availability Zone as the Lightsail
86 instance where you want to create the disk.
87  
88 Use the GetRegions operation to list the Availability Zones where
89 Lightsail is currently available.
90  
91  
92  
93 =head2 B<REQUIRED> DiskName => Str
94  
95 The unique Lightsail disk name (e.g., C<my-disk>).
96  
97  
98  
99 =head2 DiskSnapshotName => Str
100  
101 The name of the disk snapshot (e.g., C<my-snapshot>) from which to
102 create the new storage disk.
103  
104 Constraint:
105  
106 =over
107  
108 =item *
109  
110 This parameter cannot be defined together with the C<source disk name>
111 parameter. The C<disk snapshot name> and C<source disk name> parameters
112 are mutually exclusive.
113  
114 =back
115  
116  
117  
118  
119 =head2 RestoreDate => Str
120  
121 The date of the automatic snapshot to use for the new disk. Use the
122 C<get auto snapshots> operation to identify the dates of the available
123 automatic snapshots.
124  
125 Constraints:
126  
127 =over
128  
129 =item *
130  
131 Must be specified in C<YYYY-MM-DD> format.
132  
133 =item *
134  
135 This parameter cannot be defined together with the C<use latest
136 restorable auto snapshot> parameter. The C<restore date> and C<use
137 latest restorable auto snapshot> parameters are mutually exclusive.
138  
139 =item *
140  
141 Define this parameter only when creating a new disk from an automatic
142 snapshot. For more information, see the Lightsail Dev Guide
143 (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots).
144  
145 =back
146  
147  
148  
149  
150 =head2 B<REQUIRED> SizeInGb => Int
151  
152 The size of the disk in GB (e.g., C<32>).
153  
154  
155  
156 =head2 SourceDiskName => Str
157  
158 The name of the source disk from which the source automatic snapshot
159 was created.
160  
161 Constraints:
162  
163 =over
164  
165 =item *
166  
167 This parameter cannot be defined together with the C<disk snapshot
168 name> parameter. The C<source disk name> and C<disk snapshot name>
169 parameters are mutually exclusive.
170  
171 =item *
172  
173 Define this parameter only when creating a new disk from an automatic
174 snapshot. For more information, see the Lightsail Dev Guide
175 (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots).
176  
177 =back
178  
179  
180  
181  
182 =head2 Tags => ArrayRef[L<Paws::Lightsail::Tag>]
183  
184 The tag keys and optional values to add to the resource during create.
185  
186 Use the C<TagResource> action to tag a resource after it's created.
187  
188  
189  
190 =head2 UseLatestRestorableAutoSnapshot => Bool
191  
192 A Boolean value to indicate whether to use the latest available
193 automatic snapshot.
194  
195 Constraints:
196  
197 =over
198  
199 =item *
200  
201 This parameter cannot be defined together with the C<restore date>
202 parameter. The C<use latest restorable auto snapshot> and C<restore
203 date> parameters are mutually exclusive.
204  
205 =item *
206  
207 Define this parameter only when creating a new disk from an automatic
208 snapshot. For more information, see the Lightsail Dev Guide
209 (https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-configuring-automatic-snapshots).
210  
211 =back
212  
213  
214  
215  
216  
217 =head1 SEE ALSO
218  
219 This class forms part of L<Paws>, documenting arguments for method CreateDiskFromSnapshot in L<Paws::Lightsail>
220  
221 =head1 BUGS and CONTRIBUTIONS
222  
223 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
224  
225 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
226  
227 =cut
228