bedrock-agentcore:GetResourceOauth2Token

Read

bedrock-agentcore:GetResourceOauth2Token is a Read access-level action in the bedrock-agentcore service. Grants permission to retrieve access token with OAuth2 2LO or 3LO flow to access external resource

Resource types

ARNs that bedrock-agentcore:GetResourceOauth2Token can be scoped to in an IAM policy.

arn:${Partition}:bedrock-agentcore:${Region}:${Account}:token-vault/${TokenVaultId}/oauth2credentialprovider/${Name}
oauth2credentialprovider
arn:${Partition}:bedrock-agentcore:${Region}:${Account}:token-vault/${TokenVaultId}
token-vault
arn:${Partition}:bedrock-agentcore:${Region}:${Account}:workload-identity-directory/${DirectoryId}/workload-identity/${WorkloadIdentityName}
workload-identity
arn:${Partition}:bedrock-agentcore:${Region}:${Account}:workload-identity-directory/${DirectoryId}
workload-identity-directory

Condition keys

Keys you can use in the Condition block of a policy that grants bedrock-agentcore:GetResourceOauth2Token.

aws:ResourceTag/${TagKey} String

Filters access by having actions based on the tag value associated with the resource

Example IAM policy

A minimal policy that allows bedrock-agentcore:GetResourceOauth2Token. Replace "Resource": "*" with a specific ARN to follow least privilege.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowBedrockagentcoreGetResourceOauth2Token",
      "Effect": "Allow",
      "Action": "bedrock-agentcore:GetResourceOauth2Token",
      "Resource": "*"
    }
  ]
}

Related actions in bedrock-agentcore

View all bedrock-agentcore actions →