AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the PutResourcePolicy operation. 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 CloudTrail resource-based policy examples in the CloudTrail User Guide.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.CloudTrail.AmazonCloudTrailRequest
      Amazon.CloudTrail.Model.PutResourcePolicyRequest

Namespace: Amazon.CloudTrail.Model
Assembly: AWSSDK.CloudTrail.dll
Version: 3.x.y.z

Syntax

C#
public class PutResourcePolicyRequest : AmazonCloudTrailRequest
         IAmazonWebServiceRequest

The PutResourcePolicyRequest type exposes the following members

Constructors

NameDescription
Public Method PutResourcePolicyRequest()

Properties

NameTypeDescription
Public Property ResourceArn System.String

Gets and sets the property ResourceArn.

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.

Public Property ResourcePolicy System.String

Gets and sets the property ResourcePolicy.

A JSON-formatted string for an Amazon Web Services resource-based policy.

The following are requirements for the resource policy:

  • Contains only one action: cloudtrail-data:PutAuditEvents

  • Contains at least one statement. The policy can have a maximum of 20 statements.

  • Each statement contains at least one principal. A statement can have a maximum of 50 principals.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5