View a markdown version of this page

Amazon Cognito Identity 的操作、资源和条件键 - 服务授权参考

Amazon Cognito Identity 的操作、资源和条件键

Amazon Cognito Identity(服务前缀:cognito-identity)提供以下特定于服务的操作、资源、操作和条件密钥,供在 IAM 权限策略中使用。

参考:

由亚马逊 Cognito Identity 定义的 API 操作

下表将 API 操作映射到它们授权的 IAM 操作。仅列出具有给定 API 和操作的静态值的条件键;有关每个操作支持的完整条件键集,请参阅操作表。

操作 IAM 操作 条件键 可能的值 访问级别

CreateIdentityPool

认知身份:CreateIdentityPool

写入

认知身份:TagResource

标记、写作

DeleteIdentities

认知身份:DeleteIdentities

写入

DeleteIdentityPool

认知身份:DeleteIdentityPool

写入

DescribeIdentity

认知身份:DescribeIdentity

读取

DescribeIdentityPool

认知身份:DescribeIdentityPool

读取

GetCredentialsForIdentity

认知身份:GetCredentialsForIdentity

读取

GetId

认知身份:GetId

写入

GetIdentityPoolRoles

认知身份:GetIdentityPoolRoles

读取

GetOpenIdToken

认知身份:GetOpenIdToken

读取

GetOpenIdTokenForDeveloperIdentity

认知身份:GetOpenIdTokenForDeveloperIdentity

读取

GetPrincipalTagAttributeMap

认知身份:GetPrincipalTagAttributeMap

读取

ListIdentities

认知身份:ListIdentities

列表

ListIdentityPools

认知身份:ListIdentityPools

列表

ListTagsForResource

认知身份:ListTagsForResource

读取

LookupDeveloperIdentity

认知身份:LookupDeveloperIdentity

读取

MergeDeveloperIdentities

认知身份:MergeDeveloperIdentities

写入

SetIdentityPoolRoles

认知身份:SetIdentityPoolRoles

写入

我是:PassRole

写入

SetPrincipalTagAttributeMap

认知身份:SetPrincipalTagAttributeMap

写入

TagResource

认知身份:TagResource

标记、写作

UnlinkDeveloperIdentity

认知身份:UnlinkDeveloperIdentity

写入

UnlinkIdentity

认知身份:UnlinkIdentity

写入

UntagResource

认知身份:UntagResource

标记、写作

UpdateIdentityPool

认知身份:TagResource

标记、写作

认知身份:UntagResource

标记、写作

认知身份:UpdateIdentityPool

写入

Amazon Cognito Identity 定义的操作

您可以在 IAM 策略语句的 Action 元素中指定以下操作。可以使用策略授予在 AWS中执行操作的权限。您在策略中使用一项操作时,通常使用相同的名称允许或拒绝对 API 操作或 CLI 命令的访问。但在某些情况下,单一动作可控制对多项操作的访问。还有某些操作需要多种不同的动作。

操作 说明 资源类型(* 为必需) 条件键 访问级别

CreateIdentityPool

授予权限以创建新的身份池

aws: RequestTag /$ {} TagKey

aws:TagKeys

写入

DeleteIdentities

授予权限以从身份池中删除身份。您可以指定希望删除的 1-60 个身份的列表

认知身份:IdentityPoolArn

写入

DeleteIdentityPool

授予权限以删除用户池。将池删除后,用户将无法使用该池进行身份验证

身份池*

aws: ResourceTag /$ {} TagKey

写入

DescribeIdentity

授予权限以返回与给定身份相关的元数据,包括创建身份的时间以及所有相关的关联登录名

认知身份:IdentityPoolArn

读取

DescribeIdentityPool

授予权限以获得特定身份池的详细信息,包括池名称、ID 描述、创建日期和当前用户数量

身份池*

aws: ResourceTag /$ {} TagKey

读取

GetCredentialsForIdentity

授予权限以返回所提供身份 ID 的凭证

认知身份验证:AccountId

认知身份验证:IdentityPoolArn

cognito-identity-unauth:AccountId

cognito-identity-unauth:IdentityPoolArn

读取

GetId

授予权限以生成(或检索)Cognito ID 提供多个登录名将创建隐式关联的账户

认知身份验证:AccountId

认知身份验证:IdentityPoolArn

cognito-identity-unauth:AccountId

cognito-identity-unauth:IdentityPoolArn

写入

GetIdentityPoolAnalytics

授予获取有关所有身份池身份提供商当前身份总数的分析数据的权限 (IdPs)

身份池*

aws: ResourceTag /$ {} TagKey

读取

GetIdentityPoolDailyAnalytics

授予获取有关所有身份池身份提供商的新身份数量和总身份的分析数据的权限 (IdPs)

身份池*

aws: ResourceTag /$ {} TagKey

读取

GetIdentityPoolRoles

