diff --git a/src/DurableTask/DurableTask.Autorest/Properties/AssemblyInfo.cs b/src/DurableTask/DurableTask.Autorest/Properties/AssemblyInfo.cs index 37c04aad6b49..522bb6b0d05d 100644 --- a/src/DurableTask/DurableTask.Autorest/Properties/AssemblyInfo.cs +++ b/src/DurableTask/DurableTask.Autorest/Properties/AssemblyInfo.cs @@ -1,4 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the Apache License, Version 2.0 (the ""License""); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -19,9 +22,8 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")] [assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")] [assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")] -[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - DurableTask")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("0.2.0")] -[assembly: System.Reflection.AssemblyVersionAttribute("0.2.0")] +[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - MicrosoftDurableTask")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.1")] +[assembly: System.Reflection.AssemblyVersionAttribute("0.1.1")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] - diff --git a/src/DurableTask/DurableTask.Autorest/README.md b/src/DurableTask/DurableTask.Autorest/README.md index d712deb22ba2..82a59f988347 100644 --- a/src/DurableTask/DurableTask.Autorest/README.md +++ b/src/DurableTask/DurableTask.Autorest/README.md @@ -22,72 +22,3 @@ AutoRest does not generate authentication code for the module. Authentication is ## Development For information on how to develop for `Az.DurableTask`, see [how-to.md](how-to.md). - -### AutoRest Configuration - -> see https://aka.ms/autorest - -```yaml -# pin the swagger version by using the commit id instead of branch name -commit: b4430e90bbd9c27f2dd7931a7623a16a5ecc7be0 -require: -# readme.azure.noprofile.md is the common configuration file - - $(this-folder)/../../readme.azure.noprofile.md - - $(repo)/specification/durabletask/resource-manager/readme.md -# If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally -# - (this-folder)/relative-path-to-your-local-readme.md - -try-require: - - $(repo)/specification/durabletask/resource-manager/readme.powershell.md - -# For new RP, the version is 0.1.0 -module-version: 0.2.0 -# Normally, title is the service name -title: DurableTask -subject-prefix: $(service-name) - -# The next three configurations are exclusive to v3, and in v4, they are activated by default. If you are still using v3, please uncomment them. -# identity-correction-for-post: true -# resourcegroup-append: true -# nested-object-to-string: true - -directive: - # Following are common directives which are normally required in all the RPs - # 1. Remove the unexpanded parameter set - # 2. For New-* cmdlets, ViaIdentity is not required - # Following two directives are v4 specific - - where: - variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString)) - remove: true - - where: - variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$ - remove: true - # Follow directive is v3 specific. If you are using v3, uncomment following directive and comments out two directives above - #- where: - # variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ - # remove: true - - # Remove the set-* cmdlet - - where: - verb: Set - remove: true - - # Updating TaskHub is not supported - - where: - verb: Update - subject: TaskHub - remove: true - - # Retention policy operations are not supported - - where: - subject: RetentionPolicy - remove: true - - # Private Endpoint Connections and Private Links are handled via the Network Cmdlets - - where: - subject: SchedulerPrivateEndpointConnection - remove: true - - where: - subject: SchedulerPrivateLink - remove: true -``` diff --git a/src/DurableTask/DurableTask.Autorest/docs/Az.DurableTask.md b/src/DurableTask/DurableTask.Autorest/docs/Az.DurableTask.md index 17ef170b8091..8762d0389938 100644 --- a/src/DurableTask/DurableTask.Autorest/docs/Az.DurableTask.md +++ b/src/DurableTask/DurableTask.Autorest/docs/Az.DurableTask.md @@ -1,6 +1,6 @@ --- Module Name: Az.DurableTask -Module Guid: e19fbc46-d4cc-4da2-81d0-45535b1de2a0 +Module Guid: 486f71cd-8f5a-4d18-b828-e0fd16915a6f Download Help Link: https://learn.microsoft.com/powershell/module/az.durabletask Help Version: 1.0.0.0 Locale: en-US diff --git a/src/DurableTask/DurableTask.Autorest/docs/Az.DurableTaskCmdlet.Design.md b/src/DurableTask/DurableTask.Autorest/docs/Az.DurableTaskCmdlet.Design.md deleted file mode 100644 index 41448d0265a8..000000000000 --- a/src/DurableTask/DurableTask.Autorest/docs/Az.DurableTaskCmdlet.Design.md +++ /dev/null @@ -1,761 +0,0 @@ -#### New-AzDurableTaskScheduler - -#### SYNOPSIS -Create a Scheduler - -#### SYNTAX - -+ CreateExpanded (Default) -```powershell -New-AzDurableTaskScheduler -Name -ResourceGroupName -Location - [-SubscriptionId ] [-IPAllowlist ] [-PublicNetworkAccess ] [-SkuCapacity ] [-SkuName ] - [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -+ CreateViaJsonFilePath -```powershell -New-AzDurableTaskScheduler -Name -ResourceGroupName -JsonFilePath - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] -``` - -+ CreateViaJsonString -```powershell -New-AzDurableTaskScheduler -Name -ResourceGroupName -JsonString - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] -``` - -#### EXAMPLES - -+ Example 1: Create a new Durable Task scheduler with basic settings -```powershell -New-AzDurableTaskScheduler -Name "testscheduler" -ResourceGroupName "rgopenapi" -Location "northcentralus" -SkuCapacity 3 -SkuName "Dedicated" -IPAllowlist @("10.0.0.0/8") -Tag @{department="research"; development="true"} -``` - -```output -Endpoint : https://test.northcentralus.1.durabletask.io -IPAllowlist : {10.0.0.0/8} -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler -Location : North Central US -Name : testscheduler -ProvisioningState : Succeeded -PublicNetworkAccess : Enabled -ResourceGroupName : rgopenapi -SkuCapacity : 3 -SkuName : Dedicated -SkuRedundancyState : Zone -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Tag : { - "department": "research", - "development": "true" - } -Type : Microsoft.DurableTask/schedulers -``` - -Creates a new Durable Task scheduler with Dedicated SKU, IP allowlist, and tags. -Output shows all returned properties. - -+ Example 2: Create a scheduler with JSON file -```powershell -New-AzDurableTaskScheduler -Name "testscheduler" -ResourceGroupName "rgopenapi" -JsonFilePath "./scheduler.json" -``` - -```output -Endpoint : https://test.northcentralus.1.durabletask.io -IPAllowlist : {10.0.0.0/8} -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler -Location : North Central US -Name : testscheduler -ProvisioningState : Succeeded -PublicNetworkAccess : Enabled -ResourceGroupName : rgopenapi -SkuCapacity : 3 -SkuName : Dedicated -SkuRedundancyState : Zone -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Tag : { - "department": "research", - "development": "true" - } -Type : Microsoft.DurableTask/schedulers -``` - -Creates a Durable Task scheduler using a JSON configuration file. -Output shows full resource details. - -+ Example 3: Create a scheduler with capacity configuration -```powershell -New-AzDurableTaskScheduler -Name "testscheduler" -ResourceGroupName "rgopenapi" -Location "northcentralus" -SkuName "Dedicated" -SkuCapacity 1 -``` - -```output -Endpoint : https://test.northcentralus.1.durabletask.io -IPAllowlist : {0.0.0.0/0} -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler -Location : North Central US -Name : testscheduler -ProvisioningState : Succeeded -PublicNetworkAccess : Enabled -ResourceGroupName : rgopenapi -SkuCapacity : 1 -SkuName : Dedicated -SkuRedundancyState : Zone -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Tag : { - } -Type : Microsoft.DurableTask/schedulers -``` - -Creates a Durable Task scheduler with a specific SKU capacity and shows the full returned object. - - -#### Get-AzDurableTaskScheduler - -#### SYNOPSIS -Get a Scheduler - -#### SYNTAX - -+ List (Default) -```powershell -Get-AzDurableTaskScheduler [-SubscriptionId ] [-DefaultProfile ] [] -``` - -+ Get -```powershell -Get-AzDurableTaskScheduler -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] -``` - -+ GetViaIdentity -```powershell -Get-AzDurableTaskScheduler -InputObject [-DefaultProfile ] - [] -``` - -+ List1 -```powershell -Get-AzDurableTaskScheduler -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] -``` - -#### EXAMPLES - -+ Example 1: List all schedulers in a subscription -```powershell -Get-AzDurableTaskScheduler -``` - -```output -Endpoint : https://test.northcentralus.1.durabletask.io -IPAllowlist : {10.0.0.0/8} -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler -Location : North Central US -Name : testscheduler -ProvisioningState : Succeeded -PublicNetworkAccess : Enabled -ResourceGroupName : rgopenapi -SkuCapacity : 3 -SkuName : Dedicated -SkuRedundancyState : Zone -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Tag : { - "department": "research", - "development": "true" - } -Type : Microsoft.DurableTask/schedulers -``` - -Lists all Durable Task schedulers in the current subscription. - -+ Example 2: Get a specific scheduler by name -```powershell -Get-AzDurableTaskScheduler -ResourceGroupName "rgopenapi" -Name "testscheduler" -``` - -```output -Endpoint : https://test.northcentralus.1.durabletask.io -IPAllowlist : {10.0.0.0/8} -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler -Location : North Central US -Name : testscheduler -ProvisioningState : Succeeded -PublicNetworkAccess : Enabled -ResourceGroupName : rgopenapi -SkuCapacity : 3 -SkuName : Dedicated -SkuRedundancyState : Zone -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Tag : { - "department": "research", - "development": "true" - } -Type : Microsoft.DurableTask/schedulers -``` - -Gets the details of a specific Durable Task scheduler by name and resource group. - -+ Example 3: List schedulers in a resource group -```powershell -Get-AzDurableTaskScheduler -ResourceGroupName "rgopenapi" -``` - -```output -Endpoint : https://test.northcentralus.1.durabletask.io -IPAllowlist : {10.0.0.0/8} -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler -Location : North Central US -Name : testscheduler -ProvisioningState : Succeeded -PublicNetworkAccess : Enabled -ResourceGroupName : rgopenapi -SkuCapacity : 3 -SkuName : Dedicated -SkuRedundancyState : Zone -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Tag : { - "department": "research", - "development": "true" - } -Type : Microsoft.DurableTask/schedulers -``` - -Lists all Durable Task schedulers in a specific resource group. - -+ Example 4: Get a scheduler using pipeline input -```powershell -$scheduler = Get-AzDurableTaskScheduler -ResourceGroupName "rgopenapi" -Name "testscheduler" -$scheduler | Get-AzDurableTaskScheduler -``` - -```output -Endpoint : https://test.northcentralus.1.durabletask.io -IPAllowlist : {10.0.0.0/8} -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler -Location : North Central US -Name : testscheduler -ProvisioningState : Succeeded -PublicNetworkAccess : Enabled -ResourceGroupName : rgopenapi -SkuCapacity : 3 -SkuName : Dedicated -SkuRedundancyState : Zone -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Tag : { - "department": "research", - "development": "true" - } -Type : Microsoft.DurableTask/schedulers -``` - -Gets a scheduler using an input object via pipeline (GetViaIdentity parameter set). - - -#### Remove-AzDurableTaskScheduler - -#### SYNOPSIS -Delete a Scheduler - -#### SYNTAX - -+ Delete (Default) -```powershell -Remove-AzDurableTaskScheduler -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] -``` - -+ DeleteViaIdentity -```powershell -Remove-AzDurableTaskScheduler -InputObject [-DefaultProfile ] [-AsJob] - [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] -``` - -#### EXAMPLES - -+ Example 1: Remove a scheduler by name -```powershell -Remove-AzDurableTaskScheduler -Name "testscheduler" -ResourceGroupName "rgopenapi" -``` - -Removes a Durable Task scheduler by name and resource group. - -+ Example 2: Remove a scheduler using pipeline input -```powershell -$scheduler = Get-AzDurableTaskScheduler -ResourceGroupName "rgopenapi" -Name "testscheduler" -$scheduler | Remove-AzDurableTaskScheduler -``` - -Removes a Durable Task scheduler using pipeline input (DeleteViaIdentity parameter set). - -+ Example 3: Remove a scheduler with PassThru parameter -```powershell -Remove-AzDurableTaskScheduler -Name "testscheduler" -ResourceGroupName "rgopenapi" -PassThru -``` - -```output -True -``` - -Removes a scheduler and returns a boolean value indicating success. - - -#### Update-AzDurableTaskScheduler - -#### SYNOPSIS -Update a Scheduler - -#### SYNTAX - -+ UpdateExpanded (Default) -```powershell -Update-AzDurableTaskScheduler -Name -ResourceGroupName [-SubscriptionId ] - [-IPAllowlist ] [-PublicNetworkAccess ] [-SkuCapacity ] [-SkuName ] [-Tag ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -+ UpdateViaIdentityExpanded -```powershell -Update-AzDurableTaskScheduler -InputObject [-IPAllowlist ] - [-PublicNetworkAccess ] [-SkuCapacity ] [-SkuName ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] -``` - -+ UpdateViaJsonFilePath -```powershell -Update-AzDurableTaskScheduler -Name -ResourceGroupName -JsonFilePath - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] -``` - -+ UpdateViaJsonString -```powershell -Update-AzDurableTaskScheduler -Name -ResourceGroupName -JsonString - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] -``` - -#### EXAMPLES - -+ Example 1: Update scheduler tags and IP allowlist -```powershell -Update-AzDurableTaskScheduler -Name "testscheduler" -ResourceGroupName "rgopenapi" -Tag @{hello="world"} -IPAllowlist @("10.0.0.0/8") -``` - -```output -Endpoint : https://test.northcentralus.1.durabletask.io -IPAllowlist : {10.0.0.0/8} -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler -Location : North Central US -Name : testscheduler -ProvisioningState : Succeeded -PublicNetworkAccess : Enabled -ResourceGroupName : rgopenapi -SkuCapacity : 3 -SkuName : Dedicated -SkuRedundancyState : Zone -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Tag : { - "hello": "world" - } -Type : Microsoft.DurableTask/schedulers -``` - -Updates the tags and IP allowlist for an existing Durable Task scheduler. -Output shows all returned properties, with Tag reflecting the update. - -+ Example 2: Update scheduler SKU capacity -```powershell -Update-AzDurableTaskScheduler -Name "testscheduler" -ResourceGroupName "rgopenapi" -SkuName "Dedicated" -SkuCapacity 3 -``` - -```output -Endpoint : https://test.northcentralus.1.durabletask.io -IPAllowlist : {10.0.0.0/8} -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler -Location : North Central US -Name : testscheduler -ProvisioningState : Succeeded -PublicNetworkAccess : Enabled -ResourceGroupName : rgopenapi -SkuCapacity : 3 -SkuName : Dedicated -SkuRedundancyState : Zone -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Tag : { - } -Type : Microsoft.DurableTask/schedulers -``` - -Updates the SKU capacity of an existing scheduler. -Output shows all returned properties, with SkuName and SkuCapacity reflecting the update. - -+ Example 3: Update scheduler using pipeline input -```powershell -$scheduler = Get-AzDurableTaskScheduler -ResourceGroupName "rgopenapi" -Name "testscheduler" -$scheduler | Update-AzDurableTaskScheduler -Tag @{hello="world"} -``` - -```output -Endpoint : https://test.northcentralus.1.durabletask.io -IPAllowlist : {10.0.0.0/8} -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler -Location : North Central US -Name : testscheduler -ProvisioningState : Succeeded -PublicNetworkAccess : Enabled -ResourceGroupName : rgopenapi -SkuCapacity : 3 -SkuName : Dedicated -SkuRedundancyState : Zone -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Tag : { - "hello": "world" - } -Type : Microsoft.DurableTask/schedulers -``` - -Updates a scheduler using pipeline input (UpdateViaIdentityExpanded parameter set). -Output shows all returned properties, with Tag reflecting the update. - - -#### New-AzDurableTaskHub - -#### SYNOPSIS -Create a Task Hub - -#### SYNTAX - -+ CreateExpanded (Default) -```powershell -New-AzDurableTaskHub -Name -ResourceGroupName -SchedulerName - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] -``` - -+ CreateViaIdentitySchedulerExpanded -```powershell -New-AzDurableTaskHub -Name -SchedulerInputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -+ CreateViaJsonFilePath -```powershell -New-AzDurableTaskHub -Name -ResourceGroupName -SchedulerName -JsonFilePath - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] -``` - -+ CreateViaJsonString -```powershell -New-AzDurableTaskHub -Name -ResourceGroupName -SchedulerName -JsonString - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] -``` - -#### EXAMPLES - -+ Example 1: Create a new task hub -```powershell -New-AzDurableTaskHub -Name "testtaskhub" -ResourceGroupName "rgopenapi" -SchedulerName "testscheduler" -``` - -```output -DashboardUrl : https://test-db.northcentralus.1.durabletask.io/taskhubs/testtaskhub -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler/taskHubs/testtaskhub -Name : testtaskhub -ProvisioningState : Succeeded -ResourceGroupName : rgopenapi -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Type : Microsoft.DurableTask/schedulers/taskHubs -``` - -Creates a new task hub in a Durable Task scheduler. - -+ Example 2: Create a task hub with scheduler input object -```powershell -$scheduler = Get-AzDurableTaskScheduler -ResourceGroupName "rgopenapi" -Name "testscheduler" -New-AzDurableTaskHub -Name "testtaskhub" -SchedulerInputObject $scheduler -``` - -```output -DashboardUrl : https://test-db.northcentralus.1.durabletask.io/taskhubs/testtaskhub -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler/taskHubs/testtaskhub -Name : testtaskhub -ProvisioningState : Succeeded -ResourceGroupName : rgopenapi -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Type : Microsoft.DurableTask/schedulers/taskHubs -``` - -Creates a new task hub using a scheduler input object (CreateViaIdentitySchedulerExpanded parameter set). - -+ Example 3: Create a task hub from JSON file -```powershell -New-AzDurableTaskHub -Name "testtaskhub" -ResourceGroupName "rgopenapi" -SchedulerName "testscheduler" -JsonFilePath "./taskhub.json" -``` - -```output -DashboardUrl : https://test-db.northcentralus.1.durabletask.io/taskhubs/testtaskhub -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler/taskHubs/testtaskhub -Name : testtaskhub -ProvisioningState : Succeeded -ResourceGroupName : rgopenapi -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Type : Microsoft.DurableTask/schedulers/taskHubs -``` - -Creates a new task hub using a JSON configuration file. - - -#### Get-AzDurableTaskHub - -#### SYNOPSIS -Get a Task Hub - -#### SYNTAX - -+ List (Default) -```powershell -Get-AzDurableTaskHub -ResourceGroupName -SchedulerName [-SubscriptionId ] - [-DefaultProfile ] [] -``` - -+ Get -```powershell -Get-AzDurableTaskHub -Name -ResourceGroupName -SchedulerName - [-SubscriptionId ] [-DefaultProfile ] [] -``` - -+ GetViaIdentity -```powershell -Get-AzDurableTaskHub -InputObject [-DefaultProfile ] [] -``` - -+ GetViaIdentityScheduler -```powershell -Get-AzDurableTaskHub -Name -SchedulerInputObject [-DefaultProfile ] - [] -``` - -#### EXAMPLES - -+ Example 1: List all task hubs for a scheduler -```powershell -Get-AzDurableTaskHub -ResourceGroupName "rgopenapi" -SchedulerName "testscheduler" -``` - -```output -DashboardUrl : https://test-db.northcentralus.1.durabletask.io/taskhubs/testtaskhub -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler/taskHubs/testtaskhub -Name : testtaskhub -ProvisioningState : Succeeded -ResourceGroupName : rgopenapi -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Type : Microsoft.DurableTask/schedulers/taskHubs -``` - -Lists all task hubs for a specific Durable Task scheduler. - -+ Example 2: Get a specific task hub by name -```powershell -Get-AzDurableTaskHub -Name "testtaskhub" -ResourceGroupName "rgopenapi" -SchedulerName "testscheduler" -``` - -```output -DashboardUrl : https://test-db.northcentralus.1.durabletask.io/taskhubs/testtaskhub -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler/taskHubs/testtaskhub -Name : testtaskhub -ProvisioningState : Succeeded -ResourceGroupName : rgopenapi -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Type : Microsoft.DurableTask/schedulers/taskHubs -``` - -Gets the details of a specific task hub by name. - -+ Example 3: Get a task hub using pipeline input -```powershell -$taskHub = Get-AzDurableTaskHub -Name "testtaskhub" -ResourceGroupName "rgopenapi" -SchedulerName "testscheduler" -$taskHub | Get-AzDurableTaskHub -``` - -```output -DashboardUrl : https://test-db.northcentralus.1.durabletask.io/taskhubs/testtaskhub -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler/taskHubs/testtaskhub -Name : testtaskhub -ProvisioningState : Succeeded -ResourceGroupName : rgopenapi -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Type : Microsoft.DurableTask/schedulers/taskHubs -``` - -Gets a task hub using pipeline input (GetViaIdentity parameter set). - -+ Example 4: Get a task hub with scheduler input object -```powershell -$scheduler = Get-AzDurableTaskScheduler -ResourceGroupName "rgopenapi" -Name "testscheduler" -Get-AzDurableTaskHub -Name "testtaskhub" -SchedulerInputObject $scheduler -``` - -```output -DashboardUrl : https://test-db.northcentralus.1.durabletask.io/taskhubs/testtaskhub -Id : /subscriptions/EE9BD735-67CE-4A90-89C4-439D3F6A4C93/resourceGroups/rgopenapi/providers/Microsoft.DurableTask/schedulers/testscheduler/taskHubs/testtaskhub -Name : testtaskhub -ProvisioningState : Succeeded -ResourceGroupName : rgopenapi -SystemDataCreatedAt : 4/17/2024 3:34:17 PM -SystemDataCreatedBy : tenmbevaunjzikxowqexrsx -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 4/17/2024 3:34:17 PM -SystemDataLastModifiedBy : xfvdcegtj -SystemDataLastModifiedByType : User -Type : Microsoft.DurableTask/schedulers/taskHubs -``` - -Gets a task hub using a scheduler input object (GetViaIdentityScheduler parameter set). - - -#### Remove-AzDurableTaskHub - -#### SYNOPSIS -Delete a Task Hub - -#### SYNTAX - -+ Delete (Default) -```powershell -Remove-AzDurableTaskHub -Name -ResourceGroupName -SchedulerName - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] - [] -``` - -+ DeleteViaIdentity -```powershell -Remove-AzDurableTaskHub -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] -``` - -+ DeleteViaIdentityScheduler -```powershell -Remove-AzDurableTaskHub -Name -SchedulerInputObject - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] -``` - -#### EXAMPLES - -+ Example 1: Remove a task hub by name -```powershell -Remove-AzDurableTaskHub -Name "testtaskhub" -ResourceGroupName "rgopenapi" -SchedulerName "testscheduler" -``` - -Removes a task hub from a Durable Task scheduler. - -+ Example 2: Remove a task hub using pipeline input -```powershell -$taskHub = Get-AzDurableTaskHub -Name "testtaskhub" -ResourceGroupName "rgopenapi" -SchedulerName "testscheduler" -$taskHub | Remove-AzDurableTaskHub -``` - -Removes a task hub using pipeline input (DeleteViaIdentity parameter set). - -+ Example 3: Remove a task hub with scheduler input object -```powershell -$scheduler = Get-AzDurableTaskScheduler -ResourceGroupName "rgopenapi" -Name "testscheduler" -Remove-AzDurableTaskHub -Name "testtaskhub" -SchedulerInputObject $scheduler -``` - -Removes a task hub using a scheduler input object (DeleteViaIdentityScheduler parameter set). - -+ Example 4: Remove a task hub with PassThru parameter -```powershell -Remove-AzDurableTaskHub -Name "testtaskhub" -ResourceGroupName "rgopenapi" -SchedulerName "testscheduler" -PassThru -``` - -```output -True -``` - -Removes a task hub and returns a boolean value indicating success. - - diff --git a/src/DurableTask/DurableTask.Autorest/generate-info.json b/src/DurableTask/DurableTask.Autorest/generate-info.json index 20616b3d47d1..412e011df3b9 100644 --- a/src/DurableTask/DurableTask.Autorest/generate-info.json +++ b/src/DurableTask/DurableTask.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "a66a3e2d-c429-42b9-b737-fc141597d175" + "generate_Id": "9ec6ba99-c5db-4692-a991-23d2d5541ac4" } diff --git a/src/DurableTask/DurableTask.Autorest/tsp-location.yaml b/src/DurableTask/DurableTask.Autorest/tsp-location.yaml new file mode 100644 index 000000000000..21272996ddd3 --- /dev/null +++ b/src/DurableTask/DurableTask.Autorest/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification\durabletask\resource-manager\Microsoft.DurableTask\DurableTask +commit: 5d221767a7423e746d446de30dbbb5d60086722f +repo: Azure/azure-rest-api-specs diff --git a/src/DurableTask/DurableTask.Autorest/tspconfig.yaml b/src/DurableTask/DurableTask.Autorest/tspconfig.yaml new file mode 100644 index 000000000000..cbb0a9c17029 --- /dev/null +++ b/src/DurableTask/DurableTask.Autorest/tspconfig.yaml @@ -0,0 +1,63 @@ +options: + "@azure-tools/typespec-powershell": + service-dir: "src" + emitter-output-dir: "{output-dir}/{service-dir}/DurableTask/DurableTask.Autorest" + clear-output-folder: true + azure: true + module-version: 0.2.0 + prefix: "Az" + subject-prefix: "DurableTask" + service-name: "DurableTask" + module-name: "{prefix}.{service-name}" + output-folder: "{output-dir}" + api-version: "2026-02-01" + exclude-tableview-properties: + - Id + - Type + directive: + - where: + parameter-name: SubscriptionId + set: + default: + script: "(Get-AzContext).Subscription.Id" + - where: + variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString)) + remove: true + - where: + variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$ + remove: true + - where: + verb: Set + remove: true + - where: + verb: Update + subject: TaskHub + remove: true + - where: + subject: RetentionPolicy|SchedulerPrivateEndpointConnection|SchedulerPrivateLink + remove: true + - where: + subject: Operation|TransparentDataEncryption + remove: true + - where: + verb: Restart + subject: Scheduler + remove: true + - where: + subject: Scheduler + variant: List + set: + variant: TemporaryList + - where: + subject: Scheduler + variant: List1 + set: + variant: List + - where: + subject: Scheduler + variant: TemporaryList + set: + variant: List1 +linter: + extends: + - "@azure-tools/typespec-azure-rulesets/resource-manager" diff --git a/src/DurableTask/DurableTask.sln b/src/DurableTask/DurableTask.sln index 8a8e396ca60f..b15656cb3747 100644 --- a/src/DurableTask/DurableTask.sln +++ b/src/DurableTask/DurableTask.sln @@ -21,7 +21,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DurableTask", "DurableTask\ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DurableTask.Autorest", "DurableTask.Autorest", "{35888784-0185-7DD2-56EC-09C90BB36692}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DurableTask", "..\..\generated\DurableTask\DurableTask.Autorest\Az.DurableTask.csproj", "{4B0129B3-7B1F-43A4-BA82-0FBC478CE877}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DurableTask", "..\..\generated\DurableTask\DurableTask.Autorest\Az.DurableTask.csproj", "{386F6388-7967-44C2-8593-EDA84B7F7EFF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -117,18 +117,18 @@ Global {21D185E5-8880-45D1-9F77-CEA3D39426B8}.Release|x64.Build.0 = Release|Any CPU {21D185E5-8880-45D1-9F77-CEA3D39426B8}.Release|x86.ActiveCfg = Release|Any CPU {21D185E5-8880-45D1-9F77-CEA3D39426B8}.Release|x86.Build.0 = Release|Any CPU - {4B0129B3-7B1F-43A4-BA82-0FBC478CE877}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4B0129B3-7B1F-43A4-BA82-0FBC478CE877}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4B0129B3-7B1F-43A4-BA82-0FBC478CE877}.Debug|x64.ActiveCfg = Debug|Any CPU - {4B0129B3-7B1F-43A4-BA82-0FBC478CE877}.Debug|x64.Build.0 = Debug|Any CPU - {4B0129B3-7B1F-43A4-BA82-0FBC478CE877}.Debug|x86.ActiveCfg = Debug|Any CPU - {4B0129B3-7B1F-43A4-BA82-0FBC478CE877}.Debug|x86.Build.0 = Debug|Any CPU - {4B0129B3-7B1F-43A4-BA82-0FBC478CE877}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4B0129B3-7B1F-43A4-BA82-0FBC478CE877}.Release|Any CPU.Build.0 = Release|Any CPU - {4B0129B3-7B1F-43A4-BA82-0FBC478CE877}.Release|x64.ActiveCfg = Release|Any CPU - {4B0129B3-7B1F-43A4-BA82-0FBC478CE877}.Release|x64.Build.0 = Release|Any CPU - {4B0129B3-7B1F-43A4-BA82-0FBC478CE877}.Release|x86.ActiveCfg = Release|Any CPU - {4B0129B3-7B1F-43A4-BA82-0FBC478CE877}.Release|x86.Build.0 = Release|Any CPU + {386F6388-7967-44C2-8593-EDA84B7F7EFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {386F6388-7967-44C2-8593-EDA84B7F7EFF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {386F6388-7967-44C2-8593-EDA84B7F7EFF}.Debug|x64.ActiveCfg = Debug|Any CPU + {386F6388-7967-44C2-8593-EDA84B7F7EFF}.Debug|x64.Build.0 = Debug|Any CPU + {386F6388-7967-44C2-8593-EDA84B7F7EFF}.Debug|x86.ActiveCfg = Debug|Any CPU + {386F6388-7967-44C2-8593-EDA84B7F7EFF}.Debug|x86.Build.0 = Debug|Any CPU + {386F6388-7967-44C2-8593-EDA84B7F7EFF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {386F6388-7967-44C2-8593-EDA84B7F7EFF}.Release|Any CPU.Build.0 = Release|Any CPU + {386F6388-7967-44C2-8593-EDA84B7F7EFF}.Release|x64.ActiveCfg = Release|Any CPU + {386F6388-7967-44C2-8593-EDA84B7F7EFF}.Release|x64.Build.0 = Release|Any CPU + {386F6388-7967-44C2-8593-EDA84B7F7EFF}.Release|x86.ActiveCfg = Release|Any CPU + {386F6388-7967-44C2-8593-EDA84B7F7EFF}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -140,6 +140,6 @@ Global {E51258B2-8657-4A1E-9765-1F0A1CD27665} = {1DECF974-D36A-43BB-8FD6-BD8108AE7A72} {2387EAE1-049C-4236-8A0B-73D501B5FAAD} = {1DECF974-D36A-43BB-8FD6-BD8108AE7A72} {BF786634-D1B4-45A6-8E8B-DDE706B1F9CC} = {1DECF974-D36A-43BB-8FD6-BD8108AE7A72} - {4B0129B3-7B1F-43A4-BA82-0FBC478CE877} = {35888784-0185-7DD2-56EC-09C90BB36692} + {386F6388-7967-44C2-8593-EDA84B7F7EFF} = {35888784-0185-7DD2-56EC-09C90BB36692} EndGlobalSection EndGlobal diff --git a/src/DurableTask/DurableTask/Az.DurableTask.psd1 b/src/DurableTask/DurableTask/Az.DurableTask.psd1 index db3b0fd6f2ae..2170140446a2 100644 --- a/src/DurableTask/DurableTask/Az.DurableTask.psd1 +++ b/src/DurableTask/DurableTask/Az.DurableTask.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 4/1/2026 +# Generated on: 8/7/2026 # @{ @@ -51,16 +51,16 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.3.4'; }) +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.5.2'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'DurableTask.Autorest/bin/Az.DurableTask.private.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() +ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() +TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module FormatsToProcess = 'DurableTask.Autorest/Az.DurableTask.format.ps1xml' @@ -98,7 +98,7 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','PSModule','DurableTask' + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'DurableTask' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' @@ -125,7 +125,7 @@ PrivateData = @{ } # End of PSData hashtable - } # End of PrivateData hashtable +} # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' diff --git a/src/DurableTask/DurableTask/ChangeLog.md b/src/DurableTask/DurableTask/ChangeLog.md index 4f85b0937c28..0858747afd2b 100644 --- a/src/DurableTask/DurableTask/ChangeLog.md +++ b/src/DurableTask/DurableTask/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Migrated module generation from AutoRest to TypeSpec. ## Version 0.1.1 * Upgraded API version to `2026-02-01`. @@ -26,4 +27,3 @@ ## Version 0.1.0 * First preview release for module Az.DurableTask -