/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.cloudtrail.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PutResourcePolicyRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* 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
.
*
* 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. *
*
* 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
.
*
arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel
.
*/
public void setResourceArn(String resourceArn) {
this.resourceArn = 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
.
*
arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel
.
*/
public String getResourceArn() {
return this.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
.
*
arn:aws:cloudtrail:us-east-2:123456789012:channel/MyChannel
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutResourcePolicyRequest withResourceArn(String resourceArn) {
setResourceArn(resourceArn);
return this;
}
/**
* * 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. *
** 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. *
** 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. *
** 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. *
** 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. *
** 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. *
*