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

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

Amazon Bedrock AgentCore 的操作、资源和条件键

Amazon Bedrock AgentCore(服务前缀:bedrock-agentcore)提供以下服务特定的资源、操作和条件上下文键以在 IAM 权限策略中使用。

参考:

Amazon Bedrock AgentCore 定义的操作

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

操作表的访问级别列描述如何对操作进行分类(列出、读取、权限管理或标记)。此分类可以帮助您了解当您在策略中使用操作时,相应操作授予的访问级别。有关访问级别的更多信息,请参阅策略摘要中的访问级别

操作表的资源类型列指示每项操作是否支持资源级权限。如果该列没有任何值,您必须在策略语句的 Resource 元素中指定策略应用的所有资源(“*”)。通过在 IAM policy 中使用条件来筛选访问权限,以控制是否可以在资源或请求中使用特定标签键。如果操作具有一个或多个必需资源,则调用方必须具有使用这些资源来使用该操作的权限。必需资源在表中以星号 (*) 表示。如果您在 IAM policy 中使用 Resource 元素限制资源访问权限,则必须为每种必需的资源类型添加 ARN 或模式。某些操作支持多种资源类型。如果资源类型是可选的(未指示为必需),则可以选择使用一种可选资源类型。

操作表的条件键列包括可以在策略语句的 Condition 元素中指定的键。有关与服务资源关联的条件键的更多信息,请参阅资源类型表的条件键列。

操作表的依赖操作列显示成功调用操作可能需要的其他权限。除了操作本身的权限以外,可能还需要这些权限。若某个操作指定依赖操作,则这些依赖关系可能适用于为该操作定义的其他资源,而不仅仅是表中列出的第一个资源。

注意

资源条件键在资源类型表中列出。您可以在操作表的资源类型(* 为必需)列中找到应用于某项操作的资源类型的链接。资源类型表中的资源类型包括条件密钥列,这是应用于操作表中操作的资源条件键。

有关下表中各列的详细信息,请参阅操作表

操作 描述 访问级别 资源类型(* 为必需) 条件键 相关操作
AllowVendedLogDeliveryForResource [仅权限] 授予权限以为资源配置提供的遥测 权限管理

memory*

AuthorizeAction [仅权限] 授予针对授权请求评估 Cedar 策略的权限 权限管理

gateway*

policy-engine*

BatchCreateMemoryRecords 授予权限以创建一个或多个内存记录 写入

memory*

bedrock-agentcore:namespace

BatchDeleteMemoryRecords 授予权限以删除一个或多个内存记录 写入

memory*

BatchUpdateMemoryRecords 授予权限以更新一个或多个内存记录 写入

memory*

bedrock-agentcore:namespace

CompleteResourceTokenAuth 授予通过 3LO 流程检索访问令牌 OAuth2 的权限,以访问外部资源 读取

oauth2credentialprovider*

token-vault*

workload-identity*

workload-identity-directory*

bedrock-agentcore:InboundJwtClaim/iss

bedrock-agentcore:InboundJwtClaim/sub

bedrock-agentcore:InboundJwtClaim/aud

bedrock-agentcore:InboundJwtClaim/scope

bedrock-agentcore:InboundJwtClaim/client_id

bedrock-agentcore:userid

ConnectBrowserAutomationStream 授予权限以连接到浏览器自动化流 读取
ConnectBrowserLiveViewStream 授予权限以连接到浏览器实时查看流 读取
CreateAgentRuntime 授予权限以创建新的代理运行时 写入

aws:RequestTag/${TagKey}

aws:TagKeys

iam:PassRole

CreateAgentRuntimeEndpoint 授予权限以创建新的代理运行时端点 写入

runtime*

aws:RequestTag/${TagKey}

aws:TagKeys

CreateApiKeyCredentialProvider 授予权限以创建新的 API 密钥凭证提供商 写入

apikeycredentialprovider*

token-vault*

aws:RequestTag/${TagKey}

aws:TagKeys

CreateBrowser 授予权限以创建新的自定义浏览器 写入

