/* * 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. *

*/ private String resourceArn; /** *

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

*

* The following are requirements for the resource policy: *

* */ private String resourcePolicy; /** *

* 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. *

* * @param 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 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. *

* * @return 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 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. *

* * @param 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. * @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: *

* * * @param resourcePolicy * A JSON-formatted string for an Amazon Web Services resource-based policy.

*

* The following are requirements for the resource policy: *

*