File Coverage

blib/lib/Paws/WorkSpaces.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Paws::WorkSpaces;
2 1     1   12930 use Moose;
  1         5  
  1         20  
3             sub service { 'workspaces' }
4             sub version { '2015-04-08' }
5             sub target_prefix { 'WorkspacesService' }
6             sub json_version { "1.1" }
7             has max_attempts => (is => 'ro', isa => 'Int', default => 5);
8             has retry => (is => 'ro', isa => 'HashRef', default => sub {
9             { base => 'rand', type => 'exponential', growth_factor => 2 }
10             });
11             has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
12             ] });
13              
14             with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::JsonCaller', 'Paws::Net::JsonResponse';
15              
16            
17             sub CreateTags {
18             my $self = shift;
19             my $call_object = $self->new_with_coercions('Paws::WorkSpaces::CreateTags', @_);
20             return $self->caller->do_call($self, $call_object);
21             }
22             sub CreateWorkspaces {
23             my $self = shift;
24             my $call_object = $self->new_with_coercions('Paws::WorkSpaces::CreateWorkspaces', @_);
25             return $self->caller->do_call($self, $call_object);
26             }
27             sub DeleteTags {
28             my $self = shift;
29             my $call_object = $self->new_with_coercions('Paws::WorkSpaces::DeleteTags', @_);
30             return $self->caller->do_call($self, $call_object);
31             }
32             sub DescribeTags {
33             my $self = shift;
34             my $call_object = $self->new_with_coercions('Paws::WorkSpaces::DescribeTags', @_);
35             return $self->caller->do_call($self, $call_object);
36             }
37             sub DescribeWorkspaceBundles {
38             my $self = shift;
39             my $call_object = $self->new_with_coercions('Paws::WorkSpaces::DescribeWorkspaceBundles', @_);
40             return $self->caller->do_call($self, $call_object);
41             }
42             sub DescribeWorkspaceDirectories {
43             my $self = shift;
44             my $call_object = $self->new_with_coercions('Paws::WorkSpaces::DescribeWorkspaceDirectories', @_);
45             return $self->caller->do_call($self, $call_object);
46             }
47             sub DescribeWorkspaces {
48             my $self = shift;
49             my $call_object = $self->new_with_coercions('Paws::WorkSpaces::DescribeWorkspaces', @_);
50             return $self->caller->do_call($self, $call_object);
51             }
52             sub DescribeWorkspacesConnectionStatus {
53             my $self = shift;
54             my $call_object = $self->new_with_coercions('Paws::WorkSpaces::DescribeWorkspacesConnectionStatus', @_);
55             return $self->caller->do_call($self, $call_object);
56             }
57             sub ModifyWorkspaceProperties {
58             my $self = shift;
59             my $call_object = $self->new_with_coercions('Paws::WorkSpaces::ModifyWorkspaceProperties', @_);
60             return $self->caller->do_call($self, $call_object);
61             }
62             sub RebootWorkspaces {
63             my $self = shift;
64             my $call_object = $self->new_with_coercions('Paws::WorkSpaces::RebootWorkspaces', @_);
65             return $self->caller->do_call($self, $call_object);
66             }
67             sub RebuildWorkspaces {
68             my $self = shift;
69             my $call_object = $self->new_with_coercions('Paws::WorkSpaces::RebuildWorkspaces', @_);
70             return $self->caller->do_call($self, $call_object);
71             }
72             sub StartWorkspaces {
73             my $self = shift;
74             my $call_object = $self->new_with_coercions('Paws::WorkSpaces::StartWorkspaces', @_);
75             return $self->caller->do_call($self, $call_object);
76             }
77             sub StopWorkspaces {
78             my $self = shift;
79             my $call_object = $self->new_with_coercions('Paws::WorkSpaces::StopWorkspaces', @_);
80             return $self->caller->do_call($self, $call_object);
81             }
82             sub TerminateWorkspaces {
83             my $self = shift;
84             my $call_object = $self->new_with_coercions('Paws::WorkSpaces::TerminateWorkspaces', @_);
85             return $self->caller->do_call($self, $call_object);
86             }
87            
88             sub DescribeAllWorkspaceBundles {
89             my $self = shift;
90              
91             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
92             my $result = $self->DescribeWorkspaceBundles(@_);
93             my $next_result = $result;
94              
95             if (not defined $callback) {
96             while ($next_result->NextToken) {
97             $next_result = $self->DescribeWorkspaceBundles(@_, NextToken => $next_result->NextToken);
98             push @{ $result->Bundles }, @{ $next_result->Bundles };
99             }
100             return $result;
101             } else {
102             while ($result->NextToken) {
103             $callback->($_ => 'Bundles') foreach (@{ $result->Bundles });
104             $result = $self->DescribeWorkspaceBundles(@_, NextToken => $result->NextToken);
105             }
106             $callback->($_ => 'Bundles') foreach (@{ $result->Bundles });
107             }
108              
109             return undef
110             }
111             sub DescribeAllWorkspaceDirectories {
112             my $self = shift;
113              
114             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
115             my $result = $self->DescribeWorkspaceDirectories(@_);
116             my $next_result = $result;
117              
118             if (not defined $callback) {
119             while ($next_result->NextToken) {
120             $next_result = $self->DescribeWorkspaceDirectories(@_, NextToken => $next_result->NextToken);
121             push @{ $result->Directories }, @{ $next_result->Directories };
122             }
123             return $result;
124             } else {
125             while ($result->NextToken) {
126             $callback->($_ => 'Directories') foreach (@{ $result->Directories });
127             $result = $self->DescribeWorkspaceDirectories(@_, NextToken => $result->NextToken);
128             }
129             $callback->($_ => 'Directories') foreach (@{ $result->Directories });
130             }
131              
132             return undef
133             }
134             sub DescribeAllWorkspaces {
135             my $self = shift;
136              
137             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
138             my $result = $self->DescribeWorkspaces(@_);
139             my $next_result = $result;
140              
141             if (not defined $callback) {
142             while ($next_result->NextToken) {
143             $next_result = $self->DescribeWorkspaces(@_, NextToken => $next_result->NextToken);
144             push @{ $result->Workspaces }, @{ $next_result->Workspaces };
145             }
146             return $result;
147             } else {
148             while ($result->NextToken) {
149             $callback->($_ => 'Workspaces') foreach (@{ $result->Workspaces });
150             $result = $self->DescribeWorkspaces(@_, NextToken => $result->NextToken);
151             }
152             $callback->($_ => 'Workspaces') foreach (@{ $result->Workspaces });
153             }
154              
155             return undef
156             }
157              
158              
159             sub operations { qw/CreateTags CreateWorkspaces DeleteTags DescribeTags DescribeWorkspaceBundles DescribeWorkspaceDirectories DescribeWorkspaces DescribeWorkspacesConnectionStatus ModifyWorkspaceProperties RebootWorkspaces RebuildWorkspaces StartWorkspaces StopWorkspaces TerminateWorkspaces / }
160              
161             1;
162              
163             ### main pod documentation begin ###
164              
165             =head1 NAME
166              
167             Paws::WorkSpaces - Perl Interface to AWS Amazon WorkSpaces
168              
169             =head1 SYNOPSIS
170              
171             use Paws;
172              
173             my $obj = Paws->service('WorkSpaces');
174             my $res = $obj->Method(
175             Arg1 => $val1,
176             Arg2 => [ 'V1', 'V2' ],
177             # if Arg3 is an object, the HashRef will be used as arguments to the constructor
178             # of the arguments type
179             Arg3 => { Att1 => 'Val1' },
180             # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
181             # the constructor of the arguments type
182             Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
183             );
184              
185             =head1 DESCRIPTION
186              
187             Amazon WorkSpaces Service
188              
189             This reference provides detailed information about the Amazon
190             WorkSpaces operations.
191              
192             =head1 METHODS
193              
194             =head2 CreateTags(ResourceId => Str, Tags => ArrayRef[L<Paws::WorkSpaces::Tag>])
195              
196             Each argument is described in detail in: L<Paws::WorkSpaces::CreateTags>
197              
198             Returns: a L<Paws::WorkSpaces::CreateTagsResult> instance
199              
200             Creates tags for a WorkSpace.
201              
202              
203             =head2 CreateWorkspaces(Workspaces => ArrayRef[L<Paws::WorkSpaces::WorkspaceRequest>])
204              
205             Each argument is described in detail in: L<Paws::WorkSpaces::CreateWorkspaces>
206              
207             Returns: a L<Paws::WorkSpaces::CreateWorkspacesResult> instance
208              
209             Creates one or more WorkSpaces.
210              
211             This operation is asynchronous and returns before the WorkSpaces are
212             created.
213              
214              
215             =head2 DeleteTags(ResourceId => Str, TagKeys => ArrayRef[Str|Undef])
216              
217             Each argument is described in detail in: L<Paws::WorkSpaces::DeleteTags>
218              
219             Returns: a L<Paws::WorkSpaces::DeleteTagsResult> instance
220              
221             Deletes tags from a WorkSpace.
222              
223              
224             =head2 DescribeTags(ResourceId => Str)
225              
226             Each argument is described in detail in: L<Paws::WorkSpaces::DescribeTags>
227              
228             Returns: a L<Paws::WorkSpaces::DescribeTagsResult> instance
229              
230             Describes tags for a WorkSpace.
231              
232              
233             =head2 DescribeWorkspaceBundles([BundleIds => ArrayRef[Str|Undef], NextToken => Str, Owner => Str])
234              
235             Each argument is described in detail in: L<Paws::WorkSpaces::DescribeWorkspaceBundles>
236              
237             Returns: a L<Paws::WorkSpaces::DescribeWorkspaceBundlesResult> instance
238              
239             Obtains information about the WorkSpace bundles that are available to
240             your account in the specified region.
241              
242             You can filter the results with either the C<BundleIds> parameter, or
243             the C<Owner> parameter, but not both.
244              
245             This operation supports pagination with the use of the C<NextToken>
246             request and response parameters. If more results are available, the
247             C<NextToken> response member contains a token that you pass in the next
248             call to this operation to retrieve the next set of items.
249              
250              
251             =head2 DescribeWorkspaceDirectories([DirectoryIds => ArrayRef[Str|Undef], NextToken => Str])
252              
253             Each argument is described in detail in: L<Paws::WorkSpaces::DescribeWorkspaceDirectories>
254              
255             Returns: a L<Paws::WorkSpaces::DescribeWorkspaceDirectoriesResult> instance
256              
257             Retrieves information about the AWS Directory Service directories in
258             the region that are registered with Amazon WorkSpaces and are available
259             to your account.
260              
261             This operation supports pagination with the use of the C<NextToken>
262             request and response parameters. If more results are available, the
263             C<NextToken> response member contains a token that you pass in the next
264             call to this operation to retrieve the next set of items.
265              
266              
267             =head2 DescribeWorkspaces([BundleId => Str, DirectoryId => Str, Limit => Int, NextToken => Str, UserName => Str, WorkspaceIds => ArrayRef[Str|Undef]])
268              
269             Each argument is described in detail in: L<Paws::WorkSpaces::DescribeWorkspaces>
270              
271             Returns: a L<Paws::WorkSpaces::DescribeWorkspacesResult> instance
272              
273             Obtains information about the specified WorkSpaces.
274              
275             Only one of the filter parameters, such as C<BundleId>, C<DirectoryId>,
276             or C<WorkspaceIds>, can be specified at a time.
277              
278             This operation supports pagination with the use of the C<NextToken>
279             request and response parameters. If more results are available, the
280             C<NextToken> response member contains a token that you pass in the next
281             call to this operation to retrieve the next set of items.
282              
283              
284             =head2 DescribeWorkspacesConnectionStatus([NextToken => Str, WorkspaceIds => ArrayRef[Str|Undef]])
285              
286             Each argument is described in detail in: L<Paws::WorkSpaces::DescribeWorkspacesConnectionStatus>
287              
288             Returns: a L<Paws::WorkSpaces::DescribeWorkspacesConnectionStatusResult> instance
289              
290             Describes the connection status of a specified WorkSpace.
291              
292              
293             =head2 ModifyWorkspaceProperties(WorkspaceId => Str, WorkspaceProperties => L<Paws::WorkSpaces::WorkspaceProperties>)
294              
295             Each argument is described in detail in: L<Paws::WorkSpaces::ModifyWorkspaceProperties>
296              
297             Returns: a L<Paws::WorkSpaces::ModifyWorkspacePropertiesResult> instance
298              
299             Modifies the WorkSpace properties, including the running mode and
300             AutoStop time.
301              
302              
303             =head2 RebootWorkspaces(RebootWorkspaceRequests => ArrayRef[L<Paws::WorkSpaces::RebootRequest>])
304              
305             Each argument is described in detail in: L<Paws::WorkSpaces::RebootWorkspaces>
306              
307             Returns: a L<Paws::WorkSpaces::RebootWorkspacesResult> instance
308              
309             Reboots the specified WorkSpaces.
310              
311             To be able to reboot a WorkSpace, the WorkSpace must have a B<State> of
312             C<AVAILABLE>, C<IMPAIRED>, or C<INOPERABLE>.
313              
314             This operation is asynchronous and returns before the WorkSpaces have
315             rebooted.
316              
317              
318             =head2 RebuildWorkspaces(RebuildWorkspaceRequests => ArrayRef[L<Paws::WorkSpaces::RebuildRequest>])
319              
320             Each argument is described in detail in: L<Paws::WorkSpaces::RebuildWorkspaces>
321              
322             Returns: a L<Paws::WorkSpaces::RebuildWorkspacesResult> instance
323              
324             Rebuilds the specified WorkSpaces.
325              
326             Rebuilding a WorkSpace is a potentially destructive action that can
327             result in the loss of data. Rebuilding a WorkSpace causes the following
328             to occur:
329              
330             =over
331              
332             =item *
333              
334             The system is restored to the image of the bundle that the WorkSpace is
335             created from. Any applications that have been installed, or system
336             settings that have been made since the WorkSpace was created will be
337             lost.
338              
339             =item *
340              
341             The data drive (D drive) is re-created from the last automatic snapshot
342             taken of the data drive. The current contents of the data drive are
343             overwritten. Automatic snapshots of the data drive are taken every 12
344             hours, so the snapshot can be as much as 12 hours old.
345              
346             =back
347              
348             To be able to rebuild a WorkSpace, the WorkSpace must have a B<State>
349             of C<AVAILABLE> or C<ERROR>.
350              
351             This operation is asynchronous and returns before the WorkSpaces have
352             been completely rebuilt.
353              
354              
355             =head2 StartWorkspaces(StartWorkspaceRequests => ArrayRef[L<Paws::WorkSpaces::StartRequest>])
356              
357             Each argument is described in detail in: L<Paws::WorkSpaces::StartWorkspaces>
358              
359             Returns: a L<Paws::WorkSpaces::StartWorkspacesResult> instance
360              
361             Starts the specified WorkSpaces. The WorkSpaces must have a running
362             mode of AutoStop and a state of STOPPED.
363              
364              
365             =head2 StopWorkspaces(StopWorkspaceRequests => ArrayRef[L<Paws::WorkSpaces::StopRequest>])
366              
367             Each argument is described in detail in: L<Paws::WorkSpaces::StopWorkspaces>
368              
369             Returns: a L<Paws::WorkSpaces::StopWorkspacesResult> instance
370              
371             Stops the specified WorkSpaces. The WorkSpaces must have a running mode
372             of AutoStop and a state of AVAILABLE, IMPAIRED, UNHEALTHY, or ERROR.
373              
374              
375             =head2 TerminateWorkspaces(TerminateWorkspaceRequests => ArrayRef[L<Paws::WorkSpaces::TerminateRequest>])
376              
377             Each argument is described in detail in: L<Paws::WorkSpaces::TerminateWorkspaces>
378              
379             Returns: a L<Paws::WorkSpaces::TerminateWorkspacesResult> instance
380              
381             Terminates the specified WorkSpaces.
382              
383             Terminating a WorkSpace is a permanent action and cannot be undone. The
384             user's data is not maintained and will be destroyed. If you need to
385             archive any user data, contact Amazon Web Services before terminating
386             the WorkSpace.
387              
388             You can terminate a WorkSpace that is in any state except C<SUSPENDED>.
389              
390             This operation is asynchronous and returns before the WorkSpaces have
391             been completely terminated.
392              
393              
394              
395              
396             =head1 PAGINATORS
397              
398             Paginator methods are helpers that repetively call methods that return partial results
399              
400             =head2 DescribeAllWorkspaceBundles(sub { },[BundleIds => ArrayRef[Str|Undef], NextToken => Str, Owner => Str])
401              
402             =head2 DescribeAllWorkspaceBundles([BundleIds => ArrayRef[Str|Undef], NextToken => Str, Owner => Str])
403              
404              
405             If passed a sub as first parameter, it will call the sub for each element found in :
406              
407             - Bundles, passing the object as the first parameter, and the string 'Bundles' as the second parameter
408              
409             If not, it will return a a L<Paws::WorkSpaces::DescribeWorkspaceBundlesResult> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
410              
411              
412             =head2 DescribeAllWorkspaceDirectories(sub { },[DirectoryIds => ArrayRef[Str|Undef], NextToken => Str])
413              
414             =head2 DescribeAllWorkspaceDirectories([DirectoryIds => ArrayRef[Str|Undef], NextToken => Str])
415              
416              
417             If passed a sub as first parameter, it will call the sub for each element found in :
418              
419             - Directories, passing the object as the first parameter, and the string 'Directories' as the second parameter
420              
421             If not, it will return a a L<Paws::WorkSpaces::DescribeWorkspaceDirectoriesResult> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
422              
423              
424             =head2 DescribeAllWorkspaces(sub { },[BundleId => Str, DirectoryId => Str, Limit => Int, NextToken => Str, UserName => Str, WorkspaceIds => ArrayRef[Str|Undef]])
425              
426             =head2 DescribeAllWorkspaces([BundleId => Str, DirectoryId => Str, Limit => Int, NextToken => Str, UserName => Str, WorkspaceIds => ArrayRef[Str|Undef]])
427              
428              
429             If passed a sub as first parameter, it will call the sub for each element found in :
430              
431             - Workspaces, passing the object as the first parameter, and the string 'Workspaces' as the second parameter
432              
433             If not, it will return a a L<Paws::WorkSpaces::DescribeWorkspacesResult> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
434              
435              
436              
437              
438              
439             =head1 SEE ALSO
440              
441             This service class forms part of L<Paws>
442              
443             =head1 BUGS and CONTRIBUTIONS
444              
445             The source code is located here: https://github.com/pplu/aws-sdk-perl
446              
447             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
448              
449             =cut
450