PolicyViolationBeta1

class aws_cdk.PolicyViolationBeta1(*, description, rule_name, violating_resources, fix=None, rule_metadata=None, severity=None)

Bases: object

(deprecated) Violation produced by the validation plugin.

Parameters:
  • description (str) – (deprecated) The description of the violation.

  • rule_name (str) – (deprecated) The name of the rule.

  • violating_resources (Sequence[Union[PolicyViolatingResourceBeta1, Dict[str, Any]]]) – (deprecated) The resources violating this rule.

  • fix (Optional[str]) – (deprecated) How to fix the violation. Default: - no fix is provided

  • rule_metadata (Optional[Mapping[str, str]]) – (deprecated) Additional metadata to include with the rule results. This can be used to provide additional information that is plugin specific. The data provided here will be rendered as is. Default: - no rule metadata

  • severity (Optional[str]) – (deprecated) The severity of the violation, only used for reporting purposes. This is useful for helping the user discriminate between warnings, errors, information, etc. Default: - no severity

Deprecated:

Use PolicyViolation instead.

Stability:

deprecated

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk

policy_violation_beta1 = cdk.PolicyViolationBeta1(
    description="description",
    rule_name="ruleName",
    violating_resources=[cdk.PolicyViolatingResourceBeta1(
        locations=["locations"],
        resource_logical_id="resourceLogicalId",
        template_path="templatePath"
    )],

    # the properties below are optional
    fix="fix",
    rule_metadata={
        "rule_metadata_key": "ruleMetadata"
    },
    severity="severity"
)

Attributes

description

(deprecated) The description of the violation.

Stability:

deprecated

fix

(deprecated) How to fix the violation.

Default:
  • no fix is provided

Stability:

deprecated

rule_metadata

(deprecated) Additional metadata to include with the rule results.

This can be used to provide additional information that is plugin specific. The data provided here will be rendered as is.

Default:
  • no rule metadata

Stability:

deprecated

rule_name

(deprecated) The name of the rule.

Stability:

deprecated

severity

(deprecated) The severity of the violation, only used for reporting purposes.

This is useful for helping the user discriminate between warnings, errors, information, etc.

Default:
  • no severity

Stability:

deprecated

violating_resources

(deprecated) The resources violating this rule.

Stability:

deprecated