blib/lib/Paws/SSO.pm untested

filter: Statementstmt 0.0% 0 / 65 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 12 Podpod 0.0% 0 / 11 totaltotal 0.0% 0 / 96 CC 5 SCAR 17.5
CC
5
Cov
0%
ListAllAccountRoles
12.0
ListAllAccounts
12.0
service
2.0
CRAP 5.8
1 package Paws::SSO;
2 use Moose;
3 sub service { 'portal.sso' }
4 sub signing_name { 'awsssoportal' }
5 sub version { '2019-06-10' }
6 sub flattened_arrays { 0 }
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::RestJsonCaller';
15  
16
17 sub GetRoleCredentials {
18 my $self = shift;
19 my $call_object = $self->new_with_coercions('Paws::SSO::GetRoleCredentials', @_);
20 return $self->caller->do_call($self, $call_object);
21 }
22 sub ListAccountRoles {
23 my $self = shift;
24 my $call_object = $self->new_with_coercions('Paws::SSO::ListAccountRoles', @_);
25 return $self->caller->do_call($self, $call_object);
26 }
27 sub ListAccounts {
28 my $self = shift;
29 my $call_object = $self->new_with_coercions('Paws::SSO::ListAccounts', @_);
30 return $self->caller->do_call($self, $call_object);
31 }
32 sub Logout {
33 my $self = shift;
34 my $call_object = $self->new_with_coercions('Paws::SSO::Logout', @_);
35 return $self->caller->do_call($self, $call_object);
36 }
37
38 sub ListAllAccountRoles {
39 my $self = shift;
40  
41 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
42 my $result = $self->ListAccountRoles(@_);
43 my $next_result = $result;
44  
45 if (not defined $callback) {
46 while ($next_result->nextToken) {
47 $next_result = $self->ListAccountRoles(@_, nextToken => $next_result->nextToken);
48 push @{ $result->roleList }, @{ $next_result->roleList };
49 }
50 return $result;
51 } else {
52 while ($result->nextToken) {
53 $callback->($_ => 'roleList') foreach (@{ $result->roleList });
54 $result = $self->ListAccountRoles(@_, nextToken => $result->nextToken);
55 }
56 $callback->($_ => 'roleList') foreach (@{ $result->roleList });
57 }
58  
59 return undef
60 }
61 sub ListAllAccounts {
62 my $self = shift;
63  
64 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
65 my $result = $self->ListAccounts(@_);
66 my $next_result = $result;
67  
68 if (not defined $callback) {
69 while ($next_result->nextToken) {
70 $next_result = $self->ListAccounts(@_, nextToken => $next_result->nextToken);
71 push @{ $result->accountList }, @{ $next_result->accountList };
72 }
73 return $result;
74 } else {
75 while ($result->nextToken) {
76 $callback->($_ => 'accountList') foreach (@{ $result->accountList });
77 $result = $self->ListAccounts(@_, nextToken => $result->nextToken);
78 }
79 $callback->($_ => 'accountList') foreach (@{ $result->accountList });
80 }
81  
82 return undef
83 }
84  
85  
86 sub operations { qw/GetRoleCredentials ListAccountRoles ListAccounts Logout / }
87  
88 1;
89  
90 ### main pod documentation begin ###
91  
92 =head1 NAME
93  
94 Paws::SSO - Perl Interface to AWS AWS Single Sign-On
95  
96 =head1 SYNOPSIS
97  
98 use Paws;
99  
100 my $obj = Paws->service('SSO');
101 my $res = $obj->Method(
102 Arg1 => $val1,
103 Arg2 => [ 'V1', 'V2' ],
104 # if Arg3 is an object, the HashRef will be used as arguments to the constructor
105 # of the arguments type
106 Arg3 => { Att1 => 'Val1' },
107 # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
108 # the constructor of the arguments type
109 Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
110 );
111  
112 =head1 DESCRIPTION
113  
114 AWS Single Sign-On Portal is a web service that makes it easy for you
115 to assign user access to AWS SSO resources such as the user portal.
116 Users can get AWS account applications and roles assigned to them and
117 get federated into the application.
118  
119 For general information about AWS SSO, see What is AWS Single Sign-On?
120 (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html)
121 in the I<AWS SSO User Guide>.
122  
123 This API reference guide describes the AWS SSO Portal operations that
124 you can call programatically and includes detailed information on data
125 types and errors.
126  
127 AWS provides SDKs that consist of libraries and sample code for various
128 programming languages and platforms, such as Java, Ruby, .Net, iOS, or
129 Android. The SDKs provide a convenient way to create programmatic
130 access to AWS SSO and other AWS services. For more information about
131 the AWS SDKs, including how to download and install them, see Tools for
132 Amazon Web Services (http://aws.amazon.com/tools/).
133  
134 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/portal.sso-2019-06-10>
135  
136  
137 =head1 METHODS
138  
139 =head2 GetRoleCredentials
140  
141 =over
142  
143 =item AccessToken => Str
144  
145 =item AccountId => Str
146  
147 =item RoleName => Str
148  
149  
150 =back
151  
152 Each argument is described in detail in: L<Paws::SSO::GetRoleCredentials>
153  
154 Returns: a L<Paws::SSO::GetRoleCredentialsResponse> instance
155  
156 Returns the STS short-term credentials for a given role name that is
157 assigned to the user.
158  
159  
160 =head2 ListAccountRoles
161  
162 =over
163  
164 =item AccessToken => Str
165  
166 =item AccountId => Str
167  
168 =item [MaxResults => Int]
169  
170 =item [NextToken => Str]
171  
172  
173 =back
174  
175 Each argument is described in detail in: L<Paws::SSO::ListAccountRoles>
176  
177 Returns: a L<Paws::SSO::ListAccountRolesResponse> instance
178  
179 Lists all roles that are assigned to the user for a given AWS account.
180  
181  
182 =head2 ListAccounts
183  
184 =over
185  
186 =item AccessToken => Str
187  
188 =item [MaxResults => Int]
189  
190 =item [NextToken => Str]
191  
192  
193 =back
194  
195 Each argument is described in detail in: L<Paws::SSO::ListAccounts>
196  
197 Returns: a L<Paws::SSO::ListAccountsResponse> instance
198  
199 Lists all AWS accounts assigned to the user. These AWS accounts are
200 assigned by the administrator of the account. For more information, see
201 Assign User Access
202 (https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers)
203 in the I<AWS SSO User Guide>. This operation returns a paginated
204 response.
205  
206  
207 =head2 Logout
208  
209 =over
210  
211 =item AccessToken => Str
212  
213  
214 =back
215  
216 Each argument is described in detail in: L<Paws::SSO::Logout>
217  
218 Returns: nothing
219  
220 Removes the client- and server-side session that is associated with the
221 user.
222  
223  
224  
225  
226 =head1 PAGINATORS
227  
228 Paginator methods are helpers that repetively call methods that return partial results
229  
230 =head2 ListAllAccountRoles(sub { },AccessToken => Str, AccountId => Str, [MaxResults => Int, NextToken => Str])
231  
232 =head2 ListAllAccountRoles(AccessToken => Str, AccountId => Str, [MaxResults => Int, NextToken => Str])
233  
234  
235 If passed a sub as first parameter, it will call the sub for each element found in :
236  
237 - roleList, passing the object as the first parameter, and the string 'roleList' as the second parameter
238  
239 If not, it will return a a L<Paws::SSO::ListAccountRolesResponse> 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.
240  
241  
242 =head2 ListAllAccounts(sub { },AccessToken => Str, [MaxResults => Int, NextToken => Str])
243  
244 =head2 ListAllAccounts(AccessToken => Str, [MaxResults => Int, NextToken => Str])
245  
246  
247 If passed a sub as first parameter, it will call the sub for each element found in :
248  
249 - accountList, passing the object as the first parameter, and the string 'accountList' as the second parameter
250  
251 If not, it will return a a L<Paws::SSO::ListAccountsResponse> 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.
252  
253  
254  
255  
256  
257 =head1 SEE ALSO
258  
259 This service class forms part of L<Paws>
260  
261 =head1 BUGS and CONTRIBUTIONS
262  
263 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
264  
265 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
266  
267 =cut
268