Class CfnAccountPolicyProps.Builder

java.lang.Object
software.amazon.awscdk.services.logs.CfnAccountPolicyProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAccountPolicyProps>
Enclosing interface:
CfnAccountPolicyProps

@Stability(Stable) public static final class CfnAccountPolicyProps.Builder extends Object implements software.amazon.jsii.Builder<CfnAccountPolicyProps>
A builder for CfnAccountPolicyProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • policyDocument

      @Stability(Stable) public CfnAccountPolicyProps.Builder policyDocument(String policyDocument)
      Parameters:
      policyDocument - Specify the data protection policy, in JSON. This parameter is required. This policy must include two JSON blocks:

      • The first block must include both a DataIdentifer array and an Operation property with an Audit action. The DataIdentifer array lists the types of sensitive data that you want to mask. For more information about the available options, see Types of data that you can mask .

      The Operation property with an Audit action is required to find the sensitive data terms. This Audit action must contain a FindingsDestination object. You can optionally use that FindingsDestination object to list one or more destinations to send audit findings to. If you specify destinations such as log groups, Kinesis Data Firehose streams, and S3 buckets, they must already exist.

      • The second block must include both a DataIdentifer array and an Operation property with an Deidentify action. The DataIdentifer array must exactly match the DataIdentifer array in the first block of the policy.

      The Operation property with the Deidentify action is what actually masks the data, and it must contain the "MaskConfig": {} object. The "MaskConfig": {} object must be empty.

      The contents of the two DataIdentifer arrays must match exactly.

      Returns:
      this
    • policyName

      @Stability(Stable) public CfnAccountPolicyProps.Builder policyName(String policyName)
      Parameters:
      policyName - A name for the policy. This parameter is required. This must be unique within the account.
      Returns:
      this
    • policyType

      @Stability(Stable) public CfnAccountPolicyProps.Builder policyType(String policyType)
      Parameters:
      policyType - Currently the only valid value for this parameter is DATA_PROTECTION_POLICY . This parameter is required.
      Returns:
      this
    • scope

      @Stability(Stable) public CfnAccountPolicyProps.Builder scope(String scope)
      Parameters:
      scope - Currently the only valid value for this parameter is ALL , which specifies that the data protection policy applies to all log groups in the account. If you omit this parameter, the default of ALL is used.
      Returns:
      this
    • build

      @Stability(Stable) public CfnAccountPolicyProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnAccountPolicyProps>
      Returns:
      a new instance of CfnAccountPolicyProps
      Throws:
      NullPointerException - if any required attribute was not provided