# CloudFormationResourceJson

A node in the construct creation stack trace.

- Source: [`lib/cloud-assembly/validation-report-schema.ts`](https://github.com/aws/aws-cdk-cli/blob/HEAD/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/validation-report-schema.ts)
- Type last changed: v2.258.0 · 4 Jun 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cloud_assembly_schema } from 'aws-cdk-lib';
const cloudFormationResourceJson: cloud_assembly_schema.CloudFormationResourceJson = {
  logicalId: 'logicalId',
  templatePath: 'templatePath',

  // the properties below are optional
  propertyPaths: ['propertyPaths'],
};
```

Python:

```python
from aws_cdk.cloud_assembly_schema import CloudFormationResourceJson
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import cloud_assembly_schema

cloud_formation_resource_json = CloudFormationResourceJson(
    logical_id="logicalId",
    template_path="templatePath",

    # the properties below are optional
    property_paths=["propertyPaths"]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.cloud_assembly_schema.*;

CloudFormationResourceJson cloudFormationResourceJson = CloudFormationResourceJson.builder()
        .logicalId("logicalId")
        .templatePath("templatePath")

        // the properties below are optional
        .propertyPaths(List.of("propertyPaths"))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.Cloud_assembly_schema;

var cloudFormationResourceJson = new CloudFormationResourceJson {
    LogicalId = "logicalId",
    TemplatePath = "templatePath",

    // the properties below are optional
    PropertyPaths = new [] { "propertyPaths" }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cloudFormationResourceJson := &CloudFormationResourceJson{
	LogicalId: jsii.String("logicalId"),
	TemplatePath: jsii.String("templatePath"),

	// the properties below are optional
	PropertyPaths: []*string{
		jsii.String("propertyPaths"),
	},
}
```

## Properties

- `logicalId`: string (required) — The logical ID of the resource in the CloudFormation template.

- `propertyPaths`: string[] — Properties within the construct where the violation was detected.

  **Default:** no locations

  Either a single component, in which case it regards a top-level property
  name, or a JSON path (starting with `$.`) to indicate a deeper property.

- `templatePath`: string (required) — The path to the CloudFormation template containing this resource.

  This path is relative to the Cloud Assembly root directory.
