AgentsforBedrock / Client / put_resource_policy
put_resource_policy¶
- AgentsforBedrock.Client.put_resource_policy(**kwargs)¶
Associates a resource policy with a knowledge base. A resource policy allows other AWS accounts to access the knowledge base. For more information, see Cross-account access for knowledge bases.
See also: AWS API Documentation
Request Syntax
response = client.put_resource_policy( resourceArn='string', policy='string', expectedRevisionId='string' )
- Parameters:
resourceArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the knowledge base to attach the resource policy to.
policy (string) –
[REQUIRED]
The JSON-formatted resource policy to associate with the knowledge base.
expectedRevisionId (string) – The expected revision identifier of the resource policy. Use this to prevent conflicts when multiple users update the same policy concurrently. Specify the
revisionIdfrom the most recentGetResourcePolicyorPutResourcePolicyresponse.
- Return type:
dict
- Returns:
Response Syntax
{ 'resourceArn': 'string', 'revisionId': 'string' }
Response Structure
(dict) –
resourceArn (string) –
The ARN of the knowledge base that the resource policy was attached to.
revisionId (string) –
The revision identifier of the resource policy. Use this value in the
expectedRevisionIdfield of a subsequentPutResourcePolicyorDeleteResourcePolicyrequest.
Exceptions