Interface CustomPolicyProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable, RuleProps
All Known Implementing Classes:
CustomPolicyProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-05T03:43:40.985Z") @Stability(Stable) public interface CustomPolicyProps extends software.amazon.jsii.JsiiSerializable, RuleProps
Construction properties for a CustomPolicy.

Example:

 String samplePolicyText = "\n# This rule checks if point in time recovery (PITR) is enabled on active Amazon DynamoDB tables\nlet status = ['ACTIVE']\n\nrule tableisactive when\n    resourceType == \"AWS::DynamoDB::Table\" {\n    configuration.tableStatus == %status\n}\n\nrule checkcompliance when\n    resourceType == \"AWS::DynamoDB::Table\"\n    tableisactive {\n        let pitr = supplementaryConfiguration.ContinuousBackupsDescription.pointInTimeRecoveryDescription.pointInTimeRecoveryStatus\n        %pitr == \"ENABLED\"\n}\n";
 CustomPolicy.Builder.create(this, "Custom")
         .policyText(samplePolicyText)
         .enableDebugLog(true)
         .ruleScope(RuleScope.fromResources(List.of(ResourceType.DYNAMODB_TABLE)))
         .build();
 
  • Method Details

    • getPolicyText

      @Stability(Stable) @NotNull String getPolicyText()
      The policy definition containing the logic for your AWS Config Custom Policy rule.
    • getEnableDebugLog

      @Stability(Stable) @Nullable default Boolean getEnableDebugLog()
      The boolean expression for enabling debug logging for your AWS Config Custom Policy rule.

      Default: false

    • builder

      @Stability(Stable) static CustomPolicyProps.Builder builder()
      Returns:
      a CustomPolicyProps.Builder of CustomPolicyProps