Manage Azure Durable Task Schedulers
.NET management-plane SDK for Azure Durable Task Scheduler - provision schedulers, task hubs, and retention policies via ARM.
Why it matters
Provision and manage Azure Durable Task Scheduler resources, including task hubs and retention policies, using the Azure Resource Manager SDK for .NET. Automate the setup and configuration of your serverless or dedicated task scheduling infrastructure.
Outcomes
What it gets done
Create and configure Durable Task Schedulers with Dedicated or Consumption SKUs.
Set up Task Hubs under your schedulers for orchestration management.
Define and manage retention policies for task instances.
Programmatically manage scheduler lifecycle, including updates and deletions.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-azure-resource-manager-durabletask-dotnet | bash Overview
Azure.ResourceManager.DurableTask (.NET)
A .NET SDK reference for provisioning Azure Durable Task Scheduler infrastructure via Azure Resource Manager - schedulers, task hubs, SKUs, and retention policies. Use when provisioning or managing Durable Task Scheduler infrastructure itself from .NET, not for writing or running orchestrations.
What it does
Azure.ResourceManager.DurableTask is the .NET management-plane SDK for provisioning Azure Durable Task Scheduler infrastructure via Azure Resource Manager: creating DurableTaskSchedulerResource instances, the DurableTaskHubResources that live under them, and retention policies - distinct from Microsoft.DurableTask.Client.AzureManaged, the data-plane SDK that actually starts orchestrations, queries running instances, and sends events against an already-provisioned scheduler.
When to use - and when NOT to
Use this skill when provisioning or managing the Durable Task Scheduler infrastructure itself - creating a scheduler with the right SKU and capacity, setting up task hubs under it, configuring IP allowlists for network security, or managing retention policies. It is not for writing orchestration code or interacting with running workflow instances; that is the data-plane SDK's job, layered on top of infrastructure this SDK creates. Two SKUs cover different needs: Dedicated, with a configurable instance Capacity for production workloads needing predictable performance, and Consumption, a serverless auto-scaling option better suited to development or variable workloads.
Inputs and outputs
Scheduler creation takes a DurableTaskSchedulerData with a location and DurableTaskSchedulerProperties specifying Sku (DurableTaskSchedulerSkuName.Dedicated with a Capacity, or Consumption) and an optional IPAllowlist, submitted via schedulerCollection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); the resulting DurableTaskSchedulerResource exposes Data.Properties.Endpoint for the data-plane client to connect to. Task hubs are created under a scheduler with scheduler.GetDurableTaskHubs().CreateOrUpdateAsync(...). Deletion has a strict order: a scheduler cannot be deleted while it still has task hubs, so hubs must be deleted first, then the scheduler. Retention policies are managed via scheduler.GetDurableTaskRetentionPolicies().CreateOrUpdateAsync("default", retentionData).
var schedulerData = new DurableTaskSchedulerData(AzureLocation.EastUS)
{
Properties = new DurableTaskSchedulerProperties
{
Sku = new DurableTaskSchedulerSku(DurableTaskSchedulerSkuName.Dedicated) { Capacity = 1 }
}
};
Integrations
Authenticates via DefaultAzureCredential. The resource hierarchy runs ArmClient to SubscriptionResource to ResourceGroupResource to DurableTaskSchedulerResource, with extension methods on each level (subscription.GetDurableTaskSchedulersAsync(), resourceGroup.GetDurableTaskSchedulers(), armClient.GetDurableTaskSchedulerResource(id)) for navigating without manually constructing resource IDs. Once a scheduler's endpoint is provisioned, the companion Microsoft.DurableTask.Client.AzureManaged and Microsoft.DurableTask.Worker.AzureManaged packages connect to it to run and manage actual durable orchestrations.
Who it's for
.NET platform teams provisioning Durable Task Scheduler infrastructure as part of an application's deployment - choosing Dedicated versus Consumption SKU based on workload predictability, locking down network access with IP allowlists, and scaling capacity up over time. The skill's best practices stress deleting task hubs before their parent scheduler, always authenticating via DefaultAzureCredential, using CreateOrUpdateAsync for idempotent provisioning, and handling RequestFailedException explicitly for 409 (already exists) and 404 (resource group not found) cases, with WaitUntil.Started available when the caller prefers to poll manually or fire off several provisioning operations in parallel instead of blocking on each one sequentially.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.