# MetadataEntry

A metadata entry in a cloud assembly artifact.

- Source: [`lib/cloud-assembly/metadata-schema.ts`](https://github.com/aws/aws-cdk-cli/blob/HEAD/packages/@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/metadata-schema.ts)
- Type last changed: v2.251.0 · 24 Apr 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 metadataEntry: cloud_assembly_schema.MetadataEntry = {
  type: 'type',

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

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 cloud_assembly_schema

metadata_entry = MetadataEntry(
    type="type",

    # the properties below are optional
    data="data",
    trace=["trace"]
)
```

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

MetadataEntry metadataEntry = MetadataEntry.builder()
        .type("type")

        // the properties below are optional
        .data("data")
        .trace(List.of("trace"))
        .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 metadataEntry = new MetadataEntry {
    Type = "type",

    // the properties below are optional
    Data = "data",
    Trace = new [] { "trace" }
};
```

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"

metadataEntry := &MetadataEntry{
	Type: jsii.String("type"),

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

## Properties

- `data`: string | number | boolean | [FileAssetMetadataEntry](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.FileAssetMetadataEntry.html) | [ContainerImageAssetMetadataEntry](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.ContainerImageAssetMetadataEntry.html) | [PropertyMutationMetadataEntry](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.PropertyMutationMetadataEntry.html) | string | [Tag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.Tag.html)[] — The data.

  **Default:** no data.

- `trace`: string[] — A stack trace for when the entry was created.

  **Default:** no trace.

- `type`: string (required) — The type of the metadata entry.
