SuppressedViolationJson

class aws_cdk.cloud_assembly_schema.SuppressedViolationJson(*, description, rule_name, severity, violating_constructs, custom_severity=None, rule_metadata=None, suggested_fix=None, acknowledged_id, acknowledged_at=None, acknowledged_stack_trace=None, reason=None)

Bases: PolicyViolationJson

A violation that was acknowledged/suppressed and excluded from the active violation set.

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

  • rule_name (str) – The name of the rule that was violated.

  • severity (str) – The severity of the violation.

  • violating_constructs (Sequence[Union[ViolatingConstructJson, Dict[str, Any]]]) – Constructs that violated the rule.

  • custom_severity (Optional[str]) – If the plugin wants to report using a non-standard severity, put it here.

  • rule_metadata (Optional[Mapping[str, str]]) – Additional rule-specific metadata. Default: - no metadata

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

  • acknowledged_id (str) – The acknowledgement ID that caused this violation to be suppressed. Format: <plugin-name>::<rule-name> (spaces replaced with hyphens).

  • acknowledged_at (Optional[str]) – The construct path where the acknowledgement was declared. Default: - unknown

  • acknowledged_stack_trace (Optional[str]) – Stack trace showing where the acknowledgement was declared. A \n-delimited string of stack frames. Default: - no stack trace

  • reason (Optional[str]) – The reason given for the acknowledgement, if provided. Default: - no reason given

Example:

from aws_cdk.cloud_assembly_schema import SuppressedViolationJson, ViolatingConstructJson
from aws_cdk.cloud_assembly_schema import SuppressedViolationJson


suppressed = SuppressedViolationJson(
    rule_name="no-public-access",
    description="S3 bucket should not allow public access",
    severity="warning",
    violating_constructs=[ViolatingConstructJson(construct_path="MyStack/MyBucket")],
    acknowledged_id="my-plugin::no-public-access"
)

Attributes

acknowledged_at

The construct path where the acknowledgement was declared.

Default:
  • unknown

acknowledged_id

The acknowledgement ID that caused this violation to be suppressed.

Format: <plugin-name>::<rule-name> (spaces replaced with hyphens).

acknowledged_stack_trace

Stack trace showing where the acknowledgement was declared.

A \n-delimited string of stack frames.

Default:
  • no stack trace

custom_severity

If the plugin wants to report using a non-standard severity, put it here.

description

A description of the violation.

reason

The reason given for the acknowledgement, if provided.

Default:
  • no reason given

rule_metadata

Additional rule-specific metadata.

Default:
  • no metadata

rule_name

The name of the rule that was violated.

severity

The severity of the violation.

suggested_fix

How to fix the violation.

Default:
  • no fix provided

violating_constructs

Constructs that violated the rule.