From 648decd3b2f6da76cce335a817f85dd82a1356de Mon Sep 17 00:00:00 2001
From: azure-powershell-bot
<65331932+azure-powershell-bot@users.noreply.github.com>
Date: Tue, 9 Jul 2024 15:23:42 +0000
Subject: [PATCH 1/2] Move Storage to Az.Storage-preview
---
.../Storage.Autorest/Az.Storage.format.ps1xml | 458 ++
src/Storage/Storage.Autorest/Az.Storage.psd1 | 2 +-
src/Storage/Storage.Autorest/README.md | 68 +-
.../storageAccounts-accountMigrations.json | 2 +-
...torageAccounts-storageTaskAssignments.json | 95 +
src/Storage/Storage.Autorest/build-module.ps1 | 12 +-
.../examples/Get-AzStorageTaskAssignment.md | 56 +
...-AzStorageTaskAssignmentInstancesReport.md | 72 +
.../examples/New-AzStorageTaskAssignment.md | 86 +
.../Remove-AzStorageTaskAssignment.md | 8 +
.../Update-AzStorageTaskAssignment.md | 42 +
.../exports/Get-AzStorageAccountMigration.ps1 | 1 +
.../exports/Get-AzStorageTaskAssignment.ps1 | 262 ++
...AzStorageTaskAssignmentInstancesReport.ps1 | 269 ++
.../exports/New-AzStorageTaskAssignment.ps1 | 301 ++
.../exports/ProxyCmdletDefinitions.ps1 | 1493 ++++++-
.../Remove-AzStorageTaskAssignment.ps1 | 268 ++
.../Start-AzStorageAccountMigration.ps1 | 1 +
.../Update-AzStorageTaskAssignment.ps1 | 340 ++
.../api/Models/ExecutionTarget.PowerShell.cs | 176 +
.../Models/ExecutionTarget.TypeConverter.cs | 147 +
.../generated/api/Models/ExecutionTarget.cs | 88 +
.../api/Models/ExecutionTarget.json.cs | 129 +
.../api/Models/ExecutionTrigger.PowerShell.cs | 212 +
.../Models/ExecutionTrigger.TypeConverter.cs | 147 +
.../generated/api/Models/ExecutionTrigger.cs | 200 +
.../api/Models/ExecutionTrigger.json.cs | 110 +
.../ExecutionTriggerUpdate.PowerShell.cs | 212 +
.../ExecutionTriggerUpdate.TypeConverter.cs | 147 +
.../api/Models/ExecutionTriggerUpdate.cs | 200 +
.../api/Models/ExecutionTriggerUpdate.json.cs | 110 +
.../api/Models/LocalUser.PowerShell.cs | 40 +
.../generated/api/Models/LocalUser.cs | 100 +
.../Models/LocalUserProperties.PowerShell.cs | 40 +
.../api/Models/LocalUserProperties.cs | 115 +
.../api/Models/LocalUserProperties.json.cs | 21 +
.../api/Models/LocalUsers.PowerShell.cs | 14 +-
.../generated/api/Models/LocalUsers.cs | 48 +-
.../generated/api/Models/LocalUsers.json.cs | 9 +-
.../generated/api/Models/PermissionScope.cs | 11 +-
.../generated/api/Models/SasPolicy.cs | 33 +-
.../api/Models/StorageAccount.PowerShell.cs | 8 +
.../generated/api/Models/StorageAccount.cs | 68 +-
...orageAccountCreateParameters.PowerShell.cs | 8 +
.../Models/StorageAccountCreateParameters.cs | 71 +-
.../StorageAccountProperties.PowerShell.cs | 8 +
.../api/Models/StorageAccountProperties.cs | 71 +-
.../Models/StorageAccountProperties.json.cs | 2 +
...ntPropertiesCreateParameters.PowerShell.cs | 8 +
...torageAccountPropertiesCreateParameters.cs | 74 +-
...eAccountPropertiesCreateParameters.json.cs | 2 +
...ntPropertiesUpdateParameters.PowerShell.cs | 8 +
...torageAccountPropertiesUpdateParameters.cs | 74 +-
...eAccountPropertiesUpdateParameters.json.cs | 2 +
...orageAccountUpdateParameters.PowerShell.cs | 8 +
.../Models/StorageAccountUpdateParameters.cs | 71 +-
.../api/Models/StorageIdentity.PowerShell.cs | 8 +
.../generated/api/Models/StorageIdentity.cs | 29 +
.../api/Models/StorageIdentity.json.cs | 2 +
.../StorageTaskAssignment.PowerShell.cs | 452 ++
.../StorageTaskAssignment.TypeConverter.cs | 147 +
.../api/Models/StorageTaskAssignment.cs | 775 ++++
.../api/Models/StorageTaskAssignment.json.cs | 110 +
...skAssignmentExecutionContext.PowerShell.cs | 247 ++
...ssignmentExecutionContext.TypeConverter.cs | 150 +
.../StorageTaskAssignmentExecutionContext.cs | 257 ++
...rageTaskAssignmentExecutionContext.json.cs | 111 +
...rageTaskAssignmentProperties.PowerShell.cs | 420 ++
...eTaskAssignmentProperties.TypeConverter.cs | 148 +
.../Models/StorageTaskAssignmentProperties.cs | 749 ++++
.../StorageTaskAssignmentProperties.json.cs | 123 +
.../StorageTaskAssignmentReport.PowerShell.cs | 164 +
...orageTaskAssignmentReport.TypeConverter.cs | 147 +
.../api/Models/StorageTaskAssignmentReport.cs | 54 +
.../StorageTaskAssignmentReport.json.cs | 108 +
...gnmentUpdateExecutionContext.PowerShell.cs | 249 ++
...entUpdateExecutionContext.TypeConverter.cs | 151 +
...ageTaskAssignmentUpdateExecutionContext.cs | 259 ++
...skAssignmentUpdateExecutionContext.json.cs | 112 +
...skAssignmentUpdateParameters.PowerShell.cs | 431 ++
...ssignmentUpdateParameters.TypeConverter.cs | 150 +
.../StorageTaskAssignmentUpdateParameters.cs | 731 ++++
...rageTaskAssignmentUpdateParameters.json.cs | 109 +
...skAssignmentUpdateProperties.PowerShell.cs | 423 ++
...ssignmentUpdateProperties.TypeConverter.cs | 150 +
.../StorageTaskAssignmentUpdateProperties.cs | 752 ++++
...rageTaskAssignmentUpdateProperties.json.cs | 127 +
...geTaskAssignmentUpdateReport.PowerShell.cs | 166 +
...askAssignmentUpdateReport.TypeConverter.cs | 148 +
.../StorageTaskAssignmentUpdateReport.cs | 54 +
.../StorageTaskAssignmentUpdateReport.json.cs | 108 +
.../StorageTaskAssignmentsList.PowerShell.cs | 172 +
...torageTaskAssignmentsList.TypeConverter.cs | 147 +
.../api/Models/StorageTaskAssignmentsList.cs | 89 +
.../Models/StorageTaskAssignmentsList.json.cs | 124 +
.../StorageTaskReportInstance.PowerShell.cs | 300 ++
...StorageTaskReportInstance.TypeConverter.cs | 147 +
.../api/Models/StorageTaskReportInstance.cs | 458 ++
.../Models/StorageTaskReportInstance.json.cs | 110 +
.../StorageTaskReportProperties.PowerShell.cs | 268 ++
...orageTaskReportProperties.TypeConverter.cs | 147 +
.../api/Models/StorageTaskReportProperties.cs | 444 ++
.../StorageTaskReportProperties.json.cs | 176 +
.../StorageTaskReportSummary.PowerShell.cs | 172 +
.../StorageTaskReportSummary.TypeConverter.cs | 147 +
.../api/Models/StorageTaskReportSummary.cs | 89 +
.../Models/StorageTaskReportSummary.json.cs | 124 +
.../Models/TriggerParameters.PowerShell.cs | 196 +
.../Models/TriggerParameters.TypeConverter.cs | 147 +
.../generated/api/Models/TriggerParameters.cs | 181 +
.../api/Models/TriggerParameters.json.cs | 116 +
.../TriggerParametersUpdate.PowerShell.cs | 196 +
.../TriggerParametersUpdate.TypeConverter.cs | 147 +
.../api/Models/TriggerParametersUpdate.cs | 181 +
.../Models/TriggerParametersUpdate.json.cs | 116 +
.../Storage.Autorest/generated/api/Storage.cs | 3682 ++++++++++++++++-
.../GetAzStorageAccountMigration_Get.cs | 2 +-
...zStorageAccountMigration_GetViaIdentity.cs | 2 +-
.../cmdlets/GetAzStorageOperation_List.cs | 2 +-
...torageTaskAssignmentInstancesReport_Get.cs | 587 +++
...ssignmentInstancesReport_GetViaIdentity.cs | 549 +++
...ncesReport_GetViaIdentityStorageAccount.cs | 564 +++
...orageTaskAssignmentInstancesReport_List.cs | 572 +++
.../cmdlets/GetAzStorageTaskAssignment_Get.cs | 528 +++
...tAzStorageTaskAssignment_GetViaIdentity.cs | 489 +++
...Assignment_GetViaIdentityStorageAccount.cs | 504 +++
.../GetAzStorageTaskAssignment_List.cs | 553 +++
...wAzStorageTaskAssignment_CreateExpanded.cs | 774 ++++
.../RemoveAzStorageTaskAssignment_Delete.cs | 632 +++
...StorageTaskAssignment_DeleteViaIdentity.cs | 592 +++
...ignment_DeleteViaIdentityStorageAccount.cs | 611 +++
...torageAccountMigration_CustomerExpanded.cs | 2 +-
...ntMigration_CustomerViaIdentityExpanded.cs | 2 +-
...ccountMigration_CustomerViaJsonFilePath.cs | 2 +-
...eAccountMigration_CustomerViaJsonString.cs | 2 +-
...eAzStorageTaskAssignment_UpdateExpanded.cs | 758 ++++
...askAssignment_UpdateViaIdentityExpanded.cs | 718 ++++
...UpdateViaIdentityStorageAccountExpanded.cs | 737 ++++
.../Storage.Autorest/help/Az.Storage.md | 17 +
.../help/Get-AzStorageTaskAssignment.md | 239 ++
...-AzStorageTaskAssignmentInstancesReport.md | 276 ++
.../help/New-AzStorageTaskAssignment.md | 459 ++
.../help/Remove-AzStorageTaskAssignment.md | 247 ++
.../help/Update-AzStorageTaskAssignment.md | 447 ++
...t-AzStorageAccountMigration.Recording.json | 25 +-
.../Get-AzStorageAccountMigration.Tests.ps1 | 2 +-
.../Get-AzStorageTaskAssignment.Tests.ps1 | 33 +
...ageTaskAssignmentInstancesReport.Tests.ps1 | 21 +
...geTaskAssignmentsInstancesReport.Tests.ps1 | 21 +
...New-AzStorageTaskAssignment.Recording.json | 788 ++++
.../New-AzStorageTaskAssignment.Tests.ps1 | 81 +
.../Remove-AzStorageTaskAssignment.Tests.ps1 | 29 +
.../Update-AzStorageTaskAssignment.Tests.ps1 | 29 +
src/Storage/Storage.Autorest/test/env.json | 11 +-
src/Storage/Storage.Autorest/test/utils.ps1 | 5 +-
.../Storage.Management/Az.Storage.psd1 | 24 +-
.../help/Add-AzRmStorageContainerLegalHold.md | 21 +-
...-AzStorageAccountManagementPolicyAction.md | 25 +-
.../help/Add-AzStorageAccountNetworkRule.md | 27 +-
.../help/Close-AzStorageFileHandle.md | 27 +-
.../help/Copy-AzStorageBlob.md | 21 +-
...able-AzStorageBlobDeleteRetentionPolicy.md | 21 +-
...ble-AzStorageBlobLastAccessTimeTracking.md | 19 +-
.../Disable-AzStorageBlobRestorePolicy.md | 21 +-
...AzStorageContainerDeleteRetentionPolicy.md | 21 +-
.../Disable-AzStorageDeleteRetentionPolicy.md | 17 +-
.../help/Disable-AzStorageStaticWebsite.md | 17 +-
...able-AzStorageBlobDeleteRetentionPolicy.md | 21 +-
...ble-AzStorageBlobLastAccessTimeTracking.md | 19 +-
.../help/Enable-AzStorageBlobRestorePolicy.md | 21 +-
...AzStorageContainerDeleteRetentionPolicy.md | 21 +-
.../Enable-AzStorageDeleteRetentionPolicy.md | 17 +-
.../help/Enable-AzStorageStaticWebsite.md | 17 +-
.../help/Get-AzDataLakeGen2ChildItem.md | 17 +-
.../help/Get-AzDataLakeGen2DeletedItem.md | 17 +-
.../help/Get-AzDataLakeGen2Item.md | 17 +-
.../help/Get-AzDataLakeGen2ItemContent.md | 19 +-
.../help/Get-AzRmStorageContainer.md | 19 +-
...-AzRmStorageContainerImmutabilityPolicy.md | 21 +-
.../help/Get-AzRmStorageShare.md | 25 +-
.../help/Get-AzStorageAccount.md | 21 +-
.../help/Get-AzStorageAccountKey.md | 17 +-
.../Get-AzStorageAccountManagementPolicy.md | 21 +-
.../help/Get-AzStorageAccountMigration.md | 19 +-
.../Get-AzStorageAccountNameAvailability.md | 17 +-
.../Get-AzStorageAccountNetworkRuleSet.md | 17 +-
.../help/Get-AzStorageBlob.md | 23 +-
.../help/Get-AzStorageBlobByTag.md | 17 +-
.../help/Get-AzStorageBlobContent.md | 23 +-
.../help/Get-AzStorageBlobCopyState.md | 21 +-
.../help/Get-AzStorageBlobInventoryPolicy.md | 21 +-
.../help/Get-AzStorageBlobQueryResult.md | 21 +-
.../help/Get-AzStorageBlobServiceProperty.md | 21 +-
.../help/Get-AzStorageBlobTag.md | 21 +-
.../help/Get-AzStorageCORSRule.md | 17 +-
.../help/Get-AzStorageContainer.md | 19 +-
...et-AzStorageContainerStoredAccessPolicy.md | 17 +-
.../help/Get-AzStorageEncryptionScope.md | 19 +-
.../help/Get-AzStorageFile.md | 21 +-
.../help/Get-AzStorageFileContent.md | 23 +-
.../help/Get-AzStorageFileCopyState.md | 19 +-
.../help/Get-AzStorageFileHandle.md | 23 +-
.../help/Get-AzStorageFileServiceProperty.md | 21 +-
.../help/Get-AzStorageLocalUser.md | 24 +-
.../help/Get-AzStorageLocalUserKey.md | 21 +-
.../Get-AzStorageObjectReplicationPolicy.md | 19 +-
.../help/Get-AzStorageQueue.md | 19 +-
.../Get-AzStorageQueueStoredAccessPolicy.md | 17 +-
.../Get-AzStorageServiceLoggingProperty.md | 17 +-
.../Get-AzStorageServiceMetricsProperty.md | 17 +-
.../help/Get-AzStorageServiceProperty.md | 17 +-
.../help/Get-AzStorageShare.md | 19 +-
.../Get-AzStorageShareStoredAccessPolicy.md | 17 +-
.../help/Get-AzStorageTable.md | 19 +-
.../Get-AzStorageTableStoredAccessPolicy.md | 17 +-
.../help/Get-AzStorageTaskAssignment.md | 272 ++
...-AzStorageTaskAssignmentInstancesReport.md | 291 ++
.../help/Get-AzStorageUsage.md | 17 +-
...ImmutableStorageWithVersioningMigration.md | 21 +-
.../help/Invoke-AzStorageAccountFailover.md | 20 +-
...rageAccountHierarchicalNamespaceUpgrade.md | 19 +-
...-AzRmStorageContainerImmutabilityPolicy.md | 23 +-
.../help/Move-AzDataLakeGen2Item.md | 19 +-
.../help/New-AzDataLakeGen2Item.md | 19 +-
.../help/New-AzDataLakeGen2SasToken.md | 19 +-
.../help/New-AzRmStorageContainer.md | 31 +-
.../help/New-AzRmStorageShare.md | 23 +-
.../help/New-AzStorageAccount.md | 25 +-
.../help/New-AzStorageAccountKey.md | 17 +-
...untManagementPolicyBlobIndexMatchObject.md | 17 +-
...-AzStorageAccountManagementPolicyFilter.md | 17 +-
...ew-AzStorageAccountManagementPolicyRule.md | 17 +-
.../help/New-AzStorageAccountSASToken.md | 17 +-
.../New-AzStorageBlobInventoryPolicyRule.md | 19 +-
.../help/New-AzStorageBlobQueryConfig.md | 19 +-
.../help/New-AzStorageBlobRangeToRestore.md | 17 +-
.../help/New-AzStorageBlobSASToken.md | 23 +-
.../help/New-AzStorageContainer.md | 19 +-
.../help/New-AzStorageContainerSASToken.md | 19 +-
...ew-AzStorageContainerStoredAccessPolicy.md | 17 +-
.../help/New-AzStorageContext.md | 43 +-
.../help/New-AzStorageDirectory.md | 21 +-
.../help/New-AzStorageEncryptionScope.md | 23 +-
.../help/New-AzStorageFileSASToken.md | 23 +-
.../New-AzStorageLocalUserPermissionScope.md | 17 +-
.../help/New-AzStorageLocalUserSshPassword.md | 21 +-
.../New-AzStorageLocalUserSshPublicKey.md | 17 +-
...ew-AzStorageObjectReplicationPolicyRule.md | 17 +-
.../help/New-AzStorageQueue.md | 17 +-
.../help/New-AzStorageQueueSASToken.md | 19 +-
.../New-AzStorageQueueStoredAccessPolicy.md | 17 +-
.../help/New-AzStorageShare.md | 17 +-
.../help/New-AzStorageShareSASToken.md | 19 +-
.../New-AzStorageShareStoredAccessPolicy.md | 17 +-
.../help/New-AzStorageTable.md | 17 +-
.../help/New-AzStorageTableSASToken.md | 19 +-
.../New-AzStorageTableStoredAccessPolicy.md | 17 +-
.../help/New-AzStorageTaskAssignment.md | 403 ++
.../help/Remove-AzDataLakeGen2AclRecursive.md | 17 +-
.../help/Remove-AzDataLakeGen2Item.md | 19 +-
.../help/Remove-AzRmStorageContainer.md | 21 +-
...-AzRmStorageContainerImmutabilityPolicy.md | 23 +-
.../Remove-AzRmStorageContainerLegalHold.md | 21 +-
.../help/Remove-AzRmStorageShare.md | 27 +-
.../help/Remove-AzStorageAccount.md | 17 +-
...Remove-AzStorageAccountManagementPolicy.md | 23 +-
.../Remove-AzStorageAccountNetworkRule.md | 27 +-
.../help/Remove-AzStorageBlob.md | 21 +-
.../Remove-AzStorageBlobImmutabilityPolicy.md | 19 +-
.../Remove-AzStorageBlobInventoryPolicy.md | 23 +-
.../help/Remove-AzStorageCORSRule.md | 17 +-
.../help/Remove-AzStorageContainer.md | 17 +-
...ve-AzStorageContainerStoredAccessPolicy.md | 17 +-
.../help/Remove-AzStorageDirectory.md | 21 +-
.../help/Remove-AzStorageFile.md | 23 +-
.../help/Remove-AzStorageLocalUser.md | 21 +-
...Remove-AzStorageObjectReplicationPolicy.md | 21 +-
.../help/Remove-AzStorageQueue.md | 17 +-
...Remove-AzStorageQueueStoredAccessPolicy.md | 17 +-
.../help/Remove-AzStorageShare.md | 19 +-
...Remove-AzStorageShareStoredAccessPolicy.md | 17 +-
.../help/Remove-AzStorageTable.md | 17 +-
...Remove-AzStorageTableStoredAccessPolicy.md | 17 +-
.../help/Remove-AzStorageTaskAssignment.md | 323 ++
.../help/Rename-AzStorageDirectory.md | 21 +-
.../help/Rename-AzStorageFile.md | 23 +-
.../help/Restore-AzDataLakeGen2DeletedItem.md | 19 +-
.../help/Restore-AzRmStorageShare.md | 21 +-
.../help/Restore-AzStorageBlobRange.md | 21 +-
.../help/Restore-AzStorageContainer.md | 17 +-
...voke-AzStorageAccountUserDelegationKeys.md | 21 +-
.../help/Set-AzCurrentStorageAccount.md | 19 +-
.../help/Set-AzDataLakeGen2AclRecursive.md | 17 +-
.../help/Set-AzDataLakeGen2ItemAclObject.md | 17 +-
...-AzRmStorageContainerImmutabilityPolicy.md | 31 +-
.../help/Set-AzStorageAccount.md | 27 +-
.../Set-AzStorageAccountManagementPolicy.md | 176 +-
.../help/Set-AzStorageBlobContent.md | 21 +-
.../Set-AzStorageBlobImmutabilityPolicy.md | 19 +-
.../help/Set-AzStorageBlobInventoryPolicy.md | 27 +-
.../help/Set-AzStorageBlobLegalHold.md | 23 +-
.../help/Set-AzStorageBlobTag.md | 21 +-
.../help/Set-AzStorageCORSRule.md | 17 +-
.../help/Set-AzStorageContainerAcl.md | 17 +-
...et-AzStorageContainerStoredAccessPolicy.md | 17 +-
.../help/Set-AzStorageFileContent.md | 21 +-
.../help/Set-AzStorageLocalUser.md | 22 +-
.../Set-AzStorageObjectReplicationPolicy.md | 21 +-
.../Set-AzStorageQueueStoredAccessPolicy.md | 17 +-
.../Set-AzStorageServiceLoggingProperty.md | 17 +-
.../Set-AzStorageServiceMetricsProperty.md | 17 +-
.../help/Set-AzStorageShareQuota.md | 19 +-
.../Set-AzStorageShareStoredAccessPolicy.md | 17 +-
.../Set-AzStorageTableStoredAccessPolicy.md | 17 +-
.../help/Start-AzStorageAccountMigration.md | 23 +-
.../help/Start-AzStorageBlobCopy.md | 37 +-
.../Start-AzStorageBlobIncrementalCopy.md | 25 +-
.../help/Start-AzStorageFileCopy.md | 35 +-
...rageAccountHierarchicalNamespaceUpgrade.md | 19 +-
.../help/Stop-AzStorageBlobCopy.md | 21 +-
.../help/Stop-AzStorageFileCopy.md | 19 +-
.../help/Update-AzDataLakeGen2AclRecursive.md | 17 +-
.../help/Update-AzDataLakeGen2Item.md | 19 +-
.../help/Update-AzRmStorageContainer.md | 21 +-
.../help/Update-AzRmStorageShare.md | 27 +-
.../Update-AzStorageAccountNetworkRuleSet.md | 17 +-
.../Update-AzStorageBlobServiceProperty.md | 21 +-
.../help/Update-AzStorageEncryptionScope.md | 27 +-
.../Update-AzStorageFileServiceProperty.md | 21 +-
.../help/Update-AzStorageServiceProperty.md | 17 +-
.../help/Update-AzStorageTaskAssignment.md | 489 +++
src/Storage/Storage/help | 284 +-
332 files changed, 39615 insertions(+), 998 deletions(-)
create mode 100644 src/Storage/Storage.Autorest/UX/Microsoft.Storage/storageAccounts-storageTaskAssignments.json
create mode 100644 src/Storage/Storage.Autorest/examples/Get-AzStorageTaskAssignment.md
create mode 100644 src/Storage/Storage.Autorest/examples/Get-AzStorageTaskAssignmentInstancesReport.md
create mode 100644 src/Storage/Storage.Autorest/examples/New-AzStorageTaskAssignment.md
create mode 100644 src/Storage/Storage.Autorest/examples/Remove-AzStorageTaskAssignment.md
create mode 100644 src/Storage/Storage.Autorest/examples/Update-AzStorageTaskAssignment.md
create mode 100644 src/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignment.ps1
create mode 100644 src/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignmentInstancesReport.ps1
create mode 100644 src/Storage/Storage.Autorest/exports/New-AzStorageTaskAssignment.ps1
create mode 100644 src/Storage/Storage.Autorest/exports/Remove-AzStorageTaskAssignment.ps1
create mode 100644 src/Storage/Storage.Autorest/exports/Update-AzStorageTaskAssignment.ps1
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/ExecutionTarget.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/ExecutionTarget.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/ExecutionTarget.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/ExecutionTarget.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.PowerShell.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.TypeConverter.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.cs
create mode 100644 src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.json.cs
create mode 100644 src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_Get.cs
create mode 100644 src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_GetViaIdentity.cs
create mode 100644 src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_GetViaIdentityStorageAccount.cs
create mode 100644 src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_List.cs
create mode 100644 src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_Get.cs
create mode 100644 src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_GetViaIdentity.cs
create mode 100644 src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_GetViaIdentityStorageAccount.cs
create mode 100644 src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_List.cs
create mode 100644 src/Storage/Storage.Autorest/generated/cmdlets/NewAzStorageTaskAssignment_CreateExpanded.cs
create mode 100644 src/Storage/Storage.Autorest/generated/cmdlets/RemoveAzStorageTaskAssignment_Delete.cs
create mode 100644 src/Storage/Storage.Autorest/generated/cmdlets/RemoveAzStorageTaskAssignment_DeleteViaIdentity.cs
create mode 100644 src/Storage/Storage.Autorest/generated/cmdlets/RemoveAzStorageTaskAssignment_DeleteViaIdentityStorageAccount.cs
create mode 100644 src/Storage/Storage.Autorest/generated/cmdlets/UpdateAzStorageTaskAssignment_UpdateExpanded.cs
create mode 100644 src/Storage/Storage.Autorest/generated/cmdlets/UpdateAzStorageTaskAssignment_UpdateViaIdentityExpanded.cs
create mode 100644 src/Storage/Storage.Autorest/generated/cmdlets/UpdateAzStorageTaskAssignment_UpdateViaIdentityStorageAccountExpanded.cs
create mode 100644 src/Storage/Storage.Autorest/help/Get-AzStorageTaskAssignment.md
create mode 100644 src/Storage/Storage.Autorest/help/Get-AzStorageTaskAssignmentInstancesReport.md
create mode 100644 src/Storage/Storage.Autorest/help/New-AzStorageTaskAssignment.md
create mode 100644 src/Storage/Storage.Autorest/help/Remove-AzStorageTaskAssignment.md
create mode 100644 src/Storage/Storage.Autorest/help/Update-AzStorageTaskAssignment.md
create mode 100644 src/Storage/Storage.Autorest/test/Get-AzStorageTaskAssignment.Tests.ps1
create mode 100644 src/Storage/Storage.Autorest/test/Get-AzStorageTaskAssignmentInstancesReport.Tests.ps1
create mode 100644 src/Storage/Storage.Autorest/test/Get-AzStorageTaskAssignmentsInstancesReport.Tests.ps1
create mode 100644 src/Storage/Storage.Autorest/test/New-AzStorageTaskAssignment.Recording.json
create mode 100644 src/Storage/Storage.Autorest/test/New-AzStorageTaskAssignment.Tests.ps1
create mode 100644 src/Storage/Storage.Autorest/test/Remove-AzStorageTaskAssignment.Tests.ps1
create mode 100644 src/Storage/Storage.Autorest/test/Update-AzStorageTaskAssignment.Tests.ps1
create mode 100644 src/Storage/Storage.Management/help/Get-AzStorageTaskAssignment.md
create mode 100644 src/Storage/Storage.Management/help/Get-AzStorageTaskAssignmentInstancesReport.md
create mode 100644 src/Storage/Storage.Management/help/New-AzStorageTaskAssignment.md
create mode 100644 src/Storage/Storage.Management/help/Remove-AzStorageTaskAssignment.md
create mode 100644 src/Storage/Storage.Management/help/Update-AzStorageTaskAssignment.md
diff --git a/src/Storage/Storage.Autorest/Az.Storage.format.ps1xml b/src/Storage/Storage.Autorest/Az.Storage.format.ps1xml
index 1aefa9260902..a642a534df8b 100644
--- a/src/Storage/Storage.Autorest/Az.Storage.format.ps1xml
+++ b/src/Storage/Storage.Autorest/Az.Storage.format.ps1xml
@@ -1454,6 +1454,12 @@
+
+
+
+
+
+
@@ -1466,13 +1472,25 @@
+
+
+
+
+
+
+
+ AllowAclAuthorization
+
+
+ GroupId
+ HasSharedKey
@@ -1485,9 +1503,15 @@
HomeDirectory
+
+ IsNfSv3Enabled
+ Sid
+
+ UserId
+
@@ -1515,6 +1539,28 @@
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.LocalUsers
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.LocalUsers#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ManagementPolicy
@@ -2833,6 +2879,9 @@
+
+
+
@@ -2912,6 +2961,9 @@
DnsEndpointType
+
+ EnableExtendedGroup
+ EnableHttpsTrafficOnly
@@ -2993,6 +3045,9 @@
+
+
+
@@ -3042,6 +3097,9 @@
DnsEndpointType
+
+ EnableExtendedGroup
+ EnableHttpsTrafficOnly
@@ -3099,6 +3157,9 @@
+
+
+
@@ -3142,6 +3203,9 @@
DnsEndpointType
+
+ EnableExtendedGroup
+ EnableHttpsTrafficOnly
@@ -3308,6 +3372,9 @@
+
+
+
@@ -3348,6 +3415,9 @@
ResourceGroupName
+
+ StorageTaskAssignmentName
+ SubscriptionId
@@ -3359,6 +3429,302 @@
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignment
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignment#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ ResourceGroupName
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentProperties#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+ Enabled
+
+
+ ProvisioningState
+
+
+ TaskId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentReport
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentReport#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Prefix
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentsList
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentsList#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateProperties#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+ Enabled
+
+
+ ProvisioningState
+
+
+ TaskId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateReport
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateReport#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Prefix
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportProperties#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FinishTime
+
+
+ ObjectFailedCount
+
+
+ ObjectsOperatedOnCount
+
+
+ ObjectsSucceededCount
+
+
+ ObjectsTargetedCount
+
+
+ RunResult
+
+
+ RunStatusEnum
+
+
+ RunStatusError
+
+
+ StartTime
+
+
+ StorageAccountId
+
+
+ SummaryReportPath
+
+
+ TaskAssignmentId
+
+
+ TaskId
+
+
+ TaskVersion
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportSummary
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportSummary#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.SystemData
@@ -3495,6 +3861,98 @@
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParameters
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParameters#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EndBy
+
+
+ Interval
+
+
+ IntervalUnit
+
+
+ StartFrom
+
+
+ StartOn
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersUpdate
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersUpdate#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ EndBy
+
+
+ Interval
+
+
+ IntervalUnit
+
+
+ StartFrom
+
+
+ StartOn
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.Usage
diff --git a/src/Storage/Storage.Autorest/Az.Storage.psd1 b/src/Storage/Storage.Autorest/Az.Storage.psd1
index cdcfd2d0d16f..58f99cbf5404 100644
--- a/src/Storage/Storage.Autorest/Az.Storage.psd1
+++ b/src/Storage/Storage.Autorest/Az.Storage.psd1
@@ -11,7 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.Storage.private.dll'
FormatsToProcess = './Az.Storage.format.ps1xml'
- FunctionsToExport = 'Get-AzStorageAccountMigration', 'Start-AzStorageAccountMigration'
+ FunctionsToExport = 'Get-AzStorageAccountMigration', 'Get-AzStorageTaskAssignment', 'Get-AzStorageTaskAssignmentInstancesReport', 'New-AzStorageTaskAssignment', 'Remove-AzStorageTaskAssignment', 'Start-AzStorageAccountMigration', 'Update-AzStorageTaskAssignment'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Storage'
diff --git a/src/Storage/Storage.Autorest/README.md b/src/Storage/Storage.Autorest/README.md
index 05607fef7951..ee30076d6f10 100644
--- a/src/Storage/Storage.Autorest/README.md
+++ b/src/Storage/Storage.Autorest/README.md
@@ -28,12 +28,13 @@ For information on how to develop for `Az.Storage`, see [how-to.md](how-to.md).
``` yaml
# Please specify the commit id that includes your features to make sure generated codes stable.
-commit: 3e6b4ddca225530c27273d0f816466a905c0151b
+commit: db377f47cf7bf53bf077aa42967112a9783980d5
require:
# readme.azure.noprofile.md is the common configuration file
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
- - $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2023-01-01/storage.json
+ - $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/storage.json
+ - $(repo)/specification/storage/resource-manager/Microsoft.Storage/stable/2023-05-01/storageTaskAssignments.json
# For new RP, the version is 0.1.0
module-version: 5.9.1
@@ -44,6 +45,12 @@ nested-object-to-string: true
identity-correction-for-post: true
directive:
+ - where:
+ variant: ^(Create|Update)(?!.*?Expanded|JsonFilePath|JsonString)
+ remove: true
+ - where:
+ variant: ^CreateViaIdentity.*$
+ remove: true
- where:
subject: ^StorageAccountCustomerInitiatedMigration$
set:
@@ -64,4 +71,61 @@ directive:
- where:
subject: ^StorageAccount$|^StorageAccountKey$|^StorageAccountProperty$|^StorageAccountSas$|^StorageAccountServiceSas$|BlobInventoryPolicy$|^DeletedAccount$|^EncryptionScope$|^LocalUser$|^LocalUserKey$|^ManagementPolicy$|^ObjectReplicationPolicy$|^Sku$|^Usage$|^LocalUserPassword$|^AccountUserDelegationKey$|^AbortStorageAccountHierarchicalNamespaceMigration$|^HierarchicalStorageAccountNamespaceMigration$|^StorageAccountBlobRange$|^StorageAccountUserDelegationKey$|^StorageAccountNameAvailability$
remove: true
+ - where:
+ parameter-name: ParameterEndBy
+ set:
+ parameter-name: EndBy
+ - where:
+ parameter-name: ParameterInterval
+ set:
+ parameter-name: Interval
+ - where:
+ parameter-name: ParameterIntervalUnit
+ set:
+ parameter-name: IntervalUnit
+ - where:
+ parameter-name: ParameterStartFrom
+ set:
+ parameter-name: StartFrom
+ - where:
+ parameter-name: ParameterStartOn
+ set:
+ parameter-name: StartOn
+ - where:
+ property-name: ParameterEndBy
+ set:
+ property-name: EndBy
+ - where:
+ property-name: ParameterInterval
+ set:
+ property-name: Interval
+ - where:
+ property-name: ParameterIntervalUnit
+ set:
+ property-name: IntervalUnit
+ - where:
+ property-name: ParameterStartFrom
+ set:
+ property-name: StartFrom
+ - where:
+ property-name: ParameterStartOn
+ set:
+ property-name: StartOn
+ - from: storageTaskAssignments.json
+ where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/reports"].get
+ transform: >
+ $["operationId"] = "StorageTaskAssignmentInstancesReport_List"
+ # Renaming the operationId to StorageTaskAssignmentInstancesReport_Get, but the operation actually lists all the reports under a specific storage task assignment.
+ - from: storageTaskAssignments.json
+ where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports"].get
+ transform: >
+ $["operationId"] = "StorageTaskAssignmentInstancesReport_Get"
+ - from: storageTaskAssignments.json
+ where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports"].get
+ transform: >
+ $["operationId"] = "StorageTaskAssignmentInstancesReport_Get"
+ - where:
+ model-name: StorageTaskReportInstance
+ set:
+ suppress-format: true
```
diff --git a/src/Storage/Storage.Autorest/UX/Microsoft.Storage/storageAccounts-accountMigrations.json b/src/Storage/Storage.Autorest/UX/Microsoft.Storage/storageAccounts-accountMigrations.json
index 37acdf14647c..3d51964152e4 100644
--- a/src/Storage/Storage.Autorest/UX/Microsoft.Storage/storageAccounts-accountMigrations.json
+++ b/src/Storage/Storage.Autorest/UX/Microsoft.Storage/storageAccounts-accountMigrations.json
@@ -1,6 +1,6 @@
{
"resourceType": "storageAccounts/accountMigrations",
- "apiVersion": "2023-01-01",
+ "apiVersion": "2023-05-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.storage"
},
diff --git a/src/Storage/Storage.Autorest/UX/Microsoft.Storage/storageAccounts-storageTaskAssignments.json b/src/Storage/Storage.Autorest/UX/Microsoft.Storage/storageAccounts-storageTaskAssignments.json
new file mode 100644
index 000000000000..57163dd1fff9
--- /dev/null
+++ b/src/Storage/Storage.Autorest/UX/Microsoft.Storage/storageAccounts-storageTaskAssignments.json
@@ -0,0 +1,95 @@
+{
+ "resourceType": "storageAccounts/storageTaskAssignments",
+ "apiVersion": "2023-05-01",
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.storage"
+ },
+ "commands": [
+ {
+ "name": "Get-AzStorageTaskAssignment",
+ "description": "Get the storage task assignment properties",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.storage/get-azstoragetaskassignment"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-AccountName ",
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Get the storage task assignment properties",
+ "parameters": [
+ {
+ "name": "-AccountName",
+ "value": "[Path.accountName]"
+ },
+ {
+ "name": "-Name",
+ "value": "[Path.storageTaskAssignmentName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "Remove-AzStorageTaskAssignment",
+ "description": "Delete the storage task assignment sub-resource",
+ "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}",
+ "help": {
+ "learnMore": {
+ "url": "https://learn.microsoft.com/powershell/module/az.storage/remove-azstoragetaskassignment"
+ },
+ "parameterSets": [
+ {
+ "parameters": [
+ "-AccountName ",
+ "-Name ",
+ "-ResourceGroupName ",
+ "[-SubscriptionId ]"
+ ]
+ }
+ ]
+ },
+ "examples": [
+ {
+ "description": "Delete the storage task assignment sub-resource",
+ "parameters": [
+ {
+ "name": "-AccountName",
+ "value": "[Path.accountName]"
+ },
+ {
+ "name": "-Name",
+ "value": "[Path.storageTaskAssignmentName]"
+ },
+ {
+ "name": "-ResourceGroupName",
+ "value": "[Path.resourceGroupName]"
+ },
+ {
+ "name": "-SubscriptionId",
+ "value": "[Path.subscriptionId]"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/Storage/Storage.Autorest/build-module.ps1 b/src/Storage/Storage.Autorest/build-module.ps1
index a0121efbb178..638ba2bb4e43 100644
--- a/src/Storage/Storage.Autorest/build-module.ps1
+++ b/src/Storage/Storage.Autorest/build-module.ps1
@@ -12,7 +12,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
-param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX)
+param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX, [Switch]$DisableAfterBuildTasks)
$ErrorActionPreference = 'Stop'
if($PSEdition -ne 'Core') {
@@ -177,4 +177,14 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
}
+if (-not $DisableAfterBuildTasks){
+ $afterBuildTasksPath = Join-Path $PSScriptRoot ''
+ $afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable
+ if(Test-Path -Path $afterBuildTasksPath -PathType leaf){
+ Write-Host -ForegroundColor Green 'Running after build tasks...'
+ . $afterBuildTasksPath @afterBuildTasksArgs
+ }
+}
+
+
Write-Host -ForegroundColor Green '-------------Done-------------'
diff --git a/src/Storage/Storage.Autorest/examples/Get-AzStorageTaskAssignment.md b/src/Storage/Storage.Autorest/examples/Get-AzStorageTaskAssignment.md
new file mode 100644
index 000000000000..5b06989958ba
--- /dev/null
+++ b/src/Storage/Storage.Autorest/examples/Get-AzStorageTaskAssignment.md
@@ -0,0 +1,56 @@
+### Example 1: Get a task assignment
+```powershell
+Get-AzStorageTaskAssignment -ResourceGroupName myresourcegroup -AccountName myaccount -Name myassignment
+```
+
+```output
+Description : This is a task assignment
+Enabled : True
+EndBy : 7/2/2025 6:17:38 AM
+Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/storageTaskAssignments/myassignment
+Interval : 1
+IntervalUnit : days
+Name : myassignment
+ProvisioningState : Succeeded
+ReportPrefix : testc1
+ResourceGroupName : myresourcegroup
+RunStatusEnum :
+RunStatusError :
+RunStatusFinishTime :
+RunStatusObjectFailedCount :
+RunStatusObjectsOperatedOnCount :
+RunStatusObjectsSucceededCount :
+RunStatusObjectsTargetedCount :
+RunStatusRunResult :
+RunStatusStartTime :
+RunStatusStorageAccountId :
+RunStatusSummaryReportPath :
+RunStatusTaskAssignmentId :
+RunStatusTaskId :
+RunStatusTaskVersion :
+StartFrom : 7/2/2024 6:17:38 AM
+StartOn :
+TargetExcludePrefix : {}
+TargetPrefix : {test}
+TaskId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/mystoragetask1
+TriggerType : OnSchedule
+Type : Microsoft.Storage/storageAccounts/storageTaskAssignments
+```
+
+This command gets the task assignment "myassignment" under storage account "myaccount".
+
+### Example 2: List task assignments under a storage account
+```powershell
+Get-AzStorageTaskAssignment -ResourceGroupName myresourcegroup -AccountName myaccount
+```
+
+```output
+Name ResourceGroupName
+---- -----------------
+assignment1 myresourcegroup
+assignment2 myresourcegroup
+assignment3 myresourcegroup
+```
+
+This command lists task assignments under the storage account "myaccount".
+
diff --git a/src/Storage/Storage.Autorest/examples/Get-AzStorageTaskAssignmentInstancesReport.md b/src/Storage/Storage.Autorest/examples/Get-AzStorageTaskAssignmentInstancesReport.md
new file mode 100644
index 000000000000..99631149ccf8
--- /dev/null
+++ b/src/Storage/Storage.Autorest/examples/Get-AzStorageTaskAssignmentInstancesReport.md
@@ -0,0 +1,72 @@
+### Example 1: List the reports of a task assignment in an account
+```powershell
+Get-AzStorageTaskAssignmentInstancesReport -AccountName myaccount -ResourceGroupName myresourcegroup -StorageTaskAssignmentName mytaskassignment
+```
+
+```output
+FinishTime : 2024-07-02T08:19:51.9238839Z
+Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/storageTaskAssignments/mytaskassignment/reports/instance1
+Name : instance1
+ObjectFailedCount : 0
+ObjectsOperatedOnCount : 0
+ObjectsSucceededCount : 0
+ObjectsTargetedCount : 0
+RunResult : Succeeded
+RunStatusEnum : Finished
+RunStatusError : 0x0
+StartTime : 2024-07-02T08:10:55.0000000Z
+StorageAccountId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount
+SummaryReportPath : https://myaccount.blob.core.windows.net/testc2/mytask/assignment1/2024-07-02T08:11:20/SummaryReport.json
+TaskAssignmentId : /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/storageTaskAssignments/mytaskassignment
+TaskId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/mytask
+TaskVersion : 1
+Type : Microsoft.Storage/storageAccounts/storageTaskAssignments/reports
+```
+
+This command lists the reports of task assignment "mytaskassignment".
+
+### Example 2: List the reports of all storage task assignments and instances in an account
+```powershell
+Get-AzStorageTaskAssignmentInstancesReport -AccountName myaccount -ResourceGroupName myresourcegroup
+```
+
+```output
+FinishTime : 2024-07-03T08:19:23.1774164Z
+Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/reports/instance1
+Name : instance1
+ObjectFailedCount : 0
+ObjectsOperatedOnCount : 0
+ObjectsSucceededCount : 0
+ObjectsTargetedCount : 0
+RunResult : Succeeded
+RunStatusEnum : Finished
+RunStatusError : 0x0
+StartTime : 2024-07-03T08:10:11.0000000Z
+StorageAccountId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount
+SummaryReportPath : https://myaccount.blob.core.windows.net/testc2/mytask/mytaskassignment/2024-07-03T08:10:41/SummaryReport.json
+TaskAssignmentId : /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/storageTaskAssignments/mytaskassignment
+TaskId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/mytask
+TaskVersion : 1
+Type : Microsoft.Storage/storageAccounts/reports
+
+FinishTime : 2024-07-02T08:19:51.9238839Z
+Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/reports/instance2
+Name : instance2
+ObjectFailedCount : 0
+ObjectsOperatedOnCount : 0
+ObjectsSucceededCount : 0
+ObjectsTargetedCount : 0
+RunResult : Succeeded
+RunStatusEnum : Finished
+RunStatusError : 0x0
+StartTime : 2024-07-02T08:10:55.0000000Z
+StorageAccountId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount
+SummaryReportPath : https://myaccount.blob.core.windows.net/testc2/mytaskassignment2/assignment1/2024-07-02T08:11:20/SummaryReport.json
+TaskAssignmentId : /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/storageTaskAssignments/mytaskassignment2
+TaskId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/mytask
+TaskVersion : 1
+Type : Microsoft.Storage/storageAccounts/reports
+```
+
+This command lists the reports of all storage task assignments and instances under storage account "myaccount".
+
diff --git a/src/Storage/Storage.Autorest/examples/New-AzStorageTaskAssignment.md b/src/Storage/Storage.Autorest/examples/New-AzStorageTaskAssignment.md
new file mode 100644
index 000000000000..5b83942b4ba1
--- /dev/null
+++ b/src/Storage/Storage.Autorest/examples/New-AzStorageTaskAssignment.md
@@ -0,0 +1,86 @@
+### Example 1: Create a task assignment that runs once
+```powershell
+$taskid = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/mytask"
+New-AzStorageTaskAssignment -ResourceGroupName myresourcegroup -AccountName myaccount -name mytaskassignment -TaskId $taskid -ReportPrefix "test" -TriggerType RunOnce -Description "task assignment" -Enabled:$false
+```
+
+```output
+Description : task assignment
+Enabled : False
+EndBy :
+Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/storageTaskAssignments/mytaskassignment
+Interval :
+IntervalUnit :
+Name : mytaskassignment
+ProvisioningState : Succeeded
+ReportPrefix : test
+ResourceGroupName : myresourcegroup
+RunStatusEnum :
+RunStatusError :
+RunStatusFinishTime :
+RunStatusObjectFailedCount :
+RunStatusObjectsOperatedOnCount :
+RunStatusObjectsSucceededCount :
+RunStatusObjectsTargetedCount :
+RunStatusRunResult :
+RunStatusStartTime :
+RunStatusStorageAccountId :
+RunStatusSummaryReportPath :
+RunStatusTaskAssignmentId :
+RunStatusTaskId :
+RunStatusTaskVersion :
+StartFrom :
+StartOn : 7/2/2024 4:39:15 AM
+TargetExcludePrefix :
+TargetPrefix :
+TaskId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/mytask
+TriggerType : RunOnce
+Type : Microsoft.Storage/storageAccounts/storageTaskAssignments
+```
+
+This command creates a task assignment that runs once.
+
+### Example 2: Create a task assignment that runs on schedule
+```powershell
+$start = Get-Date -Year 2024 -Month 8 -Day 7 -Hour 1 -Minute 30
+$end = Get-Date -Year 2024 -Month 12 -Day 25 -Hour 2 -Minute 45
+$taskid = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/mytask"
+New-AzStorageTaskAssignment -accountname myaccount -name mytaskassignment -resourcegroupname myresourcegroup -TaskId $taskid -ReportPrefix test -StartFrom $start.ToUniversalTime() -TriggerType OnSchedule -Interval 10 -IntervalUnit Days -Description "my task assignment" -Enabled:$false -EndBy $end.ToUniversalTime()
+```
+
+```output
+Description : my task assignment
+Enabled : False
+EndBy : 12/24/2024 6:45:03 PM
+Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/storageTaskAssignments/myassignment
+Interval : 10
+IntervalUnit : days
+Name : mytaskassignment
+ProvisioningState : Succeeded
+ReportPrefix : test
+ResourceGroupName : myresourcegroup
+RunStatusEnum :
+RunStatusError :
+RunStatusFinishTime :
+RunStatusObjectFailedCount :
+RunStatusObjectsOperatedOnCount :
+RunStatusObjectsSucceededCount :
+RunStatusObjectsTargetedCount :
+RunStatusRunResult :
+RunStatusStartTime :
+RunStatusStorageAccountId :
+RunStatusSummaryReportPath :
+RunStatusTaskAssignmentId :
+RunStatusTaskId :
+RunStatusTaskVersion :
+StartFrom : 8/6/2024 5:30:39 PM
+StartOn :
+TargetExcludePrefix :
+TargetPrefix :
+TaskId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/
+ mytask
+TriggerType : OnSchedule
+Type : Microsoft.Storage/storageAccounts/storageTaskAssignments
+```
+
+This command creates a task assignment that runs every 10 days from 8/6/2024 5:30:39 PM to 12/24/2024 6:45:03 PM.
diff --git a/src/Storage/Storage.Autorest/examples/Remove-AzStorageTaskAssignment.md b/src/Storage/Storage.Autorest/examples/Remove-AzStorageTaskAssignment.md
new file mode 100644
index 000000000000..90bf477e13d3
--- /dev/null
+++ b/src/Storage/Storage.Autorest/examples/Remove-AzStorageTaskAssignment.md
@@ -0,0 +1,8 @@
+### Example 1: Remove a task assignment
+```powershell
+Remove-AzStorageTaskAssignment -AccountName myaccount -ResourceGroupName myresourcegroup -Name mytaskassignment
+```
+
+This command deletes a task assignment.
+
+
diff --git a/src/Storage/Storage.Autorest/examples/Update-AzStorageTaskAssignment.md b/src/Storage/Storage.Autorest/examples/Update-AzStorageTaskAssignment.md
new file mode 100644
index 000000000000..73a2636e8a31
--- /dev/null
+++ b/src/Storage/Storage.Autorest/examples/Update-AzStorageTaskAssignment.md
@@ -0,0 +1,42 @@
+### Example 1: Update a task assignment
+```powershell
+$start = Get-Date -Year 2024 -Month 8 -Day 7 -Hour 1 -Minute 30
+$end = Get-Date -Year 2024 -Month 12 -Day 25 -Hour 2 -Minute 45
+Update-AzStorageTaskAssignment -accountname myaccount -name mytaskassignment -resourcegroupname myresourcegroup -StartFrom $start.ToUniversalTime() -EndBy $end.ToUniversalTime() -Interval 7 -Description "update task assignment" -Enabled
+```
+
+```output
+Description : update task assignment
+Enabled : True
+EndBy : 12/24/2024 6:45:03 PM
+Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Storage/storageAccounts/myaccount/storageTaskAssignments/mytaskassignment
+Interval : 7
+IntervalUnit : days
+Name : mytaskassignment
+ProvisioningState : Succeeded
+ReportPrefix : test
+ResourceGroupName : myresourcegroup
+RunStatusEnum :
+RunStatusError :
+RunStatusFinishTime :
+RunStatusObjectFailedCount :
+RunStatusObjectsOperatedOnCount :
+RunStatusObjectsSucceededCount :
+RunStatusObjectsTargetedCount :
+RunStatusRunResult :
+RunStatusStartTime :
+RunStatusStorageAccountId :
+RunStatusSummaryReportPath :
+RunStatusTaskAssignmentId :
+RunStatusTaskId :
+RunStatusTaskVersion :
+StartFrom : 8/6/2024 5:30:39 PM
+StartOn :
+TargetExcludePrefix :
+TargetPrefix :
+TaskId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/mytask
+TriggerType : OnSchedule
+Type : Microsoft.Storage/storageAccounts/storageTaskAssignments
+```
+
+This command updates the interval, start time, end time, and description of a task assignment, and enables the task assignment.
diff --git a/src/Storage/Storage.Autorest/exports/Get-AzStorageAccountMigration.ps1 b/src/Storage/Storage.Autorest/exports/Get-AzStorageAccountMigration.ps1
index 56675ab9e834..b7f286084e7d 100644
--- a/src/Storage/Storage.Autorest/exports/Get-AzStorageAccountMigration.ps1
+++ b/src/Storage/Storage.Autorest/exports/Get-AzStorageAccountMigration.ps1
@@ -43,6 +43,7 @@ INPUTOBJECT : Identity Parameter
[ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
[PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
[ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
[SubscriptionId ]: The ID of the target subscription.
[Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
.Link
diff --git a/src/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignment.ps1 b/src/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignment.ps1
new file mode 100644
index 000000000000..a90213ea7d69
--- /dev/null
+++ b/src/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignment.ps1
@@ -0,0 +1,262 @@
+
+# ----------------------------------------------------------------------------------
+# 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
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get the storage task assignment properties
+.Description
+Get the storage task assignment properties
+.Example
+Get-AzStorageTaskAssignment -ResourceGroupName myresourcegroup -AccountName myaccount -Name myassignment
+.Example
+Get-AzStorageTaskAssignment -ResourceGroupName myresourcegroup -AccountName myaccount
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AccountName ]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [BlobInventoryPolicyName ]: The name of the storage account blob inventory policy. It should always be 'default'
+ [DeletedAccountName ]: Name of the deleted storage account.
+ [EncryptionScopeName ]: The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ [Id ]: Resource identity path
+ [Location ]: The location of the deleted storage account.
+ [ManagementPolicyName ]: The name of the Storage Account Management Policy. It should always be 'default'
+ [MigrationName ]: The name of the Storage Account Migration. It should always be 'default'
+ [ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
+ [PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [SubscriptionId ]: The ID of the target subscription.
+ [Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
+
+STORAGEACCOUNTINPUTOBJECT : Identity Parameter
+ [AccountName ]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [BlobInventoryPolicyName ]: The name of the storage account blob inventory policy. It should always be 'default'
+ [DeletedAccountName ]: Name of the deleted storage account.
+ [EncryptionScopeName ]: The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ [Id ]: Resource identity path
+ [Location ]: The location of the deleted storage account.
+ [ManagementPolicyName ]: The name of the Storage Account Management Policy. It should always be 'default'
+ [MigrationName ]: The name of the Storage Account Migration. It should always be 'default'
+ [ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
+ [PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [SubscriptionId ]: The ID of the target subscription.
+ [Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
+.Link
+https://learn.microsoft.com/powershell/module/az.storage/get-azstoragetaskassignment
+#>
+function Get-AzStorageTaskAssignment {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage account within the specified resource group.
+ # Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${AccountName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityStorageAccount', Mandatory)]
+ [Alias('StorageTaskAssignmentName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage task assignment within the specified resource group.
+ # Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
+ # Identity Parameter
+ ${InputObject},
+
+ [Parameter(ParameterSetName='GetViaIdentityStorageAccount', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
+ # Identity Parameter
+ ${StorageAccountInputObject},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Query')]
+ [System.Int32]
+ # Optional, specifies the maximum number of storage task assignment Ids to be included in the list response.
+ ${Maxpagesize},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.Storage.private\Get-AzStorageTaskAssignment_Get';
+ GetViaIdentity = 'Az.Storage.private\Get-AzStorageTaskAssignment_GetViaIdentity';
+ GetViaIdentityStorageAccount = 'Az.Storage.private\Get-AzStorageTaskAssignment_GetViaIdentityStorageAccount';
+ List = 'Az.Storage.private\Get-AzStorageTaskAssignment_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignmentInstancesReport.ps1 b/src/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignmentInstancesReport.ps1
new file mode 100644
index 000000000000..e817ccc5de6a
--- /dev/null
+++ b/src/Storage/Storage.Autorest/exports/Get-AzStorageTaskAssignmentInstancesReport.ps1
@@ -0,0 +1,269 @@
+
+# ----------------------------------------------------------------------------------
+# 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
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Fetch the report summary of a single storage task assignment's instances
+.Description
+Fetch the report summary of a single storage task assignment's instances
+.Example
+Get-AzStorageTaskAssignmentInstancesReport -AccountName myaccount -ResourceGroupName myresourcegroup -StorageTaskAssignmentName mytaskassignment
+.Example
+Get-AzStorageTaskAssignmentInstancesReport -AccountName myaccount -ResourceGroupName myresourcegroup
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AccountName ]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [BlobInventoryPolicyName ]: The name of the storage account blob inventory policy. It should always be 'default'
+ [DeletedAccountName ]: Name of the deleted storage account.
+ [EncryptionScopeName ]: The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ [Id ]: Resource identity path
+ [Location ]: The location of the deleted storage account.
+ [ManagementPolicyName ]: The name of the Storage Account Management Policy. It should always be 'default'
+ [MigrationName ]: The name of the Storage Account Migration. It should always be 'default'
+ [ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
+ [PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [SubscriptionId ]: The ID of the target subscription.
+ [Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
+
+STORAGEACCOUNTINPUTOBJECT : Identity Parameter
+ [AccountName ]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [BlobInventoryPolicyName ]: The name of the storage account blob inventory policy. It should always be 'default'
+ [DeletedAccountName ]: Name of the deleted storage account.
+ [EncryptionScopeName ]: The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ [Id ]: Resource identity path
+ [Location ]: The location of the deleted storage account.
+ [ManagementPolicyName ]: The name of the Storage Account Management Policy. It should always be 'default'
+ [MigrationName ]: The name of the Storage Account Migration. It should always be 'default'
+ [ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
+ [PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [SubscriptionId ]: The ID of the target subscription.
+ [Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
+.Link
+https://learn.microsoft.com/powershell/module/az.storage/get-azstoragetaskassignmentinstancesreport
+#>
+function Get-AzStorageTaskAssignmentInstancesReport {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage account within the specified resource group.
+ # Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${AccountName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityStorageAccount', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage task assignment within the specified resource group.
+ # Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${StorageTaskAssignmentName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
+ # Identity Parameter
+ ${InputObject},
+
+ [Parameter(ParameterSetName='GetViaIdentityStorageAccount', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
+ # Identity Parameter
+ ${StorageAccountInputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Query')]
+ [System.String]
+ # Optional.
+ # When specified, it can be used to query using reporting properties.
+ # See [Constructing Filter Strings](https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#constructing-filter-strings) for details.
+ ${Filter},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Query')]
+ [System.Int32]
+ # Optional, specifies the maximum number of storage task assignment instances to be included in the list response.
+ ${Maxpagesize},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.Storage.private\Get-AzStorageTaskAssignmentInstancesReport_Get';
+ GetViaIdentity = 'Az.Storage.private\Get-AzStorageTaskAssignmentInstancesReport_GetViaIdentity';
+ GetViaIdentityStorageAccount = 'Az.Storage.private\Get-AzStorageTaskAssignmentInstancesReport_GetViaIdentityStorageAccount';
+ List = 'Az.Storage.private\Get-AzStorageTaskAssignmentInstancesReport_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Storage/Storage.Autorest/exports/New-AzStorageTaskAssignment.ps1 b/src/Storage/Storage.Autorest/exports/New-AzStorageTaskAssignment.ps1
new file mode 100644
index 000000000000..2e2b826203fc
--- /dev/null
+++ b/src/Storage/Storage.Autorest/exports/New-AzStorageTaskAssignment.ps1
@@ -0,0 +1,301 @@
+
+# ----------------------------------------------------------------------------------
+# 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
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Asynchronously creates a new storage task assignment sub-resource with the specified parameters.
+If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated.
+If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
+.Description
+Asynchronously creates a new storage task assignment sub-resource with the specified parameters.
+If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated.
+If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
+.Example
+$taskid = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/mytask"
+New-AzStorageTaskAssignment -ResourceGroupName myresourcegroup -AccountName myaccount -name mytaskassignment -TaskId $taskid -ReportPrefix "test" -TriggerType RunOnce -Description "task assignment" -Enabled:$false
+.Example
+$start = Get-Date -Year 2024 -Month 8 -Day 7 -Hour 1 -Minute 30
+$end = Get-Date -Year 2024 -Month 12 -Day 25 -Hour 2 -Minute 45
+$taskid = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/mytask"
+New-AzStorageTaskAssignment -accountname myaccount -name mytaskassignment -resourcegroupname myresourcegroup -TaskId $taskid -ReportPrefix test -StartFrom $start.ToUniversalTime() -TriggerType OnSchedule -Interval 10 -IntervalUnit Days -Description "my task assignment" -Enabled:$false -EndBy $end.ToUniversalTime()
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment
+.Link
+https://learn.microsoft.com/powershell/module/az.storage/new-azstoragetaskassignment
+#>
+function New-AzStorageTaskAssignment {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage account within the specified resource group.
+ # Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${AccountName},
+
+ [Parameter(Mandatory)]
+ [Alias('StorageTaskAssignmentName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage task assignment within the specified resource group.
+ # Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String]
+ # Text that describes the purpose of the storage task assignment
+ ${Description},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Whether the storage task assignment is enabled or not
+ ${Enabled},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String]
+ # The container prefix for the location of storage task assignment report
+ ${ReportPrefix},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String]
+ # Id of the corresponding storage task
+ ${TaskId},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String]
+ # The trigger type of the storage task assignment execution
+ ${TriggerType},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.DateTime]
+ # When to end task execution.
+ # This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
+ ${EndBy},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.Int32]
+ # Run interval of task execution.
+ # This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
+ ${Interval},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String]
+ # Run interval unit of task execution.
+ # This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
+ ${IntervalUnit},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.DateTime]
+ # When to start task execution.
+ # This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
+ ${StartFrom},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.DateTime]
+ # When to start task execution.
+ # This is an optional field when ExecutionTrigger.properties.type is 'RunOnce'; this property should not be present when ExecutionTrigger.properties.type is 'OnSchedule'
+ ${StartOn},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String[]]
+ # List of object prefixes to be excluded from task execution.
+ # If there is a conflict between include and exclude prefixes, the exclude prefix will be the determining factor
+ ${TargetExcludePrefix},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String[]]
+ # Required list of object prefixes to be included for task execution
+ ${TargetPrefix},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.Storage.private\New-AzStorageTaskAssignment_CreateExpanded';
+ }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Storage/Storage.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/Storage/Storage.Autorest/exports/ProxyCmdletDefinitions.ps1
index c5d9a8698cbc..6078a0ab46d4 100644
--- a/src/Storage/Storage.Autorest/exports/ProxyCmdletDefinitions.ps1
+++ b/src/Storage/Storage.Autorest/exports/ProxyCmdletDefinitions.ps1
@@ -43,6 +43,7 @@ INPUTOBJECT : Identity Parameter
[ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
[PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
[ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
[SubscriptionId ]: The ID of the target subscription.
[Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
.Link
@@ -218,32 +219,1337 @@ end {
<#
.Synopsis
+Fetch the report summary of a single storage task assignment's instances
+.Description
+Fetch the report summary of a single storage task assignment's instances
+.Example
+Get-AzStorageTaskAssignmentInstancesReport -AccountName myaccount -ResourceGroupName myresourcegroup -StorageTaskAssignmentName mytaskassignment
+.Example
+Get-AzStorageTaskAssignmentInstancesReport -AccountName myaccount -ResourceGroupName myresourcegroup
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AccountName ]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [BlobInventoryPolicyName ]: The name of the storage account blob inventory policy. It should always be 'default'
+ [DeletedAccountName ]: Name of the deleted storage account.
+ [EncryptionScopeName ]: The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ [Id ]: Resource identity path
+ [Location ]: The location of the deleted storage account.
+ [ManagementPolicyName ]: The name of the Storage Account Management Policy. It should always be 'default'
+ [MigrationName ]: The name of the Storage Account Migration. It should always be 'default'
+ [ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
+ [PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [SubscriptionId ]: The ID of the target subscription.
+ [Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
+
+STORAGEACCOUNTINPUTOBJECT : Identity Parameter
+ [AccountName ]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [BlobInventoryPolicyName ]: The name of the storage account blob inventory policy. It should always be 'default'
+ [DeletedAccountName ]: Name of the deleted storage account.
+ [EncryptionScopeName ]: The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ [Id ]: Resource identity path
+ [Location ]: The location of the deleted storage account.
+ [ManagementPolicyName ]: The name of the Storage Account Management Policy. It should always be 'default'
+ [MigrationName ]: The name of the Storage Account Migration. It should always be 'default'
+ [ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
+ [PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [SubscriptionId ]: The ID of the target subscription.
+ [Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
+.Link
+https://learn.microsoft.com/powershell/module/az.storage/get-azstoragetaskassignmentinstancesreport
+#>
+function Get-AzStorageTaskAssignmentInstancesReport {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage account within the specified resource group.
+ # Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${AccountName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityStorageAccount', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage task assignment within the specified resource group.
+ # Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${StorageTaskAssignmentName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
+ # Identity Parameter
+ ${InputObject},
+
+ [Parameter(ParameterSetName='GetViaIdentityStorageAccount', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
+ # Identity Parameter
+ ${StorageAccountInputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Query')]
+ [System.String]
+ # Optional.
+ # When specified, it can be used to query using reporting properties.
+ # See [Constructing Filter Strings](https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#constructing-filter-strings) for details.
+ ${Filter},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Query')]
+ [System.Int32]
+ # Optional, specifies the maximum number of storage task assignment instances to be included in the list response.
+ ${Maxpagesize},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.Storage.private\Get-AzStorageTaskAssignmentInstancesReport_Get';
+ GetViaIdentity = 'Az.Storage.private\Get-AzStorageTaskAssignmentInstancesReport_GetViaIdentity';
+ GetViaIdentityStorageAccount = 'Az.Storage.private\Get-AzStorageTaskAssignmentInstancesReport_GetViaIdentityStorageAccount';
+ List = 'Az.Storage.private\Get-AzStorageTaskAssignmentInstancesReport_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Get the storage task assignment properties
+.Description
+Get the storage task assignment properties
+.Example
+Get-AzStorageTaskAssignment -ResourceGroupName myresourcegroup -AccountName myaccount -Name myassignment
+.Example
+Get-AzStorageTaskAssignment -ResourceGroupName myresourcegroup -AccountName myaccount
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AccountName ]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [BlobInventoryPolicyName ]: The name of the storage account blob inventory policy. It should always be 'default'
+ [DeletedAccountName ]: Name of the deleted storage account.
+ [EncryptionScopeName ]: The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ [Id ]: Resource identity path
+ [Location ]: The location of the deleted storage account.
+ [ManagementPolicyName ]: The name of the Storage Account Management Policy. It should always be 'default'
+ [MigrationName ]: The name of the Storage Account Migration. It should always be 'default'
+ [ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
+ [PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [SubscriptionId ]: The ID of the target subscription.
+ [Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
+
+STORAGEACCOUNTINPUTOBJECT : Identity Parameter
+ [AccountName ]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [BlobInventoryPolicyName ]: The name of the storage account blob inventory policy. It should always be 'default'
+ [DeletedAccountName ]: Name of the deleted storage account.
+ [EncryptionScopeName ]: The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ [Id ]: Resource identity path
+ [Location ]: The location of the deleted storage account.
+ [ManagementPolicyName ]: The name of the Storage Account Management Policy. It should always be 'default'
+ [MigrationName ]: The name of the Storage Account Migration. It should always be 'default'
+ [ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
+ [PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [SubscriptionId ]: The ID of the target subscription.
+ [Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
+.Link
+https://learn.microsoft.com/powershell/module/az.storage/get-azstoragetaskassignment
+#>
+function Get-AzStorageTaskAssignment {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage account within the specified resource group.
+ # Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${AccountName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityStorageAccount', Mandatory)]
+ [Alias('StorageTaskAssignmentName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage task assignment within the specified resource group.
+ # Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
+ # Identity Parameter
+ ${InputObject},
+
+ [Parameter(ParameterSetName='GetViaIdentityStorageAccount', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
+ # Identity Parameter
+ ${StorageAccountInputObject},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Query')]
+ [System.Int32]
+ # Optional, specifies the maximum number of storage task assignment Ids to be included in the list response.
+ ${Maxpagesize},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.Storage.private\Get-AzStorageTaskAssignment_Get';
+ GetViaIdentity = 'Az.Storage.private\Get-AzStorageTaskAssignment_GetViaIdentity';
+ GetViaIdentityStorageAccount = 'Az.Storage.private\Get-AzStorageTaskAssignment_GetViaIdentityStorageAccount';
+ List = 'Az.Storage.private\Get-AzStorageTaskAssignment_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Asynchronously creates a new storage task assignment sub-resource with the specified parameters.
+If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated.
+If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
+.Description
+Asynchronously creates a new storage task assignment sub-resource with the specified parameters.
+If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated.
+If a storage task assignment is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
+.Example
+$taskid = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/mytask"
+New-AzStorageTaskAssignment -ResourceGroupName myresourcegroup -AccountName myaccount -name mytaskassignment -TaskId $taskid -ReportPrefix "test" -TriggerType RunOnce -Description "task assignment" -Enabled:$false
+.Example
+$start = Get-Date -Year 2024 -Month 8 -Day 7 -Hour 1 -Minute 30
+$end = Get-Date -Year 2024 -Month 12 -Day 25 -Hour 2 -Minute 45
+$taskid = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.StorageActions/storageTasks/mytask"
+New-AzStorageTaskAssignment -accountname myaccount -name mytaskassignment -resourcegroupname myresourcegroup -TaskId $taskid -ReportPrefix test -StartFrom $start.ToUniversalTime() -TriggerType OnSchedule -Interval 10 -IntervalUnit Days -Description "my task assignment" -Enabled:$false -EndBy $end.ToUniversalTime()
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment
+.Link
+https://learn.microsoft.com/powershell/module/az.storage/new-azstoragetaskassignment
+#>
+function New-AzStorageTaskAssignment {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage account within the specified resource group.
+ # Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${AccountName},
+
+ [Parameter(Mandatory)]
+ [Alias('StorageTaskAssignmentName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage task assignment within the specified resource group.
+ # Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String]
+ # Text that describes the purpose of the storage task assignment
+ ${Description},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Whether the storage task assignment is enabled or not
+ ${Enabled},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String]
+ # The container prefix for the location of storage task assignment report
+ ${ReportPrefix},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String]
+ # Id of the corresponding storage task
+ ${TaskId},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String]
+ # The trigger type of the storage task assignment execution
+ ${TriggerType},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.DateTime]
+ # When to end task execution.
+ # This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
+ ${EndBy},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.Int32]
+ # Run interval of task execution.
+ # This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
+ ${Interval},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String]
+ # Run interval unit of task execution.
+ # This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
+ ${IntervalUnit},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.DateTime]
+ # When to start task execution.
+ # This is a required field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
+ ${StartFrom},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.DateTime]
+ # When to start task execution.
+ # This is an optional field when ExecutionTrigger.properties.type is 'RunOnce'; this property should not be present when ExecutionTrigger.properties.type is 'OnSchedule'
+ ${StartOn},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String[]]
+ # List of object prefixes to be excluded from task execution.
+ # If there is a conflict between include and exclude prefixes, the exclude prefix will be the determining factor
+ ${TargetExcludePrefix},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String[]]
+ # Required list of object prefixes to be included for task execution
+ ${TargetPrefix},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.Storage.private\New-AzStorageTaskAssignment_CreateExpanded';
+ }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Delete the storage task assignment sub-resource
+.Description
+Delete the storage task assignment sub-resource
+.Example
+Remove-AzStorageTaskAssignment -AccountName myaccount -ResourceGroupName myresourcegroup -Name mytaskassignment
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity
+.Outputs
+System.Boolean
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AccountName ]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [BlobInventoryPolicyName ]: The name of the storage account blob inventory policy. It should always be 'default'
+ [DeletedAccountName ]: Name of the deleted storage account.
+ [EncryptionScopeName ]: The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ [Id ]: Resource identity path
+ [Location ]: The location of the deleted storage account.
+ [ManagementPolicyName ]: The name of the Storage Account Management Policy. It should always be 'default'
+ [MigrationName ]: The name of the Storage Account Migration. It should always be 'default'
+ [ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
+ [PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [SubscriptionId ]: The ID of the target subscription.
+ [Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
+
+STORAGEACCOUNTINPUTOBJECT : Identity Parameter
+ [AccountName ]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [BlobInventoryPolicyName ]: The name of the storage account blob inventory policy. It should always be 'default'
+ [DeletedAccountName ]: Name of the deleted storage account.
+ [EncryptionScopeName ]: The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ [Id ]: Resource identity path
+ [Location ]: The location of the deleted storage account.
+ [ManagementPolicyName ]: The name of the Storage Account Management Policy. It should always be 'default'
+ [MigrationName ]: The name of the Storage Account Migration. It should always be 'default'
+ [ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
+ [PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [SubscriptionId ]: The ID of the target subscription.
+ [Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
+.Link
+https://learn.microsoft.com/powershell/module/az.storage/remove-azstoragetaskassignment
+#>
+function Remove-AzStorageTaskAssignment {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage account within the specified resource group.
+ # Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${AccountName},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Parameter(ParameterSetName='DeleteViaIdentityStorageAccount', Mandatory)]
+ [Alias('StorageTaskAssignmentName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage task assignment within the specified resource group.
+ # Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${Name},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Delete')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
+ # Identity Parameter
+ ${InputObject},
+
+ [Parameter(ParameterSetName='DeleteViaIdentityStorageAccount', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
+ # Identity Parameter
+ ${StorageAccountInputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Delete = 'Az.Storage.private\Remove-AzStorageTaskAssignment_Delete';
+ DeleteViaIdentity = 'Az.Storage.private\Remove-AzStorageTaskAssignment_DeleteViaIdentity';
+ DeleteViaIdentityStorageAccount = 'Az.Storage.private\Remove-AzStorageTaskAssignment_DeleteViaIdentityStorageAccount';
+ }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Account Migration request can be triggered for a storage account to change its redundancy level.
+The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability.
+Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region.
+.Description
Account Migration request can be triggered for a storage account to change its redundancy level.
The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability.
Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region.
+.Example
+Start-AzStorageAccountMigration -AccountName myaccount -ResourceGroupName myresourcegroup -TargetSku Standard_LRS -Name migration1 -AsJob
+.Example
+Get-AzStorageAccount -ResourceGroupName myresourcegroup -Name myaccount | Start-AzStorageAccountMigration -TargetSku Standard_LRS -AsJob
+.Example
+$properties = '{
+ "properties": {
+ "targetSkuName": "Standard_ZRS"
+ }
+}'
+ Start-AzStorageAccountMigration -ResourceGroupName myresourcegroup -AccountName myaccount -JsonString $properties -AsJob
+.Example
+# Before executing the cmdlet, make sure you have a json file that contains {"properties": {"targetSkuName": }}
+Start-AzStorageAccountMigration -ResourceGroupName myresourcegroup -AccountName myaccount -JsonFilePath properties.json -AsJob
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity
+.Outputs
+System.Boolean
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AccountName ]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [BlobInventoryPolicyName ]: The name of the storage account blob inventory policy. It should always be 'default'
+ [DeletedAccountName ]: Name of the deleted storage account.
+ [EncryptionScopeName ]: The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ [Id ]: Resource identity path
+ [Location ]: The location of the deleted storage account.
+ [ManagementPolicyName ]: The name of the Storage Account Management Policy. It should always be 'default'
+ [MigrationName ]: The name of the Storage Account Migration. It should always be 'default'
+ [ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
+ [PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [SubscriptionId ]: The ID of the target subscription.
+ [Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
+.Link
+https://learn.microsoft.com/powershell/module/az.storage/start-azstorageaccountmigration
+#>
+function Start-AzStorageAccountMigration {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='CustomerExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='CustomerExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CustomerViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CustomerViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage account within the specified resource group.
+ # Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${AccountName},
+
+ [Parameter(ParameterSetName='CustomerExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CustomerViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='CustomerViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the resource group within the user's subscription.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='CustomerExpanded')]
+ [Parameter(ParameterSetName='CustomerViaJsonFilePath')]
+ [Parameter(ParameterSetName='CustomerViaJsonString')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='CustomerViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
+ # Identity Parameter
+ ${InputObject},
+
+ [Parameter(ParameterSetName='CustomerExpanded', Mandatory)]
+ [Parameter(ParameterSetName='CustomerViaIdentityExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Standard_LRS", "Standard_GRS", "Standard_RAGRS", "Standard_ZRS", "Premium_LRS", "Premium_ZRS", "Standard_GZRS", "Standard_RAGZRS")]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String]
+ # Target sku name for the account
+ ${TargetSku},
+
+ [Parameter(ParameterSetName='CustomerExpanded')]
+ [Parameter(ParameterSetName='CustomerViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String]
+ # current value is 'default' for customer initiated migration
+ ${Name},
+
+ [Parameter(ParameterSetName='CustomerExpanded')]
+ [Parameter(ParameterSetName='CustomerViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String]
+ # SrpAccountMigrationType in ARM contract which is 'accountMigrations'
+ ${Type},
+
+ [Parameter(ParameterSetName='CustomerViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Customer operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CustomerViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String]
+ # Json string supplied to the Customer operation
+ ${JsonString},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CustomerExpanded = 'Az.Storage.private\Start-AzStorageAccountMigration_CustomerExpanded';
+ CustomerViaIdentityExpanded = 'Az.Storage.private\Start-AzStorageAccountMigration_CustomerViaIdentityExpanded';
+ CustomerViaJsonFilePath = 'Az.Storage.private\Start-AzStorageAccountMigration_CustomerViaJsonFilePath';
+ CustomerViaJsonString = 'Az.Storage.private\Start-AzStorageAccountMigration_CustomerViaJsonString';
+ }
+ if (('CustomerExpanded', 'CustomerViaJsonFilePath', 'CustomerViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Update storage task assignment properties
.Description
-Account Migration request can be triggered for a storage account to change its redundancy level.
-The migration updates the non-zonal redundant storage account to a zonal redundant account or vice-versa in order to have better reliability and availability.
-Zone-redundant storage (ZRS) replicates your storage account synchronously across three Azure availability zones in the primary region.
-.Example
-Start-AzStorageAccountMigration -AccountName myaccount -ResourceGroupName myresourcegroup -TargetSku Standard_LRS -Name migration1 -AsJob
-.Example
-Get-AzStorageAccount -ResourceGroupName myresourcegroup -Name myaccount | Start-AzStorageAccountMigration -TargetSku Standard_LRS -AsJob
+Update storage task assignment properties
.Example
-$properties = '{
- "properties": {
- "targetSkuName": "Standard_ZRS"
- }
-}'
- Start-AzStorageAccountMigration -ResourceGroupName myresourcegroup -AccountName myaccount -JsonString $properties -AsJob
-.Example
-# Before executing the cmdlet, make sure you have a json file that contains {"properties": {"targetSkuName": }}
-Start-AzStorageAccountMigration -ResourceGroupName myresourcegroup -AccountName myaccount -JsonFilePath properties.json -AsJob
+$start = Get-Date -Year 2024 -Month 8 -Day 7 -Hour 1 -Minute 30
+$end = Get-Date -Year 2024 -Month 12 -Day 25 -Hour 2 -Minute 45
+Update-AzStorageTaskAssignment -accountname myaccount -name mytaskassignment -resourcegroupname myresourcegroup -StartFrom $start.ToUniversalTime() -EndBy $end.ToUniversalTime() -Interval 7 -Description "update task assignment" -Enabled
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity
.Outputs
-System.Boolean
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -261,81 +1567,149 @@ INPUTOBJECT : Identity Parameter
[ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
[PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
[ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [SubscriptionId ]: The ID of the target subscription.
+ [Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
+
+STORAGEACCOUNTINPUTOBJECT : Identity Parameter
+ [AccountName ]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [BlobInventoryPolicyName ]: The name of the storage account blob inventory policy. It should always be 'default'
+ [DeletedAccountName ]: Name of the deleted storage account.
+ [EncryptionScopeName ]: The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ [Id ]: Resource identity path
+ [Location ]: The location of the deleted storage account.
+ [ManagementPolicyName ]: The name of the Storage Account Management Policy. It should always be 'default'
+ [MigrationName ]: The name of the Storage Account Migration. It should always be 'default'
+ [ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
+ [PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
[SubscriptionId ]: The ID of the target subscription.
[Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
.Link
-https://learn.microsoft.com/powershell/module/az.storage/start-azstorageaccountmigration
+https://learn.microsoft.com/powershell/module/az.storage/update-azstoragetaskassignment
#>
-function Start-AzStorageAccountMigration {
-[OutputType([System.Boolean])]
-[CmdletBinding(DefaultParameterSetName='CustomerExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+function Update-AzStorageTaskAssignment {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment])]
+[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(ParameterSetName='CustomerExpanded', Mandatory)]
- [Parameter(ParameterSetName='CustomerViaJsonFilePath', Mandatory)]
- [Parameter(ParameterSetName='CustomerViaJsonString', Mandatory)]
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
[System.String]
# The name of the storage account within the specified resource group.
# Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
${AccountName},
- [Parameter(ParameterSetName='CustomerExpanded', Mandatory)]
- [Parameter(ParameterSetName='CustomerViaJsonFilePath', Mandatory)]
- [Parameter(ParameterSetName='CustomerViaJsonString', Mandatory)]
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Parameter(ParameterSetName='UpdateViaIdentityStorageAccountExpanded', Mandatory)]
+ [Alias('StorageTaskAssignmentName')]
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
[System.String]
- # The name of the resource group within the user's subscription.
+ # The name of the storage task assignment within the specified resource group.
+ # Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${Name},
+
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the resource group.
# The name is case insensitive.
${ResourceGroupName},
- [Parameter(ParameterSetName='CustomerExpanded')]
- [Parameter(ParameterSetName='CustomerViaJsonFilePath')]
- [Parameter(ParameterSetName='CustomerViaJsonString')]
+ [Parameter(ParameterSetName='UpdateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
# The ID of the target subscription.
${SubscriptionId},
- [Parameter(ParameterSetName='CustomerViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
# Identity Parameter
${InputObject},
- [Parameter(ParameterSetName='CustomerExpanded', Mandatory)]
- [Parameter(ParameterSetName='CustomerViaIdentityExpanded', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Standard_LRS", "Standard_GRS", "Standard_RAGRS", "Standard_ZRS", "Premium_LRS", "Premium_ZRS", "Standard_GZRS", "Standard_RAGZRS")]
+ [Parameter(ParameterSetName='UpdateViaIdentityStorageAccountExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
+ # Identity Parameter
+ ${StorageAccountInputObject},
+
+ [Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
[System.String]
- # Target sku name for the account
- ${TargetSku},
+ # Text that describes the purpose of the storage task assignment
+ ${Description},
- [Parameter(ParameterSetName='CustomerExpanded')]
- [Parameter(ParameterSetName='CustomerViaIdentityExpanded')]
+ [Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
- [System.String]
- # current value is 'default' for customer initiated migration
- ${Name},
+ [System.Management.Automation.SwitchParameter]
+ # Whether the storage task assignment is enabled or not
+ ${Enabled},
- [Parameter(ParameterSetName='CustomerExpanded')]
- [Parameter(ParameterSetName='CustomerViaIdentityExpanded')]
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.DateTime]
+ # When to end task execution.
+ # This is a mutable field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
+ ${EndBy},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.Int32]
+ # Run interval of task execution.
+ # This is a mutable field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
+ ${Interval},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")]
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
[System.String]
- # SrpAccountMigrationType in ARM contract which is 'accountMigrations'
- ${Type},
+ # Run interval unit of task execution.
+ # This is a mutable field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
+ ${IntervalUnit},
- [Parameter(ParameterSetName='CustomerViaJsonFilePath', Mandatory)]
+ [Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
[System.String]
- # Path of Json file supplied to the Customer operation
- ${JsonFilePath},
+ # The prefix of the storage task assignment report
+ ${ReportPrefix},
- [Parameter(ParameterSetName='CustomerViaJsonString', Mandatory)]
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.DateTime]
+ # When to start task execution.
+ # This is a mutable field when ExecutionTrigger.properties.type is 'OnSchedule'; this property should not be present when ExecutionTrigger.properties.type is 'RunOnce'
+ ${StartFrom},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.DateTime]
+ # When to start task execution.
+ # This is a mutable field when ExecutionTrigger.properties.type is 'RunOnce'; this property should not be present when ExecutionTrigger.properties.type is 'OnSchedule'
+ ${StartOn},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String[]]
+ # List of object prefixes to be excluded from task execution.
+ # If there is a conflict between include and exclude prefixes, the exclude prefix will be the determining factor
+ ${TargetExcludePrefix},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
+ [System.String[]]
+ # Required list of object prefixes to be included for task execution
+ ${TargetPrefix},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")]
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
[System.String]
- # Json string supplied to the Customer operation
- ${JsonString},
+ # The trigger type of the storage task assignment execution
+ ${TriggerType},
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
@@ -378,12 +1752,6 @@ param(
# Run the command asynchronously
${NoWait},
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Returns true when the command succeeds
- ${PassThru},
-
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
[System.Uri]
@@ -430,12 +1798,11 @@ begin {
}
$mapping = @{
- CustomerExpanded = 'Az.Storage.private\Start-AzStorageAccountMigration_CustomerExpanded';
- CustomerViaIdentityExpanded = 'Az.Storage.private\Start-AzStorageAccountMigration_CustomerViaIdentityExpanded';
- CustomerViaJsonFilePath = 'Az.Storage.private\Start-AzStorageAccountMigration_CustomerViaJsonFilePath';
- CustomerViaJsonString = 'Az.Storage.private\Start-AzStorageAccountMigration_CustomerViaJsonString';
+ UpdateExpanded = 'Az.Storage.private\Update-AzStorageTaskAssignment_UpdateExpanded';
+ UpdateViaIdentityExpanded = 'Az.Storage.private\Update-AzStorageTaskAssignment_UpdateViaIdentityExpanded';
+ UpdateViaIdentityStorageAccountExpanded = 'Az.Storage.private\Update-AzStorageTaskAssignment_UpdateViaIdentityStorageAccountExpanded';
}
- if (('CustomerExpanded', 'CustomerViaJsonFilePath', 'CustomerViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
$testPlayback = $false
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
if ($testPlayback) {
diff --git a/src/Storage/Storage.Autorest/exports/Remove-AzStorageTaskAssignment.ps1 b/src/Storage/Storage.Autorest/exports/Remove-AzStorageTaskAssignment.ps1
new file mode 100644
index 000000000000..5b6a37a8ec6d
--- /dev/null
+++ b/src/Storage/Storage.Autorest/exports/Remove-AzStorageTaskAssignment.ps1
@@ -0,0 +1,268 @@
+
+# ----------------------------------------------------------------------------------
+# 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
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Delete the storage task assignment sub-resource
+.Description
+Delete the storage task assignment sub-resource
+.Example
+Remove-AzStorageTaskAssignment -AccountName myaccount -ResourceGroupName myresourcegroup -Name mytaskassignment
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity
+.Outputs
+System.Boolean
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AccountName ]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [BlobInventoryPolicyName ]: The name of the storage account blob inventory policy. It should always be 'default'
+ [DeletedAccountName ]: Name of the deleted storage account.
+ [EncryptionScopeName ]: The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ [Id ]: Resource identity path
+ [Location ]: The location of the deleted storage account.
+ [ManagementPolicyName ]: The name of the Storage Account Management Policy. It should always be 'default'
+ [MigrationName ]: The name of the Storage Account Migration. It should always be 'default'
+ [ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
+ [PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [SubscriptionId ]: The ID of the target subscription.
+ [Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
+
+STORAGEACCOUNTINPUTOBJECT : Identity Parameter
+ [AccountName ]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [BlobInventoryPolicyName ]: The name of the storage account blob inventory policy. It should always be 'default'
+ [DeletedAccountName ]: Name of the deleted storage account.
+ [EncryptionScopeName ]: The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
+ [Id ]: Resource identity path
+ [Location ]: The location of the deleted storage account.
+ [ManagementPolicyName ]: The name of the Storage Account Management Policy. It should always be 'default'
+ [MigrationName ]: The name of the Storage Account Migration. It should always be 'default'
+ [ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
+ [PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
+ [ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [SubscriptionId ]: The ID of the target subscription.
+ [Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
+.Link
+https://learn.microsoft.com/powershell/module/az.storage/remove-azstoragetaskassignment
+#>
+function Remove-AzStorageTaskAssignment {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage account within the specified resource group.
+ # Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${AccountName},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Parameter(ParameterSetName='DeleteViaIdentityStorageAccount', Mandatory)]
+ [Alias('StorageTaskAssignmentName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the storage task assignment within the specified resource group.
+ # Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ ${Name},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ # The name is case insensitive.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Delete')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # The ID of the target subscription.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
+ # Identity Parameter
+ ${InputObject},
+
+ [Parameter(ParameterSetName='DeleteViaIdentityStorageAccount', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity]
+ # Identity Parameter
+ ${StorageAccountInputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The DefaultProfile parameter is not functional.
+ # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Delete = 'Az.Storage.private\Remove-AzStorageTaskAssignment_Delete';
+ DeleteViaIdentity = 'Az.Storage.private\Remove-AzStorageTaskAssignment_DeleteViaIdentity';
+ DeleteViaIdentityStorageAccount = 'Az.Storage.private\Remove-AzStorageTaskAssignment_DeleteViaIdentityStorageAccount';
+ }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if ($testPlayback) {
+ $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
+ } else {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.Storage.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/Storage/Storage.Autorest/exports/Start-AzStorageAccountMigration.ps1 b/src/Storage/Storage.Autorest/exports/Start-AzStorageAccountMigration.ps1
index b429e9b68eed..c9415228f322 100644
--- a/src/Storage/Storage.Autorest/exports/Start-AzStorageAccountMigration.ps1
+++ b/src/Storage/Storage.Autorest/exports/Start-AzStorageAccountMigration.ps1
@@ -59,6 +59,7 @@ INPUTOBJECT : Identity Parameter
[ObjectReplicationPolicyId ]: For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.
[PrivateEndpointConnectionName ]: The name of the private endpoint connection associated with the Azure resource
[ResourceGroupName ]: The name of the resource group within the user's subscription. The name is case insensitive.
+ [StorageTaskAssignmentName ]: The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
[SubscriptionId ]: The ID of the target subscription.
[Username ]: The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.
.Link
diff --git a/src/Storage/Storage.Autorest/exports/Update-AzStorageTaskAssignment.ps1 b/src/Storage/Storage.Autorest/exports/Update-AzStorageTaskAssignment.ps1
new file mode 100644
index 000000000000..b988a45f11c2
--- /dev/null
+++ b/src/Storage/Storage.Autorest/exports/Update-AzStorageTaskAssignment.ps1
@@ -0,0 +1,340 @@
+
+# ----------------------------------------------------------------------------------
+# 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
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Update storage task assignment properties
+.Description
+Update storage task assignment properties
+.Example
+$start = Get-Date -Year 2024 -Month 8 -Day 7 -Hour 1 -Minute 30
+$end = Get-Date -Year 2024 -Month 12 -Day 25 -Hour 2 -Minute 45
+Update-AzStorageTaskAssignment -accountname myaccount -name mytaskassignment -resourcegroupname myresourcegroup -StartFrom $start.ToUniversalTime() -EndBy $end.ToUniversalTime() -Interval 7 -Description "update task assignment" -Enabled
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AccountName ]: The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
+ [BlobInventoryPolicyName ]: The name of the storage account blob inventory policy. It should always be 'default'
+ [DeletedAccountName ]: Name of the deleted storage account.
+ [EncryptionScopeName