Linux command
aws-cognito-identity 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
List identity pools
aws cognito-identity list-identity-pools --max-results [20]
Create a new identity pool
aws cognito-identity create-identity-pool --identity-pool-name [pool_name] --allow-unauthenticated-identities
Describe an identity pool
aws cognito-identity describe-identity-pool --identity-pool-id [region:pool-id]
Get an identity ID
aws cognito-identity get-id --identity-pool-id [region:pool-id]
Get temporary AWS credentials
aws cognito-identity get-credentials-for-identity --identity-id [region:identity-id]
Delete an identity pool
aws cognito-identity delete-identity-pool --identity-pool-id [region:pool-id]
Link a login provider
aws cognito-identity get-id --identity-pool-id [region:pool-id] --logins [provider]=[token]
说明
aws cognito-identity is a subcommand of the AWS CLI that manages Amazon Cognito Identity Pools (Federated Identities). It provides temporary AWS credentials to users authenticated through identity providers like Amazon, Facebook, Google, SAML, or Cognito User Pools. Identity pools map user identities to IAM roles, enabling secure access to AWS services from mobile apps and web applications. Each identity pool can support both authenticated and unauthenticated (guest) access with different IAM permissions. The service issues unique identity IDs and vends temporary AWS credentials through the STS service, allowing fine-grained access control without embedding long-term credentials in applications.
参数
- list-identity-pools
- List all identity pools for the account.
- create-identity-pool
- Create a new identity pool with specified settings.
- describe-identity-pool
- Get details about an identity pool.
- update-identity-pool
- Modify identity pool configuration.
- delete-identity-pool
- Remove an identity pool.
- delete-identities
- Delete previously merged or associated identities.
- describe-identity
- Get details about a particular identity, including its external IDs.
- get-id
- Get or create an identity ID for a user.
- get-credentials-for-identity
- Get temporary AWS credentials for an identity.
- get-identity-pool-roles
- Get the roles configured for an identity pool.
- set-identity-pool-roles
- Set the roles for an identity pool.
- get-open-id-token
- Get an OpenID token for an identity.
- get-open-id-token-for-developer-identity
- Get token for developer-authenticated identity.
- list-identities
- List identities in a specific identity pool.
- lookup-developer-identity
- Retrieve the identity ID associated with a developer identity.
- tag-resource
- Assign tags to an identity pool.
- untag-resource
- Remove tags from an identity pool.
- --identity-pool-id _id_
- The identity pool ID (format: region:uuid).
- --identity-pool-name _name_
- Name for the identity pool.
- --allow-unauthenticated-identities
- Enable guest access without authentication.
- --no-allow-unauthenticated-identities
- Disable guest access.
- --logins _map_
- Map of provider names to tokens for authentication.
- --max-results _number_
- Maximum number of results to return.
FAQ
What is the aws-cognito-identity command used for?
aws cognito-identity is a subcommand of the AWS CLI that manages Amazon Cognito Identity Pools (Federated Identities). It provides temporary AWS credentials to users authenticated through identity providers like Amazon, Facebook, Google, SAML, or Cognito User Pools. Identity pools map user identities to IAM roles, enabling secure access to AWS services from mobile apps and web applications. Each identity pool can support both authenticated and unauthenticated (guest) access with different IAM permissions. The service issues unique identity IDs and vends temporary AWS credentials through the STS service, allowing fine-grained access control without embedding long-term credentials in applications.
How do I run a basic aws-cognito-identity example?
Run `aws cognito-identity list-identity-pools --max-results [20]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does list-identity-pools do in aws-cognito-identity?
List all identity pools for the account.