Class DataProtectionPolicy
Creates a data protection policy for CloudWatch Logs log groups.
Inheritance
System.Object
DataProtectionPolicy
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DataProtectionPolicy : DeputyBase
Syntax (vb)
Public Class DataProtectionPolicy
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.KinesisFirehose.Alpha;
using Amazon.CDK.AWS.KinesisFirehose.Destinations.Alpha;
var logGroupDestination = new LogGroup(this, "LogGroupLambdaAudit", new LogGroupProps {
LogGroupName = "auditDestinationForCDK"
});
var bucket = new Bucket(this, "audit-bucket");
var s3Destination = new S3Bucket(bucket);
var deliveryStream = new DeliveryStream(this, "Delivery Stream", new DeliveryStreamProps {
Destinations = new [] { s3Destination }
});
var dataProtectionPolicy = new DataProtectionPolicy(new DataProtectionPolicyProps {
Name = "data protection policy",
Description = "policy description",
Identifiers = new [] { DataIdentifier.DRIVERSLICENSE_US, // managed data identifier
new DataIdentifier("EmailAddress"), // forward compatibility for new managed data identifiers
new CustomDataIdentifier("EmployeeId", "EmployeeId-\\d{9}") }, // custom data identifier
LogGroupAuditDestination = logGroupDestination,
S3BucketAuditDestination = bucket,
DeliveryStreamNameAuditDestination = deliveryStream.DeliveryStreamName
});
new LogGroup(this, "LogGroupLambda", new LogGroupProps {
LogGroupName = "cdkIntegLogGroup",
DataProtectionPolicy = dataProtectionPolicy
});
Synopsis
Constructors
DataProtectionPolicy(IDataProtectionPolicyProps) | |
DataProtectionPolicy(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
DataProtectionPolicy(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Constructors
DataProtectionPolicy(IDataProtectionPolicyProps)
public DataProtectionPolicy(IDataProtectionPolicyProps props)
Parameters
DataProtectionPolicy(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected DataProtectionPolicy(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
DataProtectionPolicy(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected DataProtectionPolicy(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props