Skip to content
v2.278.0

StreamEncryption Class ​

Represents server-side encryption for an Amazon Firehose Delivery Stream.

Example ​

ts
declare const destination: firehose.IDestination;

// SSE with an AWS-owned key
new firehose.DeliveryStream(this, 'Delivery Stream with AWS Owned Key', {
  encryption: firehose.StreamEncryption.awsOwnedKey(),
  destination: destination,
});
// SSE with an customer-managed key that is created automatically by the CDK
new firehose.DeliveryStream(this, 'Delivery Stream with Customer Managed Key', {
  encryption: firehose.StreamEncryption.customerManagedKey(),
  destination: destination,
});
// SSE with an customer-managed key that is explicitly specified
declare const key: kms.Key;
new firehose.DeliveryStream(this, 'Delivery Stream with Customer Managed and Provided Key', {
  encryption: firehose.StreamEncryption.customerManagedKey(key),
  destination: destination,
});
python
# destination: firehose.IDestination
# SSE with an customer-managed key that is explicitly specified
# key: kms.Key


# SSE with an AWS-owned key
firehose.DeliveryStream(self, "Delivery Stream with AWS Owned Key",
    encryption=firehose.StreamEncryption.aws_owned_key(),
    destination=destination
)
# SSE with an customer-managed key that is created automatically by the CDK
firehose.DeliveryStream(self, "Delivery Stream with Customer Managed Key",
    encryption=firehose.StreamEncryption.customer_managed_key(),
    destination=destination
)
firehose.DeliveryStream(self, "Delivery Stream with Customer Managed and Provided Key",
    encryption=firehose.StreamEncryption.customer_managed_key(key),
    destination=destination
)
java
IDestination destination;
// SSE with an customer-managed key that is explicitly specified
Key key;


// SSE with an AWS-owned key
// SSE with an AWS-owned key
DeliveryStream.Builder.create(this, "Delivery Stream with AWS Owned Key")
        .encryption(StreamEncryption.awsOwnedKey())
        .destination(destination)
        .build();
// SSE with an customer-managed key that is created automatically by the CDK
// SSE with an customer-managed key that is created automatically by the CDK
DeliveryStream.Builder.create(this, "Delivery Stream with Customer Managed Key")
        .encryption(StreamEncryption.customerManagedKey())
        .destination(destination)
        .build();
DeliveryStream.Builder.create(this, "Delivery Stream with Customer Managed and Provided Key")
        .encryption(StreamEncryption.customerManagedKey(key))
        .destination(destination)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
IDestination destination;
// SSE with an customer-managed key that is explicitly specified
Key key;


// SSE with an AWS-owned key
// SSE with an AWS-owned key
new DeliveryStream(this, "Delivery Stream with AWS Owned Key", new DeliveryStreamProps {
    Encryption = StreamEncryption.AwsOwnedKey(),
    Destination = destination
});
// SSE with an customer-managed key that is created automatically by the CDK
// SSE with an customer-managed key that is created automatically by the CDK
new DeliveryStream(this, "Delivery Stream with Customer Managed Key", new DeliveryStreamProps {
    Encryption = StreamEncryption.CustomerManagedKey(),
    Destination = destination
});
new DeliveryStream(this, "Delivery Stream with Customer Managed and Provided Key", new DeliveryStreamProps {
    Encryption = StreamEncryption.CustomerManagedKey(key),
    Destination = destination
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var destination IDestination
// SSE with an customer-managed key that is explicitly specified
var key Key


// SSE with an AWS-owned key
// SSE with an AWS-owned key
firehose.NewDeliveryStream(this, jsii.String("Delivery Stream with AWS Owned Key"), &DeliveryStreamProps{
	Encryption: firehose.StreamEncryption_AwsOwnedKey(),
	Destination: destination,
})
// SSE with an customer-managed key that is created automatically by the CDK
// SSE with an customer-managed key that is created automatically by the CDK
firehose.NewDeliveryStream(this, jsii.String("Delivery Stream with Customer Managed Key"), &DeliveryStreamProps{
	Encryption: firehose.StreamEncryption_CustomerManagedKey(),
	Destination: destination,
})
firehose.NewDeliveryStream(this, jsii.String("Delivery Stream with Customer Managed and Provided Key"), &DeliveryStreamProps{
	Encryption: firehose.StreamEncryption_*CustomerManagedKey(key),
	Destination: destination,
})

Properties ​

encryptionKeymay be undefinedIKeyencryption_keymay be undefinedIKeyencryptionKeymay be undefinedIKeyEncryptionKeymay be undefinedIKeyEncryptionKeymay be undefinedIKey #
Optional KMS key used for customer managed encryption.
The type of server-side encryption for the Amazon Firehose delivery stream.

Methods ​

awsOwnedKey(): StreamEncryption // chainable@staticmethod def aws_owned_key() -> StreamEncryptionpublic static StreamEncryption awsOwnedKey()public static StreamEncryption AwsOwnedKey()func AwsOwnedKey() StreamEncryption static #
Configure server-side encryption using an AWS owned key.
customerManagedKey(encryptionKey?: IKey): StreamEncryption // chainable@staticmethod def customer_managed_key(encryption_key: typing.Optional[IKey] = None) -> StreamEncryptionpublic static StreamEncryption customerManagedKey(IKey encryptionKey)public static StreamEncryption CustomerManagedKey(IKey? encryptionKey = null)func CustomerManagedKey(EncryptionKey IKey) StreamEncryption static #
Configure server-side encryption using customer managed keys.
1 parameter

Parameters

  • encryptionKeyencryption_keyencryptionKeyencryptionKeyEncryptionKey — the KMS key for the delivery stream.
unencrypted(): StreamEncryption // chainable@staticmethod def unencrypted() -> StreamEncryptionpublic static StreamEncryption unencrypted()public static StreamEncryption Unencrypted()func Unencrypted() StreamEncryption static #
No server-side encryption is configured.