aws:RequestTag/${TagKey}

aws:TagKeys

CreateCodeInterpreter 授予权限以创建新的自定义代码解释器 写入

aws:RequestTag/${TagKey}

aws:TagKeys

CreateEvaluator 授予创建新评估者的权限 写入
CreateEvent 授予权限以创建事件 写入

memory*

bedrock-agentcore:sessionId

bedrock-agentcore:actorId

CreateGateway 授予权限以创建新网关 写入

aws:RequestTag/${TagKey}

aws:TagKeys

iam:PassRole

CreateGatewayTarget 授予权限以在现有网关中创建新目标 写入

gateway*

CreateMemory 授予权限以创建内存资源 写入

aws:RequestTag/${TagKey}

aws:TagKeys

iam:PassRole

CreateOauth2CredentialProvider 授予创建新的凭据提供者以使用协议访问外部资源的权限 OAuth2 写入

oauth2credentialprovider*

token-vault*

aws:RequestTag/${TagKey}

aws:TagKeys

CreateOnlineEvaluationConfig 授予创建新的在线评估配置的权限 写入

iam:PassRole

CreatePolicy 授予在策略引擎中创建新策略的权限 写入

policy-engine*

CreatePolicyEngine 授予创建新策略引擎的权限 写入
CreateWorkloadIdentity 授予权限以创建新的工作负载身份 写入

workload-identity*

workload-identity-directory*

aws:RequestTag/${TagKey}

aws:TagKeys

DeleteAgentRuntime 授予权限以删除代理运行时 写入

runtime*

DeleteAgentRuntimeEndpoint 授予权限以删除代理运行时端点 写入

runtime*

runtime-endpoint*

DeleteApiKeyCredentialProvider 授予权限以删除注册的 API 密钥凭证提供商 写入

apikeycredentialprovider*

token-vault*

DeleteBrowser 授予权限以删除自定义浏览器 写入

browser-custom*

DeleteCodeInterpreter 授予权限以删除自定义代码解释器 写入

code-interpreter-custom*

DeleteEvaluator 授予删除评估者的权限 写入

evaluator*

DeleteEvent 授予权限以删除事件 写入

memory*

bedrock-agentcore:sessionId

bedrock-agentcore:actorId

DeleteGateway 授予权限以删除现有网关 写入

gateway*

DeleteGatewayTarget 授予权限以删除现有网关目标 写入

gateway*

DeleteMemory 授予权限以删除内存资源 写入

memory*

DeleteMemoryRecord 授予权限以删除内场记录 写入

memory*

DeleteOauth2CredentialProvider 授予删除已注册 OAuth2 凭证提供者的权限 写入

oauth2credentialprovider*

token-vault*

DeleteOnlineEvaluationConfig 授予删除在线评估配置的权限 写入

online-evaluation-config*

DeletePolicy 授予删除策略的权限 写入

policy*

policy-engine*

DeletePolicyEngine 授予删除策略引擎的权限 写入

policy-engine*

DeleteResourcePolicy 授予删除 Bedrock 资源的基于资源的策略的权限 写入

gateway

runtime

runtime-endpoint

DeleteWorkloadIdentity 授予权限以删除注册的工作负载身份 写入

workload-identity*

workload-identity-directory*

Evaluate 授予使用评估器进行评估的权限 写入

evaluator*

GetAgentCard 授予授权以检索 A2A 代理卡 读取

runtime*

runtime-endpoint*

GetAgentRuntime 授予权限以获取代理运行时的详细信息 读取

runtime*

GetAgentRuntimeEndpoint 授予权限以获取代理运行时端点的详细信息 读取

runtime*

runtime-endpoint*

GetApiKeyCredentialProvider 授予权限以按其名称获取注册的 API 密钥凭证提供商 读取

apikeycredentialprovider*

token-vault*

GetBrowser 授予权限以获取浏览器的详细信息 读取

browser-custom*

GetBrowserSession 授予权限以获取浏览器会话的详细信息 读取

