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.
+ +## Installing + +To install the this package, simply type add or install @aws-sdk/client-cognito-identity +using your favorite package manager: + +- `npm install @aws-sdk/client-cognito-identity` +- `yarn add @aws-sdk/client-cognito-identity` +- `pnpm add @aws-sdk/client-cognito-identity` + +## Getting Started + +### Import + +The AWS SDK is modulized by clients and commands. +To send a request, you only need to import the `CognitoIdentityClient` and +the commands you need, for example `ListIdentityPoolsCommand`: + +```js +// ES5 example +const { CognitoIdentityClient, ListIdentityPoolsCommand } = require("@aws-sdk/client-cognito-identity"); +``` + +```ts +// ES6+ example +import { CognitoIdentityClient, ListIdentityPoolsCommand } from "@aws-sdk/client-cognito-identity"; +``` + +### Usage + +To send a request, you: + +- Initiate client with configuration (e.g. credentials, region). +- Initiate command with input parameters. +- Call `send` operation on client with command object as input. +- If you are using a custom http handler, you may call `destroy()` to close open connections. + +```js +// a client can be shared by different commands. +const client = new CognitoIdentityClient({ region: "REGION" }); + +const params = { + /** input parameters */ +}; +const command = new ListIdentityPoolsCommand(params); +``` + +#### Async/await + +We recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) +operator to wait for the promise returned by send operation as follows: + +```js +// async/await. +try { + const data = await client.send(command); + // process data. +} catch (error) { + // error handling. +} finally { + // finally. +} +``` + +Async-await is clean, concise, intuitive, easy to debug and has better error handling +as compared to using Promise chains or callbacks. + +#### Promises + +You can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining) +to execute send operation. + +```js +client.send(command).then( + (data) => { + // process data. + }, + (error) => { + // error handling. + } +); +``` + +Promises can also be called using `.catch()` and `.finally()` as follows: + +```js +client + .send(command) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }) + .finally(() => { + // finally. + }); +``` + +#### Callbacks + +We do not recommend using callbacks because of [callback hell](http://callbackhell.com/), +but they are supported by the send operation. + +```js +// callbacks. +client.send(command, (err, data) => { + // process err and data. +}); +``` + +#### v2 compatible style + +The client can also send requests using v2 compatible style. +However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post +on [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/) + +```ts +import * as AWS from "@aws-sdk/client-cognito-identity"; +const client = new AWS.CognitoIdentity({ region: "REGION" }); + +// async/await. +try { + const data = await client.listIdentityPools(params); + // process data. +} catch (error) { + // error handling. +} + +// Promises. +client + .listIdentityPools(params) + .then((data) => { + // process data. + }) + .catch((error) => { + // error handling. + }); + +// callbacks. +client.listIdentityPools(params, (err, data) => { + // process err and data. +}); +``` + +### Troubleshooting + +When the service returns an exception, the error will include the exception information, +as well as response metadata (e.g. request id). + +```js +try { + const data = await client.send(command); + // process data. +} catch (error) { + const { requestId, cfId, extendedRequestId } = error.$$metadata; + console.log({ requestId, cfId, extendedRequestId }); + /** + * The keys within exceptions are also parsed. + * You can access them by specifying exception names: + * if (error.name === 'SomeServiceException') { + * const value = error.specialKeyInException; + * } + */ +} +``` + +## Getting Help + +Please use these community resources for getting help. +We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them. + +- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html) + or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html). +- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/) + on AWS Developer Blog. +- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`. +- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3). +- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose). + +To test your universal JavaScript code in Node.js, browser and react-native environments, +visit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests). + +## Contributing + +This client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-cognito-identity` package is updated. +To contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients). + +## License + +This SDK is distributed under the +[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), +see LICENSE for more information. + +## Client Commands (Operations List) + +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.
+ */ +export declare class CognitoIdentity extends CognitoIdentityClient implements CognitoIdentity { +} diff --git a/node_modules/@aws-sdk/client-cognito-identity/dist-types/CognitoIdentityClient.d.ts b/node_modules/@aws-sdk/client-cognito-identity/dist-types/CognitoIdentityClient.d.ts new file mode 100644 index 0000000..ad34ffc --- /dev/null +++ b/node_modules/@aws-sdk/client-cognito-identity/dist-types/CognitoIdentityClient.d.ts @@ -0,0 +1,205 @@ +import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header"; +import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing"; +import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent"; +import { Credentials as __Credentials } from "@aws-sdk/types"; +import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver"; +import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint"; +import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry"; +import { HttpHandler as __HttpHandler } from "@smithy/protocol-http"; +import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client"; +import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types"; +import { CreateIdentityPoolCommandInput, CreateIdentityPoolCommandOutput } from "./commands/CreateIdentityPoolCommand"; +import { DeleteIdentitiesCommandInput, DeleteIdentitiesCommandOutput } from "./commands/DeleteIdentitiesCommand"; +import { DeleteIdentityPoolCommandInput, DeleteIdentityPoolCommandOutput } from "./commands/DeleteIdentityPoolCommand"; +import { DescribeIdentityCommandInput, DescribeIdentityCommandOutput } from "./commands/DescribeIdentityCommand"; +import { DescribeIdentityPoolCommandInput, DescribeIdentityPoolCommandOutput } from "./commands/DescribeIdentityPoolCommand"; +import { GetCredentialsForIdentityCommandInput, GetCredentialsForIdentityCommandOutput } from "./commands/GetCredentialsForIdentityCommand"; +import { GetIdCommandInput, GetIdCommandOutput } from "./commands/GetIdCommand"; +import { GetIdentityPoolRolesCommandInput, GetIdentityPoolRolesCommandOutput } from "./commands/GetIdentityPoolRolesCommand"; +import { GetOpenIdTokenCommandInput, GetOpenIdTokenCommandOutput } from "./commands/GetOpenIdTokenCommand"; +import { GetOpenIdTokenForDeveloperIdentityCommandInput, GetOpenIdTokenForDeveloperIdentityCommandOutput } from "./commands/GetOpenIdTokenForDeveloperIdentityCommand"; +import { GetPrincipalTagAttributeMapCommandInput, GetPrincipalTagAttributeMapCommandOutput } from "./commands/GetPrincipalTagAttributeMapCommand"; +import { ListIdentitiesCommandInput, ListIdentitiesCommandOutput } from "./commands/ListIdentitiesCommand"; +import { ListIdentityPoolsCommandInput, ListIdentityPoolsCommandOutput } from "./commands/ListIdentityPoolsCommand"; +import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand"; +import { LookupDeveloperIdentityCommandInput, LookupDeveloperIdentityCommandOutput } from "./commands/LookupDeveloperIdentityCommand"; +import { MergeDeveloperIdentitiesCommandInput, MergeDeveloperIdentitiesCommandOutput } from "./commands/MergeDeveloperIdentitiesCommand"; +import { SetIdentityPoolRolesCommandInput, SetIdentityPoolRolesCommandOutput } from "./commands/SetIdentityPoolRolesCommand"; +import { SetPrincipalTagAttributeMapCommandInput, SetPrincipalTagAttributeMapCommandOutput } from "./commands/SetPrincipalTagAttributeMapCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UnlinkDeveloperIdentityCommandInput, UnlinkDeveloperIdentityCommandOutput } from "./commands/UnlinkDeveloperIdentityCommand"; +import { UnlinkIdentityCommandInput, UnlinkIdentityCommandOutput } from "./commands/UnlinkIdentityCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; +import { UpdateIdentityPoolCommandInput, UpdateIdentityPoolCommandOutput } from "./commands/UpdateIdentityPoolCommand"; +import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters"; +import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions"; +export { __Client }; +/** + * @public + */ +export type ServiceInputTypes = CreateIdentityPoolCommandInput | DeleteIdentitiesCommandInput | DeleteIdentityPoolCommandInput | DescribeIdentityCommandInput | DescribeIdentityPoolCommandInput | GetCredentialsForIdentityCommandInput | GetIdCommandInput | GetIdentityPoolRolesCommandInput | GetOpenIdTokenCommandInput | GetOpenIdTokenForDeveloperIdentityCommandInput | GetPrincipalTagAttributeMapCommandInput | ListIdentitiesCommandInput | ListIdentityPoolsCommandInput | ListTagsForResourceCommandInput | LookupDeveloperIdentityCommandInput | MergeDeveloperIdentitiesCommandInput | SetIdentityPoolRolesCommandInput | SetPrincipalTagAttributeMapCommandInput | TagResourceCommandInput | UnlinkDeveloperIdentityCommandInput | UnlinkIdentityCommandInput | UntagResourceCommandInput | UpdateIdentityPoolCommandInput; +/** + * @public + */ +export type ServiceOutputTypes = CreateIdentityPoolCommandOutput | DeleteIdentitiesCommandOutput | DeleteIdentityPoolCommandOutput | DescribeIdentityCommandOutput | DescribeIdentityPoolCommandOutput | GetCredentialsForIdentityCommandOutput | GetIdCommandOutput | GetIdentityPoolRolesCommandOutput | GetOpenIdTokenCommandOutput | GetOpenIdTokenForDeveloperIdentityCommandOutput | GetPrincipalTagAttributeMapCommandOutput | ListIdentitiesCommandOutput | ListIdentityPoolsCommandOutput | ListTagsForResourceCommandOutput | LookupDeveloperIdentityCommandOutput | MergeDeveloperIdentitiesCommandOutput | SetIdentityPoolRolesCommandOutput | SetPrincipalTagAttributeMapCommandOutput | TagResourceCommandOutput | UnlinkDeveloperIdentityCommandOutput | UnlinkIdentityCommandOutput | UntagResourceCommandOutput | UpdateIdentityPoolCommandOutput; +/** + * @public + */ +export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + /** + * A constructor for a class implementing the {@link @smithy/types#ChecksumConstructor} interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + * @internal + */ + sha256?: __ChecksumConstructor | __HashConstructor; + /** + * The function that will be used to convert strings into HTTP endpoints. + * @internal + */ + urlParser?: __UrlParser; + /** + * A function that can calculate the length of a request body. + * @internal + */ + bodyLengthChecker?: __BodyLengthCalculator; + /** + * A function that converts a stream into an array of bytes. + * @internal + */ + streamCollector?: __StreamCollector; + /** + * The function that will be used to convert a base64-encoded string to a byte array. + * @internal + */ + base64Decoder?: __Decoder; + /** + * The function that will be used to convert binary data to a base64-encoded string. + * @internal + */ + base64Encoder?: __Encoder; + /** + * The function that will be used to convert a UTF8-encoded string to a byte array. + * @internal + */ + utf8Decoder?: __Decoder; + /** + * The function that will be used to convert binary data to a UTF-8 encoded string. + * @internal + */ + utf8Encoder?: __Encoder; + /** + * The runtime environment. + * @internal + */ + runtime?: string; + /** + * Disable dynamically changing the endpoint of the client based on the hostPrefix + * trait of an operation. + */ + disableHostPrefix?: boolean; + /** + * Unique service identifier. + * @internal + */ + serviceId?: string; + /** + * Enables IPv6/IPv4 dualstack endpoint. + */ + useDualstackEndpoint?: boolean | __ProviderAmazon 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.
+ */ +export declare class CognitoIdentityClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, CognitoIdentityClientResolvedConfig> { + /** + * The resolved configuration of CognitoIdentityClient class. This is resolved and normalized from the {@link CognitoIdentityClientConfig | constructor configuration interface}. + */ + readonly config: CognitoIdentityClientResolvedConfig; + constructor(...[configuration]: __CheckOptionalClientConfigCreates a new identity pool. The identity pool is a store of user identity
+ * information that is specific to your AWS account. The keys for SupportedLoginProviders
are as follows:
Facebook: graph.facebook.com
+ *
Google: accounts.google.com
+ *
Amazon: www.amazon.com
+ *
Twitter: api.twitter.com
+ *
Digits: www.digits.com
+ *
You must use AWS Developer credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, CreateIdentityPoolCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, CreateIdentityPoolCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // CreateIdentityPoolInput + * IdentityPoolName: "STRING_VALUE", // required + * AllowUnauthenticatedIdentities: true || false, // required + * AllowClassicFlow: true || false, + * SupportedLoginProviders: { // IdentityProviders + * "Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link LimitExceededException} (client fault) + *Thrown when the total number of user pools has exceeded a preset limit.
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceConflictException} (client fault) + *Thrown when a user tries to use a login which is already linked to another + * account.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class CreateIdentityPoolCommand extends $CommandDeletes identities from an identity pool. You can specify a list of 1-60 identities + * that you want to delete.
+ *You must use AWS Developer credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, DeleteIdentitiesCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, DeleteIdentitiesCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // DeleteIdentitiesInput + * IdentityIdsToDelete: [ // IdentityIdList // required + * "STRING_VALUE", + * ], + * }; + * const command = new DeleteIdentitiesCommand(input); + * const response = await client.send(command); + * // { // DeleteIdentitiesResponse + * // UnprocessedIdentityIds: [ // UnprocessedIdentityIdList + * // { // UnprocessedIdentityId + * // IdentityId: "STRING_VALUE", + * // ErrorCode: "AccessDenied" || "InternalServerError", + * // }, + * // ], + * // }; + * + * ``` + * + * @param DeleteIdentitiesCommandInput - {@link DeleteIdentitiesCommandInput} + * @returns {@link DeleteIdentitiesCommandOutput} + * @see {@link DeleteIdentitiesCommandInput} for command's `input` shape. + * @see {@link DeleteIdentitiesCommandOutput} for command's `response` shape. + * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. + * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class DeleteIdentitiesCommand extends $CommandDeletes an identity pool. Once a pool is deleted, users will not be able to + * authenticate with the pool.
+ *You must use AWS Developer credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, DeleteIdentityPoolCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, DeleteIdentityPoolCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // DeleteIdentityPoolInput + * IdentityPoolId: "STRING_VALUE", // required + * }; + * const command = new DeleteIdentityPoolCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteIdentityPoolCommandInput - {@link DeleteIdentityPoolCommandInput} + * @returns {@link DeleteIdentityPoolCommandOutput} + * @see {@link DeleteIdentityPoolCommandInput} for command's `input` shape. + * @see {@link DeleteIdentityPoolCommandOutput} for command's `response` shape. + * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. + * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class DeleteIdentityPoolCommand extends $CommandReturns metadata related to the given identity, including when the identity was + * created and any associated linked logins.
+ *You must use AWS Developer credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, DescribeIdentityCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, DescribeIdentityCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // DescribeIdentityInput + * IdentityId: "STRING_VALUE", // required + * }; + * const command = new DescribeIdentityCommand(input); + * const response = await client.send(command); + * // { // IdentityDescription + * // IdentityId: "STRING_VALUE", + * // Logins: [ // LoginsList + * // "STRING_VALUE", + * // ], + * // CreationDate: new Date("TIMESTAMP"), + * // LastModifiedDate: new Date("TIMESTAMP"), + * // }; + * + * ``` + * + * @param DescribeIdentityCommandInput - {@link DescribeIdentityCommandInput} + * @returns {@link DescribeIdentityCommandOutput} + * @see {@link DescribeIdentityCommandInput} for command's `input` shape. + * @see {@link DescribeIdentityCommandOutput} for command's `response` shape. + * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. + * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class DescribeIdentityCommand extends $CommandGets details about a particular identity pool, including the pool name, ID + * description, creation date, and current number of users.
+ *You must use AWS Developer credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, DescribeIdentityPoolCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, DescribeIdentityPoolCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // DescribeIdentityPoolInput + * IdentityPoolId: "STRING_VALUE", // required + * }; + * const command = new DescribeIdentityPoolCommand(input); + * const response = await client.send(command); + * // { // IdentityPool + * // IdentityPoolId: "STRING_VALUE", // required + * // IdentityPoolName: "STRING_VALUE", // required + * // AllowUnauthenticatedIdentities: true || false, // required + * // AllowClassicFlow: true || false, + * // SupportedLoginProviders: { // IdentityProviders + * // "Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class DescribeIdentityPoolCommand extends $CommandReturns credentials for the provided identity ID. Any provided logins will be + * validated against supported login providers. If the token is for + * cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service + * with the appropriate role for the token.
+ *This is a public API. You do not need any credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, GetCredentialsForIdentityCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, GetCredentialsForIdentityCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // GetCredentialsForIdentityInput + * IdentityId: "STRING_VALUE", // required + * Logins: { // LoginsMap + * "An exception thrown when a dependent service such as Facebook or Twitter is not + * responding
+ * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidIdentityPoolConfigurationException} (client fault) + *Thrown if the identity pool has no role associated for the given auth type + * (auth/unauth) or if the AssumeRole fails.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceConflictException} (client fault) + *Thrown when a user tries to use a login which is already linked to another + * account.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class GetCredentialsForIdentityCommand extends $CommandGenerates (or retrieves) a Cognito ID. Supplying multiple logins will create an + * implicit linked account.
+ *This is a public API. You do not need any credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, GetIdCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, GetIdCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // GetIdInput + * AccountId: "STRING_VALUE", + * IdentityPoolId: "STRING_VALUE", // required + * Logins: { // LoginsMap + * "An exception thrown when a dependent service such as Facebook or Twitter is not + * responding
+ * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link LimitExceededException} (client fault) + *Thrown when the total number of user pools has exceeded a preset limit.
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceConflictException} (client fault) + *Thrown when a user tries to use a login which is already linked to another + * account.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class GetIdCommand extends $CommandGets the roles for an identity pool.
+ *You must use AWS Developer credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, GetIdentityPoolRolesCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, GetIdentityPoolRolesCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // GetIdentityPoolRolesInput + * IdentityPoolId: "STRING_VALUE", // required + * }; + * const command = new GetIdentityPoolRolesCommand(input); + * const response = await client.send(command); + * // { // GetIdentityPoolRolesResponse + * // IdentityPoolId: "STRING_VALUE", + * // Roles: { // RolesMap + * // "Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceConflictException} (client fault) + *Thrown when a user tries to use a login which is already linked to another + * account.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class GetIdentityPoolRolesCommand extends $CommandGets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by + * GetId. You can optionally add additional logins for the identity. + * Supplying multiple logins creates an implicit link.
+ *The OpenID token is valid for 10 minutes.
+ *This is a public API. You do not need any credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, GetOpenIdTokenCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, GetOpenIdTokenCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // GetOpenIdTokenInput + * IdentityId: "STRING_VALUE", // required + * Logins: { // LoginsMap + * "An exception thrown when a dependent service such as Facebook or Twitter is not + * responding
+ * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceConflictException} (client fault) + *Thrown when a user tries to use a login which is already linked to another + * account.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class GetOpenIdTokenCommand extends $CommandRegisters (or retrieves) a Cognito IdentityId
and an OpenID Connect
+ * token for a user authenticated by your backend authentication process. Supplying multiple
+ * logins will create an implicit linked account. You can only specify one developer provider
+ * as part of the Logins
map, which is linked to the identity pool. The developer
+ * provider is the "domain" by which Cognito will refer to your users.
You can use GetOpenIdTokenForDeveloperIdentity
to create a new identity
+ * and to link new logins (that is, user credentials issued by a public provider or developer
+ * provider) to an existing identity. When you want to create a new identity, the
+ * IdentityId
should be null. When you want to associate a new login with an
+ * existing authenticated/unauthenticated identity, you can do so by providing the existing
+ * IdentityId
. This API will create the identity in the specified
+ * IdentityPoolId
.
You must use AWS Developer credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, GetOpenIdTokenForDeveloperIdentityCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, GetOpenIdTokenForDeveloperIdentityCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // GetOpenIdTokenForDeveloperIdentityInput + * IdentityPoolId: "STRING_VALUE", // required + * IdentityId: "STRING_VALUE", + * Logins: { // LoginsMap // required + * "The provided developer user identifier is already registered with Cognito under a + * different identity ID.
+ * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceConflictException} (client fault) + *Thrown when a user tries to use a login which is already linked to another + * account.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class GetOpenIdTokenForDeveloperIdentityCommand extends $CommandUse GetPrincipalTagAttributeMap
to list all mappings between PrincipalTags
and user attributes.
Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class GetPrincipalTagAttributeMapCommand extends $CommandLists the identities in an identity pool.
+ *You must use AWS Developer credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, ListIdentitiesCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, ListIdentitiesCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // ListIdentitiesInput + * IdentityPoolId: "STRING_VALUE", // required + * MaxResults: Number("int"), // required + * NextToken: "STRING_VALUE", + * HideDisabled: true || false, + * }; + * const command = new ListIdentitiesCommand(input); + * const response = await client.send(command); + * // { // ListIdentitiesResponse + * // IdentityPoolId: "STRING_VALUE", + * // Identities: [ // IdentitiesList + * // { // IdentityDescription + * // IdentityId: "STRING_VALUE", + * // Logins: [ // LoginsList + * // "STRING_VALUE", + * // ], + * // CreationDate: new Date("TIMESTAMP"), + * // LastModifiedDate: new Date("TIMESTAMP"), + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListIdentitiesCommandInput - {@link ListIdentitiesCommandInput} + * @returns {@link ListIdentitiesCommandOutput} + * @see {@link ListIdentitiesCommandInput} for command's `input` shape. + * @see {@link ListIdentitiesCommandOutput} for command's `response` shape. + * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. + * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class ListIdentitiesCommand extends $CommandLists all of the Cognito identity pools registered for your account.
+ *You must use AWS Developer credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, ListIdentityPoolsCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, ListIdentityPoolsCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // ListIdentityPoolsInput + * MaxResults: Number("int"), // required + * NextToken: "STRING_VALUE", + * }; + * const command = new ListIdentityPoolsCommand(input); + * const response = await client.send(command); + * // { // ListIdentityPoolsResponse + * // IdentityPools: [ // IdentityPoolsList + * // { // IdentityPoolShortDescription + * // IdentityPoolId: "STRING_VALUE", + * // IdentityPoolName: "STRING_VALUE", + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListIdentityPoolsCommandInput - {@link ListIdentityPoolsCommandInput} + * @returns {@link ListIdentityPoolsCommandOutput} + * @see {@link ListIdentityPoolsCommandInput} for command's `input` shape. + * @see {@link ListIdentityPoolsCommandOutput} for command's `response` shape. + * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. + * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class ListIdentityPoolsCommand extends $CommandLists 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.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, ListTagsForResourceCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, ListTagsForResourceCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // ListTagsForResourceInput + * ResourceArn: "STRING_VALUE", // required + * }; + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * // { // ListTagsForResourceResponse + * // Tags: { // IdentityPoolTagsType + * // "Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class ListTagsForResourceCommand extends $CommandRetrieves 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 is a
+ * better option for higher-volume operations for user authentication.
You must use AWS Developer credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, LookupDeveloperIdentityCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, LookupDeveloperIdentityCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // LookupDeveloperIdentityInput + * IdentityPoolId: "STRING_VALUE", // required + * IdentityId: "STRING_VALUE", + * DeveloperUserIdentifier: "STRING_VALUE", + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * }; + * const command = new LookupDeveloperIdentityCommand(input); + * const response = await client.send(command); + * // { // LookupDeveloperIdentityResponse + * // IdentityId: "STRING_VALUE", + * // DeveloperUserIdentifierList: [ // DeveloperUserIdentifierList + * // "STRING_VALUE", + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param LookupDeveloperIdentityCommandInput - {@link LookupDeveloperIdentityCommandInput} + * @returns {@link LookupDeveloperIdentityCommandOutput} + * @see {@link LookupDeveloperIdentityCommandInput} for command's `input` shape. + * @see {@link LookupDeveloperIdentityCommandOutput} for command's `response` shape. + * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. + * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceConflictException} (client fault) + *Thrown when a user tries to use a login which is already linked to another + * account.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class LookupDeveloperIdentityCommand extends $CommandMerges two users having different IdentityId
s, 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 API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, MergeDeveloperIdentitiesCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, MergeDeveloperIdentitiesCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // MergeDeveloperIdentitiesInput + * SourceUserIdentifier: "STRING_VALUE", // required + * DestinationUserIdentifier: "STRING_VALUE", // required + * DeveloperProviderName: "STRING_VALUE", // required + * IdentityPoolId: "STRING_VALUE", // required + * }; + * const command = new MergeDeveloperIdentitiesCommand(input); + * const response = await client.send(command); + * // { // MergeDeveloperIdentitiesResponse + * // IdentityId: "STRING_VALUE", + * // }; + * + * ``` + * + * @param MergeDeveloperIdentitiesCommandInput - {@link MergeDeveloperIdentitiesCommandInput} + * @returns {@link MergeDeveloperIdentitiesCommandOutput} + * @see {@link MergeDeveloperIdentitiesCommandInput} for command's `input` shape. + * @see {@link MergeDeveloperIdentitiesCommandOutput} for command's `response` shape. + * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. + * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceConflictException} (client fault) + *Thrown when a user tries to use a login which is already linked to another + * account.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class MergeDeveloperIdentitiesCommand extends $CommandSets the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity action.
+ *You must use AWS Developer credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, SetIdentityPoolRolesCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, SetIdentityPoolRolesCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // SetIdentityPoolRolesInput + * IdentityPoolId: "STRING_VALUE", // required + * Roles: { // RolesMap // required + * "Thrown if there are parallel requests to modify a resource.
+ * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceConflictException} (client fault) + *Thrown when a user tries to use a login which is already linked to another + * account.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class SetIdentityPoolRolesCommand extends $CommandYou can use this operation to use default (username and clientID) attribute or custom attribute mappings.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, SetPrincipalTagAttributeMapCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, SetPrincipalTagAttributeMapCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // SetPrincipalTagAttributeMapInput + * IdentityPoolId: "STRING_VALUE", // required + * IdentityProviderName: "STRING_VALUE", // required + * UseDefaults: true || false, + * PrincipalTags: { // PrincipalTags + * "Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class SetPrincipalTagAttributeMapCommand extends $CommandAssigns 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.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, TagResourceCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, TagResourceCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // TagResourceInput + * ResourceArn: "STRING_VALUE", // required + * Tags: { // IdentityPoolTagsType // required + * "Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class TagResourceCommand extends $CommandUnlinks 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 API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, UnlinkDeveloperIdentityCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, UnlinkDeveloperIdentityCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // UnlinkDeveloperIdentityInput + * IdentityId: "STRING_VALUE", // required + * IdentityPoolId: "STRING_VALUE", // required + * DeveloperProviderName: "STRING_VALUE", // required + * DeveloperUserIdentifier: "STRING_VALUE", // required + * }; + * const command = new UnlinkDeveloperIdentityCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UnlinkDeveloperIdentityCommandInput - {@link UnlinkDeveloperIdentityCommandInput} + * @returns {@link UnlinkDeveloperIdentityCommandOutput} + * @see {@link UnlinkDeveloperIdentityCommandInput} for command's `input` shape. + * @see {@link UnlinkDeveloperIdentityCommandOutput} for command's `response` shape. + * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. + * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceConflictException} (client fault) + *Thrown when a user tries to use a login which is already linked to another + * account.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class UnlinkDeveloperIdentityCommand extends $CommandUnlinks a federated identity from an existing account. Unlinked logins will be + * considered new identities next time they are seen. Removing the last linked login will make + * this identity inaccessible.
+ *This is a public API. You do not need any credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, UnlinkIdentityCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, UnlinkIdentityCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // UnlinkIdentityInput + * IdentityId: "STRING_VALUE", // required + * Logins: { // LoginsMap // required + * "An exception thrown when a dependent service such as Facebook or Twitter is not + * responding
+ * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceConflictException} (client fault) + *Thrown when a user tries to use a login which is already linked to another + * account.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class UnlinkIdentityCommand extends $CommandRemoves the specified tags from the specified Amazon Cognito identity pool. You can use + * this action up to 5 times per second, per account
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, UntagResourceCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, UntagResourceCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // UntagResourceInput + * ResourceArn: "STRING_VALUE", // required + * TagKeys: [ // IdentityPoolTagsListType // required + * "STRING_VALUE", + * ], + * }; + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UntagResourceCommandInput - {@link UntagResourceCommandInput} + * @returns {@link UntagResourceCommandOutput} + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} for command's `response` shape. + * @see {@link CognitoIdentityClientResolvedConfig | config} for CognitoIdentityClient's `config` shape. + * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class UntagResourceCommand extends $CommandUpdates an identity pool.
+ *You must use AWS Developer credentials to call this API.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CognitoIdentityClient, UpdateIdentityPoolCommand } from "@aws-sdk/client-cognito-identity"; // ES Modules import + * // const { CognitoIdentityClient, UpdateIdentityPoolCommand } = require("@aws-sdk/client-cognito-identity"); // CommonJS import + * const client = new CognitoIdentityClient(config); + * const input = { // IdentityPool + * IdentityPoolId: "STRING_VALUE", // required + * IdentityPoolName: "STRING_VALUE", // required + * AllowUnauthenticatedIdentities: true || false, // required + * AllowClassicFlow: true || false, + * SupportedLoginProviders: { // IdentityProviders + * "Thrown if there are parallel requests to modify a resource.
+ * + * @throws {@link InternalErrorException} (server fault) + *Thrown when the service encounters an error during processing the request.
+ * + * @throws {@link InvalidParameterException} (client fault) + *Thrown for missing or bad input parameter(s).
+ * + * @throws {@link LimitExceededException} (client fault) + *Thrown when the total number of user pools has exceeded a preset limit.
+ * + * @throws {@link NotAuthorizedException} (client fault) + *Thrown when a user is not authorized to access the requested resource.
+ * + * @throws {@link ResourceConflictException} (client fault) + *Thrown when a user tries to use a login which is already linked to another + * account.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ * + * @throws {@link TooManyRequestsException} (client fault) + *Thrown when a request is throttled.
+ * + * @throws {@link CognitoIdentityServiceException} + *Base exception class for all service exceptions from CognitoIdentity service.
+ * + */ +export declare class UpdateIdentityPoolCommand extends $CommandAmazon 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.
+ * + * @packageDocumentation + */ +export * from "./CognitoIdentityClient"; +export * from "./CognitoIdentity"; +export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters"; +export * from "./commands"; +export * from "./pagination"; +export * from "./models"; +export { CognitoIdentityServiceException } from "./models/CognitoIdentityServiceException"; diff --git a/node_modules/@aws-sdk/client-cognito-identity/dist-types/models/CognitoIdentityServiceException.d.ts b/node_modules/@aws-sdk/client-cognito-identity/dist-types/models/CognitoIdentityServiceException.d.ts new file mode 100644 index 0000000..0eede76 --- /dev/null +++ b/node_modules/@aws-sdk/client-cognito-identity/dist-types/models/CognitoIdentityServiceException.d.ts @@ -0,0 +1,13 @@ +import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@smithy/smithy-client"; +export { __ServiceException, __ServiceExceptionOptions }; +/** + * @public + * + * Base exception class for all service exceptions from CognitoIdentity service. + */ +export declare class CognitoIdentityServiceException extends __ServiceException { + /** + * @internal + */ + constructor(options: __ServiceExceptionOptions); +} diff --git a/node_modules/@aws-sdk/client-cognito-identity/dist-types/models/index.d.ts b/node_modules/@aws-sdk/client-cognito-identity/dist-types/models/index.d.ts new file mode 100644 index 0000000..09c5d6e --- /dev/null +++ b/node_modules/@aws-sdk/client-cognito-identity/dist-types/models/index.d.ts @@ -0,0 +1 @@ +export * from "./models_0"; diff --git a/node_modules/@aws-sdk/client-cognito-identity/dist-types/models/models_0.d.ts b/node_modules/@aws-sdk/client-cognito-identity/dist-types/models/models_0.d.ts new file mode 100644 index 0000000..61674a0 --- /dev/null +++ b/node_modules/@aws-sdk/client-cognito-identity/dist-types/models/models_0.d.ts @@ -0,0 +1,1216 @@ +import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; +import { CognitoIdentityServiceException as __BaseException } from "./CognitoIdentityServiceException"; +/** + * @public + * @enum + */ +export declare const AmbiguousRoleResolutionType: { + readonly AUTHENTICATED_ROLE: "AuthenticatedRole"; + readonly DENY: "Deny"; +}; +/** + * @public + */ +export type AmbiguousRoleResolutionType = (typeof AmbiguousRoleResolutionType)[keyof typeof AmbiguousRoleResolutionType]; +/** + * @public + *A provider representing an Amazon Cognito user pool and its client ID.
+ */ +export interface CognitoIdentityProvider { + /** + * @public + *The provider name for an Amazon Cognito user pool. For example,
+ * cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789
.
The client ID for the Amazon Cognito user pool.
+ */ + ClientId?: string; + /** + * @public + *TRUE if server-side token validation is enabled for the identity provider’s + * token.
+ *Once you set ServerSideTokenCheck
to TRUE for an identity pool, that
+ * identity pool will check with the integrated user pools to make sure that the user has not
+ * been globally signed out or deleted before the identity pool provides an OIDC token or AWS
+ * credentials for the user.
If the user is signed out or deleted, the identity pool will return a 400 Not + * Authorized error.
+ */ + ServerSideTokenCheck?: boolean; +} +/** + * @public + *Input to the CreateIdentityPool action.
+ */ +export interface CreateIdentityPoolInput { + /** + * @public + *A string that you provide.
+ */ + IdentityPoolName: string | undefined; + /** + * @public + *TRUE if the identity pool supports unauthenticated logins.
+ */ + AllowUnauthenticatedIdentities: boolean | undefined; + /** + * @public + *Enables or disables the Basic (Classic) authentication flow. For more information, see + * Identity Pools (Federated Identities) Authentication Flow in the Amazon Cognito Developer Guide.
+ */ + AllowClassicFlow?: boolean; + /** + * @public + *Optional key:value pairs mapping provider names to provider app IDs.
+ */ + SupportedLoginProviders?: RecordThe "domain" by which Cognito will refer to your users. 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
+ * (-
).
Once you have set a developer provider name, you cannot change it. Please take care + * in setting this parameter.
+ */ + DeveloperProviderName?: string; + /** + * @public + *The Amazon Resource Names (ARN) of the OpenID Connect providers.
+ */ + OpenIdConnectProviderARNs?: string[]; + /** + * @public + *An array of Amazon Cognito user pools and their client IDs.
+ */ + CognitoIdentityProviders?: CognitoIdentityProvider[]; + /** + * @public + *An array of Amazon Resource Names (ARNs) of the SAML provider for your identity + * pool.
+ */ + SamlProviderARNs?: string[]; + /** + * @public + *Tags to assign to the 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.
+ */ + IdentityPoolTags?: RecordAn object representing an Amazon Cognito identity pool.
+ */ +export interface IdentityPool { + /** + * @public + *An identity pool ID in the format REGION:GUID.
+ */ + IdentityPoolId: string | undefined; + /** + * @public + *A string that you provide.
+ */ + IdentityPoolName: string | undefined; + /** + * @public + *TRUE if the identity pool supports unauthenticated logins.
+ */ + AllowUnauthenticatedIdentities: boolean | undefined; + /** + * @public + *Enables or disables the Basic (Classic) authentication flow. For more information, see + * Identity Pools (Federated Identities) Authentication Flow in the Amazon Cognito Developer Guide.
+ */ + AllowClassicFlow?: boolean; + /** + * @public + *Optional key:value pairs mapping provider names to provider app IDs.
+ */ + SupportedLoginProviders?: RecordThe "domain" by which Cognito will refer to your users.
+ */ + DeveloperProviderName?: string; + /** + * @public + *The ARNs of the OpenID Connect providers.
+ */ + OpenIdConnectProviderARNs?: string[]; + /** + * @public + *A list representing an Amazon Cognito user pool and its client ID.
+ */ + CognitoIdentityProviders?: CognitoIdentityProvider[]; + /** + * @public + *An array of Amazon Resource Names (ARNs) of the SAML provider for your identity + * pool.
+ */ + SamlProviderARNs?: string[]; + /** + * @public + *The tags that are assigned to the 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.
+ */ + IdentityPoolTags?: RecordThrown when the service encounters an error during processing the request.
+ */ +export declare class InternalErrorException extends __BaseException { + readonly name: "InternalErrorException"; + readonly $fault: "server"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeThrown for missing or bad input parameter(s).
+ */ +export declare class InvalidParameterException extends __BaseException { + readonly name: "InvalidParameterException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeThrown when the total number of user pools has exceeded a preset limit.
+ */ +export declare class LimitExceededException extends __BaseException { + readonly name: "LimitExceededException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeThrown when a user is not authorized to access the requested resource.
+ */ +export declare class NotAuthorizedException extends __BaseException { + readonly name: "NotAuthorizedException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeThrown when a user tries to use a login which is already linked to another + * account.
+ */ +export declare class ResourceConflictException extends __BaseException { + readonly name: "ResourceConflictException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeThrown when a request is throttled.
+ */ +export declare class TooManyRequestsException extends __BaseException { + readonly name: "TooManyRequestsException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeInput to the DeleteIdentities
action.
A list of 1-60 identities that you want to delete.
+ */ + IdentityIdsToDelete: string[] | undefined; +} +/** + * @public + * @enum + */ +export declare const ErrorCode: { + readonly ACCESS_DENIED: "AccessDenied"; + readonly INTERNAL_SERVER_ERROR: "InternalServerError"; +}; +/** + * @public + */ +export type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode]; +/** + * @public + *An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and + * IdentityId.
+ */ +export interface UnprocessedIdentityId { + /** + * @public + *A unique identifier in the format REGION:GUID.
+ */ + IdentityId?: string; + /** + * @public + *The error code indicating the type of error that occurred.
+ */ + ErrorCode?: ErrorCode; +} +/** + * @public + *Returned in response to a successful DeleteIdentities
+ * operation.
An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and + * IdentityId.
+ */ + UnprocessedIdentityIds?: UnprocessedIdentityId[]; +} +/** + * @public + *Input to the DeleteIdentityPool action.
+ */ +export interface DeleteIdentityPoolInput { + /** + * @public + *An identity pool ID in the format REGION:GUID.
+ */ + IdentityPoolId: string | undefined; +} +/** + * @public + *Thrown when the requested resource (for example, a dataset or record) does not + * exist.
+ */ +export declare class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeInput to the DescribeIdentity
action.
A unique identifier in the format REGION:GUID.
+ */ + IdentityId: string | undefined; +} +/** + * @public + *A description of the identity.
+ */ +export interface IdentityDescription { + /** + * @public + *A unique identifier in the format REGION:GUID.
+ */ + IdentityId?: string; + /** + * @public + *The provider names.
+ */ + Logins?: string[]; + /** + * @public + *Date on which the identity was created.
+ */ + CreationDate?: Date; + /** + * @public + *Date on which the identity was last modified.
+ */ + LastModifiedDate?: Date; +} +/** + * @public + *Input to the DescribeIdentityPool action.
+ */ +export interface DescribeIdentityPoolInput { + /** + * @public + *An identity pool ID in the format REGION:GUID.
+ */ + IdentityPoolId: string | undefined; +} +/** + * @public + *An exception thrown when a dependent service such as Facebook or Twitter is not + * responding
+ */ +export declare class ExternalServiceException extends __BaseException { + readonly name: "ExternalServiceException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeInput to the GetCredentialsForIdentity
action.
A unique identifier in the format REGION:GUID.
+ */ + IdentityId: string | undefined; + /** + * @public + *A set of optional name-value pairs that map provider names to provider tokens. The + * name-value pair will follow the syntax "provider_name": + * "provider_user_identifier".
+ *Logins should not be specified when trying to get credentials for an unauthenticated + * identity.
+ *The Logins parameter is required when using identities associated with external
+ * identity providers such as Facebook. For examples of Logins
maps, see the code
+ * examples in the External Identity Providers section of the Amazon Cognito Developer
+ * Guide.
The Amazon Resource Name (ARN) of the role to be assumed when multiple roles were + * received in the token from the identity provider. For example, a SAML-based identity + * provider. This parameter is optional for identity providers that do not support role + * customization.
+ */ + CustomRoleArn?: string; +} +/** + * @public + *Credentials for the provided identity ID.
+ */ +export interface Credentials { + /** + * @public + *The Access Key portion of the credentials.
+ */ + AccessKeyId?: string; + /** + * @public + *The Secret Access Key portion of the credentials
+ */ + SecretKey?: string; + /** + * @public + *The Session Token portion of the credentials
+ */ + SessionToken?: string; + /** + * @public + *The date at which these credentials will expire.
+ */ + Expiration?: Date; +} +/** + * @public + *Returned in response to a successful GetCredentialsForIdentity
+ * operation.
A unique identifier in the format REGION:GUID.
+ */ + IdentityId?: string; + /** + * @public + *Credentials for the provided identity ID.
+ */ + Credentials?: Credentials; +} +/** + * @public + *Thrown if the identity pool has no role associated for the given auth type + * (auth/unauth) or if the AssumeRole fails.
+ */ +export declare class InvalidIdentityPoolConfigurationException extends __BaseException { + readonly name: "InvalidIdentityPoolConfigurationException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeInput to the GetId action.
+ */ +export interface GetIdInput { + /** + * @public + *A standard AWS account ID (9+ digits).
+ */ + AccountId?: string; + /** + * @public + *An identity pool ID in the format REGION:GUID.
+ */ + IdentityPoolId: string | undefined; + /** + * @public + *A set of optional name-value pairs that map provider names to provider tokens. The
+ * available provider names for Logins
are as follows:
Facebook: graph.facebook.com
+ *
Amazon Cognito user pool:
+ * cognito-idp.
,
+ * for example, cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789
.
+ *
Google: accounts.google.com
+ *
Amazon: www.amazon.com
+ *
Twitter: api.twitter.com
+ *
Digits: www.digits.com
+ *
Returned in response to a GetId request.
+ */ +export interface GetIdResponse { + /** + * @public + *A unique identifier in the format REGION:GUID.
+ */ + IdentityId?: string; +} +/** + * @public + *Input to the GetIdentityPoolRoles
action.
An identity pool ID in the format REGION:GUID.
+ */ + IdentityPoolId: string | undefined; +} +/** + * @public + * @enum + */ +export declare const MappingRuleMatchType: { + readonly CONTAINS: "Contains"; + readonly EQUALS: "Equals"; + readonly NOT_EQUAL: "NotEqual"; + readonly STARTS_WITH: "StartsWith"; +}; +/** + * @public + */ +export type MappingRuleMatchType = (typeof MappingRuleMatchType)[keyof typeof MappingRuleMatchType]; +/** + * @public + *A rule that maps a claim name, a claim value, and a match type to a role + * ARN.
+ */ +export interface MappingRule { + /** + * @public + *The claim name that must be present in the token, for example, "isAdmin" or + * "paid".
+ */ + Claim: string | undefined; + /** + * @public + *The match condition that specifies how closely the claim value in the IdP token must
+ * match Value
.
A brief string that the claim must match, for example, "paid" or "yes".
+ */ + Value: string | undefined; + /** + * @public + *The role ARN.
+ */ + RoleARN: string | undefined; +} +/** + * @public + *A container for rules.
+ */ +export interface RulesConfigurationType { + /** + * @public + *An array of rules. You can specify up to 25 rules per identity provider.
+ *Rules are evaluated in order. The first one to match specifies the role.
+ */ + Rules: MappingRule[] | undefined; +} +/** + * @public + * @enum + */ +export declare const RoleMappingType: { + readonly RULES: "Rules"; + readonly TOKEN: "Token"; +}; +/** + * @public + */ +export type RoleMappingType = (typeof RoleMappingType)[keyof typeof RoleMappingType]; +/** + * @public + *A role mapping.
+ */ +export interface RoleMapping { + /** + * @public + *The role mapping type. Token will use cognito:roles
and
+ * cognito:preferred_role
claims from the Cognito identity provider token to
+ * map groups to roles. Rules will attempt to match claims from the token to map to a
+ * role.
If you specify Token or Rules as the Type
,
+ * AmbiguousRoleResolution
is required.
Specifies the action to be taken if either no rules match the claim value for the
+ * Rules
type, or there is no cognito:preferred_role
claim and
+ * there are multiple cognito:roles
matches for the Token
+ * type.
The rules to be used for mapping users to roles.
+ *If you specify Rules as the role mapping type, RulesConfiguration
is
+ * required.
Returned in response to a successful GetIdentityPoolRoles
+ * operation.
An identity pool ID in the format REGION:GUID.
+ */ + IdentityPoolId?: string; + /** + * @public + *The map of roles associated with this pool. Currently only authenticated and + * unauthenticated roles are supported.
+ */ + Roles?: RecordHow users for a specific identity provider are to mapped to roles. This is a + * String-to-RoleMapping 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".
+ */ + RoleMappings?: RecordInput to the GetOpenIdToken action.
+ */ +export interface GetOpenIdTokenInput { + /** + * @public + *A unique identifier in the format REGION:GUID.
+ */ + IdentityId: string | undefined; + /** + * @public + *A set of optional name-value pairs that map provider names to provider tokens. When
+ * using graph.facebook.com and www.amazon.com, supply the access_token returned from the
+ * provider's authflow. For accounts.google.com, an Amazon Cognito user pool provider, or any
+ * other OpenID Connect provider, always include the id_token
.
Returned in response to a successful GetOpenIdToken request.
+ */ +export interface GetOpenIdTokenResponse { + /** + * @public + *A unique identifier in the format REGION:GUID. Note that the IdentityId returned may + * not match the one passed on input.
+ */ + IdentityId?: string; + /** + * @public + *An OpenID token, valid for 10 minutes.
+ */ + Token?: string; +} +/** + * @public + *The provided developer user identifier is already registered with Cognito under a + * different identity ID.
+ */ +export declare class DeveloperUserAlreadyRegisteredException extends __BaseException { + readonly name: "DeveloperUserAlreadyRegisteredException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeInput to the GetOpenIdTokenForDeveloperIdentity
action.
An identity pool ID in the format REGION:GUID.
+ */ + IdentityPoolId: string | undefined; + /** + * @public + *A unique identifier in the format REGION:GUID.
+ */ + IdentityId?: string; + /** + * @public + *A set of optional name-value pairs that map provider names to provider tokens. Each
+ * name-value pair represents a user from a public provider or developer provider. If the user
+ * is from a developer provider, the name-value pair will follow the syntax
+ * "developer_provider_name": "developer_user_identifier"
. The developer
+ * provider is the "domain" by which Cognito will refer to your users; you provided this
+ * domain while creating/updating the identity pool. The developer user identifier is an
+ * identifier from your backend that uniquely identifies a user. When you create an identity
+ * pool, you can specify the supported logins.
Use this operation to configure attribute mappings for custom providers.
+ */ + PrincipalTags?: RecordThe expiration time of the token, in seconds. You can specify a custom expiration + * time for the token so that you can cache it. If you don't provide an expiration time, the + * token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS + * credentials, which are valid for a maximum of one hour. The maximum token duration you can + * set is 24 hours. You should take care in setting the expiration time for a token, as there + * are significant security implications: an attacker could use a leaked token to access your + * AWS resources for the token's duration.
+ *Please provide for a small grace period, usually no more than 5 minutes, to account for clock skew.
+ *Returned in response to a successful GetOpenIdTokenForDeveloperIdentity
+ * request.
A unique identifier in the format REGION:GUID.
+ */ + IdentityId?: string; + /** + * @public + *An OpenID token.
+ */ + Token?: string; +} +/** + * @public + */ +export interface GetPrincipalTagAttributeMapInput { + /** + * @public + *You can use this operation to get the ID of the Identity Pool you setup attribute mappings for.
+ */ + IdentityPoolId: string | undefined; + /** + * @public + *You can use this operation to get the provider name.
+ */ + IdentityProviderName: string | undefined; +} +/** + * @public + */ +export interface GetPrincipalTagAttributeMapResponse { + /** + * @public + *You can use this operation to get the ID of the Identity Pool you setup attribute mappings for.
+ */ + IdentityPoolId?: string; + /** + * @public + *You can use this operation to get the provider name.
+ */ + IdentityProviderName?: string; + /** + * @public + *You can use this operation to list
+ */ + UseDefaults?: boolean; + /** + * @public + *You can use this operation to add principal tags. The PrincipalTags
operation enables you to reference user attributes in your IAM permissions policy.
Input to the ListIdentities action.
+ */ +export interface ListIdentitiesInput { + /** + * @public + *An identity pool ID in the format REGION:GUID.
+ */ + IdentityPoolId: string | undefined; + /** + * @public + *The maximum number of identities to return.
+ */ + MaxResults: number | undefined; + /** + * @public + *A pagination token.
+ */ + NextToken?: string; + /** + * @public + *An optional boolean parameter that allows you to hide disabled identities. If + * omitted, the ListIdentities API will include disabled identities in the response.
+ */ + HideDisabled?: boolean; +} +/** + * @public + *The response to a ListIdentities request.
+ */ +export interface ListIdentitiesResponse { + /** + * @public + *An identity pool ID in the format REGION:GUID.
+ */ + IdentityPoolId?: string; + /** + * @public + *An object containing a set of identities and associated mappings.
+ */ + Identities?: IdentityDescription[]; + /** + * @public + *A pagination token.
+ */ + NextToken?: string; +} +/** + * @public + *Input to the ListIdentityPools action.
+ */ +export interface ListIdentityPoolsInput { + /** + * @public + *The maximum number of identities to return.
+ */ + MaxResults: number | undefined; + /** + * @public + *A pagination token.
+ */ + NextToken?: string; +} +/** + * @public + *A description of the identity pool.
+ */ +export interface IdentityPoolShortDescription { + /** + * @public + *An identity pool ID in the format REGION:GUID.
+ */ + IdentityPoolId?: string; + /** + * @public + *A string that you provide.
+ */ + IdentityPoolName?: string; +} +/** + * @public + *The result of a successful ListIdentityPools action.
+ */ +export interface ListIdentityPoolsResponse { + /** + * @public + *The identity pools returned by the ListIdentityPools action.
+ */ + IdentityPools?: IdentityPoolShortDescription[]; + /** + * @public + *A pagination token.
+ */ + NextToken?: string; +} +/** + * @public + */ +export interface ListTagsForResourceInput { + /** + * @public + *The Amazon Resource Name (ARN) of the identity pool that the tags are assigned + * to.
+ */ + ResourceArn: string | undefined; +} +/** + * @public + */ +export interface ListTagsForResourceResponse { + /** + * @public + *The tags that are assigned to the identity pool.
+ */ + Tags?: RecordInput to the LookupDeveloperIdentityInput
action.
An identity pool ID in the format REGION:GUID.
+ */ + IdentityPoolId: string | undefined; + /** + * @public + *A unique identifier in the format REGION:GUID.
+ */ + IdentityId?: string; + /** + * @public + *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.
+ */ + DeveloperUserIdentifier?: string; + /** + * @public + *The maximum number of identities to return.
+ */ + MaxResults?: number; + /** + * @public + *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.
Returned in response to a successful LookupDeveloperIdentity
+ * action.
A unique identifier in the format REGION:GUID.
+ */ + IdentityId?: string; + /** + * @public + *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.
+ */ + DeveloperUserIdentifierList?: string[]; + /** + * @public + *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.
Input to the MergeDeveloperIdentities
action.
User identifier for the source user. The value should be a
+ * DeveloperUserIdentifier
.
User identifier for the destination user. The value should be a
+ * DeveloperUserIdentifier
.
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 (-).
An identity pool ID in the format REGION:GUID.
+ */ + IdentityPoolId: string | undefined; +} +/** + * @public + *Returned in response to a successful MergeDeveloperIdentities
+ * action.
A unique identifier in the format REGION:GUID.
+ */ + IdentityId?: string; +} +/** + * @public + *Thrown if there are parallel requests to modify a resource.
+ */ +export declare class ConcurrentModificationException extends __BaseException { + readonly name: "ConcurrentModificationException"; + readonly $fault: "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionTypeInput to the SetIdentityPoolRoles
action.
An identity pool ID in the format REGION:GUID.
+ */ + IdentityPoolId: string | undefined; + /** + * @public + *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.
+ */ + Roles: RecordHow users for a specific identity provider are to mapped to roles. This is a string + * to RoleMapping 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.
+ */ + RoleMappings?: RecordThe ID of the Identity Pool you want to set attribute mappings for.
+ */ + IdentityPoolId: string | undefined; + /** + * @public + *The provider name you want to use for attribute mappings.
+ */ + IdentityProviderName: string | undefined; + /** + * @public + *You can use this operation to use default (username and clientID) attribute mappings.
+ */ + UseDefaults?: boolean; + /** + * @public + *You can use this operation to add principal tags.
+ */ + PrincipalTags?: RecordThe ID of the Identity Pool you want to set attribute mappings for.
+ */ + IdentityPoolId?: string; + /** + * @public + *The provider name you want to use for attribute mappings.
+ */ + IdentityProviderName?: string; + /** + * @public + *You can use this operation to select default (username and clientID) attribute mappings.
+ */ + UseDefaults?: boolean; + /** + * @public + *You can use this operation to add principal tags. The PrincipalTags
operation enables you to reference user attributes in your IAM permissions policy.
The Amazon Resource Name (ARN) of the identity pool.
+ */ + ResourceArn: string | undefined; + /** + * @public + *The tags to assign to the identity pool.
+ */ + Tags: RecordInput to the UnlinkDeveloperIdentity
action.
A unique identifier in the format REGION:GUID.
+ */ + IdentityId: string | undefined; + /** + * @public + *An identity pool ID in the format REGION:GUID.
+ */ + IdentityPoolId: string | undefined; + /** + * @public + *The "domain" by which Cognito will refer to your users.
+ */ + DeveloperProviderName: string | undefined; + /** + * @public + *A unique ID used by your backend authentication process to identify a user.
+ */ + DeveloperUserIdentifier: string | undefined; +} +/** + * @public + *Input to the UnlinkIdentity action.
+ */ +export interface UnlinkIdentityInput { + /** + * @public + *A unique identifier in the format REGION:GUID.
+ */ + IdentityId: string | undefined; + /** + * @public + *A set of optional name-value pairs that map provider names to provider + * tokens.
+ */ + Logins: RecordProvider names to unlink from this identity.
+ */ + LoginsToRemove: string[] | undefined; +} +/** + * @public + */ +export interface UntagResourceInput { + /** + * @public + *The Amazon Resource Name (ARN) of the identity pool.
+ */ + ResourceArn: string | undefined; + /** + * @public + *The keys of the tags to remove from the user pool.
+ */ + TagKeys: string[] | undefined; +} +/** + * @public + */ +export interface UntagResourceResponse { +} diff --git a/node_modules/@aws-sdk/client-cognito-identity/dist-types/pagination/Interfaces.d.ts b/node_modules/@aws-sdk/client-cognito-identity/dist-types/pagination/Interfaces.d.ts new file mode 100644 index 0000000..e06bdd3 --- /dev/null +++ b/node_modules/@aws-sdk/client-cognito-identity/dist-types/pagination/Interfaces.d.ts @@ -0,0 +1,8 @@ +import { PaginationConfiguration } from "@smithy/types"; +import { CognitoIdentityClient } from "../CognitoIdentityClient"; +/** + * @public + */ +export interface CognitoIdentityPaginationConfiguration extends PaginationConfiguration { + client: CognitoIdentityClient; +} diff --git a/node_modules/@aws-sdk/client-cognito-identity/dist-types/pagination/ListIdentityPoolsPaginator.d.ts b/node_modules/@aws-sdk/client-cognito-identity/dist-types/pagination/ListIdentityPoolsPaginator.d.ts new file mode 100644 index 0000000..8670495 --- /dev/null +++ b/node_modules/@aws-sdk/client-cognito-identity/dist-types/pagination/ListIdentityPoolsPaginator.d.ts @@ -0,0 +1,7 @@ +import { Paginator } from "@smithy/types"; +import { ListIdentityPoolsCommandInput, ListIdentityPoolsCommandOutput } from "../commands/ListIdentityPoolsCommand"; +import { CognitoIdentityPaginationConfiguration } from "./Interfaces"; +/** + * @public + */ +export declare function paginateListIdentityPools(config: CognitoIdentityPaginationConfiguration, input: ListIdentityPoolsCommandInput, ...additionalArguments: any): Paginator