PolicyViolatingResource

class aws_cdk.PolicyViolatingResource(*, locations, construct_path=None, resource_logical_id=None, template_path=None)

Bases: object

Resource violating a specific rule.

Parameters:
  • locations (Sequence[str]) – The locations in the CloudFormation template that pose the violations.

  • construct_path (Optional[str]) – The construct path of the violating construct. Use this for violations that originate from constructs rather than CloudFormation resources (e.g. annotations added via Annotations.of() or Validations.of()). When provided, the report will use this path directly instead of deriving it from the resource logical ID. Mutually exclusive with resourceLogicalId. Default: - construct path is derived from the resource logical ID

  • resource_logical_id (Optional[str]) – The logical ID of the resource in the CloudFormation template. Required for plugin-sourced violations that operate on CloudFormation templates. Mutually exclusive with constructPath. Default: - no resource logical ID

  • template_path (Optional[str]) – The path to the CloudFormation template that contains this resource. Default: - no template path

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_violating_resource = cdk.PolicyViolatingResource(
    locations=["locations"],

    # the properties below are optional
    construct_path="constructPath",
    resource_logical_id="resourceLogicalId",
    template_path="templatePath"
)

Attributes

construct_path

The construct path of the violating construct.

Use this for violations that originate from constructs rather than CloudFormation resources (e.g. annotations added via Annotations.of() or Validations.of()). When provided, the report will use this path directly instead of deriving it from the resource logical ID. Mutually exclusive with resourceLogicalId.

Default:
  • construct path is derived from the resource logical ID

locations

The locations in the CloudFormation template that pose the violations.

resource_logical_id

The logical ID of the resource in the CloudFormation template.

Required for plugin-sourced violations that operate on CloudFormation templates. Mutually exclusive with constructPath.

Default:
  • no resource logical ID

template_path

The path to the CloudFormation template that contains this resource.

Default:
  • no template path