Class 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
    • 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 the isEmpty() 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 the isEmpty() 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.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • 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.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)