# UpdateCommandStateContext Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [UpdateCommandStateContext](/reference/api/csharp/aspire.hosting/updatecommandstatecontext.md)
- Kind: `Properties`
- Members: `2`

Context for [ResourceCommandAnnotation.UpdateState](/reference/api/csharp/aspire.hosting/resourcecommandannotation/properties.md#updatestate).

## ResourceSnapshot

- Name: `ResourceSnapshot`
- Modifiers: `get; init`
- Returns: [CustomResourceSnapshot](/reference/api/csharp/aspire.hosting/customresourcesnapshot.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/ApplicationModel/ResourceCommandAnnotation.cs)

The resource snapshot.

```csharp
public CustomResourceSnapshot ResourceSnapshot { get; init; }
```

## ATS metadata

### Ignored by ATS

- Reason: CustomResourceSnapshot contains object-valued properties that are not statically representable in polyglot SDKs. Use ResourceSnapshotData for the curated ATS projection.

## ServiceProvider

- Name: `ServiceProvider`
- Modifiers: `get; init`
- Returns: `IServiceProvider`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/ApplicationModel/ResourceCommandAnnotation.cs)

The service provider.

```csharp
public IServiceProvider ServiceProvider { get; init; }
```

## ATS metadata

### Ignored by ATS

- Reason: IServiceProvider is not usable from polyglot command state callbacks.
