Skip to content

Bedrock Agentcore Control  >  Operations  >  put_resource_policy

put_resource_policy

Operation

put_resource_policy async

put_resource_policy(input: PutResourcePolicyInput, plugins: list[Plugin] | None = None) -> PutResourcePolicyOutput

Creates or updates a resource-based policy for a resource with the specified resourceArn.

Note

This feature is currently available only for AgentCore Runtime and Gateway.

Parameters:

Name Type Description Default
input PutResourcePolicyInput

An instance of PutResourcePolicyInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
PutResourcePolicyOutput

An instance of PutResourcePolicyOutput.

Input

PutResourcePolicyInput dataclass

Dataclass for PutResourcePolicyInput structure.

Attributes

policy class-attribute instance-attribute
policy: str | None = None

The resource policy to create or update.

resource_arn class-attribute instance-attribute
resource_arn: str | None = None

The Amazon Resource Name (ARN) of the resource for which to create or update the resource policy.

Output

PutResourcePolicyOutput dataclass

Dataclass for PutResourcePolicyOutput structure.

Attributes

policy instance-attribute
policy: str

The resource policy that was created or updated.