diff --git a/src/ElasticSan/ElasticSan.Autorest/README.md b/src/ElasticSan/ElasticSan.Autorest/README.md index 47d5b19863dd..baba70552657 100644 --- a/src/ElasticSan/ElasticSan.Autorest/README.md +++ b/src/ElasticSan/ElasticSan.Autorest/README.md @@ -3,9 +3,6 @@ This directory contains the PowerShell module for the ElasticSan service. --- -## Status -[![Az.ElasticSan](https://img.shields.io/powershellgallery/v/Az.ElasticSan.svg?style=flat-square&label=Az.ElasticSan "Az.ElasticSan")](https://www.powershellgallery.com/packages/Az.ElasticSan/) - ## Info - Modifiable: yes - Generated: all diff --git a/src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans-volumegroups-snapshots.json b/src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans-volumegroups-snapshots.json new file mode 100644 index 000000000000..e92afe88d986 --- /dev/null +++ b/src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans-volumegroups-snapshots.json @@ -0,0 +1,105 @@ +{ + "resourceType": "elasticSans/volumegroups/snapshots", + "apiVersion": "2023-01-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.elasticsan" + }, + "commands": [ + { + "name": "Get-AzElasticSanVolumeSnapshot", + "description": "Get a Volume Snapshot.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/snapshots/{snapshotName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.elasticsan/get-azelasticsanvolumesnapshot" + }, + "parameterSets": [ + { + "parameters": [ + "-ElasticSanName ", + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]", + "-VolumeGroupName " + ] + } + ] + }, + "examples": [ + { + "description": "Get a Volume Snapshot.", + "parameters": [ + { + "name": "-ElasticSanName", + "value": "[Path.elasticSanName]" + }, + { + "name": "-Name", + "value": "[Path.snapshotName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + }, + { + "name": "-VolumeGroupName", + "value": "[Path.volumeGroupName]" + } + ] + } + ] + }, + { + "name": "Remove-AzElasticSanVolumeSnapshot", + "description": "Delete a Volume Snapshot.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/snapshots/{snapshotName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.elasticsan/remove-azelasticsanvolumesnapshot" + }, + "parameterSets": [ + { + "parameters": [ + "-ElasticSanName ", + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]", + "-VolumeGroupName " + ] + } + ] + }, + "examples": [ + { + "description": "Delete a Volume Snapshot.", + "parameters": [ + { + "name": "-ElasticSanName", + "value": "[Path.elasticSanName]" + }, + { + "name": "-Name", + "value": "[Path.snapshotName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + }, + { + "name": "-VolumeGroupName", + "value": "[Path.volumeGroupName]" + } + ] + } + ] + } + ] +} diff --git a/src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans-volumegroups-volumes.json b/src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans-volumegroups-volumes.json index c4e91540026d..5eb584b29130 100644 --- a/src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans-volumegroups-volumes.json +++ b/src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans-volumegroups-volumes.json @@ -1,6 +1,6 @@ { "resourceType": "elasticSans/volumegroups/volumes", - "apiVersion": "2022-12-01-preview", + "apiVersion": "2023-01-01", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.elasticsan" }, diff --git a/src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans-volumegroups.json b/src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans-volumegroups.json index f67835bbf9ac..fea3f2f4f0a2 100644 --- a/src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans-volumegroups.json +++ b/src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans-volumegroups.json @@ -1,6 +1,6 @@ { "resourceType": "elasticSans/volumegroups", - "apiVersion": "2022-12-01-preview", + "apiVersion": "2023-01-01", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.elasticsan" }, diff --git a/src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans.json b/src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans.json index deb6229c8ba5..c8de1ac93393 100644 --- a/src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans.json +++ b/src/ElasticSan/ElasticSan.Autorest/UX/Microsoft.ElasticSan/elasticSans.json @@ -1,6 +1,6 @@ { "resourceType": "elasticSans", - "apiVersion": "2022-12-01-preview", + "apiVersion": "2023-01-01", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.elasticsan" }, diff --git a/src/ElasticSan/ElasticSan.Autorest/custom/New-AzElasticSanVolumeGroup.ps1 b/src/ElasticSan/ElasticSan.Autorest/custom/New-AzElasticSanVolumeGroup.ps1 index b9a70f7358f8..10f722b07400 100644 --- a/src/ElasticSan/ElasticSan.Autorest/custom/New-AzElasticSanVolumeGroup.ps1 +++ b/src/ElasticSan/ElasticSan.Autorest/custom/New-AzElasticSanVolumeGroup.ps1 @@ -119,6 +119,7 @@ function New-AzElasticSanVolumeGroup { ${EncryptionUserAssignedIdentity}, [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.ParameterBreakingChange("IdentityType", "13.0.0", "2.0.0", "2024/11/19", ChangeDescription="IdentityType will be removed. EnableSystemAssignedIdentity will be used to enable/disable system assigned identity and UserAssignedIdentity will be used to specify user assigned identities.")] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Body')] [System.String] diff --git a/src/ElasticSan/ElasticSan.Autorest/custom/Update-AzElasticSanVolumeGroup.ps1 b/src/ElasticSan/ElasticSan.Autorest/custom/Update-AzElasticSanVolumeGroup.ps1 index f019f9acfabe..f55dfe03f0f9 100644 --- a/src/ElasticSan/ElasticSan.Autorest/custom/Update-AzElasticSanVolumeGroup.ps1 +++ b/src/ElasticSan/ElasticSan.Autorest/custom/Update-AzElasticSanVolumeGroup.ps1 @@ -119,6 +119,7 @@ function Update-AzElasticSanVolumeGroup { ${EncryptionUserAssignedIdentity}, [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Runtime.ParameterBreakingChange("IdentityType", "13.0.0", "2.0.0", "2024/11/19", ChangeDescription="IdentityType will be removed. EnableSystemAssignedIdentity will be used to enable/disable system assigned identity and UserAssignedIdentity will be used to specify user assigned identities.")] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Body')] [System.String] diff --git a/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSan.md b/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSan.md index df32ad2e1d7f..16f0d0ae5ddc 100644 --- a/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSan.md +++ b/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSan.md @@ -206,7 +206,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity diff --git a/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSanVolume.md b/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSanVolume.md index 95c4a1005e6f..c3f9c4ba2942 100644 --- a/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSanVolume.md +++ b/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSanVolume.md @@ -144,7 +144,6 @@ Accept wildcard characters: False ### -ElasticSanInputObject Identity Parameter -To construct, see NOTES section for ELASTICSANINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -175,7 +174,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -237,7 +235,6 @@ Accept wildcard characters: False ### -VolumegroupInputObject Identity Parameter -To construct, see NOTES section for VOLUMEGROUPINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity diff --git a/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSanVolumeGroup.md b/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSanVolumeGroup.md index 082534859f72..ebcfbec6b0e1 100644 --- a/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSanVolumeGroup.md +++ b/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSanVolumeGroup.md @@ -125,7 +125,6 @@ Accept wildcard characters: False ### -ElasticSanInputObject Identity Parameter -To construct, see NOTES section for ELASTICSANINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -156,7 +155,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity diff --git a/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSanVolumeSnapshot.md b/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSanVolumeSnapshot.md index ad1b148ba9e4..4e7ad018c259 100644 --- a/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSanVolumeSnapshot.md +++ b/src/ElasticSan/ElasticSan.Autorest/docs/Get-AzElasticSanVolumeSnapshot.md @@ -169,7 +169,6 @@ Accept wildcard characters: False ### -ElasticSanInputObject Identity Parameter -To construct, see NOTES section for ELASTICSANINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -215,7 +214,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -277,7 +275,6 @@ Accept wildcard characters: False ### -VolumegroupInputObject Identity Parameter -To construct, see NOTES section for VOLUMEGROUPINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity diff --git a/src/ElasticSan/ElasticSan.Autorest/docs/New-AzElasticSan.md b/src/ElasticSan/ElasticSan.Autorest/docs/New-AzElasticSan.md index 4daf03c820a4..e4f8bf796c1c 100644 --- a/src/ElasticSan/ElasticSan.Autorest/docs/New-AzElasticSan.md +++ b/src/ElasticSan/ElasticSan.Autorest/docs/New-AzElasticSan.md @@ -145,7 +145,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity diff --git a/src/ElasticSan/ElasticSan.Autorest/docs/New-AzElasticSanVolume.md b/src/ElasticSan/ElasticSan.Autorest/docs/New-AzElasticSanVolume.md index 66356c6173dd..6a73b742ba8f 100644 --- a/src/ElasticSan/ElasticSan.Autorest/docs/New-AzElasticSanVolume.md +++ b/src/ElasticSan/ElasticSan.Autorest/docs/New-AzElasticSanVolume.md @@ -141,7 +141,6 @@ Accept wildcard characters: False ### -ElasticSanInputObject Identity Parameter -To construct, see NOTES section for ELASTICSANINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -172,7 +171,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -264,7 +262,6 @@ Accept wildcard characters: False ### -VolumegroupInputObject Identity Parameter -To construct, see NOTES section for VOLUMEGROUPINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity diff --git a/src/ElasticSan/ElasticSan.Autorest/docs/New-AzElasticSanVolumeSnapshot.md b/src/ElasticSan/ElasticSan.Autorest/docs/New-AzElasticSanVolumeSnapshot.md index e38c2ced0f45..80e80afa2353 100644 --- a/src/ElasticSan/ElasticSan.Autorest/docs/New-AzElasticSanVolumeSnapshot.md +++ b/src/ElasticSan/ElasticSan.Autorest/docs/New-AzElasticSanVolumeSnapshot.md @@ -121,7 +121,6 @@ Accept wildcard characters: False ### -ElasticSanInputObject Identity Parameter -To construct, see NOTES section for ELASTICSANINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -152,7 +151,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -229,7 +227,6 @@ Accept wildcard characters: False ### -VolumegroupInputObject Identity Parameter -To construct, see NOTES section for VOLUMEGROUPINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity diff --git a/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSan.md b/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSan.md index 0debd4b7d51e..b4057e34db56 100644 --- a/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSan.md +++ b/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSan.md @@ -71,7 +71,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity diff --git a/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSanVolume.md b/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSanVolume.md index 593c03aeddd4..b08e72e1b551 100644 --- a/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSanVolume.md +++ b/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSanVolume.md @@ -104,7 +104,6 @@ Accept wildcard characters: False ### -ElasticSanInputObject Identity Parameter -To construct, see NOTES section for ELASTICSANINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -152,7 +151,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -244,7 +242,6 @@ Accept wildcard characters: False ### -VolumegroupInputObject Identity Parameter -To construct, see NOTES section for VOLUMEGROUPINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity diff --git a/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSanVolumeGroup.md b/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSanVolumeGroup.md index a1c91672fe4b..90d7ed84b537 100644 --- a/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSanVolumeGroup.md +++ b/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSanVolumeGroup.md @@ -78,7 +78,6 @@ Accept wildcard characters: False ### -ElasticSanInputObject Identity Parameter -To construct, see NOTES section for ELASTICSANINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -109,7 +108,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity diff --git a/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSanVolumeSnapshot.md b/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSanVolumeSnapshot.md index da4cd5e49ce2..e8cc69bbd7a2 100644 --- a/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSanVolumeSnapshot.md +++ b/src/ElasticSan/ElasticSan.Autorest/docs/Remove-AzElasticSanVolumeSnapshot.md @@ -85,7 +85,6 @@ Accept wildcard characters: False ### -ElasticSanInputObject Identity Parameter -To construct, see NOTES section for ELASTICSANINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -116,7 +115,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -208,7 +206,6 @@ Accept wildcard characters: False ### -VolumegroupInputObject Identity Parameter -To construct, see NOTES section for VOLUMEGROUPINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity diff --git a/src/ElasticSan/ElasticSan.Autorest/docs/Update-AzElasticSan.md b/src/ElasticSan/ElasticSan.Autorest/docs/Update-AzElasticSan.md index 5111750a4919..113a9de4c372 100644 --- a/src/ElasticSan/ElasticSan.Autorest/docs/Update-AzElasticSan.md +++ b/src/ElasticSan/ElasticSan.Autorest/docs/Update-AzElasticSan.md @@ -128,7 +128,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity diff --git a/src/ElasticSan/ElasticSan.Autorest/docs/Update-AzElasticSanVolume.md b/src/ElasticSan/ElasticSan.Autorest/docs/Update-AzElasticSanVolume.md index 8273845611a6..76122889e7b0 100644 --- a/src/ElasticSan/ElasticSan.Autorest/docs/Update-AzElasticSanVolume.md +++ b/src/ElasticSan/ElasticSan.Autorest/docs/Update-AzElasticSanVolume.md @@ -106,7 +106,6 @@ Accept wildcard characters: False ### -ElasticSanInputObject Identity Parameter -To construct, see NOTES section for ELASTICSANINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -137,7 +136,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity @@ -229,7 +227,6 @@ Accept wildcard characters: False ### -VolumegroupInputObject Identity Parameter -To construct, see NOTES section for VOLUMEGROUPINPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Models.IElasticSanIdentity diff --git a/src/ElasticSan/ElasticSan.Autorest/test/loadEnv.ps1 b/src/ElasticSan/ElasticSan.Autorest/test/loadEnv.ps1 index 5f079e89615e..6a7c385c6b7d 100644 --- a/src/ElasticSan/ElasticSan.Autorest/test/loadEnv.ps1 +++ b/src/ElasticSan/ElasticSan.Autorest/test/loadEnv.ps1 @@ -25,5 +25,5 @@ if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { $env = @{} if (Test-Path -Path $envFilePath) { $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json - $PSDefaultParameterValues=@{"*:SubscriptionId"=$env.SubscriptionId; "*:Tenant"=$env.Tenant} + $PSDefaultParameterValues=@{"*:Tenant"=$env.Tenant} } \ No newline at end of file diff --git a/src/ElasticSan/ElasticSan.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 b/src/ElasticSan/ElasticSan.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 new file mode 100644 index 000000000000..5319862d3372 --- /dev/null +++ b/src/ElasticSan/ElasticSan.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 @@ -0,0 +1,7 @@ +param() +if ($env:AzPSAutorestTestPlaybackMode) { + $loadEnvPath = Join-Path $PSScriptRoot '..' 'test' 'loadEnv.ps1' + . ($loadEnvPath) + return $env.SubscriptionId +} +return (Get-AzContext).Subscription.Id \ No newline at end of file