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'
)
[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
.
{
'ResourceArn': 'string',
'ResourcePolicy': 'string'
}
Response Structure
The Amazon Resource Name (ARN) of the CloudTrail channel attached to resource-based policy.
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