• 沒有找到結果。

Sample Response

X- AMZ-DATE: 20140804T193802Z

"IdentityPoolId": "us-east-1:0248e249-21e7-495a-9dd5-b2444EXAMPLE", "IdentityPoolName": "MyIdentityPool1"

}, {

"IdentityPoolId": "us-east-1:04507bc2-9e14-4d1b-8cbf-b6f51EXAMPLE", "IdentityPoolName": "MyIdentityPool2"

}, {

"IdentityPoolId": "us-east-1:177a950c-2c08-43f0-9983-28727EXAMPLE", "IdentityPoolName": "MyIdentityPool3"li

}],

"NextToken": "dXMtZWFzdC0xOjE3N2E5NTBjLTJjMDgtNDNmMC05OTgzLTI4NzI3YjQ0N2Y4MA=="

}

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

See Also

ListTagsForResource

ListTagsForResource

Lists the tags that are assigned to an Amazon Cognito identity pool.

A tag is a label that you can apply to identity pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.

You can use this action up to 10 times per second, per account.

Request Syntax

{

"ResourceArn": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 93).

The request accepts the following data in JSON format.

ResourceArn (p. 52)

The Amazon Resource Name (ARN) of the identity pool that the tags are assigned to.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Required: Yes

Response Syntax

{ "Tags": {

"string" : "string"

}}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Tags (p. 52)

The tags that are assigned to the identity pool.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Errors

Errors

For information about the errors that are common to all actions, see Common Errors (p. 95).

InternalErrorException

Thrown when the service encounters an error during processing the request.

HTTP Status Code: 500 InvalidParameterException

Thrown for missing or bad input parameter(s).

HTTP Status Code: 400 NotAuthorizedException

Thrown when a user is not authorized to access the requested resource.

HTTP Status Code: 400 ResourceNotFoundException

Thrown when the requested resource (for example, a dataset or record) does not exist.

HTTP Status Code: 400 TooManyRequestsException

Thrown when a request is throttled.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

LookupDeveloperIdentity

LookupDeveloperIdentity

Retrieves the IdentityID associated with a DeveloperUserIdentifier or the list of

DeveloperUserIdentifier values associated with an IdentityId for an existing identity. Either IdentityID or DeveloperUserIdentifier must not be null. If you supply only one of these values, the other value will be searched in the database and returned as a part of the response. If you supply both, DeveloperUserIdentifier will be matched against IdentityID. If the values are verified against the database, the response returns both values and is the same as the request. Otherwise a ResourceConflictException is thrown.

LookupDeveloperIdentity is intended for low-throughput control plane operations: for example, to enable customer service to locate an identity ID by username. If you are using it for higher-volume operations such as user authentication, your requests are likely to be throttled.

GetOpenIdTokenForDeveloperIdentity (p. 37) is a better option for higher-volume operations for user authentication.

You must use AWS developer credentials to call this operation.

Request Syntax

{

"DeveloperUserIdentifier": "string", "IdentityId": "string",

"IdentityPoolId": "string", "MaxResults": number, "NextToken": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 93).

The request accepts the following data in JSON format.

DeveloperUserIdentifier (p. 54)

A unique ID used by your backend authentication process to identify a user. Typically, a developer identity provider would issue many developer user identifiers, in keeping with the number of users.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: No IdentityId (p. 54)

A unique identifier in the format REGION:GUID.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 55.

Pattern: [\w-]+:[0-9a-f-]+

Required: No

Response Syntax

IdentityPoolId (p. 54)

An identity pool ID in the format REGION:GUID.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 55.

Pattern: [\w-]+:[0-9a-f-]+

Required: Yes MaxResults (p. 54)

The maximum number of identities to return.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 60.

Required: No NextToken (p. 54)

A pagination token. The first call you make will have NextToken set to null. After that the service will return NextToken values as needed. For example, let's say you make a request with MaxResults set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.

Type: String

Length Constraints: Minimum length of 1.

Pattern: [\S]+

Required: No

Response Syntax

