openapi: 3.0.0
info:
version: 2014-06-30
x-release: v4
title: 'Amazon Cognito Identity #X Amz Target=AWSCognitoIdentityProviderService.AddCustomAttributes #X Amz Target=AWSCognitoIdentityProviderService.AddCustomAttributes #X Amz Target=AWSCognitoIdentityProviderService.AdminLinkProviderForUser API'
description:
Amazon Cognito Federated Identities is a web service that delivers scoped temporary credentials to mobile devices and other untrusted environments. It uniquely identifies a device and supplies the user with a consistent identity over the lifetime of an application.
Using Amazon Cognito Federated Identities, you can enable authentication with one or more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon Cognito user pool, and you can also choose to support unauthenticated access from your app. Cognito delivers a unique identifier for each user and acts as an OpenID token provider trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS credentials.
For a description of the authentication flow from the Amazon Cognito Developer Guide see Authentication Flow.
For more information see Amazon Cognito Federated Identities.
x-logo: url: https://api.apis.guru/v2/cache/logo/https_twitter.com_awscloud_profile_image.png backgroundColor: '#FFFFFF' termsOfService: https://aws.amazon.com/service-terms/ contact: name: Mike Ralphson email: mike.ralphson@gmail.com url: https://github.com/mermade/aws2openapi x-twitter: PermittedSoc license: name: Apache 2.0 License url: http://www.apache.org/licenses/ x-providerName: amazonaws.com x-serviceName: cognito-identity x-origin: - contentType: application/json url: https://raw.githubusercontent.com/aws/aws-sdk-js/master/apis/cognito-identity-2014-06-30.normal.json converter: url: https://github.com/mermade/aws2openapi version: 1.0.0 x-apisguru-driver: external x-apiClientRegistration: url: https://portal.aws.amazon.com/gp/aws/developer/registration/index.html?nc2=h_ct x-apisguru-categories: - cloud x-preferred: true servers: - url: http://cognito-identity.{region}.amazonaws.com variables: region: description: The AWS region enum: - us-east-1 - us-east-2 - us-west-1 - us-west-2 - us-gov-west-1 - us-gov-east-1 - ca-central-1 - eu-north-1 - eu-west-1 - eu-west-2 - eu-west-3 - eu-central-1 - eu-south-1 - af-south-1 - ap-northeast-1 - ap-northeast-2 - ap-northeast-3 - ap-southeast-1 - ap-southeast-2 - ap-east-1 - ap-south-1 - sa-east-1 - me-south-1 default: us-east-1 description: The Amazon Cognito Identity multi-region endpoint - url: https://cognito-identity.{region}.amazonaws.com variables: region: description: The AWS region enum: - us-east-1 - us-east-2 - us-west-1 - us-west-2 - us-gov-west-1 - us-gov-east-1 - ca-central-1 - eu-north-1 - eu-west-1 - eu-west-2 - eu-west-3 - eu-central-1 - eu-south-1 - af-south-1 - ap-northeast-1 - ap-northeast-2 - ap-northeast-3 - ap-southeast-1 - ap-southeast-2 - ap-east-1 - ap-south-1 - sa-east-1 - me-south-1 default: us-east-1 description: The Amazon Cognito Identity multi-region endpoint - url: http://cognito-identity.{region}.amazonaws.com.cn variables: region: description: The AWS region enum: - cn-north-1 - cn-northwest-1 default: cn-north-1 description: The Amazon Cognito Identity endpoint for China (Beijing) and China (Ningxia) - url: https://cognito-identity.{region}.amazonaws.com.cn variables: region: description: The AWS region enum: - cn-north-1 - cn-northwest-1 default: cn-north-1 description: The Amazon Cognito Identity endpoint for China (Beijing) and China (Ningxia) security: - hmac: [] tags: - name: '#X Amz Target=AWSCognitoIdentityProviderService.AdminLinkProviderForUser' paths: /#X-Amz-Target=AWSCognitoIdentityProviderService.AdminLinkProviderForUser: parameters: - $ref: '#/components/parameters/X-Amz-Content-Sha256' - $ref: '#/components/parameters/X-Amz-Date' - $ref: '#/components/parameters/X-Amz-Algorithm' - $ref: '#/components/parameters/X-Amz-Credential' - $ref: '#/components/parameters/X-Amz-Security-Token' - $ref: '#/components/parameters/X-Amz-Signature' - $ref: '#/components/parameters/X-Amz-SignedHeaders' post: operationId: AdminLinkProviderForUser description:Links an existing user account in a user pool (DestinationUser) to an identity from an external IdP (SourceUser) based on a specified attribute name and value from the external IdP. This allows you to create a link from the existing user account to an external federated user identity that has not yet been used to sign in. You can then use the federated user identity to sign in as the existing user account.
For example, if there is an existing user with a username and password, this API links that user to a federated user identity. When the user signs in with a federated user identity, they sign in as the existing user account.
The maximum number of federated identities linked to a user is five.
Because this API allows a user with an external federated identity to sign in as an existing user in the user pool, it is critical that it only be used with external IdPs and provider attributes that have been trusted by the application owner.
This action is administrative and requires developer credentials.
responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/AdminLinkProviderForUserResponse' '480': description: ResourceNotFoundException content: application/json: schema: $ref: '#/components/schemas/ResourceNotFoundException' examples: AdminLinkProviderForUser480Example: summary: Default AdminLinkProviderForUser 480 response x-microcks-default: true value: example '481': description: InvalidParameterException content: application/json: schema: $ref: '#/components/schemas/InvalidParameterException' examples: AdminLinkProviderForUser481Example: summary: Default AdminLinkProviderForUser 481 response x-microcks-default: true value: example '482': description: TooManyRequestsException content: application/json: schema: $ref: '#/components/schemas/TooManyRequestsException' examples: AdminLinkProviderForUser482Example: summary: Default AdminLinkProviderForUser 482 response x-microcks-default: true value: example '483': description: NotAuthorizedException content: application/json: schema: $ref: '#/components/schemas/NotAuthorizedException' examples: AdminLinkProviderForUser483Example: summary: Default AdminLinkProviderForUser 483 response x-microcks-default: true value: example '484': description: UserNotFoundException content: application/json: schema: $ref: '#/components/schemas/UserNotFoundException' examples: AdminLinkProviderForUser484Example: summary: Default AdminLinkProviderForUser 484 response x-microcks-default: true value: example '485': description: AliasExistsException content: application/json: schema: $ref: '#/components/schemas/AliasExistsException' examples: AdminLinkProviderForUser485Example: summary: Default AdminLinkProviderForUser 485 response x-microcks-default: true value: example '486': description: LimitExceededException content: application/json: schema: $ref: '#/components/schemas/LimitExceededException' examples: AdminLinkProviderForUser486Example: summary: Default AdminLinkProviderForUser 486 response x-microcks-default: true value: example '487': description: InternalErrorException content: application/json: schema: $ref: '#/components/schemas/InternalErrorException' examples: AdminLinkProviderForUser487Example: summary: Default AdminLinkProviderForUser 487 response x-microcks-default: true value: example requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AdminLinkProviderForUserRequest' examples: AdminLinkProviderForUserRequestExample: summary: Default AdminLinkProviderForUser request x-microcks-default: true value: UserPoolId: us-east-1_AbCdEfGhI DestinationUser: example-value SourceUser: example-value parameters: - name: X-Amz-Target in: header required: true schema: type: string enum: - AWSCognitoIdentityProviderService.AdminLinkProviderForUser summary: Amazon Cognito Admin Link Provider for User x-microcks-operation: delay: 0 dispatcher: FALLBACK tags: - '#X Amz Target=AWSCognitoIdentityProviderService.AdminLinkProviderForUser' components: schemas: ResourceNotFoundException: {} ProviderNameType: type: string pattern: '[\p{L}\p{M}\p{S}\p{N}\p{P}]+' minLength: 1 maxLength: 32 UserNotFoundException: {} InvalidParameterException: {} TooManyRequestsException: {} InternalErrorException: {} StringType: type: string LimitExceededException: {} NotAuthorizedException: {} AliasExistsException: {} ProviderUserIdentifierType: type: object properties: ProviderName: allOf: - $ref: '#/components/schemas/ProviderNameType' - description: The name of the provider, such as Facebook, Google, or Login with Amazon. ProviderAttributeName: allOf: - $ref: '#/components/schemas/StringType' - description: The name of the provider attribute to link to, such asNameID.
ProviderAttributeValue:
allOf:
- $ref: '#/components/schemas/StringType'
- description: The value of the provider attribute to link to, such as xxxxx_account.
description: A container for information about an IdP for a user pool.
AdminLinkProviderForUserRequest:
type: object
required:
- UserPoolId
- DestinationUser
- SourceUser
title: AdminLinkProviderForUserRequest
properties:
UserPoolId:
allOf:
- $ref: '#/components/schemas/StringType'
- description: The user pool ID for the user pool.
DestinationUser:
allOf:
- $ref: '#/components/schemas/ProviderUserIdentifierType'
- description: The existing user in the user pool that you want to assign to the external IdP user account. This user can be a native (Username + Password) Amazon Cognito user pools user or a federated user (for example, a SAML or Facebook user). If the user doesn't exist, Amazon Cognito generates an exception. Amazon Cognito returns this user when the new user (with the linked IdP attribute) signs in.
For a native username + password user, the ProviderAttributeValue for the DestinationUser should be the username in the user pool. For a federated user, it should be the provider-specific user_id.
The ProviderAttributeName of the DestinationUser is ignored.
The ProviderName should be set to Cognito for users in Cognito user pools.
All attributes in the DestinationUser profile must be mutable. If you have assigned the user any immutable custom attributes, the operation won't succeed.
An external IdP account for a user who doesn't exist yet in the user pool. This user must be a federated user (for example, a SAML or Facebook user), not another native user.
If the SourceUser is using a federated social IdP, such as Facebook, Google, or Login with Amazon, you must set the ProviderAttributeName to Cognito_Subject. For social IdPs, the ProviderName will be Facebook, Google, or LoginWithAmazon, and Amazon Cognito will automatically parse the Facebook, Google, and Login with Amazon tokens for id, sub, and user_id, respectively. The ProviderAttributeValue for the user must be the same value as the id, sub, or user_id value found in the social IdP token.
For SAML, the ProviderAttributeName can be any value that matches a claim in the SAML assertion. If you want to link SAML users based on the subject of the SAML assertion, you should map the subject to a claim through the SAML IdP and submit that claim name as the ProviderAttributeName. If you set ProviderAttributeName to Cognito_Subject, Amazon Cognito will automatically parse the default unique identifier found in the subject from the SAML token.