browser*

browser-custom*

GetCodeInterpreter 授予权限以获取代码解释器的详细信息 读取

code-interpreter-custom*

GetCodeInterpreterSession 授予权限以获取代码解释器会话的详细信息 读取

code-interpreter*

code-interpreter-custom*

GetEvaluator 授予获取评估者详细信息的权限 读取

evaluator*

GetEvent 授予权限以获取事件 读取

memory*

bedrock-agentcore:sessionId

bedrock-agentcore:actorId

GetGateway 授予权限以检索现有网关 读取

gateway*

GetGatewayTarget 授予权限以检索现有网关目标 读取

gateway*

GetMemory 授予权限以获取内存资源的详细信息 读取

memory*

GetMemoryRecord 授予权限以获取内场记录 读取

memory*

GetOauth2CredentialProvider 授予按其名称获取已注册 OAuth2 凭证提供商的权限 读取

oauth2credentialprovider*

token-vault*

GetOnlineEvaluationConfig 授予获取在线评估配置详细信息的权限 读取

online-evaluation-config*

GetPolicy 授予检索策略的权限 读取

policy*

policy-engine*

GetPolicyEngine 授予检索策略引擎的权限 读取

policy-engine*

GetPolicyGeneration 授予检索策略生成请求状态和结果的权限 读取

policy-engine*

policy-generation*

GetResourceApiKey 授予权限以检索与 API 密钥凭证提供商关联的 API 密钥 读取

apikeycredentialprovider*

token-vault*

workload-identity*

workload-identity-directory*

GetResourceOauth2Token 授予通过 OAuth2 2LO 或 3LO 流程检索访问令牌的权限,以访问外部资源 读取

oauth2credentialprovider*

token-vault*

workload-identity*

workload-identity-directory*

GetResourcePolicy 授予检索 Bedrock 资源的基于资源的策略的权限 读取

gateway

runtime

runtime-endpoint

GetTokenVault 授予获取当前配置(包括加密设置)的权限 TokenVault 读取

token-vault*

GetWorkloadAccessToken 授予权限以为不代表用户执行的代理式工作负载检索工作负载访问令牌 写入

workload-identity*

workload-identity-directory*

GetWorkloadAccessTokenForJWT 授予权限以为代表具有 JWT 令牌的用户执行的代理式工作负载检索工作负载访问令牌 写入

workload-identity*

workload-identity-directory*

bedrock-agentcore:InboundJwtClaim/iss

bedrock-agentcore:InboundJwtClaim/sub

bedrock-agentcore:InboundJwtClaim/aud

bedrock-agentcore:InboundJwtClaim/scope

bedrock-agentcore:InboundJwtClaim/client_id

GetWorkloadAccessTokenForUserId 授予权限以为代表具有用户 ID 的用户执行的代理式工作负载检索工作负载访问令牌 写入

workload-identity*

workload-identity-directory*

bedrock-agentcore:userid

GetWorkloadIdentity 授予获取特定工作负载身份详细信息的权限,包括其名称和允许的 OAuth2 返回值 URLs 读取

workload-identity*

workload-identity-directory*

InvokeAgentRuntime 授予权限以调用代理运行时端点 写入

runtime*

runtime-endpoint*

InvokeAgentRuntimeForUser 授予调用带有 X-Amzn-Bedrock-AgentCore-Runtime-User-Id 标头的代理运行时端点的权限 写入

runtime*

runtime-endpoint*

InvokeAgentRuntimeWithWebSocketStream 授予使用 WebSocket 流调用代理运行时端点的权限 写入

runtime*

runtime-endpoint*

InvokeAgentRuntimeWithWebSocketStreamForUser 授予调用带有 WebSocket stream 和 X-Amzn-Bedrock-AgentCore-Runtime-User-Id 标头的代理运行时端点的权限 写入

runtime*

runtime-endpoint*

InvokeCodeInterpreter 授予权限以调用代码解释器会话 写入

code-interpreter*

code-interpreter-custom*

