# SynthesisMessage

Returned by: [Annotations.findError](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.assertions.Annotations.html#finderror), [Annotations.findInfo](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.assertions.Annotations.html#findinfo), Annotations.findWarning

- Source: [`cx-api/lib/legacy-moved.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/cx-api/lib/legacy-moved.ts#L105)
- Type last changed: v2.238.0 · 9 Feb 2026

## Example

TypeScript:

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

    // the properties below are optional
    data: 'data',
    trace: ['trace'],
  },
  id: 'id',
  level: cx_api.SynthesisMessageLevel.INFO,
};
```

Python:

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

synthesis_message = cx_api.SynthesisMessage(
    entry=MetadataEntry(
        type="type",

        # the properties below are optional
        data="data",
        trace=["trace"]
    ),
    id="id",
    level=cx_api.SynthesisMessageLevel.INFO
)
```

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.cxapi.*;

SynthesisMessage synthesisMessage = SynthesisMessage.builder()
        .entry(MetadataEntry.builder()
                .type("type")

                // the properties below are optional
                .data("data")
                .trace(List.of("trace"))
                .build())
        .id("id")
        .level(SynthesisMessageLevel.INFO)
        .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.CXAPI;

var synthesisMessage = new SynthesisMessage {
    Entry = new MetadataEntry {
        Type = "type",

        // the properties below are optional
        Data = "data",
        Trace = new [] { "trace" }
    },
    Id = "id",
    Level = SynthesisMessageLevel.INFO
};
```

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"

synthesisMessage := &SynthesisMessage{
	Entry: &MetadataEntry{
		Type: jsii.String("type"),

		// the properties below are optional
		Data: jsii.String("data"),
		Trace: []*string{
			jsii.String("trace"),
		},
	},
	Id: jsii.String("id"),
	Level: awscdk.Cx_api.SynthesisMessageLevel_INFO,
}
```

## Properties

- `entry`: [MetadataEntry](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.MetadataEntry.html) (required)

- `id`: string (required)

- `level`: [SynthesisMessageLevel](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cx_api.SynthesisMessageLevel.html) (required)