授予权限以获取身份池的角色

身份池*

aws: ResourceTag /$ {} TagKey

读取

GetIdentityProviderDailyAnalytics

授予获取有关一个身份池身份提供商的新身份数量和总身份的分析数据的权限 (IdPs)

身份池*

aws: ResourceTag /$ {} TagKey

读取

GetOpenIdToken

授予权限以使用已知 Cognito ID 获取 OpenID 令牌

认知身份验证:AccountId

认知身份验证:IdentityPoolArn

cognito-identity-unauth:AccountId

cognito-identity-unauth:IdentityPoolArn

读取

GetOpenIdTokenForDeveloperIdentity

向通过后端身份验证流程进行身份验证的用户授予注册(或检索)Cognito IdentityId 和 OpenID Connect 令牌的权限

身份池*

aws: ResourceTag /$ {} TagKey

读取

GetPrincipalTagAttributeMap

授予权限以获取身份池和提供商的委托人标签

身份池*

aws: ResourceTag /$ {} TagKey

读取

ListIdentities

授予权限以在身份池中列出身份

身份池*

aws: ResourceTag /$ {} TagKey

列表

ListIdentityPools

授予权限以列出为您的账户注册的所有 Cognito 身份池

List

ListTagsForResource

授予权限以列出分配给 Amazon Cognito 身份池的标签

身份池

aws: ResourceTag /$ {} TagKey

读取

LookupDeveloperIdentity

授予权限以 IdentityId 检索与现有身份 DeveloperUserIdentifiers 关联的 DeveloperUserIdentifier 或与之关联 IdentityId 的列表

身份池*

aws: ResourceTag /$ {} TagKey

读取

MergeDeveloperIdentities

授予权限以合并两个不同的用户 IdentityIds、存在于同一个身份池中并由同一个开发者提供商标识的用户

身份池*

aws: ResourceTag /$ {} TagKey

写入

SetIdentityPoolRoles

授予权限以设置身份池的角色 这些角色用于发出号召性用 GetCredentialsForIdentity 语

写入

SetPrincipalTagAttributeMap

授予权限以设置身份池和提供商的委托人标签 这些标签用于发出号召性用 GetOpenIdToken 语

写入

TagResource

授予权限以将一组标签分配给 Amazon Cognito 身份池

身份池*

aws: RequestTag /$ {} TagKey

aws: ResourceTag /$ {} TagKey

aws:TagKeys

标记、写作

UnlinkDeveloperIdentity

授予取消与现有身份关联 DeveloperUserIdentifier 的权限

身份池*

aws: ResourceTag /$ {} TagKey

写入

UnlinkIdentity

授予权限以将联合身份与现有账户取消关联

认知身份验证:AccountId

认知身份验证:IdentityPoolArn

写入

UntagResource

授予权限以从 Amazon Cognito 身份池中删除指定的标签

身份池*

aws: ResourceTag /$ {} TagKey

aws:TagKeys

标记、写作

UpdateIdentityPool

授予权限以更新身份池

身份池*

aws: ResourceTag /$ {} TagKey

写入

Amazon Cognito Identity 定义的资源类型

以下资源类型是由该服务定义的,可以在 IAM 权限策略语句的 Resource 元素中使用这些资源类型。

资源类型 ARN 条件键

身份池

arn:$ {Partition}: cognito-identity:$ {Region}: $ {Account}: identitypool/$ {} IdentityPoolId

aws: ResourceTag /$ {} TagKey

Amazon Cognito Identity 的条件键

Amazon Cognito Identity 定义以下可以在 IAM policy 的 Condition 元素中使用的条件键。

条件键 描述 类型

aws: RequestTag /$ {} TagKey

按请求中的标签键值对筛选访问

字符串

aws: ResourceTag /$ {} TagKey

按附加到资源的标签键值对筛选操作

字符串

aws:TagKeys

按请求中包含的键筛选访问

ArrayOfString

认知身份认证:AccountId

按身份池身份池身份验证用户的所属 AWS 账户 ID 筛选访问权限。适用于未经身份验证(公共)的 API 操作

字符串

认知身份认证:IdentityPoolArn

按给定经过身份验证的用户身份 ID 的身份池 ID 筛选访问权限。适用于未经身份验证(公共)的 API 操作

进行筛选

cognito-identity-unauth:AccountId

按身份池的拥有者 AWS 账户 ID 筛选身份池访客用户的访问权限。适用于未经身份验证(公共)的 API 操作

字符串

cognito-identity-unauth:IdentityPoolArn

按给定访客用户身份 ID 的身份池 ID 筛选访问权限。适用于未经身份验证(公共)的 API 操作

进行筛选

认知身份:IdentityPoolArn

按给定身份 ID 的身份池 ID 筛选 DeleteIdentities 和的访问权限 DescribeIdentity

进行筛选