PolicyResource
- class aws_cdk.aws_bedrockagentcore.PolicyResource(*args: Any, **kwargs)
Bases:
objectThe resource a policy statement applies to.
AgentCore rejects a policy whose resource is an unconstrained wildcard, so a statement must name either a resource type or a specific resource.
Example:
from aws_cdk.aws_bedrockagentcore import PolicyResource # gateway_arn: str PolicyResource.any_of_type("AgentCore::Gateway") # resource is AgentCore::Gateway PolicyResource.instance("AgentCore::Gateway", gateway_arn)
Static Methods
- classmethod any_of_type(entity_type)
Any resource of the given entity type.
- Parameters:
entity_type (
str) –The entity type, for example ‘AgentCore::Gateway’.
- Return type:
- classmethod instance(entity_type, entity_arn)
One specific resource.
AgentCore requires a specific resource when the statement names specific actions rather than any action.
- Parameters:
entity_type (
str) –The entity type, for example ‘AgentCore::Gateway’.
entity_arn (
str) –The resource ARN or identifier.
- Return type: