# ContainerImagePushOptionsCallbackAnnotation

- 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/ContainerImagePushOptionsCallbackAnnotation.cs)
- Implements: [IResourceAnnotation](/reference/api/csharp/aspire.hosting/iresourceannotation.md)

Represents an annotation that configures container image push options via a callback function.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public sealed class ContainerImagePushOptionsCallbackAnnotation
    : Aspire.Hosting.ApplicationModel.IResourceAnnotation
{
    // ...
}
```

## Remarks

This annotation allows resources to customize how container images are named and tagged when pushed to a registry. Multiple annotations can be added to a single resource, and all callbacks will be invoked in the order they were added. Use [ResourceBuilderExtensions.WithImagePushOptions(IResourceBuilder<T>, Action<ContainerImagePushOptionsCallbackContext>)](/reference/api/csharp/aspire.hosting/resourcebuilderextensions/methods.md#withimagepushoptions-iresourcebuilder-t-action-containerimagepushoptionscallbackcontext) or [ResourceBuilderExtensions.WithImagePushOptions(IResourceBuilder<T>, Action<ContainerImagePushOptionsCallbackContext>)](/reference/api/csharp/aspire.hosting/resourcebuilderextensions/methods.md#withimagepushoptions-iresourcebuilder-t-action-containerimagepushoptionscallbackcontext) to add this annotation to a resource.

## Constructors

- [ContainerImagePushOptionsCallbackAnnotation(Action<ContainerImagePushOptionsCallbackContext>)](/reference/api/csharp/aspire.hosting/containerimagepushoptionscallbackannotation/constructors.md#constructor-action-containerimagepushoptionscallbackcontext) -- Initializes a new instance of the [ContainerImagePushOptionsCallbackAnnotation](/reference/api/csharp/aspire.hosting/containerimagepushoptionscallbackannotation.md) class.
- [ContainerImagePushOptionsCallbackAnnotation(Func<ContainerImagePushOptionsCallbackContext, Task>)](/reference/api/csharp/aspire.hosting/containerimagepushoptionscallbackannotation/constructors.md#constructor-func-containerimagepushoptionscallbackcontext-task) -- Initializes a new instance of the [ContainerImagePushOptionsCallbackAnnotation](/reference/api/csharp/aspire.hosting/containerimagepushoptionscallbackannotation.md) class.

## Properties

- [Callback](/reference/api/csharp/aspire.hosting/containerimagepushoptionscallbackannotation/properties.md#callback) : `Func<ContainerImagePushOptionsCallbackContext, Task>` `get` -- Gets the callback function that configures image push options.
