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 ]: 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/update-azstoragetaskassignment +#> +function Update-AzStorageTaskAssignment { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [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='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStorageAccountExpanded', 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='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='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='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity] + # Identity Parameter + ${InputObject}, + + [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] + # Text that describes the purpose of the storage task assignment + ${Description}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Whether the storage task assignment is enabled or not + ${Enabled}, + + [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] + # 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()] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')] + [System.String] + # The prefix of the storage task assignment report + ${ReportPrefix}, + + [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] + # The trigger type of the storage task assignment execution + ${TriggerType}, + + [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 = @{ + UpdateExpanded = 'Az.Storage.private\Update-AzStorageTaskAssignment_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Storage.private\Update-AzStorageTaskAssignment_UpdateViaIdentityExpanded'; + UpdateViaIdentityStorageAccountExpanded = 'Az.Storage.private\Update-AzStorageTaskAssignment_UpdateViaIdentityStorageAccountExpanded'; + } + 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) { + $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/generated/api/Models/ExecutionTarget.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTarget.PowerShell.cs new file mode 100644 index 000000000000..7267f836f73d --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTarget.PowerShell.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// Target helps provide filter parameters for the objects in the storage account and forms the execution context for the + /// storage task + /// + [System.ComponentModel.TypeConverter(typeof(ExecutionTargetTypeConverter))] + public partial class ExecutionTarget + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExecutionTarget(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExecutionTarget(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExecutionTarget(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Prefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)this).Prefix = (System.Collections.Generic.List) content.GetValueForProperty("Prefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)this).Prefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ExcludePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)this).ExcludePrefix = (System.Collections.Generic.List) content.GetValueForProperty("ExcludePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)this).ExcludePrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExecutionTarget(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Prefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)this).Prefix = (System.Collections.Generic.List) content.GetValueForProperty("Prefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)this).Prefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ExcludePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)this).ExcludePrefix = (System.Collections.Generic.List) content.GetValueForProperty("ExcludePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)this).ExcludePrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Target helps provide filter parameters for the objects in the storage account and forms the execution context for the + /// storage task + [System.ComponentModel.TypeConverter(typeof(ExecutionTargetTypeConverter))] + public partial interface IExecutionTarget + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTarget.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTarget.TypeConverter.cs new file mode 100644 index 000000000000..ebda6024dc90 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTarget.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExecutionTargetTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExecutionTarget.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExecutionTarget.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExecutionTarget.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTarget.cs b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTarget.cs new file mode 100644 index 000000000000..3b343988478e --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTarget.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// + /// Target helps provide filter parameters for the objects in the storage account and forms the execution context for the + /// storage task + /// + public partial class ExecutionTarget : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _excludePrefix; + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public System.Collections.Generic.List ExcludePrefix { get => this._excludePrefix; set => this._excludePrefix = value; } + + /// Backing field for property. + private System.Collections.Generic.List _prefix; + + /// Required list of object prefixes to be included for task execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public System.Collections.Generic.List Prefix { get => this._prefix; set => this._prefix = value; } + + /// Creates an new instance. + public ExecutionTarget() + { + + } + } + /// Target helps provide filter parameters for the objects in the storage account and forms the execution context for the + /// storage task + public partial interface IExecutionTarget : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable + { + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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", + SerializedName = @"excludePrefix", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List ExcludePrefix { get; set; } + /// Required list of object prefixes to be included for task execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Required list of object prefixes to be included for task execution", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List Prefix { get; set; } + + } + /// Target helps provide filter parameters for the objects in the storage account and forms the execution context for the + /// storage task + internal partial interface IExecutionTargetInternal + + { + /// + /// 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 + /// + System.Collections.Generic.List ExcludePrefix { get; set; } + /// Required list of object prefixes to be included for task execution + System.Collections.Generic.List Prefix { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTarget.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTarget.json.cs new file mode 100644 index 000000000000..9f8913861947 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTarget.json.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// + /// Target helps provide filter parameters for the objects in the storage account and forms the execution context for the + /// storage task + /// + public partial class ExecutionTarget + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal ExecutionTarget(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_prefix = If( json?.PropertyT("prefix"), out var __jsonPrefix) ? If( __jsonPrefix as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _prefix;} + {_excludePrefix = If( json?.PropertyT("excludePrefix"), out var __jsonExcludePrefix) ? If( __jsonExcludePrefix as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : _excludePrefix;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new ExecutionTarget(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._prefix) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.XNodeArray(); + foreach( var __x in this._prefix ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("prefix",__w); + } + if (null != this._excludePrefix) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.XNodeArray(); + foreach( var __s in this._excludePrefix ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("excludePrefix",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.PowerShell.cs new file mode 100644 index 000000000000..c88dc5d047cd --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// Execution trigger for storage task assignment + [System.ComponentModel.TypeConverter(typeof(ExecutionTriggerTypeConverter))] + public partial class ExecutionTrigger + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExecutionTrigger(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExecutionTrigger(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExecutionTrigger(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExecutionTrigger(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Execution trigger for storage task assignment + [System.ComponentModel.TypeConverter(typeof(ExecutionTriggerTypeConverter))] + public partial interface IExecutionTrigger + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.TypeConverter.cs new file mode 100644 index 000000000000..2f7c61207251 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExecutionTriggerTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExecutionTrigger.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExecutionTrigger.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExecutionTrigger.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.cs b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.cs new file mode 100644 index 000000000000..8ddd423d826e --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Execution trigger for storage task assignment + public partial class ExecutionTrigger : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal + { + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? EndBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)Parameter).EndBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)Parameter).EndBy = value ?? default(global::System.DateTime); } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public int? Interval { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)Parameter).Interval; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)Parameter).Interval = value ?? default(int); } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string IntervalUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)Parameter).IntervalUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)Parameter).IntervalUnit = value ?? null; } + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParameters()); set { {_parameter = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters _parameter; + + /// The trigger parameters of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParameters()); set => this._parameter = value; } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartFrom { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)Parameter).StartFrom; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)Parameter).StartFrom = value ?? default(global::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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)Parameter).StartOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)Parameter).StartOn = value ?? default(global::System.DateTime); } + + /// Backing field for property. + private string _type; + + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public ExecutionTrigger() + { + + } + } + /// Execution trigger for storage task assignment + public partial interface IExecutionTrigger : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable + { + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"endBy", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + int? Interval { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"intervalUnit", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startFrom", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startOn", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartOn { get; set; } + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The trigger type of the storage task assignment execution", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string Type { get; set; } + + } + /// Execution trigger for storage task assignment + internal partial interface IExecutionTriggerInternal + + { + /// + /// 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' + /// + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + int? Interval { get; set; } + /// + /// 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' + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// The trigger parameters of the storage task assignment execution + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters Parameter { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartOn { get; set; } + /// The trigger type of the storage task assignment execution + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.json.cs new file mode 100644 index 000000000000..172f91acce05 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTrigger.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Execution trigger for storage task assignment + public partial class ExecutionTrigger + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal ExecutionTrigger(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParameters.FromJson(__jsonParameters) : _parameter;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new ExecutionTrigger(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.PowerShell.cs new file mode 100644 index 000000000000..94d6d09c9c59 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// Execution trigger update for storage task assignment + [System.ComponentModel.TypeConverter(typeof(ExecutionTriggerUpdateTypeConverter))] + public partial class ExecutionTriggerUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExecutionTriggerUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExecutionTriggerUpdate(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExecutionTriggerUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExecutionTriggerUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Execution trigger update for storage task assignment + [System.ComponentModel.TypeConverter(typeof(ExecutionTriggerUpdateTypeConverter))] + public partial interface IExecutionTriggerUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.TypeConverter.cs new file mode 100644 index 000000000000..0a4418a1a2e1 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExecutionTriggerUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExecutionTriggerUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExecutionTriggerUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExecutionTriggerUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.cs b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.cs new file mode 100644 index 000000000000..c385e4b5c05a --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Execution trigger update for storage task assignment + public partial class ExecutionTriggerUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal + { + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? EndBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)Parameter).EndBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)Parameter).EndBy = value ?? default(global::System.DateTime); } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public int? Interval { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)Parameter).Interval; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)Parameter).Interval = value ?? default(int); } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string IntervalUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)Parameter).IntervalUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)Parameter).IntervalUnit = value ?? null; } + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal.Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersUpdate()); set { {_parameter = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate _parameter; + + /// The trigger parameters of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersUpdate()); set => this._parameter = value; } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartFrom { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)Parameter).StartFrom; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)Parameter).StartFrom = value ?? default(global::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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)Parameter).StartOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)Parameter).StartOn = value ?? default(global::System.DateTime); } + + /// Backing field for property. + private string _type; + + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public ExecutionTriggerUpdate() + { + + } + } + /// Execution trigger update for storage task assignment + public partial interface IExecutionTriggerUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable + { + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"endBy", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + int? Interval { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"intervalUnit", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startFrom", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startOn", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartOn { get; set; } + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The trigger type of the storage task assignment execution", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string Type { get; set; } + + } + /// Execution trigger update for storage task assignment + internal partial interface IExecutionTriggerUpdateInternal + + { + /// + /// 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' + /// + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + int? Interval { get; set; } + /// + /// 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' + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// The trigger parameters of the storage task assignment execution + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate Parameter { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartOn { get; set; } + /// The trigger type of the storage task assignment execution + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.json.cs new file mode 100644 index 000000000000..f9f41bb288be --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/ExecutionTriggerUpdate.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Execution trigger update for storage task assignment + public partial class ExecutionTriggerUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal ExecutionTriggerUpdate(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersUpdate.FromJson(__jsonParameters) : _parameter;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new ExecutionTriggerUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/LocalUser.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/LocalUser.PowerShell.cs index fd57090e241d..d0436557451e 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/LocalUser.PowerShell.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/LocalUser.PowerShell.cs @@ -165,6 +165,26 @@ internal LocalUser(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).HasSshPassword = (bool?) content.GetValueForProperty("HasSshPassword",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).HasSshPassword, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("UserId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).UserId = (int?) content.GetValueForProperty("UserId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).UserId, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("GroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).GroupId = (int?) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).GroupId, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AllowAclAuthorization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).AllowAclAuthorization = (bool?) content.GetValueForProperty("AllowAclAuthorization",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).AllowAclAuthorization, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).ExtendedGroup = (System.Collections.Generic.List) content.GetValueForProperty("ExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).ExtendedGroup, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("IsNfSv3Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).IsNfSv3Enabled = (bool?) content.GetValueForProperty("IsNfSv3Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).IsNfSv3Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("SystemDataCreatedByType")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); @@ -254,6 +274,26 @@ internal LocalUser(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).HasSshPassword = (bool?) content.GetValueForProperty("HasSshPassword",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).HasSshPassword, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("UserId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).UserId = (int?) content.GetValueForProperty("UserId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).UserId, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("GroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).GroupId = (int?) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).GroupId, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AllowAclAuthorization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).AllowAclAuthorization = (bool?) content.GetValueForProperty("AllowAclAuthorization",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).AllowAclAuthorization, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).ExtendedGroup = (System.Collections.Generic.List) content.GetValueForProperty("ExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).ExtendedGroup, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("IsNfSv3Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).IsNfSv3Enabled = (bool?) content.GetValueForProperty("IsNfSv3Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).IsNfSv3Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("SystemDataCreatedByType")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); diff --git a/src/Storage/Storage.Autorest/generated/api/Models/LocalUser.cs b/src/Storage/Storage.Autorest/generated/api/Models/LocalUser.cs index 89da279b1eef..44f7ea0279b7 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/LocalUser.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/LocalUser.cs @@ -18,6 +18,22 @@ public partial class LocalUser : /// private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.Resource(); + /// + /// Indicates whether ACL authorization is allowed for this user. Set it to false to disallow using ACL authorization. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public bool? AllowAclAuthorization { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)Property).AllowAclAuthorization; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)Property).AllowAclAuthorization = value ?? default(bool); } + + /// + /// Supplementary group membership. Only applicable for local users enabled for NFSv3 access. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ExtendedGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)Property).ExtendedGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)Property).ExtendedGroup = value ?? null /* arrayOf */; } + + /// An identifier for associating a group of users. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public int? GroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)Property).GroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)Property).GroupId = value ?? default(int); } + /// /// Indicates whether shared key exists. Set it to false to remove existing shared key. /// @@ -44,6 +60,10 @@ public partial class LocalUser : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inherited)] public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__resource).Id; } + /// Indicates if the local user is enabled for access with NFSv3 protocol. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public bool? IsNfSv3Enabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)Property).IsNfSv3Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)Property).IsNfSv3Enabled = value ?? default(bool); } + /// Internal Acessors for Property Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserProperties Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.LocalUserProperties()); set { {_property = value;} } } @@ -53,6 +73,9 @@ public partial class LocalUser : /// Internal Acessors for SystemData Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.SystemData()); set { {_systemData = value;} } } + /// Internal Acessors for UserId + int? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserInternal.UserId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)Property).UserId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)Property).UserId = value; } + /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__resource).Id = value; } @@ -126,6 +149,10 @@ public partial class LocalUser : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inherited)] public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__resource).Type; } + /// A unique Identifier that is generated by the server. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public int? UserId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)Property).UserId; } + /// Creates an new instance. public LocalUser() { @@ -149,6 +176,43 @@ public partial interface ILocalUser : Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResource { + /// + /// Indicates whether ACL authorization is allowed for this user. Set it to false to disallow using ACL authorization. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether ACL authorization is allowed for this user. Set it to false to disallow using ACL authorization.", + SerializedName = @"allowAclAuthorization", + PossibleTypes = new [] { typeof(bool) })] + bool? AllowAclAuthorization { get; set; } + /// + /// Supplementary group membership. Only applicable for local users enabled for NFSv3 access. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Supplementary group membership. Only applicable for local users enabled for NFSv3 access.", + SerializedName = @"extendedGroups", + PossibleTypes = new [] { typeof(int) })] + System.Collections.Generic.List ExtendedGroup { get; set; } + /// An identifier for associating a group of users. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"An identifier for associating a group of users.", + SerializedName = @"groupId", + PossibleTypes = new [] { typeof(int) })] + int? GroupId { get; set; } /// /// Indicates whether shared key exists. Set it to false to remove existing shared key. /// @@ -197,6 +261,17 @@ public partial interface ILocalUser : SerializedName = @"homeDirectory", PossibleTypes = new [] { typeof(string) })] string HomeDirectory { get; set; } + /// Indicates if the local user is enabled for access with NFSv3 protocol. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates if the local user is enabled for access with NFSv3 protocol.", + SerializedName = @"isNFSv3Enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsNfSv3Enabled { get; set; } /// The permission scopes of the local user. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -298,12 +373,33 @@ public partial interface ILocalUser : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] string SystemDataLastModifiedByType { get; } + /// A unique Identifier that is generated by the server. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A unique Identifier that is generated by the server.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(int) })] + int? UserId { get; } } /// The local user associated with the storage accounts. internal partial interface ILocalUserInternal : Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal { + /// + /// Indicates whether ACL authorization is allowed for this user. Set it to false to disallow using ACL authorization. + /// + bool? AllowAclAuthorization { get; set; } + /// + /// Supplementary group membership. Only applicable for local users enabled for NFSv3 access. + /// + System.Collections.Generic.List ExtendedGroup { get; set; } + /// An identifier for associating a group of users. + int? GroupId { get; set; } /// /// Indicates whether shared key exists. Set it to false to remove existing shared key. /// @@ -316,6 +412,8 @@ internal partial interface ILocalUserInternal : bool? HasSshPassword { get; set; } /// Optional, local user home directory. string HomeDirectory { get; set; } + /// Indicates if the local user is enabled for access with NFSv3 protocol. + bool? IsNfSv3Enabled { get; set; } /// The permission scopes of the local user. System.Collections.Generic.List PermissionScope { get; set; } /// Storage account local user properties. @@ -340,6 +438,8 @@ internal partial interface ILocalUserInternal : /// The type of identity that last modified the resource. [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] string SystemDataLastModifiedByType { get; set; } + /// A unique Identifier that is generated by the server. + int? UserId { get; set; } } } \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/LocalUserProperties.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/LocalUserProperties.PowerShell.cs index 15e8d603c352..cdc116fb8ff9 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/LocalUserProperties.PowerShell.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/LocalUserProperties.PowerShell.cs @@ -137,6 +137,26 @@ internal LocalUserProperties(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).HasSshPassword = (bool?) content.GetValueForProperty("HasSshPassword",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).HasSshPassword, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("UserId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).UserId = (int?) content.GetValueForProperty("UserId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).UserId, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("GroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).GroupId = (int?) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).GroupId, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AllowAclAuthorization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).AllowAclAuthorization = (bool?) content.GetValueForProperty("AllowAclAuthorization",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).AllowAclAuthorization, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).ExtendedGroup = (System.Collections.Generic.List) content.GetValueForProperty("ExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).ExtendedGroup, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("IsNfSv3Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).IsNfSv3Enabled = (bool?) content.GetValueForProperty("IsNfSv3Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).IsNfSv3Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } AfterDeserializeDictionary(content); } @@ -182,6 +202,26 @@ internal LocalUserProperties(global::System.Management.Automation.PSObject conte { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).HasSshPassword = (bool?) content.GetValueForProperty("HasSshPassword",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).HasSshPassword, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("UserId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).UserId = (int?) content.GetValueForProperty("UserId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).UserId, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("GroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).GroupId = (int?) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).GroupId, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AllowAclAuthorization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).AllowAclAuthorization = (bool?) content.GetValueForProperty("AllowAclAuthorization",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).AllowAclAuthorization, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).ExtendedGroup = (System.Collections.Generic.List) content.GetValueForProperty("ExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).ExtendedGroup, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("IsNfSv3Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).IsNfSv3Enabled = (bool?) content.GetValueForProperty("IsNfSv3Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal)this).IsNfSv3Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } AfterDeserializePSObject(content); } diff --git a/src/Storage/Storage.Autorest/generated/api/Models/LocalUserProperties.cs b/src/Storage/Storage.Autorest/generated/api/Models/LocalUserProperties.cs index 5e238d62120d..0d2ad4af03ac 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/LocalUserProperties.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/LocalUserProperties.cs @@ -13,6 +13,31 @@ public partial class LocalUserProperties : Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal { + /// Backing field for property. + private bool? _allowAclAuthorization; + + /// + /// Indicates whether ACL authorization is allowed for this user. Set it to false to disallow using ACL authorization. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public bool? AllowAclAuthorization { get => this._allowAclAuthorization; set => this._allowAclAuthorization = value; } + + /// Backing field for property. + private System.Collections.Generic.List _extendedGroup; + + /// + /// Supplementary group membership. Only applicable for local users enabled for NFSv3 access. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public System.Collections.Generic.List ExtendedGroup { get => this._extendedGroup; set => this._extendedGroup = value; } + + /// Backing field for property. + private int? _groupId; + + /// An identifier for associating a group of users. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public int? GroupId { get => this._groupId; set => this._groupId = value; } + /// Backing field for property. private bool? _hasSharedKey; @@ -45,9 +70,19 @@ public partial class LocalUserProperties : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] public string HomeDirectory { get => this._homeDirectory; set => this._homeDirectory = value; } + /// Backing field for property. + private bool? _isNfSv3Enabled; + + /// Indicates if the local user is enabled for access with NFSv3 protocol. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public bool? IsNfSv3Enabled { get => this._isNfSv3Enabled; set => this._isNfSv3Enabled = value; } + /// Internal Acessors for Sid string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal.Sid { get => this._sid; set { {_sid = value;} } } + /// Internal Acessors for UserId + int? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUserPropertiesInternal.UserId { get => this._userId; set { {_userId = value;} } } + /// Backing field for property. private System.Collections.Generic.List _permissionScope; @@ -69,6 +104,13 @@ public partial class LocalUserProperties : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] public System.Collections.Generic.List SshAuthorizedKey { get => this._sshAuthorizedKey; set => this._sshAuthorizedKey = value; } + /// Backing field for property. + private int? _userId; + + /// A unique Identifier that is generated by the server. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public int? UserId { get => this._userId; } + /// Creates an new instance. public LocalUserProperties() { @@ -79,6 +121,43 @@ public LocalUserProperties() public partial interface ILocalUserProperties : Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable { + /// + /// Indicates whether ACL authorization is allowed for this user. Set it to false to disallow using ACL authorization. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether ACL authorization is allowed for this user. Set it to false to disallow using ACL authorization.", + SerializedName = @"allowAclAuthorization", + PossibleTypes = new [] { typeof(bool) })] + bool? AllowAclAuthorization { get; set; } + /// + /// Supplementary group membership. Only applicable for local users enabled for NFSv3 access. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Supplementary group membership. Only applicable for local users enabled for NFSv3 access.", + SerializedName = @"extendedGroups", + PossibleTypes = new [] { typeof(int) })] + System.Collections.Generic.List ExtendedGroup { get; set; } + /// An identifier for associating a group of users. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"An identifier for associating a group of users.", + SerializedName = @"groupId", + PossibleTypes = new [] { typeof(int) })] + int? GroupId { get; set; } /// /// Indicates whether shared key exists. Set it to false to remove existing shared key. /// @@ -127,6 +206,17 @@ public partial interface ILocalUserProperties : SerializedName = @"homeDirectory", PossibleTypes = new [] { typeof(string) })] string HomeDirectory { get; set; } + /// Indicates if the local user is enabled for access with NFSv3 protocol. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates if the local user is enabled for access with NFSv3 protocol.", + SerializedName = @"isNFSv3Enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsNfSv3Enabled { get; set; } /// The permission scopes of the local user. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -160,12 +250,33 @@ public partial interface ILocalUserProperties : SerializedName = @"sshAuthorizedKeys", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISshPublicKey) })] System.Collections.Generic.List SshAuthorizedKey { get; set; } + /// A unique Identifier that is generated by the server. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A unique Identifier that is generated by the server.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(int) })] + int? UserId { get; } } /// The Storage Account Local User properties. internal partial interface ILocalUserPropertiesInternal { + /// + /// Indicates whether ACL authorization is allowed for this user. Set it to false to disallow using ACL authorization. + /// + bool? AllowAclAuthorization { get; set; } + /// + /// Supplementary group membership. Only applicable for local users enabled for NFSv3 access. + /// + System.Collections.Generic.List ExtendedGroup { get; set; } + /// An identifier for associating a group of users. + int? GroupId { get; set; } /// /// Indicates whether shared key exists. Set it to false to remove existing shared key. /// @@ -178,12 +289,16 @@ internal partial interface ILocalUserPropertiesInternal bool? HasSshPassword { get; set; } /// Optional, local user home directory. string HomeDirectory { get; set; } + /// Indicates if the local user is enabled for access with NFSv3 protocol. + bool? IsNfSv3Enabled { get; set; } /// The permission scopes of the local user. System.Collections.Generic.List PermissionScope { get; set; } /// A unique Security Identifier that is generated by the server. string Sid { get; set; } /// Optional, local user ssh authorized keys for SFTP. System.Collections.Generic.List SshAuthorizedKey { get; set; } + /// A unique Identifier that is generated by the server. + int? UserId { get; set; } } } \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/LocalUserProperties.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/LocalUserProperties.json.cs index 03ffc7770841..f635dc298825 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/LocalUserProperties.json.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/LocalUserProperties.json.cs @@ -84,6 +84,11 @@ internal LocalUserProperties(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime. {_hasSharedKey = If( json?.PropertyT("hasSharedKey"), out var __jsonHasSharedKey) ? (bool?)__jsonHasSharedKey : _hasSharedKey;} {_hasSshKey = If( json?.PropertyT("hasSshKey"), out var __jsonHasSshKey) ? (bool?)__jsonHasSshKey : _hasSshKey;} {_hasSshPassword = If( json?.PropertyT("hasSshPassword"), out var __jsonHasSshPassword) ? (bool?)__jsonHasSshPassword : _hasSshPassword;} + {_userId = If( json?.PropertyT("userId"), out var __jsonUserId) ? (int?)__jsonUserId : _userId;} + {_groupId = If( json?.PropertyT("groupId"), out var __jsonGroupId) ? (int?)__jsonGroupId : _groupId;} + {_allowAclAuthorization = If( json?.PropertyT("allowAclAuthorization"), out var __jsonAllowAclAuthorization) ? (bool?)__jsonAllowAclAuthorization : _allowAclAuthorization;} + {_extendedGroup = If( json?.PropertyT("extendedGroups"), out var __jsonExtendedGroups) ? If( __jsonExtendedGroups as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(int) (__k is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNumber __j ? (int)__j : default(int))) ))() : null : _extendedGroup;} + {_isNfSv3Enabled = If( json?.PropertyT("isNFSv3Enabled"), out var __jsonIsNfSv3Enabled) ? (bool?)__jsonIsNfSv3Enabled : _isNfSv3Enabled;} AfterFromJson(json); } @@ -132,6 +137,22 @@ public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(M AddIf( null != this._hasSharedKey ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._hasSharedKey) : null, "hasSharedKey" ,container.Add ); AddIf( null != this._hasSshKey ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._hasSshKey) : null, "hasSshKey" ,container.Add ); AddIf( null != this._hasSshPassword ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._hasSshPassword) : null, "hasSshPassword" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._userId ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNumber((int)this._userId) : null, "userId" ,container.Add ); + } + AddIf( null != this._groupId ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNumber((int)this._groupId) : null, "groupId" ,container.Add ); + AddIf( null != this._allowAclAuthorization ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._allowAclAuthorization) : null, "allowAclAuthorization" ,container.Add ); + if (null != this._extendedGroup) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.XNodeArray(); + foreach( var __n in this._extendedGroup ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNumber(__n) ,__m.Add); + } + container.Add("extendedGroups",__m); + } + AddIf( null != this._isNfSv3Enabled ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._isNfSv3Enabled) : null, "isNFSv3Enabled" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/Storage/Storage.Autorest/generated/api/Models/LocalUsers.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/LocalUsers.PowerShell.cs index 8c165ce1a9fa..d477a0a2f648 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/LocalUsers.PowerShell.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/LocalUsers.PowerShell.cs @@ -7,7 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models { using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; - /// List storage account local users. + /// + /// List of local users requested, and if paging is required, a URL to the next page of local users. + /// [System.ComponentModel.TypeConverter(typeof(LocalUsersTypeConverter))] public partial class LocalUsers { @@ -113,6 +115,10 @@ internal LocalUsers(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUsersInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUsersInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.LocalUserTypeConverter.ConvertFrom)); } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUsersInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUsersInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -134,6 +140,10 @@ internal LocalUsers(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUsersInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUsersInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.LocalUserTypeConverter.ConvertFrom)); } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUsersInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUsersInternal)this).NextLink, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } @@ -154,7 +164,7 @@ public override string ToString() return ToJsonString(); } } - /// List storage account local users. + /// List of local users requested, and if paging is required, a URL to the next page of local users. [System.ComponentModel.TypeConverter(typeof(LocalUsersTypeConverter))] public partial interface ILocalUsers diff --git a/src/Storage/Storage.Autorest/generated/api/Models/LocalUsers.cs b/src/Storage/Storage.Autorest/generated/api/Models/LocalUsers.cs index b9d0b9f65dcf..7587522b9540 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/LocalUsers.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/LocalUsers.cs @@ -7,16 +7,31 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; - /// List storage account local users. + /// + /// List of local users requested, and if paging is required, a URL to the next page of local users. + /// public partial class LocalUsers : Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUsers, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUsersInternal { + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUsersInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// + /// Request URL that can be used to query next page of local users. Returned when total number of requested local users exceeds + /// the maximum page size. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + /// Backing field for property. private System.Collections.Generic.List _value; - /// The local users associated with the storage account. + /// The list of local users associated with the storage account. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } @@ -26,28 +41,47 @@ public LocalUsers() } } - /// List storage account local users. + /// List of local users requested, and if paging is required, a URL to the next page of local users. public partial interface ILocalUsers : Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable { - /// The local users associated with the storage account. + /// + /// Request URL that can be used to query next page of local users. Returned when total number of requested local users exceeds + /// the maximum page size. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Request URL that can be used to query next page of local users. Returned when total number of requested local users exceeds the maximum page size.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// The list of local users associated with the storage account. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The local users associated with the storage account.", + Description = @"The list of local users associated with the storage account.", SerializedName = @"value", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUser) })] System.Collections.Generic.List Value { get; set; } } - /// List storage account local users. + /// List of local users requested, and if paging is required, a URL to the next page of local users. internal partial interface ILocalUsersInternal { - /// The local users associated with the storage account. + /// + /// Request URL that can be used to query next page of local users. Returned when total number of requested local users exceeds + /// the maximum page size. + /// + string NextLink { get; set; } + /// The list of local users associated with the storage account. System.Collections.Generic.List Value { get; set; } } diff --git a/src/Storage/Storage.Autorest/generated/api/Models/LocalUsers.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/LocalUsers.json.cs index 853ef634644c..518e69f81eb7 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/LocalUsers.json.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/LocalUsers.json.cs @@ -7,7 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; - /// List storage account local users. + /// + /// List of local users requested, and if paging is required, a URL to the next page of local users. + /// public partial class LocalUsers { @@ -76,6 +78,7 @@ internal LocalUsers(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.Json return; } {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUser) (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.LocalUser.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -107,6 +110,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(M } container.Add("value",__w); } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/src/Storage/Storage.Autorest/generated/api/Models/PermissionScope.cs b/src/Storage/Storage.Autorest/generated/api/Models/PermissionScope.cs index 8965efb2f17c..2e5bd1d164ea 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/PermissionScope.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/PermissionScope.cs @@ -16,7 +16,8 @@ public partial class PermissionScope : private string _permission; /// - /// The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), and Create (c). + /// The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), Create (c), Modify + /// Ownership (o), and Modify Permissions (p). /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] public string Permission { get => this._permission; set => this._permission = value; } @@ -47,7 +48,8 @@ public partial interface IPermissionScope : Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable { /// - /// The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), and Create (c). + /// The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), Create (c), Modify + /// Ownership (o), and Modify Permissions (p). /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = true, @@ -55,7 +57,7 @@ public partial interface IPermissionScope : Read = true, Create = true, Update = true, - Description = @"The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), and Create (c).", + Description = @"The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), Create (c), Modify Ownership (o), and Modify Permissions (p).", SerializedName = @"permissions", PossibleTypes = new [] { typeof(string) })] string Permission { get; set; } @@ -89,7 +91,8 @@ internal partial interface IPermissionScopeInternal { /// - /// The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), and Create (c). + /// The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), Create (c), Modify + /// Ownership (o), and Modify Permissions (p). /// string Permission { get; set; } /// diff --git a/src/Storage/Storage.Autorest/generated/api/Models/SasPolicy.cs b/src/Storage/Storage.Autorest/generated/api/Models/SasPolicy.cs index 23948e316b29..f9cf614e4f0f 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/SasPolicy.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/SasPolicy.cs @@ -14,14 +14,15 @@ public partial class SasPolicy : { /// Backing field for property. - private string _expirationAction= @"Log"; + private string _expirationAction; - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] - public string ExpirationAction { get => this._expirationAction; } - - /// Internal Acessors for ExpirationAction - string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal.ExpirationAction { get => this._expirationAction; set { {_expirationAction = value;} } } + public string ExpirationAction { get => this._expirationAction; set => this._expirationAction = value; } /// Backing field for property. private string _sasExpirationPeriod; @@ -40,17 +41,22 @@ public SasPolicy() public partial interface ISasPolicy : Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable { - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = true, - ReadOnly = true, + ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The SAS expiration action. Can only be Log.", + Description = @"The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that do not adhere to the sas policy expiration period.", SerializedName = @"expirationAction", PossibleTypes = new [] { typeof(string) })] - string ExpirationAction { get; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Log", "Block")] + string ExpirationAction { get; set; } /// The SAS expiration period, DD.HH:MM:SS. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = true, @@ -68,7 +74,12 @@ public partial interface ISasPolicy : internal partial interface ISasPolicyInternal { - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Log", "Block")] string ExpirationAction { get; set; } /// The SAS expiration period, DD.HH:MM:SS. string SasExpirationPeriod { get; set; } diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccount.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccount.PowerShell.cs index ddea62bc2244..4f22078399a7 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccount.PowerShell.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccount.PowerShell.cs @@ -281,6 +281,10 @@ internal StorageAccount(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountInternal)this).IsLocalUserEnabled = (bool?) content.GetValueForProperty("IsLocalUserEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountInternal)this).IsLocalUserEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("EnableExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountInternal)this).EnableExtendedGroup = (bool?) content.GetValueForProperty("EnableExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountInternal)this).EnableExtendedGroup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("IsHnsEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountInternal)this).IsHnsEnabled = (bool?) content.GetValueForProperty("IsHnsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountInternal)this).IsHnsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); @@ -862,6 +866,10 @@ internal StorageAccount(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountInternal)this).IsLocalUserEnabled = (bool?) content.GetValueForProperty("IsLocalUserEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountInternal)this).IsLocalUserEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("EnableExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountInternal)this).EnableExtendedGroup = (bool?) content.GetValueForProperty("EnableExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountInternal)this).EnableExtendedGroup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("IsHnsEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountInternal)this).IsHnsEnabled = (bool?) content.GetValueForProperty("IsHnsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountInternal)this).IsHnsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccount.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccount.cs index d27c7a2f7cf8..94fa99bf415c 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccount.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccount.cs @@ -143,6 +143,10 @@ public partial class StorageAccount : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] public string DnsEndpointType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).DnsEndpointType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).DnsEndpointType = value ?? null; } + /// Enables extended group support with local users feature, if set to true + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public bool? EnableExtendedGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).EnableExtendedGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).EnableExtendedGroup = value ?? default(bool); } + /// Allows https traffic only to storage service if sets to true. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] public bool? EnableHttpsTrafficOnly { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).EnableHttpsTrafficOnly; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).EnableHttpsTrafficOnly = value ?? default(bool); } @@ -515,9 +519,6 @@ public partial class StorageAccount : /// Internal Acessors for SasPolicy Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicy Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountInternal.SasPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).SasPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).SasPolicy = value; } - /// Internal Acessors for SasPolicyExpirationAction - string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountInternal.SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).SasPolicyExpirationAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).SasPolicyExpirationAction = value; } - /// Internal Acessors for SecondaryEndpoint Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IEndpoints Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountInternal.SecondaryEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).SecondaryEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).SecondaryEndpoint = value; } @@ -736,7 +737,7 @@ public partial class StorageAccount : public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).ProvisioningState; } /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] public string PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).PublicNetworkAccess = value ?? null; } @@ -761,9 +762,13 @@ public partial class StorageAccount : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] public string RoutingPreferenceRoutingChoice { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).RoutingPreferenceRoutingChoice; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).RoutingPreferenceRoutingChoice = value ?? null; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] - public string SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).SasPolicyExpirationAction; } + public string SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).SasPolicyExpirationAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)Property).SasPolicyExpirationAction = value ?? null; } /// The SAS expiration period, DD.HH:MM:SS. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] @@ -935,7 +940,7 @@ public partial interface IStorageAccount : Description = @"Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.", SerializedName = @"accessTier", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium", "Cold")] string AccessTier { get; } /// /// If customer initiated account migration is in progress, the value will be true else it will be null. @@ -1213,6 +1218,17 @@ public partial interface IStorageAccount : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Standard", "AzureDnsZone")] string DnsEndpointType { get; set; } + /// Enables extended group support with local users feature, if set to true + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Enables extended group support with local users feature, if set to true", + SerializedName = @"enableExtendedGroups", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableExtendedGroup { get; set; } /// Allows https traffic only to storage service if sets to true. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -1608,7 +1624,7 @@ public partial interface IStorageAccount : Description = @"Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.", SerializedName = @"minimumTlsVersion", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2", "TLS1_3")] string MinimumTlsVersion { get; set; } /// /// Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices @@ -1917,10 +1933,10 @@ public partial interface IStorageAccount : Description = @"Gets the status of the storage account at the time the operation was called.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded", "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Deleting", "Canceled", "Failed")] string ProvisioningState { get; } /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -1928,10 +1944,10 @@ public partial interface IStorageAccount : Read = true, Create = true, Update = true, - Description = @"Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.", + Description = @"Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account.", SerializedName = @"publicNetworkAccess", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] string PublicNetworkAccess { get; set; } /// /// A boolean flag which indicates whether internet routing storage endpoints are to be published @@ -1971,16 +1987,21 @@ public partial interface IStorageAccount : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("MicrosoftRouting", "InternetRouting")] string RoutingPreferenceRoutingChoice { get; set; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, ReadOnly = true, Read = true, Create = false, Update = false, - Description = @"The SAS expiration action. Can only be Log.", + Description = @"The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that do not adhere to the sas policy expiration period.", SerializedName = @"expirationAction", PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Log", "Block")] string SasPolicyExpirationAction { get; } /// The SAS expiration period, DD.HH:MM:SS. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( @@ -2297,7 +2318,7 @@ internal partial interface IStorageAccountInternal : /// is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs /// storage account type. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium", "Cold")] string AccessTier { get; set; } /// /// If customer initiated account migration is in progress, the value will be true else it will be null. @@ -2385,6 +2406,8 @@ internal partial interface IStorageAccountInternal : /// [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Standard", "AzureDnsZone")] string DnsEndpointType { get; set; } + /// Enables extended group support with local users feature, if set to true + bool? EnableExtendedGroup { get; set; } /// Allows https traffic only to storage service if sets to true. bool? EnableHttpsTrafficOnly { get; set; } /// NFS 3.0 protocol support enabled if set to true. @@ -2522,7 +2545,7 @@ internal partial interface IStorageAccountInternal : /// /// Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2", "TLS1_3")] string MinimumTlsVersion { get; set; } /// Network rule set Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.INetworkRuleSet NetworkRuleSet { get; set; } @@ -2603,12 +2626,12 @@ internal partial interface IStorageAccountInternal : /// Properties of the storage account. Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountProperties Property { get; set; } /// Gets the status of the storage account at the time the operation was called. - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded", "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Deleting", "Canceled", "Failed")] string ProvisioningState { get; set; } /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] string PublicNetworkAccess { get; set; } /// /// Maintains information about the network routing choice opted by the user for data transfer @@ -2627,7 +2650,12 @@ internal partial interface IStorageAccountInternal : string RoutingPreferenceRoutingChoice { get; set; } /// SasPolicy assigned to the storage account. Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicy SasPolicy { get; set; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Log", "Block")] string SasPolicyExpirationAction { get; set; } /// The SAS expiration period, DD.HH:MM:SS. string SasPolicySasExpirationPeriod { get; set; } diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountCreateParameters.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountCreateParameters.PowerShell.cs index acd9715784a1..d43245d25383 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountCreateParameters.PowerShell.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountCreateParameters.PowerShell.cs @@ -225,6 +225,10 @@ internal StorageAccountCreateParameters(global::System.Collections.IDictionary c { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParametersInternal)this).IsLocalUserEnabled = (bool?) content.GetValueForProperty("IsLocalUserEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParametersInternal)this).IsLocalUserEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("EnableExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParametersInternal)this).EnableExtendedGroup = (bool?) content.GetValueForProperty("EnableExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParametersInternal)this).EnableExtendedGroup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("IsHnsEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParametersInternal)this).IsHnsEnabled = (bool?) content.GetValueForProperty("IsHnsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParametersInternal)this).IsHnsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); @@ -510,6 +514,10 @@ internal StorageAccountCreateParameters(global::System.Management.Automation.PSO { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParametersInternal)this).IsLocalUserEnabled = (bool?) content.GetValueForProperty("IsLocalUserEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParametersInternal)this).IsLocalUserEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("EnableExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParametersInternal)this).EnableExtendedGroup = (bool?) content.GetValueForProperty("EnableExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParametersInternal)this).EnableExtendedGroup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("IsHnsEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParametersInternal)this).IsHnsEnabled = (bool?) content.GetValueForProperty("IsHnsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParametersInternal)this).IsHnsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountCreateParameters.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountCreateParameters.cs index 17941ed20ff7..743c062ccbaa 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountCreateParameters.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountCreateParameters.cs @@ -120,6 +120,10 @@ public partial class StorageAccountCreateParameters : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] public string DnsEndpointType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)Property).DnsEndpointType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)Property).DnsEndpointType = value ?? null; } + /// Enables extended group support with local users feature, if set to true + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public bool? EnableExtendedGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)Property).EnableExtendedGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)Property).EnableExtendedGroup = value ?? default(bool); } + /// /// Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. /// @@ -295,9 +299,6 @@ public partial class StorageAccountCreateParameters : /// Internal Acessors for SasPolicy Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicy Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParametersInternal.SasPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)Property).SasPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)Property).SasPolicy = value; } - /// Internal Acessors for SasPolicyExpirationAction - string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParametersInternal.SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)Property).SasPolicyExpirationAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)Property).SasPolicyExpirationAction = value; } - /// Internal Acessors for Sku Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISku Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParametersInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.Sku()); set { {_sku = value;} } } @@ -341,7 +342,8 @@ public partial class StorageAccountCreateParameters : internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParameters Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageAccountPropertiesCreateParameters()); set => this._property = value; } /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. + /// Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'. /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] public string PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)Property).PublicNetworkAccess = value ?? null; } @@ -362,9 +364,13 @@ public partial class StorageAccountCreateParameters : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] public string RoutingPreferenceRoutingChoice { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)Property).RoutingPreferenceRoutingChoice; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)Property).RoutingPreferenceRoutingChoice = value ?? null; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] - public string SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)Property).SasPolicyExpirationAction; } + public string SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)Property).SasPolicyExpirationAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)Property).SasPolicyExpirationAction = value ?? null; } /// The SAS expiration period, DD.HH:MM:SS. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] @@ -422,7 +428,7 @@ public partial interface IStorageAccountCreateParameters : Description = @"Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.", SerializedName = @"accessTier", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium", "Cold")] string AccessTier { get; set; } /// Specifies the Active Directory account type for Azure Storage. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( @@ -654,6 +660,17 @@ public partial interface IStorageAccountCreateParameters : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Standard", "AzureDnsZone")] string DnsEndpointType { get; set; } + /// Enables extended group support with local users feature, if set to true + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Enables extended group support with local users feature, if set to true", + SerializedName = @"enableExtendedGroups", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableExtendedGroup { get; set; } /// /// Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. /// @@ -919,7 +936,7 @@ public partial interface IStorageAccountCreateParameters : Description = @"Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.", SerializedName = @"minimumTlsVersion", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2", "TLS1_3")] string MinimumTlsVersion { get; set; } /// /// Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices @@ -982,7 +999,8 @@ public partial interface IStorageAccountCreateParameters : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IVirtualNetworkRule) })] System.Collections.Generic.List NetworkRuleSetVirtualNetworkRule { get; set; } /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. + /// Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'. /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -990,10 +1008,10 @@ public partial interface IStorageAccountCreateParameters : Read = true, Create = true, Update = true, - Description = @"Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.", + Description = @"Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'.", SerializedName = @"publicNetworkAccess", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] string PublicNetworkAccess { get; set; } /// /// A boolean flag which indicates whether internet routing storage endpoints are to be published @@ -1033,17 +1051,22 @@ public partial interface IStorageAccountCreateParameters : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("MicrosoftRouting", "InternetRouting")] string RoutingPreferenceRoutingChoice { get; set; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, - ReadOnly = true, + ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The SAS expiration action. Can only be Log.", + Description = @"The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that do not adhere to the sas policy expiration period.", SerializedName = @"expirationAction", PossibleTypes = new [] { typeof(string) })] - string SasPolicyExpirationAction { get; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Log", "Block")] + string SasPolicyExpirationAction { get; set; } /// The SAS expiration period, DD.HH:MM:SS. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -1107,7 +1130,7 @@ internal partial interface IStorageAccountCreateParametersInternal /// is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs /// storage account type. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium", "Cold")] string AccessTier { get; set; } /// Specifies the Active Directory account type for Azure Storage. [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("User", "Computer")] @@ -1186,6 +1209,8 @@ internal partial interface IStorageAccountCreateParametersInternal /// [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Standard", "AzureDnsZone")] string DnsEndpointType { get; set; } + /// Enables extended group support with local users feature, if set to true + bool? EnableExtendedGroup { get; set; } /// /// Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. /// @@ -1282,7 +1307,7 @@ internal partial interface IStorageAccountCreateParametersInternal /// /// Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2", "TLS1_3")] string MinimumTlsVersion { get; set; } /// Network rule set Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.INetworkRuleSet NetworkRuleSet { get; set; } @@ -1304,9 +1329,10 @@ internal partial interface IStorageAccountCreateParametersInternal /// The parameters used to create the storage account. Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParameters Property { get; set; } /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. + /// Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] string PublicNetworkAccess { get; set; } /// /// Maintains information about the network routing choice opted by the user for data transfer @@ -1325,7 +1351,12 @@ internal partial interface IStorageAccountCreateParametersInternal string RoutingPreferenceRoutingChoice { get; set; } /// SasPolicy assigned to the storage account. Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicy SasPolicy { get; set; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Log", "Block")] string SasPolicyExpirationAction { get; set; } /// The SAS expiration period, DD.HH:MM:SS. string SasPolicySasExpirationPeriod { get; set; } diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountProperties.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountProperties.PowerShell.cs index fe4a47d1fa96..22f7ac48735c 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountProperties.PowerShell.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountProperties.PowerShell.cs @@ -205,6 +205,10 @@ internal StorageAccountProperties(global::System.Collections.IDictionary content { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)this).IsLocalUserEnabled = (bool?) content.GetValueForProperty("IsLocalUserEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)this).IsLocalUserEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("EnableExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)this).EnableExtendedGroup = (bool?) content.GetValueForProperty("EnableExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)this).EnableExtendedGroup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("IsHnsEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)this).IsHnsEnabled = (bool?) content.GetValueForProperty("IsHnsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)this).IsHnsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); @@ -714,6 +718,10 @@ internal StorageAccountProperties(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)this).IsLocalUserEnabled = (bool?) content.GetValueForProperty("IsLocalUserEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)this).IsLocalUserEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("EnableExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)this).EnableExtendedGroup = (bool?) content.GetValueForProperty("EnableExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)this).EnableExtendedGroup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("IsHnsEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)this).IsHnsEnabled = (bool?) content.GetValueForProperty("IsHnsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal)this).IsHnsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountProperties.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountProperties.cs index 4c70c289a893..ad822dc1c72f 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountProperties.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountProperties.cs @@ -195,6 +195,13 @@ public partial class StorageAccountProperties : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] public string DnsEndpointType { get => this._dnsEndpointType; set => this._dnsEndpointType = value; } + /// Backing field for property. + private bool? _enableExtendedGroup; + + /// Enables extended group support with local users feature, if set to true + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public bool? EnableExtendedGroup { get => this._enableExtendedGroup; set => this._enableExtendedGroup = value; } + /// Backing field for property. private bool? _enableHttpsTrafficOnly; @@ -543,9 +550,6 @@ public partial class StorageAccountProperties : /// Internal Acessors for SasPolicy Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicy Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal.SasPolicy { get => (this._sasPolicy = this._sasPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.SasPolicy()); set { {_sasPolicy = value;} } } - /// Internal Acessors for SasPolicyExpirationAction - string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal.SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal)SasPolicy).ExpirationAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal)SasPolicy).ExpirationAction = value; } - /// Internal Acessors for SecondaryEndpoint Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IEndpoints Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesInternal.SecondaryEndpoint { get => (this._secondaryEndpoint = this._secondaryEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.Endpoints()); set { {_secondaryEndpoint = value;} } } @@ -772,7 +776,7 @@ public partial class StorageAccountProperties : private string _publicNetworkAccess; /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] public string PublicNetworkAccess { get => this._publicNetworkAccess; set => this._publicNetworkAccess = value; } @@ -809,9 +813,13 @@ public partial class StorageAccountProperties : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicy SasPolicy { get => (this._sasPolicy = this._sasPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.SasPolicy()); } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] - public string SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal)SasPolicy).ExpirationAction; } + public string SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal)SasPolicy).ExpirationAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal)SasPolicy).ExpirationAction = value ?? null; } /// The SAS expiration period, DD.HH:MM:SS. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] @@ -971,7 +979,7 @@ public partial interface IStorageAccountProperties : Description = @"Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.", SerializedName = @"accessTier", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium", "Cold")] string AccessTier { get; } /// /// If customer initiated account migration is in progress, the value will be true else it will be null. @@ -1264,6 +1272,17 @@ public partial interface IStorageAccountProperties : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Standard", "AzureDnsZone")] string DnsEndpointType { get; set; } + /// Enables extended group support with local users feature, if set to true + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Enables extended group support with local users feature, if set to true", + SerializedName = @"enableExtendedGroups", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableExtendedGroup { get; set; } /// Allows https traffic only to storage service if sets to true. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -1576,7 +1595,7 @@ public partial interface IStorageAccountProperties : Description = @"Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.", SerializedName = @"minimumTlsVersion", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2", "TLS1_3")] string MinimumTlsVersion { get; set; } /// /// Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices @@ -1870,10 +1889,10 @@ public partial interface IStorageAccountProperties : Description = @"Gets the status of the storage account at the time the operation was called.", SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded", "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Deleting", "Canceled", "Failed")] string ProvisioningState { get; } /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -1881,10 +1900,10 @@ public partial interface IStorageAccountProperties : Read = true, Create = true, Update = true, - Description = @"Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.", + Description = @"Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account.", SerializedName = @"publicNetworkAccess", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] string PublicNetworkAccess { get; set; } /// /// A boolean flag which indicates whether internet routing storage endpoints are to be published @@ -1924,16 +1943,21 @@ public partial interface IStorageAccountProperties : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("MicrosoftRouting", "InternetRouting")] string RoutingPreferenceRoutingChoice { get; set; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, ReadOnly = true, Read = true, Create = false, Update = false, - Description = @"The SAS expiration action. Can only be Log.", + Description = @"The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that do not adhere to the sas policy expiration period.", SerializedName = @"expirationAction", PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Log", "Block")] string SasPolicyExpirationAction { get; } /// The SAS expiration period, DD.HH:MM:SS. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( @@ -2224,7 +2248,7 @@ internal partial interface IStorageAccountPropertiesInternal /// is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs /// storage account type. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium", "Cold")] string AccessTier { get; set; } /// /// If customer initiated account migration is in progress, the value will be true else it will be null. @@ -2320,6 +2344,8 @@ internal partial interface IStorageAccountPropertiesInternal /// [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Standard", "AzureDnsZone")] string DnsEndpointType { get; set; } + /// Enables extended group support with local users feature, if set to true + bool? EnableExtendedGroup { get; set; } /// Allows https traffic only to storage service if sets to true. bool? EnableHttpsTrafficOnly { get; set; } /// NFS 3.0 protocol support enabled if set to true. @@ -2433,7 +2459,7 @@ internal partial interface IStorageAccountPropertiesInternal /// /// Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2", "TLS1_3")] string MinimumTlsVersion { get; set; } /// Network rule set Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.INetworkRuleSet NetworkRuleSet { get; set; } @@ -2504,12 +2530,12 @@ internal partial interface IStorageAccountPropertiesInternal /// System.Collections.Generic.List PrivateEndpointConnection { get; set; } /// Gets the status of the storage account at the time the operation was called. - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded", "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Deleting", "Canceled", "Failed")] string ProvisioningState { get; set; } /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] string PublicNetworkAccess { get; set; } /// /// Maintains information about the network routing choice opted by the user for data transfer @@ -2528,7 +2554,12 @@ internal partial interface IStorageAccountPropertiesInternal string RoutingPreferenceRoutingChoice { get; set; } /// SasPolicy assigned to the storage account. Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicy SasPolicy { get; set; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Log", "Block")] string SasPolicyExpirationAction { get; set; } /// The SAS expiration period, DD.HH:MM:SS. string SasPolicySasExpirationPeriod { get; set; } diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountProperties.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountProperties.json.cs index 1d2f14dc3593..3701df5495e4 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountProperties.json.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountProperties.json.cs @@ -101,6 +101,7 @@ internal StorageAccountProperties(Microsoft.Azure.PowerShell.Cmdlets.Storage.Run {_enableHttpsTrafficOnly = If( json?.PropertyT("supportsHttpsTrafficOnly"), out var __jsonSupportsHttpsTrafficOnly) ? (bool?)__jsonSupportsHttpsTrafficOnly : _enableHttpsTrafficOnly;} {_isSftpEnabled = If( json?.PropertyT("isSftpEnabled"), out var __jsonIsSftpEnabled) ? (bool?)__jsonIsSftpEnabled : _isSftpEnabled;} {_isLocalUserEnabled = If( json?.PropertyT("isLocalUserEnabled"), out var __jsonIsLocalUserEnabled) ? (bool?)__jsonIsLocalUserEnabled : _isLocalUserEnabled;} + {_enableExtendedGroup = If( json?.PropertyT("enableExtendedGroups"), out var __jsonEnableExtendedGroups) ? (bool?)__jsonEnableExtendedGroups : _enableExtendedGroup;} {_isHnsEnabled = If( json?.PropertyT("isHnsEnabled"), out var __jsonIsHnsEnabled) ? (bool?)__jsonIsHnsEnabled : _isHnsEnabled;} {_failoverInProgress = If( json?.PropertyT("failoverInProgress"), out var __jsonFailoverInProgress) ? (bool?)__jsonFailoverInProgress : _failoverInProgress;} {_largeFileSharesState = If( json?.PropertyT("largeFileSharesState"), out var __jsonLargeFileSharesState) ? (string)__jsonLargeFileSharesState : (string)_largeFileSharesState;} @@ -214,6 +215,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(M AddIf( null != this._enableHttpsTrafficOnly ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._enableHttpsTrafficOnly) : null, "supportsHttpsTrafficOnly" ,container.Add ); AddIf( null != this._isSftpEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._isSftpEnabled) : null, "isSftpEnabled" ,container.Add ); AddIf( null != this._isLocalUserEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._isLocalUserEnabled) : null, "isLocalUserEnabled" ,container.Add ); + AddIf( null != this._enableExtendedGroup ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._enableExtendedGroup) : null, "enableExtendedGroups" ,container.Add ); AddIf( null != this._isHnsEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._isHnsEnabled) : null, "isHnsEnabled" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) { diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesCreateParameters.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesCreateParameters.PowerShell.cs index e5948093e0c9..9f422ed005cb 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesCreateParameters.PowerShell.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesCreateParameters.PowerShell.cs @@ -166,6 +166,10 @@ internal StorageAccountPropertiesCreateParameters(global::System.Collections.IDi { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)this).IsLocalUserEnabled = (bool?) content.GetValueForProperty("IsLocalUserEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)this).IsLocalUserEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("EnableExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)this).EnableExtendedGroup = (bool?) content.GetValueForProperty("EnableExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)this).EnableExtendedGroup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("IsHnsEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)this).IsHnsEnabled = (bool?) content.GetValueForProperty("IsHnsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)this).IsHnsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); @@ -391,6 +395,10 @@ internal StorageAccountPropertiesCreateParameters(global::System.Management.Auto { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)this).IsLocalUserEnabled = (bool?) content.GetValueForProperty("IsLocalUserEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)this).IsLocalUserEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("EnableExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)this).EnableExtendedGroup = (bool?) content.GetValueForProperty("EnableExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)this).EnableExtendedGroup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("IsHnsEnabled")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)this).IsHnsEnabled = (bool?) content.GetValueForProperty("IsHnsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal)this).IsHnsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesCreateParameters.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesCreateParameters.cs index 2d055f1b7741..765df6ef00c6 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesCreateParameters.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesCreateParameters.cs @@ -160,6 +160,13 @@ public partial class StorageAccountPropertiesCreateParameters : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] public string DnsEndpointType { get => this._dnsEndpointType; set => this._dnsEndpointType = value; } + /// Backing field for property. + private bool? _enableExtendedGroup; + + /// Enables extended group support with local users feature, if set to true + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public bool? EnableExtendedGroup { get => this._enableExtendedGroup; set => this._enableExtendedGroup = value; } + /// Backing field for property. private bool? _enableHttpsTrafficOnly; @@ -296,9 +303,6 @@ public partial class StorageAccountPropertiesCreateParameters : /// Internal Acessors for SasPolicy Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicy Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal.SasPolicy { get => (this._sasPolicy = this._sasPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.SasPolicy()); set { {_sasPolicy = value;} } } - /// Internal Acessors for SasPolicyExpirationAction - string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesCreateParametersInternal.SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal)SasPolicy).ExpirationAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal)SasPolicy).ExpirationAction = value; } - /// Backing field for property. private string _minimumTlsVersion; @@ -342,7 +346,8 @@ public partial class StorageAccountPropertiesCreateParameters : private string _publicNetworkAccess; /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. + /// Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'. /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] public string PublicNetworkAccess { get => this._publicNetworkAccess; set => this._publicNetworkAccess = value; } @@ -379,9 +384,13 @@ public partial class StorageAccountPropertiesCreateParameters : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicy SasPolicy { get => (this._sasPolicy = this._sasPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.SasPolicy()); set => this._sasPolicy = value; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] - public string SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal)SasPolicy).ExpirationAction; } + public string SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal)SasPolicy).ExpirationAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal)SasPolicy).ExpirationAction = value ?? null; } /// The SAS expiration period, DD.HH:MM:SS. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] @@ -413,7 +422,7 @@ public partial interface IStorageAccountPropertiesCreateParameters : Description = @"Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.", SerializedName = @"accessTier", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium", "Cold")] string AccessTier { get; set; } /// Specifies the Active Directory account type for Azure Storage. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( @@ -645,6 +654,17 @@ public partial interface IStorageAccountPropertiesCreateParameters : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Standard", "AzureDnsZone")] string DnsEndpointType { get; set; } + /// Enables extended group support with local users feature, if set to true + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Enables extended group support with local users feature, if set to true", + SerializedName = @"enableExtendedGroups", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableExtendedGroup { get; set; } /// /// Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. /// @@ -812,7 +832,7 @@ public partial interface IStorageAccountPropertiesCreateParameters : Description = @"Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.", SerializedName = @"minimumTlsVersion", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2", "TLS1_3")] string MinimumTlsVersion { get; set; } /// /// Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices @@ -875,7 +895,8 @@ public partial interface IStorageAccountPropertiesCreateParameters : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IVirtualNetworkRule) })] System.Collections.Generic.List NetworkRuleSetVirtualNetworkRule { get; set; } /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. + /// Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'. /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -883,10 +904,10 @@ public partial interface IStorageAccountPropertiesCreateParameters : Read = true, Create = true, Update = true, - Description = @"Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.", + Description = @"Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'.", SerializedName = @"publicNetworkAccess", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] string PublicNetworkAccess { get; set; } /// /// A boolean flag which indicates whether internet routing storage endpoints are to be published @@ -926,17 +947,22 @@ public partial interface IStorageAccountPropertiesCreateParameters : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("MicrosoftRouting", "InternetRouting")] string RoutingPreferenceRoutingChoice { get; set; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, - ReadOnly = true, + ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The SAS expiration action. Can only be Log.", + Description = @"The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that do not adhere to the sas policy expiration period.", SerializedName = @"expirationAction", PossibleTypes = new [] { typeof(string) })] - string SasPolicyExpirationAction { get; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Log", "Block")] + string SasPolicyExpirationAction { get; set; } /// The SAS expiration period, DD.HH:MM:SS. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -959,7 +985,7 @@ internal partial interface IStorageAccountPropertiesCreateParametersInternal /// is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs /// storage account type. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium", "Cold")] string AccessTier { get; set; } /// Specifies the Active Directory account type for Azure Storage. [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("User", "Computer")] @@ -1038,6 +1064,8 @@ internal partial interface IStorageAccountPropertiesCreateParametersInternal /// [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Standard", "AzureDnsZone")] string DnsEndpointType { get; set; } + /// Enables extended group support with local users feature, if set to true + bool? EnableExtendedGroup { get; set; } /// /// Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. /// @@ -1101,7 +1129,7 @@ internal partial interface IStorageAccountPropertiesCreateParametersInternal /// /// Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2", "TLS1_3")] string MinimumTlsVersion { get; set; } /// Network rule set Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.INetworkRuleSet NetworkRuleSet { get; set; } @@ -1121,9 +1149,10 @@ internal partial interface IStorageAccountPropertiesCreateParametersInternal /// Sets the virtual network rules System.Collections.Generic.List NetworkRuleSetVirtualNetworkRule { get; set; } /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. + /// Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] string PublicNetworkAccess { get; set; } /// /// Maintains information about the network routing choice opted by the user for data transfer @@ -1142,7 +1171,12 @@ internal partial interface IStorageAccountPropertiesCreateParametersInternal string RoutingPreferenceRoutingChoice { get; set; } /// SasPolicy assigned to the storage account. Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicy SasPolicy { get; set; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Log", "Block")] string SasPolicyExpirationAction { get; set; } /// The SAS expiration period, DD.HH:MM:SS. string SasPolicySasExpirationPeriod { get; set; } diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesCreateParameters.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesCreateParameters.json.cs index d243797778a6..f41af95998d3 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesCreateParameters.json.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesCreateParameters.json.cs @@ -90,6 +90,7 @@ internal StorageAccountPropertiesCreateParameters(Microsoft.Azure.PowerShell.Cmd {_enableHttpsTrafficOnly = If( json?.PropertyT("supportsHttpsTrafficOnly"), out var __jsonSupportsHttpsTrafficOnly) ? (bool?)__jsonSupportsHttpsTrafficOnly : _enableHttpsTrafficOnly;} {_isSftpEnabled = If( json?.PropertyT("isSftpEnabled"), out var __jsonIsSftpEnabled) ? (bool?)__jsonIsSftpEnabled : _isSftpEnabled;} {_isLocalUserEnabled = If( json?.PropertyT("isLocalUserEnabled"), out var __jsonIsLocalUserEnabled) ? (bool?)__jsonIsLocalUserEnabled : _isLocalUserEnabled;} + {_enableExtendedGroup = If( json?.PropertyT("enableExtendedGroups"), out var __jsonEnableExtendedGroups) ? (bool?)__jsonEnableExtendedGroups : _enableExtendedGroup;} {_isHnsEnabled = If( json?.PropertyT("isHnsEnabled"), out var __jsonIsHnsEnabled) ? (bool?)__jsonIsHnsEnabled : _isHnsEnabled;} {_largeFileSharesState = If( json?.PropertyT("largeFileSharesState"), out var __jsonLargeFileSharesState) ? (string)__jsonLargeFileSharesState : (string)_largeFileSharesState;} {_allowBlobPublicAccess = If( json?.PropertyT("allowBlobPublicAccess"), out var __jsonAllowBlobPublicAccess) ? (bool?)__jsonAllowBlobPublicAccess : _allowBlobPublicAccess;} @@ -137,6 +138,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(M AddIf( null != this._enableHttpsTrafficOnly ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._enableHttpsTrafficOnly) : null, "supportsHttpsTrafficOnly" ,container.Add ); AddIf( null != this._isSftpEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._isSftpEnabled) : null, "isSftpEnabled" ,container.Add ); AddIf( null != this._isLocalUserEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._isLocalUserEnabled) : null, "isLocalUserEnabled" ,container.Add ); + AddIf( null != this._enableExtendedGroup ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._enableExtendedGroup) : null, "enableExtendedGroups" ,container.Add ); AddIf( null != this._isHnsEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._isHnsEnabled) : null, "isHnsEnabled" ,container.Add ); AddIf( null != (((object)this._largeFileSharesState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._largeFileSharesState.ToString()) : null, "largeFileSharesState" ,container.Add ); AddIf( null != this._allowBlobPublicAccess ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._allowBlobPublicAccess) : null, "allowBlobPublicAccess" ,container.Add ); diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesUpdateParameters.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesUpdateParameters.PowerShell.cs index ecab91112045..76b385954bca 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesUpdateParameters.PowerShell.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesUpdateParameters.PowerShell.cs @@ -158,6 +158,10 @@ internal StorageAccountPropertiesUpdateParameters(global::System.Collections.IDi { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)this).IsLocalUserEnabled = (bool?) content.GetValueForProperty("IsLocalUserEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)this).IsLocalUserEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("EnableExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)this).EnableExtendedGroup = (bool?) content.GetValueForProperty("EnableExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)this).EnableExtendedGroup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("LargeFileSharesState")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)this).LargeFileSharesState = (string) content.GetValueForProperty("LargeFileSharesState",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)this).LargeFileSharesState, global::System.Convert.ToString); @@ -375,6 +379,10 @@ internal StorageAccountPropertiesUpdateParameters(global::System.Management.Auto { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)this).IsLocalUserEnabled = (bool?) content.GetValueForProperty("IsLocalUserEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)this).IsLocalUserEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("EnableExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)this).EnableExtendedGroup = (bool?) content.GetValueForProperty("EnableExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)this).EnableExtendedGroup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("LargeFileSharesState")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)this).LargeFileSharesState = (string) content.GetValueForProperty("LargeFileSharesState",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)this).LargeFileSharesState, global::System.Convert.ToString); diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesUpdateParameters.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesUpdateParameters.cs index 20e6b0b0665b..16323ac85c27 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesUpdateParameters.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesUpdateParameters.cs @@ -161,6 +161,13 @@ public partial class StorageAccountPropertiesUpdateParameters : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] public string DnsEndpointType { get => this._dnsEndpointType; set => this._dnsEndpointType = value; } + /// Backing field for property. + private bool? _enableExtendedGroup; + + /// Enables extended group support with local users feature, if set to true + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public bool? EnableExtendedGroup { get => this._enableExtendedGroup; set => this._enableExtendedGroup = value; } + /// Backing field for property. private bool? _enableHttpsTrafficOnly; @@ -281,9 +288,6 @@ public partial class StorageAccountPropertiesUpdateParameters : /// Internal Acessors for SasPolicy Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicy Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal.SasPolicy { get => (this._sasPolicy = this._sasPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.SasPolicy()); set { {_sasPolicy = value;} } } - /// Internal Acessors for SasPolicyExpirationAction - string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal.SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal)SasPolicy).ExpirationAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal)SasPolicy).ExpirationAction = value; } - /// Backing field for property. private string _minimumTlsVersion; @@ -327,7 +331,8 @@ public partial class StorageAccountPropertiesUpdateParameters : private string _publicNetworkAccess; /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. + /// Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'. /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] public string PublicNetworkAccess { get => this._publicNetworkAccess; set => this._publicNetworkAccess = value; } @@ -364,9 +369,13 @@ public partial class StorageAccountPropertiesUpdateParameters : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicy SasPolicy { get => (this._sasPolicy = this._sasPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.SasPolicy()); set => this._sasPolicy = value; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] - public string SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal)SasPolicy).ExpirationAction; } + public string SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal)SasPolicy).ExpirationAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicyInternal)SasPolicy).ExpirationAction = value ?? null; } /// The SAS expiration period, DD.HH:MM:SS. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] @@ -398,7 +407,7 @@ public partial interface IStorageAccountPropertiesUpdateParameters : Description = @"Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.", SerializedName = @"accessTier", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium", "Cold")] string AccessTier { get; set; } /// Specifies the Active Directory account type for Azure Storage. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( @@ -630,6 +639,17 @@ public partial interface IStorageAccountPropertiesUpdateParameters : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Standard", "AzureDnsZone")] string DnsEndpointType { get; set; } + /// Enables extended group support with local users feature, if set to true + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Enables extended group support with local users feature, if set to true", + SerializedName = @"enableExtendedGroups", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableExtendedGroup { get; set; } /// Allows https traffic only to storage service if sets to true. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -773,7 +793,7 @@ public partial interface IStorageAccountPropertiesUpdateParameters : Description = @"Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.", SerializedName = @"minimumTlsVersion", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2", "TLS1_3")] string MinimumTlsVersion { get; set; } /// /// Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices @@ -836,7 +856,8 @@ public partial interface IStorageAccountPropertiesUpdateParameters : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IVirtualNetworkRule) })] System.Collections.Generic.List NetworkRuleSetVirtualNetworkRule { get; set; } /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. + /// Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'. /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -844,10 +865,10 @@ public partial interface IStorageAccountPropertiesUpdateParameters : Read = true, Create = true, Update = true, - Description = @"Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.", + Description = @"Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'.", SerializedName = @"publicNetworkAccess", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] string PublicNetworkAccess { get; set; } /// /// A boolean flag which indicates whether internet routing storage endpoints are to be published @@ -887,17 +908,22 @@ public partial interface IStorageAccountPropertiesUpdateParameters : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("MicrosoftRouting", "InternetRouting")] string RoutingPreferenceRoutingChoice { get; set; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, - ReadOnly = true, + ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The SAS expiration action. Can only be Log.", + Description = @"The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that do not adhere to the sas policy expiration period.", SerializedName = @"expirationAction", PossibleTypes = new [] { typeof(string) })] - string SasPolicyExpirationAction { get; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Log", "Block")] + string SasPolicyExpirationAction { get; set; } /// The SAS expiration period, DD.HH:MM:SS. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -920,7 +946,7 @@ internal partial interface IStorageAccountPropertiesUpdateParametersInternal /// is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs /// storage account type. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium", "Cold")] string AccessTier { get; set; } /// Specifies the Active Directory account type for Azure Storage. [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("User", "Computer")] @@ -1000,6 +1026,8 @@ internal partial interface IStorageAccountPropertiesUpdateParametersInternal /// [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Standard", "AzureDnsZone")] string DnsEndpointType { get; set; } + /// Enables extended group support with local users feature, if set to true + bool? EnableExtendedGroup { get; set; } /// Allows https traffic only to storage service if sets to true. bool? EnableHttpsTrafficOnly { get; set; } /// @@ -1057,7 +1085,7 @@ internal partial interface IStorageAccountPropertiesUpdateParametersInternal /// /// Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2", "TLS1_3")] string MinimumTlsVersion { get; set; } /// Network rule set Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.INetworkRuleSet NetworkRuleSet { get; set; } @@ -1077,9 +1105,10 @@ internal partial interface IStorageAccountPropertiesUpdateParametersInternal /// Sets the virtual network rules System.Collections.Generic.List NetworkRuleSetVirtualNetworkRule { get; set; } /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. + /// Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] string PublicNetworkAccess { get; set; } /// /// Maintains information about the network routing choice opted by the user for data transfer @@ -1098,7 +1127,12 @@ internal partial interface IStorageAccountPropertiesUpdateParametersInternal string RoutingPreferenceRoutingChoice { get; set; } /// SasPolicy assigned to the storage account. Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicy SasPolicy { get; set; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Log", "Block")] string SasPolicyExpirationAction { get; set; } /// The SAS expiration period, DD.HH:MM:SS. string SasPolicySasExpirationPeriod { get; set; } diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesUpdateParameters.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesUpdateParameters.json.cs index dc0efc9fc9c9..fd68a9b7796d 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesUpdateParameters.json.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountPropertiesUpdateParameters.json.cs @@ -88,6 +88,7 @@ internal StorageAccountPropertiesUpdateParameters(Microsoft.Azure.PowerShell.Cmd {_enableHttpsTrafficOnly = If( json?.PropertyT("supportsHttpsTrafficOnly"), out var __jsonSupportsHttpsTrafficOnly) ? (bool?)__jsonSupportsHttpsTrafficOnly : _enableHttpsTrafficOnly;} {_isSftpEnabled = If( json?.PropertyT("isSftpEnabled"), out var __jsonIsSftpEnabled) ? (bool?)__jsonIsSftpEnabled : _isSftpEnabled;} {_isLocalUserEnabled = If( json?.PropertyT("isLocalUserEnabled"), out var __jsonIsLocalUserEnabled) ? (bool?)__jsonIsLocalUserEnabled : _isLocalUserEnabled;} + {_enableExtendedGroup = If( json?.PropertyT("enableExtendedGroups"), out var __jsonEnableExtendedGroups) ? (bool?)__jsonEnableExtendedGroups : _enableExtendedGroup;} {_largeFileSharesState = If( json?.PropertyT("largeFileSharesState"), out var __jsonLargeFileSharesState) ? (string)__jsonLargeFileSharesState : (string)_largeFileSharesState;} {_allowBlobPublicAccess = If( json?.PropertyT("allowBlobPublicAccess"), out var __jsonAllowBlobPublicAccess) ? (bool?)__jsonAllowBlobPublicAccess : _allowBlobPublicAccess;} {_minimumTlsVersion = If( json?.PropertyT("minimumTlsVersion"), out var __jsonMinimumTlsVersion) ? (string)__jsonMinimumTlsVersion : (string)_minimumTlsVersion;} @@ -133,6 +134,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(M AddIf( null != this._enableHttpsTrafficOnly ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._enableHttpsTrafficOnly) : null, "supportsHttpsTrafficOnly" ,container.Add ); AddIf( null != this._isSftpEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._isSftpEnabled) : null, "isSftpEnabled" ,container.Add ); AddIf( null != this._isLocalUserEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._isLocalUserEnabled) : null, "isLocalUserEnabled" ,container.Add ); + AddIf( null != this._enableExtendedGroup ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._enableExtendedGroup) : null, "enableExtendedGroups" ,container.Add ); AddIf( null != (((object)this._largeFileSharesState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._largeFileSharesState.ToString()) : null, "largeFileSharesState" ,container.Add ); AddIf( null != this._allowBlobPublicAccess ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._allowBlobPublicAccess) : null, "allowBlobPublicAccess" ,container.Add ); AddIf( null != (((object)this._minimumTlsVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._minimumTlsVersion.ToString()) : null, "minimumTlsVersion" ,container.Add ); diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountUpdateParameters.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountUpdateParameters.PowerShell.cs index 0da09ed6a1e0..8633f8e1cb35 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountUpdateParameters.PowerShell.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountUpdateParameters.PowerShell.cs @@ -203,6 +203,10 @@ internal StorageAccountUpdateParameters(global::System.Collections.IDictionary c { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParametersInternal)this).IsLocalUserEnabled = (bool?) content.GetValueForProperty("IsLocalUserEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParametersInternal)this).IsLocalUserEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("EnableExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParametersInternal)this).EnableExtendedGroup = (bool?) content.GetValueForProperty("EnableExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParametersInternal)this).EnableExtendedGroup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("LargeFileSharesState")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParametersInternal)this).LargeFileSharesState = (string) content.GetValueForProperty("LargeFileSharesState",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParametersInternal)this).LargeFileSharesState, global::System.Convert.ToString); @@ -464,6 +468,10 @@ internal StorageAccountUpdateParameters(global::System.Management.Automation.PSO { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParametersInternal)this).IsLocalUserEnabled = (bool?) content.GetValueForProperty("IsLocalUserEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParametersInternal)this).IsLocalUserEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } + if (content.Contains("EnableExtendedGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParametersInternal)this).EnableExtendedGroup = (bool?) content.GetValueForProperty("EnableExtendedGroup",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParametersInternal)this).EnableExtendedGroup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } if (content.Contains("LargeFileSharesState")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParametersInternal)this).LargeFileSharesState = (string) content.GetValueForProperty("LargeFileSharesState",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParametersInternal)this).LargeFileSharesState, global::System.Convert.ToString); diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountUpdateParameters.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountUpdateParameters.cs index 7925268aca6c..9a812fd5c4c3 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountUpdateParameters.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageAccountUpdateParameters.cs @@ -122,6 +122,10 @@ public partial class StorageAccountUpdateParameters : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] public string DnsEndpointType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).DnsEndpointType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).DnsEndpointType = value ?? null; } + /// Enables extended group support with local users feature, if set to true + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public bool? EnableExtendedGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).EnableExtendedGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).EnableExtendedGroup = value ?? default(bool); } + /// Allows https traffic only to storage service if sets to true. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] public bool? EnableHttpsTrafficOnly { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).EnableHttpsTrafficOnly; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).EnableHttpsTrafficOnly = value ?? default(bool); } @@ -257,9 +261,6 @@ public partial class StorageAccountUpdateParameters : /// Internal Acessors for SasPolicy Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicy Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParametersInternal.SasPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).SasPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).SasPolicy = value; } - /// Internal Acessors for SasPolicyExpirationAction - string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParametersInternal.SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).SasPolicyExpirationAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).SasPolicyExpirationAction = value; } - /// Internal Acessors for Sku Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISku Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParametersInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.Sku()); set { {_sku = value;} } } @@ -303,7 +304,8 @@ public partial class StorageAccountUpdateParameters : internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParameters Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageAccountPropertiesUpdateParameters()); set => this._property = value; } /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. + /// Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'. /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] public string PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).PublicNetworkAccess = value ?? null; } @@ -324,9 +326,13 @@ public partial class StorageAccountUpdateParameters : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] public string RoutingPreferenceRoutingChoice { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).RoutingPreferenceRoutingChoice; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).RoutingPreferenceRoutingChoice = value ?? null; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] - public string SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).SasPolicyExpirationAction; } + public string SasPolicyExpirationAction { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).SasPolicyExpirationAction; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParametersInternal)Property).SasPolicyExpirationAction = value ?? null; } /// The SAS expiration period, DD.HH:MM:SS. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] @@ -387,7 +393,7 @@ public partial interface IStorageAccountUpdateParameters : Description = @"Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.", SerializedName = @"accessTier", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium", "Cold")] string AccessTier { get; set; } /// Specifies the Active Directory account type for Azure Storage. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( @@ -619,6 +625,17 @@ public partial interface IStorageAccountUpdateParameters : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Standard", "AzureDnsZone")] string DnsEndpointType { get; set; } + /// Enables extended group support with local users feature, if set to true + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Enables extended group support with local users feature, if set to true", + SerializedName = @"enableExtendedGroups", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableExtendedGroup { get; set; } /// Allows https traffic only to storage service if sets to true. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -824,7 +841,7 @@ public partial interface IStorageAccountUpdateParameters : Description = @"Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.", SerializedName = @"minimumTlsVersion", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2", "TLS1_3")] string MinimumTlsVersion { get; set; } /// /// Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices @@ -887,7 +904,8 @@ public partial interface IStorageAccountUpdateParameters : PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IVirtualNetworkRule) })] System.Collections.Generic.List NetworkRuleSetVirtualNetworkRule { get; set; } /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. + /// Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'. /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -895,10 +913,10 @@ public partial interface IStorageAccountUpdateParameters : Read = true, Create = true, Update = true, - Description = @"Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.", + Description = @"Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'.", SerializedName = @"publicNetworkAccess", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] string PublicNetworkAccess { get; set; } /// /// A boolean flag which indicates whether internet routing storage endpoints are to be published @@ -938,17 +956,22 @@ public partial interface IStorageAccountUpdateParameters : PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("MicrosoftRouting", "InternetRouting")] string RoutingPreferenceRoutingChoice { get; set; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, - ReadOnly = true, + ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The SAS expiration action. Can only be Log.", + Description = @"The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that do not adhere to the sas policy expiration period.", SerializedName = @"expirationAction", PossibleTypes = new [] { typeof(string) })] - string SasPolicyExpirationAction { get; } + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Log", "Block")] + string SasPolicyExpirationAction { get; set; } /// The SAS expiration period, DD.HH:MM:SS. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -1012,7 +1035,7 @@ internal partial interface IStorageAccountUpdateParametersInternal /// is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs /// storage account type. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Hot", "Cool", "Premium", "Cold")] string AccessTier { get; set; } /// Specifies the Active Directory account type for Azure Storage. [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("User", "Computer")] @@ -1092,6 +1115,8 @@ internal partial interface IStorageAccountUpdateParametersInternal /// [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Standard", "AzureDnsZone")] string DnsEndpointType { get; set; } + /// Enables extended group support with local users feature, if set to true + bool? EnableExtendedGroup { get; set; } /// Allows https traffic only to storage service if sets to true. bool? EnableHttpsTrafficOnly { get; set; } /// @@ -1168,7 +1193,7 @@ internal partial interface IStorageAccountUpdateParametersInternal /// /// Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("TLS1_0", "TLS1_1", "TLS1_2", "TLS1_3")] string MinimumTlsVersion { get; set; } /// Network rule set Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.INetworkRuleSet NetworkRuleSet { get; set; } @@ -1190,9 +1215,10 @@ internal partial interface IStorageAccountUpdateParametersInternal /// The parameters used when updating a storage account. Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountPropertiesUpdateParameters Property { get; set; } /// - /// Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + /// Allow, disallow, or let Network Security Perimeter configuration to evaluate public network access to Storage Account. + /// Value is optional but if passed in, must be 'Enabled', 'Disabled' or 'SecuredByPerimeter'. /// - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")] string PublicNetworkAccess { get; set; } /// /// Maintains information about the network routing choice opted by the user for data transfer @@ -1211,7 +1237,12 @@ internal partial interface IStorageAccountUpdateParametersInternal string RoutingPreferenceRoutingChoice { get; set; } /// SasPolicy assigned to the storage account. Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ISasPolicy SasPolicy { get; set; } - /// The SAS expiration action. Can only be Log. + /// + /// The SAS Expiration Action defines the action to be performed when sasPolicy.sasExpirationPeriod is violated. The 'Log' + /// action can be used for audit purposes and the 'Block' action can be used to block and deny the usage of SAS tokens that + /// do not adhere to the sas policy expiration period. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Log", "Block")] string SasPolicyExpirationAction { get; set; } /// The SAS expiration period, DD.HH:MM:SS. string SasPolicySasExpirationPeriod { get; set; } diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageIdentity.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageIdentity.PowerShell.cs index 45512ff19941..2443b26ae7b9 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageIdentity.PowerShell.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageIdentity.PowerShell.cs @@ -156,6 +156,10 @@ internal StorageIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentityInternal)this).EncryptionScopeName = (string) content.GetValueForProperty("EncryptionScopeName",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentityInternal)this).EncryptionScopeName, global::System.Convert.ToString); } + if (content.Contains("StorageTaskAssignmentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentityInternal)this).StorageTaskAssignmentName = (string) content.GetValueForProperty("StorageTaskAssignmentName",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentityInternal)this).StorageTaskAssignmentName, global::System.Convert.ToString); + } if (content.Contains("Id")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentityInternal)this).Id, global::System.Convert.ToString); @@ -225,6 +229,10 @@ internal StorageIdentity(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentityInternal)this).EncryptionScopeName = (string) content.GetValueForProperty("EncryptionScopeName",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentityInternal)this).EncryptionScopeName, global::System.Convert.ToString); } + if (content.Contains("StorageTaskAssignmentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentityInternal)this).StorageTaskAssignmentName = (string) content.GetValueForProperty("StorageTaskAssignmentName",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentityInternal)this).StorageTaskAssignmentName, global::System.Convert.ToString); + } if (content.Contains("Id")) { ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentityInternal)this).Id, global::System.Convert.ToString); diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageIdentity.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageIdentity.cs index 0612f7b43edf..5e4731175766 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageIdentity.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageIdentity.cs @@ -106,6 +106,16 @@ public partial class StorageIdentity : [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + /// Backing field for property. + private string _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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string StorageTaskAssignmentName { get => this._storageTaskAssignmentName; set => this._storageTaskAssignmentName = value; } + /// Backing field for property. private string _subscriptionId; @@ -273,6 +283,20 @@ public partial interface IStorageIdentity : SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] string ResourceGroupName { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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.", + SerializedName = @"storageTaskAssignmentName", + PossibleTypes = new [] { typeof(string) })] + string StorageTaskAssignmentName { get; set; } /// The ID of the target subscription. [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( Required = false, @@ -345,6 +369,11 @@ internal partial interface IStorageIdentityInternal /// The name of the resource group within the user's subscription. The name is case insensitive. /// string ResourceGroupName { get; set; } + /// + /// 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. + /// + string StorageTaskAssignmentName { get; set; } /// The ID of the target subscription. string SubscriptionId { get; set; } /// diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageIdentity.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageIdentity.json.cs index 7f971e8191cf..2050468f2497 100644 --- a/src/Storage/Storage.Autorest/generated/api/Models/StorageIdentity.json.cs +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageIdentity.json.cs @@ -88,6 +88,7 @@ internal StorageIdentity(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json {_objectReplicationPolicyId = If( json?.PropertyT("objectReplicationPolicyId"), out var __jsonObjectReplicationPolicyId) ? (string)__jsonObjectReplicationPolicyId : (string)_objectReplicationPolicyId;} {_username = If( json?.PropertyT("username"), out var __jsonUsername) ? (string)__jsonUsername : (string)_username;} {_encryptionScopeName = If( json?.PropertyT("encryptionScopeName"), out var __jsonEncryptionScopeName) ? (string)__jsonEncryptionScopeName : (string)_encryptionScopeName;} + {_storageTaskAssignmentName = If( json?.PropertyT("storageTaskAssignmentName"), out var __jsonStorageTaskAssignmentName) ? (string)__jsonStorageTaskAssignmentName : (string)_storageTaskAssignmentName;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } @@ -123,6 +124,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(M AddIf( null != (((object)this._objectReplicationPolicyId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._objectReplicationPolicyId.ToString()) : null, "objectReplicationPolicyId" ,container.Add ); AddIf( null != (((object)this._username)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._username.ToString()) : null, "username" ,container.Add ); AddIf( null != (((object)this._encryptionScopeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._encryptionScopeName.ToString()) : null, "encryptionScopeName" ,container.Add ); + AddIf( null != (((object)this._storageTaskAssignmentName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._storageTaskAssignmentName.ToString()) : null, "storageTaskAssignmentName" ,container.Add ); AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); AfterToJson(ref container); return container; diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.PowerShell.cs new file mode 100644 index 000000000000..a8d6ff89a595 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.PowerShell.cs @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// The storage task assignment. + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentTypeConverter))] + public partial class StorageTaskAssignment + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageTaskAssignment(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageTaskAssignment(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageTaskAssignment(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ExecutionContext")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ExecutionContext = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext) content.GetValueForProperty("ExecutionContext",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ExecutionContext, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentExecutionContextTypeConverter.ConvertFrom); + } + if (content.Contains("Report")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Report = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport) content.GetValueForProperty("Report",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Report, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentReportTypeConverter.ConvertFrom); + } + if (content.Contains("RunStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatus = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties) content.GetValueForProperty("RunStatus",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatus, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("TaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TaskId = (string) content.GetValueForProperty("TaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TaskId, global::System.Convert.ToString); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("RunStatusRunResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusRunResult = (string) content.GetValueForProperty("RunStatusRunResult",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusRunResult, global::System.Convert.ToString); + } + if (content.Contains("ExecutionContextTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ExecutionContextTarget = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget) content.GetValueForProperty("ExecutionContextTarget",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ExecutionContextTarget, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTargetTypeConverter.ConvertFrom); + } + if (content.Contains("ExecutionContextTrigger")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ExecutionContextTrigger = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger) content.GetValueForProperty("ExecutionContextTrigger",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ExecutionContextTrigger, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTriggerTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TriggerParameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters) content.GetValueForProperty("TriggerParameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TriggerParameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TriggerType = (string) content.GetValueForProperty("TriggerType",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TriggerType, global::System.Convert.ToString); + } + if (content.Contains("ReportPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ReportPrefix = (string) content.GetValueForProperty("ReportPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ReportPrefix, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskAssignmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusTaskAssignmentId = (string) content.GetValueForProperty("RunStatusTaskAssignmentId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusTaskAssignmentId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusStorageAccountId = (string) content.GetValueForProperty("RunStatusStorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusStorageAccountId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusStartTime = (string) content.GetValueForProperty("RunStatusStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusStartTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusFinishTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusFinishTime = (string) content.GetValueForProperty("RunStatusFinishTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusFinishTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsTargetedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectsTargetedCount = (string) content.GetValueForProperty("RunStatusObjectsTargetedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectsTargetedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsOperatedOnCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectsOperatedOnCount = (string) content.GetValueForProperty("RunStatusObjectsOperatedOnCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectsOperatedOnCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectFailedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectFailedCount = (string) content.GetValueForProperty("RunStatusObjectFailedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectFailedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsSucceededCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectsSucceededCount = (string) content.GetValueForProperty("RunStatusObjectsSucceededCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectsSucceededCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusError = (string) content.GetValueForProperty("RunStatusError",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusError, global::System.Convert.ToString); + } + if (content.Contains("RunStatusEnum")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusEnum = (string) content.GetValueForProperty("RunStatusEnum",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusEnum, global::System.Convert.ToString); + } + if (content.Contains("RunStatusSummaryReportPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusSummaryReportPath = (string) content.GetValueForProperty("RunStatusSummaryReportPath",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusSummaryReportPath, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusTaskId = (string) content.GetValueForProperty("RunStatusTaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusTaskId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusTaskVersion = (string) content.GetValueForProperty("RunStatusTaskVersion",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusTaskVersion, global::System.Convert.ToString); + } + if (content.Contains("TargetPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TargetPrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TargetPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TargetExcludePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TargetExcludePrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetExcludePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TargetExcludePrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StorageTaskAssignment(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ExecutionContext")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ExecutionContext = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext) content.GetValueForProperty("ExecutionContext",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ExecutionContext, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentExecutionContextTypeConverter.ConvertFrom); + } + if (content.Contains("Report")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Report = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport) content.GetValueForProperty("Report",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Report, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentReportTypeConverter.ConvertFrom); + } + if (content.Contains("RunStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatus = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties) content.GetValueForProperty("RunStatus",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatus, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("TaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TaskId = (string) content.GetValueForProperty("TaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TaskId, global::System.Convert.ToString); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("RunStatusRunResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusRunResult = (string) content.GetValueForProperty("RunStatusRunResult",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusRunResult, global::System.Convert.ToString); + } + if (content.Contains("ExecutionContextTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ExecutionContextTarget = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget) content.GetValueForProperty("ExecutionContextTarget",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ExecutionContextTarget, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTargetTypeConverter.ConvertFrom); + } + if (content.Contains("ExecutionContextTrigger")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ExecutionContextTrigger = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger) content.GetValueForProperty("ExecutionContextTrigger",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ExecutionContextTrigger, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTriggerTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TriggerParameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters) content.GetValueForProperty("TriggerParameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TriggerParameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TriggerType = (string) content.GetValueForProperty("TriggerType",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TriggerType, global::System.Convert.ToString); + } + if (content.Contains("ReportPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ReportPrefix = (string) content.GetValueForProperty("ReportPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).ReportPrefix, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskAssignmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusTaskAssignmentId = (string) content.GetValueForProperty("RunStatusTaskAssignmentId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusTaskAssignmentId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusStorageAccountId = (string) content.GetValueForProperty("RunStatusStorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusStorageAccountId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusStartTime = (string) content.GetValueForProperty("RunStatusStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusStartTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusFinishTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusFinishTime = (string) content.GetValueForProperty("RunStatusFinishTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusFinishTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsTargetedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectsTargetedCount = (string) content.GetValueForProperty("RunStatusObjectsTargetedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectsTargetedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsOperatedOnCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectsOperatedOnCount = (string) content.GetValueForProperty("RunStatusObjectsOperatedOnCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectsOperatedOnCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectFailedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectFailedCount = (string) content.GetValueForProperty("RunStatusObjectFailedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectFailedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsSucceededCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectsSucceededCount = (string) content.GetValueForProperty("RunStatusObjectsSucceededCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusObjectsSucceededCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusError = (string) content.GetValueForProperty("RunStatusError",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusError, global::System.Convert.ToString); + } + if (content.Contains("RunStatusEnum")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusEnum = (string) content.GetValueForProperty("RunStatusEnum",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusEnum, global::System.Convert.ToString); + } + if (content.Contains("RunStatusSummaryReportPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusSummaryReportPath = (string) content.GetValueForProperty("RunStatusSummaryReportPath",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusSummaryReportPath, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusTaskId = (string) content.GetValueForProperty("RunStatusTaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusTaskId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusTaskVersion = (string) content.GetValueForProperty("RunStatusTaskVersion",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).RunStatusTaskVersion, global::System.Convert.ToString); + } + if (content.Contains("TargetPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TargetPrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TargetPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TargetExcludePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TargetExcludePrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetExcludePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).TargetExcludePrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The storage task assignment. + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentTypeConverter))] + public partial interface IStorageTaskAssignment + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.TypeConverter.cs new file mode 100644 index 000000000000..1827dde36b97 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StorageTaskAssignmentTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StorageTaskAssignment.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StorageTaskAssignment.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StorageTaskAssignment.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.cs new file mode 100644 index 000000000000..f3ff03de3237 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.cs @@ -0,0 +1,775 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// The storage task assignment. + public partial class StorageTaskAssignment : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.Resource(); + + /// Text that describes the purpose of the storage task assignment + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).Description = value ; } + + /// Whether the storage task assignment is enabled or not + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public bool Enabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).Enabled = value ; } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? EndBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).EndBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).EndBy = value ?? default(global::System.DateTime); } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__resource).Id; } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public int? Interval { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).Interval; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).Interval = value ?? default(int); } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string IntervalUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).IntervalUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).IntervalUnit = value ?? null; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__resource).Type = value; } + + /// Internal Acessors for ExecutionContext + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.ExecutionContext { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).ExecutionContext; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).ExecutionContext = value; } + + /// Internal Acessors for ExecutionContextTarget + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.ExecutionContextTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).ExecutionContextTarget; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).ExecutionContextTarget = value; } + + /// Internal Acessors for ExecutionContextTrigger + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.ExecutionContextTrigger { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).ExecutionContextTrigger; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).ExecutionContextTrigger = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentProperties Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Report + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.Report { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).Report; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).Report = value; } + + /// Internal Acessors for RunStatus + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.RunStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatus = value; } + + /// Internal Acessors for RunStatusEnum + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.RunStatusEnum { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusEnum; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusEnum = value; } + + /// Internal Acessors for RunStatusError + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.RunStatusError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusError; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusError = value; } + + /// Internal Acessors for RunStatusFinishTime + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.RunStatusFinishTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusFinishTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusFinishTime = value; } + + /// Internal Acessors for RunStatusObjectFailedCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.RunStatusObjectFailedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusObjectFailedCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusObjectFailedCount = value; } + + /// Internal Acessors for RunStatusObjectsOperatedOnCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.RunStatusObjectsOperatedOnCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusObjectsOperatedOnCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusObjectsOperatedOnCount = value; } + + /// Internal Acessors for RunStatusObjectsSucceededCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.RunStatusObjectsSucceededCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusObjectsSucceededCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusObjectsSucceededCount = value; } + + /// Internal Acessors for RunStatusObjectsTargetedCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.RunStatusObjectsTargetedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusObjectsTargetedCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusObjectsTargetedCount = value; } + + /// Internal Acessors for RunStatusRunResult + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.RunStatusRunResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusRunResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusRunResult = value; } + + /// Internal Acessors for RunStatusStartTime + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.RunStatusStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusStartTime = value; } + + /// Internal Acessors for RunStatusStorageAccountId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.RunStatusStorageAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusStorageAccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusStorageAccountId = value; } + + /// Internal Acessors for RunStatusSummaryReportPath + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.RunStatusSummaryReportPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusSummaryReportPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusSummaryReportPath = value; } + + /// Internal Acessors for RunStatusTaskAssignmentId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.RunStatusTaskAssignmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusTaskAssignmentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusTaskAssignmentId = value; } + + /// Internal Acessors for RunStatusTaskId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.RunStatusTaskId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusTaskId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusTaskId = value; } + + /// Internal Acessors for RunStatusTaskVersion + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.RunStatusTaskVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusTaskVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusTaskVersion = value; } + + /// Internal Acessors for TriggerParameter + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentInternal.TriggerParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).TriggerParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).TriggerParameter = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentProperties _property; + + /// Properties of the storage task assignment. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentProperties()); set => this._property = value; } + + /// Represents the provisioning state of the storage task assignment. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).ProvisioningState; } + + /// The container prefix for the location of storage task assignment report + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string ReportPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).ReportPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).ReportPrefix = value ; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Represents the status of the execution. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusEnum { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusEnum; } + + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusError; } + + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusFinishTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusFinishTime; } + + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectFailedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusObjectFailedCount; } + + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectsOperatedOnCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusObjectsOperatedOnCount; } + + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectsSucceededCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusObjectsSucceededCount; } + + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectsTargetedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusObjectsTargetedCount; } + + /// Represents the overall result of the execution for the run instance + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusRunResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusRunResult; } + + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusStartTime; } + + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusStorageAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusStorageAccountId; } + + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusSummaryReportPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusSummaryReportPath; } + + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusTaskAssignmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusTaskAssignmentId; } + + /// Storage Task Arm Id. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusTaskId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusTaskId; } + + /// Storage Task Version + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusTaskVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).RunStatusTaskVersion; } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartFrom { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).StartFrom; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).StartFrom = value ?? default(global::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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).StartOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).StartOn = value ?? default(global::System.DateTime); } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TargetExcludePrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).TargetExcludePrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).TargetExcludePrefix = value ?? null /* arrayOf */; } + + /// Required list of object prefixes to be included for task execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TargetPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).TargetPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).TargetPrefix = value ?? null /* arrayOf */; } + + /// Id of the corresponding storage task + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string TaskId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).TaskId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).TaskId = value ; } + + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string TriggerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).TriggerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)Property).TriggerType = value ; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public StorageTaskAssignment() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The storage task assignment. + public partial interface IStorageTaskAssignment : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResource + { + /// Text that describes the purpose of the storage task assignment + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Text that describes the purpose of the storage task assignment", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Whether the storage task assignment is enabled or not + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether the storage task assignment is enabled or not", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool Enabled { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"endBy", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + int? Interval { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"intervalUnit", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// Represents the provisioning state of the storage task assignment. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the provisioning state of the storage task assignment.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded", "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Deleting", "Canceled", "Failed")] + string ProvisioningState { get; } + /// The container prefix for the location of storage task assignment report + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The container prefix for the location of storage task assignment report", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + string ReportPrefix { get; set; } + /// Represents the status of the execution. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the status of the execution.", + SerializedName = @"runStatusEnum", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("InProgress", "Finished")] + string RunStatusEnum { get; } + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Well known Azure Storage error code that represents the error encountered during execution of the run instance.", + SerializedName = @"runStatusError", + PossibleTypes = new [] { typeof(string) })] + string RunStatusError { get; } + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"finishTime", + PossibleTypes = new [] { typeof(string) })] + string RunStatusFinishTime { get; } + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectFailedCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectFailedCount { get; } + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsOperatedOnCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectsOperatedOnCount { get; } + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsSucceededCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectsSucceededCount { get; } + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsTargetedCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectsTargetedCount { get; } + /// Represents the overall result of the execution for the run instance + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the overall result of the execution for the run instance", + SerializedName = @"runResult", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Succeeded", "Failed")] + string RunStatusRunResult { get; } + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(string) })] + string RunStatusStartTime { get; } + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the Storage Account Id where the storage task definition was applied and executed.", + SerializedName = @"storageAccountId", + PossibleTypes = new [] { typeof(string) })] + string RunStatusStorageAccountId { get; } + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Full path to the verbose report stored in the reporting container as specified in the assignment execution context for the storage account. ", + SerializedName = @"summaryReportPath", + PossibleTypes = new [] { typeof(string) })] + string RunStatusSummaryReportPath { get; } + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the Storage Task Assignment Id associated with the storage task that provided an execution context.", + SerializedName = @"taskAssignmentId", + PossibleTypes = new [] { typeof(string) })] + string RunStatusTaskAssignmentId { get; } + /// Storage Task Arm Id. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Storage Task Arm Id.", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + string RunStatusTaskId { get; } + /// Storage Task Version + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Storage Task Version", + SerializedName = @"taskVersion", + PossibleTypes = new [] { typeof(string) })] + string RunStatusTaskVersion { get; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startFrom", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startOn", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartOn { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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", + SerializedName = @"excludePrefix", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List TargetExcludePrefix { get; set; } + /// Required list of object prefixes to be included for task execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Required list of object prefixes to be included for task execution", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List TargetPrefix { get; set; } + /// Id of the corresponding storage task + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Id of the corresponding storage task", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + string TaskId { get; set; } + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The trigger type of the storage task assignment execution", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string TriggerType { get; set; } + + } + /// The storage task assignment. + internal partial interface IStorageTaskAssignmentInternal : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal + { + /// Text that describes the purpose of the storage task assignment + string Description { get; set; } + /// Whether the storage task assignment is enabled or not + bool Enabled { get; set; } + /// + /// 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' + /// + global::System.DateTime? EndBy { get; set; } + /// The storage task assignment execution context + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext ExecutionContext { get; set; } + /// Execution target of the storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget ExecutionContextTarget { get; set; } + /// Execution trigger of the storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger ExecutionContextTrigger { get; set; } + /// + /// 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' + /// + int? Interval { get; set; } + /// + /// 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' + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// Properties of the storage task assignment. + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentProperties Property { get; set; } + /// Represents the provisioning state of the storage task assignment. + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded", "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Deleting", "Canceled", "Failed")] + string ProvisioningState { get; set; } + /// The storage task assignment report + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport Report { get; set; } + /// The container prefix for the location of storage task assignment report + string ReportPrefix { get; set; } + /// Run status of storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties RunStatus { get; set; } + /// Represents the status of the execution. + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("InProgress", "Finished")] + string RunStatusEnum { get; set; } + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + string RunStatusError { get; set; } + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusFinishTime { get; set; } + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectFailedCount { get; set; } + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectsOperatedOnCount { get; set; } + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectsSucceededCount { get; set; } + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectsTargetedCount { get; set; } + /// Represents the overall result of the execution for the run instance + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Succeeded", "Failed")] + string RunStatusRunResult { get; set; } + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusStartTime { get; set; } + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + string RunStatusStorageAccountId { get; set; } + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + string RunStatusSummaryReportPath { get; set; } + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + string RunStatusTaskAssignmentId { get; set; } + /// Storage Task Arm Id. + string RunStatusTaskId { get; set; } + /// Storage Task Version + string RunStatusTaskVersion { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartOn { get; set; } + /// + /// 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 + /// + System.Collections.Generic.List TargetExcludePrefix { get; set; } + /// Required list of object prefixes to be included for task execution + System.Collections.Generic.List TargetPrefix { get; set; } + /// Id of the corresponding storage task + string TaskId { get; set; } + /// The trigger parameters of the storage task assignment execution + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters TriggerParameter { get; set; } + /// The trigger type of the storage task assignment execution + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string TriggerType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.json.cs new file mode 100644 index 000000000000..8aee635a9e27 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignment.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// The storage task assignment. + public partial class StorageTaskAssignment + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new StorageTaskAssignment(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal StorageTaskAssignment(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.PowerShell.cs new file mode 100644 index 000000000000..db50068c3491 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.PowerShell.cs @@ -0,0 +1,247 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// Execution context of the storage task assignment. + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentExecutionContextTypeConverter))] + public partial class StorageTaskAssignmentExecutionContext + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageTaskAssignmentExecutionContext(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageTaskAssignmentExecutionContext(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageTaskAssignmentExecutionContext(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).Target = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).Target, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTargetTypeConverter.ConvertFrom); + } + if (content.Contains("Trigger")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).Trigger = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger) content.GetValueForProperty("Trigger",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).Trigger, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTriggerTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TriggerParameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters) content.GetValueForProperty("TriggerParameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TriggerParameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TriggerType = (string) content.GetValueForProperty("TriggerType",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TriggerType, global::System.Convert.ToString); + } + if (content.Contains("TargetPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TargetPrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TargetPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TargetExcludePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TargetExcludePrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetExcludePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TargetExcludePrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StorageTaskAssignmentExecutionContext(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).Target = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).Target, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTargetTypeConverter.ConvertFrom); + } + if (content.Contains("Trigger")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).Trigger = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger) content.GetValueForProperty("Trigger",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).Trigger, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTriggerTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TriggerParameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters) content.GetValueForProperty("TriggerParameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TriggerParameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TriggerType = (string) content.GetValueForProperty("TriggerType",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TriggerType, global::System.Convert.ToString); + } + if (content.Contains("TargetPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TargetPrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TargetPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TargetExcludePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TargetExcludePrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetExcludePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).TargetExcludePrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Execution context of the storage task assignment. + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentExecutionContextTypeConverter))] + public partial interface IStorageTaskAssignmentExecutionContext + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.TypeConverter.cs new file mode 100644 index 000000000000..1705d9d68d3f --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StorageTaskAssignmentExecutionContextTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StorageTaskAssignmentExecutionContext.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StorageTaskAssignmentExecutionContext.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StorageTaskAssignmentExecutionContext.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.cs new file mode 100644 index 000000000000..03b49617de11 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.cs @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Execution context of the storage task assignment. + public partial class StorageTaskAssignmentExecutionContext : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal + { + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? EndBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)Trigger).EndBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)Trigger).EndBy = value ?? default(global::System.DateTime); } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public int? Interval { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)Trigger).Interval; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)Trigger).Interval = value ?? default(int); } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string IntervalUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)Trigger).IntervalUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)Trigger).IntervalUnit = value ?? null; } + + /// Internal Acessors for Target + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal.Target { get => (this._target = this._target ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTarget()); set { {_target = value;} } } + + /// Internal Acessors for Trigger + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal.Trigger { get => (this._trigger = this._trigger ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTrigger()); set { {_trigger = value;} } } + + /// Internal Acessors for TriggerParameter + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal.TriggerParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)Trigger).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)Trigger).Parameter = value; } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartFrom { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)Trigger).StartFrom; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)Trigger).StartFrom = value ?? default(global::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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)Trigger).StartOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)Trigger).StartOn = value ?? default(global::System.DateTime); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget _target; + + /// Execution target of the storage task assignment + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget Target { get => (this._target = this._target ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTarget()); set => this._target = value; } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TargetExcludePrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)Target).ExcludePrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)Target).ExcludePrefix = value ?? null /* arrayOf */; } + + /// Required list of object prefixes to be included for task execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TargetPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)Target).Prefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)Target).Prefix = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger _trigger; + + /// Execution trigger of the storage task assignment + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger Trigger { get => (this._trigger = this._trigger ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTrigger()); set => this._trigger = value; } + + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string TriggerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)Trigger).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerInternal)Trigger).Type = value ; } + + /// Creates an new instance. + public StorageTaskAssignmentExecutionContext() + { + + } + } + /// Execution context of the storage task assignment. + public partial interface IStorageTaskAssignmentExecutionContext : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable + { + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"endBy", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + int? Interval { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"intervalUnit", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startFrom", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startOn", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartOn { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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", + SerializedName = @"excludePrefix", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List TargetExcludePrefix { get; set; } + /// Required list of object prefixes to be included for task execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Required list of object prefixes to be included for task execution", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List TargetPrefix { get; set; } + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The trigger type of the storage task assignment execution", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string TriggerType { get; set; } + + } + /// Execution context of the storage task assignment. + internal partial interface IStorageTaskAssignmentExecutionContextInternal + + { + /// + /// 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' + /// + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + int? Interval { get; set; } + /// + /// 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' + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartOn { get; set; } + /// Execution target of the storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget Target { get; set; } + /// + /// 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 + /// + System.Collections.Generic.List TargetExcludePrefix { get; set; } + /// Required list of object prefixes to be included for task execution + System.Collections.Generic.List TargetPrefix { get; set; } + /// Execution trigger of the storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger Trigger { get; set; } + /// The trigger parameters of the storage task assignment execution + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters TriggerParameter { get; set; } + /// The trigger type of the storage task assignment execution + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string TriggerType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.json.cs new file mode 100644 index 000000000000..598e9e7adb33 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentExecutionContext.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Execution context of the storage task assignment. + public partial class StorageTaskAssignmentExecutionContext + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new StorageTaskAssignmentExecutionContext(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal StorageTaskAssignmentExecutionContext(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTarget.FromJson(__jsonTarget) : _target;} + {_trigger = If( json?.PropertyT("trigger"), out var __jsonTrigger) ? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTrigger.FromJson(__jsonTrigger) : _trigger;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._target ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) this._target.ToJson(null,serializationMode) : null, "target" ,container.Add ); + AddIf( null != this._trigger ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) this._trigger.ToJson(null,serializationMode) : null, "trigger" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.PowerShell.cs new file mode 100644 index 000000000000..12c3c813a0b5 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.PowerShell.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// Properties of the storage task assignment. + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentPropertiesTypeConverter))] + public partial class StorageTaskAssignmentProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageTaskAssignmentProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageTaskAssignmentProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageTaskAssignmentProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ExecutionContext")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ExecutionContext = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext) content.GetValueForProperty("ExecutionContext",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ExecutionContext, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentExecutionContextTypeConverter.ConvertFrom); + } + if (content.Contains("Report")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Report = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport) content.GetValueForProperty("Report",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Report, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentReportTypeConverter.ConvertFrom); + } + if (content.Contains("RunStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatus = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties) content.GetValueForProperty("RunStatus",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatus, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("TaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TaskId = (string) content.GetValueForProperty("TaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TaskId, global::System.Convert.ToString); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("RunStatusRunResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusRunResult = (string) content.GetValueForProperty("RunStatusRunResult",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusRunResult, global::System.Convert.ToString); + } + if (content.Contains("ExecutionContextTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ExecutionContextTarget = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget) content.GetValueForProperty("ExecutionContextTarget",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ExecutionContextTarget, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTargetTypeConverter.ConvertFrom); + } + if (content.Contains("ExecutionContextTrigger")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ExecutionContextTrigger = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger) content.GetValueForProperty("ExecutionContextTrigger",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ExecutionContextTrigger, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTriggerTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TriggerParameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters) content.GetValueForProperty("TriggerParameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TriggerParameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TriggerType = (string) content.GetValueForProperty("TriggerType",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TriggerType, global::System.Convert.ToString); + } + if (content.Contains("ReportPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ReportPrefix = (string) content.GetValueForProperty("ReportPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ReportPrefix, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskAssignmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusTaskAssignmentId = (string) content.GetValueForProperty("RunStatusTaskAssignmentId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusTaskAssignmentId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusStorageAccountId = (string) content.GetValueForProperty("RunStatusStorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusStorageAccountId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusStartTime = (string) content.GetValueForProperty("RunStatusStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusStartTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusFinishTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusFinishTime = (string) content.GetValueForProperty("RunStatusFinishTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusFinishTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsTargetedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectsTargetedCount = (string) content.GetValueForProperty("RunStatusObjectsTargetedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectsTargetedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsOperatedOnCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectsOperatedOnCount = (string) content.GetValueForProperty("RunStatusObjectsOperatedOnCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectsOperatedOnCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectFailedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectFailedCount = (string) content.GetValueForProperty("RunStatusObjectFailedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectFailedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsSucceededCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectsSucceededCount = (string) content.GetValueForProperty("RunStatusObjectsSucceededCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectsSucceededCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusError = (string) content.GetValueForProperty("RunStatusError",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusError, global::System.Convert.ToString); + } + if (content.Contains("RunStatusEnum")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusEnum = (string) content.GetValueForProperty("RunStatusEnum",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusEnum, global::System.Convert.ToString); + } + if (content.Contains("RunStatusSummaryReportPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusSummaryReportPath = (string) content.GetValueForProperty("RunStatusSummaryReportPath",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusSummaryReportPath, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusTaskId = (string) content.GetValueForProperty("RunStatusTaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusTaskId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusTaskVersion = (string) content.GetValueForProperty("RunStatusTaskVersion",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusTaskVersion, global::System.Convert.ToString); + } + if (content.Contains("TargetPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TargetPrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TargetPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TargetExcludePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TargetExcludePrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetExcludePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TargetExcludePrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StorageTaskAssignmentProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ExecutionContext")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ExecutionContext = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext) content.GetValueForProperty("ExecutionContext",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ExecutionContext, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentExecutionContextTypeConverter.ConvertFrom); + } + if (content.Contains("Report")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Report = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport) content.GetValueForProperty("Report",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Report, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentReportTypeConverter.ConvertFrom); + } + if (content.Contains("RunStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatus = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties) content.GetValueForProperty("RunStatus",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatus, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("TaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TaskId = (string) content.GetValueForProperty("TaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TaskId, global::System.Convert.ToString); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("RunStatusRunResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusRunResult = (string) content.GetValueForProperty("RunStatusRunResult",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusRunResult, global::System.Convert.ToString); + } + if (content.Contains("ExecutionContextTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ExecutionContextTarget = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget) content.GetValueForProperty("ExecutionContextTarget",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ExecutionContextTarget, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTargetTypeConverter.ConvertFrom); + } + if (content.Contains("ExecutionContextTrigger")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ExecutionContextTrigger = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger) content.GetValueForProperty("ExecutionContextTrigger",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ExecutionContextTrigger, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTriggerTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TriggerParameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters) content.GetValueForProperty("TriggerParameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TriggerParameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TriggerType = (string) content.GetValueForProperty("TriggerType",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TriggerType, global::System.Convert.ToString); + } + if (content.Contains("ReportPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ReportPrefix = (string) content.GetValueForProperty("ReportPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).ReportPrefix, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskAssignmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusTaskAssignmentId = (string) content.GetValueForProperty("RunStatusTaskAssignmentId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusTaskAssignmentId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusStorageAccountId = (string) content.GetValueForProperty("RunStatusStorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusStorageAccountId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusStartTime = (string) content.GetValueForProperty("RunStatusStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusStartTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusFinishTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusFinishTime = (string) content.GetValueForProperty("RunStatusFinishTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusFinishTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsTargetedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectsTargetedCount = (string) content.GetValueForProperty("RunStatusObjectsTargetedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectsTargetedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsOperatedOnCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectsOperatedOnCount = (string) content.GetValueForProperty("RunStatusObjectsOperatedOnCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectsOperatedOnCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectFailedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectFailedCount = (string) content.GetValueForProperty("RunStatusObjectFailedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectFailedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsSucceededCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectsSucceededCount = (string) content.GetValueForProperty("RunStatusObjectsSucceededCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusObjectsSucceededCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusError = (string) content.GetValueForProperty("RunStatusError",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusError, global::System.Convert.ToString); + } + if (content.Contains("RunStatusEnum")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusEnum = (string) content.GetValueForProperty("RunStatusEnum",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusEnum, global::System.Convert.ToString); + } + if (content.Contains("RunStatusSummaryReportPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusSummaryReportPath = (string) content.GetValueForProperty("RunStatusSummaryReportPath",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusSummaryReportPath, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusTaskId = (string) content.GetValueForProperty("RunStatusTaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusTaskId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusTaskVersion = (string) content.GetValueForProperty("RunStatusTaskVersion",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).RunStatusTaskVersion, global::System.Convert.ToString); + } + if (content.Contains("TargetPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TargetPrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TargetPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TargetExcludePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TargetExcludePrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetExcludePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).TargetExcludePrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties of the storage task assignment. + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentPropertiesTypeConverter))] + public partial interface IStorageTaskAssignmentProperties + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.TypeConverter.cs new file mode 100644 index 000000000000..12ff49144f17 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StorageTaskAssignmentPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StorageTaskAssignmentProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StorageTaskAssignmentProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StorageTaskAssignmentProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.cs new file mode 100644 index 000000000000..460cf5d8e99a --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.cs @@ -0,0 +1,749 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Properties of the storage task assignment. + public partial class StorageTaskAssignmentProperties : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentProperties, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal + { + + /// Backing field for property. + private string _description; + + /// Text that describes the purpose of the storage task assignment + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private bool _enabled; + + /// Whether the storage task assignment is enabled or not + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public bool Enabled { get => this._enabled; set => this._enabled = value; } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? EndBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).EndBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).EndBy = value ?? default(global::System.DateTime); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext _executionContext; + + /// The storage task assignment execution context + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext ExecutionContext { get => (this._executionContext = this._executionContext ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentExecutionContext()); set => this._executionContext = value; } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public int? Interval { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).Interval; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).Interval = value ?? default(int); } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string IntervalUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).IntervalUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).IntervalUnit = value ?? null; } + + /// Internal Acessors for ExecutionContext + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.ExecutionContext { get => (this._executionContext = this._executionContext ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentExecutionContext()); set { {_executionContext = value;} } } + + /// Internal Acessors for ExecutionContextTarget + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.ExecutionContextTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).Target = value; } + + /// Internal Acessors for ExecutionContextTrigger + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.ExecutionContextTrigger { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).Trigger; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).Trigger = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for Report + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.Report { get => (this._report = this._report ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentReport()); set { {_report = value;} } } + + /// Internal Acessors for RunStatus + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.RunStatus { get => (this._runStatus = this._runStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportProperties()); set { {_runStatus = value;} } } + + /// Internal Acessors for RunStatusEnum + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.RunStatusEnum { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunStatusEnum; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunStatusEnum = value; } + + /// Internal Acessors for RunStatusError + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.RunStatusError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunStatusError; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunStatusError = value; } + + /// Internal Acessors for RunStatusFinishTime + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.RunStatusFinishTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).FinishTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).FinishTime = value; } + + /// Internal Acessors for RunStatusObjectFailedCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.RunStatusObjectFailedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectFailedCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectFailedCount = value; } + + /// Internal Acessors for RunStatusObjectsOperatedOnCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.RunStatusObjectsOperatedOnCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsOperatedOnCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsOperatedOnCount = value; } + + /// Internal Acessors for RunStatusObjectsSucceededCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.RunStatusObjectsSucceededCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsSucceededCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsSucceededCount = value; } + + /// Internal Acessors for RunStatusObjectsTargetedCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.RunStatusObjectsTargetedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsTargetedCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsTargetedCount = value; } + + /// Internal Acessors for RunStatusRunResult + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.RunStatusRunResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunResult = value; } + + /// Internal Acessors for RunStatusStartTime + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.RunStatusStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).StartTime = value; } + + /// Internal Acessors for RunStatusStorageAccountId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.RunStatusStorageAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).StorageAccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).StorageAccountId = value; } + + /// Internal Acessors for RunStatusSummaryReportPath + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.RunStatusSummaryReportPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).SummaryReportPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).SummaryReportPath = value; } + + /// Internal Acessors for RunStatusTaskAssignmentId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.RunStatusTaskAssignmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskAssignmentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskAssignmentId = value; } + + /// Internal Acessors for RunStatusTaskId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.RunStatusTaskId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskId = value; } + + /// Internal Acessors for RunStatusTaskVersion + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.RunStatusTaskVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskVersion = value; } + + /// Internal Acessors for TriggerParameter + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentPropertiesInternal.TriggerParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).TriggerParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).TriggerParameter = value; } + + /// Backing field for property. + private string _provisioningState; + + /// Represents the provisioning state of the storage task assignment. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport _report; + + /// The storage task assignment report + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport Report { get => (this._report = this._report ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentReport()); set => this._report = value; } + + /// The container prefix for the location of storage task assignment report + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string ReportPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReportInternal)Report).Prefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReportInternal)Report).Prefix = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties _runStatus; + + /// Run status of storage task assignment + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties RunStatus { get => (this._runStatus = this._runStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportProperties()); set => this._runStatus = value; } + + /// Represents the status of the execution. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusEnum { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunStatusEnum; } + + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunStatusError; } + + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusFinishTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).FinishTime; } + + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectFailedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectFailedCount; } + + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectsOperatedOnCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsOperatedOnCount; } + + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectsSucceededCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsSucceededCount; } + + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectsTargetedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsTargetedCount; } + + /// Represents the overall result of the execution for the run instance + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusRunResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunResult; } + + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).StartTime; } + + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusStorageAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).StorageAccountId; } + + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusSummaryReportPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).SummaryReportPath; } + + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusTaskAssignmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskAssignmentId; } + + /// Storage Task Arm Id. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusTaskId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskId; } + + /// Storage Task Version + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusTaskVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskVersion; } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartFrom { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).StartFrom; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).StartFrom = value ?? default(global::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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).StartOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).StartOn = value ?? default(global::System.DateTime); } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TargetExcludePrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).TargetExcludePrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).TargetExcludePrefix = value ?? null /* arrayOf */; } + + /// Required list of object prefixes to be included for task execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TargetPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).TargetPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).TargetPrefix = value ?? null /* arrayOf */; } + + /// Backing field for property. + private string _taskId; + + /// Id of the corresponding storage task + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string TaskId { get => this._taskId; set => this._taskId = value; } + + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string TriggerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).TriggerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContextInternal)ExecutionContext).TriggerType = value ; } + + /// Creates an new instance. + public StorageTaskAssignmentProperties() + { + + } + } + /// Properties of the storage task assignment. + public partial interface IStorageTaskAssignmentProperties : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable + { + /// Text that describes the purpose of the storage task assignment + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Text that describes the purpose of the storage task assignment", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Whether the storage task assignment is enabled or not + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether the storage task assignment is enabled or not", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool Enabled { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"endBy", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + int? Interval { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"intervalUnit", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// Represents the provisioning state of the storage task assignment. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the provisioning state of the storage task assignment.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded", "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Deleting", "Canceled", "Failed")] + string ProvisioningState { get; } + /// The container prefix for the location of storage task assignment report + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The container prefix for the location of storage task assignment report", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + string ReportPrefix { get; set; } + /// Represents the status of the execution. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the status of the execution.", + SerializedName = @"runStatusEnum", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("InProgress", "Finished")] + string RunStatusEnum { get; } + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Well known Azure Storage error code that represents the error encountered during execution of the run instance.", + SerializedName = @"runStatusError", + PossibleTypes = new [] { typeof(string) })] + string RunStatusError { get; } + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"finishTime", + PossibleTypes = new [] { typeof(string) })] + string RunStatusFinishTime { get; } + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectFailedCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectFailedCount { get; } + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsOperatedOnCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectsOperatedOnCount { get; } + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsSucceededCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectsSucceededCount { get; } + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsTargetedCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectsTargetedCount { get; } + /// Represents the overall result of the execution for the run instance + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the overall result of the execution for the run instance", + SerializedName = @"runResult", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Succeeded", "Failed")] + string RunStatusRunResult { get; } + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(string) })] + string RunStatusStartTime { get; } + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the Storage Account Id where the storage task definition was applied and executed.", + SerializedName = @"storageAccountId", + PossibleTypes = new [] { typeof(string) })] + string RunStatusStorageAccountId { get; } + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Full path to the verbose report stored in the reporting container as specified in the assignment execution context for the storage account. ", + SerializedName = @"summaryReportPath", + PossibleTypes = new [] { typeof(string) })] + string RunStatusSummaryReportPath { get; } + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the Storage Task Assignment Id associated with the storage task that provided an execution context.", + SerializedName = @"taskAssignmentId", + PossibleTypes = new [] { typeof(string) })] + string RunStatusTaskAssignmentId { get; } + /// Storage Task Arm Id. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Storage Task Arm Id.", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + string RunStatusTaskId { get; } + /// Storage Task Version + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Storage Task Version", + SerializedName = @"taskVersion", + PossibleTypes = new [] { typeof(string) })] + string RunStatusTaskVersion { get; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startFrom", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startOn", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartOn { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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", + SerializedName = @"excludePrefix", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List TargetExcludePrefix { get; set; } + /// Required list of object prefixes to be included for task execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Required list of object prefixes to be included for task execution", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List TargetPrefix { get; set; } + /// Id of the corresponding storage task + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Id of the corresponding storage task", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + string TaskId { get; set; } + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The trigger type of the storage task assignment execution", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string TriggerType { get; set; } + + } + /// Properties of the storage task assignment. + internal partial interface IStorageTaskAssignmentPropertiesInternal + + { + /// Text that describes the purpose of the storage task assignment + string Description { get; set; } + /// Whether the storage task assignment is enabled or not + bool Enabled { get; set; } + /// + /// 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' + /// + global::System.DateTime? EndBy { get; set; } + /// The storage task assignment execution context + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentExecutionContext ExecutionContext { get; set; } + /// Execution target of the storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget ExecutionContextTarget { get; set; } + /// Execution trigger of the storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTrigger ExecutionContextTrigger { get; set; } + /// + /// 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' + /// + int? Interval { get; set; } + /// + /// 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' + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// Represents the provisioning state of the storage task assignment. + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded", "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Deleting", "Canceled", "Failed")] + string ProvisioningState { get; set; } + /// The storage task assignment report + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport Report { get; set; } + /// The container prefix for the location of storage task assignment report + string ReportPrefix { get; set; } + /// Run status of storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties RunStatus { get; set; } + /// Represents the status of the execution. + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("InProgress", "Finished")] + string RunStatusEnum { get; set; } + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + string RunStatusError { get; set; } + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusFinishTime { get; set; } + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectFailedCount { get; set; } + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectsOperatedOnCount { get; set; } + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectsSucceededCount { get; set; } + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectsTargetedCount { get; set; } + /// Represents the overall result of the execution for the run instance + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Succeeded", "Failed")] + string RunStatusRunResult { get; set; } + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusStartTime { get; set; } + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + string RunStatusStorageAccountId { get; set; } + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + string RunStatusSummaryReportPath { get; set; } + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + string RunStatusTaskAssignmentId { get; set; } + /// Storage Task Arm Id. + string RunStatusTaskId { get; set; } + /// Storage Task Version + string RunStatusTaskVersion { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartOn { get; set; } + /// + /// 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 + /// + System.Collections.Generic.List TargetExcludePrefix { get; set; } + /// Required list of object prefixes to be included for task execution + System.Collections.Generic.List TargetPrefix { get; set; } + /// Id of the corresponding storage task + string TaskId { get; set; } + /// The trigger parameters of the storage task assignment execution + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters TriggerParameter { get; set; } + /// The trigger type of the storage task assignment execution + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string TriggerType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.json.cs new file mode 100644 index 000000000000..54ea07c93d8c --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentProperties.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Properties of the storage task assignment. + public partial class StorageTaskAssignmentProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new StorageTaskAssignmentProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal StorageTaskAssignmentProperties(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_executionContext = If( json?.PropertyT("executionContext"), out var __jsonExecutionContext) ? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentExecutionContext.FromJson(__jsonExecutionContext) : _executionContext;} + {_report = If( json?.PropertyT("report"), out var __jsonReport) ? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentReport.FromJson(__jsonReport) : _report;} + {_runStatus = If( json?.PropertyT("runStatus"), out var __jsonRunStatus) ? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportProperties.FromJson(__jsonRunStatus) : _runStatus;} + {_taskId = If( json?.PropertyT("taskId"), out var __jsonTaskId) ? (string)__jsonTaskId : (string)_taskId;} + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool)__jsonEnabled : _enabled;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._executionContext ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) this._executionContext.ToJson(null,serializationMode) : null, "executionContext" ,container.Add ); + AddIf( null != this._report ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) this._report.ToJson(null,serializationMode) : null, "report" ,container.Add ); + AddIf( null != this._runStatus ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) this._runStatus.ToJson(null,serializationMode) : null, "runStatus" ,container.Add ); + AddIf( null != (((object)this._taskId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._taskId.ToString()) : null, "taskId" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean(this._enabled), "enabled" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.PowerShell.cs new file mode 100644 index 000000000000..9f9902d965a0 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// The storage task assignment report + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentReportTypeConverter))] + public partial class StorageTaskAssignmentReport + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageTaskAssignmentReport(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageTaskAssignmentReport(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageTaskAssignmentReport(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Prefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReportInternal)this).Prefix = (string) content.GetValueForProperty("Prefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReportInternal)this).Prefix, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StorageTaskAssignmentReport(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Prefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReportInternal)this).Prefix = (string) content.GetValueForProperty("Prefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReportInternal)this).Prefix, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The storage task assignment report + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentReportTypeConverter))] + public partial interface IStorageTaskAssignmentReport + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.TypeConverter.cs new file mode 100644 index 000000000000..50ab5724fa80 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StorageTaskAssignmentReportTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StorageTaskAssignmentReport.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StorageTaskAssignmentReport.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StorageTaskAssignmentReport.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.cs new file mode 100644 index 000000000000..d404ea35915d --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// The storage task assignment report + public partial class StorageTaskAssignmentReport : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReportInternal + { + + /// Backing field for property. + private string _prefix; + + /// The container prefix for the location of storage task assignment report + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string Prefix { get => this._prefix; set => this._prefix = value; } + + /// Creates an new instance. + public StorageTaskAssignmentReport() + { + + } + } + /// The storage task assignment report + public partial interface IStorageTaskAssignmentReport : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable + { + /// The container prefix for the location of storage task assignment report + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The container prefix for the location of storage task assignment report", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + string Prefix { get; set; } + + } + /// The storage task assignment report + internal partial interface IStorageTaskAssignmentReportInternal + + { + /// The container prefix for the location of storage task assignment report + string Prefix { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.json.cs new file mode 100644 index 000000000000..05f3b494e3b6 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentReport.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// The storage task assignment report + public partial class StorageTaskAssignmentReport + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentReport FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new StorageTaskAssignmentReport(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal StorageTaskAssignmentReport(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_prefix = If( json?.PropertyT("prefix"), out var __jsonPrefix) ? (string)__jsonPrefix : (string)_prefix;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._prefix)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._prefix.ToString()) : null, "prefix" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.PowerShell.cs new file mode 100644 index 000000000000..0560410df868 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.PowerShell.cs @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// Execution context of the storage task assignment update. + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentUpdateExecutionContextTypeConverter))] + public partial class StorageTaskAssignmentUpdateExecutionContext + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageTaskAssignmentUpdateExecutionContext(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageTaskAssignmentUpdateExecutionContext(content); + } + + /// + /// Creates a new instance of , deserializing the content from a + /// json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageTaskAssignmentUpdateExecutionContext(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).Target = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).Target, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTargetTypeConverter.ConvertFrom); + } + if (content.Contains("Trigger")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).Trigger = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate) content.GetValueForProperty("Trigger",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).Trigger, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTriggerUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TriggerType = (string) content.GetValueForProperty("TriggerType",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TriggerType, global::System.Convert.ToString); + } + if (content.Contains("TargetPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TargetPrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TargetPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TargetExcludePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TargetExcludePrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetExcludePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TargetExcludePrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TriggerParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TriggerParameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate) content.GetValueForProperty("TriggerParameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TriggerParameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StorageTaskAssignmentUpdateExecutionContext(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).Target = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).Target, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTargetTypeConverter.ConvertFrom); + } + if (content.Contains("Trigger")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).Trigger = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate) content.GetValueForProperty("Trigger",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).Trigger, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTriggerUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TriggerType = (string) content.GetValueForProperty("TriggerType",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TriggerType, global::System.Convert.ToString); + } + if (content.Contains("TargetPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TargetPrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TargetPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TargetExcludePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TargetExcludePrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetExcludePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TargetExcludePrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TriggerParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TriggerParameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate) content.GetValueForProperty("TriggerParameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).TriggerParameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Execution context of the storage task assignment update. + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentUpdateExecutionContextTypeConverter))] + public partial interface IStorageTaskAssignmentUpdateExecutionContext + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.TypeConverter.cs new file mode 100644 index 000000000000..455453f68d2e --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StorageTaskAssignmentUpdateExecutionContextTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StorageTaskAssignmentUpdateExecutionContext.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StorageTaskAssignmentUpdateExecutionContext.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StorageTaskAssignmentUpdateExecutionContext.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.cs new file mode 100644 index 000000000000..0afae42b517f --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.cs @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Execution context of the storage task assignment update. + public partial class StorageTaskAssignmentUpdateExecutionContext : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal + { + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? EndBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)Trigger).EndBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)Trigger).EndBy = value ?? default(global::System.DateTime); } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public int? Interval { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)Trigger).Interval; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)Trigger).Interval = value ?? default(int); } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string IntervalUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)Trigger).IntervalUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)Trigger).IntervalUnit = value ?? null; } + + /// Internal Acessors for Target + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal.Target { get => (this._target = this._target ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTarget()); set { {_target = value;} } } + + /// Internal Acessors for Trigger + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal.Trigger { get => (this._trigger = this._trigger ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTriggerUpdate()); set { {_trigger = value;} } } + + /// Internal Acessors for TriggerParameter + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal.TriggerParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)Trigger).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)Trigger).Parameter = value; } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartFrom { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)Trigger).StartFrom; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)Trigger).StartFrom = value ?? default(global::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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)Trigger).StartOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)Trigger).StartOn = value ?? default(global::System.DateTime); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget _target; + + /// Execution target of the storage task assignment + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget Target { get => (this._target = this._target ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTarget()); set => this._target = value; } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TargetExcludePrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)Target).ExcludePrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)Target).ExcludePrefix = value ?? null /* arrayOf */; } + + /// Required list of object prefixes to be included for task execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TargetPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)Target).Prefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTargetInternal)Target).Prefix = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate _trigger; + + /// Execution trigger of the storage task assignment + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate Trigger { get => (this._trigger = this._trigger ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTriggerUpdate()); set => this._trigger = value; } + + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string TriggerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)Trigger).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdateInternal)Trigger).Type = value ?? null; } + + /// + /// Creates an new instance. + /// + public StorageTaskAssignmentUpdateExecutionContext() + { + + } + } + /// Execution context of the storage task assignment update. + public partial interface IStorageTaskAssignmentUpdateExecutionContext : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable + { + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"endBy", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + int? Interval { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"intervalUnit", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startFrom", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startOn", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartOn { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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", + SerializedName = @"excludePrefix", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List TargetExcludePrefix { get; set; } + /// Required list of object prefixes to be included for task execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Required list of object prefixes to be included for task execution", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List TargetPrefix { get; set; } + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The trigger type of the storage task assignment execution", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string TriggerType { get; set; } + + } + /// Execution context of the storage task assignment update. + internal partial interface IStorageTaskAssignmentUpdateExecutionContextInternal + + { + /// + /// 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' + /// + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + int? Interval { get; set; } + /// + /// 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' + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartOn { get; set; } + /// Execution target of the storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget Target { get; set; } + /// + /// 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 + /// + System.Collections.Generic.List TargetExcludePrefix { get; set; } + /// Required list of object prefixes to be included for task execution + System.Collections.Generic.List TargetPrefix { get; set; } + /// Execution trigger of the storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate Trigger { get; set; } + /// The trigger parameters of the storage task assignment execution + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate TriggerParameter { get; set; } + /// The trigger type of the storage task assignment execution + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string TriggerType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.json.cs new file mode 100644 index 000000000000..4a0b7c0652f8 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateExecutionContext.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Execution context of the storage task assignment update. + public partial class StorageTaskAssignmentUpdateExecutionContext + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new StorageTaskAssignmentUpdateExecutionContext(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal StorageTaskAssignmentUpdateExecutionContext(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTarget.FromJson(__jsonTarget) : _target;} + {_trigger = If( json?.PropertyT("trigger"), out var __jsonTrigger) ? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTriggerUpdate.FromJson(__jsonTrigger) : _trigger;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._target ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) this._target.ToJson(null,serializationMode) : null, "target" ,container.Add ); + AddIf( null != this._trigger ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) this._trigger.ToJson(null,serializationMode) : null, "trigger" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..ea7816ac7f0e --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.PowerShell.cs @@ -0,0 +1,431 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// Parameters of the storage task assignment update request + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentUpdateParametersTypeConverter))] + public partial class StorageTaskAssignmentUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageTaskAssignmentUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageTaskAssignmentUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageTaskAssignmentUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ExecutionContext")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ExecutionContext = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext) content.GetValueForProperty("ExecutionContext",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ExecutionContext, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateExecutionContextTypeConverter.ConvertFrom); + } + if (content.Contains("Report")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Report = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport) content.GetValueForProperty("Report",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Report, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateReportTypeConverter.ConvertFrom); + } + if (content.Contains("RunStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatus = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties) content.GetValueForProperty("RunStatus",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatus, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("TaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TaskId = (string) content.GetValueForProperty("TaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TaskId, global::System.Convert.ToString); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("RunStatusRunResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusRunResult = (string) content.GetValueForProperty("RunStatusRunResult",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusRunResult, global::System.Convert.ToString); + } + if (content.Contains("ExecutionContextTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ExecutionContextTarget = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget) content.GetValueForProperty("ExecutionContextTarget",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ExecutionContextTarget, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTargetTypeConverter.ConvertFrom); + } + if (content.Contains("ExecutionContextTrigger")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ExecutionContextTrigger = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate) content.GetValueForProperty("ExecutionContextTrigger",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ExecutionContextTrigger, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTriggerUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TriggerType = (string) content.GetValueForProperty("TriggerType",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TriggerType, global::System.Convert.ToString); + } + if (content.Contains("ReportPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ReportPrefix = (string) content.GetValueForProperty("ReportPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ReportPrefix, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskAssignmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusTaskAssignmentId = (string) content.GetValueForProperty("RunStatusTaskAssignmentId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusTaskAssignmentId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusStorageAccountId = (string) content.GetValueForProperty("RunStatusStorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusStorageAccountId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusStartTime = (string) content.GetValueForProperty("RunStatusStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusStartTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusFinishTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusFinishTime = (string) content.GetValueForProperty("RunStatusFinishTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusFinishTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsTargetedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectsTargetedCount = (string) content.GetValueForProperty("RunStatusObjectsTargetedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectsTargetedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsOperatedOnCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectsOperatedOnCount = (string) content.GetValueForProperty("RunStatusObjectsOperatedOnCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectsOperatedOnCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectFailedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectFailedCount = (string) content.GetValueForProperty("RunStatusObjectFailedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectFailedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsSucceededCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectsSucceededCount = (string) content.GetValueForProperty("RunStatusObjectsSucceededCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectsSucceededCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusError = (string) content.GetValueForProperty("RunStatusError",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusError, global::System.Convert.ToString); + } + if (content.Contains("RunStatusEnum")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusEnum = (string) content.GetValueForProperty("RunStatusEnum",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusEnum, global::System.Convert.ToString); + } + if (content.Contains("RunStatusSummaryReportPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusSummaryReportPath = (string) content.GetValueForProperty("RunStatusSummaryReportPath",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusSummaryReportPath, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusTaskId = (string) content.GetValueForProperty("RunStatusTaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusTaskId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusTaskVersion = (string) content.GetValueForProperty("RunStatusTaskVersion",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusTaskVersion, global::System.Convert.ToString); + } + if (content.Contains("TargetPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TargetPrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TargetPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TargetExcludePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TargetExcludePrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetExcludePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TargetExcludePrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TriggerParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TriggerParameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate) content.GetValueForProperty("TriggerParameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TriggerParameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StorageTaskAssignmentUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ExecutionContext")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ExecutionContext = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext) content.GetValueForProperty("ExecutionContext",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ExecutionContext, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateExecutionContextTypeConverter.ConvertFrom); + } + if (content.Contains("Report")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Report = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport) content.GetValueForProperty("Report",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Report, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateReportTypeConverter.ConvertFrom); + } + if (content.Contains("RunStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatus = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties) content.GetValueForProperty("RunStatus",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatus, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("TaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TaskId = (string) content.GetValueForProperty("TaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TaskId, global::System.Convert.ToString); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("RunStatusRunResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusRunResult = (string) content.GetValueForProperty("RunStatusRunResult",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusRunResult, global::System.Convert.ToString); + } + if (content.Contains("ExecutionContextTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ExecutionContextTarget = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget) content.GetValueForProperty("ExecutionContextTarget",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ExecutionContextTarget, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTargetTypeConverter.ConvertFrom); + } + if (content.Contains("ExecutionContextTrigger")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ExecutionContextTrigger = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate) content.GetValueForProperty("ExecutionContextTrigger",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ExecutionContextTrigger, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTriggerUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TriggerType = (string) content.GetValueForProperty("TriggerType",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TriggerType, global::System.Convert.ToString); + } + if (content.Contains("ReportPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ReportPrefix = (string) content.GetValueForProperty("ReportPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).ReportPrefix, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskAssignmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusTaskAssignmentId = (string) content.GetValueForProperty("RunStatusTaskAssignmentId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusTaskAssignmentId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusStorageAccountId = (string) content.GetValueForProperty("RunStatusStorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusStorageAccountId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusStartTime = (string) content.GetValueForProperty("RunStatusStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusStartTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusFinishTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusFinishTime = (string) content.GetValueForProperty("RunStatusFinishTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusFinishTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsTargetedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectsTargetedCount = (string) content.GetValueForProperty("RunStatusObjectsTargetedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectsTargetedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsOperatedOnCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectsOperatedOnCount = (string) content.GetValueForProperty("RunStatusObjectsOperatedOnCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectsOperatedOnCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectFailedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectFailedCount = (string) content.GetValueForProperty("RunStatusObjectFailedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectFailedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsSucceededCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectsSucceededCount = (string) content.GetValueForProperty("RunStatusObjectsSucceededCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusObjectsSucceededCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusError = (string) content.GetValueForProperty("RunStatusError",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusError, global::System.Convert.ToString); + } + if (content.Contains("RunStatusEnum")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusEnum = (string) content.GetValueForProperty("RunStatusEnum",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusEnum, global::System.Convert.ToString); + } + if (content.Contains("RunStatusSummaryReportPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusSummaryReportPath = (string) content.GetValueForProperty("RunStatusSummaryReportPath",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusSummaryReportPath, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusTaskId = (string) content.GetValueForProperty("RunStatusTaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusTaskId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusTaskVersion = (string) content.GetValueForProperty("RunStatusTaskVersion",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).RunStatusTaskVersion, global::System.Convert.ToString); + } + if (content.Contains("TargetPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TargetPrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TargetPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TargetExcludePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TargetExcludePrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetExcludePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TargetExcludePrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TriggerParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TriggerParameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate) content.GetValueForProperty("TriggerParameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).TriggerParameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Parameters of the storage task assignment update request + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentUpdateParametersTypeConverter))] + public partial interface IStorageTaskAssignmentUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.TypeConverter.cs new file mode 100644 index 000000000000..9decb74a9e00 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StorageTaskAssignmentUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StorageTaskAssignmentUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StorageTaskAssignmentUpdateParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StorageTaskAssignmentUpdateParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.cs new file mode 100644 index 000000000000..9f92b7b69683 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.cs @@ -0,0 +1,731 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Parameters of the storage task assignment update request + public partial class StorageTaskAssignmentUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal + { + + /// Text that describes the purpose of the storage task assignment + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).Description = value ?? null; } + + /// Whether the storage task assignment is enabled or not + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public bool? Enabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).Enabled = value ?? default(bool); } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? EndBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).EndBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).EndBy = value ?? default(global::System.DateTime); } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public int? Interval { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).Interval; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).Interval = value ?? default(int); } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string IntervalUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).IntervalUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).IntervalUnit = value ?? null; } + + /// Internal Acessors for ExecutionContext + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.ExecutionContext { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).ExecutionContext; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).ExecutionContext = value; } + + /// Internal Acessors for ExecutionContextTarget + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.ExecutionContextTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).ExecutionContextTarget; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).ExecutionContextTarget = value; } + + /// Internal Acessors for ExecutionContextTrigger + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.ExecutionContextTrigger { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).ExecutionContextTrigger; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).ExecutionContextTrigger = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Report + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.Report { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).Report; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).Report = value; } + + /// Internal Acessors for RunStatus + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.RunStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatus = value; } + + /// Internal Acessors for RunStatusEnum + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.RunStatusEnum { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusEnum; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusEnum = value; } + + /// Internal Acessors for RunStatusError + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.RunStatusError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusError; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusError = value; } + + /// Internal Acessors for RunStatusFinishTime + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.RunStatusFinishTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusFinishTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusFinishTime = value; } + + /// Internal Acessors for RunStatusObjectFailedCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.RunStatusObjectFailedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusObjectFailedCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusObjectFailedCount = value; } + + /// Internal Acessors for RunStatusObjectsOperatedOnCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.RunStatusObjectsOperatedOnCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusObjectsOperatedOnCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusObjectsOperatedOnCount = value; } + + /// Internal Acessors for RunStatusObjectsSucceededCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.RunStatusObjectsSucceededCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusObjectsSucceededCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusObjectsSucceededCount = value; } + + /// Internal Acessors for RunStatusObjectsTargetedCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.RunStatusObjectsTargetedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusObjectsTargetedCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusObjectsTargetedCount = value; } + + /// Internal Acessors for RunStatusRunResult + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.RunStatusRunResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusRunResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusRunResult = value; } + + /// Internal Acessors for RunStatusStartTime + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.RunStatusStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusStartTime = value; } + + /// Internal Acessors for RunStatusStorageAccountId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.RunStatusStorageAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusStorageAccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusStorageAccountId = value; } + + /// Internal Acessors for RunStatusSummaryReportPath + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.RunStatusSummaryReportPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusSummaryReportPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusSummaryReportPath = value; } + + /// Internal Acessors for RunStatusTaskAssignmentId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.RunStatusTaskAssignmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusTaskAssignmentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusTaskAssignmentId = value; } + + /// Internal Acessors for RunStatusTaskId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.RunStatusTaskId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusTaskId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusTaskId = value; } + + /// Internal Acessors for RunStatusTaskVersion + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.RunStatusTaskVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusTaskVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusTaskVersion = value; } + + /// Internal Acessors for TaskId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.TaskId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).TaskId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).TaskId = value; } + + /// Internal Acessors for TriggerParameter + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParametersInternal.TriggerParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).TriggerParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).TriggerParameter = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateProperties _property; + + /// Properties of the storage task assignment. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateProperties()); set => this._property = value; } + + /// Represents the provisioning state of the storage task assignment. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).ProvisioningState; } + + /// The prefix of the storage task assignment report + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string ReportPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).ReportPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).ReportPrefix = value ?? null; } + + /// Represents the status of the execution. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusEnum { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusEnum; } + + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusError; } + + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusFinishTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusFinishTime; } + + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectFailedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusObjectFailedCount; } + + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectsOperatedOnCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusObjectsOperatedOnCount; } + + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectsSucceededCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusObjectsSucceededCount; } + + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectsTargetedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusObjectsTargetedCount; } + + /// Represents the overall result of the execution for the run instance + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusRunResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusRunResult; } + + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusStartTime; } + + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusStorageAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusStorageAccountId; } + + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusSummaryReportPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusSummaryReportPath; } + + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusTaskAssignmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusTaskAssignmentId; } + + /// Storage Task Arm Id. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusTaskId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusTaskId; } + + /// Storage Task Version + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusTaskVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).RunStatusTaskVersion; } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartFrom { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).StartFrom; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).StartFrom = value ?? default(global::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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).StartOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).StartOn = value ?? default(global::System.DateTime); } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TargetExcludePrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).TargetExcludePrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).TargetExcludePrefix = value ?? null /* arrayOf */; } + + /// Required list of object prefixes to be included for task execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TargetPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).TargetPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).TargetPrefix = value ?? null /* arrayOf */; } + + /// Id of the corresponding storage task + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string TaskId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).TaskId; } + + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string TriggerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).TriggerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)Property).TriggerType = value ?? null; } + + /// Creates an new instance. + public StorageTaskAssignmentUpdateParameters() + { + + } + } + /// Parameters of the storage task assignment update request + public partial interface IStorageTaskAssignmentUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable + { + /// Text that describes the purpose of the storage task assignment + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Text that describes the purpose of the storage task assignment", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Whether the storage task assignment is enabled or not + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether the storage task assignment is enabled or not", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"endBy", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + int? Interval { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"intervalUnit", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// Represents the provisioning state of the storage task assignment. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the provisioning state of the storage task assignment.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded", "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Deleting", "Canceled", "Failed")] + string ProvisioningState { get; } + /// The prefix of the storage task assignment report + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The prefix of the storage task assignment report", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + string ReportPrefix { get; set; } + /// Represents the status of the execution. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the status of the execution.", + SerializedName = @"runStatusEnum", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("InProgress", "Finished")] + string RunStatusEnum { get; } + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Well known Azure Storage error code that represents the error encountered during execution of the run instance.", + SerializedName = @"runStatusError", + PossibleTypes = new [] { typeof(string) })] + string RunStatusError { get; } + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"finishTime", + PossibleTypes = new [] { typeof(string) })] + string RunStatusFinishTime { get; } + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectFailedCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectFailedCount { get; } + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsOperatedOnCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectsOperatedOnCount { get; } + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsSucceededCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectsSucceededCount { get; } + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsTargetedCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectsTargetedCount { get; } + /// Represents the overall result of the execution for the run instance + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the overall result of the execution for the run instance", + SerializedName = @"runResult", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Succeeded", "Failed")] + string RunStatusRunResult { get; } + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(string) })] + string RunStatusStartTime { get; } + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the Storage Account Id where the storage task definition was applied and executed.", + SerializedName = @"storageAccountId", + PossibleTypes = new [] { typeof(string) })] + string RunStatusStorageAccountId { get; } + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Full path to the verbose report stored in the reporting container as specified in the assignment execution context for the storage account. ", + SerializedName = @"summaryReportPath", + PossibleTypes = new [] { typeof(string) })] + string RunStatusSummaryReportPath { get; } + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the Storage Task Assignment Id associated with the storage task that provided an execution context.", + SerializedName = @"taskAssignmentId", + PossibleTypes = new [] { typeof(string) })] + string RunStatusTaskAssignmentId { get; } + /// Storage Task Arm Id. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Storage Task Arm Id.", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + string RunStatusTaskId { get; } + /// Storage Task Version + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Storage Task Version", + SerializedName = @"taskVersion", + PossibleTypes = new [] { typeof(string) })] + string RunStatusTaskVersion { get; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startFrom", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startOn", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartOn { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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", + SerializedName = @"excludePrefix", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List TargetExcludePrefix { get; set; } + /// Required list of object prefixes to be included for task execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Required list of object prefixes to be included for task execution", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List TargetPrefix { get; set; } + /// Id of the corresponding storage task + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Id of the corresponding storage task", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + string TaskId { get; } + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The trigger type of the storage task assignment execution", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string TriggerType { get; set; } + + } + /// Parameters of the storage task assignment update request + internal partial interface IStorageTaskAssignmentUpdateParametersInternal + + { + /// Text that describes the purpose of the storage task assignment + string Description { get; set; } + /// Whether the storage task assignment is enabled or not + bool? Enabled { get; set; } + /// + /// 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' + /// + global::System.DateTime? EndBy { get; set; } + /// The storage task assignment execution context + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext ExecutionContext { get; set; } + /// Execution target of the storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget ExecutionContextTarget { get; set; } + /// Execution trigger of the storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate ExecutionContextTrigger { get; set; } + /// + /// 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' + /// + int? Interval { get; set; } + /// + /// 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' + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// Properties of the storage task assignment. + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateProperties Property { get; set; } + /// Represents the provisioning state of the storage task assignment. + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded", "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Deleting", "Canceled", "Failed")] + string ProvisioningState { get; set; } + /// The storage task assignment report + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport Report { get; set; } + /// The prefix of the storage task assignment report + string ReportPrefix { get; set; } + /// Run status of storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties RunStatus { get; set; } + /// Represents the status of the execution. + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("InProgress", "Finished")] + string RunStatusEnum { get; set; } + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + string RunStatusError { get; set; } + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusFinishTime { get; set; } + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectFailedCount { get; set; } + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectsOperatedOnCount { get; set; } + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectsSucceededCount { get; set; } + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectsTargetedCount { get; set; } + /// Represents the overall result of the execution for the run instance + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Succeeded", "Failed")] + string RunStatusRunResult { get; set; } + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusStartTime { get; set; } + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + string RunStatusStorageAccountId { get; set; } + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + string RunStatusSummaryReportPath { get; set; } + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + string RunStatusTaskAssignmentId { get; set; } + /// Storage Task Arm Id. + string RunStatusTaskId { get; set; } + /// Storage Task Version + string RunStatusTaskVersion { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartOn { get; set; } + /// + /// 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 + /// + System.Collections.Generic.List TargetExcludePrefix { get; set; } + /// Required list of object prefixes to be included for task execution + System.Collections.Generic.List TargetPrefix { get; set; } + /// Id of the corresponding storage task + string TaskId { get; set; } + /// The trigger parameters of the storage task assignment execution + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate TriggerParameter { get; set; } + /// The trigger type of the storage task assignment execution + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string TriggerType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.json.cs new file mode 100644 index 000000000000..6bb41bbd6cb9 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateParameters.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Parameters of the storage task assignment update request + public partial class StorageTaskAssignmentUpdateParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new StorageTaskAssignmentUpdateParameters(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal StorageTaskAssignmentUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..f90ed26b8c82 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.PowerShell.cs @@ -0,0 +1,423 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// Properties of the storage task update assignment. + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentUpdatePropertiesTypeConverter))] + public partial class StorageTaskAssignmentUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageTaskAssignmentUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageTaskAssignmentUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageTaskAssignmentUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ExecutionContext")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ExecutionContext = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext) content.GetValueForProperty("ExecutionContext",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ExecutionContext, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateExecutionContextTypeConverter.ConvertFrom); + } + if (content.Contains("Report")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Report = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport) content.GetValueForProperty("Report",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Report, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateReportTypeConverter.ConvertFrom); + } + if (content.Contains("RunStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatus = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties) content.GetValueForProperty("RunStatus",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatus, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("TaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TaskId = (string) content.GetValueForProperty("TaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TaskId, global::System.Convert.ToString); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("RunStatusRunResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusRunResult = (string) content.GetValueForProperty("RunStatusRunResult",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusRunResult, global::System.Convert.ToString); + } + if (content.Contains("ExecutionContextTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ExecutionContextTarget = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget) content.GetValueForProperty("ExecutionContextTarget",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ExecutionContextTarget, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTargetTypeConverter.ConvertFrom); + } + if (content.Contains("ExecutionContextTrigger")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ExecutionContextTrigger = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate) content.GetValueForProperty("ExecutionContextTrigger",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ExecutionContextTrigger, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTriggerUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TriggerType = (string) content.GetValueForProperty("TriggerType",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TriggerType, global::System.Convert.ToString); + } + if (content.Contains("ReportPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ReportPrefix = (string) content.GetValueForProperty("ReportPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ReportPrefix, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskAssignmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusTaskAssignmentId = (string) content.GetValueForProperty("RunStatusTaskAssignmentId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusTaskAssignmentId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusStorageAccountId = (string) content.GetValueForProperty("RunStatusStorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusStorageAccountId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusStartTime = (string) content.GetValueForProperty("RunStatusStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusStartTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusFinishTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusFinishTime = (string) content.GetValueForProperty("RunStatusFinishTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusFinishTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsTargetedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectsTargetedCount = (string) content.GetValueForProperty("RunStatusObjectsTargetedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectsTargetedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsOperatedOnCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectsOperatedOnCount = (string) content.GetValueForProperty("RunStatusObjectsOperatedOnCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectsOperatedOnCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectFailedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectFailedCount = (string) content.GetValueForProperty("RunStatusObjectFailedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectFailedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsSucceededCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectsSucceededCount = (string) content.GetValueForProperty("RunStatusObjectsSucceededCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectsSucceededCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusError = (string) content.GetValueForProperty("RunStatusError",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusError, global::System.Convert.ToString); + } + if (content.Contains("RunStatusEnum")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusEnum = (string) content.GetValueForProperty("RunStatusEnum",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusEnum, global::System.Convert.ToString); + } + if (content.Contains("RunStatusSummaryReportPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusSummaryReportPath = (string) content.GetValueForProperty("RunStatusSummaryReportPath",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusSummaryReportPath, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusTaskId = (string) content.GetValueForProperty("RunStatusTaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusTaskId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusTaskVersion = (string) content.GetValueForProperty("RunStatusTaskVersion",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusTaskVersion, global::System.Convert.ToString); + } + if (content.Contains("TargetPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TargetPrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TargetPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TargetExcludePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TargetExcludePrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetExcludePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TargetExcludePrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TriggerParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TriggerParameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate) content.GetValueForProperty("TriggerParameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TriggerParameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StorageTaskAssignmentUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ExecutionContext")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ExecutionContext = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext) content.GetValueForProperty("ExecutionContext",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ExecutionContext, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateExecutionContextTypeConverter.ConvertFrom); + } + if (content.Contains("Report")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Report = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport) content.GetValueForProperty("Report",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Report, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateReportTypeConverter.ConvertFrom); + } + if (content.Contains("RunStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatus = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties) content.GetValueForProperty("RunStatus",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatus, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("TaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TaskId = (string) content.GetValueForProperty("TaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TaskId, global::System.Convert.ToString); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("RunStatusRunResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusRunResult = (string) content.GetValueForProperty("RunStatusRunResult",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusRunResult, global::System.Convert.ToString); + } + if (content.Contains("ExecutionContextTarget")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ExecutionContextTarget = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget) content.GetValueForProperty("ExecutionContextTarget",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ExecutionContextTarget, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTargetTypeConverter.ConvertFrom); + } + if (content.Contains("ExecutionContextTrigger")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ExecutionContextTrigger = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate) content.GetValueForProperty("ExecutionContextTrigger",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ExecutionContextTrigger, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ExecutionTriggerUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("TriggerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TriggerType = (string) content.GetValueForProperty("TriggerType",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TriggerType, global::System.Convert.ToString); + } + if (content.Contains("ReportPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ReportPrefix = (string) content.GetValueForProperty("ReportPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).ReportPrefix, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskAssignmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusTaskAssignmentId = (string) content.GetValueForProperty("RunStatusTaskAssignmentId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusTaskAssignmentId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusStorageAccountId = (string) content.GetValueForProperty("RunStatusStorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusStorageAccountId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusStartTime = (string) content.GetValueForProperty("RunStatusStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusStartTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusFinishTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusFinishTime = (string) content.GetValueForProperty("RunStatusFinishTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusFinishTime, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsTargetedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectsTargetedCount = (string) content.GetValueForProperty("RunStatusObjectsTargetedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectsTargetedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsOperatedOnCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectsOperatedOnCount = (string) content.GetValueForProperty("RunStatusObjectsOperatedOnCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectsOperatedOnCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectFailedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectFailedCount = (string) content.GetValueForProperty("RunStatusObjectFailedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectFailedCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusObjectsSucceededCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectsSucceededCount = (string) content.GetValueForProperty("RunStatusObjectsSucceededCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusObjectsSucceededCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusError = (string) content.GetValueForProperty("RunStatusError",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusError, global::System.Convert.ToString); + } + if (content.Contains("RunStatusEnum")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusEnum = (string) content.GetValueForProperty("RunStatusEnum",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusEnum, global::System.Convert.ToString); + } + if (content.Contains("RunStatusSummaryReportPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusSummaryReportPath = (string) content.GetValueForProperty("RunStatusSummaryReportPath",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusSummaryReportPath, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusTaskId = (string) content.GetValueForProperty("RunStatusTaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusTaskId, global::System.Convert.ToString); + } + if (content.Contains("RunStatusTaskVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusTaskVersion = (string) content.GetValueForProperty("RunStatusTaskVersion",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).RunStatusTaskVersion, global::System.Convert.ToString); + } + if (content.Contains("TargetPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TargetPrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TargetPrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TargetExcludePrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TargetExcludePrefix = (System.Collections.Generic.List) content.GetValueForProperty("TargetExcludePrefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TargetExcludePrefix, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TriggerParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TriggerParameter = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate) content.GetValueForProperty("TriggerParameter",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).TriggerParameter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.TriggerParametersUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Properties of the storage task update assignment. + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentUpdatePropertiesTypeConverter))] + public partial interface IStorageTaskAssignmentUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..8a321b06c2cd --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StorageTaskAssignmentUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StorageTaskAssignmentUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StorageTaskAssignmentUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StorageTaskAssignmentUpdateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.cs new file mode 100644 index 000000000000..735b9c29175f --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.cs @@ -0,0 +1,752 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Properties of the storage task update assignment. + public partial class StorageTaskAssignmentUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal + { + + /// Backing field for property. + private string _description; + + /// Text that describes the purpose of the storage task assignment + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private bool? _enabled; + + /// Whether the storage task assignment is enabled or not + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public bool? Enabled { get => this._enabled; set => this._enabled = value; } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? EndBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).EndBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).EndBy = value ?? default(global::System.DateTime); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext _executionContext; + + /// The storage task assignment execution context + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext ExecutionContext { get => (this._executionContext = this._executionContext ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateExecutionContext()); set => this._executionContext = value; } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public int? Interval { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).Interval; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).Interval = value ?? default(int); } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string IntervalUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).IntervalUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).IntervalUnit = value ?? null; } + + /// Internal Acessors for ExecutionContext + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.ExecutionContext { get => (this._executionContext = this._executionContext ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateExecutionContext()); set { {_executionContext = value;} } } + + /// Internal Acessors for ExecutionContextTarget + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.ExecutionContextTarget { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).Target = value; } + + /// Internal Acessors for ExecutionContextTrigger + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.ExecutionContextTrigger { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).Trigger; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).Trigger = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for Report + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.Report { get => (this._report = this._report ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateReport()); set { {_report = value;} } } + + /// Internal Acessors for RunStatus + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.RunStatus { get => (this._runStatus = this._runStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportProperties()); set { {_runStatus = value;} } } + + /// Internal Acessors for RunStatusEnum + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.RunStatusEnum { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunStatusEnum; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunStatusEnum = value; } + + /// Internal Acessors for RunStatusError + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.RunStatusError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunStatusError; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunStatusError = value; } + + /// Internal Acessors for RunStatusFinishTime + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.RunStatusFinishTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).FinishTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).FinishTime = value; } + + /// Internal Acessors for RunStatusObjectFailedCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.RunStatusObjectFailedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectFailedCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectFailedCount = value; } + + /// Internal Acessors for RunStatusObjectsOperatedOnCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.RunStatusObjectsOperatedOnCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsOperatedOnCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsOperatedOnCount = value; } + + /// Internal Acessors for RunStatusObjectsSucceededCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.RunStatusObjectsSucceededCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsSucceededCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsSucceededCount = value; } + + /// Internal Acessors for RunStatusObjectsTargetedCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.RunStatusObjectsTargetedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsTargetedCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsTargetedCount = value; } + + /// Internal Acessors for RunStatusRunResult + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.RunStatusRunResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunResult = value; } + + /// Internal Acessors for RunStatusStartTime + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.RunStatusStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).StartTime = value; } + + /// Internal Acessors for RunStatusStorageAccountId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.RunStatusStorageAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).StorageAccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).StorageAccountId = value; } + + /// Internal Acessors for RunStatusSummaryReportPath + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.RunStatusSummaryReportPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).SummaryReportPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).SummaryReportPath = value; } + + /// Internal Acessors for RunStatusTaskAssignmentId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.RunStatusTaskAssignmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskAssignmentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskAssignmentId = value; } + + /// Internal Acessors for RunStatusTaskId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.RunStatusTaskId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskId = value; } + + /// Internal Acessors for RunStatusTaskVersion + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.RunStatusTaskVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskVersion = value; } + + /// Internal Acessors for TaskId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.TaskId { get => this._taskId; set { {_taskId = value;} } } + + /// Internal Acessors for TriggerParameter + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdatePropertiesInternal.TriggerParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).TriggerParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).TriggerParameter = value; } + + /// Backing field for property. + private string _provisioningState; + + /// Represents the provisioning state of the storage task assignment. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport _report; + + /// The storage task assignment report + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport Report { get => (this._report = this._report ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateReport()); set => this._report = value; } + + /// The prefix of the storage task assignment report + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string ReportPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReportInternal)Report).Prefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReportInternal)Report).Prefix = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties _runStatus; + + /// Run status of storage task assignment + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties RunStatus { get => (this._runStatus = this._runStatus ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportProperties()); set => this._runStatus = value; } + + /// Represents the status of the execution. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusEnum { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunStatusEnum; } + + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunStatusError; } + + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusFinishTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).FinishTime; } + + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectFailedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectFailedCount; } + + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectsOperatedOnCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsOperatedOnCount; } + + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectsSucceededCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsSucceededCount; } + + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusObjectsTargetedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).ObjectsTargetedCount; } + + /// Represents the overall result of the execution for the run instance + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusRunResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).RunResult; } + + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).StartTime; } + + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusStorageAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).StorageAccountId; } + + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusSummaryReportPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).SummaryReportPath; } + + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusTaskAssignmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskAssignmentId; } + + /// Storage Task Arm Id. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusTaskId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskId; } + + /// Storage Task Version + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusTaskVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)RunStatus).TaskVersion; } + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartFrom { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).StartFrom; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).StartFrom = value ?? default(global::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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public global::System.DateTime? StartOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).StartOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).StartOn = value ?? default(global::System.DateTime); } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TargetExcludePrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).TargetExcludePrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).TargetExcludePrefix = value ?? null /* arrayOf */; } + + /// Required list of object prefixes to be included for task execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TargetPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).TargetPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).TargetPrefix = value ?? null /* arrayOf */; } + + /// Backing field for property. + private string _taskId; + + /// Id of the corresponding storage task + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string TaskId { get => this._taskId; } + + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string TriggerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).TriggerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContextInternal)ExecutionContext).TriggerType = value ?? null; } + + /// Creates an new instance. + public StorageTaskAssignmentUpdateProperties() + { + + } + } + /// Properties of the storage task update assignment. + public partial interface IStorageTaskAssignmentUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable + { + /// Text that describes the purpose of the storage task assignment + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Text that describes the purpose of the storage task assignment", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Whether the storage task assignment is enabled or not + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Whether the storage task assignment is enabled or not", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"endBy", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + int? Interval { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"intervalUnit", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// Represents the provisioning state of the storage task assignment. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the provisioning state of the storage task assignment.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded", "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Deleting", "Canceled", "Failed")] + string ProvisioningState { get; } + /// The prefix of the storage task assignment report + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The prefix of the storage task assignment report", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + string ReportPrefix { get; set; } + /// Represents the status of the execution. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the status of the execution.", + SerializedName = @"runStatusEnum", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("InProgress", "Finished")] + string RunStatusEnum { get; } + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Well known Azure Storage error code that represents the error encountered during execution of the run instance.", + SerializedName = @"runStatusError", + PossibleTypes = new [] { typeof(string) })] + string RunStatusError { get; } + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"finishTime", + PossibleTypes = new [] { typeof(string) })] + string RunStatusFinishTime { get; } + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectFailedCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectFailedCount { get; } + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsOperatedOnCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectsOperatedOnCount { get; } + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsSucceededCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectsSucceededCount { get; } + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsTargetedCount", + PossibleTypes = new [] { typeof(string) })] + string RunStatusObjectsTargetedCount { get; } + /// Represents the overall result of the execution for the run instance + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the overall result of the execution for the run instance", + SerializedName = @"runResult", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Succeeded", "Failed")] + string RunStatusRunResult { get; } + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(string) })] + string RunStatusStartTime { get; } + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the Storage Account Id where the storage task definition was applied and executed.", + SerializedName = @"storageAccountId", + PossibleTypes = new [] { typeof(string) })] + string RunStatusStorageAccountId { get; } + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Full path to the verbose report stored in the reporting container as specified in the assignment execution context for the storage account. ", + SerializedName = @"summaryReportPath", + PossibleTypes = new [] { typeof(string) })] + string RunStatusSummaryReportPath { get; } + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the Storage Task Assignment Id associated with the storage task that provided an execution context.", + SerializedName = @"taskAssignmentId", + PossibleTypes = new [] { typeof(string) })] + string RunStatusTaskAssignmentId { get; } + /// Storage Task Arm Id. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Storage Task Arm Id.", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + string RunStatusTaskId { get; } + /// Storage Task Version + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Storage Task Version", + SerializedName = @"taskVersion", + PossibleTypes = new [] { typeof(string) })] + string RunStatusTaskVersion { get; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startFrom", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startOn", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartOn { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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", + SerializedName = @"excludePrefix", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List TargetExcludePrefix { get; set; } + /// Required list of object prefixes to be included for task execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Required list of object prefixes to be included for task execution", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List TargetPrefix { get; set; } + /// Id of the corresponding storage task + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Id of the corresponding storage task", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + string TaskId { get; } + /// The trigger type of the storage task assignment execution + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The trigger type of the storage task assignment execution", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string TriggerType { get; set; } + + } + /// Properties of the storage task update assignment. + internal partial interface IStorageTaskAssignmentUpdatePropertiesInternal + + { + /// Text that describes the purpose of the storage task assignment + string Description { get; set; } + /// Whether the storage task assignment is enabled or not + bool? Enabled { get; set; } + /// + /// 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' + /// + global::System.DateTime? EndBy { get; set; } + /// The storage task assignment execution context + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateExecutionContext ExecutionContext { get; set; } + /// Execution target of the storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTarget ExecutionContextTarget { get; set; } + /// Execution trigger of the storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IExecutionTriggerUpdate ExecutionContextTrigger { get; set; } + /// + /// 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' + /// + int? Interval { get; set; } + /// + /// 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' + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// Represents the provisioning state of the storage task assignment. + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Creating", "ResolvingDNS", "Succeeded", "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Deleting", "Canceled", "Failed")] + string ProvisioningState { get; set; } + /// The storage task assignment report + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport Report { get; set; } + /// The prefix of the storage task assignment report + string ReportPrefix { get; set; } + /// Run status of storage task assignment + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties RunStatus { get; set; } + /// Represents the status of the execution. + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("InProgress", "Finished")] + string RunStatusEnum { get; set; } + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + string RunStatusError { get; set; } + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusFinishTime { get; set; } + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectFailedCount { get; set; } + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectsOperatedOnCount { get; set; } + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectsSucceededCount { get; set; } + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusObjectsTargetedCount { get; set; } + /// Represents the overall result of the execution for the run instance + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Succeeded", "Failed")] + string RunStatusRunResult { get; set; } + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string RunStatusStartTime { get; set; } + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + string RunStatusStorageAccountId { get; set; } + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + string RunStatusSummaryReportPath { get; set; } + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + string RunStatusTaskAssignmentId { get; set; } + /// Storage Task Arm Id. + string RunStatusTaskId { get; set; } + /// Storage Task Version + string RunStatusTaskVersion { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartOn { get; set; } + /// + /// 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 + /// + System.Collections.Generic.List TargetExcludePrefix { get; set; } + /// Required list of object prefixes to be included for task execution + System.Collections.Generic.List TargetPrefix { get; set; } + /// Id of the corresponding storage task + string TaskId { get; set; } + /// The trigger parameters of the storage task assignment execution + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate TriggerParameter { get; set; } + /// The trigger type of the storage task assignment execution + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + string TriggerType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.json.cs new file mode 100644 index 000000000000..78ded0e620bc --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateProperties.json.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Properties of the storage task update assignment. + public partial class StorageTaskAssignmentUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new StorageTaskAssignmentUpdateProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal StorageTaskAssignmentUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_executionContext = If( json?.PropertyT("executionContext"), out var __jsonExecutionContext) ? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateExecutionContext.FromJson(__jsonExecutionContext) : _executionContext;} + {_report = If( json?.PropertyT("report"), out var __jsonReport) ? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateReport.FromJson(__jsonReport) : _report;} + {_runStatus = If( json?.PropertyT("runStatus"), out var __jsonRunStatus) ? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportProperties.FromJson(__jsonRunStatus) : _runStatus;} + {_taskId = If( json?.PropertyT("taskId"), out var __jsonTaskId) ? (string)__jsonTaskId : (string)_taskId;} + {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool?)__jsonEnabled : _enabled;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._executionContext ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) this._executionContext.ToJson(null,serializationMode) : null, "executionContext" ,container.Add ); + AddIf( null != this._report ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) this._report.ToJson(null,serializationMode) : null, "report" ,container.Add ); + AddIf( null != this._runStatus ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) this._runStatus.ToJson(null,serializationMode) : null, "runStatus" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._taskId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._taskId.ToString()) : null, "taskId" ,container.Add ); + } + AddIf( null != this._enabled ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonBoolean((bool)this._enabled) : null, "enabled" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.PowerShell.cs new file mode 100644 index 000000000000..45cb1997d5ef --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.PowerShell.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// The storage task assignment report + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentUpdateReportTypeConverter))] + public partial class StorageTaskAssignmentUpdateReport + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageTaskAssignmentUpdateReport(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageTaskAssignmentUpdateReport(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageTaskAssignmentUpdateReport(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Prefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReportInternal)this).Prefix = (string) content.GetValueForProperty("Prefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReportInternal)this).Prefix, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StorageTaskAssignmentUpdateReport(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Prefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReportInternal)this).Prefix = (string) content.GetValueForProperty("Prefix",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReportInternal)this).Prefix, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The storage task assignment report + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentUpdateReportTypeConverter))] + public partial interface IStorageTaskAssignmentUpdateReport + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.TypeConverter.cs new file mode 100644 index 000000000000..bda49611d1c2 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StorageTaskAssignmentUpdateReportTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StorageTaskAssignmentUpdateReport.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StorageTaskAssignmentUpdateReport.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StorageTaskAssignmentUpdateReport.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.cs new file mode 100644 index 000000000000..28cfa104729a --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// The storage task assignment report + public partial class StorageTaskAssignmentUpdateReport : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReportInternal + { + + /// Backing field for property. + private string _prefix; + + /// The prefix of the storage task assignment report + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string Prefix { get => this._prefix; set => this._prefix = value; } + + /// Creates an new instance. + public StorageTaskAssignmentUpdateReport() + { + + } + } + /// The storage task assignment report + public partial interface IStorageTaskAssignmentUpdateReport : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable + { + /// The prefix of the storage task assignment report + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The prefix of the storage task assignment report", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + string Prefix { get; set; } + + } + /// The storage task assignment report + internal partial interface IStorageTaskAssignmentUpdateReportInternal + + { + /// The prefix of the storage task assignment report + string Prefix { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.json.cs new file mode 100644 index 000000000000..44e9ffb0b61d --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentUpdateReport.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// The storage task assignment report + public partial class StorageTaskAssignmentUpdateReport + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateReport FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new StorageTaskAssignmentUpdateReport(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal StorageTaskAssignmentUpdateReport(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_prefix = If( json?.PropertyT("prefix"), out var __jsonPrefix) ? (string)__jsonPrefix : (string)_prefix;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._prefix)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._prefix.ToString()) : null, "prefix" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.PowerShell.cs new file mode 100644 index 000000000000..df0c5d79dc6f --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// List of storage task assignments for the storage account + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentsListTypeConverter))] + public partial class StorageTaskAssignmentsList + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsList DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageTaskAssignmentsList(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageTaskAssignmentsList(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageTaskAssignmentsList(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsListInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StorageTaskAssignmentsList(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsListInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// List of storage task assignments for the storage account + [System.ComponentModel.TypeConverter(typeof(StorageTaskAssignmentsListTypeConverter))] + public partial interface IStorageTaskAssignmentsList + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.TypeConverter.cs new file mode 100644 index 000000000000..6e7e34f5a403 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StorageTaskAssignmentsListTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsList ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsList).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StorageTaskAssignmentsList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StorageTaskAssignmentsList.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StorageTaskAssignmentsList.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.cs new file mode 100644 index 000000000000..6801c5f0064d --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// List of storage task assignments for the storage account + public partial class StorageTaskAssignmentsList : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsList, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsListInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsListInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsListInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// + /// Request URL that can be used to query next page of storage task assignments. Returned when total number of requested storage + /// task assignments exceed maximum page size. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// Gets the list of storage task assignments and their properties. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public StorageTaskAssignmentsList() + { + + } + } + /// List of storage task assignments for the storage account + public partial interface IStorageTaskAssignmentsList : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable + { + /// + /// Request URL that can be used to query next page of storage task assignments. Returned when total number of requested storage + /// task assignments exceed maximum page size. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Request URL that can be used to query next page of storage task assignments. Returned when total number of requested storage task assignments exceed maximum page size.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// Gets the list of storage task assignments and their properties. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Gets the list of storage task assignments and their properties.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment) })] + System.Collections.Generic.List Value { get; } + + } + /// List of storage task assignments for the storage account + internal partial interface IStorageTaskAssignmentsListInternal + + { + /// + /// Request URL that can be used to query next page of storage task assignments. Returned when total number of requested storage + /// task assignments exceed maximum page size. + /// + string NextLink { get; set; } + /// Gets the list of storage task assignments and their properties. + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.json.cs new file mode 100644 index 000000000000..3275de4574c1 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskAssignmentsList.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// List of storage task assignments for the storage account + public partial class StorageTaskAssignmentsList + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsList FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new StorageTaskAssignmentsList(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal StorageTaskAssignmentsList(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment) (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignment.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.PowerShell.cs new file mode 100644 index 000000000000..a0521a52166e --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.PowerShell.cs @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// Storage Tasks run report instance + [System.ComponentModel.TypeConverter(typeof(StorageTaskReportInstanceTypeConverter))] + public partial class StorageTaskReportInstance + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageTaskReportInstance(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageTaskReportInstance(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageTaskReportInstance(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("RunResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).RunResult = (string) content.GetValueForProperty("RunResult",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).RunResult, global::System.Convert.ToString); + } + if (content.Contains("TaskAssignmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).TaskAssignmentId = (string) content.GetValueForProperty("TaskAssignmentId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).TaskAssignmentId, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).StorageAccountId = (string) content.GetValueForProperty("StorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).StorageAccountId, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).StartTime = (string) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).StartTime, global::System.Convert.ToString); + } + if (content.Contains("FinishTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).FinishTime = (string) content.GetValueForProperty("FinishTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).FinishTime, global::System.Convert.ToString); + } + if (content.Contains("ObjectsTargetedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectsTargetedCount = (string) content.GetValueForProperty("ObjectsTargetedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectsTargetedCount, global::System.Convert.ToString); + } + if (content.Contains("ObjectsOperatedOnCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectsOperatedOnCount = (string) content.GetValueForProperty("ObjectsOperatedOnCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectsOperatedOnCount, global::System.Convert.ToString); + } + if (content.Contains("ObjectFailedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectFailedCount = (string) content.GetValueForProperty("ObjectFailedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectFailedCount, global::System.Convert.ToString); + } + if (content.Contains("ObjectsSucceededCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectsSucceededCount = (string) content.GetValueForProperty("ObjectsSucceededCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectsSucceededCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).RunStatusError = (string) content.GetValueForProperty("RunStatusError",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).RunStatusError, global::System.Convert.ToString); + } + if (content.Contains("RunStatusEnum")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).RunStatusEnum = (string) content.GetValueForProperty("RunStatusEnum",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).RunStatusEnum, global::System.Convert.ToString); + } + if (content.Contains("SummaryReportPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).SummaryReportPath = (string) content.GetValueForProperty("SummaryReportPath",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).SummaryReportPath, global::System.Convert.ToString); + } + if (content.Contains("TaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).TaskId = (string) content.GetValueForProperty("TaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).TaskId, global::System.Convert.ToString); + } + if (content.Contains("TaskVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).TaskVersion = (string) content.GetValueForProperty("TaskVersion",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).TaskVersion, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StorageTaskReportInstance(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("RunResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).RunResult = (string) content.GetValueForProperty("RunResult",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).RunResult, global::System.Convert.ToString); + } + if (content.Contains("TaskAssignmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).TaskAssignmentId = (string) content.GetValueForProperty("TaskAssignmentId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).TaskAssignmentId, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).StorageAccountId = (string) content.GetValueForProperty("StorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).StorageAccountId, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).StartTime = (string) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).StartTime, global::System.Convert.ToString); + } + if (content.Contains("FinishTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).FinishTime = (string) content.GetValueForProperty("FinishTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).FinishTime, global::System.Convert.ToString); + } + if (content.Contains("ObjectsTargetedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectsTargetedCount = (string) content.GetValueForProperty("ObjectsTargetedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectsTargetedCount, global::System.Convert.ToString); + } + if (content.Contains("ObjectsOperatedOnCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectsOperatedOnCount = (string) content.GetValueForProperty("ObjectsOperatedOnCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectsOperatedOnCount, global::System.Convert.ToString); + } + if (content.Contains("ObjectFailedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectFailedCount = (string) content.GetValueForProperty("ObjectFailedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectFailedCount, global::System.Convert.ToString); + } + if (content.Contains("ObjectsSucceededCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectsSucceededCount = (string) content.GetValueForProperty("ObjectsSucceededCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).ObjectsSucceededCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).RunStatusError = (string) content.GetValueForProperty("RunStatusError",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).RunStatusError, global::System.Convert.ToString); + } + if (content.Contains("RunStatusEnum")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).RunStatusEnum = (string) content.GetValueForProperty("RunStatusEnum",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).RunStatusEnum, global::System.Convert.ToString); + } + if (content.Contains("SummaryReportPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).SummaryReportPath = (string) content.GetValueForProperty("SummaryReportPath",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).SummaryReportPath, global::System.Convert.ToString); + } + if (content.Contains("TaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).TaskId = (string) content.GetValueForProperty("TaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).TaskId, global::System.Convert.ToString); + } + if (content.Contains("TaskVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).TaskVersion = (string) content.GetValueForProperty("TaskVersion",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal)this).TaskVersion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Storage Tasks run report instance + [System.ComponentModel.TypeConverter(typeof(StorageTaskReportInstanceTypeConverter))] + public partial interface IStorageTaskReportInstance + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.TypeConverter.cs new file mode 100644 index 000000000000..7f4f5e6f65da --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StorageTaskReportInstanceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StorageTaskReportInstance.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StorageTaskReportInstance.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StorageTaskReportInstance.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.cs new file mode 100644 index 000000000000..932194f99e19 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.cs @@ -0,0 +1,458 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Storage Tasks run report instance + [Microsoft.Azure.PowerShell.Cmdlets.Storage.DoNotFormat] + public partial class StorageTaskReportInstance : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ProxyResource(); + + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string FinishTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).FinishTime; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__proxyResource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__proxyResource).Type = value; } + + /// Internal Acessors for FinishTime + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal.FinishTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).FinishTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).FinishTime = value; } + + /// Internal Acessors for ObjectFailedCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal.ObjectFailedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).ObjectFailedCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).ObjectFailedCount = value; } + + /// Internal Acessors for ObjectsOperatedOnCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal.ObjectsOperatedOnCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).ObjectsOperatedOnCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).ObjectsOperatedOnCount = value; } + + /// Internal Acessors for ObjectsSucceededCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal.ObjectsSucceededCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).ObjectsSucceededCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).ObjectsSucceededCount = value; } + + /// Internal Acessors for ObjectsTargetedCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal.ObjectsTargetedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).ObjectsTargetedCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).ObjectsTargetedCount = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportProperties()); set { {_property = value;} } } + + /// Internal Acessors for RunResult + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal.RunResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).RunResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).RunResult = value; } + + /// Internal Acessors for RunStatusEnum + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal.RunStatusEnum { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).RunStatusEnum; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).RunStatusEnum = value; } + + /// Internal Acessors for RunStatusError + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal.RunStatusError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).RunStatusError; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).RunStatusError = value; } + + /// Internal Acessors for StartTime + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal.StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).StartTime = value; } + + /// Internal Acessors for StorageAccountId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal.StorageAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).StorageAccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).StorageAccountId = value; } + + /// Internal Acessors for SummaryReportPath + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal.SummaryReportPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).SummaryReportPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).SummaryReportPath = value; } + + /// Internal Acessors for TaskAssignmentId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal.TaskAssignmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).TaskAssignmentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).TaskAssignmentId = value; } + + /// Internal Acessors for TaskId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal.TaskId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).TaskId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).TaskId = value; } + + /// Internal Acessors for TaskVersion + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstanceInternal.TaskVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).TaskVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).TaskVersion = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__proxyResource).Name; } + + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string ObjectFailedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).ObjectFailedCount; } + + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string ObjectsOperatedOnCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).ObjectsOperatedOnCount; } + + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string ObjectsSucceededCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).ObjectsSucceededCount; } + + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string ObjectsTargetedCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).ObjectsTargetedCount; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties _property; + + /// Storage task execution report for a run instance. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportProperties()); set => this._property = value; } + + /// Represents the overall result of the execution for the run instance + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).RunResult; } + + /// Represents the status of the execution. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusEnum { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).RunStatusEnum; } + + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string RunStatusError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).RunStatusError; } + + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).StartTime; } + + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string StorageAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).StorageAccountId; } + + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string SummaryReportPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).SummaryReportPath; } + + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string TaskAssignmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).TaskAssignmentId; } + + /// Storage Task Arm Id. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string TaskId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).TaskId; } + + /// Storage Task Version + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inlined)] + public string TaskVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)Property).TaskVersion; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public StorageTaskReportInstance() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// Storage Tasks run report instance + public partial interface IStorageTaskReportInstance : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IProxyResource + { + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"finishTime", + PossibleTypes = new [] { typeof(string) })] + string FinishTime { get; } + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectFailedCount", + PossibleTypes = new [] { typeof(string) })] + string ObjectFailedCount { get; } + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsOperatedOnCount", + PossibleTypes = new [] { typeof(string) })] + string ObjectsOperatedOnCount { get; } + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsSucceededCount", + PossibleTypes = new [] { typeof(string) })] + string ObjectsSucceededCount { get; } + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsTargetedCount", + PossibleTypes = new [] { typeof(string) })] + string ObjectsTargetedCount { get; } + /// Represents the overall result of the execution for the run instance + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the overall result of the execution for the run instance", + SerializedName = @"runResult", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Succeeded", "Failed")] + string RunResult { get; } + /// Represents the status of the execution. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the status of the execution.", + SerializedName = @"runStatusEnum", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("InProgress", "Finished")] + string RunStatusEnum { get; } + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Well known Azure Storage error code that represents the error encountered during execution of the run instance.", + SerializedName = @"runStatusError", + PossibleTypes = new [] { typeof(string) })] + string RunStatusError { get; } + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(string) })] + string StartTime { get; } + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the Storage Account Id where the storage task definition was applied and executed.", + SerializedName = @"storageAccountId", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountId { get; } + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Full path to the verbose report stored in the reporting container as specified in the assignment execution context for the storage account. ", + SerializedName = @"summaryReportPath", + PossibleTypes = new [] { typeof(string) })] + string SummaryReportPath { get; } + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the Storage Task Assignment Id associated with the storage task that provided an execution context.", + SerializedName = @"taskAssignmentId", + PossibleTypes = new [] { typeof(string) })] + string TaskAssignmentId { get; } + /// Storage Task Arm Id. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Storage Task Arm Id.", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + string TaskId { get; } + /// Storage Task Version + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Storage Task Version", + SerializedName = @"taskVersion", + PossibleTypes = new [] { typeof(string) })] + string TaskVersion { get; } + + } + /// Storage Tasks run report instance + internal partial interface IStorageTaskReportInstanceInternal : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IProxyResourceInternal + { + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string FinishTime { get; set; } + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string ObjectFailedCount { get; set; } + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string ObjectsOperatedOnCount { get; set; } + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string ObjectsSucceededCount { get; set; } + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string ObjectsTargetedCount { get; set; } + /// Storage task execution report for a run instance. + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties Property { get; set; } + /// Represents the overall result of the execution for the run instance + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Succeeded", "Failed")] + string RunResult { get; set; } + /// Represents the status of the execution. + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("InProgress", "Finished")] + string RunStatusEnum { get; set; } + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + string RunStatusError { get; set; } + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string StartTime { get; set; } + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + string StorageAccountId { get; set; } + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + string SummaryReportPath { get; set; } + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + string TaskAssignmentId { get; set; } + /// Storage Task Arm Id. + string TaskId { get; set; } + /// Storage Task Version + string TaskVersion { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.json.cs new file mode 100644 index 000000000000..a80c671ed34b --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportInstance.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Storage Tasks run report instance + public partial class StorageTaskReportInstance + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new StorageTaskReportInstance(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal StorageTaskReportInstance(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.PowerShell.cs new file mode 100644 index 000000000000..e8b9b9c0d4e4 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.PowerShell.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// Storage task execution report for a run instance. + [System.ComponentModel.TypeConverter(typeof(StorageTaskReportPropertiesTypeConverter))] + public partial class StorageTaskReportProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageTaskReportProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageTaskReportProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageTaskReportProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TaskAssignmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).TaskAssignmentId = (string) content.GetValueForProperty("TaskAssignmentId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).TaskAssignmentId, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).StorageAccountId = (string) content.GetValueForProperty("StorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).StorageAccountId, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).StartTime = (string) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).StartTime, global::System.Convert.ToString); + } + if (content.Contains("FinishTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).FinishTime = (string) content.GetValueForProperty("FinishTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).FinishTime, global::System.Convert.ToString); + } + if (content.Contains("ObjectsTargetedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectsTargetedCount = (string) content.GetValueForProperty("ObjectsTargetedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectsTargetedCount, global::System.Convert.ToString); + } + if (content.Contains("ObjectsOperatedOnCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectsOperatedOnCount = (string) content.GetValueForProperty("ObjectsOperatedOnCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectsOperatedOnCount, global::System.Convert.ToString); + } + if (content.Contains("ObjectFailedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectFailedCount = (string) content.GetValueForProperty("ObjectFailedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectFailedCount, global::System.Convert.ToString); + } + if (content.Contains("ObjectsSucceededCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectsSucceededCount = (string) content.GetValueForProperty("ObjectsSucceededCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectsSucceededCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).RunStatusError = (string) content.GetValueForProperty("RunStatusError",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).RunStatusError, global::System.Convert.ToString); + } + if (content.Contains("RunStatusEnum")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).RunStatusEnum = (string) content.GetValueForProperty("RunStatusEnum",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).RunStatusEnum, global::System.Convert.ToString); + } + if (content.Contains("SummaryReportPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).SummaryReportPath = (string) content.GetValueForProperty("SummaryReportPath",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).SummaryReportPath, global::System.Convert.ToString); + } + if (content.Contains("TaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).TaskId = (string) content.GetValueForProperty("TaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).TaskId, global::System.Convert.ToString); + } + if (content.Contains("TaskVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).TaskVersion = (string) content.GetValueForProperty("TaskVersion",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).TaskVersion, global::System.Convert.ToString); + } + if (content.Contains("RunResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).RunResult = (string) content.GetValueForProperty("RunResult",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).RunResult, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StorageTaskReportProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TaskAssignmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).TaskAssignmentId = (string) content.GetValueForProperty("TaskAssignmentId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).TaskAssignmentId, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).StorageAccountId = (string) content.GetValueForProperty("StorageAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).StorageAccountId, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).StartTime = (string) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).StartTime, global::System.Convert.ToString); + } + if (content.Contains("FinishTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).FinishTime = (string) content.GetValueForProperty("FinishTime",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).FinishTime, global::System.Convert.ToString); + } + if (content.Contains("ObjectsTargetedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectsTargetedCount = (string) content.GetValueForProperty("ObjectsTargetedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectsTargetedCount, global::System.Convert.ToString); + } + if (content.Contains("ObjectsOperatedOnCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectsOperatedOnCount = (string) content.GetValueForProperty("ObjectsOperatedOnCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectsOperatedOnCount, global::System.Convert.ToString); + } + if (content.Contains("ObjectFailedCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectFailedCount = (string) content.GetValueForProperty("ObjectFailedCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectFailedCount, global::System.Convert.ToString); + } + if (content.Contains("ObjectsSucceededCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectsSucceededCount = (string) content.GetValueForProperty("ObjectsSucceededCount",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).ObjectsSucceededCount, global::System.Convert.ToString); + } + if (content.Contains("RunStatusError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).RunStatusError = (string) content.GetValueForProperty("RunStatusError",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).RunStatusError, global::System.Convert.ToString); + } + if (content.Contains("RunStatusEnum")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).RunStatusEnum = (string) content.GetValueForProperty("RunStatusEnum",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).RunStatusEnum, global::System.Convert.ToString); + } + if (content.Contains("SummaryReportPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).SummaryReportPath = (string) content.GetValueForProperty("SummaryReportPath",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).SummaryReportPath, global::System.Convert.ToString); + } + if (content.Contains("TaskId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).TaskId = (string) content.GetValueForProperty("TaskId",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).TaskId, global::System.Convert.ToString); + } + if (content.Contains("TaskVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).TaskVersion = (string) content.GetValueForProperty("TaskVersion",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).TaskVersion, global::System.Convert.ToString); + } + if (content.Contains("RunResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).RunResult = (string) content.GetValueForProperty("RunResult",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal)this).RunResult, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Storage task execution report for a run instance. + [System.ComponentModel.TypeConverter(typeof(StorageTaskReportPropertiesTypeConverter))] + public partial interface IStorageTaskReportProperties + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.TypeConverter.cs new file mode 100644 index 000000000000..295e952577ec --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StorageTaskReportPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StorageTaskReportProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StorageTaskReportProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StorageTaskReportProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.cs new file mode 100644 index 000000000000..41d967804c3a --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.cs @@ -0,0 +1,444 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Storage task execution report for a run instance. + public partial class StorageTaskReportProperties : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal + { + + /// Backing field for property. + private string _finishTime; + + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string FinishTime { get => this._finishTime; } + + /// Internal Acessors for FinishTime + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal.FinishTime { get => this._finishTime; set { {_finishTime = value;} } } + + /// Internal Acessors for ObjectFailedCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal.ObjectFailedCount { get => this._objectFailedCount; set { {_objectFailedCount = value;} } } + + /// Internal Acessors for ObjectsOperatedOnCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal.ObjectsOperatedOnCount { get => this._objectsOperatedOnCount; set { {_objectsOperatedOnCount = value;} } } + + /// Internal Acessors for ObjectsSucceededCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal.ObjectsSucceededCount { get => this._objectsSucceededCount; set { {_objectsSucceededCount = value;} } } + + /// Internal Acessors for ObjectsTargetedCount + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal.ObjectsTargetedCount { get => this._objectsTargetedCount; set { {_objectsTargetedCount = value;} } } + + /// Internal Acessors for RunResult + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal.RunResult { get => this._runResult; set { {_runResult = value;} } } + + /// Internal Acessors for RunStatusEnum + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal.RunStatusEnum { get => this._runStatusEnum; set { {_runStatusEnum = value;} } } + + /// Internal Acessors for RunStatusError + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal.RunStatusError { get => this._runStatusError; set { {_runStatusError = value;} } } + + /// Internal Acessors for StartTime + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal.StartTime { get => this._startTime; set { {_startTime = value;} } } + + /// Internal Acessors for StorageAccountId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal.StorageAccountId { get => this._storageAccountId; set { {_storageAccountId = value;} } } + + /// Internal Acessors for SummaryReportPath + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal.SummaryReportPath { get => this._summaryReportPath; set { {_summaryReportPath = value;} } } + + /// Internal Acessors for TaskAssignmentId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal.TaskAssignmentId { get => this._taskAssignmentId; set { {_taskAssignmentId = value;} } } + + /// Internal Acessors for TaskId + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal.TaskId { get => this._taskId; set { {_taskId = value;} } } + + /// Internal Acessors for TaskVersion + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportPropertiesInternal.TaskVersion { get => this._taskVersion; set { {_taskVersion = value;} } } + + /// Backing field for property. + private string _objectFailedCount; + + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string ObjectFailedCount { get => this._objectFailedCount; } + + /// Backing field for property. + private string _objectsOperatedOnCount; + + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string ObjectsOperatedOnCount { get => this._objectsOperatedOnCount; } + + /// Backing field for property. + private string _objectsSucceededCount; + + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string ObjectsSucceededCount { get => this._objectsSucceededCount; } + + /// Backing field for property. + private string _objectsTargetedCount; + + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string ObjectsTargetedCount { get => this._objectsTargetedCount; } + + /// Backing field for property. + private string _runResult; + + /// Represents the overall result of the execution for the run instance + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string RunResult { get => this._runResult; } + + /// Backing field for property. + private string _runStatusEnum; + + /// Represents the status of the execution. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string RunStatusEnum { get => this._runStatusEnum; } + + /// Backing field for property. + private string _runStatusError; + + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string RunStatusError { get => this._runStatusError; } + + /// Backing field for property. + private string _startTime; + + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string StartTime { get => this._startTime; } + + /// Backing field for property. + private string _storageAccountId; + + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string StorageAccountId { get => this._storageAccountId; } + + /// Backing field for property. + private string _summaryReportPath; + + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string SummaryReportPath { get => this._summaryReportPath; } + + /// Backing field for property. + private string _taskAssignmentId; + + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string TaskAssignmentId { get => this._taskAssignmentId; } + + /// Backing field for property. + private string _taskId; + + /// Storage Task Arm Id. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string TaskId { get => this._taskId; } + + /// Backing field for property. + private string _taskVersion; + + /// Storage Task Version + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string TaskVersion { get => this._taskVersion; } + + /// Creates an new instance. + public StorageTaskReportProperties() + { + + } + } + /// Storage task execution report for a run instance. + public partial interface IStorageTaskReportProperties : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable + { + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"finishTime", + PossibleTypes = new [] { typeof(string) })] + string FinishTime { get; } + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectFailedCount", + PossibleTypes = new [] { typeof(string) })] + string ObjectFailedCount { get; } + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsOperatedOnCount", + PossibleTypes = new [] { typeof(string) })] + string ObjectsOperatedOnCount { get; } + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsSucceededCount", + PossibleTypes = new [] { typeof(string) })] + string ObjectsSucceededCount { get; } + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"objectsTargetedCount", + PossibleTypes = new [] { typeof(string) })] + string ObjectsTargetedCount { get; } + /// Represents the overall result of the execution for the run instance + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the overall result of the execution for the run instance", + SerializedName = @"runResult", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Succeeded", "Failed")] + string RunResult { get; } + /// Represents the status of the execution. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the status of the execution.", + SerializedName = @"runStatusEnum", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("InProgress", "Finished")] + string RunStatusEnum { get; } + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Well known Azure Storage error code that represents the error encountered during execution of the run instance.", + SerializedName = @"runStatusError", + PossibleTypes = new [] { typeof(string) })] + string RunStatusError { get; } + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(string) })] + string StartTime { get; } + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the Storage Account Id where the storage task definition was applied and executed.", + SerializedName = @"storageAccountId", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountId { get; } + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Full path to the verbose report stored in the reporting container as specified in the assignment execution context for the storage account. ", + SerializedName = @"summaryReportPath", + PossibleTypes = new [] { typeof(string) })] + string SummaryReportPath { get; } + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the Storage Task Assignment Id associated with the storage task that provided an execution context.", + SerializedName = @"taskAssignmentId", + PossibleTypes = new [] { typeof(string) })] + string TaskAssignmentId { get; } + /// Storage Task Arm Id. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Storage Task Arm Id.", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + string TaskId { get; } + /// Storage Task Version + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Storage Task Version", + SerializedName = @"taskVersion", + PossibleTypes = new [] { typeof(string) })] + string TaskVersion { get; } + + } + /// Storage task execution report for a run instance. + internal partial interface IStorageTaskReportPropertiesInternal + + { + /// + /// End time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string FinishTime { get; set; } + /// + /// Total number of objects where task operation failed when was attempted. Filter options such as objectFailedCount eq 0 + /// and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string ObjectFailedCount { get; set; } + /// + /// Total number of objects that meet the storage tasks condition and were operated upon. Filter options such as objectsOperatedOnCount + /// ge 100 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string ObjectsOperatedOnCount { get; set; } + /// + /// Total number of objects where task operation succeeded when was attempted.Filter options such as objectsSucceededCount + /// gt 150 and other comparison operators can be used as described for Numerical properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string ObjectsSucceededCount { get; set; } + /// + /// Total number of objects that meet the condition as defined in the storage task assignment execution context. Filter options + /// such as objectsTargetedCount gt 50 and other comparison operators can be used as described for Numerical properties in + /// https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string ObjectsTargetedCount { get; set; } + /// Represents the overall result of the execution for the run instance + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Succeeded", "Failed")] + string RunResult { get; set; } + /// Represents the status of the execution. + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("InProgress", "Finished")] + string RunStatusEnum { get; set; } + /// + /// Well known Azure Storage error code that represents the error encountered during execution of the run instance. + /// + string RunStatusError { get; set; } + /// + /// Start time of the run instance. Filter options such as startTime gt '2023-06-26T20:51:24.4494016Z' and other comparison + /// operators can be used as described for DateTime properties in https://learn.microsoft.com/en-us/rest/api/storageservices/querying-tables-and-entities#supported-comparison-operators + /// + string StartTime { get; set; } + /// + /// Represents the Storage Account Id where the storage task definition was applied and executed. + /// + string StorageAccountId { get; set; } + /// + /// Full path to the verbose report stored in the reporting container as specified in the assignment execution context for + /// the storage account. + /// + string SummaryReportPath { get; set; } + /// + /// Represents the Storage Task Assignment Id associated with the storage task that provided an execution context. + /// + string TaskAssignmentId { get; set; } + /// Storage Task Arm Id. + string TaskId { get; set; } + /// Storage Task Version + string TaskVersion { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.json.cs new file mode 100644 index 000000000000..a7a5655b8af4 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportProperties.json.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Storage task execution report for a run instance. + public partial class StorageTaskReportProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new StorageTaskReportProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal StorageTaskReportProperties(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_taskAssignmentId = If( json?.PropertyT("taskAssignmentId"), out var __jsonTaskAssignmentId) ? (string)__jsonTaskAssignmentId : (string)_taskAssignmentId;} + {_storageAccountId = If( json?.PropertyT("storageAccountId"), out var __jsonStorageAccountId) ? (string)__jsonStorageAccountId : (string)_storageAccountId;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? (string)__jsonStartTime : (string)_startTime;} + {_finishTime = If( json?.PropertyT("finishTime"), out var __jsonFinishTime) ? (string)__jsonFinishTime : (string)_finishTime;} + {_objectsTargetedCount = If( json?.PropertyT("objectsTargetedCount"), out var __jsonObjectsTargetedCount) ? (string)__jsonObjectsTargetedCount : (string)_objectsTargetedCount;} + {_objectsOperatedOnCount = If( json?.PropertyT("objectsOperatedOnCount"), out var __jsonObjectsOperatedOnCount) ? (string)__jsonObjectsOperatedOnCount : (string)_objectsOperatedOnCount;} + {_objectFailedCount = If( json?.PropertyT("objectFailedCount"), out var __jsonObjectFailedCount) ? (string)__jsonObjectFailedCount : (string)_objectFailedCount;} + {_objectsSucceededCount = If( json?.PropertyT("objectsSucceededCount"), out var __jsonObjectsSucceededCount) ? (string)__jsonObjectsSucceededCount : (string)_objectsSucceededCount;} + {_runStatusError = If( json?.PropertyT("runStatusError"), out var __jsonRunStatusError) ? (string)__jsonRunStatusError : (string)_runStatusError;} + {_runStatusEnum = If( json?.PropertyT("runStatusEnum"), out var __jsonRunStatusEnum) ? (string)__jsonRunStatusEnum : (string)_runStatusEnum;} + {_summaryReportPath = If( json?.PropertyT("summaryReportPath"), out var __jsonSummaryReportPath) ? (string)__jsonSummaryReportPath : (string)_summaryReportPath;} + {_taskId = If( json?.PropertyT("taskId"), out var __jsonTaskId) ? (string)__jsonTaskId : (string)_taskId;} + {_taskVersion = If( json?.PropertyT("taskVersion"), out var __jsonTaskVersion) ? (string)__jsonTaskVersion : (string)_taskVersion;} + {_runResult = If( json?.PropertyT("runResult"), out var __jsonRunResult) ? (string)__jsonRunResult : (string)_runResult;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._taskAssignmentId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._taskAssignmentId.ToString()) : null, "taskAssignmentId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._storageAccountId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._storageAccountId.ToString()) : null, "storageAccountId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._startTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._startTime.ToString()) : null, "startTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._finishTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._finishTime.ToString()) : null, "finishTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._objectsTargetedCount)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._objectsTargetedCount.ToString()) : null, "objectsTargetedCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._objectsOperatedOnCount)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._objectsOperatedOnCount.ToString()) : null, "objectsOperatedOnCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._objectFailedCount)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._objectFailedCount.ToString()) : null, "objectFailedCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._objectsSucceededCount)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._objectsSucceededCount.ToString()) : null, "objectsSucceededCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._runStatusError)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._runStatusError.ToString()) : null, "runStatusError" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._runStatusEnum)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._runStatusEnum.ToString()) : null, "runStatusEnum" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._summaryReportPath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._summaryReportPath.ToString()) : null, "summaryReportPath" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._taskId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._taskId.ToString()) : null, "taskId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._taskVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._taskVersion.ToString()) : null, "taskVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._runResult)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._runResult.ToString()) : null, "runResult" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.PowerShell.cs new file mode 100644 index 000000000000..70bb1b6579e1 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// Fetch Storage Tasks Run Summary. + [System.ComponentModel.TypeConverter(typeof(StorageTaskReportSummaryTypeConverter))] + public partial class StorageTaskReportSummary + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageTaskReportSummary(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageTaskReportSummary(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageTaskReportSummary(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummaryInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummaryInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportInstanceTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummaryInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummaryInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StorageTaskReportSummary(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummaryInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummaryInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportInstanceTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummaryInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummaryInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Fetch Storage Tasks Run Summary. + [System.ComponentModel.TypeConverter(typeof(StorageTaskReportSummaryTypeConverter))] + public partial interface IStorageTaskReportSummary + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.TypeConverter.cs new file mode 100644 index 000000000000..614c85086411 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StorageTaskReportSummaryTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StorageTaskReportSummary.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StorageTaskReportSummary.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StorageTaskReportSummary.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.cs new file mode 100644 index 000000000000..e0ddeeb39eba --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Fetch Storage Tasks Run Summary. + public partial class StorageTaskReportSummary : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummaryInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummaryInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummaryInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// + /// Request URL that can be used to query next page of storage task run results summary. Returned when the number of run instances + /// and summary reports exceed maximum page size. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// Gets storage tasks run result summary. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public StorageTaskReportSummary() + { + + } + } + /// Fetch Storage Tasks Run Summary. + public partial interface IStorageTaskReportSummary : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable + { + /// + /// Request URL that can be used to query next page of storage task run results summary. Returned when the number of run instances + /// and summary reports exceed maximum page size. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Request URL that can be used to query next page of storage task run results summary. Returned when the number of run instances and summary reports exceed maximum page size.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// Gets storage tasks run result summary. + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Gets storage tasks run result summary.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance) })] + System.Collections.Generic.List Value { get; } + + } + /// Fetch Storage Tasks Run Summary. + internal partial interface IStorageTaskReportSummaryInternal + + { + /// + /// Request URL that can be used to query next page of storage task run results summary. Returned when the number of run instances + /// and summary reports exceed maximum page size. + /// + string NextLink { get; set; } + /// Gets storage tasks run result summary. + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.json.cs new file mode 100644 index 000000000000..6a324102782f --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/StorageTaskReportSummary.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// Fetch Storage Tasks Run Summary. + public partial class StorageTaskReportSummary + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new StorageTaskReportSummary(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal StorageTaskReportSummary(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance) (Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportInstance.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.PowerShell.cs new file mode 100644 index 000000000000..62f0454667af --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// The trigger parameters update for the storage task assignment execution + [System.ComponentModel.TypeConverter(typeof(TriggerParametersTypeConverter))] + public partial class TriggerParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TriggerParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TriggerParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TriggerParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TriggerParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + } + /// The trigger parameters update for the storage task assignment execution + [System.ComponentModel.TypeConverter(typeof(TriggerParametersTypeConverter))] + public partial interface ITriggerParameters + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.TypeConverter.cs new file mode 100644 index 000000000000..1dabee654943 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TriggerParametersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TriggerParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TriggerParameters.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TriggerParameters.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.cs b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.cs new file mode 100644 index 000000000000..36ab490912c3 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// The trigger parameters update for the storage task assignment execution + public partial class TriggerParameters : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersInternal + { + + /// Backing field for property. + private global::System.DateTime? _endBy; + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public global::System.DateTime? EndBy { get => this._endBy; set => this._endBy = value; } + + /// Backing field for property. + private int? _interval; + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public int? Interval { get => this._interval; set => this._interval = value; } + + /// Backing field for property. + private string _intervalUnit; + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string IntervalUnit { get => this._intervalUnit; set => this._intervalUnit = value; } + + /// Backing field for property. + private global::System.DateTime? _startFrom; + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public global::System.DateTime? StartFrom { get => this._startFrom; set => this._startFrom = value; } + + /// Backing field for property. + private global::System.DateTime? _startOn; + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public global::System.DateTime? StartOn { get => this._startOn; set => this._startOn = value; } + + /// Creates an new instance. + public TriggerParameters() + { + + } + } + /// The trigger parameters update for the storage task assignment execution + public partial interface ITriggerParameters : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable + { + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"endBy", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + int? Interval { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"intervalUnit", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startFrom", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startOn", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartOn { get; set; } + + } + /// The trigger parameters update for the storage task assignment execution + internal partial interface ITriggerParametersInternal + + { + /// + /// 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' + /// + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + int? Interval { get; set; } + /// + /// 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' + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartOn { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.json.cs new file mode 100644 index 000000000000..5bf20204079a --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParameters.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// The trigger parameters update for the storage task assignment execution + public partial class TriggerParameters + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new TriggerParameters(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._startFrom ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._startFrom?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startFrom" ,container.Add ); + AddIf( null != this._interval ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNumber((int)this._interval) : null, "interval" ,container.Add ); + AddIf( null != (((object)this._intervalUnit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._intervalUnit.ToString()) : null, "intervalUnit" ,container.Add ); + AddIf( null != this._endBy ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._endBy?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endBy" ,container.Add ); + AddIf( null != this._startOn ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._startOn?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startOn" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal TriggerParameters(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_startFrom = If( json?.PropertyT("startFrom"), out var __jsonStartFrom) ? global::System.DateTime.TryParse((string)__jsonStartFrom, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartFromValue) ? __jsonStartFromValue : _startFrom : _startFrom;} + {_interval = If( json?.PropertyT("interval"), out var __jsonInterval) ? (int?)__jsonInterval : _interval;} + {_intervalUnit = If( json?.PropertyT("intervalUnit"), out var __jsonIntervalUnit) ? (string)__jsonIntervalUnit : (string)_intervalUnit;} + {_endBy = If( json?.PropertyT("endBy"), out var __jsonEndBy) ? global::System.DateTime.TryParse((string)__jsonEndBy, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndByValue) ? __jsonEndByValue : _endBy : _endBy;} + {_startOn = If( json?.PropertyT("startOn"), out var __jsonStartOn) ? global::System.DateTime.TryParse((string)__jsonStartOn, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartOnValue) ? __jsonStartOnValue : _startOn : _startOn;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.PowerShell.cs b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.PowerShell.cs new file mode 100644 index 000000000000..728d349ffb40 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// The trigger parameters update for the storage task assignment execution + [System.ComponentModel.TypeConverter(typeof(TriggerParametersUpdateTypeConverter))] + public partial class TriggerParametersUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TriggerParametersUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TriggerParametersUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TriggerParametersUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TriggerParametersUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StartFrom")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).StartFrom = (global::System.DateTime?) content.GetValueForProperty("StartFrom",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).StartFrom, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Interval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).Interval = (int?) content.GetValueForProperty("Interval",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).Interval, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IntervalUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).IntervalUnit = (string) content.GetValueForProperty("IntervalUnit",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).IntervalUnit, global::System.Convert.ToString); + } + if (content.Contains("EndBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).EndBy = (global::System.DateTime?) content.GetValueForProperty("EndBy",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).EndBy, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("StartOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).StartOn = (global::System.DateTime?) content.GetValueForProperty("StartOn",((Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal)this).StartOn, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + } + /// The trigger parameters update for the storage task assignment execution + [System.ComponentModel.TypeConverter(typeof(TriggerParametersUpdateTypeConverter))] + public partial interface ITriggerParametersUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.TypeConverter.cs b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.TypeConverter.cs new file mode 100644 index 000000000000..06b50f71081d --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TriggerParametersUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TriggerParametersUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TriggerParametersUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TriggerParametersUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.cs b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.cs new file mode 100644 index 000000000000..a21242d16683 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// The trigger parameters update for the storage task assignment execution + public partial class TriggerParametersUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdateInternal + { + + /// Backing field for property. + private global::System.DateTime? _endBy; + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public global::System.DateTime? EndBy { get => this._endBy; set => this._endBy = value; } + + /// Backing field for property. + private int? _interval; + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public int? Interval { get => this._interval; set => this._interval = value; } + + /// Backing field for property. + private string _intervalUnit; + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public string IntervalUnit { get => this._intervalUnit; set => this._intervalUnit = value; } + + /// Backing field for property. + private global::System.DateTime? _startFrom; + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public global::System.DateTime? StartFrom { get => this._startFrom; set => this._startFrom = value; } + + /// Backing field for property. + private global::System.DateTime? _startOn; + + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Origin(Microsoft.Azure.PowerShell.Cmdlets.Storage.PropertyOrigin.Owned)] + public global::System.DateTime? StartOn { get => this._startOn; set => this._startOn = value; } + + /// Creates an new instance. + public TriggerParametersUpdate() + { + + } + } + /// The trigger parameters update for the storage task assignment execution + public partial interface ITriggerParametersUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IJsonSerializable + { + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"endBy", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + int? Interval { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"intervalUnit", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startFrom", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"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'", + SerializedName = @"startOn", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartOn { get; set; } + + } + /// The trigger parameters update for the storage task assignment execution + internal partial interface ITriggerParametersUpdateInternal + + { + /// + /// 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' + /// + global::System.DateTime? EndBy { get; set; } + /// + /// 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' + /// + int? Interval { get; set; } + /// + /// 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' + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + string IntervalUnit { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartFrom { get; set; } + /// + /// 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' + /// + global::System.DateTime? StartOn { get; set; } + + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.json.cs b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.json.cs new file mode 100644 index 000000000000..f0d5e25bd1e9 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/api/Models/TriggerParametersUpdate.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + + /// The trigger parameters update for the storage task assignment execution + public partial class TriggerParametersUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ITriggerParametersUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json ? new TriggerParametersUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._startFrom ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._startFrom?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startFrom" ,container.Add ); + AddIf( null != this._interval ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNumber((int)this._interval) : null, "interval" ,container.Add ); + AddIf( null != (((object)this._intervalUnit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._intervalUnit.ToString()) : null, "intervalUnit" ,container.Add ); + AddIf( null != this._endBy ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._endBy?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endBy" ,container.Add ); + AddIf( null != this._startOn ? (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonString(this._startOn?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startOn" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject instance to deserialize from. + internal TriggerParametersUpdate(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_startFrom = If( json?.PropertyT("startFrom"), out var __jsonStartFrom) ? global::System.DateTime.TryParse((string)__jsonStartFrom, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartFromValue) ? __jsonStartFromValue : _startFrom : _startFrom;} + {_interval = If( json?.PropertyT("interval"), out var __jsonInterval) ? (int?)__jsonInterval : _interval;} + {_intervalUnit = If( json?.PropertyT("intervalUnit"), out var __jsonIntervalUnit) ? (string)__jsonIntervalUnit : (string)_intervalUnit;} + {_endBy = If( json?.PropertyT("endBy"), out var __jsonEndBy) ? global::System.DateTime.TryParse((string)__jsonEndBy, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndByValue) ? __jsonEndByValue : _endBy : _endBy;} + {_startOn = If( json?.PropertyT("startOn"), out var __jsonStartOn) ? global::System.DateTime.TryParse((string)__jsonStartOn, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartOnValue) ? __jsonStartOnValue : _startOn : _startOn;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/api/Storage.cs b/src/Storage/Storage.Autorest/generated/api/Storage.cs index d62f170df5ae..12ec6be303d7 100644 --- a/src/Storage/Storage.Autorest/generated/api/Storage.cs +++ b/src/Storage/Storage.Autorest/generated/api/Storage.cs @@ -32,7 +32,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task BlobInventoryPoliciesCreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IBlobInventoryPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { var blobInventoryPolicyName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -81,7 +81,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task BlobInventoryPoliciesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IBlobInventoryPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -141,7 +141,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task BlobInventoryPoliciesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IBlobInventoryPolicy body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -206,7 +206,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task BlobInventoryPoliciesCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { var blobInventoryPolicyName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -256,7 +256,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task BlobInventoryPoliciesCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { var blobInventoryPolicyName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -307,7 +307,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task BlobInventoryPoliciesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IBlobInventoryPolicy body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { var blobInventoryPolicyName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -507,7 +507,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task BlobInventoryPoliciesDelete(string subscriptionId, string resourceGroupName, string accountName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { var blobInventoryPolicyName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -553,7 +553,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task BlobInventoryPoliciesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -699,7 +699,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task BlobInventoryPoliciesGet(string subscriptionId, string resourceGroupName, string accountName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { var blobInventoryPolicyName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -742,7 +742,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task BlobInventoryPoliciesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -796,7 +796,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task BlobInventoryPoliciesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -854,7 +854,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task BlobInventoryPoliciesGetWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { var blobInventoryPolicyName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1039,7 +1039,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task BlobInventoryPoliciesList(string subscriptionId, string resourceGroupName, string accountName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1081,7 +1081,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task BlobInventoryPoliciesListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1133,7 +1133,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task BlobInventoryPoliciesListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1188,7 +1188,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task BlobInventoryPoliciesListWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1373,7 +1373,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task DeletedAccountsGet(string subscriptionId, string deletedAccountName, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1414,7 +1414,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task DeletedAccountsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1465,7 +1465,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task DeletedAccountsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1518,7 +1518,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task DeletedAccountsGetWithResult(string subscriptionId, string deletedAccountName, string location, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1693,7 +1693,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task DeletedAccountsList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1731,7 +1731,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task DeletedAccountsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1777,7 +1777,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task DeletedAccountsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1823,7 +1823,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task DeletedAccountsListWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1995,7 +1995,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesGet(string subscriptionId, string resourceGroupName, string accountName, string encryptionScopeName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2038,7 +2038,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2092,7 +2092,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2152,7 +2152,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesGetWithResult(string subscriptionId, string resourceGroupName, string accountName, string encryptionScopeName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2345,7 +2345,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesList(string subscriptionId, string resourceGroupName, string accountName, int? Maxpagesize, string Filter, string Include, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2395,7 +2395,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesListViaIdentity(global::System.String viaIdentity, int? Maxpagesize, string Filter, string Include, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2457,7 +2457,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesListViaIdentityWithResult(global::System.String viaIdentity, int? Maxpagesize, string Filter, string Include, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2522,7 +2522,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesListWithResult(string subscriptionId, string resourceGroupName, string accountName, int? Maxpagesize, string Filter, string Include, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2710,7 +2710,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesPatch(string subscriptionId, string resourceGroupName, string accountName, string encryptionScopeName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IEncryptionScope body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2762,7 +2762,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesPatchViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IEncryptionScope body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2825,7 +2825,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesPatchViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IEncryptionScope body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2895,7 +2895,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesPatchViaJsonString(string subscriptionId, string resourceGroupName, string accountName, string encryptionScopeName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2950,7 +2950,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesPatchViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string accountName, string encryptionScopeName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3006,7 +3006,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesPatchWithResult(string subscriptionId, string resourceGroupName, string accountName, string encryptionScopeName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IEncryptionScope body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3214,7 +3214,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesPut(string subscriptionId, string resourceGroupName, string accountName, string encryptionScopeName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IEncryptionScope body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3268,7 +3268,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesPutViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IEncryptionScope body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3332,7 +3332,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesPutViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IEncryptionScope body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3404,7 +3404,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesPutViaJsonString(string subscriptionId, string resourceGroupName, string accountName, string encryptionScopeName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3460,7 +3460,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesPutViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string accountName, string encryptionScopeName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3517,7 +3517,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task EncryptionScopesPutWithResult(string subscriptionId, string resourceGroupName, string accountName, string encryptionScopeName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IEncryptionScope body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3713,7 +3713,10 @@ public partial class Storage } } - /// Update the properties of a local user associated with the storage account + /// + /// Update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended + /// groups cannot be set with other properties. + /// /// The ID of the target subscription. /// The name of the resource group within the user's subscription. The name is case insensitive. /// The name of the storage account within the specified resource group. Storage account names must @@ -3732,7 +3735,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersCreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string username, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUser body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3767,7 +3770,10 @@ public partial class Storage } } - /// Update the properties of a local user associated with the storage account + /// + /// Update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended + /// groups cannot be set with other properties. + /// /// /// The local user associated with a storage account. /// a delegate that is called when the remote service returns 200 (OK). @@ -3781,7 +3787,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUser body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3829,7 +3835,10 @@ public partial class Storage } } - /// Update the properties of a local user associated with the storage account + /// + /// Update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended + /// groups cannot be set with other properties. + /// /// /// The local user associated with a storage account. /// an instance that will receive events. @@ -3841,7 +3850,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUser body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3889,7 +3898,10 @@ public partial class Storage } } - /// Update the properties of a local user associated with the storage account + /// + /// Update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended + /// groups cannot be set with other properties. + /// /// The ID of the target subscription. /// The name of the resource group within the user's subscription. The name is case insensitive. /// The name of the storage account within the specified resource group. Storage account names must @@ -3907,7 +3919,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string accountName, string username, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3942,7 +3954,10 @@ public partial class Storage } } - /// Update the properties of a local user associated with the storage account + /// + /// Update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended + /// groups cannot be set with other properties. + /// /// The ID of the target subscription. /// The name of the resource group within the user's subscription. The name is case insensitive. /// The name of the storage account within the specified resource group. Storage account names must @@ -3958,7 +3973,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string accountName, string username, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3993,7 +4008,10 @@ public partial class Storage } } - /// Update the properties of a local user associated with the storage account + /// + /// Update the properties of a local user associated with the storage account. Properties for NFSv3 enablement and extended + /// groups cannot be set with other properties. + /// /// The ID of the target subscription. /// The name of the resource group within the user's subscription. The name is case insensitive. /// The name of the storage account within the specified resource group. Storage account names must @@ -4010,7 +4028,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string accountName, string username, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ILocalUser body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4210,7 +4228,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersDelete(string subscriptionId, string resourceGroupName, string accountName, string username, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4254,7 +4272,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4406,7 +4424,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersGet(string subscriptionId, string resourceGroupName, string accountName, string username, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4449,7 +4467,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4503,7 +4521,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4562,7 +4580,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersGetWithResult(string subscriptionId, string resourceGroupName, string accountName, string username, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4742,6 +4760,10 @@ public partial class Storage /// The name of the resource group within the user's subscription. The name is case insensitive. /// 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. + /// Optional, specifies the maximum number of local users that will be included in the list response. + /// Optional. When specified, only local user names starting with the filter will be listed. + /// Optional, when specified, will list local users enabled for the specific protocol. Lists all users + /// by default. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -4750,9 +4772,9 @@ public partial class Storage /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task LocalUsersList(string subscriptionId, string resourceGroupName, string accountName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task LocalUsersList(string subscriptionId, string resourceGroupName, string accountName, int? Maxpagesize, string Filter, string Include, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4767,6 +4789,12 @@ public partial class Storage + "/localUsers" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(Include) ? global::System.String.Empty : "$include=" + global::System.Uri.EscapeDataString(Include)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -4799,7 +4827,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersListKeys(string subscriptionId, string resourceGroupName, string accountName, string username, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4843,7 +4871,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersListKeysViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4898,7 +4926,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersListKeysViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4958,7 +4986,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersListKeysWithResult(string subscriptionId, string resourceGroupName, string accountName, string username, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5136,6 +5164,10 @@ public partial class Storage /// List the local users associated with the storage account. /// + /// Optional, specifies the maximum number of local users that will be included in the list response. + /// Optional. When specified, only local user names starting with the filter will be listed. + /// Optional, when specified, will list local users enabled for the specific protocol. Lists all users + /// by default. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -5144,9 +5176,9 @@ public partial class Storage /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task LocalUsersListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task LocalUsersListViaIdentity(global::System.String viaIdentity, int? Maxpagesize, string Filter, string Include, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5173,6 +5205,12 @@ public partial class Storage + "/localUsers" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(Include) ? global::System.String.Empty : "$include=" + global::System.Uri.EscapeDataString(Include)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -5190,15 +5228,19 @@ public partial class Storage /// List the local users associated with the storage account. /// + /// Optional, specifies the maximum number of local users that will be included in the list response. + /// Optional. When specified, only local user names starting with the filter will be listed. + /// Optional, when specified, will list local users enabled for the specific protocol. Lists all users + /// by default. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. /// /// A that /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task LocalUsersListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task LocalUsersListViaIdentityWithResult(global::System.String viaIdentity, int? Maxpagesize, string Filter, string Include, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5225,6 +5267,12 @@ public partial class Storage + "/localUsers" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(Include) ? global::System.String.Empty : "$include=" + global::System.Uri.EscapeDataString(Include)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } @@ -5245,15 +5293,19 @@ public partial class Storage /// The name of the resource group within the user's subscription. The name is case insensitive. /// 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. + /// Optional, specifies the maximum number of local users that will be included in the list response. + /// Optional. When specified, only local user names starting with the filter will be listed. + /// Optional, when specified, will list local users enabled for the specific protocol. Lists all users + /// by default. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. /// /// A that /// will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task LocalUsersListWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task LocalUsersListWithResult(string subscriptionId, string resourceGroupName, string accountName, int? Maxpagesize, string Filter, string Include, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5268,6 +5320,12 @@ public partial class Storage + "/localUsers" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + (string.IsNullOrEmpty(Include) ? global::System.String.Empty : "$include=" + global::System.Uri.EscapeDataString(Include)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } @@ -5401,11 +5459,15 @@ public partial class Storage /// The name of the resource group within the user's subscription. The name is case insensitive. /// 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. + /// Optional, specifies the maximum number of local users that will be included in the list response. + /// Optional. When specified, only local user names starting with the filter will be listed. + /// Optional, when specified, will list local users enabled for the specific protocol. Lists all users + /// by default. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task LocalUsersList_Validate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task LocalUsersList_Validate(string subscriptionId, string resourceGroupName, string accountName, int? Maxpagesize, string Filter, string Include, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -5419,6 +5481,10 @@ public partial class Storage await eventListener.AssertMinimumLength(nameof(accountName),accountName,3); await eventListener.AssertMaximumLength(nameof(accountName),accountName,24); await eventListener.AssertRegEx(nameof(accountName), accountName, @"^[a-z0-9]+$"); + await eventListener.AssertIsGreaterThanOrEqual(nameof(Maxpagesize),Maxpagesize,1); + await eventListener.AssertIsLessThanOrEqual(nameof(Maxpagesize),Maxpagesize,5000); + await eventListener.AssertNotNull(nameof(Filter),Filter); + await eventListener.AssertNotNull(nameof(Include),Include); } } @@ -5439,7 +5505,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersRegeneratePassword(string subscriptionId, string resourceGroupName, string accountName, string username, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5483,7 +5549,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersRegeneratePasswordViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5538,7 +5604,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersRegeneratePasswordViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5598,7 +5664,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task LocalUsersRegeneratePasswordWithResult(string subscriptionId, string resourceGroupName, string accountName, string username, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5792,7 +5858,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task ManagementPoliciesCreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IManagementPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { var managementPolicyName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5839,7 +5905,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ManagementPoliciesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IManagementPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5899,7 +5965,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ManagementPoliciesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IManagementPolicy body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5962,7 +6028,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task ManagementPoliciesCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { var managementPolicyName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6012,7 +6078,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task ManagementPoliciesCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { var managementPolicyName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6063,7 +6129,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task ManagementPoliciesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IManagementPolicy body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { var managementPolicyName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6239,7 +6305,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task ManagementPoliciesDelete(string subscriptionId, string resourceGroupName, string accountName, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { var managementPolicyName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6281,7 +6347,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ManagementPoliciesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6421,7 +6487,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task ManagementPoliciesGet(string subscriptionId, string resourceGroupName, string accountName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { var managementPolicyName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6462,7 +6528,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ManagementPoliciesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6516,7 +6582,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ManagementPoliciesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6574,7 +6640,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task ManagementPoliciesGetWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { var managementPolicyName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6746,7 +6812,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesCreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string objectReplicationPolicyId, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IObjectReplicationPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6795,7 +6861,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IObjectReplicationPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6855,7 +6921,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IObjectReplicationPolicy body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6922,7 +6988,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string accountName, string objectReplicationPolicyId, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6974,7 +7040,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string accountName, string objectReplicationPolicyId, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7027,7 +7093,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string accountName, string objectReplicationPolicyId, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IObjectReplicationPolicy body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7234,7 +7300,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesDelete(string subscriptionId, string resourceGroupName, string accountName, string objectReplicationPolicyId, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7280,7 +7346,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7433,7 +7499,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesGet(string subscriptionId, string resourceGroupName, string accountName, string objectReplicationPolicyId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7476,7 +7542,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7530,7 +7596,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7590,7 +7656,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesGetWithResult(string subscriptionId, string resourceGroupName, string accountName, string objectReplicationPolicyId, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7782,7 +7848,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesList(string subscriptionId, string resourceGroupName, string accountName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7824,7 +7890,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7876,7 +7942,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7931,7 +7997,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task ObjectReplicationPoliciesListWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8111,7 +8177,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8145,7 +8211,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8188,7 +8254,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8230,7 +8296,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8381,7 +8447,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete(string subscriptionId, string resourceGroupName, string accountName, string privateEndpointConnectionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8427,7 +8493,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8577,7 +8643,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet(string subscriptionId, string resourceGroupName, string accountName, string privateEndpointConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8622,7 +8688,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8678,7 +8744,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8738,7 +8804,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetWithResult(string subscriptionId, string resourceGroupName, string accountName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8925,7 +8991,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsList(string subscriptionId, string resourceGroupName, string accountName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8965,7 +9031,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9017,7 +9083,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9072,7 +9138,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9245,7 +9311,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsPut(string subscriptionId, string resourceGroupName, string accountName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9296,7 +9362,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsPutViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9358,7 +9424,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsPutViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9425,7 +9491,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsPutViaJsonString(string subscriptionId, string resourceGroupName, string accountName, string privateEndpointConnectionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9477,7 +9543,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsPutViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string accountName, string privateEndpointConnectionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9530,7 +9596,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsPutWithResult(string subscriptionId, string resourceGroupName, string accountName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9724,7 +9790,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateLinkResourcesListByStorageAccount(string subscriptionId, string resourceGroupName, string accountName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9764,7 +9830,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateLinkResourcesListByStorageAccountViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9816,7 +9882,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateLinkResourcesListByStorageAccountViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9871,7 +9937,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task PrivateLinkResourcesListByStorageAccountWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10036,7 +10102,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task SkusList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10072,7 +10138,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task SkusListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10118,7 +10184,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task SkusListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10164,7 +10230,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task SkusListWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10315,7 +10381,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsAbortHierarchicalNamespaceMigration(string subscriptionId, string resourceGroupName, string accountName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10357,7 +10423,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsAbortHierarchicalNamespaceMigrationViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10429,6 +10495,7 @@ public partial class Storage var _finalUri = _response.GetFirstHeader(@"Location"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // delay before making the next polling request @@ -10441,7 +10508,10 @@ public partial class Storage if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); // and let's look at the current response body and see if we have some information we can give back to the listener @@ -10582,7 +10652,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsCheckNameAvailability(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCheckNameAvailabilityParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10625,7 +10695,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsCheckNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCheckNameAvailabilityParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10678,7 +10748,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsCheckNameAvailabilityViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCheckNameAvailabilityParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10729,7 +10799,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsCheckNameAvailabilityViaJsonString(string subscriptionId, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10770,7 +10840,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsCheckNameAvailabilityViaJsonStringWithResult(string subscriptionId, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10813,7 +10883,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsCheckNameAvailabilityWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCheckNameAvailabilityParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10980,7 +11050,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsCreate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11029,7 +11099,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11090,7 +11160,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11153,7 +11223,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsCreateViaJsonString(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11204,7 +11274,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsCreateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11256,7 +11326,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsCreateWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountCreateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11314,6 +11384,7 @@ public partial class Storage // declared final-state-via: default var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // delay before making the next polling request @@ -11326,7 +11397,10 @@ public partial class Storage if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); // and let's look at the current response body and see if we have some information we can give back to the listener @@ -11451,6 +11525,7 @@ public partial class Storage // declared final-state-via: default var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // delay before making the next polling request @@ -11463,7 +11538,10 @@ public partial class Storage if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); // and let's look at the current response body and see if we have some information we can give back to the listener @@ -11617,7 +11695,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsCustomerInitiatedMigration(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountMigration body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11670,7 +11748,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsCustomerInitiatedMigrationViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountMigration body, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11737,7 +11815,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsCustomerInitiatedMigrationViaJsonString(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11801,6 +11879,7 @@ public partial class Storage var _finalUri = _response.GetFirstHeader(@"Location"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // delay before making the next polling request @@ -11813,7 +11892,10 @@ public partial class Storage if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); // and let's look at the current response body and see if we have some information we can give back to the listener @@ -11958,7 +12040,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsDelete(string subscriptionId, string resourceGroupName, string accountName, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11998,7 +12080,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12143,7 +12225,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsFailover(string subscriptionId, string resourceGroupName, string accountName, string failoverType, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12194,7 +12276,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsFailoverViaIdentity(global::System.String viaIdentity, string failoverType, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12264,6 +12346,7 @@ public partial class Storage var _finalUri = _response.GetFirstHeader(@"Location"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // delay before making the next polling request @@ -12276,7 +12359,10 @@ public partial class Storage if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); // and let's look at the current response body and see if we have some information we can give back to the listener @@ -12420,7 +12506,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task StorageAccountsGetCustomerInitiatedMigration(string subscriptionId, string resourceGroupName, string accountName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { var migrationName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12463,7 +12549,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsGetCustomerInitiatedMigrationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12517,7 +12603,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsGetCustomerInitiatedMigrationViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12575,7 +12661,7 @@ public partial class Storage public async global::System.Threading.Tasks.Task StorageAccountsGetCustomerInitiatedMigrationWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { var migrationName = @"default"; - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12767,7 +12853,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsGetProperties(string subscriptionId, string resourceGroupName, string accountName, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12813,7 +12899,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsGetPropertiesViaIdentity(global::System.String viaIdentity, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12871,7 +12957,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsGetPropertiesViaIdentityWithResult(global::System.String viaIdentity, string Expand, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12932,7 +13018,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsGetPropertiesWithResult(string subscriptionId, string resourceGroupName, string accountName, string Expand, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13107,7 +13193,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsHierarchicalNamespaceMigration(string subscriptionId, string resourceGroupName, string accountName, string requestType, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13154,7 +13240,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsHierarchicalNamespaceMigrationViaIdentity(global::System.String viaIdentity, string requestType, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13228,6 +13314,7 @@ public partial class Storage var _finalUri = _response.GetFirstHeader(@"Location"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // delay before making the next polling request @@ -13240,7 +13327,10 @@ public partial class Storage if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); // and let's look at the current response body and see if we have some information we can give back to the listener @@ -13385,7 +13475,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsList(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13426,7 +13516,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListAccountSas(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IAccountSasParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13472,7 +13562,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListAccountSasViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IAccountSasParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13530,7 +13620,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListAccountSasViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IAccountSasParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13590,7 +13680,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListAccountSasViaJsonString(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13638,7 +13728,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListAccountSasViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13687,7 +13777,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListAccountSasWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IAccountSasParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13861,7 +13951,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13902,7 +13992,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13954,7 +14044,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14007,7 +14097,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14168,7 +14258,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListKeys(string subscriptionId, string resourceGroupName, string accountName, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14213,7 +14303,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListKeysViaIdentity(global::System.String viaIdentity, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14270,7 +14360,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListKeysViaIdentityWithResult(global::System.String viaIdentity, string Expand, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14330,7 +14420,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListKeysWithResult(string subscriptionId, string resourceGroupName, string accountName, string Expand, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14500,7 +14590,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListServiceSas(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IServiceSasParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14546,7 +14636,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListServiceSasViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IServiceSasParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14604,7 +14694,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListServiceSasViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IServiceSasParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14664,7 +14754,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListServiceSasViaJsonString(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14712,7 +14802,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListServiceSasViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14761,7 +14851,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListServiceSasWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IServiceSasParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14934,7 +15024,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14983,7 +15073,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15032,7 +15122,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsListWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15185,7 +15275,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsRegenerateKey(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountRegenerateKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15233,7 +15323,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsRegenerateKeyViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountRegenerateKeyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15293,7 +15383,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsRegenerateKeyViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountRegenerateKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15355,7 +15445,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsRegenerateKeyViaJsonString(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15405,7 +15495,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsRegenerateKeyViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15456,7 +15546,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsRegenerateKeyWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountRegenerateKeyParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15631,7 +15721,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsRestoreBlobRanges(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IBlobRestoreParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15677,7 +15767,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsRestoreBlobRangesViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IBlobRestoreParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15735,7 +15825,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsRestoreBlobRangesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IBlobRestoreParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15795,7 +15885,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsRestoreBlobRangesViaJsonString(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15843,7 +15933,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsRestoreBlobRangesViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15892,7 +15982,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsRestoreBlobRangesWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IBlobRestoreParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15954,6 +16044,7 @@ public partial class Storage var _finalUri = _response.GetFirstHeader(@"Location"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // delay before making the next polling request @@ -15966,7 +16057,10 @@ public partial class Storage if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); // and let's look at the current response body and see if we have some information we can give back to the listener @@ -16089,6 +16183,7 @@ public partial class Storage var _finalUri = _response.GetFirstHeader(@"Location"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) { // delay before making the next polling request @@ -16101,7 +16196,10 @@ public partial class Storage if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); // and let's look at the current response body and see if we have some information we can give back to the listener @@ -16243,7 +16341,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsRevokeUserDelegationKeys(string subscriptionId, string resourceGroupName, string accountName, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16283,7 +16381,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsRevokeUserDelegationKeysViaIdentity(global::System.String viaIdentity, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16423,7 +16521,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsUpdate(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16475,7 +16573,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16539,7 +16637,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16605,7 +16703,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16659,7 +16757,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string accountName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16714,7 +16812,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task StorageAccountsUpdateWithResult(string subscriptionId, string resourceGroupName, string accountName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16871,6 +16969,3146 @@ public partial class Storage } } + /// Fetch the report summary of a single storage task assignment's instances + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// Optional, specifies the maximum number of storage task assignment instances to be included in + /// the list response. + /// 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. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentInstancesReportGet(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, int? Maxpagesize, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/storageTaskAssignments/" + + global::System.Uri.EscapeDataString(storageTaskAssignmentName) + + "/reports" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentInstancesReportGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Fetch the report summary of a single storage task assignment's instances + /// + /// Optional, specifies the maximum number of storage task assignment instances to be included in + /// the list response. + /// 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. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentInstancesReportGetViaIdentity(global::System.String viaIdentity, int? Maxpagesize, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Storage/storageAccounts/(?[^/]+)/storageTaskAssignments/(?[^/]+)/reports$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var storageTaskAssignmentName = _match.Groups["storageTaskAssignmentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Storage/storageAccounts/" + + accountName + + "/storageTaskAssignments/" + + storageTaskAssignmentName + + "/reports" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentInstancesReportGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Fetch the report summary of a single storage task assignment's instances + /// + /// Optional, specifies the maximum number of storage task assignment instances to be included in + /// the list response. + /// 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. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentInstancesReportGetViaIdentityWithResult(global::System.String viaIdentity, int? Maxpagesize, string Filter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Storage/storageAccounts/(?[^/]+)/storageTaskAssignments/(?[^/]+)/reports$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var storageTaskAssignmentName = _match.Groups["storageTaskAssignmentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Storage/storageAccounts/" + + accountName + + "/storageTaskAssignments/" + + storageTaskAssignmentName + + "/reports" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageTaskAssignmentInstancesReportGetWithResult_Call (request, eventListener,sender); + } + } + + /// Fetch the report summary of a single storage task assignment's instances + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// Optional, specifies the maximum number of storage task assignment instances to be included in + /// the list response. + /// 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. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentInstancesReportGetWithResult(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, int? Maxpagesize, string Filter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/storageTaskAssignments/" + + global::System.Uri.EscapeDataString(storageTaskAssignmentName) + + "/reports" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageTaskAssignmentInstancesReportGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentInstancesReportGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportSummary.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentInstancesReportGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportSummary.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// Optional, specifies the maximum number of storage task assignment instances to be included in + /// the list response. + /// 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. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentInstancesReportGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, int? Maxpagesize, string Filter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertMinimumLength(nameof(accountName),accountName,3); + await eventListener.AssertMaximumLength(nameof(accountName),accountName,24); + await eventListener.AssertRegEx(nameof(accountName), accountName, @"^[a-z0-9]+$"); + await eventListener.AssertNotNull(nameof(storageTaskAssignmentName),storageTaskAssignmentName); + await eventListener.AssertMinimumLength(nameof(storageTaskAssignmentName),storageTaskAssignmentName,3); + await eventListener.AssertMaximumLength(nameof(storageTaskAssignmentName),storageTaskAssignmentName,24); + await eventListener.AssertRegEx(nameof(storageTaskAssignmentName), storageTaskAssignmentName, @"^[a-z0-9]{3,24}$"); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// + /// Fetch the report summary of all the storage task assignments and instances in an account + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// Optional, specifies the maximum number of storage task assignment instances to be included in + /// the list response. + /// 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. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentInstancesReportList(string subscriptionId, string resourceGroupName, string accountName, int? Maxpagesize, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/reports" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentInstancesReportList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Fetch the report summary of all the storage task assignments and instances in an account + /// + /// + /// Optional, specifies the maximum number of storage task assignment instances to be included in + /// the list response. + /// 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. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentInstancesReportListViaIdentity(global::System.String viaIdentity, int? Maxpagesize, string Filter, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Storage/storageAccounts/(?[^/]+)/reports$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/reports'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Storage/storageAccounts/" + + accountName + + "/reports" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentInstancesReportList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// Fetch the report summary of all the storage task assignments and instances in an account + /// + /// + /// Optional, specifies the maximum number of storage task assignment instances to be included in + /// the list response. + /// 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. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentInstancesReportListViaIdentityWithResult(global::System.String viaIdentity, int? Maxpagesize, string Filter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Storage/storageAccounts/(?[^/]+)/reports$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/reports'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Storage/storageAccounts/" + + accountName + + "/reports" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageTaskAssignmentInstancesReportListWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Fetch the report summary of all the storage task assignments and instances in an account + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// Optional, specifies the maximum number of storage task assignment instances to be included in + /// the list response. + /// 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. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentInstancesReportListWithResult(string subscriptionId, string resourceGroupName, string accountName, int? Maxpagesize, string Filter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/reports" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + (string.IsNullOrEmpty(Filter) ? global::System.String.Empty : "$filter=" + global::System.Uri.EscapeDataString(Filter)) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageTaskAssignmentInstancesReportListWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentInstancesReportListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportSummary.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentInstancesReportList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskReportSummary.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// Optional, specifies the maximum number of storage task assignment instances to be included in + /// the list response. + /// 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. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentInstancesReportList_Validate(string subscriptionId, string resourceGroupName, string accountName, int? Maxpagesize, string Filter, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertMinimumLength(nameof(accountName),accountName,3); + await eventListener.AssertMaximumLength(nameof(accountName),accountName,24); + await eventListener.AssertRegEx(nameof(accountName), accountName, @"^[a-z0-9]+$"); + await eventListener.AssertNotNull(nameof(Filter),Filter); + } + } + + /// + /// 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. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// The parameters to create a Storage Task Assignment. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsCreate(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/storageTaskAssignments/" + + global::System.Uri.EscapeDataString(storageTaskAssignmentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentsCreate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// 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. + /// + /// + /// The parameters to create a Storage Task Assignment. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Storage/storageAccounts/(?[^/]+)/storageTaskAssignments/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var storageTaskAssignmentName = _match.Groups["storageTaskAssignmentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Storage/storageAccounts/" + + accountName + + "/storageTaskAssignments/" + + storageTaskAssignmentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentsCreate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// 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. + /// + /// + /// The parameters to create a Storage Task Assignment. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsCreateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Storage/storageAccounts/(?[^/]+)/storageTaskAssignments/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var storageTaskAssignmentName = _match.Groups["storageTaskAssignmentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Storage/storageAccounts/" + + accountName + + "/storageTaskAssignments/" + + storageTaskAssignmentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageTaskAssignmentsCreateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// 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. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// Json string supplied to the StorageTaskAssignmentsCreate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsCreateViaJsonString(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/storageTaskAssignments/" + + global::System.Uri.EscapeDataString(storageTaskAssignmentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentsCreate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// 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. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// Json string supplied to the StorageTaskAssignmentsCreate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsCreateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/storageTaskAssignments/" + + global::System.Uri.EscapeDataString(storageTaskAssignmentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageTaskAssignmentsCreateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// 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. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// The parameters to create a Storage Task Assignment. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsCreateWithResult(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/storageTaskAssignments/" + + global::System.Uri.EscapeDataString(storageTaskAssignmentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageTaskAssignmentsCreateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentsCreateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// The parameters to create a Storage Task Assignment. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentsCreate_Validate(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertMinimumLength(nameof(accountName),accountName,3); + await eventListener.AssertMaximumLength(nameof(accountName),accountName,24); + await eventListener.AssertRegEx(nameof(accountName), accountName, @"^[a-z0-9]+$"); + await eventListener.AssertNotNull(nameof(storageTaskAssignmentName),storageTaskAssignmentName); + await eventListener.AssertMinimumLength(nameof(storageTaskAssignmentName),storageTaskAssignmentName,3); + await eventListener.AssertMaximumLength(nameof(storageTaskAssignmentName),storageTaskAssignmentName,24); + await eventListener.AssertRegEx(nameof(storageTaskAssignmentName), storageTaskAssignmentName, @"^[a-z0-9]{3,24}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete the storage task assignment sub-resource + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsDelete(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/storageTaskAssignments/" + + global::System.Uri.EscapeDataString(storageTaskAssignmentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Delete the storage task assignment sub-resource + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Storage/storageAccounts/(?[^/]+)/storageTaskAssignments/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var storageTaskAssignmentName = _match.Groups["storageTaskAssignmentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Storage/storageAccounts/" + + accountName + + "/storageTaskAssignments/" + + storageTaskAssignmentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentsDelete_Validate(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertMinimumLength(nameof(accountName),accountName,3); + await eventListener.AssertMaximumLength(nameof(accountName),accountName,24); + await eventListener.AssertRegEx(nameof(accountName), accountName, @"^[a-z0-9]+$"); + await eventListener.AssertNotNull(nameof(storageTaskAssignmentName),storageTaskAssignmentName); + await eventListener.AssertMinimumLength(nameof(storageTaskAssignmentName),storageTaskAssignmentName,3); + await eventListener.AssertMaximumLength(nameof(storageTaskAssignmentName),storageTaskAssignmentName,24); + await eventListener.AssertRegEx(nameof(storageTaskAssignmentName), storageTaskAssignmentName, @"^[a-z0-9]{3,24}$"); + } + } + + /// Get the storage task assignment properties + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsGet(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/storageTaskAssignments/" + + global::System.Uri.EscapeDataString(storageTaskAssignmentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get the storage task assignment properties + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Storage/storageAccounts/(?[^/]+)/storageTaskAssignments/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var storageTaskAssignmentName = _match.Groups["storageTaskAssignmentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Storage/storageAccounts/" + + accountName + + "/storageTaskAssignments/" + + storageTaskAssignmentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get the storage task assignment properties + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Storage/storageAccounts/(?[^/]+)/storageTaskAssignments/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var storageTaskAssignmentName = _match.Groups["storageTaskAssignmentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Storage/storageAccounts/" + + accountName + + "/storageTaskAssignments/" + + storageTaskAssignmentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageTaskAssignmentsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get the storage task assignment properties + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsGetWithResult(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/storageTaskAssignments/" + + global::System.Uri.EscapeDataString(storageTaskAssignmentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageTaskAssignmentsGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentsGet_Validate(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertMinimumLength(nameof(accountName),accountName,3); + await eventListener.AssertMaximumLength(nameof(accountName),accountName,24); + await eventListener.AssertRegEx(nameof(accountName), accountName, @"^[a-z0-9]+$"); + await eventListener.AssertNotNull(nameof(storageTaskAssignmentName),storageTaskAssignmentName); + await eventListener.AssertMinimumLength(nameof(storageTaskAssignmentName),storageTaskAssignmentName,3); + await eventListener.AssertMaximumLength(nameof(storageTaskAssignmentName),storageTaskAssignmentName,24); + await eventListener.AssertRegEx(nameof(storageTaskAssignmentName), storageTaskAssignmentName, @"^[a-z0-9]{3,24}$"); + } + } + + /// List all the storage task assignments in an account + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// Optional, specifies the maximum number of storage task assignment Ids to be included in the + /// list response. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsList(string subscriptionId, string resourceGroupName, string accountName, int? Maxpagesize, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/storageTaskAssignments" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List all the storage task assignments in an account + /// + /// Optional, specifies the maximum number of storage task assignment Ids to be included in the + /// list response. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsListViaIdentity(global::System.String viaIdentity, int? Maxpagesize, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Storage/storageAccounts/(?[^/]+)/storageTaskAssignments$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Storage/storageAccounts/" + + accountName + + "/storageTaskAssignments" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List all the storage task assignments in an account + /// + /// Optional, specifies the maximum number of storage task assignment Ids to be included in the + /// list response. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsListViaIdentityWithResult(global::System.String viaIdentity, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Storage/storageAccounts/(?[^/]+)/storageTaskAssignments$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Storage/storageAccounts/" + + accountName + + "/storageTaskAssignments" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageTaskAssignmentsListWithResult_Call (request, eventListener,sender); + } + } + + /// List all the storage task assignments in an account + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// Optional, specifies the maximum number of storage task assignment Ids to be included in the + /// list response. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsListWithResult(string subscriptionId, string resourceGroupName, string accountName, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/storageTaskAssignments" + + "?" + + (null == Maxpagesize ? global::System.String.Empty : "$maxpagesize=" + global::System.Uri.EscapeDataString(Maxpagesize.ToString())) + + "&" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageTaskAssignmentsListWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentsList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentsList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// Optional, specifies the maximum number of storage task assignment Ids to be included in the + /// list response. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentsList_Validate(string subscriptionId, string resourceGroupName, string accountName, int? Maxpagesize, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertMinimumLength(nameof(accountName),accountName,3); + await eventListener.AssertMaximumLength(nameof(accountName),accountName,24); + await eventListener.AssertRegEx(nameof(accountName), accountName, @"^[a-z0-9]+$"); + } + } + + /// Update storage task assignment properties + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// The parameters to update a Storage Task Assignment. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsUpdate(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/storageTaskAssignments/" + + global::System.Uri.EscapeDataString(storageTaskAssignmentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update storage task assignment properties + /// + /// The parameters to update a Storage Task Assignment. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Storage/storageAccounts/(?[^/]+)/storageTaskAssignments/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var storageTaskAssignmentName = _match.Groups["storageTaskAssignmentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Storage/storageAccounts/" + + accountName + + "/storageTaskAssignments/" + + storageTaskAssignmentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update storage task assignment properties + /// + /// The parameters to update a Storage Task Assignment. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.Storage/storageAccounts/(?[^/]+)/storageTaskAssignments/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var accountName = _match.Groups["accountName"].Value; + var storageTaskAssignmentName = _match.Groups["storageTaskAssignmentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.Storage/storageAccounts/" + + accountName + + "/storageTaskAssignments/" + + storageTaskAssignmentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageTaskAssignmentsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update storage task assignment properties + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// Json string supplied to the StorageTaskAssignmentsUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/storageTaskAssignments/" + + global::System.Uri.EscapeDataString(storageTaskAssignmentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageTaskAssignmentsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update storage task assignment properties + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// Json string supplied to the StorageTaskAssignmentsUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/storageTaskAssignments/" + + global::System.Uri.EscapeDataString(storageTaskAssignmentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageTaskAssignmentsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update storage task assignment properties + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// The parameters to update a Storage Task Assignment. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task StorageTaskAssignmentsUpdateWithResult(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-05-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.Storage/storageAccounts/" + + global::System.Uri.EscapeDataString(accountName) + + "/storageTaskAssignments/" + + global::System.Uri.EscapeDataString(storageTaskAssignmentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageTaskAssignmentsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.ErrorResponseAutoGenerated.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// 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. + /// 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. + /// The parameters to update a Storage Task Assignment. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task StorageTaskAssignmentsUpdate_Validate(string subscriptionId, string resourceGroupName, string accountName, string storageTaskAssignmentName, Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(accountName),accountName); + await eventListener.AssertMinimumLength(nameof(accountName),accountName,3); + await eventListener.AssertMaximumLength(nameof(accountName),accountName,24); + await eventListener.AssertRegEx(nameof(accountName), accountName, @"^[a-z0-9]+$"); + await eventListener.AssertNotNull(nameof(storageTaskAssignmentName),storageTaskAssignmentName); + await eventListener.AssertMinimumLength(nameof(storageTaskAssignmentName),storageTaskAssignmentName,3); + await eventListener.AssertMaximumLength(nameof(storageTaskAssignmentName),storageTaskAssignmentName,24); + await eventListener.AssertRegEx(nameof(storageTaskAssignmentName), storageTaskAssignmentName, @"^[a-z0-9]{3,24}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + /// /// Gets the current usage count and the limit for the resources of the location under the subscription. /// @@ -16884,7 +20122,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task UsagesListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16924,7 +20162,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task UsagesListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16975,7 +20213,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task UsagesListByLocationViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17027,7 +20265,7 @@ public partial class Storage /// public async global::System.Threading.Tasks.Task UsagesListByLocationWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.ISendAsync sender) { - var apiVersion = @"2023-01-01"; + var apiVersion = @"2023-05-01"; // Constant Parameters using( NoSynchronizationContext ) { diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageAccountMigration_Get.cs b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageAccountMigration_Get.cs index f576c2b6fe15..3bec3dd8bc13 100644 --- a/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageAccountMigration_Get.cs +++ b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageAccountMigration_Get.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountMigration))] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Gets the status of the ongoing migration for the specified storage account.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/accountMigrations/{migrationName}", ApiVersion = "2023-01-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/accountMigrations/{migrationName}", ApiVersion = "2023-05-01")] public partial class GetAzStorageAccountMigration_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageAccountMigration_GetViaIdentity.cs b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageAccountMigration_GetViaIdentity.cs index 2ecd7cb870fd..6577ec0e7a1d 100644 --- a/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageAccountMigration_GetViaIdentity.cs +++ b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageAccountMigration_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageAccountMigration))] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Gets the status of the ongoing migration for the specified storage account.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/accountMigrations/{migrationName}", ApiVersion = "2023-01-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/accountMigrations/{migrationName}", ApiVersion = "2023-05-01")] public partial class GetAzStorageAccountMigration_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageOperation_List.cs b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageOperation_List.cs index 5eb5c0e84e1e..1d78ebed2ecc 100644 --- a/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageOperation_List.cs +++ b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageOperation_List.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Lists all of the available Storage Rest API operations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/providers/Microsoft.Storage/operations", ApiVersion = "2023-01-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/providers/Microsoft.Storage/operations", ApiVersion = "2023-05-01")] public partial class GetAzStorageOperation_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_Get.cs b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_Get.cs new file mode 100644 index 000000000000..f1cc282e9ebf --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_Get.cs @@ -0,0 +1,587 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Cmdlets; + using System; + + /// Fetch the report summary of a single storage task assignment's instances + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageTaskAssignmentInstancesReport_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Fetch the report summary of a single storage task assignment's instances")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports", ApiVersion = "2023-05-01")] + public partial class GetAzStorageTaskAssignmentInstancesReport_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"accountName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string AccountName { get => this._accountName; set => this._accountName = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Storage Client => Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _filter; + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"$filter", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Query)] + public string Filter { get => this._filter; set => this._filter = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxpagesize; + + /// + /// Optional, specifies the maximum number of storage task assignment instances to be included in the list response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional, specifies the maximum number of storage task assignment instances to be included in the list response.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional, specifies the maximum number of storage task assignment instances to be included in the list response.", + SerializedName = @"$maxpagesize", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Query)] + public int Maxpagesize { get => this._maxpagesize; set => this._maxpagesize = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"storageTaskAssignmentName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string StorageTaskAssignmentName { get => this._storageTaskAssignmentName; set => this._storageTaskAssignmentName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzStorageTaskAssignmentInstancesReport_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageTaskAssignmentInstancesReportGet(SubscriptionId, ResourceGroupName, AccountName, StorageTaskAssignmentName, this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,AccountName=AccountName,StorageTaskAssignmentName=StorageTaskAssignmentName,Maxpagesize=this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?),Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageTaskAssignmentInstancesReportGet_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_GetViaIdentity.cs b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_GetViaIdentity.cs new file mode 100644 index 000000000000..4a3ff269e32f --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_GetViaIdentity.cs @@ -0,0 +1,549 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Cmdlets; + using System; + + /// Fetch the report summary of a single storage task assignment's instances + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageTaskAssignmentInstancesReport_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Fetch the report summary of a single storage task assignment's instances")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports", ApiVersion = "2023-05-01")] + public partial class GetAzStorageTaskAssignmentInstancesReport_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Storage Client => Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _filter; + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"$filter", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Query)] + public string Filter { get => this._filter; set => this._filter = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxpagesize; + + /// + /// Optional, specifies the maximum number of storage task assignment instances to be included in the list response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional, specifies the maximum number of storage task assignment instances to be included in the list response.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional, specifies the maximum number of storage task assignment instances to be included in the list response.", + SerializedName = @"$maxpagesize", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Query)] + public int Maxpagesize { get => this._maxpagesize; set => this._maxpagesize = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzStorageTaskAssignmentInstancesReport_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.StorageTaskAssignmentInstancesReportGetViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.AccountName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AccountName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.StorageTaskAssignmentName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.StorageTaskAssignmentName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.StorageTaskAssignmentInstancesReportGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.AccountName ?? null, InputObject.StorageTaskAssignmentName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Maxpagesize=this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?),Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageTaskAssignmentInstancesReportGet_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_GetViaIdentityStorageAccount.cs b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_GetViaIdentityStorageAccount.cs new file mode 100644 index 000000000000..bd9d54885038 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_GetViaIdentityStorageAccount.cs @@ -0,0 +1,564 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Cmdlets; + using System; + + /// Fetch the report summary of a single storage task assignment's instances + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageTaskAssignmentInstancesReport_GetViaIdentityStorageAccount")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Fetch the report summary of a single storage task assignment's instances")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}/reports", ApiVersion = "2023-05-01")] + public partial class GetAzStorageTaskAssignmentInstancesReport_GetViaIdentityStorageAccount : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Storage Client => Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _filter; + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"$filter", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Query)] + public string Filter { get => this._filter; set => this._filter = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxpagesize; + + /// + /// Optional, specifies the maximum number of storage task assignment instances to be included in the list response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional, specifies the maximum number of storage task assignment instances to be included in the list response.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional, specifies the maximum number of storage task assignment instances to be included in the list response.", + SerializedName = @"$maxpagesize", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Query)] + public int Maxpagesize { get => this._maxpagesize; set => this._maxpagesize = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity _storageAccountInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity StorageAccountInputObject { get => this._storageAccountInputObject; set => this._storageAccountInputObject = value; } + + /// Backing field for property. + private string _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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"storageTaskAssignmentName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string StorageTaskAssignmentName { get => this._storageTaskAssignmentName; set => this._storageTaskAssignmentName = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public GetAzStorageTaskAssignmentInstancesReport_GetViaIdentityStorageAccount() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageAccountInputObject?.Id != null) + { + this.StorageAccountInputObject.Id += $"/storageTaskAssignments/{(global::System.Uri.EscapeDataString(this.StorageTaskAssignmentName.ToString()))}"; + await this.Client.StorageTaskAssignmentInstancesReportGetViaIdentity(StorageAccountInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageAccountInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageAccountInputObject has null value for StorageAccountInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageAccountInputObject) ); + } + if (null == StorageAccountInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageAccountInputObject has null value for StorageAccountInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageAccountInputObject) ); + } + if (null == StorageAccountInputObject.AccountName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageAccountInputObject has null value for StorageAccountInputObject.AccountName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageAccountInputObject) ); + } + await this.Client.StorageTaskAssignmentInstancesReportGet(StorageAccountInputObject.SubscriptionId ?? null, StorageAccountInputObject.ResourceGroupName ?? null, StorageAccountInputObject.AccountName ?? null, StorageTaskAssignmentName, this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { StorageTaskAssignmentName=StorageTaskAssignmentName,Maxpagesize=this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?),Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageTaskAssignmentInstancesReportGet_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_List.cs b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_List.cs new file mode 100644 index 000000000000..245589aa4cf3 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignmentInstancesReport_List.cs @@ -0,0 +1,572 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Cmdlets; + using System; + + /// + /// Fetch the report summary of all the storage task assignments and instances in an account + /// + /// + /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/reports" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageTaskAssignmentInstancesReport_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Fetch the report summary of all the storage task assignments and instances in an account")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/reports", ApiVersion = "2023-05-01")] + public partial class GetAzStorageTaskAssignmentInstancesReport_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"accountName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string AccountName { get => this._accountName; set => this._accountName = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Storage Client => Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private string _filter; + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"$filter", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Query)] + public string Filter { get => this._filter; set => this._filter = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxpagesize; + + /// + /// Optional, specifies the maximum number of storage task assignment instances to be included in the list response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional, specifies the maximum number of storage task assignment instances to be included in the list response.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional, specifies the maximum number of storage task assignment instances to be included in the list response.", + SerializedName = @"$maxpagesize", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Query)] + public int Maxpagesize { get => this._maxpagesize; set => this._maxpagesize = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzStorageTaskAssignmentInstancesReport_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageTaskAssignmentInstancesReportList(SubscriptionId, ResourceGroupName, AccountName, this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,AccountName=AccountName,Maxpagesize=this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?),Filter=this.InvocationInformation.BoundParameters.ContainsKey("Filter") ? Filter : null}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportSummary + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageTaskAssignmentInstancesReportList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_Get.cs b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_Get.cs new file mode 100644 index 000000000000..309c8d0143e4 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_Get.cs @@ -0,0 +1,528 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Cmdlets; + using System; + + /// Get the storage task assignment properties + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageTaskAssignment_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Get the storage task assignment properties")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}", ApiVersion = "2023-05-01")] + public partial class GetAzStorageTaskAssignment_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"accountName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string AccountName { get => this._accountName; set => this._accountName = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Storage Client => Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"storageTaskAssignmentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("StorageTaskAssignmentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzStorageTaskAssignment_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageTaskAssignmentsGet(SubscriptionId, ResourceGroupName, AccountName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,AccountName=AccountName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_GetViaIdentity.cs b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_GetViaIdentity.cs new file mode 100644 index 000000000000..ee7c0f190d93 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_GetViaIdentity.cs @@ -0,0 +1,489 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Cmdlets; + using System; + + /// Get the storage task assignment properties + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageTaskAssignment_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Get the storage task assignment properties")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}", ApiVersion = "2023-05-01")] + public partial class GetAzStorageTaskAssignment_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Storage Client => Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzStorageTaskAssignment_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.StorageTaskAssignmentsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.AccountName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AccountName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.StorageTaskAssignmentName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.StorageTaskAssignmentName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.StorageTaskAssignmentsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.AccountName ?? null, InputObject.StorageTaskAssignmentName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_GetViaIdentityStorageAccount.cs b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_GetViaIdentityStorageAccount.cs new file mode 100644 index 000000000000..59cfcee35a56 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_GetViaIdentityStorageAccount.cs @@ -0,0 +1,504 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Cmdlets; + using System; + + /// Get the storage task assignment properties + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageTaskAssignment_GetViaIdentityStorageAccount")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Get the storage task assignment properties")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}", ApiVersion = "2023-05-01")] + public partial class GetAzStorageTaskAssignment_GetViaIdentityStorageAccount : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Storage Client => Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"storageTaskAssignmentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("StorageTaskAssignmentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity _storageAccountInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity StorageAccountInputObject { get => this._storageAccountInputObject; set => this._storageAccountInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzStorageTaskAssignment_GetViaIdentityStorageAccount() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageAccountInputObject?.Id != null) + { + this.StorageAccountInputObject.Id += $"/storageTaskAssignments/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.StorageTaskAssignmentsGetViaIdentity(StorageAccountInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageAccountInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageAccountInputObject has null value for StorageAccountInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageAccountInputObject) ); + } + if (null == StorageAccountInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageAccountInputObject has null value for StorageAccountInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageAccountInputObject) ); + } + if (null == StorageAccountInputObject.AccountName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageAccountInputObject has null value for StorageAccountInputObject.AccountName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageAccountInputObject) ); + } + await this.Client.StorageTaskAssignmentsGet(StorageAccountInputObject.SubscriptionId ?? null, StorageAccountInputObject.ResourceGroupName ?? null, StorageAccountInputObject.AccountName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_List.cs b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_List.cs new file mode 100644 index 000000000000..6819bb7b34be --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/cmdlets/GetAzStorageTaskAssignment_List.cs @@ -0,0 +1,553 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Cmdlets; + using System; + + /// List all the storage task assignments in an account + /// + /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageTaskAssignment_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"List all the storage task assignments in an account")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments", ApiVersion = "2023-05-01")] + public partial class GetAzStorageTaskAssignment_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"accountName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string AccountName { get => this._accountName; set => this._accountName = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Storage Client => Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private int _maxpagesize; + + /// + /// Optional, specifies the maximum number of storage task assignment Ids to be included in the list response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional, specifies the maximum number of storage task assignment Ids to be included in the list response.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional, specifies the maximum number of storage task assignment Ids to be included in the list response.", + SerializedName = @"$maxpagesize", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Query)] + public int Maxpagesize { get => this._maxpagesize; set => this._maxpagesize = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsList + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzStorageTaskAssignment_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageTaskAssignmentsList(SubscriptionId, ResourceGroupName, AccountName, this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,AccountName=AccountName,Maxpagesize=this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?)}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsList + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentsList + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageTaskAssignmentsList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/NewAzStorageTaskAssignment_CreateExpanded.cs b/src/Storage/Storage.Autorest/generated/cmdlets/NewAzStorageTaskAssignment_CreateExpanded.cs new file mode 100644 index 000000000000..2808f9a3abbc --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/cmdlets/NewAzStorageTaskAssignment_CreateExpanded.cs @@ -0,0 +1,774 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Cmdlets; + using System; + + /// + /// 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. + /// + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageTaskAssignment_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.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.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}", ApiVersion = "2023-05-01")] + public partial class NewAzStorageTaskAssignment_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The storage task assignment. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignment(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"accountName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string AccountName { get => this._accountName; set => this._accountName = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Storage Client => Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Text that describes the purpose of the storage task assignment + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Text that describes the purpose of the storage task assignment")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Text that describes the purpose of the storage task assignment", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _parametersBody.Description ?? null; set => _parametersBody.Description = value; } + + /// Whether the storage task assignment is enabled or not + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Whether the storage task assignment is enabled or not")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Whether the storage task assignment is enabled or not", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter Enabled { get => _parametersBody.Enabled; set => _parametersBody.Enabled = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"endBy", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime EndBy { get => _parametersBody.EndBy ?? default(global::System.DateTime); set => _parametersBody.EndBy = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + public int Interval { get => _parametersBody.Interval ?? default(int); set => _parametersBody.Interval = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"intervalUnit", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + public string IntervalUnit { get => _parametersBody.IntervalUnit ?? null; set => _parametersBody.IntervalUnit = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"storageTaskAssignmentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("StorageTaskAssignmentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The container prefix for the location of storage task assignment report + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The container prefix for the location of storage task assignment report")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The container prefix for the location of storage task assignment report", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + public string ReportPrefix { get => _parametersBody.ReportPrefix ?? null; set => _parametersBody.ReportPrefix = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"startFrom", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime StartFrom { get => _parametersBody.StartFrom ?? default(global::System.DateTime); set => _parametersBody.StartFrom = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"startOn", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime StartOn { get => _parametersBody.StartOn ?? default(global::System.DateTime); set => _parametersBody.StartOn = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"excludePrefix", + PossibleTypes = new [] { typeof(string) })] + public string[] TargetExcludePrefix { get => _parametersBody.TargetExcludePrefix?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.TargetExcludePrefix = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Required list of object prefixes to be included for task execution + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Required list of object prefixes to be included for task execution")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Required list of object prefixes to be included for task execution", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + public string[] TargetPrefix { get => _parametersBody.TargetPrefix?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.TargetPrefix = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Id of the corresponding storage task + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Id of the corresponding storage task")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Id of the corresponding storage task", + SerializedName = @"taskId", + PossibleTypes = new [] { typeof(string) })] + public string TaskId { get => _parametersBody.TaskId ?? null; set => _parametersBody.TaskId = value; } + + /// The trigger type of the storage task assignment execution + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The trigger type of the storage task assignment execution")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The trigger type of the storage task assignment execution", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + public string TriggerType { get => _parametersBody.TriggerType ?? null; set => _parametersBody.TriggerType = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzStorageTaskAssignment_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets.NewAzStorageTaskAssignment_CreateExpanded Clone() + { + var clone = new NewAzStorageTaskAssignment_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._parametersBody = this._parametersBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.AccountName = this.AccountName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzStorageTaskAssignment_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StorageTaskAssignmentsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageTaskAssignmentsCreate(SubscriptionId, ResourceGroupName, AccountName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,AccountName=AccountName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/RemoveAzStorageTaskAssignment_Delete.cs b/src/Storage/Storage.Autorest/generated/cmdlets/RemoveAzStorageTaskAssignment_Delete.cs new file mode 100644 index 000000000000..da8875b9133b --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/cmdlets/RemoveAzStorageTaskAssignment_Delete.cs @@ -0,0 +1,632 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Cmdlets; + using System; + + /// Delete the storage task assignment sub-resource + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzStorageTaskAssignment_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Delete the storage task assignment sub-resource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}", ApiVersion = "2023-05-01")] + public partial class RemoveAzStorageTaskAssignment_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"accountName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string AccountName { get => this._accountName; set => this._accountName = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Storage Client => Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"storageTaskAssignmentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("StorageTaskAssignmentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzStorageTaskAssignment_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets.RemoveAzStorageTaskAssignment_Delete Clone() + { + var clone = new RemoveAzStorageTaskAssignment_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.AccountName = this.AccountName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StorageTaskAssignmentsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageTaskAssignmentsDelete(SubscriptionId, ResourceGroupName, AccountName, Name, onNoContent, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,AccountName=AccountName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzStorageTaskAssignment_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/RemoveAzStorageTaskAssignment_DeleteViaIdentity.cs b/src/Storage/Storage.Autorest/generated/cmdlets/RemoveAzStorageTaskAssignment_DeleteViaIdentity.cs new file mode 100644 index 000000000000..01106b66ce3f --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/cmdlets/RemoveAzStorageTaskAssignment_DeleteViaIdentity.cs @@ -0,0 +1,592 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Cmdlets; + using System; + + /// Delete the storage task assignment sub-resource + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzStorageTaskAssignment_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Delete the storage task assignment sub-resource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}", ApiVersion = "2023-05-01")] + public partial class RemoveAzStorageTaskAssignment_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Storage Client => Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzStorageTaskAssignment_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets.RemoveAzStorageTaskAssignment_DeleteViaIdentity Clone() + { + var clone = new RemoveAzStorageTaskAssignment_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StorageTaskAssignmentsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.StorageTaskAssignmentsDeleteViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.AccountName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AccountName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.StorageTaskAssignmentName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.StorageTaskAssignmentName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.StorageTaskAssignmentsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.AccountName ?? null, InputObject.StorageTaskAssignmentName ?? null, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzStorageTaskAssignment_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/RemoveAzStorageTaskAssignment_DeleteViaIdentityStorageAccount.cs b/src/Storage/Storage.Autorest/generated/cmdlets/RemoveAzStorageTaskAssignment_DeleteViaIdentityStorageAccount.cs new file mode 100644 index 000000000000..4d0c10ad8b85 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/cmdlets/RemoveAzStorageTaskAssignment_DeleteViaIdentityStorageAccount.cs @@ -0,0 +1,611 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Cmdlets; + using System; + + /// Delete the storage task assignment sub-resource + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzStorageTaskAssignment_DeleteViaIdentityStorageAccount", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Delete the storage task assignment sub-resource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}", ApiVersion = "2023-05-01")] + public partial class RemoveAzStorageTaskAssignment_DeleteViaIdentityStorageAccount : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Storage Client => Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"storageTaskAssignmentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("StorageTaskAssignmentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity _storageAccountInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity StorageAccountInputObject { get => this._storageAccountInputObject; set => this._storageAccountInputObject = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzStorageTaskAssignment_DeleteViaIdentityStorageAccount + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets.RemoveAzStorageTaskAssignment_DeleteViaIdentityStorageAccount Clone() + { + var clone = new RemoveAzStorageTaskAssignment_DeleteViaIdentityStorageAccount(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StorageTaskAssignmentsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageAccountInputObject?.Id != null) + { + this.StorageAccountInputObject.Id += $"/storageTaskAssignments/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.StorageTaskAssignmentsDeleteViaIdentity(StorageAccountInputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageAccountInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageAccountInputObject has null value for StorageAccountInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageAccountInputObject) ); + } + if (null == StorageAccountInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageAccountInputObject has null value for StorageAccountInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageAccountInputObject) ); + } + if (null == StorageAccountInputObject.AccountName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageAccountInputObject has null value for StorageAccountInputObject.AccountName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageAccountInputObject) ); + } + await this.Client.StorageTaskAssignmentsDelete(StorageAccountInputObject.SubscriptionId ?? null, StorageAccountInputObject.ResourceGroupName ?? null, StorageAccountInputObject.AccountName ?? null, Name, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public RemoveAzStorageTaskAssignment_DeleteViaIdentityStorageAccount() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerExpanded.cs b/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerExpanded.cs index a2d4ec4aeb6b..7a7743eed39f 100644 --- a/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerExpanded.cs +++ b/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerExpanded.cs @@ -23,7 +23,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.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.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration", ApiVersion = "2023-01-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration", ApiVersion = "2023-05-01")] public partial class StartAzStorageAccountMigration_CustomerExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerViaIdentityExpanded.cs b/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerViaIdentityExpanded.cs index 9f70f4df2f73..5ebb80fb1dab 100644 --- a/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerViaIdentityExpanded.cs +++ b/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerViaIdentityExpanded.cs @@ -23,7 +23,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.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.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration", ApiVersion = "2023-01-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration", ApiVersion = "2023-05-01")] public partial class StartAzStorageAccountMigration_CustomerViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerViaJsonFilePath.cs b/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerViaJsonFilePath.cs index 992aa09dd9bf..e1a7e66965ba 100644 --- a/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerViaJsonFilePath.cs +++ b/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerViaJsonFilePath.cs @@ -23,7 +23,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.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.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration", ApiVersion = "2023-01-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration", ApiVersion = "2023-05-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.NotSuggestDefaultParameterSet] public partial class StartAzStorageAccountMigration_CustomerViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerViaJsonString.cs b/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerViaJsonString.cs index 4a6ef9d97aad..9bf0f3abab77 100644 --- a/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerViaJsonString.cs +++ b/src/Storage/Storage.Autorest/generated/cmdlets/StartAzStorageAccountMigration_CustomerViaJsonString.cs @@ -23,7 +23,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.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.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration", ApiVersion = "2023-01-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/startAccountMigration", ApiVersion = "2023-05-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.NotSuggestDefaultParameterSet] public partial class StartAzStorageAccountMigration_CustomerViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/UpdateAzStorageTaskAssignment_UpdateExpanded.cs b/src/Storage/Storage.Autorest/generated/cmdlets/UpdateAzStorageTaskAssignment_UpdateExpanded.cs new file mode 100644 index 000000000000..f059b3421f4e --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/cmdlets/UpdateAzStorageTaskAssignment_UpdateExpanded.cs @@ -0,0 +1,758 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Cmdlets; + using System; + + /// Update storage task assignment properties + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageTaskAssignment_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Update storage task assignment properties")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}", ApiVersion = "2023-05-01")] + public partial class UpdateAzStorageTaskAssignment_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Parameters of the storage task assignment update request + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateParameters(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"accountName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string AccountName { get => this._accountName; set => this._accountName = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Storage Client => Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Text that describes the purpose of the storage task assignment + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Text that describes the purpose of the storage task assignment")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Text that describes the purpose of the storage task assignment", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _parametersBody.Description ?? null; set => _parametersBody.Description = value; } + + /// Whether the storage task assignment is enabled or not + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether the storage task assignment is enabled or not")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the storage task assignment is enabled or not", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter Enabled { get => _parametersBody.Enabled ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.Enabled = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"endBy", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime EndBy { get => _parametersBody.EndBy ?? default(global::System.DateTime); set => _parametersBody.EndBy = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + public int Interval { get => _parametersBody.Interval ?? default(int); set => _parametersBody.Interval = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"intervalUnit", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + public string IntervalUnit { get => _parametersBody.IntervalUnit ?? null; set => _parametersBody.IntervalUnit = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"storageTaskAssignmentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("StorageTaskAssignmentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The prefix of the storage task assignment report + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The prefix of the storage task assignment report")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The prefix of the storage task assignment report", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + public string ReportPrefix { get => _parametersBody.ReportPrefix ?? null; set => _parametersBody.ReportPrefix = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"startFrom", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime StartFrom { get => _parametersBody.StartFrom ?? default(global::System.DateTime); set => _parametersBody.StartFrom = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"startOn", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime StartOn { get => _parametersBody.StartOn ?? default(global::System.DateTime); set => _parametersBody.StartOn = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"excludePrefix", + PossibleTypes = new [] { typeof(string) })] + public string[] TargetExcludePrefix { get => _parametersBody.TargetExcludePrefix?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.TargetExcludePrefix = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Required list of object prefixes to be included for task execution + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Required list of object prefixes to be included for task execution")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Required list of object prefixes to be included for task execution", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + public string[] TargetPrefix { get => _parametersBody.TargetPrefix?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.TargetPrefix = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// The trigger type of the storage task assignment execution + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The trigger type of the storage task assignment execution")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The trigger type of the storage task assignment execution", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + public string TriggerType { get => _parametersBody.TriggerType ?? null; set => _parametersBody.TriggerType = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzStorageTaskAssignment_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets.UpdateAzStorageTaskAssignment_UpdateExpanded Clone() + { + var clone = new UpdateAzStorageTaskAssignment_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._parametersBody = this._parametersBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.AccountName = this.AccountName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StorageTaskAssignmentsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageTaskAssignmentsUpdate(SubscriptionId, ResourceGroupName, AccountName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,AccountName=AccountName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStorageTaskAssignment_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/UpdateAzStorageTaskAssignment_UpdateViaIdentityExpanded.cs b/src/Storage/Storage.Autorest/generated/cmdlets/UpdateAzStorageTaskAssignment_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..832733635125 --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/cmdlets/UpdateAzStorageTaskAssignment_UpdateViaIdentityExpanded.cs @@ -0,0 +1,718 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Cmdlets; + using System; + + /// Update storage task assignment properties + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageTaskAssignment_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Update storage task assignment properties")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}", ApiVersion = "2023-05-01")] + public partial class UpdateAzStorageTaskAssignment_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Parameters of the storage task assignment update request + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateParameters(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Storage Client => Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Text that describes the purpose of the storage task assignment + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Text that describes the purpose of the storage task assignment")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Text that describes the purpose of the storage task assignment", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _parametersBody.Description ?? null; set => _parametersBody.Description = value; } + + /// Whether the storage task assignment is enabled or not + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether the storage task assignment is enabled or not")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the storage task assignment is enabled or not", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter Enabled { get => _parametersBody.Enabled ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.Enabled = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"endBy", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime EndBy { get => _parametersBody.EndBy ?? default(global::System.DateTime); set => _parametersBody.EndBy = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + public int Interval { get => _parametersBody.Interval ?? default(int); set => _parametersBody.Interval = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"intervalUnit", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + public string IntervalUnit { get => _parametersBody.IntervalUnit ?? null; set => _parametersBody.IntervalUnit = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The prefix of the storage task assignment report + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The prefix of the storage task assignment report")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The prefix of the storage task assignment report", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + public string ReportPrefix { get => _parametersBody.ReportPrefix ?? null; set => _parametersBody.ReportPrefix = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"startFrom", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime StartFrom { get => _parametersBody.StartFrom ?? default(global::System.DateTime); set => _parametersBody.StartFrom = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"startOn", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime StartOn { get => _parametersBody.StartOn ?? default(global::System.DateTime); set => _parametersBody.StartOn = value; } + + /// + /// 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 + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"excludePrefix", + PossibleTypes = new [] { typeof(string) })] + public string[] TargetExcludePrefix { get => _parametersBody.TargetExcludePrefix?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.TargetExcludePrefix = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Required list of object prefixes to be included for task execution + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Required list of object prefixes to be included for task execution")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Required list of object prefixes to be included for task execution", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + public string[] TargetPrefix { get => _parametersBody.TargetPrefix?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.TargetPrefix = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// The trigger type of the storage task assignment execution + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The trigger type of the storage task assignment execution")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The trigger type of the storage task assignment execution", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + public string TriggerType { get => _parametersBody.TriggerType ?? null; set => _parametersBody.TriggerType = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzStorageTaskAssignment_UpdateViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets.UpdateAzStorageTaskAssignment_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzStorageTaskAssignment_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._parametersBody = this._parametersBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StorageTaskAssignmentsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.StorageTaskAssignmentsUpdateViaIdentity(InputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.AccountName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AccountName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.StorageTaskAssignmentName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.StorageTaskAssignmentName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.StorageTaskAssignmentsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.AccountName ?? null, InputObject.StorageTaskAssignmentName ?? null, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStorageTaskAssignment_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/generated/cmdlets/UpdateAzStorageTaskAssignment_UpdateViaIdentityStorageAccountExpanded.cs b/src/Storage/Storage.Autorest/generated/cmdlets/UpdateAzStorageTaskAssignment_UpdateViaIdentityStorageAccountExpanded.cs new file mode 100644 index 000000000000..8b2136e387ff --- /dev/null +++ b/src/Storage/Storage.Autorest/generated/cmdlets/UpdateAzStorageTaskAssignment_UpdateViaIdentityStorageAccountExpanded.cs @@ -0,0 +1,737 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Cmdlets; + using System; + + /// Update storage task assignment properties + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageTaskAssignment_UpdateViaIdentityStorageAccountExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Description(@"Update storage task assignment properties")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/storageTaskAssignments/{storageTaskAssignmentName}", ApiVersion = "2023-05-01")] + public partial class UpdateAzStorageTaskAssignment_UpdateViaIdentityStorageAccountExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Parameters of the storage task assignment update request + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignmentUpdateParameters _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.StorageTaskAssignmentUpdateParameters(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Storage Client => Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Text that describes the purpose of the storage task assignment + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Text that describes the purpose of the storage task assignment")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Text that describes the purpose of the storage task assignment", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _parametersBody.Description ?? null; set => _parametersBody.Description = value; } + + /// Whether the storage task assignment is enabled or not + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Whether the storage task assignment is enabled or not")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the storage task assignment is enabled or not", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter Enabled { get => _parametersBody.Enabled ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.Enabled = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"endBy", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime EndBy { get => _parametersBody.EndBy ?? default(global::System.DateTime); set => _parametersBody.EndBy = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"interval", + PossibleTypes = new [] { typeof(int) })] + public int Interval { get => _parametersBody.Interval ?? default(int); set => _parametersBody.Interval = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"intervalUnit", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("Days")] + public string IntervalUnit { get => _parametersBody.IntervalUnit ?? null; set => _parametersBody.IntervalUnit = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"storageTaskAssignmentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("StorageTaskAssignmentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The prefix of the storage task assignment report + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The prefix of the storage task assignment report")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The prefix of the storage task assignment report", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + public string ReportPrefix { get => _parametersBody.ReportPrefix ?? null; set => _parametersBody.ReportPrefix = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"startFrom", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime StartFrom { get => _parametersBody.StartFrom ?? default(global::System.DateTime); set => _parametersBody.StartFrom = value; } + + /// + /// 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' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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'")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'", + SerializedName = @"startOn", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime StartOn { get => _parametersBody.StartOn ?? default(global::System.DateTime); set => _parametersBody.StartOn = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity _storageAccountInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity StorageAccountInputObject { get => this._storageAccountInputObject; set => this._storageAccountInputObject = value; } + + /// + /// 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 + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"excludePrefix", + PossibleTypes = new [] { typeof(string) })] + public string[] TargetExcludePrefix { get => _parametersBody.TargetExcludePrefix?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.TargetExcludePrefix = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Required list of object prefixes to be included for task execution + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Required list of object prefixes to be included for task execution")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Required list of object prefixes to be included for task execution", + SerializedName = @"prefix", + PossibleTypes = new [] { typeof(string) })] + public string[] TargetPrefix { get => _parametersBody.TargetPrefix?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.TargetPrefix = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// The trigger type of the storage task assignment execution + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The trigger type of the storage task assignment execution")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Storage.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The trigger type of the storage task assignment execution", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Storage.PSArgumentCompleterAttribute("RunOnce", "OnSchedule")] + public string TriggerType { get => _parametersBody.TriggerType ?? null; set => _parametersBody.TriggerType = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzStorageTaskAssignment_UpdateViaIdentityStorageAccountExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Storage.Cmdlets.UpdateAzStorageTaskAssignment_UpdateViaIdentityStorageAccountExpanded Clone() + { + var clone = new UpdateAzStorageTaskAssignment_UpdateViaIdentityStorageAccountExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._parametersBody = this._parametersBody; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StorageTaskAssignmentsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageAccountInputObject?.Id != null) + { + this.StorageAccountInputObject.Id += $"/storageTaskAssignments/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.StorageTaskAssignmentsUpdateViaIdentity(StorageAccountInputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageAccountInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageAccountInputObject has null value for StorageAccountInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageAccountInputObject) ); + } + if (null == StorageAccountInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageAccountInputObject has null value for StorageAccountInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageAccountInputObject) ); + } + if (null == StorageAccountInputObject.AccountName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageAccountInputObject has null value for StorageAccountInputObject.AccountName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageAccountInputObject) ); + } + await this.Client.StorageTaskAssignmentsUpdate(StorageAccountInputObject.SubscriptionId ?? null, StorageAccountInputObject.ResourceGroupName ?? null, StorageAccountInputObject.AccountName ?? null, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public UpdateAzStorageTaskAssignment_UpdateViaIdentityStorageAccountExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Storage.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IErrorResponseAutoGenerated + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/help/Az.Storage.md b/src/Storage/Storage.Autorest/help/Az.Storage.md index f1d9d0de1a8e..80e03d6fd804 100644 --- a/src/Storage/Storage.Autorest/help/Az.Storage.md +++ b/src/Storage/Storage.Autorest/help/Az.Storage.md @@ -14,8 +14,25 @@ Microsoft Azure PowerShell: Storage cmdlets ### [Get-AzStorageAccountMigration](Get-AzStorageAccountMigration.md) Gets the status of the ongoing migration for the specified storage account. +### [Get-AzStorageTaskAssignment](Get-AzStorageTaskAssignment.md) +Get the storage task assignment properties + +### [Get-AzStorageTaskAssignmentInstancesReport](Get-AzStorageTaskAssignmentInstancesReport.md) +Fetch the report summary of a single storage task assignment's instances + +### [New-AzStorageTaskAssignment](New-AzStorageTaskAssignment.md) +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. + +### [Remove-AzStorageTaskAssignment](Remove-AzStorageTaskAssignment.md) +Delete the storage task assignment sub-resource + ### [Start-AzStorageAccountMigration](Start-AzStorageAccountMigration.md) 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. +### [Update-AzStorageTaskAssignment](Update-AzStorageTaskAssignment.md) +Update storage task assignment properties + diff --git a/src/Storage/Storage.Autorest/help/Get-AzStorageTaskAssignment.md b/src/Storage/Storage.Autorest/help/Get-AzStorageTaskAssignment.md new file mode 100644 index 000000000000..7402fdbd8c30 --- /dev/null +++ b/src/Storage/Storage.Autorest/help/Get-AzStorageTaskAssignment.md @@ -0,0 +1,239 @@ +--- +external help file: +Module Name: Az.Storage +online version: https://learn.microsoft.com/powershell/module/az.storage/get-azstoragetaskassignment +schema: 2.0.0 +--- + +# Get-AzStorageTaskAssignment + +## SYNOPSIS +Get the storage task assignment properties + +## SYNTAX + +### List (Default) +``` +Get-AzStorageTaskAssignment -AccountName -ResourceGroupName [-SubscriptionId ] + [-Maxpagesize ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzStorageTaskAssignment -AccountName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzStorageTaskAssignment -InputObject [-DefaultProfile ] [] +``` + +### GetViaIdentityStorageAccount +``` +Get-AzStorageTaskAssignment -Name -StorageAccountInputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get the storage task assignment properties + +## EXAMPLES + +### 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". + +## PARAMETERS + +### -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. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Maxpagesize +Optional, specifies the maximum number of storage task assignment Ids to be included in the list response. + +```yaml +Type: System.Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +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. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityStorageAccount +Aliases: StorageTaskAssignmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageAccountInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity +Parameter Sets: GetViaIdentityStorageAccount +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + +## NOTES + +## RELATED LINKS + diff --git a/src/Storage/Storage.Autorest/help/Get-AzStorageTaskAssignmentInstancesReport.md b/src/Storage/Storage.Autorest/help/Get-AzStorageTaskAssignmentInstancesReport.md new file mode 100644 index 000000000000..b96fd05b91d9 --- /dev/null +++ b/src/Storage/Storage.Autorest/help/Get-AzStorageTaskAssignmentInstancesReport.md @@ -0,0 +1,276 @@ +--- +external help file: +Module Name: Az.Storage +online version: https://learn.microsoft.com/powershell/module/az.storage/get-azstoragetaskassignmentinstancesreport +schema: 2.0.0 +--- + +# Get-AzStorageTaskAssignmentInstancesReport + +## SYNOPSIS +Fetch the report summary of a single storage task assignment's instances + +## SYNTAX + +### List (Default) +``` +Get-AzStorageTaskAssignmentInstancesReport -AccountName -ResourceGroupName + [-SubscriptionId ] [-Filter ] [-Maxpagesize ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzStorageTaskAssignmentInstancesReport -AccountName -ResourceGroupName + -StorageTaskAssignmentName [-SubscriptionId ] [-Filter ] [-Maxpagesize ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzStorageTaskAssignmentInstancesReport -InputObject [-Filter ] + [-Maxpagesize ] [-DefaultProfile ] [] +``` + +### GetViaIdentityStorageAccount +``` +Get-AzStorageTaskAssignmentInstancesReport -StorageAccountInputObject + -StorageTaskAssignmentName [-Filter ] [-Maxpagesize ] [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Fetch the report summary of a single storage task assignment's instances + +## EXAMPLES + +### 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". + +## PARAMETERS + +### -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. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +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. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Maxpagesize +Optional, specifies the maximum number of storage task assignment instances to be included in the list response. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageAccountInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity +Parameter Sets: GetViaIdentityStorageAccount +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -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. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityStorageAccount +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskReportInstance + +## NOTES + +## RELATED LINKS + diff --git a/src/Storage/Storage.Autorest/help/New-AzStorageTaskAssignment.md b/src/Storage/Storage.Autorest/help/New-AzStorageTaskAssignment.md new file mode 100644 index 000000000000..1a74c329bb56 --- /dev/null +++ b/src/Storage/Storage.Autorest/help/New-AzStorageTaskAssignment.md @@ -0,0 +1,459 @@ +--- +external help file: +Module Name: Az.Storage +online version: https://learn.microsoft.com/powershell/module/az.storage/new-azstoragetaskassignment +schema: 2.0.0 +--- + +# New-AzStorageTaskAssignment + +## 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. + +## SYNTAX + +``` +New-AzStorageTaskAssignment -AccountName -Name -ResourceGroupName + -Description -Enabled -ReportPrefix -TaskId -TriggerType + [-SubscriptionId ] [-EndBy ] [-Interval ] [-IntervalUnit ] + [-StartFrom ] [-StartOn ] [-TargetExcludePrefix ] [-TargetPrefix ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## 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. + +## EXAMPLES + +### 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. + +## PARAMETERS + +### -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. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Text that describes the purpose of the storage task assignment + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Enabled +Whether the storage task assignment is enabled or not + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EndBy +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' + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Interval +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' + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IntervalUnit +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' + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +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. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: StorageTaskAssignmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReportPrefix +The container prefix for the location of storage task assignment report + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StartFrom +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' + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StartOn +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' + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TargetExcludePrefix +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 + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TargetPrefix +Required list of object prefixes to be included for task execution + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TaskId +Id of the corresponding storage task + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TriggerType +The trigger type of the storage task assignment execution + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + +## NOTES + +## RELATED LINKS + diff --git a/src/Storage/Storage.Autorest/help/Remove-AzStorageTaskAssignment.md b/src/Storage/Storage.Autorest/help/Remove-AzStorageTaskAssignment.md new file mode 100644 index 000000000000..2401c77693a4 --- /dev/null +++ b/src/Storage/Storage.Autorest/help/Remove-AzStorageTaskAssignment.md @@ -0,0 +1,247 @@ +--- +external help file: +Module Name: Az.Storage +online version: https://learn.microsoft.com/powershell/module/az.storage/remove-azstoragetaskassignment +schema: 2.0.0 +--- + +# Remove-AzStorageTaskAssignment + +## SYNOPSIS +Delete the storage task assignment sub-resource + +## SYNTAX + +### Delete (Default) +``` +Remove-AzStorageTaskAssignment -AccountName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzStorageTaskAssignment -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentityStorageAccount +``` +Remove-AzStorageTaskAssignment -Name -StorageAccountInputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete the storage task assignment sub-resource + +## EXAMPLES + +### Example 1: Remove a task assignment +```powershell +Remove-AzStorageTaskAssignment -AccountName myaccount -ResourceGroupName myresourcegroup -Name mytaskassignment +``` + +This command deletes a task assignment. + +## PARAMETERS + +### -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. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +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. + +```yaml +Type: System.String +Parameter Sets: Delete, DeleteViaIdentityStorageAccount +Aliases: StorageTaskAssignmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageAccountInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity +Parameter Sets: DeleteViaIdentityStorageAccount +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/Storage/Storage.Autorest/help/Update-AzStorageTaskAssignment.md b/src/Storage/Storage.Autorest/help/Update-AzStorageTaskAssignment.md new file mode 100644 index 000000000000..0ee983904a24 --- /dev/null +++ b/src/Storage/Storage.Autorest/help/Update-AzStorageTaskAssignment.md @@ -0,0 +1,447 @@ +--- +external help file: +Module Name: Az.Storage +online version: https://learn.microsoft.com/powershell/module/az.storage/update-azstoragetaskassignment +schema: 2.0.0 +--- + +# Update-AzStorageTaskAssignment + +## SYNOPSIS +Update storage task assignment properties + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzStorageTaskAssignment -AccountName -Name -ResourceGroupName + [-SubscriptionId ] [-Description ] [-Enabled] [-EndBy ] [-Interval ] + [-IntervalUnit ] [-ReportPrefix ] [-StartFrom ] [-StartOn ] + [-TargetExcludePrefix ] [-TargetPrefix ] [-TriggerType ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzStorageTaskAssignment -InputObject [-Description ] [-Enabled] + [-EndBy ] [-Interval ] [-IntervalUnit ] [-ReportPrefix ] + [-StartFrom ] [-StartOn ] [-TargetExcludePrefix ] [-TargetPrefix ] + [-TriggerType ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### UpdateViaIdentityStorageAccountExpanded +``` +Update-AzStorageTaskAssignment -Name -StorageAccountInputObject + [-Description ] [-Enabled] [-EndBy ] [-Interval ] [-IntervalUnit ] + [-ReportPrefix ] [-StartFrom ] [-StartOn ] [-TargetExcludePrefix ] + [-TargetPrefix ] [-TriggerType ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Update storage task assignment properties + +## EXAMPLES + +### 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. + +## PARAMETERS + +### -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. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Text that describes the purpose of the storage task assignment + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Enabled +Whether the storage task assignment is enabled or not + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EndBy +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' + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Interval +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' + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IntervalUnit +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' + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +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. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityStorageAccountExpanded +Aliases: StorageTaskAssignmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReportPrefix +The prefix of the storage task assignment report + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StartFrom +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' + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StartOn +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' + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageAccountInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity +Parameter Sets: UpdateViaIdentityStorageAccountExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TargetExcludePrefix +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 + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TargetPrefix +Required list of object prefixes to be included for task execution + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TriggerType +The trigger type of the storage task assignment execution + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment + +## NOTES + +## RELATED LINKS + diff --git a/src/Storage/Storage.Autorest/test/Get-AzStorageAccountMigration.Recording.json b/src/Storage/Storage.Autorest/test/Get-AzStorageAccountMigration.Recording.json index 25fcd19587ae..ef5697812616 100644 --- a/src/Storage/Storage.Autorest/test/Get-AzStorageAccountMigration.Recording.json +++ b/src/Storage/Storage.Autorest/test/Get-AzStorageAccountMigration.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzStorageAccountMigration+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testaccountmigrationrg/providers/Microsoft.Storage/storageAccounts/testaccountmigration111/accountMigrations/default?api-version=2023-01-01+1": { + "Get-AzStorageAccountMigration+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testaccountmigrationrg/providers/Microsoft.Storage/storageAccounts/testaccountmigration111/accountMigrations/default?api-version=2023-05-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testaccountmigrationrg/providers/Microsoft.Storage/storageAccounts/testaccountmigration111/accountMigrations/default?api-version=2023-01-01", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testaccountmigrationrg/providers/Microsoft.Storage/storageAccounts/testaccountmigration111/accountMigrations/default?api-version=2023-05-01", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "22422346-4e80-4e88-9075-5b6d673351d2" ], + "x-ms-client-request-id": [ "d124ac8d-48cd-4ca5-9279-a0ac6d2524bf" ], "CommandName": [ "Get-AzStorageAccountMigration" ], "FullCommandName": [ "Get-AzStorageAccountMigration_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.13", "Az.Storage/5.9.1" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,21 +22,22 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-request-id": [ "4a391e29-761b-45bd-a33c-43c4763499da" ], + "x-ms-request-id": [ "68e1a48b-0ccf-4aab-adb7-cd40170c19c5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "cf9d7417-496c-4c47-9059-d092eeebd22a" ], - "x-ms-routing-request-id": [ "EASTUS2EUAP:20230808T073340Z:cf9d7417-496c-4c47-9059-d092eeebd22a" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "82fd7dab-3e1c-4b41-9f05-1796d141a6f6" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101815Z:82fd7dab-3e1c-4b41-9f05-1796d141a6f6" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Tue, 08 Aug 2023 07:33:39 GMT" ] + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DE34E81F35C442238D55917867791B1C Ref B: MAA201060513009 Ref C: 2024-07-08T10:18:14Z" ], + "Date": [ "Mon, 08 Jul 2024 10:18:15 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "359" ], + "Content-Length": [ "345" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testaccountmigrationrg/providers/Microsoft.Storage/storageAccounts/testaccountmigration111/accountMigrations/default\",\"name\":\"default\",\"type\":\"Microsoft.Storage/storageAccounts/accountMigrations\",\"properties\":{\"targetSkuName\":\"Standard_ZRS\",\"migrationStatus\":\"SubmittedForConversion\"}}", + "Content": "{\"id\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testaccountmigrationrg/providers/Microsoft.Storage/storageAccounts/testaccountmigration111/accountMigrations/default\",\"name\":\"default\",\"type\":\"Microsoft.Storage/storageAccounts/accountMigrations\",\"properties\":{\"targetSkuName\":\"Standard_ZRS\",\"migrationStatus\":\"Complete\"}}", "isContentBase64": false } } diff --git a/src/Storage/Storage.Autorest/test/Get-AzStorageAccountMigration.Tests.ps1 b/src/Storage/Storage.Autorest/test/Get-AzStorageAccountMigration.Tests.ps1 index 70728220407e..f1d2ec42b2f2 100644 --- a/src/Storage/Storage.Autorest/test/Get-AzStorageAccountMigration.Tests.ps1 +++ b/src/Storage/Storage.Autorest/test/Get-AzStorageAccountMigration.Tests.ps1 @@ -19,7 +19,7 @@ Describe 'Get-AzStorageAccountMigration' { $migration = Get-AzStorageAccountMigration -ResourceGroupName $env.ResourceGroupName -AccountName $env.AccountName $migration.Name | Should -Be "default" $migration.ResourceGroupName | Should -Be "testaccountmigrationrg" - $migration.DetailMigrationStatus | Should -Be "SubmittedForConversion" + $migration.DetailMigrationStatus | Should -Be "Complete" $migration.DetailTargetSkuName | Should -Be "Standard_ZRS" } } diff --git a/src/Storage/Storage.Autorest/test/Get-AzStorageTaskAssignment.Tests.ps1 b/src/Storage/Storage.Autorest/test/Get-AzStorageTaskAssignment.Tests.ps1 new file mode 100644 index 000000000000..ba70a34caf9d --- /dev/null +++ b/src/Storage/Storage.Autorest/test/Get-AzStorageTaskAssignment.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzStorageTaskAssignment')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzStorageTaskAssignment.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzStorageTaskAssignment' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityStorageAccount' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Storage/Storage.Autorest/test/Get-AzStorageTaskAssignmentInstancesReport.Tests.ps1 b/src/Storage/Storage.Autorest/test/Get-AzStorageTaskAssignmentInstancesReport.Tests.ps1 new file mode 100644 index 000000000000..5cc280077a7e --- /dev/null +++ b/src/Storage/Storage.Autorest/test/Get-AzStorageTaskAssignmentInstancesReport.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzStorageTaskAssignmentInstancesReport')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzStorageTaskAssignmentInstancesReport.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzStorageTaskAssignmentInstancesReport' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Storage/Storage.Autorest/test/Get-AzStorageTaskAssignmentsInstancesReport.Tests.ps1 b/src/Storage/Storage.Autorest/test/Get-AzStorageTaskAssignmentsInstancesReport.Tests.ps1 new file mode 100644 index 000000000000..60c5b9a19209 --- /dev/null +++ b/src/Storage/Storage.Autorest/test/Get-AzStorageTaskAssignmentsInstancesReport.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzStorageTaskAssignmentsInstancesReport')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzStorageTaskAssignmentsInstancesReport.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzStorageTaskAssignmentsInstancesReport' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Storage/Storage.Autorest/test/New-AzStorageTaskAssignment.Recording.json b/src/Storage/Storage.Autorest/test/New-AzStorageTaskAssignment.Recording.json new file mode 100644 index 000000000000..b1c08e7c2343 --- /dev/null +++ b/src/Storage/Storage.Autorest/test/New-AzStorageTaskAssignment.Recording.json @@ -0,0 +1,788 @@ +{ + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$PUT+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment01?api-version=2023-05-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment01?api-version=2023-05-01", + "Content": "{\r\n \"properties\": {\r\n \"executionContext\": {\r\n \"trigger\": {\r\n \"type\": \"RunOnce\"\r\n }\r\n },\r\n \"report\": {\r\n \"prefix\": \"testc1\"\r\n },\r\n \"taskId\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.StorageActions/storageTasks/testtask1\",\r\n \"enabled\": false,\r\n \"description\": \"task assignment1\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "396" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/b6275a03-7122-4219-b59b-33f5a181dfcf?monitor=true\u0026api-version=2023-05-01\u0026t=638560306984019365\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=bawDMShgKPMsEckkGWmhiPL-IfYVUmaZU07AntLPkWseOkbRG3T1cslbc4OPERpy-s7nCHj7JHMxrCqRd1I_kXNi15briz9seec3ymAjIlLzkWVDEI0KsNpVGFQgYmElsufvT8hn82Occr0sbGWsFDu9urlIfiyREyM6DqtuUHQUCQ1GQLH6cpw-WKdbMTfAekADeUW0ypPAd3XAZtn4xDdguNcrA4UiwCZ3ArQb-4cS_EBFb0_MTXaRgLSrmaPZpPTFTp3TV83bV_buy__hCaApgdPtehqovoKE1RAuED8JwJJlcorQzgvcFjONugs4UE2Aw1PDOMmqkMpPlG1Yog\u0026h=6EiIcA49GGYRgi5oV1IuAJ4kHBavdZ4u-84aXqpVmQw" ], + "Retry-After": [ "17" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/b6275a03-7122-4219-b59b-33f5a181dfcf?monitor=true\u0026api-version=2023-05-01\u0026asynclink=true\u0026t=638560306984019365\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=bawDMShgKPMsEckkGWmhiPL-IfYVUmaZU07AntLPkWseOkbRG3T1cslbc4OPERpy-s7nCHj7JHMxrCqRd1I_kXNi15briz9seec3ymAjIlLzkWVDEI0KsNpVGFQgYmElsufvT8hn82Occr0sbGWsFDu9urlIfiyREyM6DqtuUHQUCQ1GQLH6cpw-WKdbMTfAekADeUW0ypPAd3XAZtn4xDdguNcrA4UiwCZ3ArQb-4cS_EBFb0_MTXaRgLSrmaPZpPTFTp3TV83bV_buy__hCaApgdPtehqovoKE1RAuED8JwJJlcorQzgvcFjONugs4UE2Aw1PDOMmqkMpPlG1Yog\u0026h=6EiIcA49GGYRgi5oV1IuAJ4kHBavdZ4u-84aXqpVmQw" ], + "x-ms-request-id": [ "b6275a03-7122-4219-b59b-33f5a181dfcf" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "3d73f3d2-8692-47bc-ab58-169f6d002bdf" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101818Z:3d73f3d2-8692-47bc-ab58-169f6d002bdf" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 568AAAB93F324883952E425AFE6F7169 Ref B: MAA201060513009 Ref C: 2024-07-08T10:18:17Z" ], + "Date": [ "Mon, 08 Jul 2024 10:18:18 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "text/plain; charset=utf-8" ], + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/b6275a03-7122-4219-b59b-33f5a181dfcf?monitor=true\u0026api-version=2023-05-01\u0026asynclink=true\u0026t=638560306984019365\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=bawDMShgKPMsEckkGWmhiPL-IfYVUmaZU07AntLPkWseOkbRG3T1cslbc4OPERpy-s7nCHj7JHMxrCqRd1I_kXNi15briz9seec3ymAjIlLzkWVDEI0KsNpVGFQgYmElsufvT8hn82Occr0sbGWsFDu9urlIfiyREyM6DqtuUHQUCQ1GQLH6cpw-WKdbMTfAekADeUW0ypPAd3XAZtn4xDdguNcrA4UiwCZ3ArQb-4cS_EBFb0_MTXaRgLSrmaPZpPTFTp3TV83bV_buy__hCaApgdPtehqovoKE1RAuED8JwJJlcorQzgvcFjONugs4UE2Aw1PDOMmqkMpPlG1Yog\u0026h=6EiIcA49GGYRgi5oV1IuAJ4kHBavdZ4u-84aXqpVmQw+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/b6275a03-7122-4219-b59b-33f5a181dfcf?monitor=true\u0026api-version=2023-05-01\u0026asynclink=true\u0026t=638560306984019365\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=bawDMShgKPMsEckkGWmhiPL-IfYVUmaZU07AntLPkWseOkbRG3T1cslbc4OPERpy-s7nCHj7JHMxrCqRd1I_kXNi15briz9seec3ymAjIlLzkWVDEI0KsNpVGFQgYmElsufvT8hn82Occr0sbGWsFDu9urlIfiyREyM6DqtuUHQUCQ1GQLH6cpw-WKdbMTfAekADeUW0ypPAd3XAZtn4xDdguNcrA4UiwCZ3ArQb-4cS_EBFb0_MTXaRgLSrmaPZpPTFTp3TV83bV_buy__hCaApgdPtehqovoKE1RAuED8JwJJlcorQzgvcFjONugs4UE2Aw1PDOMmqkMpPlG1Yog\u0026h=6EiIcA49GGYRgi5oV1IuAJ4kHBavdZ4u-84aXqpVmQw", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "a85d4cec-b0d5-44d7-8f81-226c6c13f081" ], + "CommandName": [ "New-AzStorageTaskAssignment" ], + "FullCommandName": [ "New-AzStorageTaskAssignment_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "29282b29-53c2-4543-967c-efc84a836dc7" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "c92877e9-1f84-452e-97ef-69a90de45567" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101836Z:c92877e9-1f84-452e-97ef-69a90de45567" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C40B6E2ED14B492FB548792E054BD66C Ref B: MAA201060513009 Ref C: 2024-07-08T10:18:35Z" ], + "Date": [ "Mon, 08 Jul 2024 10:18:36 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "63" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"status\":\"Succeeded\",\"endTime\":\"2024-07-08T10:18:18.6550932Z\"}", + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/b6275a03-7122-4219-b59b-33f5a181dfcf?monitor=true\u0026api-version=2023-05-01\u0026t=638560306984019365\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=bawDMShgKPMsEckkGWmhiPL-IfYVUmaZU07AntLPkWseOkbRG3T1cslbc4OPERpy-s7nCHj7JHMxrCqRd1I_kXNi15briz9seec3ymAjIlLzkWVDEI0KsNpVGFQgYmElsufvT8hn82Occr0sbGWsFDu9urlIfiyREyM6DqtuUHQUCQ1GQLH6cpw-WKdbMTfAekADeUW0ypPAd3XAZtn4xDdguNcrA4UiwCZ3ArQb-4cS_EBFb0_MTXaRgLSrmaPZpPTFTp3TV83bV_buy__hCaApgdPtehqovoKE1RAuED8JwJJlcorQzgvcFjONugs4UE2Aw1PDOMmqkMpPlG1Yog\u0026h=6EiIcA49GGYRgi5oV1IuAJ4kHBavdZ4u-84aXqpVmQw+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/b6275a03-7122-4219-b59b-33f5a181dfcf?monitor=true\u0026api-version=2023-05-01\u0026t=638560306984019365\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=bawDMShgKPMsEckkGWmhiPL-IfYVUmaZU07AntLPkWseOkbRG3T1cslbc4OPERpy-s7nCHj7JHMxrCqRd1I_kXNi15briz9seec3ymAjIlLzkWVDEI0KsNpVGFQgYmElsufvT8hn82Occr0sbGWsFDu9urlIfiyREyM6DqtuUHQUCQ1GQLH6cpw-WKdbMTfAekADeUW0ypPAd3XAZtn4xDdguNcrA4UiwCZ3ArQb-4cS_EBFb0_MTXaRgLSrmaPZpPTFTp3TV83bV_buy__hCaApgdPtehqovoKE1RAuED8JwJJlcorQzgvcFjONugs4UE2Aw1PDOMmqkMpPlG1Yog\u0026h=6EiIcA49GGYRgi5oV1IuAJ4kHBavdZ4u-84aXqpVmQw", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "a85d4cec-b0d5-44d7-8f81-226c6c13f081" ], + "CommandName": [ "New-AzStorageTaskAssignment" ], + "FullCommandName": [ "New-AzStorageTaskAssignment_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "33e31e29-f60a-4c4a-a05c-80338815e175" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "e43093dc-a480-41d4-95c8-2f1c5f727723" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101837Z:e43093dc-a480-41d4-95c8-2f1c5f727723" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A1C94FC498B54822BD129CE0CE486B24 Ref B: MAA201060513009 Ref C: 2024-07-08T10:18:36Z" ], + "Date": [ "Mon, 08 Jul 2024 10:18:37 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "682" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment01\",\"name\":\"testassignment01\",\"type\":\"Microsoft.Storage/storageAccounts/storageTaskAssignments\",\"properties\":{\"taskId\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.StorageActions/storageTasks/testtask1\",\"enabled\":false,\"description\":\"task assignment1\",\"executionContext\":{\"trigger\":{\"type\":\"RunOnce\",\"parameters\":{\"startOn\":\"2024-07-08T10:18:18.4519669Z\"}}},\"report\":{\"prefix\":\"testc1\"},\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$PUT+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment02?api-version=2023-05-01+4": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment02?api-version=2023-05-01", + "Content": "{\r\n \"properties\": {\r\n \"executionContext\": {\r\n \"trigger\": {\r\n \"parameters\": {\r\n \"startFrom\": \"2225-01-07T17:30:37.5509019Z\",\r\n \"interval\": 10,\r\n \"intervalUnit\": \"Days\",\r\n \"endBy\": \"2226-01-07T18:35:37.5519336Z\"\r\n },\r\n \"type\": \"OnSchedule\"\r\n }\r\n },\r\n \"report\": {\r\n \"prefix\": \"testc1\"\r\n },\r\n \"taskId\": \"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.StorageActions/storageTasks/testtask1\",\r\n \"enabled\": false,\r\n \"description\": \"test assignment2\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "605" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/e8b7197a-6803-4da5-bbcf-0990e1e50cc1?monitor=true\u0026api-version=2023-05-01\u0026t=638560307189018552\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=ZjyG-0oKUQtO63h6Z2lLnbC1yifnqpKxWJKqI_WKlWkqihAXqHit05aFcufeyVk9nosfFjVWZS-Beg1FYtnB81nEAJHP2IPUc_chz4GojpxF1dgBXkXsxdy2DR-SZo41c10YtKGwyKzz9QM-RuIvVcXFVk47L5LgqARpcD557viGN6QShkgl_JPbalLYhOd-TYzLfQw8KIMGl7-blByLvfBNEtoSPJ2VmssNLDxB3zpreaHrRyv8jRyFvsn9ehWtOVpEcXmnUyLFZUGKPW53NZB8d8lnltrGfTURqwqhEvVAHpFFJwHV73l-I0pA4GRWNejOuJ4htBQ09TN1DY6Dvw\u0026h=oxefnKfC0X13tz5PfAUd20yTCfY865TiFmrqp2i45ks" ], + "Retry-After": [ "17" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/e8b7197a-6803-4da5-bbcf-0990e1e50cc1?monitor=true\u0026api-version=2023-05-01\u0026asynclink=true\u0026t=638560307189018552\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=ZjyG-0oKUQtO63h6Z2lLnbC1yifnqpKxWJKqI_WKlWkqihAXqHit05aFcufeyVk9nosfFjVWZS-Beg1FYtnB81nEAJHP2IPUc_chz4GojpxF1dgBXkXsxdy2DR-SZo41c10YtKGwyKzz9QM-RuIvVcXFVk47L5LgqARpcD557viGN6QShkgl_JPbalLYhOd-TYzLfQw8KIMGl7-blByLvfBNEtoSPJ2VmssNLDxB3zpreaHrRyv8jRyFvsn9ehWtOVpEcXmnUyLFZUGKPW53NZB8d8lnltrGfTURqwqhEvVAHpFFJwHV73l-I0pA4GRWNejOuJ4htBQ09TN1DY6Dvw\u0026h=oxefnKfC0X13tz5PfAUd20yTCfY865TiFmrqp2i45ks" ], + "x-ms-request-id": [ "e8b7197a-6803-4da5-bbcf-0990e1e50cc1" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "95cf0f13-36fc-4c86-9378-82c9ca8bd46a" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101838Z:95cf0f13-36fc-4c86-9378-82c9ca8bd46a" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 810BE6351FB346408E6102A394CD07B2 Ref B: MAA201060513009 Ref C: 2024-07-08T10:18:37Z" ], + "Date": [ "Mon, 08 Jul 2024 10:18:38 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "text/plain; charset=utf-8" ], + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/e8b7197a-6803-4da5-bbcf-0990e1e50cc1?monitor=true\u0026api-version=2023-05-01\u0026asynclink=true\u0026t=638560307189018552\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=ZjyG-0oKUQtO63h6Z2lLnbC1yifnqpKxWJKqI_WKlWkqihAXqHit05aFcufeyVk9nosfFjVWZS-Beg1FYtnB81nEAJHP2IPUc_chz4GojpxF1dgBXkXsxdy2DR-SZo41c10YtKGwyKzz9QM-RuIvVcXFVk47L5LgqARpcD557viGN6QShkgl_JPbalLYhOd-TYzLfQw8KIMGl7-blByLvfBNEtoSPJ2VmssNLDxB3zpreaHrRyv8jRyFvsn9ehWtOVpEcXmnUyLFZUGKPW53NZB8d8lnltrGfTURqwqhEvVAHpFFJwHV73l-I0pA4GRWNejOuJ4htBQ09TN1DY6Dvw\u0026h=oxefnKfC0X13tz5PfAUd20yTCfY865TiFmrqp2i45ks+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/e8b7197a-6803-4da5-bbcf-0990e1e50cc1?monitor=true\u0026api-version=2023-05-01\u0026asynclink=true\u0026t=638560307189018552\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=ZjyG-0oKUQtO63h6Z2lLnbC1yifnqpKxWJKqI_WKlWkqihAXqHit05aFcufeyVk9nosfFjVWZS-Beg1FYtnB81nEAJHP2IPUc_chz4GojpxF1dgBXkXsxdy2DR-SZo41c10YtKGwyKzz9QM-RuIvVcXFVk47L5LgqARpcD557viGN6QShkgl_JPbalLYhOd-TYzLfQw8KIMGl7-blByLvfBNEtoSPJ2VmssNLDxB3zpreaHrRyv8jRyFvsn9ehWtOVpEcXmnUyLFZUGKPW53NZB8d8lnltrGfTURqwqhEvVAHpFFJwHV73l-I0pA4GRWNejOuJ4htBQ09TN1DY6Dvw\u0026h=oxefnKfC0X13tz5PfAUd20yTCfY865TiFmrqp2i45ks", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "48372b11-94d8-4543-b9dc-f755ea2d58f3" ], + "CommandName": [ "New-AzStorageTaskAssignment" ], + "FullCommandName": [ "New-AzStorageTaskAssignment_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "8e6c9911-96ff-4481-9286-449c5967db39" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "595595ed-9c91-496c-b427-5475147e52e8" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101857Z:595595ed-9c91-496c-b427-5475147e52e8" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A91EEBE1698342C3A79A1F6761E1516C Ref B: MAA201060513009 Ref C: 2024-07-08T10:18:56Z" ], + "Date": [ "Mon, 08 Jul 2024 10:18:56 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "63" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"status\":\"Succeeded\",\"endTime\":\"2024-07-08T10:18:38.9838706Z\"}", + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/e8b7197a-6803-4da5-bbcf-0990e1e50cc1?monitor=true\u0026api-version=2023-05-01\u0026t=638560307189018552\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=ZjyG-0oKUQtO63h6Z2lLnbC1yifnqpKxWJKqI_WKlWkqihAXqHit05aFcufeyVk9nosfFjVWZS-Beg1FYtnB81nEAJHP2IPUc_chz4GojpxF1dgBXkXsxdy2DR-SZo41c10YtKGwyKzz9QM-RuIvVcXFVk47L5LgqARpcD557viGN6QShkgl_JPbalLYhOd-TYzLfQw8KIMGl7-blByLvfBNEtoSPJ2VmssNLDxB3zpreaHrRyv8jRyFvsn9ehWtOVpEcXmnUyLFZUGKPW53NZB8d8lnltrGfTURqwqhEvVAHpFFJwHV73l-I0pA4GRWNejOuJ4htBQ09TN1DY6Dvw\u0026h=oxefnKfC0X13tz5PfAUd20yTCfY865TiFmrqp2i45ks+6": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/e8b7197a-6803-4da5-bbcf-0990e1e50cc1?monitor=true\u0026api-version=2023-05-01\u0026t=638560307189018552\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=ZjyG-0oKUQtO63h6Z2lLnbC1yifnqpKxWJKqI_WKlWkqihAXqHit05aFcufeyVk9nosfFjVWZS-Beg1FYtnB81nEAJHP2IPUc_chz4GojpxF1dgBXkXsxdy2DR-SZo41c10YtKGwyKzz9QM-RuIvVcXFVk47L5LgqARpcD557viGN6QShkgl_JPbalLYhOd-TYzLfQw8KIMGl7-blByLvfBNEtoSPJ2VmssNLDxB3zpreaHrRyv8jRyFvsn9ehWtOVpEcXmnUyLFZUGKPW53NZB8d8lnltrGfTURqwqhEvVAHpFFJwHV73l-I0pA4GRWNejOuJ4htBQ09TN1DY6Dvw\u0026h=oxefnKfC0X13tz5PfAUd20yTCfY865TiFmrqp2i45ks", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "48372b11-94d8-4543-b9dc-f755ea2d58f3" ], + "CommandName": [ "New-AzStorageTaskAssignment" ], + "FullCommandName": [ "New-AzStorageTaskAssignment_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "83ec6a7a-430c-4f74-be51-5adf7b9cbb5d" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "4178d14a-0f39-4d18-9356-7cc8a25a4928" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101857Z:4178d14a-0f39-4d18-9356-7cc8a25a4928" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: ED9F0B58E2304D888541E41ADC3DACEC Ref B: MAA201060513009 Ref C: 2024-07-08T10:18:57Z" ], + "Date": [ "Mon, 08 Jul 2024 10:18:57 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "762" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment02\",\"name\":\"testassignment02\",\"type\":\"Microsoft.Storage/storageAccounts/storageTaskAssignments\",\"properties\":{\"taskId\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.StorageActions/storageTasks/testtask1\",\"enabled\":false,\"description\":\"test assignment2\",\"executionContext\":{\"trigger\":{\"type\":\"OnSchedule\",\"parameters\":{\"startFrom\":\"2225-01-07T17:30:37.5509019Z\",\"interval\":10,\"intervalUnit\":\"days\",\"endBy\":\"2226-01-07T18:35:37.5519336Z\"}}},\"report\":{\"prefix\":\"testc1\"},\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment01?api-version=2023-05-01+7": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment01?api-version=2023-05-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "6a40563c-3fe7-4083-b554-3eb946e4096b" ], + "CommandName": [ "Get-AzStorageTaskAssignment" ], + "FullCommandName": [ "Get-AzStorageTaskAssignment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "789356f1-40af-4426-8555-54a780dc331e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "8dc79410-f12f-4e56-b612-be8501d1e40c" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101858Z:8dc79410-f12f-4e56-b612-be8501d1e40c" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0CEBF035E68A43CE9586B553C5B8B6C7 Ref B: MAA201060513009 Ref C: 2024-07-08T10:18:57Z" ], + "Date": [ "Mon, 08 Jul 2024 10:18:58 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "682" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment01\",\"name\":\"testassignment01\",\"type\":\"Microsoft.Storage/storageAccounts/storageTaskAssignments\",\"properties\":{\"taskId\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.StorageActions/storageTasks/testtask1\",\"enabled\":false,\"description\":\"task assignment1\",\"executionContext\":{\"trigger\":{\"type\":\"RunOnce\",\"parameters\":{\"startOn\":\"2024-07-08T10:18:18.4519669Z\"}}},\"report\":{\"prefix\":\"testc1\"},\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment02?api-version=2023-05-01+8": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment02?api-version=2023-05-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "9647e366-c6a9-40d8-93df-9192bca56323" ], + "CommandName": [ "Get-AzStorageTaskAssignment" ], + "FullCommandName": [ "Get-AzStorageTaskAssignment_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "df34ebe9-8e06-4a39-9fbd-1ddf810c97e5" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "8e68ffca-66af-49e2-a643-cb399694c137" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101900Z:8e68ffca-66af-49e2-a643-cb399694c137" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8E1457B385214797899D9AC4F46D2C55 Ref B: MAA201060513009 Ref C: 2024-07-08T10:18:58Z" ], + "Date": [ "Mon, 08 Jul 2024 10:18:59 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "762" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment02\",\"name\":\"testassignment02\",\"type\":\"Microsoft.Storage/storageAccounts/storageTaskAssignments\",\"properties\":{\"taskId\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.StorageActions/storageTasks/testtask1\",\"enabled\":false,\"description\":\"test assignment2\",\"executionContext\":{\"trigger\":{\"type\":\"OnSchedule\",\"parameters\":{\"startFrom\":\"2225-01-07T17:30:37.5509019Z\",\"interval\":10,\"intervalUnit\":\"days\",\"endBy\":\"2226-01-07T18:35:37.5519336Z\"}}},\"report\":{\"prefix\":\"testc1\"},\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments?api-version=2023-05-01+9": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments?api-version=2023-05-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "04a43684-f7fa-476b-b8b0-e897fb4de278" ], + "CommandName": [ "Get-AzStorageTaskAssignment" ], + "FullCommandName": [ "Get-AzStorageTaskAssignment_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "22ebf45d-1f99-4b57-8572-e353e9060810" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "526eb744-883c-41a7-8b39-4aa248958998" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101901Z:526eb744-883c-41a7-8b39-4aa248958998" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8B2A3E25CAF848ECA7329CBA01BAB676 Ref B: MAA201060513009 Ref C: 2024-07-08T10:19:00Z" ], + "Date": [ "Mon, 08 Jul 2024 10:19:01 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2142" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment001\",\"name\":\"testassignment001\",\"type\":\"Microsoft.Storage/storageAccounts/storageTaskAssignments\",\"properties\":{\"taskId\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.StorageActions/storageTasks/testtask1\",\"enabled\":false,\"description\":\"task assignment1\",\"executionContext\":{\"trigger\":{\"type\":\"RunOnce\",\"parameters\":{\"startOn\":\"2024-10-10T06:03:34.7232403Z\"}}},\"report\":{\"prefix\":\"testc1\"},\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment01\",\"name\":\"testassignment01\",\"type\":\"Microsoft.Storage/storageAccounts/storageTaskAssignments\",\"properties\":{\"taskId\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.StorageActions/storageTasks/testtask1\",\"enabled\":false,\"description\":\"task assignment1\",\"executionContext\":{\"trigger\":{\"type\":\"RunOnce\",\"parameters\":{\"startOn\":\"2024-07-08T10:18:18.4519669Z\"}}},\"report\":{\"prefix\":\"testc1\"},\"provisioningState\":\"Succeeded\"}},{\"id\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment02\",\"name\":\"testassignment02\",\"type\":\"Microsoft.Storage/storageAccounts/storageTaskAssignments\",\"properties\":{\"taskId\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.StorageActions/storageTasks/testtask1\",\"enabled\":false,\"description\":\"test assignment2\",\"executionContext\":{\"trigger\":{\"type\":\"OnSchedule\",\"parameters\":{\"startFrom\":\"2225-01-07T17:30:37.5509019Z\",\"interval\":10,\"intervalUnit\":\"days\",\"endBy\":\"2226-01-07T18:35:37.5519336Z\"}}},\"report\":{\"prefix\":\"testc1\"},\"provisioningState\":\"Succeeded\"}}]}", + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$PATCH+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment01?api-version=2023-05-01+10": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment01?api-version=2023-05-01", + "Content": "{\r\n \"properties\": {\r\n \"executionContext\": {\r\n \"trigger\": {\r\n \"parameters\": {\r\n \"startOn\": \"2226-01-07T18:35:37.5519336Z\"\r\n }\r\n }\r\n }\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "180" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "798a346d-992c-410f-842b-848a52e13782" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "0eb1b7db-1125-446f-9458-2071ff8676ce" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101902Z:0eb1b7db-1125-446f-9458-2071ff8676ce" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9996D5B3E8F54BF6A57E6DEEABDA2A61 Ref B: MAA201060513009 Ref C: 2024-07-08T10:19:01Z" ], + "Date": [ "Mon, 08 Jul 2024 10:19:02 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "682" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment01\",\"name\":\"testassignment01\",\"type\":\"Microsoft.Storage/storageAccounts/storageTaskAssignments\",\"properties\":{\"taskId\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.StorageActions/storageTasks/testtask1\",\"enabled\":false,\"description\":\"task assignment1\",\"executionContext\":{\"trigger\":{\"type\":\"RunOnce\",\"parameters\":{\"startOn\":\"2226-01-07T18:35:37.5519336Z\"}}},\"report\":{\"prefix\":\"testc1\"},\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$PATCH+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment02?api-version=2023-05-01+11": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment02?api-version=2023-05-01", + "Content": "{\r\n \"properties\": {\r\n \"executionContext\": {\r\n \"target\": {\r\n \"excludePrefix\": [ \"ttt\" ]\r\n },\r\n \"trigger\": {\r\n \"parameters\": {\r\n \"interval\": 20,\r\n \"intervalUnit\": \"Days\"\r\n }\r\n }\r\n },\r\n \"enabled\": false,\r\n \"description\": \"update atask assignment\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "323" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "531a599a-65e5-4a6e-b799-f55148967423" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "7c1bd2e4-a7a1-415a-8144-63db7ec61915" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101904Z:7c1bd2e4-a7a1-415a-8144-63db7ec61915" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 53FC95D8902E4536BE0789C42AFC79DA Ref B: MAA201060513009 Ref C: 2024-07-08T10:19:02Z" ], + "Date": [ "Mon, 08 Jul 2024 10:19:04 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "804" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment02\",\"name\":\"testassignment02\",\"type\":\"Microsoft.Storage/storageAccounts/storageTaskAssignments\",\"properties\":{\"taskId\":\"/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.StorageActions/storageTasks/testtask1\",\"enabled\":false,\"description\":\"update atask assignment\",\"executionContext\":{\"target\":{\"excludePrefix\":[\"ttt\"]},\"trigger\":{\"type\":\"OnSchedule\",\"parameters\":{\"startFrom\":\"2225-01-07T17:30:37.5509019Z\",\"interval\":20,\"intervalUnit\":\"days\",\"endBy\":\"2226-01-07T18:35:37.5519336Z\"}}},\"report\":{\"prefix\":\"testc1\"},\"provisioningState\":\"Succeeded\"}}", + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment01/reports?api-version=2023-05-01+12": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment01/reports?api-version=2023-05-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "ec2a4a7e-7b16-47e7-8730-dfd8609b4e05" ], + "CommandName": [ "Get-AzStorageTaskAssignmentInstancesReport" ], + "FullCommandName": [ "Get-AzStorageTaskAssignmentInstancesReport_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "5787817a-0123-49a8-9f07-792ce49337a5" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "c372a70f-5cd5-4de9-8cb2-19417060b21f" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101905Z:c372a70f-5cd5-4de9-8cb2-19417060b21f" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 709A8B816E4F451EB9664A6E37BFF236 Ref B: MAA201060513009 Ref C: 2024-07-08T10:19:04Z" ], + "Date": [ "Mon, 08 Jul 2024 10:19:05 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "12" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[]}", + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/reports?api-version=2023-05-01+13": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/reports?api-version=2023-05-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "b38258d3-bd4f-44f3-b049-ef46e79d8cc9" ], + "CommandName": [ "Get-AzStorageTaskAssignmentInstancesReport" ], + "FullCommandName": [ "Get-AzStorageTaskAssignmentInstancesReport_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "c073490b-d48a-43bd-9fe2-a3eef6e143a6" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "17013f08-4362-4283-940a-4101788e5371" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101907Z:17013f08-4362-4283-940a-4101788e5371" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CB880F9BF61F44B285CEA2AACAA197DD Ref B: MAA201060513009 Ref C: 2024-07-08T10:19:06Z" ], + "Date": [ "Mon, 08 Jul 2024 10:19:07 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "12" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[]}", + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$DELETE+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment01?api-version=2023-05-01+14": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment01?api-version=2023-05-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "15" ], + "x-ms-client-request-id": [ "464dc62e-5f9a-48e0-9f5e-2036442b1612" ], + "CommandName": [ "Remove-AzStorageTaskAssignment" ], + "FullCommandName": [ "Remove-AzStorageTaskAssignment_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/7bd704af-32f4-471a-a7d5-01e943fabcac?monitor=true\u0026api-version=2023-05-01\u0026t=638560307487929983\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=ppZmG07SrqaJZGytsRxAP_KMfVxMgqLYC0BqDAu0lE13MNmS2ULz1yFBZdtuPlabXmp92wxu5tLhGlXSQi0I8nBPdrRups3Sz2r7KrDawFBK63HC4ySMfoQ3wZcYivDWLCbLQ0UJvOJjTV5LmyCTuj4Iv7wk4hHcRb8kqQiyq3iqrNiYDdXt6X-v1k4o1O6RMJVW98DEG_0P9ZWluntqeJHSBNJ9IDYJHUpM3mhu0XgvklqgbR80B2ebVSwEDZydkB60g0dhhQfKzvGqi4qvA5amKeJPZXoRxOWpMN5ectIJXkPL6ahkruKQoETHCVjQjUv6W6015K8qQ_ZbB6zmmw\u0026h=lk0HqVtlmhsd0vuyhMVuR1RYx0TnkhiFeyuC9WY4hzw" ], + "Retry-After": [ "17" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/7bd704af-32f4-471a-a7d5-01e943fabcac?monitor=true\u0026api-version=2023-05-01\u0026asynclink=true\u0026t=638560307487929983\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=ppZmG07SrqaJZGytsRxAP_KMfVxMgqLYC0BqDAu0lE13MNmS2ULz1yFBZdtuPlabXmp92wxu5tLhGlXSQi0I8nBPdrRups3Sz2r7KrDawFBK63HC4ySMfoQ3wZcYivDWLCbLQ0UJvOJjTV5LmyCTuj4Iv7wk4hHcRb8kqQiyq3iqrNiYDdXt6X-v1k4o1O6RMJVW98DEG_0P9ZWluntqeJHSBNJ9IDYJHUpM3mhu0XgvklqgbR80B2ebVSwEDZydkB60g0dhhQfKzvGqi4qvA5amKeJPZXoRxOWpMN5ectIJXkPL6ahkruKQoETHCVjQjUv6W6015K8qQ_ZbB6zmmw\u0026h=lk0HqVtlmhsd0vuyhMVuR1RYx0TnkhiFeyuC9WY4hzw" ], + "x-ms-request-id": [ "7bd704af-32f4-471a-a7d5-01e943fabcac" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-correlation-request-id": [ "b3db8ba4-9c25-4779-be76-7a731c784702" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101908Z:b3db8ba4-9c25-4779-be76-7a731c784702" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 45A030A22AF34B768A877073BA9331B1 Ref B: MAA201060513009 Ref C: 2024-07-08T10:19:07Z" ], + "Date": [ "Mon, 08 Jul 2024 10:19:08 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "text/plain; charset=utf-8" ], + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/7bd704af-32f4-471a-a7d5-01e943fabcac?monitor=true\u0026api-version=2023-05-01\u0026asynclink=true\u0026t=638560307487929983\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=ppZmG07SrqaJZGytsRxAP_KMfVxMgqLYC0BqDAu0lE13MNmS2ULz1yFBZdtuPlabXmp92wxu5tLhGlXSQi0I8nBPdrRups3Sz2r7KrDawFBK63HC4ySMfoQ3wZcYivDWLCbLQ0UJvOJjTV5LmyCTuj4Iv7wk4hHcRb8kqQiyq3iqrNiYDdXt6X-v1k4o1O6RMJVW98DEG_0P9ZWluntqeJHSBNJ9IDYJHUpM3mhu0XgvklqgbR80B2ebVSwEDZydkB60g0dhhQfKzvGqi4qvA5amKeJPZXoRxOWpMN5ectIJXkPL6ahkruKQoETHCVjQjUv6W6015K8qQ_ZbB6zmmw\u0026h=lk0HqVtlmhsd0vuyhMVuR1RYx0TnkhiFeyuC9WY4hzw+15": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/7bd704af-32f4-471a-a7d5-01e943fabcac?monitor=true\u0026api-version=2023-05-01\u0026asynclink=true\u0026t=638560307487929983\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=ppZmG07SrqaJZGytsRxAP_KMfVxMgqLYC0BqDAu0lE13MNmS2ULz1yFBZdtuPlabXmp92wxu5tLhGlXSQi0I8nBPdrRups3Sz2r7KrDawFBK63HC4ySMfoQ3wZcYivDWLCbLQ0UJvOJjTV5LmyCTuj4Iv7wk4hHcRb8kqQiyq3iqrNiYDdXt6X-v1k4o1O6RMJVW98DEG_0P9ZWluntqeJHSBNJ9IDYJHUpM3mhu0XgvklqgbR80B2ebVSwEDZydkB60g0dhhQfKzvGqi4qvA5amKeJPZXoRxOWpMN5ectIJXkPL6ahkruKQoETHCVjQjUv6W6015K8qQ_ZbB6zmmw\u0026h=lk0HqVtlmhsd0vuyhMVuR1RYx0TnkhiFeyuC9WY4hzw", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "16" ], + "x-ms-client-request-id": [ "464dc62e-5f9a-48e0-9f5e-2036442b1612" ], + "CommandName": [ "Remove-AzStorageTaskAssignment" ], + "FullCommandName": [ "Remove-AzStorageTaskAssignment_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "99cee30b-39a2-4d02-9a20-d0022072cbeb" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "fab4ac9e-83a7-43fa-abde-50faca31d1ac" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101926Z:fab4ac9e-83a7-43fa-abde-50faca31d1ac" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C5A87E6EFAD14B7BAC0CA48D4944F988 Ref B: MAA201060513009 Ref C: 2024-07-08T10:19:26Z" ], + "Date": [ "Mon, 08 Jul 2024 10:19:26 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/7bd704af-32f4-471a-a7d5-01e943fabcac?monitor=true\u0026api-version=2023-05-01\u0026t=638560307487929983\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=ppZmG07SrqaJZGytsRxAP_KMfVxMgqLYC0BqDAu0lE13MNmS2ULz1yFBZdtuPlabXmp92wxu5tLhGlXSQi0I8nBPdrRups3Sz2r7KrDawFBK63HC4ySMfoQ3wZcYivDWLCbLQ0UJvOJjTV5LmyCTuj4Iv7wk4hHcRb8kqQiyq3iqrNiYDdXt6X-v1k4o1O6RMJVW98DEG_0P9ZWluntqeJHSBNJ9IDYJHUpM3mhu0XgvklqgbR80B2ebVSwEDZydkB60g0dhhQfKzvGqi4qvA5amKeJPZXoRxOWpMN5ectIJXkPL6ahkruKQoETHCVjQjUv6W6015K8qQ_ZbB6zmmw\u0026h=lk0HqVtlmhsd0vuyhMVuR1RYx0TnkhiFeyuC9WY4hzw+16": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/7bd704af-32f4-471a-a7d5-01e943fabcac?monitor=true\u0026api-version=2023-05-01\u0026t=638560307487929983\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=ppZmG07SrqaJZGytsRxAP_KMfVxMgqLYC0BqDAu0lE13MNmS2ULz1yFBZdtuPlabXmp92wxu5tLhGlXSQi0I8nBPdrRups3Sz2r7KrDawFBK63HC4ySMfoQ3wZcYivDWLCbLQ0UJvOJjTV5LmyCTuj4Iv7wk4hHcRb8kqQiyq3iqrNiYDdXt6X-v1k4o1O6RMJVW98DEG_0P9ZWluntqeJHSBNJ9IDYJHUpM3mhu0XgvklqgbR80B2ebVSwEDZydkB60g0dhhQfKzvGqi4qvA5amKeJPZXoRxOWpMN5ectIJXkPL6ahkruKQoETHCVjQjUv6W6015K8qQ_ZbB6zmmw\u0026h=lk0HqVtlmhsd0vuyhMVuR1RYx0TnkhiFeyuC9WY4hzw", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "464dc62e-5f9a-48e0-9f5e-2036442b1612" ], + "CommandName": [ "Remove-AzStorageTaskAssignment" ], + "FullCommandName": [ "Remove-AzStorageTaskAssignment_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "b632202c-506b-4d39-8083-320c0b4ad075" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "ba8ec3c9-dd27-45fb-8a39-c3e229d926f5" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101927Z:ba8ec3c9-dd27-45fb-8a39-c3e229d926f5" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 450CF402D7A54637BF3CF56D4520CDB0 Ref B: MAA201060513009 Ref C: 2024-07-08T10:19:27Z" ], + "Date": [ "Mon, 08 Jul 2024 10:19:27 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "text/plain; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$DELETE+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment02?api-version=2023-05-01+17": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.Storage/storageAccounts/testassignmentaccount/storageTaskAssignments/testassignment02?api-version=2023-05-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "18" ], + "x-ms-client-request-id": [ "5d8270d8-0c30-44b1-aea5-230da7356550" ], + "CommandName": [ "Remove-AzStorageTaskAssignment" ], + "FullCommandName": [ "Remove-AzStorageTaskAssignment_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/2655877d-e43f-4eed-ad60-14aa216fb9c0?monitor=true\u0026api-version=2023-05-01\u0026t=638560307687661801\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=WW0lfzjhakS1bDZorGxOBtr54ctE064WuOCx2U8YFXa8KjBpdXJrTQES0PxZl5xxEzA7i4MwgETWhOXXdAEU4A904HbF8Kfq9BVtkJqwDaGSq_OkIlPoPO-YjakB7QHXFcpK8OouY3zDvQDd0b6Pjn_edMComPogs7xct52YH83cyMnR5kRMHe26585vSaIi8v9gM1xSxUobG8euc9qKn5Rj-HJ-VZgNazQk0QdYYB_yqpRklZK7YhwNgl4-WggXAj_41L4MOFse970doW3y-3OBliH2SFIJOEIgG8vTA1u_ewyuAw_go_86oHrqMuJ7xCqaIMp0iTg9a8mJHhhUbA\u0026h=db4FsWo91TLDdVkSiptCwZ8_oCryBNMBO-P4Faip3RU" ], + "Retry-After": [ "17" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/2655877d-e43f-4eed-ad60-14aa216fb9c0?monitor=true\u0026api-version=2023-05-01\u0026asynclink=true\u0026t=638560307687506135\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=vjm2_ufmlJvcJ2VyD1f7hZWmIk-S51TTb0s7KfOrHUZLwv32SBImqg10aTzA7RVg0gElHSi8gAqaBZEkJqcCo53Uy6LAj9Q46X_XQhlXkZ0b1uA-CxZFU-ceG15aLALUyfwM7WED5WsWr5AnAas29hbJE0sLk_856NwlqcqBIgjG1VfheHdtS4_A7htOHsjkB9JNoILuSWLYtzhdK3sjtuF2wrHxsOpvlTs198zeEdFnk6wJHMsIgl-sPnpTg8UuTQY3ocT9MO00bX9afSO8czf8sovTRDjC1ZMnDFD9N4QOBaG2EIMk29Apsn4xiSGjVRVXlLytBAckcXc7x41kfw\u0026h=0uQV4XV-MmAokNsPQF1udWtnRooMd1mWK-jEdETpfoQ" ], + "x-ms-request-id": [ "2655877d-e43f-4eed-ad60-14aa216fb9c0" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-correlation-request-id": [ "7f1e01d6-8277-4aed-8830-c3314db2ab64" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101928Z:7f1e01d6-8277-4aed-8830-c3314db2ab64" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: ECD7A55B309648998AA939BC1369CB83 Ref B: MAA201060513009 Ref C: 2024-07-08T10:19:27Z" ], + "Date": [ "Mon, 08 Jul 2024 10:19:28 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "text/plain; charset=utf-8" ], + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/2655877d-e43f-4eed-ad60-14aa216fb9c0?monitor=true\u0026api-version=2023-05-01\u0026asynclink=true\u0026t=638560307687506135\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=vjm2_ufmlJvcJ2VyD1f7hZWmIk-S51TTb0s7KfOrHUZLwv32SBImqg10aTzA7RVg0gElHSi8gAqaBZEkJqcCo53Uy6LAj9Q46X_XQhlXkZ0b1uA-CxZFU-ceG15aLALUyfwM7WED5WsWr5AnAas29hbJE0sLk_856NwlqcqBIgjG1VfheHdtS4_A7htOHsjkB9JNoILuSWLYtzhdK3sjtuF2wrHxsOpvlTs198zeEdFnk6wJHMsIgl-sPnpTg8UuTQY3ocT9MO00bX9afSO8czf8sovTRDjC1ZMnDFD9N4QOBaG2EIMk29Apsn4xiSGjVRVXlLytBAckcXc7x41kfw\u0026h=0uQV4XV-MmAokNsPQF1udWtnRooMd1mWK-jEdETpfoQ+18": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/2655877d-e43f-4eed-ad60-14aa216fb9c0?monitor=true\u0026api-version=2023-05-01\u0026asynclink=true\u0026t=638560307687506135\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=vjm2_ufmlJvcJ2VyD1f7hZWmIk-S51TTb0s7KfOrHUZLwv32SBImqg10aTzA7RVg0gElHSi8gAqaBZEkJqcCo53Uy6LAj9Q46X_XQhlXkZ0b1uA-CxZFU-ceG15aLALUyfwM7WED5WsWr5AnAas29hbJE0sLk_856NwlqcqBIgjG1VfheHdtS4_A7htOHsjkB9JNoILuSWLYtzhdK3sjtuF2wrHxsOpvlTs198zeEdFnk6wJHMsIgl-sPnpTg8UuTQY3ocT9MO00bX9afSO8czf8sovTRDjC1ZMnDFD9N4QOBaG2EIMk29Apsn4xiSGjVRVXlLytBAckcXc7x41kfw\u0026h=0uQV4XV-MmAokNsPQF1udWtnRooMd1mWK-jEdETpfoQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "19" ], + "x-ms-client-request-id": [ "5d8270d8-0c30-44b1-aea5-230da7356550" ], + "CommandName": [ "Remove-AzStorageTaskAssignment" ], + "FullCommandName": [ "Remove-AzStorageTaskAssignment_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "91c25a20-4bd9-4029-a22b-57760ffa1fdc" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "7749e636-f833-4b1a-99ac-61ffdc64cfb6" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101946Z:7749e636-f833-4b1a-99ac-61ffdc64cfb6" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4E1B680D91304169B1B61B5B28E03CF8 Ref B: MAA201060513009 Ref C: 2024-07-08T10:19:46Z" ], + "Date": [ "Mon, 08 Jul 2024 10:19:46 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+[NoContext]+New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports+$GET+https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/2655877d-e43f-4eed-ad60-14aa216fb9c0?monitor=true\u0026api-version=2023-05-01\u0026t=638560307687661801\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=WW0lfzjhakS1bDZorGxOBtr54ctE064WuOCx2U8YFXa8KjBpdXJrTQES0PxZl5xxEzA7i4MwgETWhOXXdAEU4A904HbF8Kfq9BVtkJqwDaGSq_OkIlPoPO-YjakB7QHXFcpK8OouY3zDvQDd0b6Pjn_edMComPogs7xct52YH83cyMnR5kRMHe26585vSaIi8v9gM1xSxUobG8euc9qKn5Rj-HJ-VZgNazQk0QdYYB_yqpRklZK7YhwNgl4-WggXAj_41L4MOFse970doW3y-3OBliH2SFIJOEIgG8vTA1u_ewyuAw_go_86oHrqMuJ7xCqaIMp0iTg9a8mJHhhUbA\u0026h=db4FsWo91TLDdVkSiptCwZ8_oCryBNMBO-P4Faip3RU+19": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/providers/Microsoft.Storage/locations/eastus2euap/asyncoperations/2655877d-e43f-4eed-ad60-14aa216fb9c0?monitor=true\u0026api-version=2023-05-01\u0026t=638560307687661801\u0026c=MIIHhzCCBm-gAwIBAgITHgTSAvXh1GCKrw08WQAABNIC9TANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjI3MTUyNDA3WhcNMjUwNjIyMTUyNDA3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOX5t0OxQxE3upQbbFvsmp5T7gqPC72fDSg6G0QO-q7rqYToC8QZH_q_PRft3qJZILPcMnC3i05PTpzbeogSlCaa_AwlLL7W5xwBRGnsSFi6uqID-boEdPC1XBtfJ14hE4xgTlvyDFkeshYKWfG6lyrFXbpwsk-8W5euzj5uEAU138aMueyASKkhbn0w-sYa2oA_U3jECVOIlAwWtv49Wed78xbdxyOXsueDyzxDOoM-H1uA24aMiLn3z563K9_bYY4a6hsemVB7YhKwCV0dGFB2NlQuW_yO_VNKEK9b5n56xBisqDcyIAGbNaCFxMjAXplvF7azyX5n0rlTcXgQ5EUCAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBQdmu6OxIvudboSaHvi8VnT7XivcjAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAE87bMgkwSJkJtWUWHywZrpdkdbMMJKKdyoixpEZVLQBkS9P248tTUDTQq_W-W_H7OUWFz7F2SmgWJcMU4lnrWQB7xGR2SU5N_Uq5D-F95ksx2I3ALBtLB8wC6t2cwtzjFIPYr9NPyCtZrnbgh6CAFqGpOq0mVkPAHZBfOfywStnkVpA4JYP0B8IIBfA4E-YqSFxC_9vSP8doGWlUkJhw7E1ylemxWU0jv_96awij-EayTYpo-pH2U6hG6hdW5nRZ929VEbgHmcDW03GdpvtqiZGWC3RdWgVHTZPvQ5XyUmZOaBQILallvd5D9QYh1VmY4oAl5QfafZ76IVrmfwu6c\u0026s=WW0lfzjhakS1bDZorGxOBtr54ctE064WuOCx2U8YFXa8KjBpdXJrTQES0PxZl5xxEzA7i4MwgETWhOXXdAEU4A904HbF8Kfq9BVtkJqwDaGSq_OkIlPoPO-YjakB7QHXFcpK8OouY3zDvQDd0b6Pjn_edMComPogs7xct52YH83cyMnR5kRMHe26585vSaIi8v9gM1xSxUobG8euc9qKn5Rj-HJ-VZgNazQk0QdYYB_yqpRklZK7YhwNgl4-WggXAj_41L4MOFse970doW3y-3OBliH2SFIJOEIgG8vTA1u_ewyuAw_go_86oHrqMuJ7xCqaIMp0iTg9a8mJHhhUbA\u0026h=db4FsWo91TLDdVkSiptCwZ8_oCryBNMBO-P4Faip3RU", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "20" ], + "x-ms-client-request-id": [ "5d8270d8-0c30-44b1-aea5-230da7356550" ], + "CommandName": [ "Remove-AzStorageTaskAssignment" ], + "FullCommandName": [ "Remove-AzStorageTaskAssignment_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.1.0", "PSVersion/v7.4.3", "Az.Storage/5.9.1" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-request-id": [ "519f2cff-6a95-417c-8b27-c435a1c7bdd0" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "88ca7cf3-c95f-403c-ac65-5e8307aaee2a" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20240708T101947Z:88ca7cf3-c95f-403c-ac65-5e8307aaee2a" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: AA254F40BD4747519521CCE13DF53504 Ref B: MAA201060513009 Ref C: 2024-07-08T10:19:47Z" ], + "Date": [ "Mon, 08 Jul 2024 10:19:47 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "text/plain; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/test/New-AzStorageTaskAssignment.Tests.ps1 b/src/Storage/Storage.Autorest/test/New-AzStorageTaskAssignment.Tests.ps1 new file mode 100644 index 000000000000..8292a7b5aaac --- /dev/null +++ b/src/Storage/Storage.Autorest/test/New-AzStorageTaskAssignment.Tests.ps1 @@ -0,0 +1,81 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzStorageTaskAssignment')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzStorageTaskAssignment.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports' { + It 'New/Get/Update/Remove-AzStorageTaskAssignment, List task assignment reports' { + $assignmentname1 = "testassignment01" + $reportprefix = "testc1" + $assignment1 = New-AzStorageTaskAssignment -AccountName $env.TaskAssignmentAccount -Name $assignmentname1 -ResourceGroupName $env.TaskAssignmentResourceGroup -TaskId $env.TaskID -ReportPrefix $reportprefix -TriggerType RunOnce -Description "task assignment1" -Enabled:$false + $assignment1.Name | Should -Be $assignmentname1 + $assignment1.ReportPrefix | Should -Be $reportprefix + $assignment1.TriggerType | Should -Be "RunOnce" + $assignment1.Enabled | Should -Be $false + + $assignmentname2 = "testassignment02" + $start = Get-Date -Year 2225 -Month 1 -Day 10 -Hour 1 -Minute 30 + $end = Get-Date -Year 2226 -Month 1 -Day 10 -Hour 2 -Minute 35 + $assignment2 = New-AzStorageTaskAssignment -AccountName $env.TaskAssignmentAccount -Name $assignmentname2 -ResourceGroupName $env.TaskAssignmentResourceGroup -TaskId $env.TaskID -Description "test assignment2" -ReportPrefix $reportprefix -TriggerType OnSchedule -StartFrom $start.ToUniversalTime() -EndBy $end.ToUniversalTime() -Enabled:$false -Interval 10 -IntervalUnit Days + $assignment2.Name | Should -Be $assignmentname2 + $assignment2.ReportPrefix | Should -Be $reportprefix + $assignment2.TriggerType | Should -Be "OnSchedule" + $assignment2.Enabled | Should -Be $false + $assignment2.IntervalUnit | Should -Be "days" + $assignment2.Interval | Should -Be 10 + $assignment2.StartFrom.Year| Should -Be $start.ToUniversalTime().Year + $assignment2.EndBy.Year | Should -Be $end.ToUniversalTime().Year + + $assignment1 = Get-AzStorageTaskAssignment -AccountName $env.TaskAssignmentAccount -ResourceGroupName $env.TaskAssignmentResourceGroup -Name $assignmentname1 + $assignment1.Name | Should -Be $assignmentname1 + $assignment1.ReportPrefix | Should -Be $reportprefix + $assignment1.TriggerType | Should -Be "RunOnce" + $assignment1.Enabled | Should -Be $false + + $assignment2 = Get-AzStorageTaskAssignment -AccountName $env.TaskAssignmentAccount -ResourceGroupName $env.TaskAssignmentResourceGroup -Name $assignmentname2 + $assignment2.Name | Should -Be $assignmentname2 + $assignment2.ReportPrefix | Should -Be $reportprefix + $assignment2.TriggerType | Should -Be "OnSchedule" + $assignment2.Enabled | Should -Be $false + $assignment2.IntervalUnit | Should -Be "days" + $assignment2.Interval | Should -Be 10 + + $assignments = Get-AzStorageTaskAssignment -ResourceGroupName $env.TaskAssignmentResourceGroup -AccountName $env.TaskAssignmentAccount + $assignments.Count | Should -BeGreaterThan 1 + + $assignment1 = Update-AzStorageTaskAssignment -AccountName $env.TaskAssignmentAccount -ResourceGroupName $env.TaskAssignmentResourceGroup -Name $assignmentname1 -StartOn $end.ToUniversalTime() + $assignment1.Name | Should -Be $assignmentname1 + $assignment1.ReportPrefix | Should -Be $reportprefix + $assignment1.TriggerType | Should -Be "RunOnce" + $assignment1.Enabled | Should -Be $false + $assignment1.StartOn.Year | Should -Be $end.ToUniversalTime().Year + + $assignment2 = Update-AzStorageTaskAssignment -AccountName $env.TaskAssignmentAccount -ResourceGroupName $env.TaskAssignmentResourceGroup -Name $assignmentname2 -Interval 20 -IntervalUnit Days -Description "update atask assignment" -Enabled:$false -TargetExcludePrefix "ttt" + $assignment2.Name | Should -Be $assignmentname2 + $assignment2.ReportPrefix | Should -Be $reportprefix + $assignment2.TriggerType | Should -Be "OnSchedule" + $assignment2.Enabled | Should -Be $false + $assignment2.IntervalUnit | Should -Be "days" + $assignment2.Interval | Should -Be 20 + + $reports = Get-AzStorageTaskAssignmentInstancesReport -ResourceGroupName $env.TaskAssignmentResourceGroup -AccountName $env.TaskAssignmentAccount -StorageTaskAssignmentName $assignmentname1 + $reports.Count | Should -Be 0 + + $reports = Get-AzStorageTaskAssignmentInstancesReport -ResourceGroupName $env.TaskAssignmentResourceGroup -AccountName $env.TaskAssignmentAccount + $reports.Count | Should -Be 0 + + Remove-AzStorageTaskAssignment -AccountName $env.TaskAssignmentAccount -ResourceGroupName $env.TaskAssignmentResourceGroup -Name $assignmentname1 + Remove-AzStorageTaskAssignment -AccountName $env.TaskAssignmentAccount -ResourceGroupName $env.TaskAssignmentResourceGroup -Name $assignmentname2 + } +} \ No newline at end of file diff --git a/src/Storage/Storage.Autorest/test/Remove-AzStorageTaskAssignment.Tests.ps1 b/src/Storage/Storage.Autorest/test/Remove-AzStorageTaskAssignment.Tests.ps1 new file mode 100644 index 000000000000..622b3a8db93c --- /dev/null +++ b/src/Storage/Storage.Autorest/test/Remove-AzStorageTaskAssignment.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzStorageTaskAssignment')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzStorageTaskAssignment.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzStorageTaskAssignment' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentityStorageAccount' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Storage/Storage.Autorest/test/Update-AzStorageTaskAssignment.Tests.ps1 b/src/Storage/Storage.Autorest/test/Update-AzStorageTaskAssignment.Tests.ps1 new file mode 100644 index 000000000000..1468ef551c1f --- /dev/null +++ b/src/Storage/Storage.Autorest/test/Update-AzStorageTaskAssignment.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzStorageTaskAssignment')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzStorageTaskAssignment.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzStorageTaskAssignment' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityStorageAccountExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Storage/Storage.Autorest/test/env.json b/src/Storage/Storage.Autorest/test/env.json index 778137000429..500a7383c225 100644 --- a/src/Storage/Storage.Autorest/test/env.json +++ b/src/Storage/Storage.Autorest/test/env.json @@ -1,7 +1,10 @@ { - "SubscriptionId": "45b60d85-fd72-427a-a708-f994d26e593e", - "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "ResourceGroupName": "testaccountmigrationrg", "AccountName": "testaccountmigration111", - "RandomString": "pbg2iy4o" + "ResourceGroupName": "testaccountmigrationrg", + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "TaskID": "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.StorageActions/storageTasks/testtask1", + "RandomString": "ck17p5f9", + "TaskAssignmentResourceGroup": "testtaskassignmentrg", + "SubscriptionId": "45b60d85-fd72-427a-a708-f994d26e593e", + "TaskAssignmentAccount": "testassignmentaccount" } diff --git a/src/Storage/Storage.Autorest/test/utils.ps1 b/src/Storage/Storage.Autorest/test/utils.ps1 index 3d4a1af38435..efaaa5d27198 100644 --- a/src/Storage/Storage.Autorest/test/utils.ps1 +++ b/src/Storage/Storage.Autorest/test/utils.ps1 @@ -52,10 +52,13 @@ function setupEnv() { $env.RandomString = (RandomString $false 8) $env.ResourceGroupName = "testaccountmigrationrg" $env.AccountName = "testaccountmigration111" + $env.TaskID = "/subscriptions/45b60d85-fd72-427a-a708-f994d26e593e/resourceGroups/testtaskassignmentrg/providers/Microsoft.StorageActions/storageTasks/testtask1" + $env.TaskAssignmentResourceGroup = "testtaskassignmentrg" + $env.TaskAssignmentAccount = "testassignmentaccount" set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) } function cleanupEnv() { - # Clean resources you create for + # Clean resources you create fortest } diff --git a/src/Storage/Storage.Management/Az.Storage.psd1 b/src/Storage/Storage.Management/Az.Storage.psd1 index ce18fe3da902..f4c912f55c21 100644 --- a/src/Storage/Storage.Management/Az.Storage.psd1 +++ b/src/Storage/Storage.Management/Az.Storage.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 7/4/2024 +# Generated on: 7/9/2024 # @{ @@ -73,13 +73,13 @@ RequiredAssemblies = 'Azure.Data.Tables.dll', 'Azure.Storage.Blobs.dll', 'System.IO.Hashing.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() +ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() +TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = 'Storage.Autorest\Az.Storage.format.ps1xml', +FormatsToProcess = 'Storage.Autorest/Az.Storage.format.ps1xml', 'Storage.format.ps1xml', 'Storage.generated.format.ps1xml', 'Storage.Management.format.ps1xml' @@ -89,7 +89,10 @@ NestedModules = @('Microsoft.Azure.PowerShell.Cmdlets.Storage.dll', 'Storage.Autorest/Az.Storage.psm1') # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = 'Get-AzStorageAccountMigration', 'Start-AzStorageAccountMigration' +FunctionsToExport = 'Get-AzStorageAccountMigration', 'Get-AzStorageTaskAssignment', + 'Get-AzStorageTaskAssignmentInstancesReport', + 'New-AzStorageTaskAssignment', 'Remove-AzStorageTaskAssignment', + 'Start-AzStorageAccountMigration', 'Update-AzStorageTaskAssignment' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Add-AzRmStorageContainerLegalHold', @@ -213,12 +216,7 @@ AliasesToExport = 'Disable-AzStorageSoftDelete', 'Enable-AzStorageSoftDelete', 'Get-AzDatalakeGen2FileSystem', 'Get-AzStorageContainerAcl', 'New-AzDatalakeGen2FileSystem', 'New-AzDataLakeGen2ItemAclObject', 'Remove-AzDatalakeGen2FileSystem', 'Start-CopyAzureStorageBlob', - 'Stop-CopyAzureStorageBlob', 'Enable-AzureStorageStaticWebsite', - 'Disable-AzureStorageStaticWebsite', - 'Invoke-AzureRmStorageAccountFailover', - 'Get-AzureRmStorageAccountManagementPolicy', - 'Set-AzureRmStorageAccountManagementPolicy', - 'Remove-AzureRmStorageAccountManagementPolicy' + 'Stop-CopyAzureStorageBlob' # DSC resources to export from this module # DscResourcesToExport = @() @@ -235,7 +233,7 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','Storage','StorageAccount' + Tags = 'Azure', 'ResourceManager', 'ARM', 'Storage', 'StorageAccount' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' @@ -268,7 +266,7 @@ PrivateData = @{ } # End of PSData hashtable - } # End of PrivateData hashtable +} # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' diff --git a/src/Storage/Storage.Management/help/Add-AzRmStorageContainerLegalHold.md b/src/Storage/Storage.Management/help/Add-AzRmStorageContainerLegalHold.md index 819b61b69ab6..18bcf6239165 100644 --- a/src/Storage/Storage.Management/help/Add-AzRmStorageContainerLegalHold.md +++ b/src/Storage/Storage.Management/help/Add-AzRmStorageContainerLegalHold.md @@ -16,21 +16,21 @@ Adds legal hold tags to a Storage blob container ``` Add-AzRmStorageContainerLegalHold [-ResourceGroupName] [-StorageAccountName] -Name -Tag [-AllowProtectedAppendWriteAll ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Add-AzRmStorageContainerLegalHold -Name -StorageAccount -Tag [-AllowProtectedAppendWriteAll ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ContainerObject ``` Add-AzRmStorageContainerLegalHold -Container -Tag [-AllowProtectedAppendWriteAll ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -123,6 +123,21 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Add-AzStorageAccountManagementPolicyAction.md b/src/Storage/Storage.Management/help/Add-AzStorageAccountManagementPolicyAction.md index 19329be6152d..4c53a836df6f 100644 --- a/src/Storage/Storage.Management/help/Add-AzStorageAccountManagementPolicyAction.md +++ b/src/Storage/Storage.Management/help/Add-AzStorageAccountManagementPolicyAction.md @@ -16,35 +16,35 @@ Adds an action to the input ManagementPolicy Action Group object, or creates a M ``` Add-AzStorageAccountManagementPolicyAction -BaseBlobAction -DaysAfterModificationGreaterThan [-DaysAfterLastTierChangeGreaterThan ] [-InputObject ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### BaseBlobLastAccessTime ``` Add-AzStorageAccountManagementPolicyAction -BaseBlobAction -DaysAfterLastAccessTimeGreaterThan [-EnableAutoTierToHotFromCool] [-InputObject ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### BaseBlobCreationTime ``` Add-AzStorageAccountManagementPolicyAction -BaseBlobAction -DaysAfterCreationGreaterThan [-InputObject ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### Snapshot ``` Add-AzStorageAccountManagementPolicyAction -SnapshotAction -DaysAfterCreationGreaterThan [-DaysAfterLastTierChangeGreaterThan ] [-InputObject ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### BlobVersion ``` Add-AzStorageAccountManagementPolicyAction -BlobVersionAction -DaysAfterCreationGreaterThan [-DaysAfterLastTierChangeGreaterThan ] [-InputObject ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -292,6 +292,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -SnapshotAction The management policy action for snapshot. diff --git a/src/Storage/Storage.Management/help/Add-AzStorageAccountNetworkRule.md b/src/Storage/Storage.Management/help/Add-AzStorageAccountNetworkRule.md index 192862e0448c..ded2a8a38a50 100644 --- a/src/Storage/Storage.Management/help/Add-AzStorageAccountNetworkRule.md +++ b/src/Storage/Storage.Management/help/Add-AzStorageAccountNetworkRule.md @@ -16,13 +16,13 @@ schema: 2.0.0 ``` Add-AzStorageAccountNetworkRule [-ResourceGroupName] [-Name] -VirtualNetworkResourceId [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### IpRuleObject ``` Add-AzStorageAccountNetworkRule [-ResourceGroupName] [-Name] -IPRule [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -30,27 +30,27 @@ Add-AzStorageAccountNetworkRule [-ResourceGroupName] [-Name] - ``` Add-AzStorageAccountNetworkRule [-ResourceGroupName] [-Name] -VirtualNetworkRule [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceAccessRuleObject ``` Add-AzStorageAccountNetworkRule [-ResourceGroupName] [-Name] -ResourceAccessRule [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### IpRuleString ``` Add-AzStorageAccountNetworkRule [-ResourceGroupName] [-Name] -IPAddressOrRange - [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceAccessRuleString ``` Add-AzStorageAccountNetworkRule [-ResourceGroupName] [-Name] -TenantId - -ResourceId [-AsJob] [-DefaultProfile ] + -ResourceId [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -180,6 +180,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceAccessRule Storage Account NetworkRule ResourceAccessRules. diff --git a/src/Storage/Storage.Management/help/Close-AzStorageFileHandle.md b/src/Storage/Storage.Management/help/Close-AzStorageFileHandle.md index 149bc161b0a2..48d639999814 100644 --- a/src/Storage/Storage.Management/help/Close-AzStorageFileHandle.md +++ b/src/Storage/Storage.Management/help/Close-AzStorageFileHandle.md @@ -17,7 +17,7 @@ Closes file handles of a file share, a file directory or a file. Close-AzStorageFileHandle [-ShareName] [[-Path] ] [-Recursive] [-CloseAll] [-Context ] [-DisAllowTrailingDot] [-PassThru] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ShareNameCloseSingle @@ -25,7 +25,7 @@ Close-AzStorageFileHandle [-ShareName] [[-Path] ] [-Recursive] Close-AzStorageFileHandle [-ShareName] -FileHandle [-Context ] [-DisAllowTrailingDot] [-PassThru] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ShareCloseAll @@ -33,14 +33,14 @@ Close-AzStorageFileHandle [-ShareName] -FileHandle [-Con Close-AzStorageFileHandle [-Share] [-ShareClient ] [[-Path] ] [-Recursive] [-CloseAll] [-PassThru] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ShareCloseSingle ``` Close-AzStorageFileHandle [-Share] [-ShareClient ] -FileHandle [-PassThru] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -49,14 +49,14 @@ Close-AzStorageFileHandle [-Share] [-ShareClient ] Close-AzStorageFileHandle [-Directory] [-ShareDirectoryClient ] [[-Path] ] [-Recursive] [-CloseAll] [-PassThru] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### FileCloseAll ``` Close-AzStorageFileHandle [-File] [-ShareFileClient ] [-CloseAll] [-PassThru] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -280,6 +280,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Recursive List handles Recursively. Only works on File Directory. diff --git a/src/Storage/Storage.Management/help/Copy-AzStorageBlob.md b/src/Storage/Storage.Management/help/Copy-AzStorageBlob.md index ab3f5ea00d80..922203cce4b9 100644 --- a/src/Storage/Storage.Management/help/Copy-AzStorageBlob.md +++ b/src/Storage/Storage.Management/help/Copy-AzStorageBlob.md @@ -17,7 +17,7 @@ Copy a blob synchronously. Copy-AzStorageBlob [-SrcBlob] -SrcContainer -DestContainer [-DestBlob ] [-DestBlobType ] [-StandardBlobTier ] [-RehydratePriority ] [-EncryptionScope ] [-Context ] [-DestContext ] [-Force] [-AsJob] - [-TagCondition ] [-DefaultProfile ] + [-TagCondition ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -26,7 +26,7 @@ Copy-AzStorageBlob [-SrcBlob] -SrcContainer -DestContainer ] -DestContainer [-DestBlob ] [-DestBlobType ] [-StandardBlobTier ] [-RehydratePriority ] [-EncryptionScope ] [-Context ] [-DestContext ] [-Force] [-AsJob] - [-TagCondition ] [-DefaultProfile ] + [-TagCondition ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -35,7 +35,7 @@ Copy-AzStorageBlob [-BlobBaseClient ] -DestContainer [- Copy-AzStorageBlob -AbsoluteUri -DestContainer -DestBlob [-DestBlobType ] [-StandardBlobTier ] [-RehydratePriority ] [-EncryptionScope ] [-Context ] [-DestContext ] [-Force] [-AsJob] [-TagCondition ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -272,6 +272,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RehydratePriority Block Blob RehydratePriority. Indicates the priority with which to rehydrate an archived blob. diff --git a/src/Storage/Storage.Management/help/Disable-AzStorageBlobDeleteRetentionPolicy.md b/src/Storage/Storage.Management/help/Disable-AzStorageBlobDeleteRetentionPolicy.md index 46a0e148a778..03e848ee0c46 100644 --- a/src/Storage/Storage.Management/help/Disable-AzStorageBlobDeleteRetentionPolicy.md +++ b/src/Storage/Storage.Management/help/Disable-AzStorageBlobDeleteRetentionPolicy.md @@ -15,21 +15,21 @@ Disable delete retention policy for the Azure Storage Blob service. ### AccountName (Default) ``` Disable-AzStorageBlobDeleteRetentionPolicy [-ResourceGroupName] [-StorageAccountName] - [-PassThru] [-DefaultProfile ] [-WhatIf] + [-PassThru] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Disable-AzStorageBlobDeleteRetentionPolicy -StorageAccount [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### BlobServicePropertiesResourceId ``` Disable-AzStorageBlobDeleteRetentionPolicy [-ResourceId] [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -83,6 +83,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Disable-AzStorageBlobLastAccessTimeTracking.md b/src/Storage/Storage.Management/help/Disable-AzStorageBlobLastAccessTimeTracking.md index d20847c99cb0..213cf47312f5 100644 --- a/src/Storage/Storage.Management/help/Disable-AzStorageBlobLastAccessTimeTracking.md +++ b/src/Storage/Storage.Management/help/Disable-AzStorageBlobLastAccessTimeTracking.md @@ -15,14 +15,14 @@ Disable last access time tracking for the Azure Storage Blob service. ### AccountName (Default) ``` Disable-AzStorageBlobLastAccessTimeTracking [-ResourceGroupName] [-StorageAccountName] - [-PassThru] [-DefaultProfile ] [-WhatIf] + [-PassThru] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Disable-AzStorageBlobLastAccessTimeTracking -StorageAccount [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -70,6 +70,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Disable-AzStorageBlobRestorePolicy.md b/src/Storage/Storage.Management/help/Disable-AzStorageBlobRestorePolicy.md index 2a33fca51b60..b930041d8231 100644 --- a/src/Storage/Storage.Management/help/Disable-AzStorageBlobRestorePolicy.md +++ b/src/Storage/Storage.Management/help/Disable-AzStorageBlobRestorePolicy.md @@ -15,21 +15,21 @@ Disables Blob Restore Policy on a Storage account. ### AccountName (Default) ``` Disable-AzStorageBlobRestorePolicy [-ResourceGroupName] [-StorageAccountName] [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Disable-AzStorageBlobRestorePolicy -StorageAccount [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### BlobServicePropertiesResourceId ``` Disable-AzStorageBlobRestorePolicy [-ResourceId] [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -77,6 +77,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Disable-AzStorageContainerDeleteRetentionPolicy.md b/src/Storage/Storage.Management/help/Disable-AzStorageContainerDeleteRetentionPolicy.md index 7f2d826b6489..43aecf3ecc0a 100644 --- a/src/Storage/Storage.Management/help/Disable-AzStorageContainerDeleteRetentionPolicy.md +++ b/src/Storage/Storage.Management/help/Disable-AzStorageContainerDeleteRetentionPolicy.md @@ -15,21 +15,21 @@ Disable delete retention policy for Azure Storage blob containers. ### AccountName (Default) ``` Disable-AzStorageContainerDeleteRetentionPolicy [-ResourceGroupName] [-StorageAccountName] - [-PassThru] [-DefaultProfile ] [-WhatIf] + [-PassThru] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Disable-AzStorageContainerDeleteRetentionPolicy -StorageAccount [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### BlobServicePropertiesResourceId ``` Disable-AzStorageContainerDeleteRetentionPolicy [-ResourceId] [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -83,6 +83,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Disable-AzStorageDeleteRetentionPolicy.md b/src/Storage/Storage.Management/help/Disable-AzStorageDeleteRetentionPolicy.md index cfe876f9feda..25f8e8ce04c7 100644 --- a/src/Storage/Storage.Management/help/Disable-AzStorageDeleteRetentionPolicy.md +++ b/src/Storage/Storage.Management/help/Disable-AzStorageDeleteRetentionPolicy.md @@ -14,7 +14,7 @@ Disable delete retention policy for the Azure Storage Blob service. ``` Disable-AzStorageDeleteRetentionPolicy [-PassThru] [-Context ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -77,6 +77,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Storage/Storage.Management/help/Disable-AzStorageStaticWebsite.md b/src/Storage/Storage.Management/help/Disable-AzStorageStaticWebsite.md index 8e0b987c24ba..31c782710fd6 100644 --- a/src/Storage/Storage.Management/help/Disable-AzStorageStaticWebsite.md +++ b/src/Storage/Storage.Management/help/Disable-AzStorageStaticWebsite.md @@ -14,7 +14,7 @@ Disable static website for the Azure Storage account. ``` Disable-AzStorageStaticWebsite [-PassThru] [-Context ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -77,6 +77,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Storage/Storage.Management/help/Enable-AzStorageBlobDeleteRetentionPolicy.md b/src/Storage/Storage.Management/help/Enable-AzStorageBlobDeleteRetentionPolicy.md index e71c3a5b940b..bcb6a58a0445 100644 --- a/src/Storage/Storage.Management/help/Enable-AzStorageBlobDeleteRetentionPolicy.md +++ b/src/Storage/Storage.Management/help/Enable-AzStorageBlobDeleteRetentionPolicy.md @@ -16,20 +16,20 @@ Enable delete retention policy for the Azure Storage Blob service. ``` Enable-AzStorageBlobDeleteRetentionPolicy [-ResourceGroupName] [-StorageAccountName] -RetentionDays [-PassThru] [-AllowPermanentDelete] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Enable-AzStorageBlobDeleteRetentionPolicy -StorageAccount -RetentionDays [-PassThru] - [-AllowPermanentDelete] [-DefaultProfile ] + [-AllowPermanentDelete] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### BlobServicePropertiesResourceId ``` Enable-AzStorageBlobDeleteRetentionPolicy [-ResourceId] -RetentionDays [-PassThru] - [-AllowPermanentDelete] [-DefaultProfile ] + [-AllowPermanentDelete] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -98,6 +98,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Enable-AzStorageBlobLastAccessTimeTracking.md b/src/Storage/Storage.Management/help/Enable-AzStorageBlobLastAccessTimeTracking.md index 68784903c356..ae8c86f1b2aa 100644 --- a/src/Storage/Storage.Management/help/Enable-AzStorageBlobLastAccessTimeTracking.md +++ b/src/Storage/Storage.Management/help/Enable-AzStorageBlobLastAccessTimeTracking.md @@ -15,14 +15,14 @@ Enable last access time tracking for the Azure Storage Blob service. ### AccountName (Default) ``` Enable-AzStorageBlobLastAccessTimeTracking [-ResourceGroupName] [-StorageAccountName] - [-PassThru] [-DefaultProfile ] [-WhatIf] + [-PassThru] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Enable-AzStorageBlobLastAccessTimeTracking -StorageAccount [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -76,6 +76,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Enable-AzStorageBlobRestorePolicy.md b/src/Storage/Storage.Management/help/Enable-AzStorageBlobRestorePolicy.md index ba955684d284..e1def21c5d49 100644 --- a/src/Storage/Storage.Management/help/Enable-AzStorageBlobRestorePolicy.md +++ b/src/Storage/Storage.Management/help/Enable-AzStorageBlobRestorePolicy.md @@ -16,20 +16,20 @@ Enables Blob Restore Policy on a Storage account. ``` Enable-AzStorageBlobRestorePolicy [-ResourceGroupName] [-StorageAccountName] -RestoreDays [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Enable-AzStorageBlobRestorePolicy -StorageAccount -RestoreDays [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### BlobServicePropertiesResourceId ``` Enable-AzStorageBlobRestorePolicy [-ResourceId] -RestoreDays [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -111,6 +111,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Enable-AzStorageContainerDeleteRetentionPolicy.md b/src/Storage/Storage.Management/help/Enable-AzStorageContainerDeleteRetentionPolicy.md index 395d150554bc..8f1374017081 100644 --- a/src/Storage/Storage.Management/help/Enable-AzStorageContainerDeleteRetentionPolicy.md +++ b/src/Storage/Storage.Management/help/Enable-AzStorageContainerDeleteRetentionPolicy.md @@ -16,20 +16,20 @@ Enable delete retention policy for Azure Storage blob containers. ``` Enable-AzStorageContainerDeleteRetentionPolicy [-ResourceGroupName] [-StorageAccountName] -RetentionDays [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Enable-AzStorageContainerDeleteRetentionPolicy -StorageAccount -RetentionDays - [-PassThru] [-DefaultProfile ] [-WhatIf] + [-PassThru] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### BlobServicePropertiesResourceId ``` Enable-AzStorageContainerDeleteRetentionPolicy [-ResourceId] -RetentionDays [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -83,6 +83,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Enable-AzStorageDeleteRetentionPolicy.md b/src/Storage/Storage.Management/help/Enable-AzStorageDeleteRetentionPolicy.md index 4234f7644119..b80b1503276e 100644 --- a/src/Storage/Storage.Management/help/Enable-AzStorageDeleteRetentionPolicy.md +++ b/src/Storage/Storage.Management/help/Enable-AzStorageDeleteRetentionPolicy.md @@ -14,7 +14,7 @@ Enable delete retention policy for the Azure Storage Blob service. ``` Enable-AzStorageDeleteRetentionPolicy [-RetentionDays] [-PassThru] [-Context ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -77,6 +77,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RetentionDays Sets the number of retention days for the DeleteRetentionPolicy. diff --git a/src/Storage/Storage.Management/help/Enable-AzStorageStaticWebsite.md b/src/Storage/Storage.Management/help/Enable-AzStorageStaticWebsite.md index e9c2a33b8b0f..927daa1d50f1 100644 --- a/src/Storage/Storage.Management/help/Enable-AzStorageStaticWebsite.md +++ b/src/Storage/Storage.Management/help/Enable-AzStorageStaticWebsite.md @@ -14,7 +14,7 @@ Enable static website for the Azure Storage account. ``` Enable-AzStorageStaticWebsite [[-IndexDocument] ] [[-ErrorDocument404Path] ] [-PassThru] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -107,6 +107,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Storage/Storage.Management/help/Get-AzDataLakeGen2ChildItem.md b/src/Storage/Storage.Management/help/Get-AzDataLakeGen2ChildItem.md index ac08ffc5191e..0dd9847e6dc1 100644 --- a/src/Storage/Storage.Management/help/Get-AzDataLakeGen2ChildItem.md +++ b/src/Storage/Storage.Management/help/Get-AzDataLakeGen2ChildItem.md @@ -15,7 +15,7 @@ Lists sub directories and files from a directory or filesystem root. ``` Get-AzDataLakeGen2ChildItem [-FileSystem] [[-Path] ] [-FetchProperty] [-Recurse] [-MaxCount ] [-ContinuationToken ] [-AsJob] [-OutputUserPrincipalName] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -221,6 +221,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Recurse Indicates if will recursively get the Child Item. The default is false. diff --git a/src/Storage/Storage.Management/help/Get-AzDataLakeGen2DeletedItem.md b/src/Storage/Storage.Management/help/Get-AzDataLakeGen2DeletedItem.md index f9ea6b8cc435..c91d7ee54b4c 100644 --- a/src/Storage/Storage.Management/help/Get-AzDataLakeGen2DeletedItem.md +++ b/src/Storage/Storage.Management/help/Get-AzDataLakeGen2DeletedItem.md @@ -15,7 +15,7 @@ List all deleted files or directories from a directory or filesystem root. ``` Get-AzDataLakeGen2DeletedItem [-FileSystem] [[-Path] ] [-MaxCount ] [-ContinuationToken ] [-AsJob] [-Context ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -165,6 +165,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Storage/Storage.Management/help/Get-AzDataLakeGen2Item.md b/src/Storage/Storage.Management/help/Get-AzDataLakeGen2Item.md index fce0d9b94958..db6a5fa3b83c 100644 --- a/src/Storage/Storage.Management/help/Get-AzDataLakeGen2Item.md +++ b/src/Storage/Storage.Management/help/Get-AzDataLakeGen2Item.md @@ -14,7 +14,7 @@ Gets the details of a file or directory in a filesystem. ``` Get-AzDataLakeGen2Item [-FileSystem] [-Path ] [-Context ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -173,6 +173,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Storage/Storage.Management/help/Get-AzDataLakeGen2ItemContent.md b/src/Storage/Storage.Management/help/Get-AzDataLakeGen2ItemContent.md index 591c951706c3..52adeb895b00 100644 --- a/src/Storage/Storage.Management/help/Get-AzDataLakeGen2ItemContent.md +++ b/src/Storage/Storage.Management/help/Get-AzDataLakeGen2ItemContent.md @@ -16,14 +16,14 @@ Download a file. ``` Get-AzDataLakeGen2ItemContent [-FileSystem] [-Path] [-Destination ] [-CheckMd5] [-Force] [-AsJob] [-Context ] [-DefaultProfile ] - [-ConcurrentTaskCount ] [-WhatIf] [-Confirm] [] + [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ItemPipeline ``` Get-AzDataLakeGen2ItemContent -InputObject [-Destination ] [-CheckMd5] [-Force] [-AsJob] [-Context ] [-DefaultProfile ] - [-ConcurrentTaskCount ] [-WhatIf] [-Confirm] [] + [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -216,6 +216,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Storage/Storage.Management/help/Get-AzRmStorageContainer.md b/src/Storage/Storage.Management/help/Get-AzRmStorageContainer.md index 37c01a4d6c35..ed9d09eb0338 100644 --- a/src/Storage/Storage.Management/help/Get-AzRmStorageContainer.md +++ b/src/Storage/Storage.Management/help/Get-AzRmStorageContainer.md @@ -15,14 +15,14 @@ Gets or lists Storage blob containers ### AccountName (Default) ``` Get-AzRmStorageContainer [-ResourceGroupName] [-StorageAccountName] [-Name ] - [-IncludeDeleted] [-AsJob] [-DefaultProfile ] + [-IncludeDeleted] [-AsJob] [-DefaultProfile ] [-ProgressAction ] [] ``` ### AccountObject ``` Get-AzRmStorageContainer -StorageAccount [-Name ] [-IncludeDeleted] [-AsJob] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -131,6 +131,21 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Get-AzRmStorageContainerImmutabilityPolicy.md b/src/Storage/Storage.Management/help/Get-AzRmStorageContainerImmutabilityPolicy.md index 51613ea21fa2..ad1632ebe8be 100644 --- a/src/Storage/Storage.Management/help/Get-AzRmStorageContainerImmutabilityPolicy.md +++ b/src/Storage/Storage.Management/help/Get-AzRmStorageContainerImmutabilityPolicy.md @@ -16,20 +16,20 @@ Gets ImmutabilityPolicy of a Storage blob containers ``` Get-AzRmStorageContainerImmutabilityPolicy [-ResourceGroupName] [-StorageAccountName] -ContainerName [-Etag ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### AccountObject ``` Get-AzRmStorageContainerImmutabilityPolicy -ContainerName -StorageAccount - [-Etag ] [-DefaultProfile ] + [-Etag ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### ContainerObject ``` Get-AzRmStorageContainerImmutabilityPolicy -Container [-Etag ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -122,6 +122,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Get-AzRmStorageShare.md b/src/Storage/Storage.Management/help/Get-AzRmStorageShare.md index 826de07fc623..15ee6ae9249f 100644 --- a/src/Storage/Storage.Management/help/Get-AzRmStorageShare.md +++ b/src/Storage/Storage.Management/help/Get-AzRmStorageShare.md @@ -16,33 +16,33 @@ Gets or lists Storage file shares. ``` Get-AzRmStorageShare [-ResourceGroupName] [-StorageAccountName] [-Name ] [-SnapshotTime ] [-GetShareUsage] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### AccountName ``` Get-AzRmStorageShare [-ResourceGroupName] [-StorageAccountName] [-IncludeDeleted] [-IncludeSnapshot] [-Filter ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### AccountObjectSingle ``` Get-AzRmStorageShare -StorageAccount -Name [-SnapshotTime ] - [-GetShareUsage] [-DefaultProfile ] + [-GetShareUsage] [-DefaultProfile ] [-ProgressAction ] [] ``` ### AccountObject ``` Get-AzRmStorageShare -StorageAccount [-IncludeDeleted] [-IncludeSnapshot] [-Filter ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ShareResourceId ``` Get-AzRmStorageShare [-ResourceId] [-GetShareUsage] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -263,6 +263,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageAccount.md b/src/Storage/Storage.Management/help/Get-AzStorageAccount.md index 55bc54abf58f..c8aa364f9baa 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageAccount.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageAccount.md @@ -16,19 +16,19 @@ Gets a Storage account. ### ResourceGroupParameterSet ``` Get-AzStorageAccount [[-ResourceGroupName] ] [-AsJob] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### AccountNameParameterSet ``` Get-AzStorageAccount [-ResourceGroupName] [-Name] [-IncludeGeoReplicationStats] [-AsJob] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### BlobRestoreStatusParameterSet ``` Get-AzStorageAccount [-ResourceGroupName] [-Name] [-IncludeBlobRestoreStatus] [-AsJob] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -149,6 +149,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Specifies the name of the resource group that contains the Storage account to get. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageAccountKey.md b/src/Storage/Storage.Management/help/Get-AzStorageAccountKey.md index 9197d7b22767..52e5079184de 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageAccountKey.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageAccountKey.md @@ -15,7 +15,7 @@ Gets the access keys for an Azure Storage account. ``` Get-AzStorageAccountKey [-ResourceGroupName] [-Name] [-ListKerbKey] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -105,6 +105,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Specifies the name of the resource group that contains the Storage account. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageAccountManagementPolicy.md b/src/Storage/Storage.Management/help/Get-AzStorageAccountManagementPolicy.md index 1a1e9aca896d..c231a554cb3d 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageAccountManagementPolicy.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageAccountManagementPolicy.md @@ -15,19 +15,19 @@ Gets the management policy of an Azure Storage account. ### AccountName (Default) ``` Get-AzStorageAccountManagementPolicy [-ResourceGroupName] [-StorageAccountName] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### AccountResourceId ``` Get-AzStorageAccountManagementPolicy [-StorageAccountResourceId] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### AccountObject ``` Get-AzStorageAccountManagementPolicy -StorageAccount - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -124,6 +124,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageAccountMigration.md b/src/Storage/Storage.Management/help/Get-AzStorageAccountMigration.md index 25a22cb358d1..2a445d44665c 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageAccountMigration.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageAccountMigration.md @@ -15,13 +15,13 @@ Gets the status of the ongoing migration for the specified storage account. ### Get (Default) ``` Get-AzStorageAccountMigration -AccountName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzStorageAccountMigration -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -97,6 +97,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageAccountNameAvailability.md b/src/Storage/Storage.Management/help/Get-AzStorageAccountNameAvailability.md index 4e175bba7138..27da890c4a7e 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageAccountNameAvailability.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageAccountNameAvailability.md @@ -15,7 +15,7 @@ Checks the availability of a Storage account name. ``` Get-AzStorageAccountNameAvailability [-Name] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -62,6 +62,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Storage/Storage.Management/help/Get-AzStorageAccountNetworkRuleSet.md b/src/Storage/Storage.Management/help/Get-AzStorageAccountNetworkRuleSet.md index 038bd64b3eed..e04424592f30 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageAccountNetworkRuleSet.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageAccountNetworkRuleSet.md @@ -14,7 +14,7 @@ Get the NetWorkRule property of a Storage account ``` Get-AzStorageAccountNetworkRuleSet [-ResourceGroupName] [-Name] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -61,6 +61,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Specifies the name of the resource group contains the Storage account. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageBlob.md b/src/Storage/Storage.Management/help/Get-AzStorageBlob.md index 1fdffc38fd5e..87f80dc75dea 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageBlob.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageBlob.md @@ -18,7 +18,7 @@ Lists blobs in a container. Get-AzStorageBlob [[-Blob] ] [-Container] [-IncludeDeleted] [-IncludeTag] [-MaxCount ] [-ContinuationToken ] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -28,7 +28,7 @@ Get-AzStorageBlob [-Blob] [-Container] [-IncludeDeleted] [-Inc -SnapshotTime [-MaxCount ] [-ContinuationToken ] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [] + [-ProgressAction ] [] ``` ### SingleBlobVersionID @@ -36,7 +36,7 @@ Get-AzStorageBlob [-Blob] [-Container] [-IncludeDeleted] [-Inc Get-AzStorageBlob [-Blob] [-Container] [-IncludeDeleted] [-IncludeTag] -VersionId [-MaxCount ] [-ContinuationToken ] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -45,7 +45,7 @@ Get-AzStorageBlob [-Blob] [-Container] [-IncludeDeleted] [-Inc Get-AzStorageBlob [-Prefix ] [-Container] [-IncludeDeleted] [-IncludeVersion] [-IncludeTag] [-MaxCount ] [-ContinuationToken ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -408,6 +408,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the service side time-out interval, in seconds, for a request. If the specified interval elapses before the service processes the request, the storage service returns an error. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageBlobByTag.md b/src/Storage/Storage.Management/help/Get-AzStorageBlobByTag.md index d7a9405ff42f..1b2588df8b38 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageBlobByTag.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageBlobByTag.md @@ -16,7 +16,7 @@ Lists blobs in a storage account across containers, with a blob tag filter sql e Get-AzStorageBlobByTag -TagFilterSqlExpression [-MaxCount ] [-ContinuationToken ] [-GetBlobProperty] [-Container ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -211,6 +211,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest The server time out for each request in seconds. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageBlobContent.md b/src/Storage/Storage.Management/help/Get-AzStorageBlobContent.md index 2855fddd9aa8..c95b9dd6f669 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageBlobContent.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageBlobContent.md @@ -18,7 +18,7 @@ Downloads a storage blob. Get-AzStorageBlobContent [-Blob] [-Container] [-Destination ] [-CheckMd5] [-Force] [-AsJob] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### BlobPipeline @@ -26,7 +26,7 @@ Get-AzStorageBlobContent [-Blob] [-Container] [-Destination [-BlobBaseClient ] [-Destination ] [-CheckMd5] [-Force] [-AsJob] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -35,7 +35,7 @@ Get-AzStorageBlobContent -CloudBlob [-BlobBaseClient [-Blob] [-Destination ] [-CheckMd5] [-Force] [-AsJob] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -44,7 +44,7 @@ Get-AzStorageBlobContent -CloudBlobContainer [-Blob] ] -AbsoluteUri [-Force] [-AsJob] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -311,6 +311,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the service side time-out interval, in seconds, for a request. If the specified interval elapses before the service processes the request, the storage service returns an error. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageBlobCopyState.md b/src/Storage/Storage.Management/help/Get-AzStorageBlobCopyState.md index 75b5fa8236ca..d39ed751f890 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageBlobCopyState.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageBlobCopyState.md @@ -17,7 +17,7 @@ Gets the copy status of an Azure Storage blob. ``` Get-AzStorageBlobCopyState [-Blob] [-Container] [-WaitForComplete] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -25,7 +25,7 @@ Get-AzStorageBlobCopyState [-Blob] [-Container] [-WaitForCompl ``` Get-AzStorageBlobCopyState -CloudBlob [-WaitForComplete] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -33,7 +33,7 @@ Get-AzStorageBlobCopyState -CloudBlob [-WaitForComplete] [-Context < ``` Get-AzStorageBlobCopyState -CloudBlobContainer [-Blob] [-WaitForComplete] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -210,6 +210,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the service side time-out interval, in seconds, for a request. If the specified interval elapses before the service processes the request, the storage service returns an error. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageBlobInventoryPolicy.md b/src/Storage/Storage.Management/help/Get-AzStorageBlobInventoryPolicy.md index 14b89ef3c102..bb56922a1b83 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageBlobInventoryPolicy.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageBlobInventoryPolicy.md @@ -15,19 +15,19 @@ Gets blob inventory policy from a Storage account. ### AccountName (Default) ``` Get-AzStorageBlobInventoryPolicy [-ResourceGroupName] [-StorageAccountName] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### AccountResourceId ``` Get-AzStorageBlobInventoryPolicy [-StorageAccountResourceId] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### AccountObject ``` Get-AzStorageBlobInventoryPolicy -StorageAccount [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -80,6 +80,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageBlobQueryResult.md b/src/Storage/Storage.Management/help/Get-AzStorageBlobQueryResult.md index 3ebe74f5ee96..b2bfe27838b0 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageBlobQueryResult.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageBlobQueryResult.md @@ -19,7 +19,7 @@ Get-AzStorageBlobQueryResult [-Blob] [-Container] [-SnapshotTi [-InputTextConfiguration ] [-OutputTextConfiguration ] [-PassThru] [-Force] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -29,7 +29,7 @@ Get-AzStorageBlobQueryResult -BlobBaseClient -QueryString ] [-OutputTextConfiguration ] [-PassThru] [-Force] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -40,7 +40,7 @@ Get-AzStorageBlobQueryResult -BlobContainerClient [-Blob] [-InputTextConfiguration ] [-OutputTextConfiguration ] [-PassThru] [-Force] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -285,6 +285,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -QueryString Query string, see more details in: https://learn.microsoft.com/azure/storage/blobs/query-acceleration-sql-reference diff --git a/src/Storage/Storage.Management/help/Get-AzStorageBlobServiceProperty.md b/src/Storage/Storage.Management/help/Get-AzStorageBlobServiceProperty.md index b3fdd0aa3fa5..d06264464ce4 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageBlobServiceProperty.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageBlobServiceProperty.md @@ -15,19 +15,19 @@ Gets service properties for Azure Storage Blob services. ### AccountName (Default) ``` Get-AzStorageBlobServiceProperty [-ResourceGroupName] [-StorageAccountName] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### AccountObject ``` Get-AzStorageBlobServiceProperty -StorageAccount [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### BlobServicePropertiesResourceId ``` Get-AzStorageBlobServiceProperty [-ResourceId] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -71,6 +71,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageBlobTag.md b/src/Storage/Storage.Management/help/Get-AzStorageBlobTag.md index 858b543fdb1d..80e3542ec36d 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageBlobTag.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageBlobTag.md @@ -16,7 +16,7 @@ Get blob tags of a specific blob. ``` Get-AzStorageBlobTag [-Blob] [-Container] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,7 +24,7 @@ Get-AzStorageBlobTag [-Blob] [-Container] [-TagCondition [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -32,7 +32,7 @@ Get-AzStorageBlobTag -BlobBaseClient [-TagCondition ] [ ``` Get-AzStorageBlobTag -CloudBlobContainer [-Blob] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -193,6 +193,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest The server time out for each request in seconds. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageCORSRule.md b/src/Storage/Storage.Management/help/Get-AzStorageCORSRule.md index aa8e839dc54e..473e6be53682 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageCORSRule.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageCORSRule.md @@ -16,7 +16,7 @@ Gets CORS rules for a Storage service type. ``` Get-AzStorageCORSRule [-ServiceType] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -101,6 +101,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageContainer.md b/src/Storage/Storage.Management/help/Get-AzStorageContainer.md index fb3aa54ccafe..d060f36cb462 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageContainer.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageContainer.md @@ -18,7 +18,7 @@ Lists the storage containers. Get-AzStorageContainer [[-Name] ] [-MaxCount ] [-ContinuationToken ] [-IncludeDeleted] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [] + [-ProgressAction ] [] ``` ### ContainerPrefix @@ -26,7 +26,7 @@ Get-AzStorageContainer [[-Name] ] [-MaxCount ] [-ContinuationToke Get-AzStorageContainer -Prefix [-MaxCount ] [-ContinuationToken ] [-IncludeDeleted] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -233,6 +233,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the service side time-out interval, in seconds, for a request. If the specified interval elapses before the service processes the request, the storage service returns an error. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageContainerStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Get-AzStorageContainerStoredAccessPolicy.md index e06c339fbfe1..07ceea7a70ec 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageContainerStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageContainerStoredAccessPolicy.md @@ -16,7 +16,7 @@ Gets the stored access policy or policies for an Azure storage container. ``` Get-AzStorageContainerStoredAccessPolicy [-Container] [[-Policy] ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -137,6 +137,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the service side time-out interval, in seconds, for a request. If the specified interval elapses before the service processes the request, the storage service returns an error. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageEncryptionScope.md b/src/Storage/Storage.Management/help/Get-AzStorageEncryptionScope.md index e1f0424125c6..fabff22debf6 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageEncryptionScope.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageEncryptionScope.md @@ -16,14 +16,14 @@ Get or list encryption scopes from a Storage account. ``` Get-AzStorageEncryptionScope [-ResourceGroupName] [-StorageAccountName] [-EncryptionScopeName ] [-MaxPageSize ] [-Filter ] [-Include ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### AccountObject ``` Get-AzStorageEncryptionScope -StorageAccount [-EncryptionScopeName ] [-MaxPageSize ] [-Filter ] [-Include ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -176,6 +176,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageFile.md b/src/Storage/Storage.Management/help/Get-AzStorageFile.md index 7c89bea34c64..f8c0cc119bf5 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageFile.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageFile.md @@ -17,7 +17,7 @@ Lists directories and files for a path. ``` Get-AzStorageFile [-ShareName] [[-Path] ] [-ExcludeExtendedInfo] [-DisAllowTrailingDot] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -26,7 +26,7 @@ Get-AzStorageFile [-ShareName] [[-Path] ] [-ExcludeExtendedInfo Get-AzStorageFile [-Share] [-ShareClient ] [[-Path] ] [-ExcludeExtendedInfo] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [] + [-ProgressAction ] [] ``` ### Directory @@ -34,7 +34,7 @@ Get-AzStorageFile [-Share] [-ShareClient ] [[-Path Get-AzStorageFile [-Directory] [-ShareDirectoryClient ] [[-Path] ] [-ExcludeExtendedInfo] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -195,6 +195,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the service-side timeout interval, in seconds, for a request. If the specified interval elapses before the service processes the request, the Storage service returns an error. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageFileContent.md b/src/Storage/Storage.Management/help/Get-AzStorageFileContent.md index 999b4dd8fbcb..f1303771a9e1 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageFileContent.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageFileContent.md @@ -18,7 +18,7 @@ Downloads the contents of a file. Get-AzStorageFileContent [-ShareName] [-Path] [[-Destination] ] [-CheckMd5] [-PassThru] [-Force] [-AsJob] [-DisAllowTrailingDot] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [-PreserveSMBAttribute] [] ``` @@ -27,7 +27,7 @@ Get-AzStorageFileContent [-ShareName] [-Path] [[-Destination] Get-AzStorageFileContent [-Share] [-ShareClient ] [-Path] [[-Destination] ] [-CheckMd5] [-PassThru] [-Force] [-AsJob] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [-PreserveSMBAttribute] [] ``` @@ -36,7 +36,7 @@ Get-AzStorageFileContent [-Share] [-ShareClient ] Get-AzStorageFileContent [-Directory] [-ShareDirectoryClient ] [-Path] [[-Destination] ] [-CheckMd5] [-PassThru] [-Force] [-AsJob] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [-PreserveSMBAttribute] [] ``` @@ -45,7 +45,7 @@ Get-AzStorageFileContent [-Directory] [-ShareDirectoryClien Get-AzStorageFileContent [-File] [-ShareFileClient ] [[-Destination] ] [-CheckMd5] [-PassThru] [-Force] [-AsJob] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [-PreserveSMBAttribute] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [-PreserveSMBAttribute] [] ``` ## DESCRIPTION @@ -302,6 +302,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the service side time-out interval, in seconds, for a request. If the specified interval elapses before the service processes the request, the storage service returns an error. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageFileCopyState.md b/src/Storage/Storage.Management/help/Get-AzStorageFileCopyState.md index 5112b9aefe37..d10a7a60120c 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageFileCopyState.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageFileCopyState.md @@ -17,7 +17,7 @@ Gets the state of a copy operation. ``` Get-AzStorageFileCopyState [-ShareName] [-FilePath] [-WaitForComplete] [-DisAllowTrailingDot] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -25,7 +25,7 @@ Get-AzStorageFileCopyState [-ShareName] [-FilePath] [-WaitForC ``` Get-AzStorageFileCopyState [-File] [-ShareFileClient ] [-WaitForComplete] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -167,6 +167,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageFileHandle.md b/src/Storage/Storage.Management/help/Get-AzStorageFileHandle.md index c9c59d002e88..86043e84b187 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageFileHandle.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageFileHandle.md @@ -16,7 +16,7 @@ Lists file handles of a file share, a file directory or a file. ``` Get-AzStorageFileHandle [-ShareName] [[-Path] ] [-Recursive] [-DisAllowTrailingDot] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-IncludeTotalCount] [-Skip ] [-First ] [] ``` @@ -24,7 +24,7 @@ Get-AzStorageFileHandle [-ShareName] [[-Path] ] [-Recursive] [- ``` Get-AzStorageFileHandle [-Share] [-ShareClient ] [[-Path] ] [-Recursive] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-IncludeTotalCount] [-Skip ] [-First ] [] ``` @@ -33,7 +33,7 @@ Get-AzStorageFileHandle [-Share] [-ShareClient ] [ Get-AzStorageFileHandle [-Directory] [-ShareDirectoryClient ] [[-Path] ] [-Recursive] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-IncludeTotalCount] [-Skip ] [-First ] + [-ProgressAction ] [-IncludeTotalCount] [-Skip ] [-First ] [] ``` @@ -41,7 +41,7 @@ Get-AzStorageFileHandle [-Directory] [-ShareDirectoryClient ``` Get-AzStorageFileHandle [-File] [-ShareFileClient ] [-Recursive] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-IncludeTotalCount] [-Skip ] [-First ] [] ``` @@ -221,6 +221,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Recursive List handles Recursively. Only works on File Directory. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageFileServiceProperty.md b/src/Storage/Storage.Management/help/Get-AzStorageFileServiceProperty.md index 6f133b0252a8..73b263d159b8 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageFileServiceProperty.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageFileServiceProperty.md @@ -15,19 +15,19 @@ Gets service properties for Azure Storage File services. ### AccountName (Default) ``` Get-AzStorageFileServiceProperty [-ResourceGroupName] [-StorageAccountName] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### AccountObject ``` Get-AzStorageFileServiceProperty -StorageAccount [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### FileServicePropertiesResourceId ``` Get-AzStorageFileServiceProperty [-ResourceId] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -71,6 +71,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageLocalUser.md b/src/Storage/Storage.Management/help/Get-AzStorageLocalUser.md index 6b693e30469d..4ca4a6b0ec6a 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageLocalUser.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageLocalUser.md @@ -15,13 +15,15 @@ Gets a specified local user or lists all local users in a storage account. ### AccountName (Default) ``` Get-AzStorageLocalUser [-ResourceGroupName] [-StorageAccountName] [-UserName ] - [-MaxPageSize ] [-Filter ] [-DefaultProfile ] [] + [-MaxPageSize ] [-Filter ] [-DefaultProfile ] + [-ProgressAction ] [] ``` ### AccountObject ``` Get-AzStorageLocalUser -StorageAccount [-UserName ] [-MaxPageSize ] - [-Filter ] [-DefaultProfile ] [] + [-Filter ] [-DefaultProfile ] [-ProgressAction ] + [] ``` ## DESCRIPTION @@ -70,7 +72,7 @@ testuser2 S-1-2-0-0000000000-000000000-0000000000-0002 /dir True This command lists all local users in a storage account. -### Example 3: List local users with a max page size and filter +### Example 3: List local users with a max page size and filter ```powershell Get-AzStorageLocalUser -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -MaxPageSize 3 -Filter "startswith(name, test)" ``` @@ -84,6 +86,7 @@ testuser1 S-1-2-0-0000000000-000000000-0000000000-0000 / True testuser2 S-1-2-0-0000000000-000000000-0000000000-0002 /dir True True False 1001 testuser3 S-1-2-0-0000000000-000000000-0000000000-0003 / True True False 1001 100 True ``` + This command lists local users that names start with "test", with a max page size of 3 included in the list response. ## PARAMETERS @@ -133,6 +136,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageLocalUserKey.md b/src/Storage/Storage.Management/help/Get-AzStorageLocalUserKey.md index 6e641ce7f7a4..9ddf0fc17609 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageLocalUserKey.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageLocalUserKey.md @@ -15,21 +15,21 @@ Lists SSH authorized keys and shared key of a specified local user. ### AccountName (Default) ``` Get-AzStorageLocalUserKey [-ResourceGroupName] [-StorageAccountName] -UserName - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Get-AzStorageLocalUserKey -StorageAccount -UserName - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UserObject ``` Get-AzStorageLocalUserKey [-InputObject] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -82,6 +82,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageObjectReplicationPolicy.md b/src/Storage/Storage.Management/help/Get-AzStorageObjectReplicationPolicy.md index 1ea8568a06fc..497db400409c 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageObjectReplicationPolicy.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageObjectReplicationPolicy.md @@ -15,14 +15,14 @@ Gets or lists object replication policy of a Storage account. ### AccountName (Default) ``` Get-AzStorageObjectReplicationPolicy [-ResourceGroupName] [-StorageAccountName] - [-PolicyId ] [-DefaultProfile ] + [-PolicyId ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### AccountObject ``` Get-AzStorageObjectReplicationPolicy -StorageAccount [-PolicyId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -101,6 +101,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageQueue.md b/src/Storage/Storage.Management/help/Get-AzStorageQueue.md index 7df6e920734d..5c280acf45b2 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageQueue.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageQueue.md @@ -16,13 +16,13 @@ Lists storage queues. ### QueueName (Default) ``` Get-AzStorageQueue [[-Name] ] [-Context ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### QueuePrefix ``` Get-AzStorageQueue -Prefix [-Context ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -116,6 +116,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Storage/Storage.Management/help/Get-AzStorageQueueStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Get-AzStorageQueueStoredAccessPolicy.md index e7a58bfc5328..13a07359204c 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageQueueStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageQueueStoredAccessPolicy.md @@ -15,7 +15,7 @@ Gets the stored access policy or policies for an Azure storage queue. ``` Get-AzStorageQueueStoredAccessPolicy [-Queue] [[-Policy] ] [-Context ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -85,6 +85,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Queue Specifies the Azure storage queue name. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageServiceLoggingProperty.md b/src/Storage/Storage.Management/help/Get-AzStorageServiceLoggingProperty.md index 31fcff2aaabf..35407cc7d168 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageServiceLoggingProperty.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageServiceLoggingProperty.md @@ -15,7 +15,7 @@ Gets logging properties for Azure Storage services. ``` Get-AzStorageServiceLoggingProperty [-ServiceType] [-Context ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -63,6 +63,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServiceType Specifies the storage service type. This cmdlet gets the logging properties for the service type that this parameter specifies. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageServiceMetricsProperty.md b/src/Storage/Storage.Management/help/Get-AzStorageServiceMetricsProperty.md index f430a2883603..fbb091f4e3a1 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageServiceMetricsProperty.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageServiceMetricsProperty.md @@ -15,7 +15,7 @@ Gets metrics properties for the Azure Storage service. ``` Get-AzStorageServiceMetricsProperty [-ServiceType] [-MetricsType] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -82,6 +82,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServiceType Specifies the storage service type. This cmdlet gets the metrics properties for the type that this parameter specifies. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageServiceProperty.md b/src/Storage/Storage.Management/help/Get-AzStorageServiceProperty.md index 924364ae3add..17614235ffa5 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageServiceProperty.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageServiceProperty.md @@ -14,7 +14,7 @@ Gets properties for Azure Storage services. ``` Get-AzStorageServiceProperty [-ServiceType] [-Context ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -78,6 +78,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServiceType Specifies the storage service type. This cmdlet gets the logging properties for the service type that this parameter specifies. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageShare.md b/src/Storage/Storage.Management/help/Get-AzStorageShare.md index 4bf556a87335..1067b6d2a581 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageShare.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageShare.md @@ -17,7 +17,7 @@ Gets a list of file shares. ``` Get-AzStorageShare [[-Prefix] ] [-IncludeDeleted] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -25,7 +25,7 @@ Get-AzStorageShare [[-Prefix] ] [-IncludeDeleted] [-Context [[-SnapshotTime] ] [-SkipGetProperty] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -189,6 +189,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageShareStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Get-AzStorageShareStoredAccessPolicy.md index 91a0aa7f54f1..e49b619810dd 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageShareStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageShareStoredAccessPolicy.md @@ -16,7 +16,7 @@ Gets stored access policies for a Storage share. ``` Get-AzStorageShareStoredAccessPolicy [-ShareName] [[-Policy] ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -124,6 +124,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageTable.md b/src/Storage/Storage.Management/help/Get-AzStorageTable.md index 396db7a40850..50e93b4e90ed 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageTable.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageTable.md @@ -16,13 +16,13 @@ Lists the storage tables. ### TableName (Default) ``` Get-AzStorageTable [[-Name] ] [-Context ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### TablePrefix ``` Get-AzStorageTable -Prefix [-Context ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -117,6 +117,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Storage/Storage.Management/help/Get-AzStorageTableStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Get-AzStorageTableStoredAccessPolicy.md index 4a2099737a31..fe308c588718 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageTableStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageTableStoredAccessPolicy.md @@ -15,7 +15,7 @@ Gets the stored access policy or policies for an Azure storage table. ``` Get-AzStorageTableStoredAccessPolicy [-Table] [[-Policy] ] [-Context ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -85,6 +85,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Table Specifies the Azure storage table name. diff --git a/src/Storage/Storage.Management/help/Get-AzStorageTaskAssignment.md b/src/Storage/Storage.Management/help/Get-AzStorageTaskAssignment.md new file mode 100644 index 000000000000..e829e68b8ce0 --- /dev/null +++ b/src/Storage/Storage.Management/help/Get-AzStorageTaskAssignment.md @@ -0,0 +1,272 @@ +--- +external help file: Az.Storage-help.xml +Module Name: Az.Storage +online version: https://learn.microsoft.com/powershell/module/az.storage/get-azstoragetaskassignment +schema: 2.0.0 +--- + +# Get-AzStorageTaskAssignment + +## SYNOPSIS +Get the storage task assignment properties + +## SYNTAX + +### List (Default) +``` +Get-AzStorageTaskAssignment -AccountName -ResourceGroupName [-SubscriptionId ] + [-Maxpagesize ] [-DefaultProfile ] [-ProgressAction ] [] +``` + +### Get +``` +Get-AzStorageTaskAssignment -AccountName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### GetViaIdentityStorageAccount +``` +Get-AzStorageTaskAssignment -Name -StorageAccountInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzStorageTaskAssignment -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get the storage task assignment properties + +## EXAMPLES + +### EXAMPLE 1 +``` +Get-AzStorageTaskAssignment -ResourceGroupName myresourcegroup -AccountName myaccount -Name myassignment +``` + +### EXAMPLE 2 +``` +Get-AzStorageTaskAssignment -ResourceGroupName myresourcegroup -AccountName myaccount +``` + +## PARAMETERS + +### -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. + +```yaml +Type: String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: IStorageIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Maxpagesize +Optional, specifies the maximum number of storage task assignment Ids to be included in the list response. + +```yaml +Type: Int32 +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +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. + +```yaml +Type: String +Parameter Sets: Get, GetViaIdentityStorageAccount +Aliases: StorageTaskAssignmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageAccountInputObject +Identity Parameter + +```yaml +Type: IStorageIdentity +Parameter Sets: GetViaIdentityStorageAccount +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## 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. + +## RELATED LINKS + +[https://learn.microsoft.com/powershell/module/az.storage/get-azstoragetaskassignment](https://learn.microsoft.com/powershell/module/az.storage/get-azstoragetaskassignment) + diff --git a/src/Storage/Storage.Management/help/Get-AzStorageTaskAssignmentInstancesReport.md b/src/Storage/Storage.Management/help/Get-AzStorageTaskAssignmentInstancesReport.md new file mode 100644 index 000000000000..2f3a0bef6184 --- /dev/null +++ b/src/Storage/Storage.Management/help/Get-AzStorageTaskAssignmentInstancesReport.md @@ -0,0 +1,291 @@ +--- +external help file: Az.Storage-help.xml +Module Name: Az.Storage +online version: https://learn.microsoft.com/powershell/module/az.storage/get-azstoragetaskassignmentinstancesreport +schema: 2.0.0 +--- + +# Get-AzStorageTaskAssignmentInstancesReport + +## SYNOPSIS +Fetch the report summary of a single storage task assignment's instances + +## SYNTAX + +### List (Default) +``` +Get-AzStorageTaskAssignmentInstancesReport -AccountName -ResourceGroupName + [-SubscriptionId ] [-Filter ] [-Maxpagesize ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### Get +``` +Get-AzStorageTaskAssignmentInstancesReport -AccountName -ResourceGroupName + -StorageTaskAssignmentName [-SubscriptionId ] [-Filter ] [-Maxpagesize ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentityStorageAccount +``` +Get-AzStorageTaskAssignmentInstancesReport -StorageTaskAssignmentName + -StorageAccountInputObject [-Filter ] [-Maxpagesize ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzStorageTaskAssignmentInstancesReport -InputObject [-Filter ] + [-Maxpagesize ] [-DefaultProfile ] [-ProgressAction ] [] +``` + +## DESCRIPTION +Fetch the report summary of a single storage task assignment's instances + +## EXAMPLES + +### EXAMPLE 1 +``` +Get-AzStorageTaskAssignmentInstancesReport -AccountName myaccount -ResourceGroupName myresourcegroup -StorageTaskAssignmentName mytaskassignment +``` + +### EXAMPLE 2 +``` +Get-AzStorageTaskAssignmentInstancesReport -AccountName myaccount -ResourceGroupName myresourcegroup +``` + +## PARAMETERS + +### -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. + +```yaml +Type: String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +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. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: IStorageIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Maxpagesize +Optional, specifies the maximum number of storage task assignment instances to be included in the list response. + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageAccountInputObject +Identity Parameter + +```yaml +Type: IStorageIdentity +Parameter Sets: GetViaIdentityStorageAccount +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -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. + +```yaml +Type: String +Parameter Sets: Get, GetViaIdentityStorageAccount +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## 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. + +## RELATED LINKS + +[https://learn.microsoft.com/powershell/module/az.storage/get-azstoragetaskassignmentinstancesreport](https://learn.microsoft.com/powershell/module/az.storage/get-azstoragetaskassignmentinstancesreport) + diff --git a/src/Storage/Storage.Management/help/Get-AzStorageUsage.md b/src/Storage/Storage.Management/help/Get-AzStorageUsage.md index d256e1dfe5c6..34438007e87a 100644 --- a/src/Storage/Storage.Management/help/Get-AzStorageUsage.md +++ b/src/Storage/Storage.Management/help/Get-AzStorageUsage.md @@ -15,7 +15,7 @@ Gets the Storage resource usage of the current subscription. ``` Get-AzStorageUsage -Location [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -71,6 +71,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Storage/Storage.Management/help/Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration.md b/src/Storage/Storage.Management/help/Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration.md index afaff4848a17..66125aa05d20 100644 --- a/src/Storage/Storage.Management/help/Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration.md +++ b/src/Storage/Storage.Management/help/Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration.md @@ -16,20 +16,20 @@ Migrate an existing Storage blob containers to enable immutable Storage with ver ``` Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration [-ResourceGroupName] [-StorageAccountName] -Name [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration -Name -StorageAccount [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ContainerObject ``` Invoke-AzRmStorageContainerImmutableStorageWithVersioningMigration -InputObject [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -112,6 +112,21 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Invoke-AzStorageAccountFailover.md b/src/Storage/Storage.Management/help/Invoke-AzStorageAccountFailover.md index 09022afeeadc..d32b321b6bec 100644 --- a/src/Storage/Storage.Management/help/Invoke-AzStorageAccountFailover.md +++ b/src/Storage/Storage.Management/help/Invoke-AzStorageAccountFailover.md @@ -15,13 +15,14 @@ Invokes failover of a Storage account. ### AccountName (Default) ``` Invoke-AzStorageAccountFailover [-ResourceGroupName] [-Name] [-FailoverType ] - [-Force] [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-Force] [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### AccountObject ``` Invoke-AzStorageAccountFailover [-FailoverType ] -InputObject [-Force] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -181,6 +182,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Invoke-AzStorageAccountHierarchicalNamespaceUpgrade.md b/src/Storage/Storage.Management/help/Invoke-AzStorageAccountHierarchicalNamespaceUpgrade.md index 46ba4022a92c..f794c94331fc 100644 --- a/src/Storage/Storage.Management/help/Invoke-AzStorageAccountHierarchicalNamespaceUpgrade.md +++ b/src/Storage/Storage.Management/help/Invoke-AzStorageAccountHierarchicalNamespaceUpgrade.md @@ -16,13 +16,13 @@ Validates if a storage account can be upgraded to enable HierarchicalNamespace, ``` Invoke-AzStorageAccountHierarchicalNamespaceUpgrade [-ResourceGroupName] [-Name] -RequestType [-Force] [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Invoke-AzStorageAccountHierarchicalNamespaceUpgrade -InputObject -RequestType - [-Force] [-AsJob] [-DefaultProfile ] [-WhatIf] + [-Force] [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -124,6 +124,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RequestType The HierarchicalNamespaceUpgrade requestType to run: - Validation: Validate if the account can be upgrade to enable HierarchicalNamespace. diff --git a/src/Storage/Storage.Management/help/Lock-AzRmStorageContainerImmutabilityPolicy.md b/src/Storage/Storage.Management/help/Lock-AzRmStorageContainerImmutabilityPolicy.md index cfd57a5a1c27..134d5ac42d2f 100644 --- a/src/Storage/Storage.Management/help/Lock-AzRmStorageContainerImmutabilityPolicy.md +++ b/src/Storage/Storage.Management/help/Lock-AzRmStorageContainerImmutabilityPolicy.md @@ -16,27 +16,27 @@ Locks ImmutabilityPolicy of a Storage blob containers ``` Lock-AzRmStorageContainerImmutabilityPolicy [-ResourceGroupName] [-StorageAccountName] -ContainerName -Etag [-Force] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Lock-AzRmStorageContainerImmutabilityPolicy -ContainerName -StorageAccount - -Etag [-Force] [-DefaultProfile ] + -Etag [-Force] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ContainerObject ``` Lock-AzRmStorageContainerImmutabilityPolicy -Container -Etag [-Force] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ImmutabilityPolicyObject ``` Lock-AzRmStorageContainerImmutabilityPolicy [-InputObject] [-Force] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -170,6 +170,21 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Move-AzDataLakeGen2Item.md b/src/Storage/Storage.Management/help/Move-AzDataLakeGen2Item.md index 31fb912b1774..b50b800ae4dc 100644 --- a/src/Storage/Storage.Management/help/Move-AzDataLakeGen2Item.md +++ b/src/Storage/Storage.Management/help/Move-AzDataLakeGen2Item.md @@ -16,14 +16,14 @@ Move a file or directory to another a file or directory in same Storage account. ``` Move-AzDataLakeGen2Item [-FileSystem] [-Path] -DestFileSystem -DestPath [-Force] [-Context ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ItemPipeline ``` Move-AzDataLakeGen2Item -InputObject -DestFileSystem -DestPath [-Force] [-Context ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -205,6 +205,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Storage/Storage.Management/help/New-AzDataLakeGen2Item.md b/src/Storage/Storage.Management/help/New-AzDataLakeGen2Item.md index 9e3854315dd8..0190bf60a62e 100644 --- a/src/Storage/Storage.Management/help/New-AzDataLakeGen2Item.md +++ b/src/Storage/Storage.Management/help/New-AzDataLakeGen2Item.md @@ -17,7 +17,7 @@ Create a file or directory in a filesystem. New-AzDataLakeGen2Item [-FileSystem] [-Path] -Source [-Umask ] [-Permission ] [-EncryptionContext ] [-Property ] [-Metadata ] [-Force] [-AsJob] [-Context ] [-DefaultProfile ] - [-ConcurrentTaskCount ] [-WhatIf] [-Confirm] [] + [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Directory @@ -25,7 +25,7 @@ New-AzDataLakeGen2Item [-FileSystem] [-Path] -Source New-AzDataLakeGen2Item [-FileSystem] [-Path] [-Directory] [-Umask ] [-Permission ] [-Property ] [-Metadata ] [-Force] [-AsJob] [-Context ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -248,6 +248,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Property Specifies properties for the created directory or file. The supported properties for file are: CacheControl, ContentDisposition, ContentEncoding, ContentLanguage, ContentMD5, ContentType. diff --git a/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md b/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md index 047c85dfa189..d579da5ae4fc 100644 --- a/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md +++ b/src/Storage/Storage.Management/help/New-AzDataLakeGen2SasToken.md @@ -17,7 +17,7 @@ Generates a SAS token for Azure DatalakeGen2 item. New-AzDataLakeGen2SasToken [-FileSystem] [-Path ] [-Permission ] [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-EncryptionScope ] [-FullUri] [-Context ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### ItemPipeline @@ -25,7 +25,7 @@ New-AzDataLakeGen2SasToken [-FileSystem] [-Path ] [-Permission New-AzDataLakeGen2SasToken -InputObject [-Permission ] [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-EncryptionScope ] [-FullUri] [-Context ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -202,6 +202,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Protocol Protocol can be used in the request with this SAS token. diff --git a/src/Storage/Storage.Management/help/New-AzRmStorageContainer.md b/src/Storage/Storage.Management/help/New-AzRmStorageContainer.md index b9829375dca2..83c73837f5e6 100644 --- a/src/Storage/Storage.Management/help/New-AzRmStorageContainer.md +++ b/src/Storage/Storage.Management/help/New-AzRmStorageContainer.md @@ -15,8 +15,8 @@ Creates a Storage blob container ### AccountName (Default) ``` New-AzRmStorageContainer [-ResourceGroupName] [-StorageAccountName] -Name - [-PublicAccess ] [-Metadata ] [-RootSquash ] - [-EnableImmutableStorageWithVersioning] [-DefaultProfile ] + [-PublicAccess ] [-Metadata ] [-EnableImmutableStorageWithVersioning] + [-RootSquash ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,16 +24,16 @@ New-AzRmStorageContainer [-ResourceGroupName] [-StorageAccountName] [-StorageAccountName] -Name -DefaultEncryptionScope -PreventEncryptionScopeOverride [-PublicAccess ] - [-Metadata ] [-RootSquash ] [-EnableImmutableStorageWithVersioning] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-Metadata ] [-EnableImmutableStorageWithVersioning] [-RootSquash ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` New-AzRmStorageContainer -StorageAccount -Name [-PublicAccess ] - [-Metadata ] [-RootSquash ] [-EnableImmutableStorageWithVersioning] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-Metadata ] [-EnableImmutableStorageWithVersioning] [-RootSquash ] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -41,8 +41,8 @@ New-AzRmStorageContainer -StorageAccount -Name [-Pub ``` New-AzRmStorageContainer -StorageAccount -Name -DefaultEncryptionScope -PreventEncryptionScopeOverride [-PublicAccess ] [-Metadata ] - [-RootSquash ] [-EnableImmutableStorageWithVersioning] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-EnableImmutableStorageWithVersioning] [-RootSquash ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -216,6 +216,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PublicAccess Container PublicAccess diff --git a/src/Storage/Storage.Management/help/New-AzRmStorageShare.md b/src/Storage/Storage.Management/help/New-AzRmStorageShare.md index 4ae1418b85b9..725fff7e5a37 100644 --- a/src/Storage/Storage.Management/help/New-AzRmStorageShare.md +++ b/src/Storage/Storage.Management/help/New-AzRmStorageShare.md @@ -15,16 +15,16 @@ Creates a Storage file share. ### AccountName (Default) ``` New-AzRmStorageShare [-ResourceGroupName] [-StorageAccountName] -Name - [-QuotaGiB ] [-Metadata ] [-AccessTier ] [-Snapshot] [-EnabledProtocol ] - [-RootSquash ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-QuotaGiB ] [-Metadata ] [-EnabledProtocol ] [-RootSquash ] + [-AccessTier ] [-Snapshot] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` New-AzRmStorageShare -StorageAccount -Name [-QuotaGiB ] [-Metadata ] [-EnabledProtocol ] [-RootSquash ] [-AccessTier ] [-Snapshot] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -195,6 +195,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -QuotaGiB Share Quota in Gibibyte. diff --git a/src/Storage/Storage.Management/help/New-AzStorageAccount.md b/src/Storage/Storage.Management/help/New-AzStorageAccount.md index cf6bd0c2258b..21dd1c1d8b2a 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageAccount.md +++ b/src/Storage/Storage.Management/help/New-AzStorageAccount.md @@ -30,7 +30,7 @@ New-AzStorageAccount [-ResourceGroupName] [-Name] [-SkuName] < [-PublicNetworkAccess ] [-EnableAccountLevelImmutability] [-ImmutabilityPeriod ] [-AllowProtectedAppendWrite ] [-ImmutabilityPolicyState ] [-AllowedCopyScope ] [-DnsEndpointType ] [-DefaultProfile ] [-RoutingChoice ] - [] + [-ProgressAction ] [] ``` ### AzureActiveDirectoryKerberosForFile @@ -50,7 +50,8 @@ New-AzStorageAccount [-ResourceGroupName] [-Name] [-SkuName] < [-DefaultSharePermission ] [-EdgeZone ] [-PublicNetworkAccess ] [-EnableAccountLevelImmutability] [-ImmutabilityPeriod ] [-AllowProtectedAppendWrite ] [-ImmutabilityPolicyState ] [-AllowedCopyScope ] [-DnsEndpointType ] - [-DefaultProfile ] [-RoutingChoice ] [] + [-DefaultProfile ] [-RoutingChoice ] [-ProgressAction ] + [] ``` ### ActiveDirectoryDomainServicesForFile @@ -73,7 +74,8 @@ New-AzStorageAccount [-ResourceGroupName] [-Name] [-SkuName] < [-DefaultSharePermission ] [-EdgeZone ] [-PublicNetworkAccess ] [-EnableAccountLevelImmutability] [-ImmutabilityPeriod ] [-AllowProtectedAppendWrite ] [-ImmutabilityPolicyState ] [-AllowedCopyScope ] [-DnsEndpointType ] - [-DefaultProfile ] [-RoutingChoice ] [] + [-DefaultProfile ] [-RoutingChoice ] [-ProgressAction ] + [] ``` ## DESCRIPTION @@ -1095,7 +1097,7 @@ The minimum TLS version to be permitted on requests to storage. The default inte Type: System.String Parameter Sets: (All) Aliases: -Accepted values: TLS1_0, TLS1_1, TLS1_2 +Accepted values: TLS1_0, TLS1_1, TLS1_2, TLS1_3 Required: False Position: Named @@ -1134,6 +1136,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PublicNetworkAccess Allow or disallow public network access to Storage Account.Possible values include: 'Enabled', 'Disabled'. diff --git a/src/Storage/Storage.Management/help/New-AzStorageAccountKey.md b/src/Storage/Storage.Management/help/New-AzStorageAccountKey.md index b14a4bf4c253..39bb35b01120 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageAccountKey.md +++ b/src/Storage/Storage.Management/help/New-AzStorageAccountKey.md @@ -15,7 +15,7 @@ Regenerates a storage key for an Azure Storage account. ``` New-AzStorageAccountKey [-ResourceGroupName] [-Name] [-KeyName] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -83,6 +83,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Specifies the name of the resource group that contains the Storage account. diff --git a/src/Storage/Storage.Management/help/New-AzStorageAccountManagementPolicyBlobIndexMatchObject.md b/src/Storage/Storage.Management/help/New-AzStorageAccountManagementPolicyBlobIndexMatchObject.md index ab91eacacc9e..5acfb181b115 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageAccountManagementPolicyBlobIndexMatchObject.md +++ b/src/Storage/Storage.Management/help/New-AzStorageAccountManagementPolicyBlobIndexMatchObject.md @@ -14,7 +14,7 @@ Creates a ManagementPolicy BlobIndexMatch object, which can be used in New-AzSto ``` New-AzStorageAccountManagementPolicyBlobIndexMatchObject [-Name ] [-Value ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -78,6 +78,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Value Gets or sets this is the filter tag value field used for tag based filtering, it can have 0 - 256 characters. diff --git a/src/Storage/Storage.Management/help/New-AzStorageAccountManagementPolicyFilter.md b/src/Storage/Storage.Management/help/New-AzStorageAccountManagementPolicyFilter.md index 4653a6582538..7f424cae4d3f 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageAccountManagementPolicyFilter.md +++ b/src/Storage/Storage.Management/help/New-AzStorageAccountManagementPolicyFilter.md @@ -15,7 +15,7 @@ Creates a ManagementPolicy rule filter object, which can be used in New-AzStorag ``` New-AzStorageAccountManagementPolicyFilter [-PrefixMatch ] [-BlobType ] [-BlobIndexMatch ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -108,6 +108,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Storage/Storage.Management/help/New-AzStorageAccountManagementPolicyRule.md b/src/Storage/Storage.Management/help/New-AzStorageAccountManagementPolicyRule.md index c4b78be043ea..5427e408989c 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageAccountManagementPolicyRule.md +++ b/src/Storage/Storage.Management/help/New-AzStorageAccountManagementPolicyRule.md @@ -15,7 +15,7 @@ Creates a ManagementPolicy rule object, which can be used in Set-AzStorageAccoun ``` New-AzStorageAccountManagementPolicyRule [-Name] [-Disabled] -Action [-Filter ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -156,6 +156,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Storage/Storage.Management/help/New-AzStorageAccountSASToken.md b/src/Storage/Storage.Management/help/New-AzStorageAccountSASToken.md index 0343f4e18ade..5723843cada6 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageAccountSASToken.md +++ b/src/Storage/Storage.Management/help/New-AzStorageAccountSASToken.md @@ -17,7 +17,7 @@ Creates an account-level SAS token. New-AzStorageAccountSASToken -Service -ResourceType [-Permission ] [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-EncryptionScope ] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -146,6 +146,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Protocol Specifies the protocol permitted for a request made with the account SAS. The acceptable values for this parameter are: diff --git a/src/Storage/Storage.Management/help/New-AzStorageBlobInventoryPolicyRule.md b/src/Storage/Storage.Management/help/New-AzStorageBlobInventoryPolicyRule.md index 41ab39cbbc21..2640ffc1c854 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageBlobInventoryPolicyRule.md +++ b/src/Storage/Storage.Management/help/New-AzStorageBlobInventoryPolicyRule.md @@ -18,14 +18,14 @@ New-AzStorageBlobInventoryPolicyRule [-Name] [-Disabled] -Destination < -Schedule -BlobSchemaField -BlobType [-PrefixMatch ] [-ExcludePrefix ] [-IncludeSnapshot] [-IncludeBlobVersion] [-IncludeDeleted] [-CreationTimeLastNDay ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### ContainerRuleParameterSet ``` New-AzStorageBlobInventoryPolicyRule [-Name] [-Disabled] -Destination -Format -Schedule -ContainerSchemaField [-PrefixMatch ] [-ExcludePrefix ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -291,6 +291,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Schedule This field is used to schedule an inventory formation. Possible values include: 'Daily', 'Weekly' diff --git a/src/Storage/Storage.Management/help/New-AzStorageBlobQueryConfig.md b/src/Storage/Storage.Management/help/New-AzStorageBlobQueryConfig.md index c1e0af9e78ef..0855394b5a73 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageBlobQueryConfig.md +++ b/src/Storage/Storage.Management/help/New-AzStorageBlobQueryConfig.md @@ -16,13 +16,13 @@ Creates a blob query configuration object, which can be used in Get-AzStorageBlo ``` New-AzStorageBlobQueryConfig [-AsCsv] [-RecordSeparator ] [-ColumnSeparator ] [-QuotationCharacter ] [-EscapeCharacter ] [-HasHeader] [-AsJob] - [] + [-ProgressAction ] [] ``` ### Json ``` New-AzStorageBlobQueryConfig [-AsJson] [-RecordSeparator ] [-AsJob] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -146,6 +146,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -QuotationCharacter Optional. The char used to quote a specific field. diff --git a/src/Storage/Storage.Management/help/New-AzStorageBlobRangeToRestore.md b/src/Storage/Storage.Management/help/New-AzStorageBlobRangeToRestore.md index f79a053f7328..52d702319b04 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageBlobRangeToRestore.md +++ b/src/Storage/Storage.Management/help/New-AzStorageBlobRangeToRestore.md @@ -14,7 +14,7 @@ Creates a Blob Range object to restores a Storage account. ``` New-AzStorageBlobRangeToRestore [-StartRange ] [-EndRange ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -84,6 +84,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -StartRange Specify the blob restore start range. Start range will be included in restore blobs. diff --git a/src/Storage/Storage.Management/help/New-AzStorageBlobSASToken.md b/src/Storage/Storage.Management/help/New-AzStorageBlobSASToken.md index 74691e60b783..970912d68340 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageBlobSASToken.md +++ b/src/Storage/Storage.Management/help/New-AzStorageBlobSASToken.md @@ -18,7 +18,7 @@ Generates a SAS token for an Azure storage blob. New-AzStorageBlobSASToken [-Container] [-Blob] [-Permission ] [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] [-EncryptionScope ] [-Context ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -27,7 +27,7 @@ New-AzStorageBlobSASToken [-Container] [-Blob] [-Permission [-BlobBaseClient ] -Policy [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] [-EncryptionScope ] [-Context ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -36,7 +36,7 @@ New-AzStorageBlobSASToken -CloudBlob [-BlobBaseClient [-BlobBaseClient ] [-Permission ] [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] [-EncryptionScope ] [-Context ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -45,7 +45,7 @@ New-AzStorageBlobSASToken -CloudBlob [-BlobBaseClient [-Blob] -Policy [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] [-EncryptionScope ] [-Context ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -267,6 +267,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Protocol Specifies the protocol permitted for a request. The acceptable values for this parameter are: diff --git a/src/Storage/Storage.Management/help/New-AzStorageContainer.md b/src/Storage/Storage.Management/help/New-AzStorageContainer.md index 231373007874..20154071c0e9 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageContainer.md +++ b/src/Storage/Storage.Management/help/New-AzStorageContainer.md @@ -17,7 +17,7 @@ Creates an Azure storage container. ``` New-AzStorageContainer [-Name] [[-Permission] ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -26,7 +26,7 @@ New-AzStorageContainer [-Name] [[-Permission] [[-Permission] ] -DefaultEncryptionScope -PreventEncryptionScopeOverride [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -207,6 +207,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the service side time-out interval, in seconds, for a request. If the specified interval elapses before the service processes the request, the storage service returns an error. diff --git a/src/Storage/Storage.Management/help/New-AzStorageContainerSASToken.md b/src/Storage/Storage.Management/help/New-AzStorageContainerSASToken.md index c9517f65e8e2..09e4be8851c2 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageContainerSASToken.md +++ b/src/Storage/Storage.Management/help/New-AzStorageContainerSASToken.md @@ -18,7 +18,7 @@ Generates an SAS token for an Azure storage container. New-AzStorageContainerSASToken [-Name] -Policy [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] [-EncryptionScope ] [-Context ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### SasPermission @@ -26,7 +26,7 @@ New-AzStorageContainerSASToken [-Name] -Policy [-Protocol [-Permission ] [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] [-EncryptionScope ] [-Context ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -209,6 +209,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Protocol Specifies the protocol permitted for a request. The acceptable values for this parameter are: diff --git a/src/Storage/Storage.Management/help/New-AzStorageContainerStoredAccessPolicy.md b/src/Storage/Storage.Management/help/New-AzStorageContainerStoredAccessPolicy.md index 62d99b9b4aa0..0562d5fbdccd 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageContainerStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/New-AzStorageContainerStoredAccessPolicy.md @@ -17,7 +17,7 @@ Creates a stored access policy for an Azure storage container. New-AzStorageContainerStoredAccessPolicy [-Container] [-Policy] [-Permission ] [-StartTime ] [-ExpiryTime ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -163,6 +163,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the client-side time-out interval, in seconds, for one service request. If the previous call fails in the specified interval, this cmdlet retries the request. diff --git a/src/Storage/Storage.Management/help/New-AzStorageContext.md b/src/Storage/Storage.Management/help/New-AzStorageContext.md index 5c6a9786ec6d..771e75098665 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageContext.md +++ b/src/Storage/Storage.Management/help/New-AzStorageContext.md @@ -16,50 +16,50 @@ Creates an Azure Storage context. ### OAuthAccount (Default) ``` New-AzStorageContext [-StorageAccountName] [-UseConnectedAccount] [-Protocol ] - [-Endpoint ] [-EnableFileBackupRequestIntent] + [-Endpoint ] [-EnableFileBackupRequestIntent] [-ProgressAction ] [] ``` ### AccountNameAndKey ``` New-AzStorageContext [-StorageAccountName] [-StorageAccountKey] [-Protocol ] - [-Endpoint ] [] + [-Endpoint ] [-ProgressAction ] [] ``` ### AccountNameAndKeyEnvironment ``` New-AzStorageContext [-StorageAccountName] [-StorageAccountKey] [-Protocol ] - -Environment [] + -Environment [-ProgressAction ] [] ``` ### AnonymousAccount ``` New-AzStorageContext [-StorageAccountName] [-Anonymous] [-Protocol ] [-Endpoint ] - [] + [-ProgressAction ] [] ``` ### AnonymousAccountEnvironment ``` New-AzStorageContext [-StorageAccountName] [-Anonymous] [-Protocol ] -Environment - [] + [-ProgressAction ] [] ``` ### SasToken ``` New-AzStorageContext [-StorageAccountName] -SasToken [-Protocol ] - [-Endpoint ] [] + [-Endpoint ] [-ProgressAction ] [] ``` ### SasTokenWithAzureEnvironment ``` New-AzStorageContext [-StorageAccountName] -SasToken -Environment - [] + [-ProgressAction ] [] ``` ### OAuthAccountEnvironment ``` New-AzStorageContext [-StorageAccountName] [-UseConnectedAccount] [-Protocol ] - -Environment [-EnableFileBackupRequestIntent] + -Environment [-EnableFileBackupRequestIntent] [-ProgressAction ] [] ``` @@ -67,36 +67,36 @@ New-AzStorageContext [-StorageAccountName] [-UseConnectedAccount] [-Pro ``` New-AzStorageContext [-StorageAccountName] [-StorageAccountKey] -BlobEndpoint [-FileEndpoint ] [-QueueEndpoint ] [-TableEndpoint ] - [] + [-ProgressAction ] [] ``` ### SasTokenServiceEndpoint ``` New-AzStorageContext -SasToken [-BlobEndpoint ] [-FileEndpoint ] - [-QueueEndpoint ] [-TableEndpoint ] [] + [-QueueEndpoint ] [-TableEndpoint ] [-ProgressAction ] [] ``` ### ConnectionString ``` -New-AzStorageContext -ConnectionString [] +New-AzStorageContext -ConnectionString [-ProgressAction ] [] ``` ### LocalDevelopment ``` -New-AzStorageContext [-Local] [] +New-AzStorageContext [-Local] [-ProgressAction ] [] ``` ### AnonymousAccountServiceEndpoint ``` New-AzStorageContext [-Anonymous] [-BlobEndpoint ] [-FileEndpoint ] [-QueueEndpoint ] - [-TableEndpoint ] [] + [-TableEndpoint ] [-ProgressAction ] [] ``` ### OAuthAccountServiceEndpoint ``` New-AzStorageContext [-UseConnectedAccount] [-BlobEndpoint ] [-FileEndpoint ] [-QueueEndpoint ] [-TableEndpoint ] [-EnableFileBackupRequestIntent] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -377,6 +377,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Protocol Transfer Protocol (https/http). diff --git a/src/Storage/Storage.Management/help/New-AzStorageDirectory.md b/src/Storage/Storage.Management/help/New-AzStorageDirectory.md index 7d71a6e687e4..5fef847ef46d 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageDirectory.md +++ b/src/Storage/Storage.Management/help/New-AzStorageDirectory.md @@ -17,7 +17,7 @@ Creates a directory. ``` New-AzStorageDirectory [-ShareName] [-Path] [-DisAllowTrailingDot] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -25,7 +25,7 @@ New-AzStorageDirectory [-ShareName] [-Path] [-DisAllowTrailing ``` New-AzStorageDirectory [-Share] [-ShareClient ] [-Path] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -34,7 +34,7 @@ New-AzStorageDirectory [-Share] [-ShareClient ] [- New-AzStorageDirectory [-Directory] [-ShareDirectoryClient ] [-Path] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -176,6 +176,21 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/New-AzStorageEncryptionScope.md b/src/Storage/Storage.Management/help/New-AzStorageEncryptionScope.md index c0245d679178..f40072e4488f 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageEncryptionScope.md +++ b/src/Storage/Storage.Management/help/New-AzStorageEncryptionScope.md @@ -16,7 +16,7 @@ Creates an encryption scope for a Storage account. ``` New-AzStorageEncryptionScope [-ResourceGroupName] [-StorageAccountName] -EncryptionScopeName [-StorageEncryption] [-RequireInfrastructureEncryption] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,7 +24,7 @@ New-AzStorageEncryptionScope [-ResourceGroupName] [-StorageAccountName] ``` New-AzStorageEncryptionScope [-ResourceGroupName] [-StorageAccountName] -EncryptionScopeName [-KeyvaultEncryption] -KeyUri [-RequireInfrastructureEncryption] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -32,14 +32,14 @@ New-AzStorageEncryptionScope [-ResourceGroupName] [-StorageAccountName] ``` New-AzStorageEncryptionScope -StorageAccount -EncryptionScopeName [-StorageEncryption] [-RequireInfrastructureEncryption] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObjectKeyVault ``` New-AzStorageEncryptionScope -StorageAccount -EncryptionScopeName [-KeyvaultEncryption] -KeyUri [-RequireInfrastructureEncryption] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -143,6 +143,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RequireInfrastructureEncryption The encryption scope will apply a secondary layer of encryption with platform managed keys for data at rest. diff --git a/src/Storage/Storage.Management/help/New-AzStorageFileSASToken.md b/src/Storage/Storage.Management/help/New-AzStorageFileSASToken.md index de0cb0bcf7c3..b69bba0336ae 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageFileSASToken.md +++ b/src/Storage/Storage.Management/help/New-AzStorageFileSASToken.md @@ -18,7 +18,7 @@ Generates a shared access signature token for a Storage file. New-AzStorageFileSASToken [-ShareName] [-Path] [-Permission ] [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] [-Context ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### NameSasPolicy @@ -26,21 +26,21 @@ New-AzStorageFileSASToken [-ShareName] [-Path] [-Permission [-Path] -Policy [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] [-Context ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### FileSasPermission ``` New-AzStorageFileSASToken -File [-Permission ] [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### FileSasPolicy ``` New-AzStorageFileSASToken -File -Policy [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -211,6 +211,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Protocol Specifies the protocol permitted for a request. The acceptable values for this parameter are: diff --git a/src/Storage/Storage.Management/help/New-AzStorageLocalUserPermissionScope.md b/src/Storage/Storage.Management/help/New-AzStorageLocalUserPermissionScope.md index a716b2abc0b8..73c072e9818a 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageLocalUserPermissionScope.md +++ b/src/Storage/Storage.Management/help/New-AzStorageLocalUserPermissionScope.md @@ -14,7 +14,7 @@ Creates a permission scope object, which can be used in Set-AzStorageLocalUser. ``` New-AzStorageLocalUserPermissionScope -Permission -Service -ResourceName - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -84,6 +84,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceName Specify the name of resource, normally the container name or the file share name, used by the local user. diff --git a/src/Storage/Storage.Management/help/New-AzStorageLocalUserSshPassword.md b/src/Storage/Storage.Management/help/New-AzStorageLocalUserSshPassword.md index f47c96874a30..b93ae93a7588 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageLocalUserSshPassword.md +++ b/src/Storage/Storage.Management/help/New-AzStorageLocalUserSshPassword.md @@ -15,21 +15,21 @@ Regenerate SSH password of a specified local user in a storage account. ### AccountName (Default) ``` New-AzStorageLocalUserSshPassword [-ResourceGroupName] [-StorageAccountName] - -UserName [-DefaultProfile ] [-WhatIf] + -UserName [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` New-AzStorageLocalUserSshPassword -StorageAccount -UserName - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UserObject ``` New-AzStorageLocalUserSshPassword [-InputObject] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -82,6 +82,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/New-AzStorageLocalUserSshPublicKey.md b/src/Storage/Storage.Management/help/New-AzStorageLocalUserSshPublicKey.md index 9905f3ded0dc..240e97385102 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageLocalUserSshPublicKey.md +++ b/src/Storage/Storage.Management/help/New-AzStorageLocalUserSshPublicKey.md @@ -14,7 +14,7 @@ Creates a SSH public key object, which can be used in Set-AzStorageLocalUser. ``` New-AzStorageLocalUserSshPublicKey -Key [-Description ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -102,6 +102,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Storage/Storage.Management/help/New-AzStorageObjectReplicationPolicyRule.md b/src/Storage/Storage.Management/help/New-AzStorageObjectReplicationPolicyRule.md index 3063bfa509aa..11ea237284b1 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageObjectReplicationPolicyRule.md +++ b/src/Storage/Storage.Management/help/New-AzStorageObjectReplicationPolicyRule.md @@ -15,7 +15,7 @@ Creates an object replication policy rule. ``` New-AzStorageObjectReplicationPolicyRule -SourceContainer -DestinationContainer [-PrefixMatch ] [-MinCreationTime ] [-RuleId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -115,6 +115,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RuleId Object Replication Rule Id. diff --git a/src/Storage/Storage.Management/help/New-AzStorageQueue.md b/src/Storage/Storage.Management/help/New-AzStorageQueue.md index a730eb316b13..f740f06ea353 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageQueue.md +++ b/src/Storage/Storage.Management/help/New-AzStorageQueue.md @@ -15,7 +15,7 @@ Creates a storage queue. ``` New-AzStorageQueue [-Name] [-Context ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -86,6 +86,21 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Storage/Storage.Management/help/New-AzStorageQueueSASToken.md b/src/Storage/Storage.Management/help/New-AzStorageQueueSASToken.md index 44bbf36fd21a..beac46d3e911 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageQueueSASToken.md +++ b/src/Storage/Storage.Management/help/New-AzStorageQueueSASToken.md @@ -17,14 +17,14 @@ Generates a shared access signature token for an Azure storage queue. ``` New-AzStorageQueueSASToken [-Name] -Policy [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] [-Context ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### SasPermission ``` New-AzStorageQueueSASToken [-Name] [-Permission ] [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -165,6 +165,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Protocol Specifies the protocol permitted for a request. The acceptable values for this parameter are: diff --git a/src/Storage/Storage.Management/help/New-AzStorageQueueStoredAccessPolicy.md b/src/Storage/Storage.Management/help/New-AzStorageQueueStoredAccessPolicy.md index 8c2f9e21c856..02cc84d2a4ae 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageQueueStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/New-AzStorageQueueStoredAccessPolicy.md @@ -16,7 +16,7 @@ Creates a stored access policy for an Azure storage queue. ``` New-AzStorageQueueStoredAccessPolicy [-Queue] [-Policy] [-Permission ] [-StartTime ] [-ExpiryTime ] [-Context ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -110,6 +110,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Queue Specifies the Azure storage queue name. diff --git a/src/Storage/Storage.Management/help/New-AzStorageShare.md b/src/Storage/Storage.Management/help/New-AzStorageShare.md index a76d953ad8b8..4a0a70366ed3 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageShare.md +++ b/src/Storage/Storage.Management/help/New-AzStorageShare.md @@ -16,7 +16,7 @@ Creates a file share. ``` New-AzStorageShare [-Name] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -116,6 +116,21 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/New-AzStorageShareSASToken.md b/src/Storage/Storage.Management/help/New-AzStorageShareSASToken.md index a463f04b6b98..73daf541521a 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageShareSASToken.md +++ b/src/Storage/Storage.Management/help/New-AzStorageShareSASToken.md @@ -17,7 +17,7 @@ Generate Shared Access Signature token for Azure Storage share. ``` New-AzStorageShareSASToken [-ShareName] -Policy [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -25,7 +25,7 @@ New-AzStorageShareSASToken [-ShareName] -Policy [-Protocol [-Permission ] [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -167,6 +167,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Protocol Specifies the protocol permitted for a request. The acceptable values for this parameter are: diff --git a/src/Storage/Storage.Management/help/New-AzStorageShareStoredAccessPolicy.md b/src/Storage/Storage.Management/help/New-AzStorageShareStoredAccessPolicy.md index 7f4eadaf6f8b..5fb46a0608f7 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageShareStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/New-AzStorageShareStoredAccessPolicy.md @@ -17,7 +17,7 @@ Creates a stored access policy on a Storage share. New-AzStorageShareStoredAccessPolicy [-ShareName] [-Policy] [-Permission ] [-StartTime ] [-ExpiryTime ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -148,6 +148,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/New-AzStorageTable.md b/src/Storage/Storage.Management/help/New-AzStorageTable.md index 51b5d2fcd66a..e77d31d33dea 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageTable.md +++ b/src/Storage/Storage.Management/help/New-AzStorageTable.md @@ -15,7 +15,7 @@ Creates a storage table. ``` New-AzStorageTable [-Name] [-Context ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -89,6 +89,21 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Storage/Storage.Management/help/New-AzStorageTableSASToken.md b/src/Storage/Storage.Management/help/New-AzStorageTableSASToken.md index 7331a7a0d12e..6742475c31ce 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageTableSASToken.md +++ b/src/Storage/Storage.Management/help/New-AzStorageTableSASToken.md @@ -18,7 +18,7 @@ Generates an SAS token for an Azure Storage table. New-AzStorageTableSASToken [-Name] -Policy [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] [-StartPartitionKey ] [-StartRowKey ] [-EndPartitionKey ] [-EndRowKey ] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -27,7 +27,7 @@ New-AzStorageTableSASToken [-Name] -Policy [-Protocol [-Permission ] [-Protocol ] [-IPAddressOrRange ] [-StartTime ] [-ExpiryTime ] [-FullUri] [-StartPartitionKey ] [-StartRowKey ] [-EndPartitionKey ] [-EndRowKey ] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -216,6 +216,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Protocol Specifies the protocol permitted for a request. The acceptable values for this parameter are: diff --git a/src/Storage/Storage.Management/help/New-AzStorageTableStoredAccessPolicy.md b/src/Storage/Storage.Management/help/New-AzStorageTableStoredAccessPolicy.md index b5c93b1631cf..a381fe4a2a46 100644 --- a/src/Storage/Storage.Management/help/New-AzStorageTableStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/New-AzStorageTableStoredAccessPolicy.md @@ -16,7 +16,7 @@ Creates a stored access policy for an Azure storage table. ``` New-AzStorageTableStoredAccessPolicy [-Table] [-Policy] [-Permission ] [-StartTime ] [-ExpiryTime ] [-Context ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -110,6 +110,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -StartTime Specifies the time at which the stored access policy becomes valid. diff --git a/src/Storage/Storage.Management/help/New-AzStorageTaskAssignment.md b/src/Storage/Storage.Management/help/New-AzStorageTaskAssignment.md new file mode 100644 index 000000000000..8fb688bc5c49 --- /dev/null +++ b/src/Storage/Storage.Management/help/New-AzStorageTaskAssignment.md @@ -0,0 +1,403 @@ +--- +external help file: Az.Storage-help.xml +Module Name: Az.Storage +online version: https://learn.microsoft.com/powershell/module/az.storage/new-azstoragetaskassignment +schema: 2.0.0 +--- + +# New-AzStorageTaskAssignment + +## 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. + +## SYNTAX + +``` +New-AzStorageTaskAssignment -AccountName -Name -ResourceGroupName + [-SubscriptionId ] -Description [-Enabled] -ReportPrefix -TaskId + -TriggerType [-EndBy ] [-Interval ] [-IntervalUnit ] [-StartFrom ] + [-StartOn ] [-TargetExcludePrefix ] [-TargetPrefix ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +## 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. + +## EXAMPLES + +### EXAMPLE 1 +``` +$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 2 +``` +$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() +``` + +## PARAMETERS + +### -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. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Text that describes the purpose of the storage task assignment + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Enabled +Whether the storage task assignment is enabled or not + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EndBy +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' + +```yaml +Type: DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Interval +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' + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IntervalUnit +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' + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +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. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: StorageTaskAssignmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReportPrefix +The container prefix for the location of storage task assignment report + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StartFrom +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' + +```yaml +Type: DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StartOn +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' + +```yaml +Type: DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TargetExcludePrefix +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 + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TargetPrefix +Required list of object prefixes to be included for task execution + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TaskId +Id of the corresponding storage task + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TriggerType +The trigger type of the storage task assignment execution + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment +## NOTES + +## RELATED LINKS + +[https://learn.microsoft.com/powershell/module/az.storage/new-azstoragetaskassignment](https://learn.microsoft.com/powershell/module/az.storage/new-azstoragetaskassignment) + diff --git a/src/Storage/Storage.Management/help/Remove-AzDataLakeGen2AclRecursive.md b/src/Storage/Storage.Management/help/Remove-AzDataLakeGen2AclRecursive.md index 28bedd7585e3..47bb65e28dac 100644 --- a/src/Storage/Storage.Management/help/Remove-AzDataLakeGen2AclRecursive.md +++ b/src/Storage/Storage.Management/help/Remove-AzDataLakeGen2AclRecursive.md @@ -15,7 +15,7 @@ Remove ACL recursively on the specified path. ``` Remove-AzDataLakeGen2AclRecursive [-FileSystem] [[-Path] ] [-ContinuationToken ] -Acl [-ContinueOnFailure] [-BatchSize ] [-MaxBatchCount ] [-AsJob] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -306,6 +306,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Storage/Storage.Management/help/Remove-AzDataLakeGen2Item.md b/src/Storage/Storage.Management/help/Remove-AzDataLakeGen2Item.md index f5d289b8536e..fb92f6f23f21 100644 --- a/src/Storage/Storage.Management/help/Remove-AzDataLakeGen2Item.md +++ b/src/Storage/Storage.Management/help/Remove-AzDataLakeGen2Item.md @@ -15,14 +15,14 @@ Remove a file or directory. ### ReceiveManual (Default) ``` Remove-AzDataLakeGen2Item [-FileSystem] [-Path] [-Force] [-AsJob] [-PassThru] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ItemPipeline ``` Remove-AzDataLakeGen2Item -InputObject [-Force] [-AsJob] [-PassThru] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -176,6 +176,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Storage/Storage.Management/help/Remove-AzRmStorageContainer.md b/src/Storage/Storage.Management/help/Remove-AzRmStorageContainer.md index 998aae8377d3..cdc7fd8494c8 100644 --- a/src/Storage/Storage.Management/help/Remove-AzRmStorageContainer.md +++ b/src/Storage/Storage.Management/help/Remove-AzRmStorageContainer.md @@ -15,21 +15,21 @@ Removes a Storage blob container ### AccountName (Default) ``` Remove-AzRmStorageContainer [-ResourceGroupName] [-StorageAccountName] -Name - [-Force] [-PassThru] [-DefaultProfile ] [-WhatIf] + [-Force] [-PassThru] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Remove-AzRmStorageContainer -Name -StorageAccount [-Force] [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ContainerObject ``` Remove-AzRmStorageContainer -InputObject [-Force] [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -138,6 +138,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerImmutabilityPolicy.md b/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerImmutabilityPolicy.md index da410599447f..bc93fce3c6fa 100644 --- a/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerImmutabilityPolicy.md +++ b/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerImmutabilityPolicy.md @@ -16,27 +16,27 @@ Removes ImmutabilityPolicy of a Storage blob container with an unlocked policy ``` Remove-AzRmStorageContainerImmutabilityPolicy [-ResourceGroupName] [-StorageAccountName] -ContainerName -Etag [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Remove-AzRmStorageContainerImmutabilityPolicy -ContainerName -StorageAccount - -Etag [-DefaultProfile ] [-WhatIf] + -Etag [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ContainerObject ``` Remove-AzRmStorageContainerImmutabilityPolicy -Container -Etag - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ImmutabilityPolicyObject ``` Remove-AzRmStorageContainerImmutabilityPolicy [-InputObject] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -155,6 +155,21 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerLegalHold.md b/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerLegalHold.md index 0174d697688e..1997499e5101 100644 --- a/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerLegalHold.md +++ b/src/Storage/Storage.Management/help/Remove-AzRmStorageContainerLegalHold.md @@ -15,21 +15,21 @@ Removes legal hold tags from a Storage blob container ### AccountName (Default) ``` Remove-AzRmStorageContainerLegalHold [-ResourceGroupName] [-StorageAccountName] - -Name -Tag [-DefaultProfile ] + -Name -Tag [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Remove-AzRmStorageContainerLegalHold -Name -StorageAccount -Tag - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ContainerObject ``` Remove-AzRmStorageContainerLegalHold -Container -Tag - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -107,6 +107,21 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Remove-AzRmStorageShare.md b/src/Storage/Storage.Management/help/Remove-AzRmStorageShare.md index a467239f22b9..8b510ad29770 100644 --- a/src/Storage/Storage.Management/help/Remove-AzRmStorageShare.md +++ b/src/Storage/Storage.Management/help/Remove-AzRmStorageShare.md @@ -16,41 +16,41 @@ Removes a Storage file share. ``` Remove-AzRmStorageShare [-ResourceGroupName] [-StorageAccountName] -Name [-Force] [-Include ] [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountNameSnapshot ``` Remove-AzRmStorageShare [-ResourceGroupName] [-StorageAccountName] -Name -SnapshotTime [-Force] [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Remove-AzRmStorageShare -Name -StorageAccount [-Force] [-Include ] - [-PassThru] [-DefaultProfile ] [-WhatIf] + [-PassThru] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObjectSnapshot ``` Remove-AzRmStorageShare -Name -StorageAccount -SnapshotTime [-Force] - [-PassThru] [-DefaultProfile ] [-WhatIf] + [-PassThru] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ShareResourceId ``` Remove-AzRmStorageShare [-ResourceId] [-Force] [-Include ] [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ShareObject ``` Remove-AzRmStorageShare -InputObject [-Force] [-Include ] [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -201,6 +201,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageAccount.md b/src/Storage/Storage.Management/help/Remove-AzStorageAccount.md index a2668c97f0c9..54a91ff35e81 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageAccount.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageAccount.md @@ -15,7 +15,7 @@ Removes a Storage account from Azure. ``` Remove-AzStorageAccount [-ResourceGroupName] [-Name] [-Force] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -91,6 +91,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Specifies the name of the resource group that contains the Storage account to remove. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageAccountManagementPolicy.md b/src/Storage/Storage.Management/help/Remove-AzStorageAccountManagementPolicy.md index 728871eaea41..4726927da3b1 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageAccountManagementPolicy.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageAccountManagementPolicy.md @@ -15,28 +15,28 @@ Removes the management policy of an Azure Storage account. ### AccountName (Default) ``` Remove-AzStorageAccountManagementPolicy [-ResourceGroupName] [-StorageAccountName] - [-PassThru] [-DefaultProfile ] [-WhatIf] + [-PassThru] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Remove-AzStorageAccountManagementPolicy -StorageAccount [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountResourceId ``` Remove-AzStorageAccountManagementPolicy [-StorageAccountResourceId] [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### PolicyObject ``` Remove-AzStorageAccountManagementPolicy [-InputObject] [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -100,6 +100,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageAccountNetworkRule.md b/src/Storage/Storage.Management/help/Remove-AzStorageAccountNetworkRule.md index ba0520c509c7..3fac6c0296f9 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageAccountNetworkRule.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageAccountNetworkRule.md @@ -16,13 +16,13 @@ Remove IpRules or VirtualNetworkRules from the NetWorkRule property of a Storage ``` Remove-AzStorageAccountNetworkRule [-ResourceGroupName] [-Name] -VirtualNetworkResourceId [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### IpRuleObject ``` Remove-AzStorageAccountNetworkRule [-ResourceGroupName] [-Name] -IPRule [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -30,27 +30,27 @@ Remove-AzStorageAccountNetworkRule [-ResourceGroupName] [-Name] [-Name] -VirtualNetworkRule [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceAccessRuleObject ``` Remove-AzStorageAccountNetworkRule [-ResourceGroupName] [-Name] -ResourceAccessRule [-AsJob] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### IpRuleString ``` Remove-AzStorageAccountNetworkRule [-ResourceGroupName] [-Name] -IPAddressOrRange - [-AsJob] [-DefaultProfile ] [-WhatIf] [-Confirm] + [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ResourceAccessRuleString ``` Remove-AzStorageAccountNetworkRule [-ResourceGroupName] [-Name] -TenantId - -ResourceId [-AsJob] [-DefaultProfile ] + -ResourceId [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -178,6 +178,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceAccessRule Storage Account NetworkRule ResourceAccessRules. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageBlob.md b/src/Storage/Storage.Management/help/Remove-AzStorageBlob.md index 913bfdb353d8..18b392937079 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageBlob.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageBlob.md @@ -18,7 +18,7 @@ Removes the specified storage blob. Remove-AzStorageBlob [-Blob] [-Container] [-DeleteSnapshot] [-SnapshotTime ] [-VersionId ] [-Force] [-PassThru] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -27,7 +27,7 @@ Remove-AzStorageBlob [-Blob] [-Container] [-DeleteSnapshot] [- Remove-AzStorageBlob -CloudBlob [-BlobBaseClient ] [-DeleteSnapshot] [-Force] [-PassThru] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ContainerPipeline @@ -35,7 +35,7 @@ Remove-AzStorageBlob -CloudBlob [-BlobBaseClient ] [ Remove-AzStorageBlob -CloudBlobContainer [-Blob] [-DeleteSnapshot] [-SnapshotTime ] [-VersionId ] [-Force] [-PassThru] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -273,6 +273,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the Azure profile for the cmdlet to read. If not specified, the cmdlet reads from the default profile. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageBlobImmutabilityPolicy.md b/src/Storage/Storage.Management/help/Remove-AzStorageBlobImmutabilityPolicy.md index d466ea4f7c24..8fbf45826751 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageBlobImmutabilityPolicy.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageBlobImmutabilityPolicy.md @@ -16,7 +16,7 @@ Removes ImmutabilityPolicy of a Storage blob. ``` Remove-AzStorageBlobImmutabilityPolicy [-Blob] [-Container] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,7 +24,7 @@ Remove-AzStorageBlobImmutabilityPolicy [-Blob] [-Container] [- ``` Remove-AzStorageBlobImmutabilityPolicy -BlobBaseClient [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -164,6 +164,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest The server time out for each request in seconds. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageBlobInventoryPolicy.md b/src/Storage/Storage.Management/help/Remove-AzStorageBlobInventoryPolicy.md index 15881595382f..048dd3d9c270 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageBlobInventoryPolicy.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageBlobInventoryPolicy.md @@ -15,28 +15,28 @@ Removes blob inventory policy from a Storage account. ### AccountName (Default) ``` Remove-AzStorageBlobInventoryPolicy [-ResourceGroupName] [-StorageAccountName] [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Remove-AzStorageBlobInventoryPolicy -StorageAccount [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountResourceId ``` Remove-AzStorageBlobInventoryPolicy [-StorageAccountResourceId] [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### PolicyObject ``` Remove-AzStorageBlobInventoryPolicy [-InputObject] [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -99,6 +99,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageCORSRule.md b/src/Storage/Storage.Management/help/Remove-AzStorageCORSRule.md index 5a29707da24f..42fcfd66de83 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageCORSRule.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageCORSRule.md @@ -16,7 +16,7 @@ Removes CORS for a Storage service. ``` Remove-AzStorageCORSRule [-ServiceType] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -103,6 +103,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageContainer.md b/src/Storage/Storage.Management/help/Remove-AzStorageContainer.md index 15b6e029fd44..0fd71495f64e 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageContainer.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageContainer.md @@ -16,7 +16,7 @@ Removes the specified storage container. ``` Remove-AzStorageContainer [-Name] [-Force] [-PassThru] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -147,6 +147,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the service side time-out interval, in seconds, for a request. If the specified interval elapses before the service processes the request, the storage service returns an error. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageContainerStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Remove-AzStorageContainerStoredAccessPolicy.md index b6d227c4d9aa..1a520b7cbba8 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageContainerStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageContainerStoredAccessPolicy.md @@ -16,7 +16,7 @@ Removes a stored access policy from an Azure storage container. ``` Remove-AzStorageContainerStoredAccessPolicy [-Container] [-Policy] [-PassThru] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -147,6 +147,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the client-side time-out interval, in seconds, for one service request. If the previous call fails in the specified interval, this cmdlet retries the request. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageDirectory.md b/src/Storage/Storage.Management/help/Remove-AzStorageDirectory.md index 597b58c8bbab..a0a39a976c27 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageDirectory.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageDirectory.md @@ -17,7 +17,7 @@ Deletes a directory. ``` Remove-AzStorageDirectory [-ShareName] [-Path] [-PassThru] [-DisAllowTrailingDot] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -25,7 +25,7 @@ Remove-AzStorageDirectory [-ShareName] [-Path] [-PassThru] [-D ``` Remove-AzStorageDirectory [-Share] [-ShareClient ] [-Path] [-PassThru] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -34,7 +34,7 @@ Remove-AzStorageDirectory [-Share] [-ShareClient ] Remove-AzStorageDirectory [-Directory] [-ShareDirectoryClient ] [[-Path] ] [-PassThru] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -197,6 +197,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageFile.md b/src/Storage/Storage.Management/help/Remove-AzStorageFile.md index b1fcbc8b712d..deb871f9c546 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageFile.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageFile.md @@ -17,7 +17,7 @@ Deletes a file. ``` Remove-AzStorageFile [-ShareName] [-Path] [-PassThru] [-DisAllowTrailingDot] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -25,7 +25,7 @@ Remove-AzStorageFile [-ShareName] [-Path] [-PassThru] [-DisAll ``` Remove-AzStorageFile [-Share] [-ShareClient ] [-Path] [-PassThru] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -34,14 +34,14 @@ Remove-AzStorageFile [-Share] [-ShareClient ] [-Pa Remove-AzStorageFile [-Directory] [-ShareDirectoryClient ] [-Path] [-PassThru] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### File ``` Remove-AzStorageFile [-File] [-ShareFileClient ] [-PassThru] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -214,6 +214,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageLocalUser.md b/src/Storage/Storage.Management/help/Remove-AzStorageLocalUser.md index 631ab313657f..12a09e6b17fe 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageLocalUser.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageLocalUser.md @@ -15,21 +15,21 @@ Removes a specified local user in a storage account. ### AccountName (Default) ``` Remove-AzStorageLocalUser [-ResourceGroupName] [-StorageAccountName] -UserName - [-PassThru] [-DefaultProfile ] [-WhatIf] + [-PassThru] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Remove-AzStorageLocalUser -StorageAccount -UserName [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UserObject ``` Remove-AzStorageLocalUser [-InputObject] [-PassThru] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -91,6 +91,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageObjectReplicationPolicy.md b/src/Storage/Storage.Management/help/Remove-AzStorageObjectReplicationPolicy.md index b88ddd37ea54..48f42674bc38 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageObjectReplicationPolicy.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageObjectReplicationPolicy.md @@ -15,21 +15,21 @@ Removes the specified object replication policy from a Storage account. ### AccountName (Default) ``` Remove-AzStorageObjectReplicationPolicy [-ResourceGroupName] [-StorageAccountName] - -PolicyId [-PassThru] [-DefaultProfile ] + -PolicyId [-PassThru] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Remove-AzStorageObjectReplicationPolicy -StorageAccount -PolicyId [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### PolicyObject ``` Remove-AzStorageObjectReplicationPolicy -InputObject [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -107,6 +107,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageQueue.md b/src/Storage/Storage.Management/help/Remove-AzStorageQueue.md index 8f8a60a3bfb2..557ffffe5145 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageQueue.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageQueue.md @@ -15,7 +15,7 @@ Removes a storage queue. ``` Remove-AzStorageQueue [-Name] [-Force] [-PassThru] [-Context ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -117,6 +117,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageQueueStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Remove-AzStorageQueueStoredAccessPolicy.md index 7e9f1dc03d04..ad8e5fba893d 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageQueueStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageQueueStoredAccessPolicy.md @@ -15,7 +15,7 @@ Removes a stored access policy from an Azure storage queue. ``` Remove-AzStorageQueueStoredAccessPolicy [-Queue] [-Policy] [-PassThru] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -95,6 +95,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Queue Specifies the Azure storage queue name. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageShare.md b/src/Storage/Storage.Management/help/Remove-AzStorageShare.md index 2326e74e1245..a89bc618c90b 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageShare.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageShare.md @@ -17,7 +17,7 @@ Deletes a file share. ``` Remove-AzStorageShare [-Name] [-IncludeAllSnapshot] [-SnapshotTime ] [-Force] [-PassThru] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -25,7 +25,7 @@ Remove-AzStorageShare [-Name] [-IncludeAllSnapshot] [-SnapshotTime [[-ShareClient] ] [-IncludeAllSnapshot] [-Force] [-PassThru] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -179,6 +179,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageShareStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Remove-AzStorageShareStoredAccessPolicy.md index 9b3a859ed801..23432c7710cf 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageShareStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageShareStoredAccessPolicy.md @@ -16,7 +16,7 @@ Removes a stored access policy from a Storage share. ``` Remove-AzStorageShareStoredAccessPolicy [-ShareName] [-Policy] [-PassThru] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -132,6 +132,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageTable.md b/src/Storage/Storage.Management/help/Remove-AzStorageTable.md index a4a3bc6e05d0..9c73563ad82f 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageTable.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageTable.md @@ -15,7 +15,7 @@ Removes a storage table. ``` Remove-AzStorageTable [-Name] [-Force] [-PassThru] [-Context ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -117,6 +117,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageTableStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Remove-AzStorageTableStoredAccessPolicy.md index d124c7ebf517..025bed61d747 100644 --- a/src/Storage/Storage.Management/help/Remove-AzStorageTableStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Remove-AzStorageTableStoredAccessPolicy.md @@ -15,7 +15,7 @@ Removes a stored access policy from an Azure storage table. ``` Remove-AzStorageTableStoredAccessPolicy [-Table] [-Policy] [-PassThru] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -95,6 +95,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Table Specifies the Azure table name. diff --git a/src/Storage/Storage.Management/help/Remove-AzStorageTaskAssignment.md b/src/Storage/Storage.Management/help/Remove-AzStorageTaskAssignment.md new file mode 100644 index 000000000000..213971a9ad8c --- /dev/null +++ b/src/Storage/Storage.Management/help/Remove-AzStorageTaskAssignment.md @@ -0,0 +1,323 @@ +--- +external help file: Az.Storage-help.xml +Module Name: Az.Storage +online version: https://learn.microsoft.com/powershell/module/az.storage/remove-azstoragetaskassignment +schema: 2.0.0 +--- + +# Remove-AzStorageTaskAssignment + +## SYNOPSIS +Delete the storage task assignment sub-resource + +## SYNTAX + +### Delete (Default) +``` +Remove-AzStorageTaskAssignment -AccountName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### DeleteViaIdentityStorageAccount +``` +Remove-AzStorageTaskAssignment -Name -StorageAccountInputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### DeleteViaIdentity +``` +Remove-AzStorageTaskAssignment -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Delete the storage task assignment sub-resource + +## EXAMPLES + +### EXAMPLE 1 +``` +Remove-AzStorageTaskAssignment -AccountName myaccount -ResourceGroupName myresourcegroup -Name mytaskassignment +``` + +## PARAMETERS + +### -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. + +```yaml +Type: String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: IStorageIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +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. + +```yaml +Type: String +Parameter Sets: Delete, DeleteViaIdentityStorageAccount +Aliases: StorageTaskAssignmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageAccountInputObject +Identity Parameter + +```yaml +Type: IStorageIdentity +Parameter Sets: DeleteViaIdentityStorageAccount +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## 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. + +## RELATED LINKS + +[https://learn.microsoft.com/powershell/module/az.storage/remove-azstoragetaskassignment](https://learn.microsoft.com/powershell/module/az.storage/remove-azstoragetaskassignment) + diff --git a/src/Storage/Storage.Management/help/Rename-AzStorageDirectory.md b/src/Storage/Storage.Management/help/Rename-AzStorageDirectory.md index 99e271f8efe1..d7eb4850d1a2 100644 --- a/src/Storage/Storage.Management/help/Rename-AzStorageDirectory.md +++ b/src/Storage/Storage.Management/help/Rename-AzStorageDirectory.md @@ -17,14 +17,14 @@ Renames a directory. Rename-AzStorageDirectory [-ShareName] [-SourcePath] [[-DestinationPath] ] [-Permission ] [-DisAllowSourceTrailingDot] [-DisAllowDestTrailingDot] [-Force] [-AsJob] [-Context ] [-DefaultProfile ] [-IgnoreReadonly] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ShareObject ``` Rename-AzStorageDirectory [-ShareClient] [-SourcePath] [[-DestinationPath] ] [-Permission ] [-Force] [-AsJob] [-Context ] - [-DefaultProfile ] [-IgnoreReadonly] [-WhatIf] + [-DefaultProfile ] [-IgnoreReadonly] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -32,7 +32,7 @@ Rename-AzStorageDirectory [-ShareClient] [-SourcePath] [[ ``` Rename-AzStorageDirectory [-ShareDirectoryClient] [[-DestinationPath] ] [-Permission ] [-Force] [-AsJob] [-Context ] - [-DefaultProfile ] [-IgnoreReadonly] [-WhatIf] + [-DefaultProfile ] [-IgnoreReadonly] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -212,6 +212,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ShareClient ShareClienr indicated the share where the directory would be listed. diff --git a/src/Storage/Storage.Management/help/Rename-AzStorageFile.md b/src/Storage/Storage.Management/help/Rename-AzStorageFile.md index d4b1e007425b..ea5d69587f15 100644 --- a/src/Storage/Storage.Management/help/Rename-AzStorageFile.md +++ b/src/Storage/Storage.Management/help/Rename-AzStorageFile.md @@ -17,14 +17,14 @@ Renames a file. Rename-AzStorageFile [-ShareName] [-SourcePath] [[-DestinationPath] ] [-ContentType ] [-Permission ] [-DisAllowSourceTrailingDot] [-DisAllowDestTrailingDot] [-Force] [-AsJob] [-Context ] [-DefaultProfile ] [-IgnoreReadonly] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### FileObject ``` Rename-AzStorageFile [-ShareFileClient] [[-DestinationPath] ] [-ContentType ] [-Permission ] [-Force] [-AsJob] [-Context ] - [-DefaultProfile ] [-IgnoreReadonly] [-WhatIf] + [-DefaultProfile ] [-IgnoreReadonly] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -32,7 +32,7 @@ Rename-AzStorageFile [-ShareFileClient] [[-DestinationPath] [-SourcePath] [[-DestinationPath] ] [-ContentType ] [-Permission ] [-Force] [-AsJob] [-Context ] - [-DefaultProfile ] [-IgnoreReadonly] [-WhatIf] + [-DefaultProfile ] [-IgnoreReadonly] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -41,7 +41,7 @@ Rename-AzStorageFile [-ShareClient] [-SourcePath] [[-Dest Rename-AzStorageFile [-ShareDirectoryClient] [-SourcePath] [[-DestinationPath] ] [-ContentType ] [-Permission ] [-Force] [-AsJob] [-Context ] [-DefaultProfile ] [-IgnoreReadonly] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -236,6 +236,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ShareClient ShareClient indicated the share where the file would be listed. diff --git a/src/Storage/Storage.Management/help/Restore-AzDataLakeGen2DeletedItem.md b/src/Storage/Storage.Management/help/Restore-AzDataLakeGen2DeletedItem.md index 95bdd85aec01..b45bf7380de0 100644 --- a/src/Storage/Storage.Management/help/Restore-AzDataLakeGen2DeletedItem.md +++ b/src/Storage/Storage.Management/help/Restore-AzDataLakeGen2DeletedItem.md @@ -15,14 +15,14 @@ Restores a deleted file or directory in a filesystem. ### ReceiveManual (Default) ``` Restore-AzDataLakeGen2DeletedItem [-FileSystem] [-Path] [-DeletionId] [-AsJob] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ItemPipeline ``` Restore-AzDataLakeGen2DeletedItem -InputObject [-AsJob] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -185,6 +185,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Storage/Storage.Management/help/Restore-AzRmStorageShare.md b/src/Storage/Storage.Management/help/Restore-AzRmStorageShare.md index 7d973a2de363..ba8761d37bba 100644 --- a/src/Storage/Storage.Management/help/Restore-AzRmStorageShare.md +++ b/src/Storage/Storage.Management/help/Restore-AzRmStorageShare.md @@ -15,21 +15,21 @@ Restores a deleted file share. ### AccountName (Default) ``` Restore-AzRmStorageShare [-ResourceGroupName] [-StorageAccountName] -Name - -DeletedShareVersion [-DefaultProfile ] + -DeletedShareVersion [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Restore-AzRmStorageShare -StorageAccount -Name -DeletedShareVersion - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ShareObject ``` Restore-AzRmStorageShare -InputObject [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -127,6 +127,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Restore-AzStorageBlobRange.md b/src/Storage/Storage.Management/help/Restore-AzStorageBlobRange.md index 1eae16d4bc7e..cddc5c3c099c 100644 --- a/src/Storage/Storage.Management/help/Restore-AzStorageBlobRange.md +++ b/src/Storage/Storage.Management/help/Restore-AzStorageBlobRange.md @@ -16,7 +16,7 @@ Restores a Storage account for specific blob ranges. ``` Restore-AzStorageBlobRange [-ResourceGroupName] [-StorageAccountName] -TimeToRestore [-BlobRestoreRange ] [-WaitForComplete] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,7 +24,7 @@ Restore-AzStorageBlobRange [-ResourceGroupName] [-StorageAccountName] < ``` Restore-AzStorageBlobRange [-ResourceId] -TimeToRestore [-BlobRestoreRange ] [-WaitForComplete] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -32,7 +32,7 @@ Restore-AzStorageBlobRange [-ResourceId] -TimeToRestore ``` Restore-AzStorageBlobRange -StorageAccount -TimeToRestore [-BlobRestoreRange ] [-WaitForComplete] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -146,6 +146,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Restore-AzStorageContainer.md b/src/Storage/Storage.Management/help/Restore-AzStorageContainer.md index 4fb7993215a7..3cb240b37e76 100644 --- a/src/Storage/Storage.Management/help/Restore-AzStorageContainer.md +++ b/src/Storage/Storage.Management/help/Restore-AzStorageContainer.md @@ -14,7 +14,7 @@ Restores a previously deleted Azure storage blob container. ``` Restore-AzStorageContainer [-Name] [-VersionId] [-Context ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -113,6 +113,21 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -VersionId The version of the previously deleted container. diff --git a/src/Storage/Storage.Management/help/Revoke-AzStorageAccountUserDelegationKeys.md b/src/Storage/Storage.Management/help/Revoke-AzStorageAccountUserDelegationKeys.md index 4647d81c1668..4223b595ab78 100644 --- a/src/Storage/Storage.Management/help/Revoke-AzStorageAccountUserDelegationKeys.md +++ b/src/Storage/Storage.Management/help/Revoke-AzStorageAccountUserDelegationKeys.md @@ -15,21 +15,21 @@ Revoke all User Delegation keys of a Storage account. ### AccountName (Default) ``` Revoke-AzStorageAccountUserDelegationKeys [-ResourceGroupName] [-StorageAccountName] - [-PassThru] [-DefaultProfile ] [-WhatIf] + [-PassThru] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Revoke-AzStorageAccountUserDelegationKeys -InputObject [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountResourceId ``` Revoke-AzStorageAccountUserDelegationKeys [-ResourceId] [-PassThru] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -92,6 +92,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The resource group name containing the storage account resource. diff --git a/src/Storage/Storage.Management/help/Set-AzCurrentStorageAccount.md b/src/Storage/Storage.Management/help/Set-AzCurrentStorageAccount.md index b124c86d0c5c..dfaa1c330c40 100644 --- a/src/Storage/Storage.Management/help/Set-AzCurrentStorageAccount.md +++ b/src/Storage/Storage.Management/help/Set-AzCurrentStorageAccount.md @@ -16,13 +16,13 @@ Modifies the current Storage account of the specified subscription. ### UsingResourceGroupAndNameParameterSet (Default) ``` Set-AzCurrentStorageAccount -ResourceGroupName -Name - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### UsingStorageContext ``` Set-AzCurrentStorageAccount -Context [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -86,6 +86,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Specifies the resource group that contains the Storage account to modify. diff --git a/src/Storage/Storage.Management/help/Set-AzDataLakeGen2AclRecursive.md b/src/Storage/Storage.Management/help/Set-AzDataLakeGen2AclRecursive.md index d9d47f322b58..c84abfab8b75 100644 --- a/src/Storage/Storage.Management/help/Set-AzDataLakeGen2AclRecursive.md +++ b/src/Storage/Storage.Management/help/Set-AzDataLakeGen2AclRecursive.md @@ -15,7 +15,7 @@ Set ACL recursively on the specified path. ``` Set-AzDataLakeGen2AclRecursive [-FileSystem] [[-Path] ] [-ContinuationToken ] -Acl [-ContinueOnFailure] [-BatchSize ] [-MaxBatchCount ] [-AsJob] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -303,6 +303,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Storage/Storage.Management/help/Set-AzDataLakeGen2ItemAclObject.md b/src/Storage/Storage.Management/help/Set-AzDataLakeGen2ItemAclObject.md index 1a42d352dc02..1fd48d37d793 100644 --- a/src/Storage/Storage.Management/help/Set-AzDataLakeGen2ItemAclObject.md +++ b/src/Storage/Storage.Management/help/Set-AzDataLakeGen2ItemAclObject.md @@ -15,7 +15,7 @@ Creates/Updates a DataLake gen2 item ACL object, which can be used in Update-AzD ``` Set-AzDataLakeGen2ItemAclObject [-EntityId ] [-DefaultScope] -Permission [-InputObject ] -AccessControlType - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -157,6 +157,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Storage/Storage.Management/help/Set-AzRmStorageContainerImmutabilityPolicy.md b/src/Storage/Storage.Management/help/Set-AzRmStorageContainerImmutabilityPolicy.md index ab7a23a69f9e..9a9c7e0acd05 100644 --- a/src/Storage/Storage.Management/help/Set-AzRmStorageContainerImmutabilityPolicy.md +++ b/src/Storage/Storage.Management/help/Set-AzRmStorageContainerImmutabilityPolicy.md @@ -17,14 +17,14 @@ Creates or updates ImmutabilityPolicy of a Storage blob containers Set-AzRmStorageContainerImmutabilityPolicy [-ResourceGroupName] [-StorageAccountName] -ContainerName [-ImmutabilityPeriod ] [-AllowProtectedAppendWriteAll ] [-AllowProtectedAppendWrite ] [-Etag ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ExtendAccountName ``` Set-AzRmStorageContainerImmutabilityPolicy [-ResourceGroupName] [-StorageAccountName] -ContainerName -ImmutabilityPeriod -Etag [-ExtendPolicy] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -32,7 +32,7 @@ Set-AzRmStorageContainerImmutabilityPolicy [-ResourceGroupName] [-Stora ``` Set-AzRmStorageContainerImmutabilityPolicy -ContainerName -StorageAccount [-ImmutabilityPeriod ] [-AllowProtectedAppendWriteAll ] [-AllowProtectedAppendWrite ] - [-Etag ] [-DefaultProfile ] [-WhatIf] + [-Etag ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -40,21 +40,21 @@ Set-AzRmStorageContainerImmutabilityPolicy -ContainerName -StorageAccou ``` Set-AzRmStorageContainerImmutabilityPolicy -ContainerName -StorageAccount -ImmutabilityPeriod -Etag [-ExtendPolicy] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ContainerObject ``` Set-AzRmStorageContainerImmutabilityPolicy -Container [-ImmutabilityPeriod ] [-AllowProtectedAppendWriteAll ] [-AllowProtectedAppendWrite ] [-Etag ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ExtendContainerObject ``` Set-AzRmStorageContainerImmutabilityPolicy -Container -ImmutabilityPeriod -Etag - [-ExtendPolicy] [-DefaultProfile ] [-WhatIf] + [-ExtendPolicy] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -62,14 +62,14 @@ Set-AzRmStorageContainerImmutabilityPolicy -Container -Immutabilit ``` Set-AzRmStorageContainerImmutabilityPolicy [-InputObject] [-ImmutabilityPeriod ] [-AllowProtectedAppendWriteAll ] [-AllowProtectedAppendWrite ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ExtendImmutabilityPolicyObject ``` Set-AzRmStorageContainerImmutabilityPolicy [-InputObject] -ImmutabilityPeriod - [-ExtendPolicy] [-DefaultProfile ] [-WhatIf] + [-ExtendPolicy] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -278,6 +278,21 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageAccount.md b/src/Storage/Storage.Management/help/Set-AzStorageAccount.md index 816b49c607d4..28ef39f0b632 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageAccount.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageAccount.md @@ -27,7 +27,7 @@ Set-AzStorageAccount [-ResourceGroupName] [-Name] [-Force] [-S [-DefaultSharePermission ] [-PublicNetworkAccess ] [-ImmutabilityPeriod ] [-AllowProtectedAppendWrite ] [-ImmutabilityPolicyState ] [-EnableSftp ] [-EnableLocalUser ] [-AllowedCopyScope ] [-AsJob] [-DefaultProfile ] - [-RoutingChoice ] [-WhatIf] [-Confirm] [] + [-RoutingChoice ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### KeyvaultEncryption @@ -45,7 +45,7 @@ Set-AzStorageAccount [-ResourceGroupName] [-Name] [-Force] [-S [-DefaultSharePermission ] [-PublicNetworkAccess ] [-ImmutabilityPeriod ] [-AllowProtectedAppendWrite ] [-ImmutabilityPolicyState ] [-EnableSftp ] [-EnableLocalUser ] [-AllowedCopyScope ] [-AsJob] [-DefaultProfile ] - [-RoutingChoice ] [-WhatIf] [-Confirm] [] + [-RoutingChoice ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AzureActiveDirectoryKerberosForFile @@ -62,7 +62,8 @@ Set-AzStorageAccount [-ResourceGroupName] [-Name] [-Force] [-S [-AllowCrossTenantReplication ] [-DefaultSharePermission ] [-PublicNetworkAccess ] [-ImmutabilityPeriod ] [-AllowProtectedAppendWrite ] [-ImmutabilityPolicyState ] [-EnableSftp ] [-EnableLocalUser ] [-AllowedCopyScope ] [-AsJob] - [-DefaultProfile ] [-RoutingChoice ] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-RoutingChoice ] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ### ActiveDirectoryDomainServicesForFile @@ -82,7 +83,8 @@ Set-AzStorageAccount [-ResourceGroupName] [-Name] [-Force] [-S [-AllowCrossTenantReplication ] [-DefaultSharePermission ] [-PublicNetworkAccess ] [-ImmutabilityPeriod ] [-AllowProtectedAppendWrite ] [-ImmutabilityPolicyState ] [-EnableSftp ] [-EnableLocalUser ] [-AllowedCopyScope ] [-AsJob] - [-DefaultProfile ] [-RoutingChoice ] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-RoutingChoice ] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -1041,7 +1043,7 @@ The minimum TLS version to be permitted on requests to storage. Type: System.String Parameter Sets: (All) Aliases: -Accepted values: TLS1_0, TLS1_1, TLS1_2 +Accepted values: TLS1_0, TLS1_1, TLS1_2, TLS1_3 Required: False Position: Named @@ -1080,6 +1082,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PublicNetworkAccess Allow or disallow public network access to Storage Account.Possible values include: 'Enabled', 'Disabled'. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageAccountManagementPolicy.md b/src/Storage/Storage.Management/help/Set-AzStorageAccountManagementPolicy.md index 4becc2d40038..b4f048580fec 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageAccountManagementPolicy.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageAccountManagementPolicy.md @@ -16,41 +16,41 @@ Creates or modifies the management policy of an Azure Storage account. ``` Set-AzStorageAccountManagementPolicy [-ResourceGroupName] [-StorageAccountName] -Rule [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountNamePolicyObject ``` Set-AzStorageAccountManagementPolicy [-ResourceGroupName] [-StorageAccountName] - -Policy [-DefaultProfile ] + -Policy [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObjectPolicyRule ``` Set-AzStorageAccountManagementPolicy -StorageAccount -Rule - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObjectPolicyObject ``` Set-AzStorageAccountManagementPolicy -StorageAccount -Policy - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountResourceIdPolicyRule ``` Set-AzStorageAccountManagementPolicy [-StorageAccountResourceId] -Rule - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountResourceIdPolicyObject ``` Set-AzStorageAccountManagementPolicy [-StorageAccountResourceId] -Policy - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -1257,3 +1257,167 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer +Parameter Sets: (All) +Aliases: AzContext, AzureRmContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Policy +Management Policy Object to Set + +```yaml +Type: Microsoft.Azure.Commands.Management.Storage.Models.PSManagementPolicy +Parameter Sets: AccountNamePolicyObject, AccountObjectPolicyObject, AccountResourceIdPolicyObject +Aliases: ManagementPolicy + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Resource Group Name. + +```yaml +Type: System.String +Parameter Sets: AccountNamePolicyRule, AccountNamePolicyObject +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Rule +The Management Policy rules. Get the object with New-AzStorageAccountManagementPolicyRule cmdlet. + +```yaml +Type: Microsoft.Azure.Commands.Management.Storage.Models.PSManagementPolicyRule[] +Parameter Sets: AccountNamePolicyRule, AccountObjectPolicyRule, AccountResourceIdPolicyRule +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -StorageAccount +Storage account object + +```yaml +Type: Microsoft.Azure.Commands.Management.Storage.Models.PSStorageAccount +Parameter Sets: AccountObjectPolicyRule, AccountObjectPolicyObject +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -StorageAccountName +Storage Account Name. + +```yaml +Type: System.String +Parameter Sets: AccountNamePolicyRule, AccountNamePolicyObject +Aliases: AccountName + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageAccountResourceId +Storage Account Resource Id. + +```yaml +Type: System.String +Parameter Sets: AccountResourceIdPolicyRule, AccountResourceIdPolicyObject +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +## RELATED LINKS diff --git a/src/Storage/Storage.Management/help/Set-AzStorageBlobContent.md b/src/Storage/Storage.Management/help/Set-AzStorageBlobContent.md index 24658ee9c24a..8a9ff11de0ed 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageBlobContent.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageBlobContent.md @@ -20,7 +20,7 @@ Set-AzStorageBlobContent [-File] [-Container] [-Blob ] [-PremiumPageBlobTier ] [-StandardBlobTier ] [-EncryptionScope ] [-Force] [-AsJob] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ContainerPipeline @@ -30,7 +30,7 @@ Set-AzStorageBlobContent [-File] [-Blob ] -CloudBlobContainer < [-PremiumPageBlobTier ] [-StandardBlobTier ] [-EncryptionScope ] [-Force] [-AsJob] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### BlobPipeline @@ -39,7 +39,7 @@ Set-AzStorageBlobContent [-File] -CloudBlob [-BlobType ] [-Tag ] [-PremiumPageBlobTier ] [-StandardBlobTier ] [-EncryptionScope ] [-Force] [-AsJob] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -382,6 +382,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Properties Specifies properties for the uploaded blob. The supported properties are: CacheControl, ContentDisposition, ContentEncoding, ContentLanguage, ContentMD5, ContentType. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageBlobImmutabilityPolicy.md b/src/Storage/Storage.Management/help/Set-AzStorageBlobImmutabilityPolicy.md index aef6b6866bd7..aca2e5e11a1f 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageBlobImmutabilityPolicy.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageBlobImmutabilityPolicy.md @@ -17,7 +17,7 @@ Creates or updates ImmutabilityPolicy of a Storage blob. Set-AzStorageBlobImmutabilityPolicy [-Blob] [-Container] -ExpiresOn [-PolicyMode ] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -26,7 +26,7 @@ Set-AzStorageBlobImmutabilityPolicy [-Blob] [-Container] -Expi Set-AzStorageBlobImmutabilityPolicy -BlobBaseClient -ExpiresOn [-PolicyMode ] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -200,6 +200,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest The server time out for each request in seconds. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageBlobInventoryPolicy.md b/src/Storage/Storage.Management/help/Set-AzStorageBlobInventoryPolicy.md index 2bb53d6871e6..9e3540a47f6b 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageBlobInventoryPolicy.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageBlobInventoryPolicy.md @@ -16,41 +16,41 @@ Creates or updates blob inventory policy in a Storage account. ``` Set-AzStorageBlobInventoryPolicy [-ResourceGroupName] [-StorageAccountName] -Rule [-Disabled] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountNamePolicyObject ``` Set-AzStorageBlobInventoryPolicy [-ResourceGroupName] [-StorageAccountName] -Policy [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObjectPolicyRule ``` Set-AzStorageBlobInventoryPolicy -StorageAccount -Rule - [-Disabled] [-DefaultProfile ] [-WhatIf] + [-Disabled] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObjectPolicyObject ``` Set-AzStorageBlobInventoryPolicy -StorageAccount -Policy - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountResourceIdPolicyRule ``` Set-AzStorageBlobInventoryPolicy [-StorageAccountResourceId] -Rule - [-Disabled] [-DefaultProfile ] [-WhatIf] + [-Disabled] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountResourceIdPolicyObject ``` Set-AzStorageBlobInventoryPolicy [-StorageAccountResourceId] -Policy - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -239,6 +239,21 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageBlobLegalHold.md b/src/Storage/Storage.Management/help/Set-AzStorageBlobLegalHold.md index 1047fcddc368..9e1b07f8105b 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageBlobLegalHold.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageBlobLegalHold.md @@ -16,7 +16,7 @@ Enables or disables legal hold on a Storage blob. ``` Set-AzStorageBlobLegalHold [-Blob] [-Container] [-EnableLegalHold] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,7 +24,7 @@ Set-AzStorageBlobLegalHold [-Blob] [-Container] [-EnableLegalH ``` Set-AzStorageBlobLegalHold -BlobBaseClient [-EnableLegalHold] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -32,7 +32,7 @@ Set-AzStorageBlobLegalHold -BlobBaseClient [-EnableLegalHold] [ ``` Set-AzStorageBlobLegalHold -BlobBaseClient [-DisableLegalHold] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -40,7 +40,7 @@ Set-AzStorageBlobLegalHold -BlobBaseClient [-DisableLegalHold] ``` Set-AzStorageBlobLegalHold [-Blob] [-Container] [-DisableLegalHold] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -232,6 +232,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest The server time out for each request in seconds. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageBlobTag.md b/src/Storage/Storage.Management/help/Set-AzStorageBlobTag.md index 74ea4b677649..f53437d8fc23 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageBlobTag.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageBlobTag.md @@ -16,7 +16,7 @@ Set blob tags of a specific blob. ``` Set-AzStorageBlobTag [-Blob] [-Container] -Tag [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,7 +24,7 @@ Set-AzStorageBlobTag [-Blob] [-Container] -Tag [-T ``` Set-AzStorageBlobTag -BlobBaseClient -Tag [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -33,7 +33,7 @@ Set-AzStorageBlobTag -BlobBaseClient -Tag [-TagCond Set-AzStorageBlobTag -CloudBlobContainer [-Blob] -Tag [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -193,6 +193,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest The server time out for each request in seconds. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageCORSRule.md b/src/Storage/Storage.Management/help/Set-AzStorageCORSRule.md index 7510170a60d6..6191c92f5b8d 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageCORSRule.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageCORSRule.md @@ -16,7 +16,7 @@ Sets the CORS rules for a type of Storage service. ``` Set-AzStorageCORSRule [-ServiceType] -CorsRules [-PassThru] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -164,6 +164,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageContainerAcl.md b/src/Storage/Storage.Management/help/Set-AzStorageContainerAcl.md index 382526a08fb4..1fec1a8eee98 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageContainerAcl.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageContainerAcl.md @@ -16,7 +16,7 @@ Sets the public access permission to a storage container. ``` Set-AzStorageContainerAcl [-Name] [-Permission] [-PassThru] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -167,6 +167,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the service side time-out interval, in seconds, for a request. If the specified interval elapses before the service processes the request, the storage service returns an error. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageContainerStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Set-AzStorageContainerStoredAccessPolicy.md index f39fb479a218..92305f333eec 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageContainerStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageContainerStoredAccessPolicy.md @@ -17,7 +17,7 @@ Sets a stored access policy for an Azure storage container. Set-AzStorageContainerStoredAccessPolicy [-Container] [-Policy] [-Permission ] [-StartTime ] [-ExpiryTime ] [-NoStartTime] [-NoExpiryTime] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -193,6 +193,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the client-side time-out interval, in seconds, for one service request. If the previous call fails in the specified interval, this cmdlet retries the request. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageFileContent.md b/src/Storage/Storage.Management/help/Set-AzStorageFileContent.md index 566869f680f3..0768ee884615 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageFileContent.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageFileContent.md @@ -18,7 +18,7 @@ Uploads the contents of a file. Set-AzStorageFileContent [-ShareName] [-Source] [[-Path] ] [-PassThru] [-Force] [-AsJob] [-DisAllowTrailingDot] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [-PreserveSMBAttribute] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [-PreserveSMBAttribute] [] ``` ### Share @@ -26,7 +26,7 @@ Set-AzStorageFileContent [-ShareName] [-Source] [[-Path] [-ShareClient ] [-Source] [[-Path] ] [-PassThru] [-Force] [-AsJob] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [-PreserveSMBAttribute] [] ``` @@ -35,7 +35,7 @@ Set-AzStorageFileContent [-Share] [-ShareClient ] Set-AzStorageFileContent [-Directory] [-ShareDirectoryClient ] [-Source] [[-Path] ] [-PassThru] [-Force] [-AsJob] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [-PreserveSMBAttribute] [] ``` @@ -260,6 +260,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageLocalUser.md b/src/Storage/Storage.Management/help/Set-AzStorageLocalUser.md index 87d8087be306..4348bca6319f 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageLocalUser.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageLocalUser.md @@ -17,8 +17,8 @@ Creates or updates a specified local user in a storage account. Set-AzStorageLocalUser [-ResourceGroupName] [-StorageAccountName] -UserName [-HomeDirectory ] [-SshAuthorizedKey ] [-PermissionScope ] [-HasSharedKey ] [-HasSshKey ] [-HasSshPassword ] [-GroupId ] - [-AllowAclAuthorization ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] + [-AllowAclAuthorization ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject @@ -26,7 +26,8 @@ Set-AzStorageLocalUser [-ResourceGroupName] [-StorageAccountName] -UserName [-HomeDirectory ] [-SshAuthorizedKey ] [-PermissionScope ] [-HasSharedKey ] [-HasSshKey ] [-HasSshPassword ] [-GroupId ] [-AllowAclAuthorization ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -230,6 +231,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageObjectReplicationPolicy.md b/src/Storage/Storage.Management/help/Set-AzStorageObjectReplicationPolicy.md index 010ccab271a5..5cd98d8c67a1 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageObjectReplicationPolicy.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageObjectReplicationPolicy.md @@ -17,21 +17,21 @@ Creates or updates the specified object replication policy in a Storage account. Set-AzStorageObjectReplicationPolicy [-ResourceGroupName] [-StorageAccountName] [-PolicyId ] -SourceAccount [-DestinationAccount ] -Rule [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### PolicyObject ``` Set-AzStorageObjectReplicationPolicy [-ResourceGroupName] [-StorageAccountName] -InputObject [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Set-AzStorageObjectReplicationPolicy -StorageAccount [-PolicyId ] -SourceAccount [-DestinationAccount ] -Rule - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -134,6 +134,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageQueueStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Set-AzStorageQueueStoredAccessPolicy.md index daa77688db0d..6090d4dad6c3 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageQueueStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageQueueStoredAccessPolicy.md @@ -16,7 +16,7 @@ Sets a stored access policy for an Azure storage queue. ``` Set-AzStorageQueueStoredAccessPolicy [-Queue] [-Policy] [-Permission ] [-StartTime ] [-ExpiryTime ] [-NoStartTime] [-NoExpiryTime] [-Context ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -141,6 +141,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Queue Specifies the Azure storage queue name. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageServiceLoggingProperty.md b/src/Storage/Storage.Management/help/Set-AzStorageServiceLoggingProperty.md index 850e7aa6b30a..c3c6723fac61 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageServiceLoggingProperty.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageServiceLoggingProperty.md @@ -16,7 +16,7 @@ Modifies logging for Azure Storage services. ``` Set-AzStorageServiceLoggingProperty [-ServiceType] [-Version ] [-RetentionDays ] [-LoggingOperations ] [-PassThru] [-Context ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -105,6 +105,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RetentionDays Specifies the number of days that the Azure Storage service retains logged information. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageServiceMetricsProperty.md b/src/Storage/Storage.Management/help/Set-AzStorageServiceMetricsProperty.md index d5ded9b7ae19..6f8e064bd800 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageServiceMetricsProperty.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageServiceMetricsProperty.md @@ -16,7 +16,7 @@ Modifies metrics properties for the Azure Storage service. ``` Set-AzStorageServiceMetricsProperty [-ServiceType] [-MetricsType] [-Version ] [-RetentionDays ] [-MetricsLevel ] [-PassThru] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [] ``` @@ -121,6 +121,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RetentionDays Specifies the number of days that the Azure Storage service retains metrics information. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageShareQuota.md b/src/Storage/Storage.Management/help/Set-AzStorageShareQuota.md index d5e44d5f1248..0eab52c1fd4e 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageShareQuota.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageShareQuota.md @@ -17,7 +17,7 @@ Sets the storage capacity for a share. ``` Set-AzStorageShareQuota [-ShareName] [-Quota] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -25,7 +25,7 @@ Set-AzStorageShareQuota [-ShareName] [-Quota] [-Context [-Quota] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [] ``` @@ -110,6 +110,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Quota Specifies the quota value in gigabytes (GB). See the quota limitation in https://learn.microsoft.com/azure/azure-subscription-service-limits#azure-files-limits. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageShareStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Set-AzStorageShareStoredAccessPolicy.md index f381bca0f859..ae4e01306240 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageShareStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageShareStoredAccessPolicy.md @@ -17,7 +17,7 @@ Updates a stored access policy on a Storage share. Set-AzStorageShareStoredAccessPolicy [-ShareName] [-Policy] [-Permission ] [-StartTime ] [-ExpiryTime ] [-NoStartTime] [-NoExpiryTime] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -178,6 +178,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/Set-AzStorageTableStoredAccessPolicy.md b/src/Storage/Storage.Management/help/Set-AzStorageTableStoredAccessPolicy.md index e29b7ef07857..0e1f6f51b223 100644 --- a/src/Storage/Storage.Management/help/Set-AzStorageTableStoredAccessPolicy.md +++ b/src/Storage/Storage.Management/help/Set-AzStorageTableStoredAccessPolicy.md @@ -16,7 +16,7 @@ Sets the stored access policy for an Azure storage table. ``` Set-AzStorageTableStoredAccessPolicy [-Table] [-Policy] [-Permission ] [-StartTime ] [-ExpiryTime ] [-NoStartTime] [-NoExpiryTime] [-Context ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -141,6 +141,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -StartTime Specifies the time at which the stored access policy becomes valid. diff --git a/src/Storage/Storage.Management/help/Start-AzStorageAccountMigration.md b/src/Storage/Storage.Management/help/Start-AzStorageAccountMigration.md index 04680fe7d044..78b9d1cad557 100644 --- a/src/Storage/Storage.Management/help/Start-AzStorageAccountMigration.md +++ b/src/Storage/Storage.Management/help/Start-AzStorageAccountMigration.md @@ -18,28 +18,28 @@ Zone-redundant storage (ZRS) replicates your storage account synchronously acros ``` Start-AzStorageAccountMigration -AccountName -ResourceGroupName [-SubscriptionId ] -TargetSku [-Name ] [-Type ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-WhatIf] [-Confirm] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CustomerViaJsonString ``` Start-AzStorageAccountMigration -AccountName -ResourceGroupName [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CustomerViaJsonFilePath ``` Start-AzStorageAccountMigration -AccountName -ResourceGroupName [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CustomerViaIdentityExpanded ``` Start-AzStorageAccountMigration -InputObject -TargetSku [-Name ] [-Type ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -223,6 +223,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group within the user's subscription. The name is case insensitive. diff --git a/src/Storage/Storage.Management/help/Start-AzStorageBlobCopy.md b/src/Storage/Storage.Management/help/Start-AzStorageBlobCopy.md index a5420f7e229b..15ff1734a843 100644 --- a/src/Storage/Storage.Management/help/Start-AzStorageBlobCopy.md +++ b/src/Storage/Storage.Management/help/Start-AzStorageBlobCopy.md @@ -20,7 +20,7 @@ Start-AzStorageBlobCopy [-SrcBlob] -SrcContainer -DestContaine [-RehydratePriority ] [-Tag ] [-Context ] [-DestContext ] [-DestTagCondition ] [-TagCondition ] [-Force] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -31,7 +31,7 @@ Start-AzStorageBlobCopy -CloudBlob [-BlobBaseClient [-RehydratePriority ] [-Tag ] [-Context ] [-DestContext ] [-DestTagCondition ] [-TagCondition ] [-Force] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -42,7 +42,7 @@ Start-AzStorageBlobCopy -CloudBlob [-BlobBaseClient [-RehydratePriority ] [-Tag ] [-Context ] [-DestContext ] [-DestTagCondition ] [-TagCondition ] [-Force] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -53,7 +53,7 @@ Start-AzStorageBlobCopy -CloudBlobContainer [-SrcBlob] ] [-Tag ] [-Context ] [-DestContext ] [-DestTagCondition ] [-TagCondition ] [-Force] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -63,7 +63,7 @@ Start-AzStorageBlobCopy -SrcShareName -SrcFilePath -DestContai [-DestBlob ] [-StandardBlobTier ] [-RehydratePriority ] [-Tag ] [-Context ] [-DestContext ] [-DestTagCondition ] [-Force] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -73,7 +73,7 @@ Start-AzStorageBlobCopy -SrcShare -SrcFilePath -DestCo [-DestBlob ] [-StandardBlobTier ] [-RehydratePriority ] [-Tag ] [-Context ] [-DestContext ] [-DestTagCondition ] [-Force] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -83,7 +83,7 @@ Start-AzStorageBlobCopy -SrcDir -SrcFilePath -Dest [-DestBlob ] [-StandardBlobTier ] [-RehydratePriority ] [-Tag ] [-Context ] [-DestContext ] [-DestTagCondition ] [-Force] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -93,7 +93,7 @@ Start-AzStorageBlobCopy -SrcFile -DestContainer [-DestBlob [-StandardBlobTier ] [-RehydratePriority ] [-Tag ] [-Context ] [-DestContext ] [-DestTagCondition ] [-Force] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -103,8 +103,8 @@ Start-AzStorageBlobCopy -SrcFile -DestCloudBlob [-Standa [-RehydratePriority ] [-Tag ] [-Context ] [-DestContext ] [-DestTagCondition ] [-Force] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] [-WhatIf] [-Confirm] - [] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ### UriPipeline @@ -114,7 +114,7 @@ Start-AzStorageBlobCopy -AbsoluteUri -DestContainer -DestBlob [-Context ] [-DestContext ] [-DestTagCondition ] [-TagCondition ] [-Force] [-AsJob] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -483,6 +483,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RehydratePriority Block Blob RehydratePriority. Indicates the priority with which to rehydrate an archived blob. Valid values are High/Standard. diff --git a/src/Storage/Storage.Management/help/Start-AzStorageBlobIncrementalCopy.md b/src/Storage/Storage.Management/help/Start-AzStorageBlobIncrementalCopy.md index 96e005203baf..dd2a3b0470ad 100644 --- a/src/Storage/Storage.Management/help/Start-AzStorageBlobIncrementalCopy.md +++ b/src/Storage/Storage.Management/help/Start-AzStorageBlobIncrementalCopy.md @@ -18,7 +18,7 @@ Start-AzStorageBlobIncrementalCopy -CloudBlobContainer -Src -SrcBlobSnapshotTime -DestContainer [-DestBlob ] [-Context ] [-DestContext ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### BlobInstance @@ -26,7 +26,7 @@ Start-AzStorageBlobIncrementalCopy -CloudBlobContainer -Src Start-AzStorageBlobIncrementalCopy -CloudBlob -DestContainer [-DestBlob ] [-Context ] [-DestContext ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### BlobInstanceToBlobInstance @@ -34,7 +34,7 @@ Start-AzStorageBlobIncrementalCopy -CloudBlob -DestContainer -DestCloudBlob [-Context ] [-DestContext ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ContainerName @@ -43,7 +43,7 @@ Start-AzStorageBlobIncrementalCopy -SrcBlob -SrcContainer -SrcBlobSnapshotTime -DestContainer [-DestBlob ] [-Context ] [-DestContext ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UriPipeline @@ -51,7 +51,7 @@ Start-AzStorageBlobIncrementalCopy -SrcBlob -SrcContainer Start-AzStorageBlobIncrementalCopy -AbsoluteUri -DestContainer -DestBlob [-Context ] [-DestContext ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -281,6 +281,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest The server time out for each request in seconds. diff --git a/src/Storage/Storage.Management/help/Start-AzStorageFileCopy.md b/src/Storage/Storage.Management/help/Start-AzStorageFileCopy.md index 6216c51b33e1..8d86b6da8cdc 100644 --- a/src/Storage/Storage.Management/help/Start-AzStorageFileCopy.md +++ b/src/Storage/Storage.Management/help/Start-AzStorageFileCopy.md @@ -18,7 +18,7 @@ Starts to copy a source file. Start-AzStorageFileCopy -SrcBlobName -SrcContainerName -DestShareName -DestFilePath [-Context ] [-DestContext ] [-DisAllowDestTrailingDot] [-Force] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -27,7 +27,7 @@ Start-AzStorageFileCopy -SrcBlobName -SrcContainerName -DestSh Start-AzStorageFileCopy -SrcBlobName -SrcContainer -DestShareName -DestFilePath [-DestContext ] [-Force] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### BlobInstanceFilePath @@ -35,7 +35,7 @@ Start-AzStorageFileCopy -SrcBlobName -SrcContainer Start-AzStorageFileCopy -SrcBlob -DestShareName -DestFilePath [-DestContext ] [-Force] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### BlobInstanceFileInstance @@ -43,7 +43,7 @@ Start-AzStorageFileCopy -SrcBlob -DestShareName -DestFilePa Start-AzStorageFileCopy -SrcBlob [-DestFile ] [-DestShareFileClient ] [-DestContext ] [-Force] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ShareName @@ -52,7 +52,7 @@ Start-AzStorageFileCopy -SrcFilePath -SrcShareName -DestShareN -DestFilePath [-Context ] [-DestContext ] [-DisAllowSourceTrailingDot] [-DisAllowDestTrailingDot] [-Force] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ShareInstance @@ -60,7 +60,7 @@ Start-AzStorageFileCopy -SrcFilePath -SrcShareName -DestShareN Start-AzStorageFileCopy -SrcFilePath -SrcShare -DestShareName -DestFilePath [-DestContext ] [-Force] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### FileInstanceToFilePath @@ -68,7 +68,7 @@ Start-AzStorageFileCopy -SrcFilePath -SrcShare -DestSh Start-AzStorageFileCopy -SrcFile -DestShareName -DestFilePath [-DestContext ] [-Force] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### FileInstanceToFileInstance @@ -76,7 +76,7 @@ Start-AzStorageFileCopy -SrcFile -DestShareName -DestFilePa Start-AzStorageFileCopy -SrcFile [-DestFile ] [-DestShareFileClient ] [-DestContext ] [-Force] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UriToFilePath @@ -84,7 +84,7 @@ Start-AzStorageFileCopy -SrcFile [-DestFile ] [-DestShare Start-AzStorageFileCopy -AbsoluteUri -DestShareName -DestFilePath [-DestContext ] [-Force] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UriToFileInstance @@ -92,7 +92,7 @@ Start-AzStorageFileCopy -AbsoluteUri -DestShareName -DestFileP Start-AzStorageFileCopy -AbsoluteUri [-DestFile ] [-DestShareFileClient ] [-DestContext ] [-Force] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -324,6 +324,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/Stop-AzStorageAccountHierarchicalNamespaceUpgrade.md b/src/Storage/Storage.Management/help/Stop-AzStorageAccountHierarchicalNamespaceUpgrade.md index 5ba6ca71da3e..f451091437dc 100644 --- a/src/Storage/Storage.Management/help/Stop-AzStorageAccountHierarchicalNamespaceUpgrade.md +++ b/src/Storage/Storage.Management/help/Stop-AzStorageAccountHierarchicalNamespaceUpgrade.md @@ -15,14 +15,14 @@ Aborts an ongoing HierarchicalNamespace upgrade task on a storage account. ### AccountName (Default) ``` Stop-AzStorageAccountHierarchicalNamespaceUpgrade [-ResourceGroupName] [-Name] [-Force] - [-PassThru] [-AsJob] [-DefaultProfile ] [-WhatIf] + [-PassThru] [-AsJob] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Stop-AzStorageAccountHierarchicalNamespaceUpgrade -InputObject [-Force] [-PassThru] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -135,6 +135,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Stop-AzStorageBlobCopy.md b/src/Storage/Storage.Management/help/Stop-AzStorageBlobCopy.md index 7d8b130c437a..9c8e4a41c579 100644 --- a/src/Storage/Storage.Management/help/Stop-AzStorageBlobCopy.md +++ b/src/Storage/Storage.Management/help/Stop-AzStorageBlobCopy.md @@ -18,14 +18,14 @@ Stops a copy operation. Stop-AzStorageBlobCopy [-Blob] [-Container] [-Force] [-CopyId ] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### BlobPipeline ``` Stop-AzStorageBlobCopy -CloudBlob [-Force] [-CopyId ] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -34,7 +34,7 @@ Stop-AzStorageBlobCopy -CloudBlob [-Force] [-CopyId ] [-TagC Stop-AzStorageBlobCopy -CloudBlobContainer [-Blob] [-Force] [-CopyId ] [-TagCondition ] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -224,6 +224,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the service side time-out interval, in seconds, for a request. If the specified interval elapses before the service processes the request, the storage service returns an error. diff --git a/src/Storage/Storage.Management/help/Stop-AzStorageFileCopy.md b/src/Storage/Storage.Management/help/Stop-AzStorageFileCopy.md index 4fcab85424c8..adb44e488fd6 100644 --- a/src/Storage/Storage.Management/help/Stop-AzStorageFileCopy.md +++ b/src/Storage/Storage.Management/help/Stop-AzStorageFileCopy.md @@ -18,14 +18,14 @@ Stops a copy operation to the specified destination file. Stop-AzStorageFileCopy [-ShareName] [-FilePath] [-CopyId ] [-Force] [-DisAllowTrailingDot] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] [-DefaultProfile ] [-ConcurrentTaskCount ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### File ``` Stop-AzStorageFileCopy [-File] [-ShareFileClient ] [-CopyId ] [-Force] [-Context ] [-ServerTimeoutPerRequest ] [-ClientTimeoutPerRequest ] - [-DefaultProfile ] [-ConcurrentTaskCount ] + [-DefaultProfile ] [-ConcurrentTaskCount ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -186,6 +186,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServerTimeoutPerRequest Specifies the length of the time-out period for the server part of a request. diff --git a/src/Storage/Storage.Management/help/Update-AzDataLakeGen2AclRecursive.md b/src/Storage/Storage.Management/help/Update-AzDataLakeGen2AclRecursive.md index ff36a69fbdb6..51aeced0b473 100644 --- a/src/Storage/Storage.Management/help/Update-AzDataLakeGen2AclRecursive.md +++ b/src/Storage/Storage.Management/help/Update-AzDataLakeGen2AclRecursive.md @@ -15,7 +15,7 @@ Update ACL recursively on the specified path. ``` Update-AzDataLakeGen2AclRecursive [-FileSystem] [[-Path] ] [-ContinuationToken ] -Acl [-ContinueOnFailure] [-BatchSize ] [-MaxBatchCount ] [-AsJob] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -307,6 +307,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Storage/Storage.Management/help/Update-AzDataLakeGen2Item.md b/src/Storage/Storage.Management/help/Update-AzDataLakeGen2Item.md index a8c317872c4b..9b8803afbb2a 100644 --- a/src/Storage/Storage.Management/help/Update-AzDataLakeGen2Item.md +++ b/src/Storage/Storage.Management/help/Update-AzDataLakeGen2Item.md @@ -16,7 +16,7 @@ Update a file or directory on properties, metadata, permission, ACL, and owner. ``` Update-AzDataLakeGen2Item [-FileSystem] [-Path ] [-Permission ] [-Owner ] [-Group ] [-Property ] [-Metadata ] [-Acl ] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,7 +24,7 @@ Update-AzDataLakeGen2Item [-FileSystem] [-Path ] [-Permission < ``` Update-AzDataLakeGen2Item -InputObject [-Permission ] [-Owner ] [-Group ] [-Property ] [-Metadata ] [-Acl ] - [-Context ] [-DefaultProfile ] + [-Context ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -312,6 +312,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Property Specifies properties for the directory or file. The supported properties for file are: CacheControl, ContentDisposition, ContentEncoding, ContentLanguage, ContentMD5, ContentType. diff --git a/src/Storage/Storage.Management/help/Update-AzRmStorageContainer.md b/src/Storage/Storage.Management/help/Update-AzRmStorageContainer.md index d24ab7dfb483..91d1b0d3a262 100644 --- a/src/Storage/Storage.Management/help/Update-AzRmStorageContainer.md +++ b/src/Storage/Storage.Management/help/Update-AzRmStorageContainer.md @@ -16,7 +16,7 @@ Modifies a Storage blob container ``` Update-AzRmStorageContainer [-ResourceGroupName] [-StorageAccountName] -Name [-PublicAccess ] [-Metadata ] [-RootSquash ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,13 +24,13 @@ Update-AzRmStorageContainer [-ResourceGroupName] [-StorageAccountName] ``` Update-AzRmStorageContainer -Name -StorageAccount [-PublicAccess ] [-Metadata ] [-RootSquash ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ContainerObject ``` Update-AzRmStorageContainer -InputObject [-PublicAccess ] [-Metadata ] - [-RootSquash ] [-DefaultProfile ] + [-RootSquash ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -139,6 +139,21 @@ Accept pipeline input: True (ByPropertyName, ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PublicAccess Container PublicAccess diff --git a/src/Storage/Storage.Management/help/Update-AzRmStorageShare.md b/src/Storage/Storage.Management/help/Update-AzRmStorageShare.md index d971a1426ba6..c9f2fe6ea92e 100644 --- a/src/Storage/Storage.Management/help/Update-AzRmStorageShare.md +++ b/src/Storage/Storage.Management/help/Update-AzRmStorageShare.md @@ -16,7 +16,7 @@ Modifies a Storage file share. ``` Update-AzRmStorageShare [-ResourceGroupName] [-StorageAccountName] -Name [-QuotaGiB ] [-Metadata ] [-RootSquash ] [-AccessTier ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,22 +24,22 @@ Update-AzRmStorageShare [-ResourceGroupName] [-StorageAccountName] -StorageAccount [-QuotaGiB ] [-Metadata ] [-RootSquash ] [-AccessTier ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ShareResourceId ``` Update-AzRmStorageShare [-ResourceId] [-QuotaGiB ] [-Metadata ] - [-AccessTier ] [-RootSquash ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-RootSquash ] [-AccessTier ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ShareObject ``` Update-AzRmStorageShare -InputObject [-QuotaGiB ] [-Metadata ] - [-AccessTier ] [-RootSquash ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-RootSquash ] [-AccessTier ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -210,6 +210,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -QuotaGiB Share Quota in Gibibyte. diff --git a/src/Storage/Storage.Management/help/Update-AzStorageAccountNetworkRuleSet.md b/src/Storage/Storage.Management/help/Update-AzStorageAccountNetworkRuleSet.md index 468bc83ceeff..5ae6d82b8322 100644 --- a/src/Storage/Storage.Management/help/Update-AzStorageAccountNetworkRuleSet.md +++ b/src/Storage/Storage.Management/help/Update-AzStorageAccountNetworkRuleSet.md @@ -16,7 +16,7 @@ Update the NetworkRule property of a Storage account Update-AzStorageAccountNetworkRuleSet [-ResourceGroupName] [-Name] [-Bypass ] [-DefaultAction ] [-IPRule ] [-VirtualNetworkRule ] [-ResourceAccessRule ] [-AsJob] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -149,6 +149,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceAccessRule Storage Account NetworkRule ResourceAccessRules. diff --git a/src/Storage/Storage.Management/help/Update-AzStorageBlobServiceProperty.md b/src/Storage/Storage.Management/help/Update-AzStorageBlobServiceProperty.md index 8dcb2456e36d..b7ee615ad05a 100644 --- a/src/Storage/Storage.Management/help/Update-AzStorageBlobServiceProperty.md +++ b/src/Storage/Storage.Management/help/Update-AzStorageBlobServiceProperty.md @@ -17,14 +17,14 @@ Modifies the service properties for the Azure Storage Blob service. Update-AzStorageBlobServiceProperty [-ResourceGroupName] [-StorageAccountName] [-DefaultServiceVersion ] [-EnableChangeFeed ] [-ChangeFeedRetentionInDays ] [-IsVersioningEnabled ] [-CorsRule ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObject ``` Update-AzStorageBlobServiceProperty -StorageAccount [-DefaultServiceVersion ] [-EnableChangeFeed ] [-ChangeFeedRetentionInDays ] [-IsVersioningEnabled ] - [-CorsRule ] [-DefaultProfile ] + [-CorsRule ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -32,7 +32,7 @@ Update-AzStorageBlobServiceProperty -StorageAccount [-Default ``` Update-AzStorageBlobServiceProperty [-ResourceId] [-DefaultServiceVersion ] [-EnableChangeFeed ] [-ChangeFeedRetentionInDays ] [-IsVersioningEnabled ] - [-CorsRule ] [-DefaultProfile ] + [-CorsRule ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -243,6 +243,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Update-AzStorageEncryptionScope.md b/src/Storage/Storage.Management/help/Update-AzStorageEncryptionScope.md index 4ee1b8534dcf..3399c2c2a77c 100644 --- a/src/Storage/Storage.Management/help/Update-AzStorageEncryptionScope.md +++ b/src/Storage/Storage.Management/help/Update-AzStorageEncryptionScope.md @@ -16,7 +16,7 @@ Modify an encryption scope for a Storage account. ``` Update-AzStorageEncryptionScope [-ResourceGroupName] [-StorageAccountName] -EncryptionScopeName [-StorageEncryption] [-State ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -24,7 +24,7 @@ Update-AzStorageEncryptionScope [-ResourceGroupName] [-StorageAccountNa ``` Update-AzStorageEncryptionScope [-ResourceGroupName] [-StorageAccountName] -EncryptionScopeName [-KeyvaultEncryption] -KeyUri [-State ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -32,27 +32,27 @@ Update-AzStorageEncryptionScope [-ResourceGroupName] [-StorageAccountNa ``` Update-AzStorageEncryptionScope -StorageAccount -EncryptionScopeName [-StorageEncryption] [-State ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### AccountObjectKeyVault ``` Update-AzStorageEncryptionScope -StorageAccount -EncryptionScopeName [-KeyvaultEncryption] -KeyUri [-State ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### EncryptionScopeObject ``` Update-AzStorageEncryptionScope -InputObject [-StorageEncryption] [-State ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### EncryptionScopeObjectKeyVault ``` Update-AzStorageEncryptionScope -InputObject [-KeyvaultEncryption] -KeyUri - [-State ] [-DefaultProfile ] [-WhatIf] + [-State ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -199,6 +199,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Update-AzStorageFileServiceProperty.md b/src/Storage/Storage.Management/help/Update-AzStorageFileServiceProperty.md index cf447e5a5817..063154c48b2a 100644 --- a/src/Storage/Storage.Management/help/Update-AzStorageFileServiceProperty.md +++ b/src/Storage/Storage.Management/help/Update-AzStorageFileServiceProperty.md @@ -18,7 +18,7 @@ Update-AzStorageFileServiceProperty [-ResourceGroupName] [-StorageAccou [-EnableShareDeleteRetentionPolicy ] [-ShareRetentionDays ] [-EnableSmbMultichannel ] [-SmbProtocolVersion ] [-SmbAuthenticationMethod ] [-SmbChannelEncryption ] [-SmbKerberosTicketEncryption ] [-CorsRule ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -28,7 +28,7 @@ Update-AzStorageFileServiceProperty -StorageAccount [-EnableShareDeleteRetentionPolicy ] [-ShareRetentionDays ] [-EnableSmbMultichannel ] [-SmbProtocolVersion ] [-SmbAuthenticationMethod ] [-SmbChannelEncryption ] [-SmbKerberosTicketEncryption ] [-CorsRule ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -38,7 +38,7 @@ Update-AzStorageFileServiceProperty [-ResourceId] [-EnableShareDeleteRe [-ShareRetentionDays ] [-EnableSmbMultichannel ] [-SmbProtocolVersion ] [-SmbAuthenticationMethod ] [-SmbChannelEncryption ] [-SmbKerberosTicketEncryption ] [-CorsRule ] - [-DefaultProfile ] [-WhatIf] [-Confirm] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -237,6 +237,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName Resource Group Name. diff --git a/src/Storage/Storage.Management/help/Update-AzStorageServiceProperty.md b/src/Storage/Storage.Management/help/Update-AzStorageServiceProperty.md index e068da4617a6..9bdc47c411b6 100644 --- a/src/Storage/Storage.Management/help/Update-AzStorageServiceProperty.md +++ b/src/Storage/Storage.Management/help/Update-AzStorageServiceProperty.md @@ -15,7 +15,7 @@ Modifies the properties for the Azure Storage service. ``` Update-AzStorageServiceProperty [-ServiceType] [-DefaultServiceVersion ] [-PassThru] [-Context ] [-DefaultProfile ] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -94,6 +94,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ServiceType Specifies the storage service type. This cmdlet gets the logging properties for the service type that this parameter specifies. diff --git a/src/Storage/Storage.Management/help/Update-AzStorageTaskAssignment.md b/src/Storage/Storage.Management/help/Update-AzStorageTaskAssignment.md new file mode 100644 index 000000000000..dc245fda6bc6 --- /dev/null +++ b/src/Storage/Storage.Management/help/Update-AzStorageTaskAssignment.md @@ -0,0 +1,489 @@ +--- +external help file: Az.Storage-help.xml +Module Name: Az.Storage +online version: https://learn.microsoft.com/powershell/module/az.storage/update-azstoragetaskassignment +schema: 2.0.0 +--- + +# Update-AzStorageTaskAssignment + +## SYNOPSIS +Update storage task assignment properties + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzStorageTaskAssignment -AccountName -Name -ResourceGroupName + [-SubscriptionId ] [-Description ] [-Enabled] [-EndBy ] [-Interval ] + [-IntervalUnit ] [-ReportPrefix ] [-StartFrom ] [-StartOn ] + [-TargetExcludePrefix ] [-TargetPrefix ] [-TriggerType ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### UpdateViaIdentityStorageAccountExpanded +``` +Update-AzStorageTaskAssignment -Name -StorageAccountInputObject + [-Description ] [-Enabled] [-EndBy ] [-Interval ] [-IntervalUnit ] + [-ReportPrefix ] [-StartFrom ] [-StartOn ] [-TargetExcludePrefix ] + [-TargetPrefix ] [-TriggerType ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzStorageTaskAssignment -InputObject [-Description ] [-Enabled] + [-EndBy ] [-Interval ] [-IntervalUnit ] [-ReportPrefix ] + [-StartFrom ] [-StartOn ] [-TargetExcludePrefix ] [-TargetPrefix ] + [-TriggerType ] [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Update storage task assignment properties + +## EXAMPLES + +### EXAMPLE 1 +``` +$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 +``` + +## PARAMETERS + +### -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. + +```yaml +Type: String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Text that describes the purpose of the storage task assignment + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Enabled +Whether the storage task assignment is enabled or not + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EndBy +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' + +```yaml +Type: DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: IStorageIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Interval +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' + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IntervalUnit +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' + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +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. + +```yaml +Type: String +Parameter Sets: UpdateExpanded, UpdateViaIdentityStorageAccountExpanded +Aliases: StorageTaskAssignmentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReportPrefix +The prefix of the storage task assignment report + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StartFrom +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' + +```yaml +Type: DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StartOn +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' + +```yaml +Type: DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageAccountInputObject +Identity Parameter + +```yaml +Type: IStorageIdentity +Parameter Sets: UpdateViaIdentityStorageAccountExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TargetExcludePrefix +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 + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TargetPrefix +Required list of object prefixes to be included for task execution + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TriggerType +The trigger type of the storage task assignment execution + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## 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. + +## RELATED LINKS + +[https://learn.microsoft.com/powershell/module/az.storage/update-azstoragetaskassignment](https://learn.microsoft.com/powershell/module/az.storage/update-azstoragetaskassignment) + diff --git a/src/Storage/Storage/help b/src/Storage/Storage/help index 506245b2fd95..0ee983904a24 100644 --- a/src/Storage/Storage/help +++ b/src/Storage/Storage/help @@ -1,87 +1,91 @@ --- external help file: Module Name: Az.Storage -online version: https://learn.microsoft.com/powershell/module/az.storage/start-azstorageaccountmigration +online version: https://learn.microsoft.com/powershell/module/az.storage/update-azstoragetaskassignment schema: 2.0.0 --- -# Start-AzStorageAccountMigration +# Update-AzStorageTaskAssignment ## 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. +Update storage task assignment properties ## SYNTAX -### CustomerExpanded (Default) +### UpdateExpanded (Default) ``` -Start-AzStorageAccountMigration -AccountName -ResourceGroupName -TargetSku - [-SubscriptionId ] [-Name ] [-Type ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] +Update-AzStorageTaskAssignment -AccountName -Name -ResourceGroupName + [-SubscriptionId ] [-Description ] [-Enabled] [-EndBy ] [-Interval ] + [-IntervalUnit ] [-ReportPrefix ] [-StartFrom ] [-StartOn ] + [-TargetExcludePrefix ] [-TargetPrefix ] [-TriggerType ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` -### CustomerViaIdentityExpanded +### UpdateViaIdentityExpanded ``` -Start-AzStorageAccountMigration -InputObject -TargetSku [-Name ] - [-Type ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] +Update-AzStorageTaskAssignment -InputObject [-Description ] [-Enabled] + [-EndBy ] [-Interval ] [-IntervalUnit ] [-ReportPrefix ] + [-StartFrom ] [-StartOn ] [-TargetExcludePrefix ] [-TargetPrefix ] + [-TriggerType ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` -### CustomerViaJsonFilePath +### UpdateViaIdentityStorageAccountExpanded ``` -Start-AzStorageAccountMigration -AccountName -ResourceGroupName -JsonFilePath - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] - [] -``` - -### CustomerViaJsonString -``` -Start-AzStorageAccountMigration -AccountName -ResourceGroupName -JsonString - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] - [] +Update-AzStorageTaskAssignment -Name -StorageAccountInputObject + [-Description ] [-Enabled] [-EndBy ] [-Interval ] [-IntervalUnit ] + [-ReportPrefix ] [-StartFrom ] [-StartOn ] [-TargetExcludePrefix ] + [-TargetPrefix ] [-TriggerType ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] ``` ## 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. +Update storage task assignment properties ## EXAMPLES -### Example 1: Start a Storage account migration +### Example 1: Update a task assignment ```powershell -Start-AzStorageAccountMigration -AccountName myaccount -ResourceGroupName myresourcegroup -TargetSku Standard_LRS -Name migration1 -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 ``` -This command starts a migration to Standard_LRS for Storage account myaccount under resource group myresourcegroup. - -### Example 2: Start a Storage account migration by pipeline -```powershell -Get-AzStorageAccount -ResourceGroupName myresourcegroup -Name myaccount | Start-AzStorageAccountMigration -TargetSku Standard_LRS -AsJob -``` - -The first command gets a Storage account Id, and then the second command starts a migration to Standard_LRS for Storage account myaccount under resource group myresourcegroup. - -### Example 3: Start a Storage account migration with Json string input -```powershell -$properties = '{ - "properties": { - "targetSkuName": "Standard_ZRS" - } -}' - Start-AzStorageAccountMigration -ResourceGroupName myresourcegroup -AccountName myaccount -JsonString $properties -AsJob -``` - -This command starts a Storage account migration by inputting the TargetSkuName property with a Json string. - -### Example 4: Start a Storage account migration with a Json file path input -```powershell -# 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 +```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 starts a Storage account migration by inputting the TargetSkuName property with a Json file path. +This command updates the interval, start time, end time, and description of a task assignment, and enables the task assignment. ## PARAMETERS @@ -91,7 +95,7 @@ Storage account names must be between 3 and 24 characters in length and use numb ```yaml Type: System.String -Parameter Sets: CustomerExpanded, CustomerViaJsonFilePath, CustomerViaJsonString +Parameter Sets: UpdateExpanded Aliases: Required: True @@ -132,12 +136,58 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Description +Text that describes the purpose of the storage task assignment + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Enabled +Whether the storage task assignment is enabled or not + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EndBy +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' + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -InputObject Identity Parameter ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity -Parameter Sets: CustomerViaIdentityExpanded +Parameter Sets: UpdateViaIdentityExpanded Aliases: Required: True @@ -147,30 +197,32 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` -### -JsonFilePath -Path of Json file supplied to the Customer operation +### -Interval +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' ```yaml -Type: System.String -Parameter Sets: CustomerViaJsonFilePath +Type: System.Int32 +Parameter Sets: (All) Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -JsonString -Json string supplied to the Customer operation +### -IntervalUnit +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' ```yaml Type: System.String -Parameter Sets: CustomerViaJsonString +Parameter Sets: (All) Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False @@ -178,14 +230,15 @@ Accept wildcard characters: False ``` ### -Name -current value is 'default' for customer initiated migration +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. ```yaml Type: System.String -Parameter Sets: CustomerExpanded, CustomerViaIdentityExpanded -Aliases: +Parameter Sets: UpdateExpanded, UpdateViaIdentityStorageAccountExpanded +Aliases: StorageTaskAssignmentName -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -207,11 +260,11 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -PassThru -Returns true when the command succeeds +### -ReportPrefix +The prefix of the storage task assignment report ```yaml -Type: System.Management.Automation.SwitchParameter +Type: System.String Parameter Sets: (All) Aliases: @@ -223,12 +276,12 @@ Accept wildcard characters: False ``` ### -ResourceGroupName -The name of the resource group within the user's subscription. +The name of the resource group. The name is case insensitive. ```yaml Type: System.String -Parameter Sets: CustomerExpanded, CustomerViaJsonFilePath, CustomerViaJsonString +Parameter Sets: UpdateExpanded Aliases: Required: True @@ -238,12 +291,59 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -StartFrom +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' + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StartOn +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' + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageAccountInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageIdentity +Parameter Sets: UpdateViaIdentityStorageAccountExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -SubscriptionId The ID of the target subscription. ```yaml Type: System.String -Parameter Sets: CustomerExpanded, CustomerViaJsonFilePath, CustomerViaJsonString +Parameter Sets: UpdateExpanded Aliases: Required: False @@ -253,27 +353,43 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -TargetSku -Target sku name for the account +### -TargetExcludePrefix +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 ```yaml -Type: System.String -Parameter Sets: CustomerExpanded, CustomerViaIdentityExpanded +Type: System.String[] +Parameter Sets: (All) Aliases: -Required: True +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TargetPrefix +Required list of object prefixes to be included for task execution + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -Type -SrpAccountMigrationType in ARM contract which is 'accountMigrations' +### -TriggerType +The trigger type of the storage task assignment execution ```yaml Type: System.String -Parameter Sets: CustomerExpanded, CustomerViaIdentityExpanded +Parameter Sets: (All) Aliases: Required: False @@ -323,7 +439,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### System.Boolean +### Microsoft.Azure.PowerShell.Cmdlets.Storage.Models.IStorageTaskAssignment ## NOTES From 33bf2697e603045cb09e10c12a4b1b1e208b4df9 Mon Sep 17 00:00:00 2001 From: Yabo Hu Date: Tue, 9 Jul 2024 23:28:59 +0800 Subject: [PATCH 2/2] Update ChangeLog.md --- src/Storage/Storage.Management/ChangeLog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Storage/Storage.Management/ChangeLog.md b/src/Storage/Storage.Management/ChangeLog.md index c1feb74505b2..38998c896f46 100644 --- a/src/Storage/Storage.Management/ChangeLog.md +++ b/src/Storage/Storage.Management/ChangeLog.md @@ -18,6 +18,12 @@ - Additional information about change #1 --> ## Upcoming Release +* Supported Storage task assignment + - `New-AzStorageTaskAssignment` + - `Update-AzStorageTaskAssignment` + - `Get-AzStorageTaskAssignment` + - `Remove-AzStorageTaskAssignment` + - `Get-AzStorageTaskAssignmentinstancesReport` * Supported local user ACL and list local user paging/filtering - `Set-AzStorageLocalUser` - `Get-AzStorageLocalUser`