InvokeGateway [仅权限] 授予权限以调用网关 权限管理

gateway*

ListActors 授予权限以列出参与者 列表

memory*

ListAgentRuntimeEndpoints 授予权限以列出代理运行时端点 列表
ListAgentRuntimeVersions 授予权限以列出代理运行时版本 列表
ListAgentRuntimes 授予权限以列出代理运行时 列表
ListApiKeyCredentialProviders 授予权限以列出令牌文件库中的所有 API 密钥凭证提供商 读取

apikeycredentialprovider*

token-vault*

ListBrowserSessions 授予权限以列出浏览器会话 列表
ListBrowsers 授予权限以列出浏览器 列表
ListCodeInterpreterSessions 授予权限以列出代码解释器会话 列表

code-interpreter*

code-interpreter-custom*

ListCodeInterpreters 授予权限以列出代码解释器 列表
ListEvaluators 授予列出评估者的权限 列表
ListEvents 授予权限以列出事件 列表

memory*

bedrock-agentcore:sessionId

bedrock-agentcore:actorId

ListGatewayTargets 授予权限以列出现有网关目标 列表

gateway*

ListGateways 授予权限以列出现有网关 列表
ListMemories 授予权限以列出内存资源 列表
ListMemoryExtractionJobs 授予列出该内存的提取任务的权限 列表

memory*

ListMemoryRecords 授予权限以列出内存记录 列表

memory*

bedrock-agentcore:namespace

bedrock-agentcore:strategyId

ListOauth2CredentialProviders 授予列出令牌库中所有 OAuth2 凭证提供者的权限 读取

oauth2credentialprovider*

token-vault*

ListOnlineEvaluationConfigs 授予列出在线评估配置的权限 列表
ListPolicies 授予在策略引擎中列出策略的权限 列表

policy-engine*

ListPolicyEngines 授予列出策略引擎的权限 列表
ListPolicyGenerationAssets 授予列出生成请求中生成的策略资产的权限 列表

policy-engine*

policy-generation*

ListPolicyGenerations 授予列出策略生成请求的权限 列表

policy-engine*

ListSessions 授予权限以列出会话 列表

memory*

bedrock-agentcore:actorId

ListTagsForResource 授予列出 Bedrock-AgentCore 资源标签的权限 列表

apikeycredentialprovider

browser-custom

code-interpreter-custom

gateway

memory

oauth2credentialprovider

runtime

runtime-endpoint

token-vault

workload-identity

workload-identity-directory

ListWorkloadIdentities 授予列出调用者所有工作负载身份的权限 AWS 账户 读取

workload-identity*

workload-identity-directory*

ManageAdminPolicy [仅权限] 授予创建或修改适用于网关资源的通配符策略的权限 权限管理
ManageResourceScopedPolicy [仅权限] 授予创建或修改适用于特定网关资源的策略的权限 权限管理

gateway*

PartiallyAuthorizeActions [仅权限] 授予对 Cedar 策略进行部分评估的权限,以授权呼叫者列出允许他们调用的工具 权限管理

gateway*

policy-engine*

PutResourcePolicy 授予为 Bedrock 资源创建或更新基于资源的策略的权限 写入

gateway

runtime

runtime-endpoint

RetrieveMemoryRecords 授予权限以通过语义查询检索内存记录 列表

memory*

bedrock-agentcore:namespace

bedrock-agentcore:strategyId

SetTokenVaultCMK 授予将客户托管密钥 (CMK) 或服务托管密钥与特定密钥关联的权限 TokenVault 读取

token-vault*

StartBrowserSession 授予权限以开启新的浏览器会话 写入

browser*

browser-custom*

StartCodeInterpreterSession 授予权限以开启新的代码解释器会话 写入

code-interpreter*

code-interpreter-custom*

StartMemoryExtractionJob 授予启动内存提取作业的权限 写入

memory*

bedrock-agentcore:strategyId

bedrock-agentcore:sessionId

bedrock-agentcore:actorId

StartPolicyGeneration 授予启动 AI 支持的策略生成请求的权限 写入

