File Coverage

blib/lib/Paws/CognitoIdentity.pm
Criterion Covered Total %
statement 13 65 20.0
branch n/a
condition n/a
subroutine 7 25 28.0
pod 18 23 78.2
total 38 113 33.6


line stmt bran cond sub pod time code
1             package Paws::CognitoIdentity;
2 1     1   1987 use Moose;
  1     1   3  
  1         7  
  1         836  
  1         2  
  1         10  
3 2     2 0 16 sub service { 'cognito-identity' }
4 1     1 0 9 sub version { '2014-06-30' }
5 1     1 0 32 sub target_prefix { 'AWSCognitoIdentityService' }
6 1     1 0 3 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 CreateIdentityPool {
18 0     0 1 0 my $self = shift;
19 0         0 my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::CreateIdentityPool', @_);
20 0         0 return $self->caller->do_call($self, $call_object);
21             }
22             sub DeleteIdentities {
23 0     0 1 0 my $self = shift;
24 0         0 my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::DeleteIdentities', @_);
25 0         0 return $self->caller->do_call($self, $call_object);
26             }
27             sub DeleteIdentityPool {
28 0     0 1 0 my $self = shift;
29 0         0 my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::DeleteIdentityPool', @_);
30 0         0 return $self->caller->do_call($self, $call_object);
31             }
32             sub DescribeIdentity {
33 0     0 1 0 my $self = shift;
34 0         0 my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::DescribeIdentity', @_);
35 0         0 return $self->caller->do_call($self, $call_object);
36             }
37             sub DescribeIdentityPool {
38 0     0 1 0 my $self = shift;
39 0         0 my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::DescribeIdentityPool', @_);
40 0         0 return $self->caller->do_call($self, $call_object);
41             }
42             sub GetCredentialsForIdentity {
43 0     0 1 0 my $self = shift;
44 0         0 my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::GetCredentialsForIdentity', @_);
45 0         0 return $self->caller->do_call($self, $call_object);
46             }
47             sub GetId {
48 0     0 1 0 my $self = shift;
49 0         0 my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::GetId', @_);
50 0         0 return $self->caller->do_call($self, $call_object);
51             }
52             sub GetIdentityPoolRoles {
53 0     0 1 0 my $self = shift;
54 0         0 my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::GetIdentityPoolRoles', @_);
55 0         0 return $self->caller->do_call($self, $call_object);
56             }
57             sub GetOpenIdToken {
58 0     0 1 0 my $self = shift;
59 0         0 my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::GetOpenIdToken', @_);
60 0         0 return $self->caller->do_call($self, $call_object);
61             }
62             sub GetOpenIdTokenForDeveloperIdentity {
63 1     1 1 15 my $self = shift;
64 1         10 my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::GetOpenIdTokenForDeveloperIdentity', @_);
65 1         1132 return $self->caller->do_call($self, $call_object);
66             }
67             sub ListIdentities {
68 0     0 1   my $self = shift;
69 0           my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::ListIdentities', @_);
70 0           return $self->caller->do_call($self, $call_object);
71             }
72             sub ListIdentityPools {
73 0     0 1   my $self = shift;
74 0           my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::ListIdentityPools', @_);
75 0           return $self->caller->do_call($self, $call_object);
76             }
77             sub LookupDeveloperIdentity {
78 0     0 1   my $self = shift;
79 0           my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::LookupDeveloperIdentity', @_);
80 0           return $self->caller->do_call($self, $call_object);
81             }
82             sub MergeDeveloperIdentities {
83 0     0 1   my $self = shift;
84 0           my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::MergeDeveloperIdentities', @_);
85 0           return $self->caller->do_call($self, $call_object);
86             }
87             sub SetIdentityPoolRoles {
88 0     0 1   my $self = shift;
89 0           my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::SetIdentityPoolRoles', @_);
90 0           return $self->caller->do_call($self, $call_object);
91             }
92             sub UnlinkDeveloperIdentity {
93 0     0 1   my $self = shift;
94 0           my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::UnlinkDeveloperIdentity', @_);
95 0           return $self->caller->do_call($self, $call_object);
96             }
97             sub UnlinkIdentity {
98 0     0 1   my $self = shift;
99 0           my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::UnlinkIdentity', @_);
100 0           return $self->caller->do_call($self, $call_object);
101             }
102             sub UpdateIdentityPool {
103 0     0 1   my $self = shift;
104 0           my $call_object = $self->new_with_coercions('Paws::CognitoIdentity::UpdateIdentityPool', @_);
105 0           return $self->caller->do_call($self, $call_object);
106             }
107            
108              
109              
110 0     0 0   sub operations { qw/CreateIdentityPool DeleteIdentities DeleteIdentityPool DescribeIdentity DescribeIdentityPool GetCredentialsForIdentity GetId GetIdentityPoolRoles GetOpenIdToken GetOpenIdTokenForDeveloperIdentity ListIdentities ListIdentityPools LookupDeveloperIdentity MergeDeveloperIdentities SetIdentityPoolRoles UnlinkDeveloperIdentity UnlinkIdentity UpdateIdentityPool / }
111              
112             1;
113              
114             ### main pod documentation begin ###
115              
116             =head1 NAME
117              
118             Paws::CognitoIdentity - Perl Interface to AWS Amazon Cognito Identity
119              
120             =head1 SYNOPSIS
121              
122             use Paws;
123              
124             my $obj = Paws->service('CognitoIdentity');
125             my $res = $obj->Method(
126             Arg1 => $val1,
127             Arg2 => [ 'V1', 'V2' ],
128             # if Arg3 is an object, the HashRef will be used as arguments to the constructor
129             # of the arguments type
130             Arg3 => { Att1 => 'Val1' },
131             # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
132             # the constructor of the arguments type
133             Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
134             );
135              
136             =head1 DESCRIPTION
137              
138             Amazon Cognito
139              
140             Amazon Cognito is a web service that delivers scoped temporary
141             credentials to mobile devices and other untrusted environments. Amazon
142             Cognito uniquely identifies a device and supplies the user with a
143             consistent identity over the lifetime of an application.
144              
145             Using Amazon Cognito, you can enable authentication with one or more
146             third-party identity providers (Facebook, Google, or Login with
147             Amazon), and you can also choose to support unauthenticated access from
148             your app. Cognito delivers a unique identifier for each user and acts
149             as an OpenID token provider trusted by AWS Security Token Service (STS)
150             to access temporary, limited-privilege AWS credentials.
151              
152             To provide end-user credentials, first make an unsigned call to GetId.
153             If the end user is authenticated with one of the supported identity
154             providers, set the C<Logins> map with the identity provider token.
155             C<GetId> returns a unique identifier for the user.
156              
157             Next, make an unsigned call to GetCredentialsForIdentity. This call
158             expects the same C<Logins> map as the C<GetId> call, as well as the
159             C<IdentityID> originally returned by C<GetId>. Assuming your identity
160             pool has been configured via the SetIdentityPoolRoles operation,
161             C<GetCredentialsForIdentity> will return AWS credentials for your use.
162             If your pool has not been configured with C<SetIdentityPoolRoles>, or
163             if you want to follow legacy flow, make an unsigned call to
164             GetOpenIdToken, which returns the OpenID token necessary to call STS
165             and retrieve AWS credentials. This call expects the same C<Logins> map
166             as the C<GetId> call, as well as the C<IdentityID> originally returned
167             by C<GetId>. The token returned by C<GetOpenIdToken> can be passed to
168             the STS operation AssumeRoleWithWebIdentity to retrieve AWS
169             credentials.
170              
171             If you want to use Amazon Cognito in an Android, iOS, or Unity
172             application, you will probably want to make API calls via the AWS
173             Mobile SDK. To learn more, see the AWS Mobile SDK Developer Guide.
174              
175             =head1 METHODS
176              
177             =head2 CreateIdentityPool(AllowUnauthenticatedIdentities => Bool, IdentityPoolName => Str, [CognitoIdentityProviders => ArrayRef[L<Paws::CognitoIdentity::CognitoIdentityProvider>], DeveloperProviderName => Str, OpenIdConnectProviderARNs => ArrayRef[Str|Undef], SamlProviderARNs => ArrayRef[Str|Undef], SupportedLoginProviders => L<Paws::CognitoIdentity::IdentityProviders>])
178              
179             Each argument is described in detail in: L<Paws::CognitoIdentity::CreateIdentityPool>
180              
181             Returns: a L<Paws::CognitoIdentity::IdentityPool> instance
182              
183             Creates a new identity pool. The identity pool is a store of user
184             identity information that is specific to your AWS account. The limit on
185             identity pools is 60 per account. The keys for
186             C<SupportedLoginProviders> are as follows:
187              
188             =over
189              
190             =item *
191              
192             Facebook: C<graph.facebook.com>
193              
194             =item *
195              
196             Google: C<accounts.google.com>
197              
198             =item *
199              
200             Amazon: C<www.amazon.com>
201              
202             =item *
203              
204             Twitter: C<api.twitter.com>
205              
206             =item *
207              
208             Digits: C<www.digits.com>
209              
210             =back
211              
212             You must use AWS Developer credentials to call this API.
213              
214              
215             =head2 DeleteIdentities(IdentityIdsToDelete => ArrayRef[Str|Undef])
216              
217             Each argument is described in detail in: L<Paws::CognitoIdentity::DeleteIdentities>
218              
219             Returns: a L<Paws::CognitoIdentity::DeleteIdentitiesResponse> instance
220              
221             Deletes identities from an identity pool. You can specify a list of
222             1-60 identities that you want to delete.
223              
224             You must use AWS Developer credentials to call this API.
225              
226              
227             =head2 DeleteIdentityPool(IdentityPoolId => Str)
228              
229             Each argument is described in detail in: L<Paws::CognitoIdentity::DeleteIdentityPool>
230              
231             Returns: nothing
232              
233             Deletes a user pool. Once a pool is deleted, users will not be able to
234             authenticate with the pool.
235              
236             You must use AWS Developer credentials to call this API.
237              
238              
239             =head2 DescribeIdentity(IdentityId => Str)
240              
241             Each argument is described in detail in: L<Paws::CognitoIdentity::DescribeIdentity>
242              
243             Returns: a L<Paws::CognitoIdentity::IdentityDescription> instance
244              
245             Returns metadata related to the given identity, including when the
246             identity was created and any associated linked logins.
247              
248             You must use AWS Developer credentials to call this API.
249              
250              
251             =head2 DescribeIdentityPool(IdentityPoolId => Str)
252              
253             Each argument is described in detail in: L<Paws::CognitoIdentity::DescribeIdentityPool>
254              
255             Returns: a L<Paws::CognitoIdentity::IdentityPool> instance
256              
257             Gets details about a particular identity pool, including the pool name,
258             ID description, creation date, and current number of users.
259              
260             You must use AWS Developer credentials to call this API.
261              
262              
263             =head2 GetCredentialsForIdentity(IdentityId => Str, [CustomRoleArn => Str, Logins => L<Paws::CognitoIdentity::LoginsMap>])
264              
265             Each argument is described in detail in: L<Paws::CognitoIdentity::GetCredentialsForIdentity>
266              
267             Returns: a L<Paws::CognitoIdentity::GetCredentialsForIdentityResponse> instance
268              
269             Returns credentials for the provided identity ID. Any provided logins
270             will be validated against supported login providers. If the token is
271             for cognito-identity.amazonaws.com, it will be passed through to AWS
272             Security Token Service with the appropriate role for the token.
273              
274             This is a public API. You do not need any credentials to call this API.
275              
276              
277             =head2 GetId(IdentityPoolId => Str, [AccountId => Str, Logins => L<Paws::CognitoIdentity::LoginsMap>])
278              
279             Each argument is described in detail in: L<Paws::CognitoIdentity::GetId>
280              
281             Returns: a L<Paws::CognitoIdentity::GetIdResponse> instance
282              
283             Generates (or retrieves) a Cognito ID. Supplying multiple logins will
284             create an implicit linked account.
285              
286             This is a public API. You do not need any credentials to call this API.
287              
288              
289             =head2 GetIdentityPoolRoles(IdentityPoolId => Str)
290              
291             Each argument is described in detail in: L<Paws::CognitoIdentity::GetIdentityPoolRoles>
292              
293             Returns: a L<Paws::CognitoIdentity::GetIdentityPoolRolesResponse> instance
294              
295             Gets the roles for an identity pool.
296              
297             You must use AWS Developer credentials to call this API.
298              
299              
300             =head2 GetOpenIdToken(IdentityId => Str, [Logins => L<Paws::CognitoIdentity::LoginsMap>])
301              
302             Each argument is described in detail in: L<Paws::CognitoIdentity::GetOpenIdToken>
303              
304             Returns: a L<Paws::CognitoIdentity::GetOpenIdTokenResponse> instance
305              
306             Gets an OpenID token, using a known Cognito ID. This known Cognito ID
307             is returned by GetId. You can optionally add additional logins for the
308             identity. Supplying multiple logins creates an implicit link.
309              
310             The OpenId token is valid for 15 minutes.
311              
312             This is a public API. You do not need any credentials to call this API.
313              
314              
315             =head2 GetOpenIdTokenForDeveloperIdentity(IdentityPoolId => Str, Logins => L<Paws::CognitoIdentity::LoginsMap>, [IdentityId => Str, TokenDuration => Int])
316              
317             Each argument is described in detail in: L<Paws::CognitoIdentity::GetOpenIdTokenForDeveloperIdentity>
318              
319             Returns: a L<Paws::CognitoIdentity::GetOpenIdTokenForDeveloperIdentityResponse> instance
320              
321             Registers (or retrieves) a Cognito C<IdentityId> and an OpenID Connect
322             token for a user authenticated by your backend authentication process.
323             Supplying multiple logins will create an implicit linked account. You
324             can only specify one developer provider as part of the C<Logins> map,
325             which is linked to the identity pool. The developer provider is the
326             "domain" by which Cognito will refer to your users.
327              
328             You can use C<GetOpenIdTokenForDeveloperIdentity> to create a new
329             identity and to link new logins (that is, user credentials issued by a
330             public provider or developer provider) to an existing identity. When
331             you want to create a new identity, the C<IdentityId> should be null.
332             When you want to associate a new login with an existing
333             authenticated/unauthenticated identity, you can do so by providing the
334             existing C<IdentityId>. This API will create the identity in the
335             specified C<IdentityPoolId>.
336              
337             You must use AWS Developer credentials to call this API.
338              
339              
340             =head2 ListIdentities(IdentityPoolId => Str, MaxResults => Int, [HideDisabled => Bool, NextToken => Str])
341              
342             Each argument is described in detail in: L<Paws::CognitoIdentity::ListIdentities>
343              
344             Returns: a L<Paws::CognitoIdentity::ListIdentitiesResponse> instance
345              
346             Lists the identities in a pool.
347              
348             You must use AWS Developer credentials to call this API.
349              
350              
351             =head2 ListIdentityPools(MaxResults => Int, [NextToken => Str])
352              
353             Each argument is described in detail in: L<Paws::CognitoIdentity::ListIdentityPools>
354              
355             Returns: a L<Paws::CognitoIdentity::ListIdentityPoolsResponse> instance
356              
357             Lists all of the Cognito identity pools registered for your account.
358              
359             You must use AWS Developer credentials to call this API.
360              
361              
362             =head2 LookupDeveloperIdentity(IdentityPoolId => Str, [DeveloperUserIdentifier => Str, IdentityId => Str, MaxResults => Int, NextToken => Str])
363              
364             Each argument is described in detail in: L<Paws::CognitoIdentity::LookupDeveloperIdentity>
365              
366             Returns: a L<Paws::CognitoIdentity::LookupDeveloperIdentityResponse> instance
367              
368             Retrieves the C<IdentityID> associated with a
369             C<DeveloperUserIdentifier> or the list of C<DeveloperUserIdentifier>s
370             associated with an C<IdentityId> for an existing identity. Either
371             C<IdentityID> or C<DeveloperUserIdentifier> must not be null. If you
372             supply only one of these values, the other value will be searched in
373             the database and returned as a part of the response. If you supply
374             both, C<DeveloperUserIdentifier> will be matched against C<IdentityID>.
375             If the values are verified against the database, the response returns
376             both values and is the same as the request. Otherwise a
377             C<ResourceConflictException> is thrown.
378              
379             You must use AWS Developer credentials to call this API.
380              
381              
382             =head2 MergeDeveloperIdentities(DestinationUserIdentifier => Str, DeveloperProviderName => Str, IdentityPoolId => Str, SourceUserIdentifier => Str)
383              
384             Each argument is described in detail in: L<Paws::CognitoIdentity::MergeDeveloperIdentities>
385              
386             Returns: a L<Paws::CognitoIdentity::MergeDeveloperIdentitiesResponse> instance
387              
388             Merges two users having different C<IdentityId>s, existing in the same
389             identity pool, and identified by the same developer provider. You can
390             use this action to request that discrete users be merged and identified
391             as a single user in the Cognito environment. Cognito associates the
392             given source user (C<SourceUserIdentifier>) with the C<IdentityId> of
393             the C<DestinationUserIdentifier>. Only developer-authenticated users
394             can be merged. If the users to be merged are associated with the same
395             public provider, but as two different users, an exception will be
396             thrown.
397              
398             You must use AWS Developer credentials to call this API.
399              
400              
401             =head2 SetIdentityPoolRoles(IdentityPoolId => Str, Roles => L<Paws::CognitoIdentity::RolesMap>, [RoleMappings => L<Paws::CognitoIdentity::RoleMappingMap>])
402              
403             Each argument is described in detail in: L<Paws::CognitoIdentity::SetIdentityPoolRoles>
404              
405             Returns: nothing
406              
407             Sets the roles for an identity pool. These roles are used when making
408             calls to GetCredentialsForIdentity action.
409              
410             You must use AWS Developer credentials to call this API.
411              
412              
413             =head2 UnlinkDeveloperIdentity(DeveloperProviderName => Str, DeveloperUserIdentifier => Str, IdentityId => Str, IdentityPoolId => Str)
414              
415             Each argument is described in detail in: L<Paws::CognitoIdentity::UnlinkDeveloperIdentity>
416              
417             Returns: nothing
418              
419             Unlinks a C<DeveloperUserIdentifier> from an existing identity.
420             Unlinked developer users will be considered new identities next time
421             they are seen. If, for a given Cognito identity, you remove all
422             federated identities as well as the developer user identifier, the
423             Cognito identity becomes inaccessible.
424              
425             You must use AWS Developer credentials to call this API.
426              
427              
428             =head2 UnlinkIdentity(IdentityId => Str, Logins => L<Paws::CognitoIdentity::LoginsMap>, LoginsToRemove => ArrayRef[Str|Undef])
429              
430             Each argument is described in detail in: L<Paws::CognitoIdentity::UnlinkIdentity>
431              
432             Returns: nothing
433              
434             Unlinks a federated identity from an existing account. Unlinked logins
435             will be considered new identities next time they are seen. Removing the
436             last linked login will make this identity inaccessible.
437              
438             This is a public API. You do not need any credentials to call this API.
439              
440              
441             =head2 UpdateIdentityPool(AllowUnauthenticatedIdentities => Bool, IdentityPoolId => Str, IdentityPoolName => Str, [CognitoIdentityProviders => ArrayRef[L<Paws::CognitoIdentity::CognitoIdentityProvider>], DeveloperProviderName => Str, OpenIdConnectProviderARNs => ArrayRef[Str|Undef], SamlProviderARNs => ArrayRef[Str|Undef], SupportedLoginProviders => L<Paws::CognitoIdentity::IdentityProviders>])
442              
443             Each argument is described in detail in: L<Paws::CognitoIdentity::UpdateIdentityPool>
444              
445             Returns: a L<Paws::CognitoIdentity::IdentityPool> instance
446              
447             Updates a user pool.
448              
449             You must use AWS Developer credentials to call this API.
450              
451              
452              
453              
454             =head1 PAGINATORS
455              
456             Paginator methods are helpers that repetively call methods that return partial results
457              
458              
459              
460              
461             =head1 SEE ALSO
462              
463             This service class forms part of L<Paws>
464              
465             =head1 BUGS and CONTRIBUTIONS
466              
467             The source code is located here: https://github.com/pplu/aws-sdk-perl
468              
469             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
470              
471             =cut
472