describe_resource_policy

describe_resource_policy(**kwargs)

Gets the details of a resource-based policy that is attached to a custom model, including the JSON body of the policy.

See also: AWS API Documentation

Request Syntax

response = client.describe_resource_policy(
    ResourceArn='string'
)
Parameters
ResourceArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the custom model version that has the resource policy.

Return type
dict
Returns
Response Syntax
{
    'ResourcePolicy': 'string',
    'CreationTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1),
    'PolicyRevisionId': 'string'
}

Response Structure

  • (dict) --
    • ResourcePolicy (string) --

      The JSON body of the resource-based policy.

    • CreationTime (datetime) --

      The time at which the policy was created.

    • LastModifiedTime (datetime) --

      The time at which the policy was last modified.

    • PolicyRevisionId (string) --

      The revision ID of the policy. Each time you modify a policy, Amazon Comprehend assigns a new revision ID, and it deletes the prior version of the policy.

Exceptions

  • Comprehend.Client.exceptions.InvalidRequestException
  • Comprehend.Client.exceptions.ResourceNotFoundException
  • Comprehend.Client.exceptions.InternalServerException