Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AzureContainerRegistryResource

Handle
📦 Aspire.Hosting.Azure.ContainerRegistry v17.0.0
type AzureContainerRegistryResource interface {
Resource
}

Methods

methodWithPurgeTaskbuilder
Adds a scheduled ACR purge task to remove image tags and eligible untagged manifests.
WithPurgeTask(
schedule string,
options ...*WithPurgeTaskOptions,
) AzureContainerRegistryResource
schedulestringThe cron schedule for the purge task timer trigger. Must be a five-part cron expression (minute hour day-of-month month day-of-week); seconds are not supported.
options...*WithPurgeTaskOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithPurgeTaskOptions argument.

Filter*stringAn optional filter for the acr purge --filter parameter. Only repositories matching this filter will be purged. Defaults to ".*:.*" (all repositories and tags) when null.
Ago*float64The age threshold based on last modified time, in milliseconds. Older matching tags are eligible for removal unless protected by the keep limit. Defaults to zero.
Keep*float64The minimum number of newest matching tags to retain per repository, regardless of age. Must be greater than zero. Defaults to 3.
TaskName*stringAn optional name for the ACR task resource. If not provided, a name is auto-generated based on existing purge tasks to avoid conflicts. If a task with the specified name already exists, an ArgumentException is thrown.
AzureContainerRegistryResource

The resource builder.

Returns a handle; failures surface later via Err().