interface PolicyViolatingResource
| Language | Type name |
|---|---|
.NET | Amazon.CDK.PolicyViolatingResource |
Go | github.com/aws/aws-cdk-go/awscdk/v2#PolicyViolatingResource |
Java | software.amazon.awscdk.PolicyViolatingResource |
Python | aws_cdk.PolicyViolatingResource |
TypeScript (source) | aws-cdk-lib » PolicyViolatingResource |
Resource violating a specific rule.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const policyViolatingResource: cdk.PolicyViolatingResource = {
locations: ['locations'],
// the properties below are optional
constructPath: 'constructPath',
resourceLogicalId: 'resourceLogicalId',
templatePath: 'templatePath',
};
Properties
| Name | Type | Description |
|---|---|---|
| locations | string[] | The locations in the CloudFormation template that pose the violations. |
| construct | string | The construct path of the violating construct. |
| resource | string | The logical ID of the resource in the CloudFormation template. |
| template | string | The path to the CloudFormation template that contains this resource. |
locations
Type:
string[]
The locations in the CloudFormation template that pose the violations.
constructPath?
Type:
string
(optional, default: construct path is derived from the resource logical ID)
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.
resourceLogicalId?
Type:
string
(optional, default: no 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.
templatePath?
Type:
string
(optional, default: no template path)
The path to the CloudFormation template that contains this resource.

.NET
Go
Java
Python
TypeScript (