# ContainerImagePushOptionsCallbackContext

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/ContainerImagePushOptionsCallbackContext.cs)

Provides context information for container image push options callbacks.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public sealed class ContainerImagePushOptionsCallbackContext
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting/ContainerImagePushOptionsCallbackContext`
- Public instance properties are exported as ATS capabilities.

## Remarks

This context is passed to callbacks registered via [ResourceBuilderExtensions.WithImagePushOptions(IResourceBuilder<T>, Action<ContainerImagePushOptionsCallbackContext>)](/reference/api/csharp/aspire.hosting/resourcebuilderextensions/methods.md#withimagepushoptions-iresourcebuilder-t-action-containerimagepushoptionscallbackcontext). Callbacks can use this context to access the resource being configured and modify the [ContainerImagePushOptionsCallbackContext.Options](/reference/api/csharp/aspire.hosting/containerimagepushoptionscallbackcontext/properties.md#options) to customize how the container image is named and tagged when pushed to a registry.

## Constructors

- [ContainerImagePushOptionsCallbackContext](/reference/api/csharp/aspire.hosting/containerimagepushoptionscallbackcontext/constructors.md#constructor)

## Properties

- [CancellationToken](/reference/api/csharp/aspire.hosting/containerimagepushoptionscallbackcontext/properties.md#cancellationtoken) : `CancellationToken` `get; init` -- Gets the cancellation token to observe while configuring image push options.
- [Options](/reference/api/csharp/aspire.hosting/containerimagepushoptionscallbackcontext/properties.md#options) : [ContainerImagePushOptions](/reference/api/csharp/aspire.hosting/containerimagepushoptions.md) `get; init` -- Gets the container image push options that can be modified by the callback.
- [Resource](/reference/api/csharp/aspire.hosting/containerimagepushoptionscallbackcontext/properties.md#resource) : [IResource](/reference/api/csharp/aspire.hosting/iresource.md) `get; init` -- Gets the resource being configured for container image push operations.