policy-engine*

StopBrowserSession 授予权限以停止浏览器会话 写入

browser*

browser-custom*

StopCodeInterpreterSession 授予权限以停止代码解释器会话 写入

code-interpreter*

code-interpreter-custom*

StopRuntimeSession 授予权限以停止运行时会话 写入

runtime*

runtime-endpoint*

SynchronizeGatewayTargets [仅权限] 授予权限以启用网关搜索 权限管理

gateway*

TagResource 授予标记基AgentCore 岩资源的权限 标签

apikeycredentialprovider

browser-custom

code-interpreter-custom

gateway

memory

oauth2credentialprovider

runtime

runtime-endpoint

token-vault

workload-identity

workload-identity-directory

aws:TagKeys

aws:RequestTag/${TagKey}

UntagResource 授予取消标记基岩资源的权限 AgentCore 标签

apikeycredentialprovider

browser-custom

code-interpreter-custom

gateway

memory

oauth2credentialprovider

runtime

runtime-endpoint

token-vault

workload-identity

workload-identity-directory

aws:TagKeys

UpdateAgentRuntime 授予权限以更新代理运行时 写入

runtime*

iam:PassRole

UpdateAgentRuntimeEndpoint 授予权限以更新代理运行时端点 写入

runtime*

runtime-endpoint*

UpdateApiKeyCredentialProvider 授予权限以更新现有 API 密钥凭证提供商 写入

apikeycredentialprovider*

token-vault*

UpdateBrowserStream 授予权限以更新浏览器会话流的状态 写入

browser*

browser-custom*

UpdateEvaluator 授予更新评估者的权限 写入

evaluator*

UpdateGateway 授予权限以更新现有网关 写入

gateway*

iam:PassRole

UpdateGatewayTarget 授予权限以更新现有网关目标 写入

gateway*

UpdateMemory 授予权限以更新内存资源 写入

memory*

iam:PassRole

UpdateOauth2CredentialProvider 授予更新现有 OAuth2 凭证提供者的权限 写入

oauth2credentialprovider*

token-vault*

UpdateOnlineEvaluationConfig 授予更新在线评估配置的权限 写入

online-evaluation-config*

iam:PassRole

UpdatePolicy 授予更新现有政策的权限 写入

policy*

policy-engine*

UpdatePolicyEngine 授予更新策略引擎的权限 写入

policy-engine*

UpdateWorkloadIdentity 授予权限以更新现有工作负载身份的元数据 写入

workload-identity*

workload-identity-directory*

Amazon Bedrock AgentCore 定义的资源类型

以下资源类型是由该服务定义的,可以在 IAM 权限策略语句的 Resource 元素中使用这些资源类型。操作表中的每个操作指定了可以使用该操作指定的资源类型。您也可以在策略中包含条件键,从而定义资源类型。这些键显示在资源类型表的最后一列。有关下表中各列的详细信息,请参阅资源类型表

资源类型 ARN 条件键
evaluator arn:${Partition}:bedrock-agentcore:${Region}:${Account}:evaluator/${EvaluatorId}
online-evaluation-config arn:${Partition}:bedrock-agentcore:${Region}:${Account}:online-evaluation-config/${OnlineEvaluationConfigId}
memory arn:${Partition}:bedrock-agentcore:${Region}:${Account}:memory/${MemoryId}

aws:ResourceTag/${TagKey}

gateway arn:${Partition}:bedrock-agentcore:${Region}:${Account}:gateway/${GatewayId}

aws:ResourceTag/${TagKey}

workload-identity arn:${Partition}:bedrock-agentcore:${Region}:${Account}:workload-identity-directory/${DirectoryId}/workload-identity/${WorkloadIdentityName}

aws:ResourceTag/${TagKey}

oauth2credentialprovider arn:${Partition}:bedrock-agentcore:${Region}:${Account}:token-vault/${TokenVaultId}/oauth2credentialprovider/${Name}

aws:ResourceTag/${TagKey}

