/* * 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.accessanalyzer.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Proposed access control configuration for an Amazon S3 bucket. You can propose a configuration for a new Amazon S3 * bucket or an existing Amazon S3 bucket that you own by specifying the Amazon S3 bucket policy, bucket ACLs, bucket * BPA settings, Amazon S3 access points, and multi-region access points attached to the bucket. If the configuration is * for an existing Amazon S3 bucket and you do not specify the Amazon S3 bucket policy, the access preview uses the * existing policy attached to the bucket. If the access preview is for a new resource and you do not specify the Amazon * S3 bucket policy, the access preview assumes a bucket without a policy. To propose deletion of an existing bucket * policy, you can specify an empty string. For more information about bucket policy limits, see Bucket Policy Examples. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class S3BucketConfiguration implements Serializable, Cloneable, StructuredPojo { /** ** The proposed bucket policy for the Amazon S3 bucket. *
*/ private String bucketPolicy; /** ** The proposed list of ACL grants for the Amazon S3 bucket. You can propose up to 100 ACL grants per bucket. If the * proposed grant configuration is for an existing bucket, the access preview uses the proposed list of grant * configurations in place of the existing grants. Otherwise, the access preview uses the existing grants for the * bucket. *
*/ private java.util.List* The proposed block public access configuration for the Amazon S3 bucket. *
*/ private S3PublicAccessBlockConfiguration bucketPublicAccessBlock; /** ** The configuration of Amazon S3 access points or multi-region access points for the bucket. You can propose up to * 10 new access points per bucket. *
*/ private java.util.Map* The proposed bucket policy for the Amazon S3 bucket. *
* * @param bucketPolicy * The proposed bucket policy for the Amazon S3 bucket. */ public void setBucketPolicy(String bucketPolicy) { this.bucketPolicy = bucketPolicy; } /** ** The proposed bucket policy for the Amazon S3 bucket. *
* * @return The proposed bucket policy for the Amazon S3 bucket. */ public String getBucketPolicy() { return this.bucketPolicy; } /** ** The proposed bucket policy for the Amazon S3 bucket. *
* * @param bucketPolicy * The proposed bucket policy for the Amazon S3 bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public S3BucketConfiguration withBucketPolicy(String bucketPolicy) { setBucketPolicy(bucketPolicy); return this; } /** ** The proposed list of ACL grants for the Amazon S3 bucket. You can propose up to 100 ACL grants per bucket. If the * proposed grant configuration is for an existing bucket, the access preview uses the proposed list of grant * configurations in place of the existing grants. Otherwise, the access preview uses the existing grants for the * bucket. *
* * @return The proposed list of ACL grants for the Amazon S3 bucket. You can propose up to 100 ACL grants per * bucket. If the proposed grant configuration is for an existing bucket, the access preview uses the * proposed list of grant configurations in place of the existing grants. Otherwise, the access preview uses * the existing grants for the bucket. */ public java.util.List* The proposed list of ACL grants for the Amazon S3 bucket. You can propose up to 100 ACL grants per bucket. If the * proposed grant configuration is for an existing bucket, the access preview uses the proposed list of grant * configurations in place of the existing grants. Otherwise, the access preview uses the existing grants for the * bucket. *
* * @param bucketAclGrants * The proposed list of ACL grants for the Amazon S3 bucket. You can propose up to 100 ACL grants per bucket. * If the proposed grant configuration is for an existing bucket, the access preview uses the proposed list * of grant configurations in place of the existing grants. Otherwise, the access preview uses the existing * grants for the bucket. */ public void setBucketAclGrants(java.util.Collection* The proposed list of ACL grants for the Amazon S3 bucket. You can propose up to 100 ACL grants per bucket. If the * proposed grant configuration is for an existing bucket, the access preview uses the proposed list of grant * configurations in place of the existing grants. Otherwise, the access preview uses the existing grants for the * bucket. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setBucketAclGrants(java.util.Collection)} or {@link #withBucketAclGrants(java.util.Collection)} if you * want to override the existing values. *
* * @param bucketAclGrants * The proposed list of ACL grants for the Amazon S3 bucket. You can propose up to 100 ACL grants per bucket. * If the proposed grant configuration is for an existing bucket, the access preview uses the proposed list * of grant configurations in place of the existing grants. Otherwise, the access preview uses the existing * grants for the bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public S3BucketConfiguration withBucketAclGrants(S3BucketAclGrantConfiguration... bucketAclGrants) { if (this.bucketAclGrants == null) { setBucketAclGrants(new java.util.ArrayList* The proposed list of ACL grants for the Amazon S3 bucket. You can propose up to 100 ACL grants per bucket. If the * proposed grant configuration is for an existing bucket, the access preview uses the proposed list of grant * configurations in place of the existing grants. Otherwise, the access preview uses the existing grants for the * bucket. *
* * @param bucketAclGrants * The proposed list of ACL grants for the Amazon S3 bucket. You can propose up to 100 ACL grants per bucket. * If the proposed grant configuration is for an existing bucket, the access preview uses the proposed list * of grant configurations in place of the existing grants. Otherwise, the access preview uses the existing * grants for the bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public S3BucketConfiguration withBucketAclGrants(java.util.Collection* The proposed block public access configuration for the Amazon S3 bucket. *
* * @param bucketPublicAccessBlock * The proposed block public access configuration for the Amazon S3 bucket. */ public void setBucketPublicAccessBlock(S3PublicAccessBlockConfiguration bucketPublicAccessBlock) { this.bucketPublicAccessBlock = bucketPublicAccessBlock; } /** ** The proposed block public access configuration for the Amazon S3 bucket. *
* * @return The proposed block public access configuration for the Amazon S3 bucket. */ public S3PublicAccessBlockConfiguration getBucketPublicAccessBlock() { return this.bucketPublicAccessBlock; } /** ** The proposed block public access configuration for the Amazon S3 bucket. *
* * @param bucketPublicAccessBlock * The proposed block public access configuration for the Amazon S3 bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public S3BucketConfiguration withBucketPublicAccessBlock(S3PublicAccessBlockConfiguration bucketPublicAccessBlock) { setBucketPublicAccessBlock(bucketPublicAccessBlock); return this; } /** ** The configuration of Amazon S3 access points or multi-region access points for the bucket. You can propose up to * 10 new access points per bucket. *
* * @return The configuration of Amazon S3 access points or multi-region access points for the bucket. You can * propose up to 10 new access points per bucket. */ public java.util.Map* The configuration of Amazon S3 access points or multi-region access points for the bucket. You can propose up to * 10 new access points per bucket. *
* * @param accessPoints * The configuration of Amazon S3 access points or multi-region access points for the bucket. You can propose * up to 10 new access points per bucket. */ public void setAccessPoints(java.util.Map* The configuration of Amazon S3 access points or multi-region access points for the bucket. You can propose up to * 10 new access points per bucket. *
* * @param accessPoints * The configuration of Amazon S3 access points or multi-region access points for the bucket. You can propose * up to 10 new access points per bucket. * @return Returns a reference to this object so that method calls can be chained together. */ public S3BucketConfiguration withAccessPoints(java.util.Map