Class DataRetentionStorageConfiguration

java.lang.Object
software.amazon.awssdk.services.bedrock.model.DataRetentionStorageConfiguration
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<DataRetentionStorageConfiguration.Builder,DataRetentionStorageConfiguration>

@Generated("software.amazon.awssdk:codegen") public final class DataRetentionStorageConfiguration extends Object implements SdkPojo, Serializable, ToCopyableBuilder<DataRetentionStorageConfiguration.Builder,DataRetentionStorageConfiguration>

You provide the Amazon S3 destination and AWS Key Management Service (AWS KMS) key for retained data.

Before saving a customer-managed destination, Amazon Bedrock validates that you can use the bucket and key and that their resource policies permit the required Amazon Bedrock access. If validation fails, Amazon Bedrock rejects the configuration without saving it.

You need s3:PutObject, s3:GetObject, kms:GenerateDataKey, and kms:Decrypt permissions. The Amazon S3 bucket policy must allow the Amazon Bedrock service principal, bedrock.amazonaws.com, to put, get, and delete objects with conditions appropriate to the configuration scope.

Use aws:SourceAccount for account scope, aws:SourceOrgID for organization scope, and both aws:SourceAccount and the project's aws:SourceArn for project scope. Validation rejects resource policies that allow the service principal to access the destination without the required scope conditions.

The key policy must permit kms:GenerateDataKey and kms:Decrypt for both uses of the key: direct use by Amazon Bedrock with the scope conditions, and use through Amazon S3 with a kms:ViaService condition for the bucket's Region and kms:EncryptionContext:aws:s3:arn scoped to the bucket.

See Also:
  • Method Details

    • kmsKeyArn

      public final String kmsKeyArn()

      The Amazon Resource Name (ARN) of the customer managed AWS Key Management Service (AWS KMS) key you use to encrypt retained data. Specify an enabled symmetric encryption key in the AWS Region where you register the configuration. You cannot specify a key alias.

      Returns:
      The Amazon Resource Name (ARN) of the customer managed AWS Key Management Service (AWS KMS) key you use to encrypt retained data. Specify an enabled symmetric encryption key in the AWS Region where you register the configuration. You cannot specify a key alias.
    • s3BucketArn

      public final String s3BucketArn()

      The Amazon Resource Name (ARN) of the Amazon S3 bucket that receives retained data. The bucket must be in the AWS Region where you register the configuration.

      Returns:
      The Amazon Resource Name (ARN) of the Amazon S3 bucket that receives retained data. The bucket must be in the AWS Region where you register the configuration.
    • s3BucketOwner

      public final String s3BucketOwner()

      The AWS account ID of the destination bucket's owner. You must specify the owner, even when the bucket belongs to another account. Amazon Bedrock uses this ID to verify bucket ownership for each delivery request.

      Returns:
      The AWS account ID of the destination bucket's owner. You must specify the owner, even when the bucket belongs to another account. Amazon Bedrock uses this ID to verify bucket ownership for each delivery request.
    • toBuilder

      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<DataRetentionStorageConfiguration.Builder,DataRetentionStorageConfiguration>
      Returns:
      a builder for type T
    • builder

    • serializableBuilderClass

      public static Class<? extends DataRetentionStorageConfiguration.Builder> serializableBuilderClass()
    • hashCode

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

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • 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)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.