v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1444270263.9 KB

Attaches a resource-based permission policy to a CloudTrail channel that is used for an integration with an event source outside of Amazon Web Services. For more information about resource-based policies, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/security_iam_resource-based-policy-examples.html">CloudTrail resource-based policy examples</a> in the <i>CloudTrail User Guide</i>.

post/#X-Amz-Target=com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101.PutResourcePolicy

Headers

X-Amz-Target'com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101.PutResourcePolicy' required

Request body

ResourceArnstring 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: <code>arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel</code>.

ResourcePolicystring required
<p> A JSON-formatted string for an Amazon Web Services resource-based policy. </p> <p>The following are requirements for the resource policy:</p> <ul> <li> <p> Contains only one action: cloudtrail-data:PutAuditEvents </p> </li> <li> <p> Contains at least one statement. The policy can have a maximum of 20 statements. </p> </li> <li> <p> Each statement contains at least one principal. A statement can have a maximum of 50 principals. </p> </li> </ul>

Response

Success

ResourceArnstring

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

ResourcePolicystring

The JSON-formatted string of the Amazon Web Services resource-based policy attached to the CloudTrail channel.