Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ElasticSan/ElasticSan.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - ElasticSan")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.4.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.4.0")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.4.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.4.1")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
56 changes: 50 additions & 6 deletions src/ElasticSan/ElasticSan.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ For information on how to develop for `Az.ElasticSan`, see [how-to.md](how-to.md

``` yaml
# Please specify the commit id that includes your features to make sure generated codes stable.
commit: 72c69a0cf561d41ae99fe6810c426a874d3a8372
commit: fa66a869e949a3f089eee61898da00442be66beb
require:
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
- $(repo)/specification/elasticsan/resource-manager/Microsoft.ElasticSan/stable/2024-05-01/elasticsan.json
- $(repo)/specification/elasticsan/resource-manager/Microsoft.ElasticSan/preview/2024-07-01-preview/elasticsan.json

# Normally, title is the service name
title: ElasticSan
Expand Down Expand Up @@ -109,6 +109,22 @@ directive:
subject: VolumeSnapshot
verb: Update
remove: true
- where:
verb: Backup
subject: VolumePre
set:
verb: Test
subject: VolumeBackup
- where:
verb: Restore
subject: VolumePre
set:
verb: Test
subject: VolumeRestore
- where:
parameter-name: ^XmsAccessSoftDeletedResource$
set:
parameter-name: AccessSoftDeletedResource
- where:
parameter-name: EncryptionIdentityEncryptionUserAssignedIdentity
set:
Expand All @@ -125,6 +141,38 @@ directive:
parameter-name: KeyVaultPropertyKeyVersion
set:
parameter-name: KeyVersion
- where:
parameter-name: ScaleUpPropertyAutoScalePolicyEnforcement
set:
parameter-name: AutoScalePolicyEnforcement
- where:
parameter-name: ScaleUpPropertyCapacityUnitScaleUpLimitTiB
set:
parameter-name: CapacityUnitScaleUpLimitTiB
- where:
parameter-name: ScaleUpPropertyIncreaseCapacityUnitByTiB
set:
parameter-name: IncreaseCapacityUnitByTiB
- where:
parameter-name: ScaleUpPropertyUnusedSizeTiB
set:
parameter-name: UnusedSizeTiB
- where:
property-name: ScaleUpPropertyAutoScalePolicyEnforcement
set:
property-name: AutoScalePolicyEnforcement
- where:
property-name: ScaleUpPropertyCapacityUnitScaleUpLimitTiB
set:
property-name: CapacityUnitScaleUpLimitTiB
- where:
property-name: ScaleUpPropertyIncreaseCapacityUnitByTiB
set:
property-name: IncreaseCapacityUnitByTiB
- where:
property-name: ScaleUpPropertyUnusedSizeTiB
set:
property-name: UnusedSizeTiB
# Change the description of cmdlets that correspond to multiple APIs
- from: swagger-document
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}"].get
Expand All @@ -138,10 +186,6 @@ directive:
- where:
subject: ^PrivateEndpointConnection$|^PrivateLinkResource$
hide: true
- where:
verb: ^New$
subject: ^ElasticSan$
hide: true
- where:
verb: ^New$|^Update$
subject: ^VolumeGroup$
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "elasticSans/volumegroups/snapshots",
"apiVersion": "2024-05-01",
"apiVersion": "2024-07-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.elasticsan"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "elasticSans/volumegroups/volumes",
"apiVersion": "2024-05-01",
"apiVersion": "2024-07-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.elasticsan"
},
Expand Down Expand Up @@ -54,12 +54,12 @@
]
},
{
"name": "Remove-AzElasticSanVolume",
"description": "Delete an Volume.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}",
"name": "Restore-AzElasticSanVolume",
"description": "Restore Soft Deleted Volumes.\nThe volume name is obtained by using the API to list soft deleted volumes by volume group",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ElasticSan/elasticSans/{elasticSanName}/volumegroups/{volumeGroupName}/volumes/{volumeName}/restore",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.elasticsan/remove-azelasticsanvolume"
"url": "https://learn.microsoft.com/powershell/module/az.elasticsan/restore-azelasticsanvolume"
},
"parameterSets": [
{
Expand All @@ -75,7 +75,7 @@
},
"examples": [
{
"description": "Delete an Volume.",
"description": "Restore Soft Deleted Volumes. The volume name is obtained by using the API to list soft deleted volumes by volume group",
"parameters": [
{
"name": "-ElasticSanName",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "elasticSans/volumegroups",
"apiVersion": "2024-05-01",
"apiVersion": "2024-07-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.elasticsan"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "elasticSans",
"apiVersion": "2024-05-01",
"apiVersion": "2024-07-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.elasticsan"
},
Expand Down
203 changes: 0 additions & 203 deletions src/ElasticSan/ElasticSan.Autorest/custom/New-AzElasticSan.ps1

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,19 @@ function New-AzElasticSanVolumeGroup {
# Identity Parameter
# To construct, see NOTES section for ELASTICSANINPUTOBJECT properties and create a hash table.
${ElasticSanInputObject},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Body')]
[System.Int32]
# The number of days to retain the resources after deletion.
${DeleteRetentionPolicyRetentionPeriodDay},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.PSArgumentCompleterAttribute("Enabled", "Disabled")]
[Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Body')]
[System.String]
# .
${DeleteRetentionPolicyState},

[Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.ElasticSan.Category('Path')]
Expand Down Expand Up @@ -239,11 +252,8 @@ function New-AzElasticSanVolumeGroup {
$null = $PSBoundParameters.Remove('IdentityUserAssignedIdentityId')
}

if (($PSBoundParameters.ContainsKey("EnforceDataIntegrityCheckForIscsi") -eq $true) -and ($PSBoundParameters.EnforceDataIntegrityCheckForIscsi -eq $true)) {
Write-Warning "CRC protection feature is not supported for Azure VMware solution (AVS) yet. Do not enable this flag if you plan to use the volumes within this volume group as datastores for AVS, as the datastore creation will fail. For Azure Virtual Machines, enabling this flag would need CRC32C to be set on iSCSI header and data digests on the client for all the connections from the client to the volumes in this volume group. You can achieve that by disconnecting the volumes from the client and reconnecting using multi-session scripts generated in portal connect flow or from documentation, which contain steps to set CRC32C on header and data digests. Do not enable CRC protection on the volume group if you are using Fedora or its downstream Linux distributions such as RHEL, CentOS etc. as data digests are not supported on them. If you enable this flag for those distributions, connectivity to the volumes will fail. Learn more: https://go.microsoft.com/fwlink/?LinkId=2294733&id=Microsoft_Azure_ElasticSan"
}
else {
Write-Warning "CRC protection is recommended if you plan to connect the volumes in this volume group to Azure Virtual Machines. Do not enable it if you are using Fedora or its downstream Linux distributions such as RHEL, CentOS etc. on your VM, as data digests are not supported on them. If you enable this flag for those distributions, connectivity to the volumes will fail. Also, do not enable this flag if you plan to use the volumes within this volume group as datastores for Azure VMware Solution (AVS), as this feature is not supported for AVS yet and the datastore creation will fail. Learn more: https://go.microsoft.com/fwlink/?LinkId=2294733&id=Microsoft_Azure_ElasticSan"
if (($PSBoundParameters.ContainsKey("EnforceDataIntegrityCheckForIscsi") -eq $false) -or ($PSBoundParameters.EnforceDataIntegrityCheckForIscsi -eq $true)) {
Write-Warning "This needs CRC32C to be set on header and data digests on the client for all the connections from the client to the volumes in this volume group. You can do this by connecting to the volumes from the client using multi-session scripts generated in portal connect flow or from documentation, which contain steps to set CRC32C on header and data digests. Do not enable CRC protection on the volume group if you are using Fedora or its downstream Linux distributions such as RHEL, CentOS etc. as data digests are not supported on them. If you enable this flag for those distributions, connectivity to the volumes will fail. Refer to https://learn.microsoft.com/en-us/azure/storage/elastic-san/elastic-san-create?tabs=azure-portal for more information."
}

Az.ElasticSan.internal\New-AzElasticSanVolumeGroup @PSBoundParameters
Expand Down
Loading
Loading