Class: AWSCDK::Logs::DataProtectionPolicyProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
logs/data_protection_policy_props.rb

Overview

Properties for creating a data protection policy.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identifiers:, delivery_stream_name_audit_destination: nil, description: nil, log_group_audit_destination: nil, name: nil, s3_bucket_audit_destination: nil) ⇒ DataProtectionPolicyProps

Returns a new instance of DataProtectionPolicyProps.

Parameters:

  • identifiers (Array<AWSCDK::Logs::DataIdentifier>)

    List of data protection identifiers.

  • delivery_stream_name_audit_destination (String, nil) (defaults to: nil)

    Amazon Data Firehose delivery stream to send audit findings to.

  • description (String, nil) (defaults to: nil)

    Description of the data protection policy.

  • log_group_audit_destination (AWSCDK::Interfaces::AWSLogs::ILogGroupRef, nil) (defaults to: nil)

    CloudWatch Logs log group to send audit findings to.

  • name (String, nil) (defaults to: nil)

    Name of the data protection policy.

  • s3_bucket_audit_destination (AWSCDK::Interfaces::AWSS3::IBucketRef, nil) (defaults to: nil)

    S3 bucket to send audit findings to.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'logs/data_protection_policy_props.rb', line 13

def initialize(identifiers:, delivery_stream_name_audit_destination: nil, description: nil, log_group_audit_destination: nil, name: nil, s3_bucket_audit_destination: nil)
  @identifiers = identifiers
  Jsii::Type.check_type(@identifiers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sb2dzLkRhdGFJZGVudGlmaWVyIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "identifiers")
  @delivery_stream_name_audit_destination = delivery_stream_name_audit_destination
  Jsii::Type.check_type(@delivery_stream_name_audit_destination, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deliveryStreamNameAuditDestination") unless @delivery_stream_name_audit_destination.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @log_group_audit_destination = log_group_audit_destination
  Jsii::Type.check_type(@log_group_audit_destination, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sb2dzLklMb2dHcm91cFJlZiJ9")), "logGroupAuditDestination") unless @log_group_audit_destination.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @s3_bucket_audit_destination = s3_bucket_audit_destination
  Jsii::Type.check_type(@s3_bucket_audit_destination, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19zMy5JQnVja2V0UmVmIn0=")), "s3BucketAuditDestination") unless @s3_bucket_audit_destination.nil?
end

Instance Attribute Details

#delivery_stream_name_audit_destinationString? (readonly)

Note:

Default: - no firehose delivery stream audit destination

Amazon Data Firehose delivery stream to send audit findings to.

The delivery stream must already exist.

Returns:

  • (String, nil)


41
42
43
# File 'logs/data_protection_policy_props.rb', line 41

def delivery_stream_name_audit_destination
  @delivery_stream_name_audit_destination
end

#descriptionString? (readonly)

Note:

Default: - 'cdk generated data protection policy'

Description of the data protection policy.

Returns:

  • (String, nil)


46
47
48
# File 'logs/data_protection_policy_props.rb', line 46

def description
  @description
end

#identifiersArray<AWSCDK::Logs::DataIdentifier> (readonly)

List of data protection identifiers.

Managed data identifiers must be in the following list: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL-managed-data-identifiers.html Custom data identifiers must have a valid regex defined: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL-custom-data-identifiers.html#custom-data-identifiers-constraints

Returns:



34
35
36
# File 'logs/data_protection_policy_props.rb', line 34

def identifiers
  @identifiers
end

#log_group_audit_destinationAWSCDK::Interfaces::AWSLogs::ILogGroupRef? (readonly)

Note:

Default: - no CloudWatch Logs audit destination

CloudWatch Logs log group to send audit findings to.

The log group must already exist prior to creating the data protection policy.



53
54
55
# File 'logs/data_protection_policy_props.rb', line 53

def log_group_audit_destination
  @log_group_audit_destination
end

#nameString? (readonly)

Note:

Default: - 'data-protection-policy-cdk'

Name of the data protection policy.

Returns:

  • (String, nil)


58
59
60
# File 'logs/data_protection_policy_props.rb', line 58

def name
  @name
end

#s3_bucket_audit_destinationAWSCDK::Interfaces::AWSS3::IBucketRef? (readonly)

Note:

Default: - no S3 bucket audit destination

S3 bucket to send audit findings to.

The bucket must already exist.



65
66
67
# File 'logs/data_protection_policy_props.rb', line 65

def s3_bucket_audit_destination
  @s3_bucket_audit_destination
end

Class Method Details

.jsii_propertiesObject



67
68
69
70
71
72
73
74
75
76
# File 'logs/data_protection_policy_props.rb', line 67

def self.jsii_properties
  {
    :identifiers => "identifiers",
    :delivery_stream_name_audit_destination => "deliveryStreamNameAuditDestination",
    :description => "description",
    :log_group_audit_destination => "logGroupAuditDestination",
    :name => "name",
    :s3_bucket_audit_destination => "s3BucketAuditDestination",
  }
end

Instance Method Details

#to_jsiiObject



78
79
80
81
82
83
84
85
86
87
88
89
# File 'logs/data_protection_policy_props.rb', line 78

def to_jsii
  result = {}
  result.merge!({
    "identifiers" => @identifiers,
    "deliveryStreamNameAuditDestination" => @delivery_stream_name_audit_destination,
    "description" => @description,
    "logGroupAuditDestination" => @log_group_audit_destination,
    "name" => @name,
    "s3BucketAuditDestination" => @s3_bucket_audit_destination,
  })
  result.compact
end