# IResource.getSerializedAnnotation

- Module: [Aspire.Hosting](/reference/api/typescript/aspire.hosting.md)
- Defined on: [IResource](/reference/api/typescript/aspire.hosting/iresource.md)
- Version: `17.0.0`
- Kind: `method`

Gets a serialized ATS annotation payload from a resource.

## Definition

```typescript
interface IResource {
  // ... omitted for brevity
  getSerializedAnnotation(annotationId: string): string;
}
```

## Signature

```typescript
getSerializedAnnotation(annotationId: string): string
```

## Parameters

- `annotationId` (`string`)

## Returns

`string`

## Defined on

- [IResource](/reference/api/typescript/aspire.hosting/iresource.md) -- `interface`