{ "DeveloperUserIdentifierList": [ "string" ], "IdentityId": "string",

"NextToken": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

DeveloperUserIdentifierList (p. 55)

This is the list of developer user identifiers associated with an identity ID. Cognito supports the association of multiple developer user identifiers with an identity ID.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 1024.

Errors

IdentityId (p. 55)

A unique identifier in the format REGION:GUID.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 55.

Pattern: [\w-]+:[0-9a-f-]+

NextToken (p. 55)

A pagination token. The first call you make will have NextToken set to null. After that the service will return NextToken values as needed. For example, let's say you make a request with MaxResults set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.

Type: String

Length Constraints: Minimum length of 1.

Pattern: [\S]+

Errors

For information about the errors that are common to all actions, see Common Errors (p. 95).

InternalErrorException

Thrown when the service encounters an error during processing the request.

HTTP Status Code: 500 InvalidParameterException

Thrown for missing or bad input parameter(s).

HTTP Status Code: 400 NotAuthorizedException

Thrown when a user is not authorized to access the requested resource.

HTTP Status Code: 400 ResourceConflictException

Thrown when a user tries to use a login which is already linked to another account.

HTTP Status Code: 400 ResourceNotFoundException

Thrown when the requested resource (for example, a dataset or record) does not exist.

HTTP Status Code: 400 TooManyRequestsException

Thrown when a request is throttled.

HTTP Status Code: 400

See Also

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

MergeDeveloperIdentities

MergeDeveloperIdentities

Merges two users having different IdentityIds, existing in the same identity pool, and identified by the same developer provider. You can use this action to request that discrete users be merged and identified as a single user in the Cognito environment. Cognito associates the given source user (SourceUserIdentifier) with the IdentityId of the DestinationUserIdentifier. Only developer-authenticated users can be merged. If the users to be merged are associated with the same public provider, but as two different users, an exception will be thrown.

The number of linked logins is limited to 20. So, the number of linked logins for the source user, SourceUserIdentifier, and the destination user, DestinationUserIdentifier, together should not be larger than 20. Otherwise, an exception will be thrown.

You must use AWS developer credentials to call this operation.

Request Syntax

{ "DestinationUserIdentifier": "string", "DeveloperProviderName": "string", "IdentityPoolId": "string",

"SourceUserIdentifier": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 93).

The request accepts the following data in JSON format.

DestinationUserIdentifier (p. 58)

User identifier for the destination user. The value should be a DeveloperUserIdentifier.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: Yes

DeveloperProviderName (p. 58)

The "domain" by which Cognito will refer to your users. This is a (pseudo) domain name that you provide while creating an identity pool. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the

DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [\w._-]+

Required: Yes IdentityPoolId (p. 58)

An identity pool ID in the format REGION:GUID.

Response Syntax

Type: String

Length Constraints: Minimum length of 1. Maximum length of 55.

Pattern: [\w-]+:[0-9a-f-]+

Required: Yes

SourceUserIdentifier (p. 58)

User identifier for the source user. The value should be a DeveloperUserIdentifier.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: Yes

Response Syntax

{

"IdentityId": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

IdentityId (p. 59)

A unique identifier in the format REGION:GUID.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 55.

Pattern: [\w-]+:[0-9a-f-]+

Errors

For information about the errors that are common to all actions, see Common Errors (p. 95).

InternalErrorException

Thrown when the service encounters an error during processing the request.

HTTP Status Code: 500 InvalidParameterException

Thrown for missing or bad input parameter(s).

HTTP Status Code: 400 NotAuthorizedException

Thrown when a user is not authorized to access the requested resource.

See Also

HTTP Status Code: 400 ResourceConflictException

Thrown when a user tries to use a login which is already linked to another account.

HTTP Status Code: 400 ResourceNotFoundException

Thrown when the requested resource (for example, a dataset or record) does not exist.

HTTP Status Code: 400 TooManyRequestsException

Thrown when a request is throttled.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

SetIdentityPoolRoles

SetIdentityPoolRoles

Sets the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity (p. 22) action.

You must use AWS developer credentials to call this operation.

Request Syntax

{

"IdentityPoolId": "string", "RoleMappings": {

"string" : {

"AmbiguousRoleResolution": "string", "RulesConfiguration": {

For information about the parameters that are common to all actions, see Common Parameters (p. 93).

The request accepts the following data in JSON format.

IdentityPoolId (p. 61)

An identity pool ID in the format REGION:GUID.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 55.

Pattern: [\w-]+:[0-9a-f-]+

Required: Yes RoleMappings (p. 61)

How users for a specific identity provider are to mapped to roles. This is a string to RoleMapping (p. 90) object map. The string identifies the identity provider, for

example, graph.facebook.com or cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id.

Up to 25 rules can be specified per identity provider.

Response Elements

Type: String to RoleMapping (p. 90) object map Map Entries: Maximum number of 10 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Required: No Roles (p. 61)

The map of roles associated with this pool. For a given role, the key will be either "authenticated" or

"unauthenticated" and the value will be the Role ARN.

Type: String to string map

Map Entries: Maximum number of 2 items.

Key Pattern: (un)?authenticated

Value Length Constraints: Minimum length of 20. Maximum length of 2048.

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 95).

ConcurrentModificationException

Thrown if there are parallel requests to modify a resource.

HTTP Status Code: 400 InternalErrorException

Thrown when the service encounters an error during processing the request.

HTTP Status Code: 500 InvalidParameterException

Thrown for missing or bad input parameter(s).

HTTP Status Code: 400 NotAuthorizedException

Thrown when a user is not authorized to access the requested resource.

HTTP Status Code: 400 ResourceConflictException

Thrown when a user tries to use a login which is already linked to another account.

HTTP Status Code: 400 ResourceNotFoundException

Thrown when the requested resource (for example, a dataset or record) does not exist.

See Also

HTTP Status Code: 400 TooManyRequestsException

Thrown when a request is throttled.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

SetPrincipalTagAttributeMap

SetPrincipalTagAttributeMap

You can use this operation to use default (username and clientID) attribute or custom attribute mappings.

Request Syntax

{ "IdentityPoolId": "string", "IdentityProviderName": "string", "PrincipalTags": {

"string" : "string"

},

"UseDefaults": boolean }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 93).

The request accepts the following data in JSON format.

IdentityPoolId (p. 64)

The ID of the Identity Pool you want to set attribute mappings for.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 55.

Pattern: [\w-]+:[0-9a-f-]+

Required: Yes

IdentityProviderName (p. 64)

The provider name you want to use for attribute mappings.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Required: Yes PrincipalTags (p. 64)

You can use this operation to add principal tags.

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Value Length Constraints: Minimum length of 1. Maximum length of 256.

Required: No

Response Syntax

UseDefaults (p. 64)

You can use this operation to use default (username and clientID) attribute mappings.

Type: Boolean Required: No

Response Syntax

{ "IdentityPoolId": "string", "IdentityProviderName": "string", "PrincipalTags": {

"string" : "string"

},

"UseDefaults": boolean }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

IdentityPoolId (p. 65)

The ID of the Identity Pool you want to set attribute mappings for.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 55.

Pattern: [\w-]+:[0-9a-f-]+

IdentityProviderName (p. 65)

The provider name you want to use for attribute mappings.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

PrincipalTags (p. 65)

You can use this operation to add principal tags. The PrincipalTagsoperation enables you to reference user attributes in your IAM permissions policy.

Type: String to string map

Map Entries: Maximum number of 50 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Value Length Constraints: Minimum length of 1. Maximum length of 256.

UseDefaults (p. 65)

You can use this operation to select default (username and clientID) attribute mappings.

Type: Boolean

Errors

Errors

For information about the errors that are common to all actions, see Common Errors (p. 95).

InternalErrorException

Thrown when the service encounters an error during processing the request.

HTTP Status Code: 500 InvalidParameterException

Thrown for missing or bad input parameter(s).

HTTP Status Code: 400 NotAuthorizedException

Thrown when a user is not authorized to access the requested resource.

HTTP Status Code: 400 ResourceNotFoundException

Thrown when the requested resource (for example, a dataset or record) does not exist.

HTTP Status Code: 400 TooManyRequestsException

Thrown when a request is throttled.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

TagResource

TagResource

Assigns a set of tags to the specified Amazon Cognito identity pool. A tag is a label that you can use to categorize and manage identity pools in different ways, such as by purpose, owner, environment, or other criteria.

Each tag consists of a key and value, both of which you define. A key is a general category for more specific values. For example, if you have two versions of an identity pool, one for testing and another for production, you might assign an Environment tag key to both identity pools. The value of this key might be Test for one identity pool and Production for the other.

Tags are useful for cost tracking and access control. You can activate your tags so that they appear on the Billing and Cost Management console, where you can track the costs associated with your identity pools.

In an IAM policy, you can constrain permissions for identity pools based on specific tags or tag values.

You can use this action up to 5 times per second, per account. An identity pool can have as many as 50 tags.

Request Syntax

{

"ResourceArn": "string", "Tags": {

"string" : "string"

}}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 93).

The request accepts the following data in JSON format.

ResourceArn (p. 67)

The Amazon Resource Name (ARN) of the identity pool.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Required: Yes Tags (p. 67)

The tags to assign to the identity pool.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

Errors

For information about the errors that are common to all actions, see Common Errors (p. 95).

InternalErrorException

Thrown when the service encounters an error during processing the request.

HTTP Status Code: 500 InvalidParameterException

Thrown for missing or bad input parameter(s).

HTTP Status Code: 400 NotAuthorizedException

Thrown when a user is not authorized to access the requested resource.

HTTP Status Code: 400 ResourceNotFoundException

Thrown when the requested resource (for example, a dataset or record) does not exist.

HTTP Status Code: 400 TooManyRequestsException

Thrown when a request is throttled.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

UnlinkDeveloperIdentity

UnlinkDeveloperIdentity

Unlinks a DeveloperUserIdentifier from an existing identity. Unlinked developer users will be considered new identities next time they are seen. If, for a given Cognito identity, you remove all federated identities as well as the developer user identifier, the Cognito identity becomes inaccessible.

You must use AWS developer credentials to call this operation.

Request Syntax

{ "DeveloperProviderName": "string", "DeveloperUserIdentifier": "string", "IdentityId": "string",

"IdentityPoolId": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 93).

The request accepts the following data in JSON format.

DeveloperProviderName (p. 69)

The "domain" by which Cognito will refer to your users.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [\w._-]+

Required: Yes

DeveloperUserIdentifier (p. 69)

A unique ID used by your backend authentication process to identify a user.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: Yes IdentityId (p. 69)

A unique identifier in the format REGION:GUID.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 55.

Pattern: [\w-]+:[0-9a-f-]+

Required: Yes IdentityPoolId (p. 69)

An identity pool ID in the format REGION:GUID.

Response Elements

Type: String

Length Constraints: Minimum length of 1. Maximum length of 55.

Pattern: [\w-]+:[0-9a-f-]+

Required: Yes

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

相關文件