Skip to content
v2.278.0

BlockedEncryptionTypesProperty Struct ​

A bucket-level setting for Amazon S3 general purpose buckets used to prevent the upload of new objects encrypted with the specified server-side encryption type.

For example, blocking an encryption type will block PutObject , CopyObject , PostObject , multipart upload, and replication requests to the bucket for objects with the specified encryption type. However, you can continue to read and list any pre-existing objects already encrypted with the specified encryption type. For more information, see Blocking or unblocking SSE-C for a general purpose bucket .

This data type is used with the following actions:

You must have the s3:GetEncryptionConfiguration permission to view a bucket's encryption type.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3 as s3 } from 'aws-cdk-lib';
const blockedEncryptionTypesProperty: s3.CfnBucket.BlockedEncryptionTypesProperty = {
  encryptionType: ['encryptionType'],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_s3 as s3

blocked_encryption_types_property = s3.CfnBucket.BlockedEncryptionTypesProperty(
    encryption_type=["encryptionType"]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3.*;

BlockedEncryptionTypesProperty blockedEncryptionTypesProperty = BlockedEncryptionTypesProperty.builder()
        .encryptionType(List.of("encryptionType"))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;

var blockedEncryptionTypesProperty = new BlockedEncryptionTypesProperty {
    EncryptionType = new [] { "encryptionType" }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

blockedEncryptionTypesProperty := &BlockedEncryptionTypesProperty{
	EncryptionType: []*string{
		jsii.String("encryptionType"),
	},
}

Properties ​

encryptionTypeoptionalstring[]encryption_typeoptionaltyping.List[str]encryptionTypeoptionalList<String>EncryptionTypeoptionalstring[]EncryptionTypeoptional*[]*string #
The object encryption type that you want to block or unblock for an Amazon S3 general purpose bucket.
notes

Currently, this parameter only supports blocking or unblocking server side encryption with customer-provided keys (SSE-C). For more information about SSE-C, see Using server-side encryption with customer-provided keys (SSE-C) .