Class S3BucketConfiguration
- java.lang.Object
-
- software.amazon.awssdk.services.accessanalyzer.model.S3BucketConfiguration
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<S3BucketConfiguration.Builder,S3BucketConfiguration>
@Generated("software.amazon.awssdk:codegen") public final class S3BucketConfiguration extends Object implements SdkPojo, Serializable, ToCopyableBuilder<S3BucketConfiguration.Builder,S3BucketConfiguration>
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 Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceS3BucketConfiguration.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,S3AccessPointConfiguration>accessPoints()The configuration of Amazon S3 access points or multi-region access points for the bucket.List<S3BucketAclGrantConfiguration>bucketAclGrants()The proposed list of ACL grants for the Amazon S3 bucket.StringbucketPolicy()The proposed bucket policy for the Amazon S3 bucket.S3PublicAccessBlockConfigurationbucketPublicAccessBlock()The proposed block public access configuration for the Amazon S3 bucket.static S3BucketConfiguration.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasAccessPoints()For responses, this returns true if the service returned a value for the AccessPoints property.booleanhasBucketAclGrants()For responses, this returns true if the service returned a value for the BucketAclGrants property.inthashCode()List<SdkField<?>>sdkFields()static Class<? extends S3BucketConfiguration.Builder>serializableBuilderClass()S3BucketConfiguration.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
bucketPolicy
public final String bucketPolicy()
The proposed bucket policy for the Amazon S3 bucket.
- Returns:
- The proposed bucket policy for the Amazon S3 bucket.
-
hasBucketAclGrants
public final boolean hasBucketAclGrants()
For responses, this returns true if the service returned a value for the BucketAclGrants property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
bucketAclGrants
public final List<S3BucketAclGrantConfiguration> 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.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasBucketAclGrants()method.- Returns:
- 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.
-
bucketPublicAccessBlock
public final S3PublicAccessBlockConfiguration bucketPublicAccessBlock()
The proposed block public access configuration for the Amazon S3 bucket.
- Returns:
- The proposed block public access configuration for the Amazon S3 bucket.
-
hasAccessPoints
public final boolean hasAccessPoints()
For responses, this returns true if the service returned a value for the AccessPoints property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
accessPoints
public final Map<String,S3AccessPointConfiguration> 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.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasAccessPoints()method.- Returns:
- 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.
-
toBuilder
public S3BucketConfiguration.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<S3BucketConfiguration.Builder,S3BucketConfiguration>
-
builder
public static S3BucketConfiguration.Builder builder()
-
serializableBuilderClass
public static Class<? extends S3BucketConfiguration.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-