apikeycredentialprovider arn:${Partition}:bedrock-agentcore:${Region}:${Account}:token-vault/${TokenVaultId}/apikeycredentialprovider/${Name}

aws:ResourceTag/${TagKey}

runtime arn:${Partition}:bedrock-agentcore:${Region}:${Account}:runtime/${RuntimeId}

aws:ResourceTag/${TagKey}

runtime-endpoint arn:${Partition}:bedrock-agentcore:${Region}:${Account}:runtime/${RuntimeId}/runtime-endpoint/${Name}

aws:ResourceTag/${TagKey}

code-interpreter-custom arn:${Partition}:bedrock-agentcore:${Region}:${Account}:code-interpreter-custom/${CodeInterpreterId}

aws:ResourceTag/${TagKey}

code-interpreter arn:${Partition}:bedrock-agentcore:${Region}:aws:code-interpreter/${CodeInterpreterId}
browser-custom arn:${Partition}:bedrock-agentcore:${Region}:${Account}:browser-custom/${BrowserId}

aws:ResourceTag/${TagKey}

browser arn:${Partition}:bedrock-agentcore:${Region}:aws:browser/${BrowserId}
workload-identity-directory arn:${Partition}:bedrock-agentcore:${Region}:${Account}:workload-identity-directory/${DirectoryId}

aws:ResourceTag/${TagKey}

token-vault arn:${Partition}:bedrock-agentcore:${Region}:${Account}:token-vault/${TokenVaultId}

aws:ResourceTag/${TagKey}

policy-engine arn:${Partition}:bedrock-agentcore:${Region}:${Account}:policy-engine/${PolicyEngineId}
policy arn:${Partition}:bedrock-agentcore:${Region}:${Account}:policy-engine/${PolicyEngineId}/policy/${PolicyId}
policy-generation arn:${Partition}:bedrock-agentcore:${Region}:${Account}:policy-engine/${PolicyEngineId}/policy-generation/${PolicyGenerationId}

Amazon Bedrock AgentCore 的条件键

Amazon Bedrock AgentCore 定义以下可以在 IAM 策略的 Condition 元素中使用的条件键。您可以使用这些键进一步细化应用策略语句的条件。有关下表中各列的详细信息,请参阅条件键表

要查看适用于所有服务的全局条件键,请参阅 AWS 全局条件上下文键

条件键 描述 Type
aws:RequestTag/${TagKey} 根据每个必需标签的允许值集,筛选对创建请求的访问权限 字符串
aws:ResourceTag/${TagKey} 根据与资源关联的标签值,筛选对操作的访问权限 字符串
aws:TagKeys 根据在请求中是否具有必需标签,筛选对创建请求的访问权限 ArrayOfString
bedrock-agentcore:GatewayAuthorizerType 按网关上的 authorizerType 属性筛选访问权限 字符串
bedrock-agentcore:InboundJwtClaim/aud 按请求中传递的 JWT 中的受众声明(aud)筛选访问权限 ArrayOfString
bedrock-agentcore:InboundJwtClaim/client_id 按请求中传递的 JWT 中的 client_id 声明筛选访问权限 字符串
bedrock-agentcore:InboundJwtClaim/iss 按请求中传递的 JWT 中的发布者(iss)声明筛选访问权限 字符串
bedrock-agentcore:InboundJwtClaim/scope 按请求中传递的 JWT 中的范围声明筛选访问权限 ArrayOfString
bedrock-agentcore:InboundJwtClaim/sub 按请求中传递的 JWT 中的主体声明(sub)筛选访问权限 字符串
bedrock-agentcore:actorId 按参与者 ID 筛选访问权限 字符串
bedrock-agentcore:namespace 按命名空间筛选访问权限 字符串
bedrock-agentcore:sessionId 按会话 ID 筛选访问权限 字符串
bedrock-agentcore:strategyId 按内存策略 ID 筛选访问权限 字符串
bedrock-agentcore:userid 按请求中传递的静态用户 ID 值筛选访问权限 字符串