@Generated(value="software.amazon.awssdk:codegen") public final class BucketMetadata extends Object implements SdkPojo, Serializable, ToCopyableBuilder<BucketMetadata.Builder,BucketMetadata>
Provides statistical data and other information about an S3 bucket that Amazon Macie monitors and analyzes for your account. If an error occurs when Macie attempts to retrieve and process metadata from Amazon S3 for the bucket and the bucket's objects, the value for the versioning property is false and the value for most other properties is null. Key exceptions are accountId, bucketArn, bucketCreatedAt, bucketName, lastUpdated, and region. To identify the cause of the error, refer to the errorCode and errorMessage values.
| Modifier and Type | Class and Description |
|---|---|
static interface |
BucketMetadata.Builder |
| Modifier and Type | Method and Description |
|---|---|
String |
accountId()
The unique identifier for the Amazon Web Services account that owns the bucket.
|
AllowsUnencryptedObjectUploads |
allowsUnencryptedObjectUploads()
Specifies whether the bucket policy for the bucket requires server-side encryption of objects when objects are
uploaded to the bucket.
|
String |
allowsUnencryptedObjectUploadsAsString()
Specifies whether the bucket policy for the bucket requires server-side encryption of objects when objects are
uploaded to the bucket.
|
String |
bucketArn()
The Amazon Resource Name (ARN) of the bucket.
|
Instant |
bucketCreatedAt()
The date and time, in UTC and extended ISO 8601 format, when the bucket was created, or changes such as edits to
the bucket's policy were most recently made to the bucket.
|
String |
bucketName()
The name of the bucket.
|
static BucketMetadata.Builder |
builder() |
Long |
classifiableObjectCount()
The total number of objects that Amazon Macie can analyze in the bucket.
|
Long |
classifiableSizeInBytes()
The total storage size, in bytes, of the objects that Amazon Macie can analyze in the bucket.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
BucketMetadataErrorCode |
errorCode()
Specifies the error code for an error that prevented Amazon Macie from retrieving and processing information
about the bucket and the bucket's objects.
|
String |
errorCodeAsString()
Specifies the error code for an error that prevented Amazon Macie from retrieving and processing information
about the bucket and the bucket's objects.
|
String |
errorMessage()
A brief description of the error (errorCode) that prevented Amazon Macie from retrieving and processing
information about the bucket and the bucket's objects.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
boolean |
hasTags()
For responses, this returns true if the service returned a value for the Tags property.
|
JobDetails |
jobDetails()
Specifies whether any one-time or recurring classification jobs are configured to analyze data in the bucket,
and, if so, the details of the job that ran most recently.
|
Instant |
lastAutomatedDiscoveryTime()
The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently performed automated
sensitive data discovery for the bucket.
|
Instant |
lastUpdated()
The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently retrieved both bucket and
object metadata from Amazon S3 for the bucket.
|
Long |
objectCount()
The total number of objects in the bucket.
|
ObjectCountByEncryptionType |
objectCountByEncryptionType()
The total number of objects that are in the bucket, grouped by server-side encryption type.
|
BucketPublicAccess |
publicAccess()
Specifies whether the bucket is publicly accessible due to the combination of permissions settings that apply to
the bucket, and provides information about those settings.
|
String |
region()
The Amazon Web Services Region that hosts the bucket.
|
ReplicationDetails |
replicationDetails()
Specifies whether the bucket is configured to replicate one or more objects to buckets for other Amazon Web
Services accounts and, if so, which accounts.
|
List<SdkField<?>> |
sdkFields() |
Integer |
sensitivityScore()
The sensitivity score for the bucket, ranging from -1 (no analysis due to an error) to 100 (sensitive).
|
static Class<? extends BucketMetadata.Builder> |
serializableBuilderClass() |
BucketServerSideEncryption |
serverSideEncryption()
Specifies whether the bucket encrypts new objects by default and, if so, the type of server-side encryption
that's used.
|
SharedAccess |
sharedAccess()
Specifies whether the bucket is shared with another Amazon Web Services account.
|
String |
sharedAccessAsString()
Specifies whether the bucket is shared with another Amazon Web Services account.
|
Long |
sizeInBytes()
The total storage size, in bytes, of the bucket.
|
Long |
sizeInBytesCompressed()
The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the bucket.
|
List<KeyValuePair> |
tags()
An array that specifies the tags (keys and values) that are associated with the bucket.
|
BucketMetadata.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
ObjectLevelStatistics |
unclassifiableObjectCount()
The total number of objects that Amazon Macie can't analyze in the bucket.
|
ObjectLevelStatistics |
unclassifiableObjectSizeInBytes()
The total storage size, in bytes, of the objects that Amazon Macie can't analyze in the bucket.
|
Boolean |
versioning()
Specifies whether versioning is enabled for the bucket.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final String accountId()
The unique identifier for the Amazon Web Services account that owns the bucket.
public final AllowsUnencryptedObjectUploads allowsUnencryptedObjectUploads()
Specifies whether the bucket policy for the bucket requires server-side encryption of objects when objects are uploaded to the bucket. Possible values are:
FALSE - The bucket policy requires server-side encryption of new objects. PutObject requests must include a valid server-side encryption header.
TRUE - The bucket doesn't have a bucket policy or it has a bucket policy that doesn't require server-side encryption of new objects. If a bucket policy exists, it doesn't require PutObject requests to include a valid server-side encryption header.
UNKNOWN - Amazon Macie can't determine whether the bucket policy requires server-side encryption of new objects.
Valid server-side encryption headers are: x-amz-server-side-encryption with a value of AES256 or aws:kms, and x-amz-server-side-encryption-customer-algorithm with a value of AES256.
If the service returns an enum value that is not available in the current SDK version,
allowsUnencryptedObjectUploads will return AllowsUnencryptedObjectUploads.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from allowsUnencryptedObjectUploadsAsString().
FALSE - The bucket policy requires server-side encryption of new objects. PutObject requests must include a valid server-side encryption header.
TRUE - The bucket doesn't have a bucket policy or it has a bucket policy that doesn't require server-side encryption of new objects. If a bucket policy exists, it doesn't require PutObject requests to include a valid server-side encryption header.
UNKNOWN - Amazon Macie can't determine whether the bucket policy requires server-side encryption of new objects.
Valid server-side encryption headers are: x-amz-server-side-encryption with a value of AES256 or aws:kms, and x-amz-server-side-encryption-customer-algorithm with a value of AES256.
AllowsUnencryptedObjectUploadspublic final String allowsUnencryptedObjectUploadsAsString()
Specifies whether the bucket policy for the bucket requires server-side encryption of objects when objects are uploaded to the bucket. Possible values are:
FALSE - The bucket policy requires server-side encryption of new objects. PutObject requests must include a valid server-side encryption header.
TRUE - The bucket doesn't have a bucket policy or it has a bucket policy that doesn't require server-side encryption of new objects. If a bucket policy exists, it doesn't require PutObject requests to include a valid server-side encryption header.
UNKNOWN - Amazon Macie can't determine whether the bucket policy requires server-side encryption of new objects.
Valid server-side encryption headers are: x-amz-server-side-encryption with a value of AES256 or aws:kms, and x-amz-server-side-encryption-customer-algorithm with a value of AES256.
If the service returns an enum value that is not available in the current SDK version,
allowsUnencryptedObjectUploads will return AllowsUnencryptedObjectUploads.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from allowsUnencryptedObjectUploadsAsString().
FALSE - The bucket policy requires server-side encryption of new objects. PutObject requests must include a valid server-side encryption header.
TRUE - The bucket doesn't have a bucket policy or it has a bucket policy that doesn't require server-side encryption of new objects. If a bucket policy exists, it doesn't require PutObject requests to include a valid server-side encryption header.
UNKNOWN - Amazon Macie can't determine whether the bucket policy requires server-side encryption of new objects.
Valid server-side encryption headers are: x-amz-server-side-encryption with a value of AES256 or aws:kms, and x-amz-server-side-encryption-customer-algorithm with a value of AES256.
AllowsUnencryptedObjectUploadspublic final String bucketArn()
The Amazon Resource Name (ARN) of the bucket.
public final Instant bucketCreatedAt()
The date and time, in UTC and extended ISO 8601 format, when the bucket was created, or changes such as edits to the bucket's policy were most recently made to the bucket.
public final String bucketName()
The name of the bucket.
public final Long classifiableObjectCount()
The total number of objects that Amazon Macie can analyze in the bucket. These objects use a supported storage class and have a file name extension for a supported file or storage format.
public final Long classifiableSizeInBytes()
The total storage size, in bytes, of the objects that Amazon Macie can analyze in the bucket. These objects use a supported storage class and have a file name extension for a supported file or storage format.
If versioning is enabled for the bucket, Macie calculates this value based on the size of the latest version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each applicable object in the bucket.
If versioning is enabled for the bucket, Macie calculates this value based on the size of the latest version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each applicable object in the bucket.
public final BucketMetadataErrorCode errorCode()
Specifies the error code for an error that prevented Amazon Macie from retrieving and processing information about the bucket and the bucket's objects. If this value is ACCESS_DENIED, Macie doesn't have permission to retrieve the information. For example, the bucket has a restrictive bucket policy and Amazon S3 denied the request. If this value is null, Macie was able to retrieve and process the information.
If the service returns an enum value that is not available in the current SDK version, errorCode will
return BucketMetadataErrorCode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available
from errorCodeAsString().
BucketMetadataErrorCodepublic final String errorCodeAsString()
Specifies the error code for an error that prevented Amazon Macie from retrieving and processing information about the bucket and the bucket's objects. If this value is ACCESS_DENIED, Macie doesn't have permission to retrieve the information. For example, the bucket has a restrictive bucket policy and Amazon S3 denied the request. If this value is null, Macie was able to retrieve and process the information.
If the service returns an enum value that is not available in the current SDK version, errorCode will
return BucketMetadataErrorCode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available
from errorCodeAsString().
BucketMetadataErrorCodepublic final String errorMessage()
A brief description of the error (errorCode) that prevented Amazon Macie from retrieving and processing information about the bucket and the bucket's objects. This value is null if Macie was able to retrieve and process the information.
public final JobDetails jobDetails()
Specifies whether any one-time or recurring classification jobs are configured to analyze data in the bucket, and, if so, the details of the job that ran most recently.
public final Instant lastAutomatedDiscoveryTime()
The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently performed automated sensitive data discovery for the bucket. This value is null if automated sensitive data discovery is currently disabled for your account.
public final Instant lastUpdated()
The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently retrieved both bucket and object metadata from Amazon S3 for the bucket.
public final Long objectCount()
The total number of objects in the bucket.
public final ObjectCountByEncryptionType objectCountByEncryptionType()
The total number of objects that are in the bucket, grouped by server-side encryption type. This includes a grouping that reports the total number of objects that aren't encrypted or use client-side encryption.
public final BucketPublicAccess publicAccess()
Specifies whether the bucket is publicly accessible due to the combination of permissions settings that apply to the bucket, and provides information about those settings.
public final String region()
The Amazon Web Services Region that hosts the bucket.
public final ReplicationDetails replicationDetails()
Specifies whether the bucket is configured to replicate one or more objects to buckets for other Amazon Web Services accounts and, if so, which accounts.
public final Integer sensitivityScore()
The sensitivity score for the bucket, ranging from -1 (no analysis due to an error) to 100 (sensitive). This value is null if automated sensitive data discovery is currently disabled for your account.
public final BucketServerSideEncryption serverSideEncryption()
Specifies whether the bucket encrypts new objects by default and, if so, the type of server-side encryption that's used.
public final SharedAccess sharedAccess()
Specifies whether the bucket is shared with another Amazon Web Services account. Possible values are:
EXTERNAL - The bucket is shared with an Amazon Web Services account that isn't part of the same Amazon Macie organization.
INTERNAL - The bucket is shared with an Amazon Web Services account that's part of the same Amazon Macie organization.
NOT_SHARED - The bucket isn't shared with other Amazon Web Services accounts.
UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket.
If the service returns an enum value that is not available in the current SDK version, sharedAccess will
return SharedAccess.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
sharedAccessAsString().
Specifies whether the bucket is shared with another Amazon Web Services account. Possible values are:
EXTERNAL - The bucket is shared with an Amazon Web Services account that isn't part of the same Amazon Macie organization.
INTERNAL - The bucket is shared with an Amazon Web Services account that's part of the same Amazon Macie organization.
NOT_SHARED - The bucket isn't shared with other Amazon Web Services accounts.
UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket.
SharedAccesspublic final String sharedAccessAsString()
Specifies whether the bucket is shared with another Amazon Web Services account. Possible values are:
EXTERNAL - The bucket is shared with an Amazon Web Services account that isn't part of the same Amazon Macie organization.
INTERNAL - The bucket is shared with an Amazon Web Services account that's part of the same Amazon Macie organization.
NOT_SHARED - The bucket isn't shared with other Amazon Web Services accounts.
UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket.
If the service returns an enum value that is not available in the current SDK version, sharedAccess will
return SharedAccess.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from
sharedAccessAsString().
Specifies whether the bucket is shared with another Amazon Web Services account. Possible values are:
EXTERNAL - The bucket is shared with an Amazon Web Services account that isn't part of the same Amazon Macie organization.
INTERNAL - The bucket is shared with an Amazon Web Services account that's part of the same Amazon Macie organization.
NOT_SHARED - The bucket isn't shared with other Amazon Web Services accounts.
UNKNOWN - Amazon Macie wasn't able to evaluate the shared access settings for the bucket.
SharedAccesspublic final Long sizeInBytes()
The total storage size, in bytes, of the bucket.
If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest version of each object in the bucket. This value doesn't reflect the storage size of all versions of each object in the bucket.
If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest version of each object in the bucket. This value doesn't reflect the storage size of all versions of each object in the bucket.
public final Long sizeInBytesCompressed()
The total storage size, in bytes, of the objects that are compressed (.gz, .gzip, .zip) files in the bucket.
If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each applicable object in the bucket.
If versioning is enabled for the bucket, Amazon Macie calculates this value based on the size of the latest version of each applicable object in the bucket. This value doesn't reflect the storage size of all versions of each applicable object in the bucket.
public final boolean hasTags()
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.public final List<KeyValuePair> tags()
An array that specifies the tags (keys and values) that are associated with 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 hasTags() method.
public final ObjectLevelStatistics unclassifiableObjectCount()
The total number of objects that Amazon Macie can't analyze in the bucket. These objects don't use a supported storage class or don't have a file name extension for a supported file or storage format.
public final ObjectLevelStatistics unclassifiableObjectSizeInBytes()
The total storage size, in bytes, of the objects that Amazon Macie can't analyze in the bucket. These objects don't use a supported storage class or don't have a file name extension for a supported file or storage format.
public final Boolean versioning()
Specifies whether versioning is enabled for the bucket.
public BucketMetadata.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<BucketMetadata.Builder,BucketMetadata>public static BucketMetadata.Builder builder()
public static Class<? extends BucketMetadata.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2023. All rights reserved.