Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

get_resource_policy

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

  • CloudTrail.Client.exceptions.ResourceARNNotValidException
  • CloudTrail.Client.exceptions.ResourceNotFoundException
  • CloudTrail.Client.exceptions.ResourcePolicyNotFoundException
  • CloudTrail.Client.exceptions.ResourceTypeNotSupportedException
  • CloudTrail.Client.exceptions.OperationNotPermittedException
  • CloudTrail.Client.exceptions.UnsupportedOperationException