CloudTrail / Client / get_resource_policy

get_resource_policy#

CloudTrail.Client.get_resource_policy(**kwargs)#

Retrieves the JSON text of the resource-based policy document attached to the CloudTrail channel.

See also: AWS API Documentation

Request Syntax

response = client.get_resource_policy(
    ResourceArn='string'
)
Parameters:

ResourceArn (string) –

[REQUIRED]

The Amazon Resource Name (ARN) of the CloudTrail channel attached to the resource-based policy. The following is the format of a resource ARN: arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel.

Return type:

dict

Returns:

Response Syntax

{
    'ResourceArn': 'string',
    'ResourcePolicy': 'string'
}

Response Structure

  • (dict) –

    • ResourceArn (string) –

      The Amazon Resource Name (ARN) of the CloudTrail channel attached to resource-based policy.

    • ResourcePolicy (string) –

      A JSON-formatted string that contains the resource-based policy attached to the CloudTrail channel.

Exceptions