From e75f7091905c3be0cef79cbfbdbb03966edb3fe1 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Fri, 15 Mar 2024 14:30:39 -0700 Subject: [PATCH 01/20] Initial commit --- src/Compute/Compute.Autorest/README.md | 3 -- ...ScaleSets-virtualMachines-runCommands.json | 2 +- .../virtualMachines-runCommands.json | 2 +- .../docs/Get-AzGalleryApplication.md | 26 ++------------ .../docs/Get-AzGalleryApplicationVersion.md | 26 ++------------ .../docs/New-AzGalleryApplication.md | 2 -- .../docs/New-AzGalleryApplicationVersion.md | 18 ---------- .../docs/Remove-AzGalleryApplication.md | 26 ++------------ .../Remove-AzGalleryApplicationVersion.md | 26 ++------------ .../docs/Remove-AzVMRunCommand.md | 26 ++------------ .../docs/Remove-AzVmssVMRunCommand.md | 26 ++------------ .../docs/Set-AzVMRunCommand.md | 15 -------- .../docs/Set-AzVmssVMRunCommand.md | 15 -------- .../docs/Update-AzGalleryApplication.md | 26 ++------------ .../Update-AzGalleryApplicationVersion.md | 34 ------------------- .../test/Get-AzDiagnostic.Tests.ps1 | 21 ++++++++++++ .../test/Get-AzDiskInspection.Tests.ps1 | 25 ++++++++++++++ .../Get-AzSpotPlacementRecommender.Tests.ps1 | 25 ++++++++++++++ ...nvoke-AzSpotPlacementRecommender.Tests.ps1 | 33 ++++++++++++++++++ .../test/New-AzDiskInspection.Tests.ps1 | 21 ++++++++++++ .../test/Read-AzDiagnosticOperation.Tests.ps1 | 25 ++++++++++++++ ...skInspectionStorageConfiguration.Tests.ps1 | 33 ++++++++++++++++++ ...skInspectionStorageConfiguration.Tests.ps1 | 25 ++++++++++++++ 23 files changed, 224 insertions(+), 257 deletions(-) create mode 100644 src/Compute/Compute.Autorest/test/Get-AzDiagnostic.Tests.ps1 create mode 100644 src/Compute/Compute.Autorest/test/Get-AzDiskInspection.Tests.ps1 create mode 100644 src/Compute/Compute.Autorest/test/Get-AzSpotPlacementRecommender.Tests.ps1 create mode 100644 src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 create mode 100644 src/Compute/Compute.Autorest/test/New-AzDiskInspection.Tests.ps1 create mode 100644 src/Compute/Compute.Autorest/test/Read-AzDiagnosticOperation.Tests.ps1 create mode 100644 src/Compute/Compute.Autorest/test/Register-AzDiskInspectionStorageConfiguration.Tests.ps1 create mode 100644 src/Compute/Compute.Autorest/test/Test-AzDiskInspectionStorageConfiguration.Tests.ps1 diff --git a/src/Compute/Compute.Autorest/README.md b/src/Compute/Compute.Autorest/README.md index c107276b0cff..991f1aa1566e 100644 --- a/src/Compute/Compute.Autorest/README.md +++ b/src/Compute/Compute.Autorest/README.md @@ -3,9 +3,6 @@ This directory contains the PowerShell module for the Compute service. --- -## Status -[![Az.Compute](https://img.shields.io/powershellgallery/v/Az.Compute.svg?style=flat-square&label=Az.Compute "Az.Compute")](https://www.powershellgallery.com/packages/Az.Compute/) - ## Info - Modifiable: yes - Generated: all diff --git a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachineScaleSets-virtualMachines-runCommands.json b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachineScaleSets-virtualMachines-runCommands.json index 3ad432d2d17f..a5a9b418c7d2 100644 --- a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachineScaleSets-virtualMachines-runCommands.json +++ b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachineScaleSets-virtualMachines-runCommands.json @@ -1,6 +1,6 @@ { "resourceType": "virtualMachineScaleSets/virtualMachines/runCommands", - "apiVersion": "2021-07-01", + "apiVersion": "2023-07-01", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.compute" }, diff --git a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachines-runCommands.json b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachines-runCommands.json index a35bd038e75b..8e3f8b28e8a9 100644 --- a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachines-runCommands.json +++ b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachines-runCommands.json @@ -1,6 +1,6 @@ { "resourceType": "virtualMachines/runCommands", - "apiVersion": "2021-07-01", + "apiVersion": "2023-07-01", "learnMore": { "url": "https://learn.microsoft.com/powershell/module/az.compute" }, diff --git a/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplication.md b/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplication.md index 1825d60981c2..e70a0ada7410 100644 --- a/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplication.md +++ b/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplication.md @@ -51,7 +51,8 @@ Retrieve all the Gallery Application resources in the provided Resource Group an ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +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 @@ -155,28 +156,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -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 - - `[CommandId ]`: The command id. - - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. - - `[Id ]`: Resource identity path - - `[InstanceId ]`: The instance ID of the virtual machine. - - `[Location ]`: The location upon which run commands is queried. - - `[ResourceGroupName ]`: The name of the resource group. - - `[RunCommandName ]`: The name of the virtual machine run command. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. - - `[VMScaleSetName ]`: The name of the VM scale set. - ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md index 2b305b450369..50132259d262 100644 --- a/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md @@ -53,7 +53,8 @@ Retrieve all the Gallery Application Version resources in the provided Resource ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +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 @@ -187,28 +188,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -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 - - `[CommandId ]`: The command id. - - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. - - `[Id ]`: Resource identity path - - `[InstanceId ]`: The instance ID of the virtual machine. - - `[Location ]`: The location upon which run commands is queried. - - `[ResourceGroupName ]`: The name of the resource group. - - `[RunCommandName ]`: The name of the virtual machine run command. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. - - `[VMScaleSetName ]`: The name of the VM scale set. - ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/New-AzGalleryApplication.md b/src/Compute/Compute.Autorest/docs/New-AzGalleryApplication.md index c53071c37cb2..fb471cd8694a 100644 --- a/src/Compute/Compute.Autorest/docs/New-AzGalleryApplication.md +++ b/src/Compute/Compute.Autorest/docs/New-AzGalleryApplication.md @@ -250,7 +250,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/New-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/docs/New-AzGalleryApplicationVersion.md index aad843a7312f..0057ca6fb520 100644 --- a/src/Compute/Compute.Autorest/docs/New-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute.Autorest/docs/New-AzGalleryApplicationVersion.md @@ -425,23 +425,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -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. - - -TARGETREGION : The target regions where the Image Version is going to be replicated to. This property is updatable. - - `Name `: The name of the region. - - `[EncryptionDataDiskImage ]`: A list of encryption specifications for data disk images. - - `Lun `: This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. - - `[DiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. - - `[OSDiskImageDiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. - - `[RegionalReplicaCount ]`: The number of replicas of the Image Version to be created per region. This property is updatable. - - `[SecurityProfileConfidentialVMEncryptionType ]`: confidential VM encryption types - - `[SecurityProfileSecureVMDiskEncryptionSetId ]`: secure VM disk encryption set id - - `[StorageAccountType ]`: Specifies the storage account type to be used to store the image. This property is not updatable. - ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md b/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md index e68f483c3adc..3105775cf2af 100644 --- a/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md +++ b/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md @@ -55,7 +55,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +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 @@ -220,28 +221,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -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 - - `[CommandId ]`: The command id. - - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. - - `[Id ]`: Resource identity path - - `[InstanceId ]`: The instance ID of the virtual machine. - - `[Location ]`: The location upon which run commands is queried. - - `[ResourceGroupName ]`: The name of the resource group. - - `[RunCommandName ]`: The name of the virtual machine run command. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. - - `[VMScaleSetName ]`: The name of the VM scale set. - ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md index b48c558a94a3..1b6292ad57e8 100644 --- a/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md @@ -55,7 +55,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +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 @@ -235,28 +236,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -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 - - `[CommandId ]`: The command id. - - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. - - `[Id ]`: Resource identity path - - `[InstanceId ]`: The instance ID of the virtual machine. - - `[Location ]`: The location upon which run commands is queried. - - `[ResourceGroupName ]`: The name of the resource group. - - `[RunCommandName ]`: The name of the virtual machine run command. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. - - `[VMScaleSetName ]`: The name of the VM scale set. - ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md index 607c18c6c941..f24796d2f19e 100644 --- a/src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md +++ b/src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md @@ -55,7 +55,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +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 @@ -220,28 +221,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -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 - - `[CommandId ]`: The command id. - - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. - - `[Id ]`: Resource identity path - - `[InstanceId ]`: The instance ID of the virtual machine. - - `[Location ]`: The location upon which run commands is queried. - - `[ResourceGroupName ]`: The name of the resource group. - - `[RunCommandName ]`: The name of the virtual machine run command. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. - - `[VMScaleSetName ]`: The name of the VM scale set. - ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md index 2ec9cdaafd85..7e720fadb80d 100644 --- a/src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md +++ b/src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md @@ -55,7 +55,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +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 @@ -235,28 +236,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -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 - - `[CommandId ]`: The command id. - - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. - - `[Id ]`: Resource identity path - - `[InstanceId ]`: The instance ID of the virtual machine. - - `[Location ]`: The location upon which run commands is queried. - - `[ResourceGroupName ]`: The name of the resource group. - - `[RunCommandName ]`: The name of the virtual machine run command. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. - - `[VMScaleSetName ]`: The name of the VM scale set. - ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md index 5c0fc6c65ca1..d7c04dced033 100644 --- a/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md +++ b/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md @@ -618,20 +618,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -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. - - -`PARAMETER `: The parameters used by the script. - - `Name `: The run command parameter name. - - `Value `: The run command parameter value. - -`PROTECTEDPARAMETER `: The parameters used by the script. - - `Name `: The run command parameter name. - - `Value `: The run command parameter value. - ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md index 60bd99b712b5..3787ad2df8d9 100644 --- a/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md +++ b/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md @@ -633,20 +633,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -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. - - -`PARAMETER `: The parameters used by the script. - - `Name `: The run command parameter name. - - `Value `: The run command parameter value. - -`PROTECTEDPARAMETER `: The parameters used by the script. - - `Name `: The run command parameter name. - - `Value `: The run command parameter value. - ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplication.md b/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplication.md index 51b773024eae..85937b4b9c64 100644 --- a/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplication.md +++ b/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplication.md @@ -55,7 +55,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +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 @@ -238,28 +239,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -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 - - `[CommandId ]`: The command id. - - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. - - `[Id ]`: Resource identity path - - `[InstanceId ]`: The instance ID of the virtual machine. - - `[Location ]`: The location upon which run commands is queried. - - `[ResourceGroupName ]`: The name of the resource group. - - `[RunCommandName ]`: The name of the virtual machine run command. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. - - `[VMScaleSetName ]`: The name of the VM scale set. - ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplicationVersion.md index d65c084fe875..9cb72088c268 100644 --- a/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplicationVersion.md @@ -349,39 +349,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -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 - - `[CommandId ]`: The command id. - - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. - - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. - - `[Id ]`: Resource identity path - - `[InstanceId ]`: The instance ID of the virtual machine. - - `[Location ]`: The location upon which run commands is queried. - - `[ResourceGroupName ]`: The name of the resource group. - - `[RunCommandName ]`: The name of the virtual machine run command. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. - - `[VMScaleSetName ]`: The name of the VM scale set. - -TARGETREGION : The target regions where the Image Version is going to be replicated to. This property is updatable. - - `Name `: The name of the region. - - `[EncryptionDataDiskImage ]`: A list of encryption specifications for data disk images. - - `Lun `: This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. - - `[DiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. - - `[OSDiskImageDiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. - - `[RegionalReplicaCount ]`: The number of replicas of the Image Version to be created per region. This property is updatable. - - `[SecurityProfileConfidentialVMEncryptionType ]`: confidential VM encryption types - - `[SecurityProfileSecureVMDiskEncryptionSetId ]`: secure VM disk encryption set id - - `[StorageAccountType ]`: Specifies the storage account type to be used to store the image. This property is not updatable. - ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/test/Get-AzDiagnostic.Tests.ps1 b/src/Compute/Compute.Autorest/test/Get-AzDiagnostic.Tests.ps1 new file mode 100644 index 000000000000..e3c29613fd9e --- /dev/null +++ b/src/Compute/Compute.Autorest/test/Get-AzDiagnostic.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzDiagnostic')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzDiagnostic.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-AzDiagnostic' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Compute/Compute.Autorest/test/Get-AzDiskInspection.Tests.ps1 b/src/Compute/Compute.Autorest/test/Get-AzDiskInspection.Tests.ps1 new file mode 100644 index 000000000000..24c3947527a3 --- /dev/null +++ b/src/Compute/Compute.Autorest/test/Get-AzDiskInspection.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzDiskInspection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzDiskInspection.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-AzDiskInspection' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Compute/Compute.Autorest/test/Get-AzSpotPlacementRecommender.Tests.ps1 b/src/Compute/Compute.Autorest/test/Get-AzSpotPlacementRecommender.Tests.ps1 new file mode 100644 index 000000000000..3769c0cf2762 --- /dev/null +++ b/src/Compute/Compute.Autorest/test/Get-AzSpotPlacementRecommender.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSpotPlacementRecommender')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSpotPlacementRecommender.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-AzSpotPlacementRecommender' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 new file mode 100644 index 000000000000..eb0524334bdc --- /dev/null +++ b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzSpotPlacementRecommender')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzSpotPlacementRecommender.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 'Invoke-AzSpotPlacementRecommender' { + It 'PostExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Post' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'PostViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'PostViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Compute/Compute.Autorest/test/New-AzDiskInspection.Tests.ps1 b/src/Compute/Compute.Autorest/test/New-AzDiskInspection.Tests.ps1 new file mode 100644 index 000000000000..b822553c1a56 --- /dev/null +++ b/src/Compute/Compute.Autorest/test/New-AzDiskInspection.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzDiskInspection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzDiskInspection.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-AzDiskInspection' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Compute/Compute.Autorest/test/Read-AzDiagnosticOperation.Tests.ps1 b/src/Compute/Compute.Autorest/test/Read-AzDiagnosticOperation.Tests.ps1 new file mode 100644 index 000000000000..d006f19e6635 --- /dev/null +++ b/src/Compute/Compute.Autorest/test/Read-AzDiagnosticOperation.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Read-AzDiagnosticOperation')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Read-AzDiagnosticOperation.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 'Read-AzDiagnosticOperation' { + It 'Read' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ReadViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Compute/Compute.Autorest/test/Register-AzDiskInspectionStorageConfiguration.Tests.ps1 b/src/Compute/Compute.Autorest/test/Register-AzDiskInspectionStorageConfiguration.Tests.ps1 new file mode 100644 index 000000000000..3e110e4bce60 --- /dev/null +++ b/src/Compute/Compute.Autorest/test/Register-AzDiskInspectionStorageConfiguration.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Register-AzDiskInspectionStorageConfiguration')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Register-AzDiskInspectionStorageConfiguration.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 'Register-AzDiskInspectionStorageConfiguration' { + It 'RegisterExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Register' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RegisterViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RegisterViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Compute/Compute.Autorest/test/Test-AzDiskInspectionStorageConfiguration.Tests.ps1 b/src/Compute/Compute.Autorest/test/Test-AzDiskInspectionStorageConfiguration.Tests.ps1 new file mode 100644 index 000000000000..e5421e6cbf0b --- /dev/null +++ b/src/Compute/Compute.Autorest/test/Test-AzDiskInspectionStorageConfiguration.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Test-AzDiskInspectionStorageConfiguration')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzDiskInspectionStorageConfiguration.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 'Test-AzDiskInspectionStorageConfiguration' { + It 'Validate' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ValidateViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} From a61545587ca45414d0d0f2517e03c7b0d1d88f01 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Fri, 15 Mar 2024 15:40:57 -0700 Subject: [PATCH 02/20] Update files after setting directives to add remove cmdlets --- src/Compute/Compute.Autorest/Az.Compute.psd1 | 2 +- src/Compute/Compute.Autorest/README.md | 77 +++++- .../galleries-applications-versions.json | 57 ----- .../galleries-applications.json | 95 ------- .../UX/Microsoft.Compute/locations.json | 75 ++++++ ...ScaleSets-virtualMachines-runCommands.json | 57 ----- .../virtualMachines-runCommands.json | 52 ---- .../Compute.Autorest/docs/Az.Compute.md | 25 +- .../docs/Get-AzGalleryApplicationVersion.md | 192 -------------- ...n.md => Get-AzSpotPlacementRecommender.md} | 81 ++---- ...d => Invoke-AzSpotPlacementRecommender.md} | 154 ++++++----- .../docs/Remove-AzGalleryApplication.md | 225 ---------------- .../Remove-AzGalleryApplicationVersion.md | 240 ------------------ .../docs/Remove-AzVMRunCommand.md | 225 ---------------- .../docs/Remove-AzVmssVMRunCommand.md | 240 ------------------ .../docs/Set-AzVMRunCommand.md | 129 ++-------- .../docs/Set-AzVmssVMRunCommand.md | 131 ++-------- .../examples/Get-AzGalleryApplication.md | 13 - .../Get-AzGalleryApplicationVersion.md | 13 - .../Get-AzSpotPlacementRecommender.md | 22 ++ .../Invoke-AzSpotPlacementRecommender.md | 22 ++ .../examples/Remove-AzGalleryApplication.md | 9 - .../Remove-AzGalleryApplicationVersion.md | 8 - .../examples/Remove-AzVMRunCommand.md | 6 - .../examples/Remove-AzVmssVMRunCommand.md | 6 - .../examples/Update-AzGalleryApplication.md | 7 - 26 files changed, 364 insertions(+), 1799 deletions(-) delete mode 100644 src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications-versions.json delete mode 100644 src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications.json create mode 100644 src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json delete mode 100644 src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachineScaleSets-virtualMachines-runCommands.json delete mode 100644 src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachines-runCommands.json delete mode 100644 src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md rename src/Compute/Compute.Autorest/docs/{Get-AzGalleryApplication.md => Get-AzSpotPlacementRecommender.md} (52%) rename src/Compute/Compute.Autorest/docs/{Update-AzGalleryApplication.md => Invoke-AzSpotPlacementRecommender.md} (53%) delete mode 100644 src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md delete mode 100644 src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md delete mode 100644 src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md delete mode 100644 src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md delete mode 100644 src/Compute/Compute.Autorest/examples/Get-AzGalleryApplication.md delete mode 100644 src/Compute/Compute.Autorest/examples/Get-AzGalleryApplicationVersion.md create mode 100644 src/Compute/Compute.Autorest/examples/Get-AzSpotPlacementRecommender.md create mode 100644 src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md delete mode 100644 src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplication.md delete mode 100644 src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplicationVersion.md delete mode 100644 src/Compute/Compute.Autorest/examples/Remove-AzVMRunCommand.md delete mode 100644 src/Compute/Compute.Autorest/examples/Remove-AzVmssVMRunCommand.md delete mode 100644 src/Compute/Compute.Autorest/examples/Update-AzGalleryApplication.md diff --git a/src/Compute/Compute.Autorest/Az.Compute.psd1 b/src/Compute/Compute.Autorest/Az.Compute.psd1 index f3641cbe6b9e..6ba7cf6763da 100644 --- a/src/Compute/Compute.Autorest/Az.Compute.psd1 +++ b/src/Compute/Compute.Autorest/Az.Compute.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.Compute.private.dll' FormatsToProcess = './Az.Compute.format.ps1xml' - FunctionsToExport = 'Get-AzGalleryApplication', 'Get-AzGalleryApplicationVersion', 'New-AzGalleryApplication', 'New-AzGalleryApplicationVersion', 'Remove-AzGalleryApplication', 'Remove-AzGalleryApplicationVersion', 'Remove-AzVMRunCommand', 'Remove-AzVmssVMRunCommand', 'Set-AzVMRunCommand', 'Set-AzVmssVMRunCommand', 'Update-AzGalleryApplication', 'Update-AzGalleryApplicationVersion', '*' + FunctionsToExport = 'Get-AzSpotPlacementRecommender', 'Invoke-AzSpotPlacementRecommender', 'New-AzGalleryApplication', 'New-AzGalleryApplicationVersion', 'Set-AzVMRunCommand', 'Set-AzVmssVMRunCommand', 'Update-AzGalleryApplicationVersion', '*' AliasesToExport = '*' PrivateData = @{ PSData = @{ diff --git a/src/Compute/Compute.Autorest/README.md b/src/Compute/Compute.Autorest/README.md index 991f1aa1566e..6ec45fad1ede 100644 --- a/src/Compute/Compute.Autorest/README.md +++ b/src/Compute/Compute.Autorest/README.md @@ -30,11 +30,13 @@ commit: 1a925d1afe288a5f20d078bbc89214a36a0e4287 require: # readme.azure.noprofile.md is the common configuration file - $(this-folder)/../../readme.azure.noprofile.md +# - $(this-folder)/../../../../../azure-rest-api-specs/specification/compute/resource-manager/readme.md input-file: # You need to specify your swagger files here. - $(repo)/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2022-01-03/gallery.json - $(repo)/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2023-07-01/runCommand.json - - $(repo)/specification/compute/resource-manager/Microsoft.Compute/common-types/v1/common.json +# - $(repo)/specification/compute/resource-manager/Microsoft.Compute/common-types/v1/common.json + - $(this-folder)/../../../../../azure-rest-api-specs/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/preview/2024-03-01-preview/diagnostic.json # If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally module-version: 0.3.0 # Normally, title is the service name @@ -232,4 +234,77 @@ directive: subject: VMRunCommand|VmssVMRunCommand verb: Get remove: true + ### Remove All Diagnostic cmdlets aside from Invoke Spot Placement Recommender - generate ONLY SpotPlacementRecommender cmdlets + - where: + verb: Get + subject: Diagnostic + remove: true + - where: + verb: Get + subject: DiskInspection + remove: true + - where: + verb: Get + subject: GalleryApplication + remove: true + - where: + verb: New + subject: GalleryApplication + remove: true + - where: + verb: Remove + subject: GalleryApplication + remove: true + - where: + verb: Update + subject: GalleryApplication + remove: true + - where: + verb: Get + subject: GalleryApplicationVersion + remove: true + - where: + verb: New + subject: GalleryApplicationVersion + remove: true + - where: + verb: Remove + subject: GalleryApplicationVersion + remove: true + - where: + verb: Update + subject: GalleryApplicationVersion + remove: true + - where: + verb: New + subject: DiskInspection + remove: true + - where: + verb: Read + subject: DiagnosticOperation + remove: true + - where: + verb: Register + subject: DiskInspectionStorageConfiguration + remove: true + - where: + verb: Remove + subject: VMRunCommand + remove: true + - where: + verb: Remove + subject: VmssVMRunCommand + remove: true + - where: + verb: Set + subject: VMRunCommand + remove: true + - where: + verb: Set + subject: VmssVMRunCommand + remove: true + - where: + verb: Test + subject: DiskInspectionStorageConfiguration + remove: true ``` diff --git a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications-versions.json b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications-versions.json deleted file mode 100644 index 792ba0f993d1..000000000000 --- a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications-versions.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "resourceType": "galleries/applications/versions", - "apiVersion": "2022-01-03", - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.compute" - }, - "commands": [ - { - "name": "Remove-AzGalleryApplicationVersion", - "description": "Delete a gallery Application Version.", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", - "help": { - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.compute/remove-azgalleryapplicationversion" - }, - "parameterSets": [ - { - "parameters": [ - "-GalleryApplicationName ", - "-GalleryName ", - "-Name ", - "-ResourceGroupName ", - "[-SubscriptionId ]" - ] - } - ] - }, - "examples": [ - { - "description": "Delete a gallery Application Version.", - "parameters": [ - { - "name": "-GalleryApplicationName", - "value": "[Path.galleryApplicationName]" - }, - { - "name": "-GalleryName", - "value": "[Path.galleryName]" - }, - { - "name": "-Name", - "value": "[Path.galleryApplicationVersionName]" - }, - { - "name": "-ResourceGroupName", - "value": "[Path.resourceGroupName]" - }, - { - "name": "-SubscriptionId", - "value": "[Path.subscriptionId]" - } - ] - } - ] - } - ] -} diff --git a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications.json b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications.json deleted file mode 100644 index 3ba84f5920f7..000000000000 --- a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "resourceType": "galleries/applications", - "apiVersion": "2022-01-03", - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.compute" - }, - "commands": [ - { - "name": "Get-AzGalleryApplication", - "description": "Retrieves information about a gallery Application Definition.", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", - "help": { - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.compute/get-azgalleryapplication" - }, - "parameterSets": [ - { - "parameters": [ - "-GalleryName ", - "-Name ", - "-ResourceGroupName ", - "[-SubscriptionId ]" - ] - } - ] - }, - "examples": [ - { - "description": "Retrieves information about a gallery Application Definition.", - "parameters": [ - { - "name": "-GalleryName", - "value": "[Path.galleryName]" - }, - { - "name": "-Name", - "value": "[Path.galleryApplicationName]" - }, - { - "name": "-ResourceGroupName", - "value": "[Path.resourceGroupName]" - }, - { - "name": "-SubscriptionId", - "value": "[Path.subscriptionId]" - } - ] - } - ] - }, - { - "name": "Remove-AzGalleryApplication", - "description": "Delete a gallery Application.", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", - "help": { - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.compute/remove-azgalleryapplication" - }, - "parameterSets": [ - { - "parameters": [ - "-GalleryName ", - "-Name ", - "-ResourceGroupName ", - "[-SubscriptionId ]" - ] - } - ] - }, - "examples": [ - { - "description": "Delete a gallery Application.", - "parameters": [ - { - "name": "-GalleryName", - "value": "[Path.galleryName]" - }, - { - "name": "-Name", - "value": "[Path.galleryApplicationName]" - }, - { - "name": "-ResourceGroupName", - "value": "[Path.resourceGroupName]" - }, - { - "name": "-SubscriptionId", - "value": "[Path.subscriptionId]" - } - ] - } - ] - } - ] -} diff --git a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json new file mode 100644 index 000000000000..1e922e848d84 --- /dev/null +++ b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json @@ -0,0 +1,75 @@ +{ + "resourceType": "locations", + "apiVersion": "2021-06-01-preview", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.compute" + }, + "commands": [ + { + "name": "Get-AzSpotPlacementRecommender", + "description": "Gets Spot Placement Recommender diagnostic metadata.", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.compute/get-azspotplacementrecommender" + }, + "parameterSets": [ + { + "parameters": [ + "-Location ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Gets Spot Placement Recommender diagnostic metadata.", + "parameters": [ + { + "name": "-Location", + "value": "[Path.location]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Invoke-AzSpotPlacementRecommender", + "description": "Generates placement scores for Spot VM skus.", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender/generate", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.compute/invoke-azspotplacementrecommender" + }, + "parameterSets": [ + { + "parameters": [ + "-Location ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Generates placement scores for Spot VM skus.", + "parameters": [ + { + "name": "-Location", + "value": "[Path.location]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachineScaleSets-virtualMachines-runCommands.json b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachineScaleSets-virtualMachines-runCommands.json deleted file mode 100644 index a5a9b418c7d2..000000000000 --- a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachineScaleSets-virtualMachines-runCommands.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "resourceType": "virtualMachineScaleSets/virtualMachines/runCommands", - "apiVersion": "2023-07-01", - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.compute" - }, - "commands": [ - { - "name": "Remove-AzVmssVMRunCommand", - "description": "The operation to delete the VMSS VM run command.", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", - "help": { - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.compute/remove-azvmssvmruncommand" - }, - "parameterSets": [ - { - "parameters": [ - "-InstanceId ", - "-ResourceGroupName ", - "-RunCommandName ", - "[-SubscriptionId ]", - "-VMScaleSetName " - ] - } - ] - }, - "examples": [ - { - "description": "The operation to delete the VMSS VM run command.", - "parameters": [ - { - "name": "-InstanceId", - "value": "[Path.instanceId]" - }, - { - "name": "-ResourceGroupName", - "value": "[Path.resourceGroupName]" - }, - { - "name": "-RunCommandName", - "value": "[Path.runCommandName]" - }, - { - "name": "-SubscriptionId", - "value": "[Path.subscriptionId]" - }, - { - "name": "-VMScaleSetName", - "value": "[Path.vmScaleSetName]" - } - ] - } - ] - } - ] -} diff --git a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachines-runCommands.json b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachines-runCommands.json deleted file mode 100644 index 8e3f8b28e8a9..000000000000 --- a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachines-runCommands.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "resourceType": "virtualMachines/runCommands", - "apiVersion": "2023-07-01", - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.compute" - }, - "commands": [ - { - "name": "Remove-AzVMRunCommand", - "description": "The operation to delete the run command.", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", - "help": { - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.compute/remove-azvmruncommand" - }, - "parameterSets": [ - { - "parameters": [ - "-ResourceGroupName ", - "-RunCommandName ", - "[-SubscriptionId ]", - "-VMName " - ] - } - ] - }, - "examples": [ - { - "description": "The operation to delete the run command.", - "parameters": [ - { - "name": "-ResourceGroupName", - "value": "[Path.resourceGroupName]" - }, - { - "name": "-RunCommandName", - "value": "[Path.runCommandName]" - }, - { - "name": "-SubscriptionId", - "value": "[Path.subscriptionId]" - }, - { - "name": "-VMName", - "value": "[Path.vmName]" - } - ] - } - ] - } - ] -} diff --git a/src/Compute/Compute.Autorest/docs/Az.Compute.md b/src/Compute/Compute.Autorest/docs/Az.Compute.md index 123fbb5af406..dd11bf630f22 100644 --- a/src/Compute/Compute.Autorest/docs/Az.Compute.md +++ b/src/Compute/Compute.Autorest/docs/Az.Compute.md @@ -11,11 +11,11 @@ Locale: en-US Microsoft Azure PowerShell: Compute cmdlets ## Az.Compute Cmdlets -### [Get-AzGalleryApplication](Get-AzGalleryApplication.md) -Retrieves information about a gallery Application Definition. +### [Get-AzSpotPlacementRecommender](Get-AzSpotPlacementRecommender.md) +Gets Spot Placement Recommender diagnostic metadata. -### [Get-AzGalleryApplicationVersion](Get-AzGalleryApplicationVersion.md) -Retrieves information about a gallery Application Version. +### [Invoke-AzSpotPlacementRecommender](Invoke-AzSpotPlacementRecommender.md) +Generates placement scores for Spot VM skus. ### [New-AzGalleryApplication](New-AzGalleryApplication.md) Create or update a gallery Application Definition. @@ -23,26 +23,11 @@ Create or update a gallery Application Definition. ### [New-AzGalleryApplicationVersion](New-AzGalleryApplicationVersion.md) Create or update a gallery Application Version. -### [Remove-AzGalleryApplication](Remove-AzGalleryApplication.md) -Delete a gallery Application. - -### [Remove-AzGalleryApplicationVersion](Remove-AzGalleryApplicationVersion.md) -Delete a gallery Application Version. - -### [Remove-AzVMRunCommand](Remove-AzVMRunCommand.md) -The operation to delete the run command. - -### [Remove-AzVmssVMRunCommand](Remove-AzVmssVMRunCommand.md) -The operation to delete the VMSS VM run command. - ### [Set-AzVMRunCommand](Set-AzVMRunCommand.md) -The operation to create or update the run command. + ### [Set-AzVmssVMRunCommand](Set-AzVmssVMRunCommand.md) -The operation to create or update the VMSS VM run command. -### [Update-AzGalleryApplication](Update-AzGalleryApplication.md) -Update a gallery Application Definition. ### [Update-AzGalleryApplicationVersion](Update-AzGalleryApplicationVersion.md) Update a gallery Application Version. diff --git a/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md deleted file mode 100644 index 50132259d262..000000000000 --- a/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md +++ /dev/null @@ -1,192 +0,0 @@ ---- -external help file: -Module Name: Az.Compute -online version: https://learn.microsoft.com/powershell/module/az.compute/get-azgalleryapplicationversion -schema: 2.0.0 ---- - -# Get-AzGalleryApplicationVersion - -## SYNOPSIS -Retrieves information about a gallery Application Version. - -## SYNTAX - -### List (Default) -``` -Get-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName - -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] -``` - -### Get -``` -Get-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName -Name - -ResourceGroupName [-SubscriptionId ] [-Expand ] - [-DefaultProfile ] [] -``` - -### GetViaIdentity -``` -Get-AzGalleryApplicationVersion -InputObject [-Expand ] - [-DefaultProfile ] [] -``` - -## DESCRIPTION -Retrieves information about a gallery Application Version. - -## EXAMPLES - -### Example 1: Get a Gallery Application Version -```powershell -Get-AzGalleryApplicationVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryApplicationName $galleryAppName -Name $versionName -``` - -Retrieve a Gallery Application Version resource with the provided Resource Group, Gallery, Gallery Application name, and version name. - -### Example 2: Get all the Gallery Application Versions in a GalleryApplication -```powershell -Get-AzGalleryApplicationVersion -GalleryName $GalleryName -ResourceGroupName $rgName -GalleryApplicationName $galleryAppName -``` - -Retrieve all the Gallery Application Version resources in the provided Resource Group, Gallery, and Gallery Application Name. - -## PARAMETERS - -### -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 -``` - -### -Expand -The expand expression to apply on the operation. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes -Parameter Sets: Get, GetViaIdentity -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GalleryApplicationName -The name of the gallery Application Definition in which the Application Version resides. - -```yaml -Type: System.String -Parameter Sets: Get, List -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GalleryName -The name of the Shared Application Gallery in which the Application Definition resides. - -```yaml -Type: System.String -Parameter Sets: Get, List -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -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.Compute.Models.IComputeIdentity -Parameter Sets: GetViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -Name -The name of the gallery Application Version to be retrieved. - -```yaml -Type: System.String -Parameter Sets: Get -Aliases: GalleryApplicationVersionName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The name of the resource group. - -```yaml -Type: System.String -Parameter Sets: Get, List -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. - -```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.Compute.Models.IComputeIdentity - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion - -## NOTES - -## RELATED LINKS - diff --git a/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplication.md b/src/Compute/Compute.Autorest/docs/Get-AzSpotPlacementRecommender.md similarity index 52% rename from src/Compute/Compute.Autorest/docs/Get-AzGalleryApplication.md rename to src/Compute/Compute.Autorest/docs/Get-AzSpotPlacementRecommender.md index e70a0ada7410..30f116916554 100644 --- a/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplication.md +++ b/src/Compute/Compute.Autorest/docs/Get-AzSpotPlacementRecommender.md @@ -1,52 +1,55 @@ --- external help file: Module Name: Az.Compute -online version: https://learn.microsoft.com/powershell/module/az.compute/get-azgalleryapplication +online version: https://learn.microsoft.com/powershell/module/az.compute/get-azspotplacementrecommender schema: 2.0.0 --- -# Get-AzGalleryApplication +# Get-AzSpotPlacementRecommender ## SYNOPSIS -Retrieves information about a gallery Application Definition. +Gets Spot Placement Recommender diagnostic metadata. ## SYNTAX -### List (Default) +### Get (Default) ``` -Get-AzGalleryApplication -GalleryName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] -``` - -### Get -``` -Get-AzGalleryApplication -GalleryName -Name -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [] +Get-AzSpotPlacementRecommender -Location [-SubscriptionId ] [-DefaultProfile ] + [] ``` ### GetViaIdentity ``` -Get-AzGalleryApplication -InputObject [-DefaultProfile ] [] +Get-AzSpotPlacementRecommender -InputObject [-DefaultProfile ] + [] ``` ## DESCRIPTION -Retrieves information about a gallery Application Definition. +Gets Spot Placement Recommender diagnostic metadata. ## EXAMPLES -### Example 1: Get a Gallery Application in a Gallery +### Example 1: {{ Add title here }} ```powershell -Get-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -name $galleryAppName +{{ Add code here }} +``` + +```output +{{ Add output here }} ``` -Retrieve a Gallery Application resource with the provided Resource Group, Gallery, and Gallery Application name. +{{ Add description here }} -### Example 2: Get all the Gallery Applications in a Gallery +### Example 2: {{ Add title here }} ```powershell -Get-AzGalleryApplication -GalleryName $GalleryName -ResourceGroupName $rgName +{{ Add code here }} +``` + +```output +{{ Add output here }} ``` -Retrieve all the Gallery Application resources in the provided Resource Group and Gallery. +{{ Add description here }} ## PARAMETERS @@ -66,21 +69,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -GalleryName -The name of the Shared Application Gallery from which the Application Definitions are to be retrieved. - -```yaml -Type: System.String -Parameter Sets: Get, List -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -InputObject Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. @@ -97,27 +85,12 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` -### -Name -The name of the gallery Application Definition to be retrieved. +### -Location +The name of the Azure region. ```yaml Type: System.String Parameter Sets: Get -Aliases: GalleryApplicationName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The name of the resource group. - -```yaml -Type: System.String -Parameter Sets: Get, List Aliases: Required: True @@ -133,7 +106,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String[] -Parameter Sets: Get, List +Parameter Sets: Get Aliases: Required: False @@ -152,7 +125,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210601Preview.IComputeDiagnosticBase ## NOTES diff --git a/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplication.md b/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md similarity index 53% rename from src/Compute/Compute.Autorest/docs/Update-AzGalleryApplication.md rename to src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md index 85937b4b9c64..090bf67c3916 100644 --- a/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplication.md +++ b/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md @@ -1,50 +1,80 @@ --- external help file: Module Name: Az.Compute -online version: https://learn.microsoft.com/powershell/module/az.compute/update-azgalleryapplication +online version: https://learn.microsoft.com/powershell/module/az.compute/invoke-azspotplacementrecommender schema: 2.0.0 --- -# Update-AzGalleryApplication +# Invoke-AzSpotPlacementRecommender ## SYNOPSIS -Update a gallery Application Definition. +Generates placement scores for Spot VM skus. ## SYNTAX -### UpdateExpanded (Default) +### PostExpanded (Default) ``` -Update-AzGalleryApplication -GalleryName -Name -ResourceGroupName - [-SubscriptionId ] [-Description ] [-Tag ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-Confirm] [-WhatIf] [] +Invoke-AzSpotPlacementRecommender -Location [-SubscriptionId ] [-AvailabilityZone] + [-DesiredCount ] [-DesiredLocation ] [-DesiredSize ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` -### UpdateViaIdentityExpanded +### Post ``` -Update-AzGalleryApplication -InputObject [-Description ] [-Tag ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +Invoke-AzSpotPlacementRecommender -Location + -SpotPlacementRecommenderInput [-SubscriptionId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### PostViaIdentity +``` +Invoke-AzSpotPlacementRecommender -InputObject + -SpotPlacementRecommenderInput [-DefaultProfile ] [-Confirm] + [-WhatIf] [] +``` + +### PostViaIdentityExpanded +``` +Invoke-AzSpotPlacementRecommender -InputObject [-AvailabilityZone] [-DesiredCount ] + [-DesiredLocation ] [-DesiredSize ] [-DefaultProfile ] [-Confirm] + [-WhatIf] [] ``` ## DESCRIPTION -Update a gallery Application Definition. +Generates placement scores for Spot VM skus. ## EXAMPLES -### Example 1: Update a Gallery Application +### Example 1: {{ Add title here }} ```powershell -Update-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -Name $name -Description "New Description" +{{ Add code here }} +``` + +```output +{{ Add output here }} ``` -Updating a Gallery Application. +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} ## PARAMETERS -### -AsJob -Run the command as a job +### -AvailabilityZone +Defines if the scope is zonal or regional. ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Parameter Sets: PostExpanded, PostViaIdentityExpanded Aliases: Required: False @@ -70,13 +100,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Description -The description of this gallery Application Definition resource. -This property is updatable. +### -DesiredCount +Desired instance count per region/zone based on the scope. ```yaml -Type: System.String -Parameter Sets: (All) +Type: System.Int32 +Parameter Sets: PostExpanded, PostViaIdentityExpanded Aliases: Required: False @@ -86,81 +115,81 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -GalleryName -The name of the Shared Application Gallery in which the Application Definition is to be updated. +### -DesiredLocation +The desired regions ```yaml -Type: System.String -Parameter Sets: UpdateExpanded +Type: System.String[] +Parameter Sets: PostExpanded, PostViaIdentityExpanded Aliases: -Required: True +Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +### -DesiredSize +The desired resource SKUs. +To construct, see NOTES section for DESIREDSIZE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity -Parameter Sets: UpdateViaIdentityExpanded +Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210601Preview.IResourceSize[] +Parameter Sets: PostExpanded, PostViaIdentityExpanded Aliases: -Required: True +Required: False Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: False Accept wildcard characters: False ``` -### -Name -The name of the gallery Application Definition to be updated. -The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. -The maximum length is 80 characters. +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml -Type: System.String -Parameter Sets: UpdateExpanded -Aliases: GalleryApplicationName +Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity +Parameter Sets: PostViaIdentity, PostViaIdentityExpanded +Aliases: Required: True Position: Named Default value: None -Accept pipeline input: False +Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` -### -NoWait -Run the command asynchronously +### -Location +The name of the Azure region. ```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) +Type: System.String +Parameter Sets: Post, PostExpanded Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` -### -ResourceGroupName -The name of the resource group. +### -SpotPlacementRecommenderInput +SpotPlacementRecommender API Input. +To construct, see NOTES section for SPOTPLACEMENTRECOMMENDERINPUT properties and create a hash table. ```yaml -Type: System.String -Parameter Sets: UpdateExpanded +Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210601Preview.ISpotPlacementRecommenderInput +Parameter Sets: Post, PostViaIdentity Aliases: Required: True Position: Named Default value: None -Accept pipeline input: False +Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` @@ -170,7 +199,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String -Parameter Sets: UpdateExpanded +Parameter Sets: Post, PostExpanded Aliases: Required: False @@ -180,21 +209,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Tag -Resource tags - -```yaml -Type: System.Collections.Hashtable -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. @@ -231,11 +245,13 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210601Preview.ISpotPlacementRecommenderInput + ### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210601Preview.ISpotPlacementRecommenderResponse ## NOTES diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md b/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md deleted file mode 100644 index 3105775cf2af..000000000000 --- a/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md +++ /dev/null @@ -1,225 +0,0 @@ ---- -external help file: -Module Name: Az.Compute -online version: https://learn.microsoft.com/powershell/module/az.compute/remove-azgalleryapplication -schema: 2.0.0 ---- - -# Remove-AzGalleryApplication - -## SYNOPSIS -Delete a gallery Application. - -## SYNTAX - -### Delete (Default) -``` -Remove-AzGalleryApplication -GalleryName -Name -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] - [] -``` - -### DeleteViaIdentity -``` -Remove-AzGalleryApplication -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] -``` - -## DESCRIPTION -Delete a gallery Application. - -## EXAMPLES - -### Example 1: Remove a Gallery Application -```powershell -Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -Name $name -``` - -Delete a gallery application. - -## PARAMETERS - -### -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 -``` - -### -GalleryName -The name of the Shared Application Gallery in which the Application Definition is to be deleted. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -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.Compute.Models.IComputeIdentity -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 gallery Application Definition to be deleted. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: GalleryApplicationName - -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. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. - -```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.Compute.Models.IComputeIdentity - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS - diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md deleted file mode 100644 index 1b6292ad57e8..000000000000 --- a/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md +++ /dev/null @@ -1,240 +0,0 @@ ---- -external help file: -Module Name: Az.Compute -online version: https://learn.microsoft.com/powershell/module/az.compute/remove-azgalleryapplicationversion -schema: 2.0.0 ---- - -# Remove-AzGalleryApplicationVersion - -## SYNOPSIS -Delete a gallery Application Version. - -## SYNTAX - -### Delete (Default) -``` -Remove-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName -Name - -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] -``` - -### DeleteViaIdentity -``` -Remove-AzGalleryApplicationVersion -InputObject [-DefaultProfile ] [-AsJob] - [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] -``` - -## DESCRIPTION -Delete a gallery Application Version. - -## EXAMPLES - -### Example 1: Remove a Gallery Application Version -```powershell -Remove-AzGalleryApplicationVersion -ResourceGroupName $rgNmae -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -Name $name -``` - -Delete a gallery application version. - -## PARAMETERS - -### -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 -``` - -### -GalleryApplicationName -The name of the gallery Application Definition in which the Application Version resides. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GalleryName -The name of the Shared Application Gallery in which the Application Definition resides. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -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.Compute.Models.IComputeIdentity -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 gallery Application Version to be deleted. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: GalleryApplicationVersionName - -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. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. - -```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.Compute.Models.IComputeIdentity - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS - diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md deleted file mode 100644 index f24796d2f19e..000000000000 --- a/src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md +++ /dev/null @@ -1,225 +0,0 @@ ---- -external help file: -Module Name: Az.Compute -online version: https://learn.microsoft.com/powershell/module/az.compute/remove-azvmruncommand -schema: 2.0.0 ---- - -# Remove-AzVMRunCommand - -## SYNOPSIS -The operation to delete the run command. - -## SYNTAX - -### Delete (Default) -``` -Remove-AzVMRunCommand -ResourceGroupName -RunCommandName -VMName - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] - [] -``` - -### DeleteViaIdentity -``` -Remove-AzVMRunCommand -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] -``` - -## DESCRIPTION -The operation to delete the run command. - -## EXAMPLES - -### Example 1: Remove Run Command -```powershell -Remove-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand" -``` - -Remove a Run Command by its Name - -## PARAMETERS - -### -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 -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity -Parameter Sets: DeleteViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -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. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RunCommandName -The name of the virtual machine run command. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. - -```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 -``` - -### -VMName -The name of the virtual machine where the run command should be deleted. - -```yaml -Type: System.String -Parameter Sets: Delete -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 - -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS - diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md deleted file mode 100644 index 7e720fadb80d..000000000000 --- a/src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md +++ /dev/null @@ -1,240 +0,0 @@ ---- -external help file: -Module Name: Az.Compute -online version: https://learn.microsoft.com/powershell/module/az.compute/remove-azvmssvmruncommand -schema: 2.0.0 ---- - -# Remove-AzVmssVMRunCommand - -## SYNOPSIS -The operation to delete the VMSS VM run command. - -## SYNTAX - -### Delete (Default) -``` -Remove-AzVmssVMRunCommand -InstanceId -ResourceGroupName -RunCommandName - -VMScaleSetName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] -``` - -### DeleteViaIdentity -``` -Remove-AzVmssVMRunCommand -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] -``` - -## DESCRIPTION -The operation to delete the VMSS VM run command. - -## EXAMPLES - -### Example 1: Remove VMSS VM RunCommand -```powershell -Remove-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname -``` - -Remove VMSS VM RunCommand - -## PARAMETERS - -### -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 -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity -Parameter Sets: DeleteViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -InstanceId -The instance ID of the virtual machine. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: - -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. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RunCommandName -The name of the virtual machine run command. - -```yaml -Type: System.String -Parameter Sets: Delete -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. - -```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 -``` - -### -VMScaleSetName -The name of the VM scale set. - -```yaml -Type: System.String -Parameter Sets: Delete -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 - -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity - -## OUTPUTS - -### System.Boolean - -## NOTES - -## RELATED LINKS - diff --git a/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md index d7c04dced033..b8a3605f5096 100644 --- a/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md +++ b/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md @@ -8,25 +8,10 @@ schema: 2.0.0 # Set-AzVMRunCommand ## SYNOPSIS -The operation to create or update the run command. -## SYNTAX -### UpdateExpanded (Default) -``` -Set-AzVMRunCommand -ResourceGroupName -RunCommandName -VMName -Location - [-SubscriptionId ] [-AsyncExecution] [-ErrorBlobManagedIdentityClientId ] - [-ErrorBlobManagedIdentityObjectId ] [-ErrorBlobUri ] - [-OutputBlobManagedIdentityClientId ] [-OutputBlobManagedIdentityObjectId ] - [-OutputBlobUri ] [-Parameter ] - [-ProtectedParameter ] [-RunAsPassword ] [-RunAsUser ] - [-ScriptUriManagedIdentityClientId ] [-ScriptUriManagedIdentityObjectId ] - [-SourceCommandId ] [-SourceScript ] [-SourceScriptUri ] [-Tag ] - [-TimeoutInSecond ] [-TreatFailureAsDeploymentFailure] [-DefaultProfile ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] -``` +## SYNTAX -### ScriptLocalPath ``` Set-AzVMRunCommand -ResourceGroupName -RunCommandName -VMName -Location -ScriptLocalPath [-SubscriptionId ] [-AsyncExecution] @@ -41,7 +26,7 @@ Set-AzVMRunCommand -ResourceGroupName -RunCommandName -VMName ``` ## DESCRIPTION -The operation to create or update the run command. + ## EXAMPLES @@ -138,7 +123,7 @@ For RunAs to work properly, contact admin of VM and make sure user is added on t ## PARAMETERS ### -AsJob -Run the command as a job + ```yaml Type: System.Management.Automation.SwitchParameter @@ -153,8 +138,7 @@ Accept wildcard characters: False ``` ### -AsyncExecution -Optional. -If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. + ```yaml Type: System.Management.Automation.SwitchParameter @@ -169,8 +153,7 @@ 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 @@ -185,8 +168,7 @@ Accept wildcard characters: False ``` ### -ErrorBlobManagedIdentityClientId -Client Id (GUID value) of the user-assigned managed identity. -ObjectId should not be used if this is provided. + ```yaml Type: System.String @@ -201,8 +183,7 @@ Accept wildcard characters: False ``` ### -ErrorBlobManagedIdentityObjectId -Object Id (GUID value) of the user-assigned managed identity. -ClientId should not be used if this is provided. + ```yaml Type: System.String @@ -217,9 +198,7 @@ Accept wildcard characters: False ``` ### -ErrorBlobUri -Specifies the Azure storage blob where script error stream will be uploaded. -Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. -Refer errorBlobManagedIdentity parameter. + ```yaml Type: System.String @@ -234,7 +213,7 @@ Accept wildcard characters: False ``` ### -Location -Resource location + ```yaml Type: System.String @@ -249,7 +228,7 @@ Accept wildcard characters: False ``` ### -NoWait -Run the command asynchronously + ```yaml Type: System.Management.Automation.SwitchParameter @@ -264,8 +243,7 @@ Accept wildcard characters: False ``` ### -OutputBlobManagedIdentityClientId -Client Id (GUID value) of the user-assigned managed identity. -ObjectId should not be used if this is provided. + ```yaml Type: System.String @@ -280,8 +258,7 @@ Accept wildcard characters: False ``` ### -OutputBlobManagedIdentityObjectId -Object Id (GUID value) of the user-assigned managed identity. -ClientId should not be used if this is provided. + ```yaml Type: System.String @@ -296,9 +273,7 @@ Accept wildcard characters: False ``` ### -OutputBlobUri -Specifies the Azure storage blob where script output stream will be uploaded. -Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. -Refer outputBlobManagedIdentity parameter. + ```yaml Type: System.String @@ -313,7 +288,6 @@ Accept wildcard characters: False ``` ### -Parameter -The parameters used by the script. To construct, see NOTES section for PARAMETER properties and create a hash table. ```yaml @@ -329,7 +303,6 @@ Accept wildcard characters: False ``` ### -ProtectedParameter -The parameters used by the script. To construct, see NOTES section for PROTECTEDPARAMETER properties and create a hash table. ```yaml @@ -345,7 +318,7 @@ Accept wildcard characters: False ``` ### -ResourceGroupName -The name of the resource group. + ```yaml Type: System.String @@ -360,7 +333,7 @@ Accept wildcard characters: False ``` ### -RunAsPassword -Specifies the user account password on the VM when executing the run command. + ```yaml Type: System.String @@ -375,7 +348,7 @@ Accept wildcard characters: False ``` ### -RunAsUser -Specifies the user account on the VM when executing the run command. + ```yaml Type: System.String @@ -390,7 +363,7 @@ Accept wildcard characters: False ``` ### -RunCommandName -The name of the virtual machine run command. + ```yaml Type: System.String @@ -409,7 +382,7 @@ Accept wildcard characters: False ```yaml Type: System.String -Parameter Sets: ScriptLocalPath +Parameter Sets: (All) Aliases: Required: True @@ -420,24 +393,7 @@ Accept wildcard characters: False ``` ### -ScriptUriManagedIdentityClientId -Client Id (GUID value) of the user-assigned managed identity. -ObjectId should not be used if this is provided. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ScriptUriManagedIdentityObjectId -Object Id (GUID value) of the user-assigned managed identity. -ClientId should not be used if this is provided. ```yaml Type: System.String @@ -451,43 +407,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -SourceCommandId -Specifies a commandId of predefined built-in script. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SourceScript -Specifies the script content to be executed on the VM. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` +### -ScriptUriManagedIdentityObjectId -### -SourceScriptUri -Specifies the script download location. -It can be either SAS URI of an Azure storage blob with read access or public URI. ```yaml Type: System.String -Parameter Sets: UpdateExpanded +Parameter Sets: (All) Aliases: Required: False @@ -498,8 +423,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. + ```yaml Type: System.String @@ -514,7 +438,7 @@ Accept wildcard characters: False ``` ### -Tag -Resource tags + ```yaml Type: System.Collections.Hashtable @@ -529,7 +453,7 @@ Accept wildcard characters: False ``` ### -TimeoutInSecond -The timeout in seconds to execute the run command. + ```yaml Type: System.Int32 @@ -544,10 +468,7 @@ Accept wildcard characters: False ``` ### -TreatFailureAsDeploymentFailure -Optional. -If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. -If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. -See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results + ```yaml Type: System.Management.Automation.SwitchParameter @@ -562,7 +483,7 @@ Accept wildcard characters: False ``` ### -VMName -The name of the virtual machine where the run command should be created or updated. + ```yaml Type: System.String diff --git a/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md index 3787ad2df8d9..69e55f837e9b 100644 --- a/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md +++ b/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md @@ -8,25 +8,10 @@ schema: 2.0.0 # Set-AzVmssVMRunCommand ## SYNOPSIS -The operation to create or update the VMSS VM run command. -## SYNTAX -### UpdateExpanded (Default) -``` -Set-AzVmssVMRunCommand -InstanceId -ResourceGroupName -RunCommandName - -VMScaleSetName -Location [-SubscriptionId ] [-AsyncExecution] - [-ErrorBlobManagedIdentityClientId ] [-ErrorBlobManagedIdentityObjectId ] - [-ErrorBlobUri ] [-OutputBlobManagedIdentityClientId ] - [-OutputBlobManagedIdentityObjectId ] [-OutputBlobUri ] - [-Parameter ] [-ProtectedParameter ] - [-RunAsPassword ] [-RunAsUser ] [-ScriptUriManagedIdentityClientId ] - [-ScriptUriManagedIdentityObjectId ] [-SourceCommandId ] [-SourceScript ] - [-SourceScriptUri ] [-Tag ] [-TimeoutInSecond ] [-TreatFailureAsDeploymentFailure] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` +## SYNTAX -### ScriptLocalPath ``` Set-AzVmssVMRunCommand -InstanceId -ResourceGroupName -RunCommandName -VMScaleSetName -Location -ScriptLocalPath [-SubscriptionId ] @@ -41,7 +26,7 @@ Set-AzVmssVMRunCommand -InstanceId -ResourceGroupName -RunComm ``` ## DESCRIPTION -The operation to create or update the VMSS VM run command. + ## EXAMPLES @@ -138,7 +123,7 @@ For RunAs to work properly, contact admin of VM and make sure user is added on t ## PARAMETERS ### -AsJob -Run the command as a job + ```yaml Type: System.Management.Automation.SwitchParameter @@ -153,8 +138,7 @@ Accept wildcard characters: False ``` ### -AsyncExecution -Optional. -If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. + ```yaml Type: System.Management.Automation.SwitchParameter @@ -169,8 +153,7 @@ 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 @@ -185,8 +168,7 @@ Accept wildcard characters: False ``` ### -ErrorBlobManagedIdentityClientId -Client Id (GUID value) of the user-assigned managed identity. -ObjectId should not be used if this is provided. + ```yaml Type: System.String @@ -201,8 +183,7 @@ Accept wildcard characters: False ``` ### -ErrorBlobManagedIdentityObjectId -Object Id (GUID value) of the user-assigned managed identity. -ClientId should not be used if this is provided. + ```yaml Type: System.String @@ -217,9 +198,7 @@ Accept wildcard characters: False ``` ### -ErrorBlobUri -Specifies the Azure storage blob where script error stream will be uploaded. -Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. -Refer errorBlobManagedIdentity parameter. + ```yaml Type: System.String @@ -234,7 +213,7 @@ Accept wildcard characters: False ``` ### -InstanceId -The instance ID of the virtual machine. + ```yaml Type: System.String @@ -249,7 +228,7 @@ Accept wildcard characters: False ``` ### -Location -Resource location + ```yaml Type: System.String @@ -264,7 +243,7 @@ Accept wildcard characters: False ``` ### -NoWait -Run the command asynchronously + ```yaml Type: System.Management.Automation.SwitchParameter @@ -279,8 +258,7 @@ Accept wildcard characters: False ``` ### -OutputBlobManagedIdentityClientId -Client Id (GUID value) of the user-assigned managed identity. -ObjectId should not be used if this is provided. + ```yaml Type: System.String @@ -295,8 +273,7 @@ Accept wildcard characters: False ``` ### -OutputBlobManagedIdentityObjectId -Object Id (GUID value) of the user-assigned managed identity. -ClientId should not be used if this is provided. + ```yaml Type: System.String @@ -311,9 +288,7 @@ Accept wildcard characters: False ``` ### -OutputBlobUri -Specifies the Azure storage blob where script output stream will be uploaded. -Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. -Refer outputBlobManagedIdentity parameter. + ```yaml Type: System.String @@ -328,7 +303,6 @@ Accept wildcard characters: False ``` ### -Parameter -The parameters used by the script. To construct, see NOTES section for PARAMETER properties and create a hash table. ```yaml @@ -344,7 +318,6 @@ Accept wildcard characters: False ``` ### -ProtectedParameter -The parameters used by the script. To construct, see NOTES section for PROTECTEDPARAMETER properties and create a hash table. ```yaml @@ -360,7 +333,7 @@ Accept wildcard characters: False ``` ### -ResourceGroupName -The name of the resource group. + ```yaml Type: System.String @@ -375,7 +348,7 @@ Accept wildcard characters: False ``` ### -RunAsPassword -Specifies the user account password on the VM when executing the run command. + ```yaml Type: System.String @@ -390,7 +363,7 @@ Accept wildcard characters: False ``` ### -RunAsUser -Specifies the user account on the VM when executing the run command. + ```yaml Type: System.String @@ -405,7 +378,7 @@ Accept wildcard characters: False ``` ### -RunCommandName -The name of the virtual machine run command. + ```yaml Type: System.String @@ -424,7 +397,7 @@ Accept wildcard characters: False ```yaml Type: System.String -Parameter Sets: ScriptLocalPath +Parameter Sets: (All) Aliases: Required: True @@ -435,24 +408,7 @@ Accept wildcard characters: False ``` ### -ScriptUriManagedIdentityClientId -Client Id (GUID value) of the user-assigned managed identity. -ObjectId should not be used if this is provided. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` -### -ScriptUriManagedIdentityObjectId -Object Id (GUID value) of the user-assigned managed identity. -ClientId should not be used if this is provided. ```yaml Type: System.String @@ -466,43 +422,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -SourceCommandId -Specifies a commandId of predefined built-in script. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SourceScript -Specifies the script content to be executed on the VM. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` +### -ScriptUriManagedIdentityObjectId -### -SourceScriptUri -Specifies the script download location. -It can be either SAS URI of an Azure storage blob with read access or public URI. ```yaml Type: System.String -Parameter Sets: UpdateExpanded +Parameter Sets: (All) Aliases: Required: False @@ -513,8 +438,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. + ```yaml Type: System.String @@ -529,7 +453,7 @@ Accept wildcard characters: False ``` ### -Tag -Resource tags + ```yaml Type: System.Collections.Hashtable @@ -544,7 +468,7 @@ Accept wildcard characters: False ``` ### -TimeoutInSecond -The timeout in seconds to execute the run command. + ```yaml Type: System.Int32 @@ -559,10 +483,7 @@ Accept wildcard characters: False ``` ### -TreatFailureAsDeploymentFailure -Optional. -If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. -If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. -See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results + ```yaml Type: System.Management.Automation.SwitchParameter @@ -577,7 +498,7 @@ Accept wildcard characters: False ``` ### -VMScaleSetName -The name of the VM scale set. + ```yaml Type: System.String diff --git a/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplication.md b/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplication.md deleted file mode 100644 index 00174bcd7359..000000000000 --- a/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplication.md +++ /dev/null @@ -1,13 +0,0 @@ -### Example 1: Get a Gallery Application in a Gallery -```powershell -Get-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -name $galleryAppName -``` - -Retrieve a Gallery Application resource with the provided Resource Group, Gallery, and Gallery Application name. - -### Example 2: Get all the Gallery Applications in a Gallery -```powershell -Get-AzGalleryApplication -GalleryName $GalleryName -ResourceGroupName $rgName -``` - -Retrieve all the Gallery Application resources in the provided Resource Group and Gallery. \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplicationVersion.md deleted file mode 100644 index 5bc9673e836e..000000000000 --- a/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplicationVersion.md +++ /dev/null @@ -1,13 +0,0 @@ -### Example 1: Get a Gallery Application Version -```powershell -Get-AzGalleryApplicationVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryApplicationName $galleryAppName -Name $versionName -``` - -Retrieve a Gallery Application Version resource with the provided Resource Group, Gallery, Gallery Application name, and version name. - -### Example 2: Get all the Gallery Application Versions in a GalleryApplication -```powershell -Get-AzGalleryApplicationVersion -GalleryName $GalleryName -ResourceGroupName $rgName -GalleryApplicationName $galleryAppName -``` - -Retrieve all the Gallery Application Version resources in the provided Resource Group, Gallery, and Gallery Application Name. \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/examples/Get-AzSpotPlacementRecommender.md b/src/Compute/Compute.Autorest/examples/Get-AzSpotPlacementRecommender.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Compute/Compute.Autorest/examples/Get-AzSpotPlacementRecommender.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md b/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplication.md b/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplication.md deleted file mode 100644 index e7d7074a471a..000000000000 --- a/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplication.md +++ /dev/null @@ -1,9 +0,0 @@ -### Example 1: Remove a Gallery Application -```powershell -Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -Name $name -``` - -Delete a gallery application. - - - diff --git a/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplicationVersion.md deleted file mode 100644 index 31205b5d783c..000000000000 --- a/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplicationVersion.md +++ /dev/null @@ -1,8 +0,0 @@ -### Example 1: Remove a Gallery Application Version -```powershell -Remove-AzGalleryApplicationVersion -ResourceGroupName $rgNmae -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -Name $name -``` - -Delete a gallery application version. - - diff --git a/src/Compute/Compute.Autorest/examples/Remove-AzVMRunCommand.md b/src/Compute/Compute.Autorest/examples/Remove-AzVMRunCommand.md deleted file mode 100644 index b3af41536d68..000000000000 --- a/src/Compute/Compute.Autorest/examples/Remove-AzVMRunCommand.md +++ /dev/null @@ -1,6 +0,0 @@ -### Example 1: Remove Run Command -```powershell -Remove-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand" -``` - -Remove a Run Command by its Name \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/examples/Remove-AzVmssVMRunCommand.md b/src/Compute/Compute.Autorest/examples/Remove-AzVmssVMRunCommand.md deleted file mode 100644 index e96c6ae64cad..000000000000 --- a/src/Compute/Compute.Autorest/examples/Remove-AzVmssVMRunCommand.md +++ /dev/null @@ -1,6 +0,0 @@ -### Example 1: Remove VMSS VM RunCommand -```powershell -Remove-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname -``` - -Remove VMSS VM RunCommand \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/examples/Update-AzGalleryApplication.md b/src/Compute/Compute.Autorest/examples/Update-AzGalleryApplication.md deleted file mode 100644 index a38bbbbcd101..000000000000 --- a/src/Compute/Compute.Autorest/examples/Update-AzGalleryApplication.md +++ /dev/null @@ -1,7 +0,0 @@ -### Example 1: Update a Gallery Application -```powershell -Update-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -Name $name -Description "New Description" -``` - -Updating a Gallery Application. - From ca118f4a5920ba32a0ba0ae221e77a17ae4eed4a Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Fri, 15 Mar 2024 19:11:40 -0700 Subject: [PATCH 03/20] Add initial tests for Invoke-SpotPlacementRecommender cmdlet and some examples in the doc --- .../docs/Invoke-AzSpotPlacementRecommender.md | 83 ++++++++++++++----- ...nvoke-AzSpotPlacementRecommender.Tests.ps1 | 21 ++++- 2 files changed, 80 insertions(+), 24 deletions(-) diff --git a/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md b/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md index 090bf67c3916..caa583b02e80 100644 --- a/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md +++ b/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md @@ -26,46 +26,85 @@ Invoke-AzSpotPlacementRecommender -Location [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` -### PostViaIdentity -``` -Invoke-AzSpotPlacementRecommender -InputObject - -SpotPlacementRecommenderInput [-DefaultProfile ] [-Confirm] - [-WhatIf] [] -``` - -### PostViaIdentityExpanded -``` -Invoke-AzSpotPlacementRecommender -InputObject [-AvailabilityZone] [-DesiredCount ] - [-DesiredLocation ] [-DesiredSize ] [-DefaultProfile ] [-Confirm] - [-WhatIf] [] -``` - ## DESCRIPTION Generates placement scores for Spot VM skus. ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: {{ Regionally scoped Spot Placement Recommender scores }} ```powershell -{{ Add code here }} +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes +$response.PlacementScore ``` ```output -{{ Add output here }} +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- + True japaneast RestrictedSkuNotAvailable Standard_D2_v3 + True japaneast RestrictedSkuNotAvailable Standard_D2_v2 + True japaneast RestrictedSkuNotAvailable Standard_D4_v3 + True southcentralus High Standard_D2_v3 + True southcentralus High Standard_D2_v2 + True southcentralus High Standard_D4_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v2 + True centralus RestrictedSkuNotAvailable Standard_D4_v3 ``` -{{ Add description here }} +Returns regionally scoped spot placement recommender scores for the input. -### Example 2: {{ Add title here }} +### Example 2: {{ Zonally scoped Spot Placement Recommender scores }} ```powershell -{{ Add code here }} +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone +$response.PlacementScore ``` ```output -{{ Add output here }} +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- +1 True japaneast High Standard_D2_v3 +2 True japaneast High Standard_D2_v3 +3 True japaneast High Standard_D2_v3 +1 True japaneast High Standard_D2_v2 +2 True japaneast High Standard_D2_v2 +3 True japaneast High Standard_D2_v2 +1 True japaneast High Standard_D4_v3 +2 True japaneast High Standard_D4_v3 +3 True japaneast High Standard_D4_v3 +1 True southcentralus High Standard_D2_v3 +2 True southcentralus High Standard_D2_v3 +3 True southcentralus High Standard_D2_v3 +1 True southcentralus High Standard_D2_v2 +2 True southcentralus High Standard_D2_v2 +3 True southcentralus High Standard_D2_v2 +1 True southcentralus High Standard_D4_v3 +2 True southcentralus High Standard_D4_v3 +3 True southcentralus High Standard_D4_v3 +1 True centralus DataNotFoundOrStale Standard_D2_v3 +2 True centralus High Standard_D2_v3 +3 True centralus High Standard_D2_v3 +1 True centralus DataNotFoundOrStale Standard_D2_v2 +2 True centralus High Standard_D2_v2 +3 True centralus High Standard_D2_v2 +1 True centralus DataNotFoundOrStale Standard_D4_v3 +2 True centralus High Standard_D4_v3 +3 True centralus High Standard_D4_v3 ``` -{{ Add description here }} +{{ Returns zonally scoped spot placement recommender scores for the input. + }} ## PARAMETERS diff --git a/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 index eb0524334bdc..7f322f67f063 100644 --- a/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 +++ b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 @@ -15,8 +15,25 @@ if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzSpotPlacementRecomme } Describe 'Invoke-AzSpotPlacementRecommender' { - It 'PostExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + BeforeAll { + $resourceSku1 = @{sku = "Standard_D2_v3"} + $resourceSku2 = @{sku = "Standard_D2_v2"} + $resourceSku3 = @{sku = "Standard_D32_v2"} + $desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 + $desiredLocations = 'eastus','eastus2','westus' + } + + It 'PostExpanded' { + { + $spotPlacementRecommenderInput = + @{ + desiredLocations = $desiredLocations; + desiredSizes = $desiredSizes; + desiredCount = 100; + availabilityZones = $true + } + Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput -verbose + } } It 'Post' -skip { From 1f374ccd8d1265329c81c81f2d8fa7d03ff4f5f9 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Fri, 15 Mar 2024 19:18:00 -0700 Subject: [PATCH 04/20] Add examples to Invoke-Spot examples md file --- .../docs/Invoke-AzSpotPlacementRecommender.md | 7 +- .../Invoke-AzSpotPlacementRecommender.md | 69 ++++++++++++++++--- 2 files changed, 64 insertions(+), 12 deletions(-) diff --git a/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md b/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md index caa583b02e80..234476bcdf7c 100644 --- a/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md +++ b/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md @@ -31,7 +31,7 @@ Generates placement scores for Spot VM skus. ## EXAMPLES -### Example 1: {{ Regionally scoped Spot Placement Recommender scores }} +### Example 1: Regionally scoped Spot Placement Recommender scores ```powershell $resourceSku1 = @{sku = "Standard_D2_v3"} $resourceSku2 = @{sku = "Standard_D2_v2"} @@ -59,7 +59,7 @@ AvailabilityZone IsQuotaAvailable Region Score Sku Returns regionally scoped spot placement recommender scores for the input. -### Example 2: {{ Zonally scoped Spot Placement Recommender scores }} +### Example 2: Zonally scoped Spot Placement Recommender scores ```powershell $resourceSku1 = @{sku = "Standard_D2_v3"} $resourceSku2 = @{sku = "Standard_D2_v2"} @@ -103,8 +103,7 @@ AvailabilityZone IsQuotaAvailable Region Score Sku 3 True centralus High Standard_D4_v3 ``` -{{ Returns zonally scoped spot placement recommender scores for the input. - }} +Returns zonally scoped spot placement recommender scores for the input. ## PARAMETERS diff --git a/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md b/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md index 6ee1a83db970..794e52a0fea3 100644 --- a/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md +++ b/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md @@ -1,22 +1,75 @@ -### Example 1: {{ Add title here }} +### Example 1: Regionally scoped Spot Placement Recommender scores ```powershell -{{ Add code here }} +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes +$response.PlacementScore ``` ```output -{{ Add output here }} +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- + True japaneast RestrictedSkuNotAvailable Standard_D2_v3 + True japaneast RestrictedSkuNotAvailable Standard_D2_v2 + True japaneast RestrictedSkuNotAvailable Standard_D4_v3 + True southcentralus High Standard_D2_v3 + True southcentralus High Standard_D2_v2 + True southcentralus High Standard_D4_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v2 + True centralus RestrictedSkuNotAvailable Standard_D4_v3 ``` -{{ Add description here }} +Returns regionally scoped spot placement recommender scores for the input. -### Example 2: {{ Add title here }} +### Example 2: Zonally scoped Spot Placement Recommender scores ```powershell -{{ Add code here }} +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone +$response.PlacementScore ``` ```output -{{ Add output here }} +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- +1 True japaneast High Standard_D2_v3 +2 True japaneast High Standard_D2_v3 +3 True japaneast High Standard_D2_v3 +1 True japaneast High Standard_D2_v2 +2 True japaneast High Standard_D2_v2 +3 True japaneast High Standard_D2_v2 +1 True japaneast High Standard_D4_v3 +2 True japaneast High Standard_D4_v3 +3 True japaneast High Standard_D4_v3 +1 True southcentralus High Standard_D2_v3 +2 True southcentralus High Standard_D2_v3 +3 True southcentralus High Standard_D2_v3 +1 True southcentralus High Standard_D2_v2 +2 True southcentralus High Standard_D2_v2 +3 True southcentralus High Standard_D2_v2 +1 True southcentralus High Standard_D4_v3 +2 True southcentralus High Standard_D4_v3 +3 True southcentralus High Standard_D4_v3 +1 True centralus DataNotFoundOrStale Standard_D2_v3 +2 True centralus High Standard_D2_v3 +3 True centralus High Standard_D2_v3 +1 True centralus DataNotFoundOrStale Standard_D2_v2 +2 True centralus High Standard_D2_v2 +3 True centralus High Standard_D2_v2 +1 True centralus DataNotFoundOrStale Standard_D4_v3 +2 True centralus High Standard_D4_v3 +3 True centralus High Standard_D4_v3 ``` -{{ Add description here }} +Returns zonally scoped spot placement recommender scores for the input. + From 223be11d60593a151985887eefa918e3ec6c9474 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Fri, 15 Mar 2024 19:22:00 -0700 Subject: [PATCH 05/20] Remove unnecessary test.ps1 files --- .../test/Get-AzDiagnostic.Tests.ps1 | 21 ------------ .../test/Get-AzDiskInspection.Tests.ps1 | 25 -------------- .../test/New-AzDiskInspection.Tests.ps1 | 21 ------------ .../test/Read-AzDiagnosticOperation.Tests.ps1 | 25 -------------- ...skInspectionStorageConfiguration.Tests.ps1 | 33 ------------------- ...skInspectionStorageConfiguration.Tests.ps1 | 25 -------------- 6 files changed, 150 deletions(-) delete mode 100644 src/Compute/Compute.Autorest/test/Get-AzDiagnostic.Tests.ps1 delete mode 100644 src/Compute/Compute.Autorest/test/Get-AzDiskInspection.Tests.ps1 delete mode 100644 src/Compute/Compute.Autorest/test/New-AzDiskInspection.Tests.ps1 delete mode 100644 src/Compute/Compute.Autorest/test/Read-AzDiagnosticOperation.Tests.ps1 delete mode 100644 src/Compute/Compute.Autorest/test/Register-AzDiskInspectionStorageConfiguration.Tests.ps1 delete mode 100644 src/Compute/Compute.Autorest/test/Test-AzDiskInspectionStorageConfiguration.Tests.ps1 diff --git a/src/Compute/Compute.Autorest/test/Get-AzDiagnostic.Tests.ps1 b/src/Compute/Compute.Autorest/test/Get-AzDiagnostic.Tests.ps1 deleted file mode 100644 index e3c29613fd9e..000000000000 --- a/src/Compute/Compute.Autorest/test/Get-AzDiagnostic.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzDiagnostic')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzDiagnostic.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-AzDiagnostic' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/Compute/Compute.Autorest/test/Get-AzDiskInspection.Tests.ps1 b/src/Compute/Compute.Autorest/test/Get-AzDiskInspection.Tests.ps1 deleted file mode 100644 index 24c3947527a3..000000000000 --- a/src/Compute/Compute.Autorest/test/Get-AzDiskInspection.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzDiskInspection')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzDiskInspection.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-AzDiskInspection' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/Compute/Compute.Autorest/test/New-AzDiskInspection.Tests.ps1 b/src/Compute/Compute.Autorest/test/New-AzDiskInspection.Tests.ps1 deleted file mode 100644 index b822553c1a56..000000000000 --- a/src/Compute/Compute.Autorest/test/New-AzDiskInspection.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'New-AzDiskInspection')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzDiskInspection.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-AzDiskInspection' { - It 'CreateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/Compute/Compute.Autorest/test/Read-AzDiagnosticOperation.Tests.ps1 b/src/Compute/Compute.Autorest/test/Read-AzDiagnosticOperation.Tests.ps1 deleted file mode 100644 index d006f19e6635..000000000000 --- a/src/Compute/Compute.Autorest/test/Read-AzDiagnosticOperation.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Read-AzDiagnosticOperation')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Read-AzDiagnosticOperation.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 'Read-AzDiagnosticOperation' { - It 'Read' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ReadViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/Compute/Compute.Autorest/test/Register-AzDiskInspectionStorageConfiguration.Tests.ps1 b/src/Compute/Compute.Autorest/test/Register-AzDiskInspectionStorageConfiguration.Tests.ps1 deleted file mode 100644 index 3e110e4bce60..000000000000 --- a/src/Compute/Compute.Autorest/test/Register-AzDiskInspectionStorageConfiguration.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Register-AzDiskInspectionStorageConfiguration')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Register-AzDiskInspectionStorageConfiguration.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 'Register-AzDiskInspectionStorageConfiguration' { - It 'RegisterExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Register' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'RegisterViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'RegisterViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/Compute/Compute.Autorest/test/Test-AzDiskInspectionStorageConfiguration.Tests.ps1 b/src/Compute/Compute.Autorest/test/Test-AzDiskInspectionStorageConfiguration.Tests.ps1 deleted file mode 100644 index e5421e6cbf0b..000000000000 --- a/src/Compute/Compute.Autorest/test/Test-AzDiskInspectionStorageConfiguration.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Test-AzDiskInspectionStorageConfiguration')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzDiskInspectionStorageConfiguration.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 'Test-AzDiskInspectionStorageConfiguration' { - It 'Validate' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ValidateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} From 0ba5794e58689707a44a3580ba654449796f508b Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Fri, 15 Mar 2024 19:25:42 -0700 Subject: [PATCH 06/20] Readding some removed files that should not be deleted (1) --- .../galleries-applications-versions.json | 57 +++++++++++ .../galleries-applications.json | 95 +++++++++++++++++++ ...ScaleSets-virtualMachines-runCommands.json | 57 +++++++++++ .../virtualMachines-runCommands.json | 52 ++++++++++ .../examples/Get-AzGalleryApplication.md | 13 +++ .../Get-AzGalleryApplicationVersion.md | 13 +++ .../examples/Remove-AzVMRunCommand.md | 6 ++ .../examples/Remove-AzVmssVMRunCommand.md | 6 ++ 8 files changed, 299 insertions(+) create mode 100644 src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications-versions.json create mode 100644 src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications.json create mode 100644 src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachineScaleSets-virtualMachines-runCommands.json create mode 100644 src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachines-runCommands.json create mode 100644 src/Compute/Compute.Autorest/examples/Get-AzGalleryApplication.md create mode 100644 src/Compute/Compute.Autorest/examples/Get-AzGalleryApplicationVersion.md create mode 100644 src/Compute/Compute.Autorest/examples/Remove-AzVMRunCommand.md create mode 100644 src/Compute/Compute.Autorest/examples/Remove-AzVmssVMRunCommand.md diff --git a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications-versions.json b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications-versions.json new file mode 100644 index 000000000000..792ba0f993d1 --- /dev/null +++ b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications-versions.json @@ -0,0 +1,57 @@ +{ + "resourceType": "galleries/applications/versions", + "apiVersion": "2022-01-03", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.compute" + }, + "commands": [ + { + "name": "Remove-AzGalleryApplicationVersion", + "description": "Delete a gallery Application Version.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.compute/remove-azgalleryapplicationversion" + }, + "parameterSets": [ + { + "parameters": [ + "-GalleryApplicationName ", + "-GalleryName ", + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Delete a gallery Application Version.", + "parameters": [ + { + "name": "-GalleryApplicationName", + "value": "[Path.galleryApplicationName]" + }, + { + "name": "-GalleryName", + "value": "[Path.galleryName]" + }, + { + "name": "-Name", + "value": "[Path.galleryApplicationVersionName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications.json b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications.json new file mode 100644 index 000000000000..3ba84f5920f7 --- /dev/null +++ b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/galleries-applications.json @@ -0,0 +1,95 @@ +{ + "resourceType": "galleries/applications", + "apiVersion": "2022-01-03", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.compute" + }, + "commands": [ + { + "name": "Get-AzGalleryApplication", + "description": "Retrieves information about a gallery Application Definition.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.compute/get-azgalleryapplication" + }, + "parameterSets": [ + { + "parameters": [ + "-GalleryName ", + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Retrieves information about a gallery Application Definition.", + "parameters": [ + { + "name": "-GalleryName", + "value": "[Path.galleryName]" + }, + { + "name": "-Name", + "value": "[Path.galleryApplicationName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Remove-AzGalleryApplication", + "description": "Delete a gallery Application.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.compute/remove-azgalleryapplication" + }, + "parameterSets": [ + { + "parameters": [ + "-GalleryName ", + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Delete a gallery Application.", + "parameters": [ + { + "name": "-GalleryName", + "value": "[Path.galleryName]" + }, + { + "name": "-Name", + "value": "[Path.galleryApplicationName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachineScaleSets-virtualMachines-runCommands.json b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachineScaleSets-virtualMachines-runCommands.json new file mode 100644 index 000000000000..3ad432d2d17f --- /dev/null +++ b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachineScaleSets-virtualMachines-runCommands.json @@ -0,0 +1,57 @@ +{ + "resourceType": "virtualMachineScaleSets/virtualMachines/runCommands", + "apiVersion": "2021-07-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.compute" + }, + "commands": [ + { + "name": "Remove-AzVmssVMRunCommand", + "description": "The operation to delete the VMSS VM run command.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.compute/remove-azvmssvmruncommand" + }, + "parameterSets": [ + { + "parameters": [ + "-InstanceId ", + "-ResourceGroupName ", + "-RunCommandName ", + "[-SubscriptionId ]", + "-VMScaleSetName " + ] + } + ] + }, + "examples": [ + { + "description": "The operation to delete the VMSS VM run command.", + "parameters": [ + { + "name": "-InstanceId", + "value": "[Path.instanceId]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-RunCommandName", + "value": "[Path.runCommandName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + }, + { + "name": "-VMScaleSetName", + "value": "[Path.vmScaleSetName]" + } + ] + } + ] + } + ] +} diff --git a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachines-runCommands.json b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachines-runCommands.json new file mode 100644 index 000000000000..a35bd038e75b --- /dev/null +++ b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/virtualMachines-runCommands.json @@ -0,0 +1,52 @@ +{ + "resourceType": "virtualMachines/runCommands", + "apiVersion": "2021-07-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.compute" + }, + "commands": [ + { + "name": "Remove-AzVMRunCommand", + "description": "The operation to delete the run command.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.compute/remove-azvmruncommand" + }, + "parameterSets": [ + { + "parameters": [ + "-ResourceGroupName ", + "-RunCommandName ", + "[-SubscriptionId ]", + "-VMName " + ] + } + ] + }, + "examples": [ + { + "description": "The operation to delete the run command.", + "parameters": [ + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-RunCommandName", + "value": "[Path.runCommandName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + }, + { + "name": "-VMName", + "value": "[Path.vmName]" + } + ] + } + ] + } + ] +} diff --git a/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplication.md b/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplication.md new file mode 100644 index 000000000000..00174bcd7359 --- /dev/null +++ b/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplication.md @@ -0,0 +1,13 @@ +### Example 1: Get a Gallery Application in a Gallery +```powershell +Get-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -name $galleryAppName +``` + +Retrieve a Gallery Application resource with the provided Resource Group, Gallery, and Gallery Application name. + +### Example 2: Get all the Gallery Applications in a Gallery +```powershell +Get-AzGalleryApplication -GalleryName $GalleryName -ResourceGroupName $rgName +``` + +Retrieve all the Gallery Application resources in the provided Resource Group and Gallery. \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplicationVersion.md new file mode 100644 index 000000000000..5bc9673e836e --- /dev/null +++ b/src/Compute/Compute.Autorest/examples/Get-AzGalleryApplicationVersion.md @@ -0,0 +1,13 @@ +### Example 1: Get a Gallery Application Version +```powershell +Get-AzGalleryApplicationVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryApplicationName $galleryAppName -Name $versionName +``` + +Retrieve a Gallery Application Version resource with the provided Resource Group, Gallery, Gallery Application name, and version name. + +### Example 2: Get all the Gallery Application Versions in a GalleryApplication +```powershell +Get-AzGalleryApplicationVersion -GalleryName $GalleryName -ResourceGroupName $rgName -GalleryApplicationName $galleryAppName +``` + +Retrieve all the Gallery Application Version resources in the provided Resource Group, Gallery, and Gallery Application Name. \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/examples/Remove-AzVMRunCommand.md b/src/Compute/Compute.Autorest/examples/Remove-AzVMRunCommand.md new file mode 100644 index 000000000000..b3af41536d68 --- /dev/null +++ b/src/Compute/Compute.Autorest/examples/Remove-AzVMRunCommand.md @@ -0,0 +1,6 @@ +### Example 1: Remove Run Command +```powershell +Remove-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand" +``` + +Remove a Run Command by its Name \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/examples/Remove-AzVmssVMRunCommand.md b/src/Compute/Compute.Autorest/examples/Remove-AzVmssVMRunCommand.md new file mode 100644 index 000000000000..e96c6ae64cad --- /dev/null +++ b/src/Compute/Compute.Autorest/examples/Remove-AzVmssVMRunCommand.md @@ -0,0 +1,6 @@ +### Example 1: Remove VMSS VM RunCommand +```powershell +Remove-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname +``` + +Remove VMSS VM RunCommand \ No newline at end of file From 465a9528028405bb0e45d8bdf4e8b0b1107bf1fc Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Fri, 15 Mar 2024 19:27:14 -0700 Subject: [PATCH 07/20] Readding some removed files that should not be deleted (2) --- .../docs/Remove-AzGalleryApplication.md | 247 ++++++++++++++++ .../Remove-AzGalleryApplicationVersion.md | 262 +++++++++++++++++ .../docs/Remove-AzVMRunCommand.md | 247 ++++++++++++++++ .../docs/Remove-AzVmssVMRunCommand.md | 262 +++++++++++++++++ .../docs/Update-AzGalleryApplication.md | 265 ++++++++++++++++++ .../examples/Remove-AzGalleryApplication.md | 9 + .../Remove-AzGalleryApplicationVersion.md | 8 + .../examples/Update-AzGalleryApplication.md | 7 + 8 files changed, 1307 insertions(+) create mode 100644 src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md create mode 100644 src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md create mode 100644 src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md create mode 100644 src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md create mode 100644 src/Compute/Compute.Autorest/docs/Update-AzGalleryApplication.md create mode 100644 src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplication.md create mode 100644 src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplicationVersion.md create mode 100644 src/Compute/Compute.Autorest/examples/Update-AzGalleryApplication.md diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md b/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md new file mode 100644 index 000000000000..e68f483c3adc --- /dev/null +++ b/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplication.md @@ -0,0 +1,247 @@ +--- +external help file: +Module Name: Az.Compute +online version: https://learn.microsoft.com/powershell/module/az.compute/remove-azgalleryapplication +schema: 2.0.0 +--- + +# Remove-AzGalleryApplication + +## SYNOPSIS +Delete a gallery Application. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzGalleryApplication -GalleryName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzGalleryApplication -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a gallery Application. + +## EXAMPLES + +### Example 1: Remove a Gallery Application +```powershell +Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -Name $name +``` + +Delete a gallery application. + +## PARAMETERS + +### -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 credentials, account, tenant, and subscription used for communication with Azure. + +```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 +``` + +### -GalleryName +The name of the Shared Application Gallery in which the Application Definition is to be deleted. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +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.Compute.Models.IComputeIdentity +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 gallery Application Definition to be deleted. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: GalleryApplicationName + +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. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```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.Compute.Models.IComputeIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +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 + - `[CommandId ]`: The command id. + - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + - `[Id ]`: Resource identity path + - `[InstanceId ]`: The instance ID of the virtual machine. + - `[Location ]`: The location upon which run commands is queried. + - `[ResourceGroupName ]`: The name of the resource group. + - `[RunCommandName ]`: The name of the virtual machine run command. + - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. + - `[VMScaleSetName ]`: The name of the VM scale set. + +## RELATED LINKS + diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md new file mode 100644 index 000000000000..b48c558a94a3 --- /dev/null +++ b/src/Compute/Compute.Autorest/docs/Remove-AzGalleryApplicationVersion.md @@ -0,0 +1,262 @@ +--- +external help file: +Module Name: Az.Compute +online version: https://learn.microsoft.com/powershell/module/az.compute/remove-azgalleryapplicationversion +schema: 2.0.0 +--- + +# Remove-AzGalleryApplicationVersion + +## SYNOPSIS +Delete a gallery Application Version. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName -Name + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzGalleryApplicationVersion -InputObject [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a gallery Application Version. + +## EXAMPLES + +### Example 1: Remove a Gallery Application Version +```powershell +Remove-AzGalleryApplicationVersion -ResourceGroupName $rgNmae -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -Name $name +``` + +Delete a gallery application version. + +## PARAMETERS + +### -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 credentials, account, tenant, and subscription used for communication with Azure. + +```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 +``` + +### -GalleryApplicationName +The name of the gallery Application Definition in which the Application Version resides. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GalleryName +The name of the Shared Application Gallery in which the Application Definition resides. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +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.Compute.Models.IComputeIdentity +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 gallery Application Version to be deleted. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: GalleryApplicationVersionName + +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. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```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.Compute.Models.IComputeIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +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 + - `[CommandId ]`: The command id. + - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + - `[Id ]`: Resource identity path + - `[InstanceId ]`: The instance ID of the virtual machine. + - `[Location ]`: The location upon which run commands is queried. + - `[ResourceGroupName ]`: The name of the resource group. + - `[RunCommandName ]`: The name of the virtual machine run command. + - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. + - `[VMScaleSetName ]`: The name of the VM scale set. + +## RELATED LINKS + diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md new file mode 100644 index 000000000000..607c18c6c941 --- /dev/null +++ b/src/Compute/Compute.Autorest/docs/Remove-AzVMRunCommand.md @@ -0,0 +1,247 @@ +--- +external help file: +Module Name: Az.Compute +online version: https://learn.microsoft.com/powershell/module/az.compute/remove-azvmruncommand +schema: 2.0.0 +--- + +# Remove-AzVMRunCommand + +## SYNOPSIS +The operation to delete the run command. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzVMRunCommand -ResourceGroupName -RunCommandName -VMName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzVMRunCommand -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The operation to delete the run command. + +## EXAMPLES + +### Example 1: Remove Run Command +```powershell +Remove-AzVMRunCommand -ResourceGroupName $rgname -VMName $vmname -RunCommandName "firstruncommand" +``` + +Remove a Run Command by its Name + +## PARAMETERS + +### -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 credentials, account, tenant, and subscription used for communication with Azure. + +```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 +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +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. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RunCommandName +The name of the virtual machine run command. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```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 +``` + +### -VMName +The name of the virtual machine where the run command should be deleted. + +```yaml +Type: System.String +Parameter Sets: Delete +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 + +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +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 + - `[CommandId ]`: The command id. + - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + - `[Id ]`: Resource identity path + - `[InstanceId ]`: The instance ID of the virtual machine. + - `[Location ]`: The location upon which run commands is queried. + - `[ResourceGroupName ]`: The name of the resource group. + - `[RunCommandName ]`: The name of the virtual machine run command. + - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. + - `[VMScaleSetName ]`: The name of the VM scale set. + +## RELATED LINKS + diff --git a/src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md new file mode 100644 index 000000000000..2ec9cdaafd85 --- /dev/null +++ b/src/Compute/Compute.Autorest/docs/Remove-AzVmssVMRunCommand.md @@ -0,0 +1,262 @@ +--- +external help file: +Module Name: Az.Compute +online version: https://learn.microsoft.com/powershell/module/az.compute/remove-azvmssvmruncommand +schema: 2.0.0 +--- + +# Remove-AzVmssVMRunCommand + +## SYNOPSIS +The operation to delete the VMSS VM run command. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzVmssVMRunCommand -InstanceId -ResourceGroupName -RunCommandName + -VMScaleSetName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzVmssVMRunCommand -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The operation to delete the VMSS VM run command. + +## EXAMPLES + +### Example 1: Remove VMSS VM RunCommand +```powershell +Remove-AzVmssVMRunCommand -InstanceId 3 -ResourceGroupName $rgname -RunCommandName "first" -VMScaleSetName $vmssname +``` + +Remove VMSS VM RunCommand + +## PARAMETERS + +### -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 credentials, account, tenant, and subscription used for communication with Azure. + +```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 +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -InstanceId +The instance ID of the virtual machine. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +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. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RunCommandName +The name of the virtual machine run command. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```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 +``` + +### -VMScaleSetName +The name of the VM scale set. + +```yaml +Type: System.String +Parameter Sets: Delete +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 + +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +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 + - `[CommandId ]`: The command id. + - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + - `[Id ]`: Resource identity path + - `[InstanceId ]`: The instance ID of the virtual machine. + - `[Location ]`: The location upon which run commands is queried. + - `[ResourceGroupName ]`: The name of the resource group. + - `[RunCommandName ]`: The name of the virtual machine run command. + - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. + - `[VMScaleSetName ]`: The name of the VM scale set. + +## RELATED LINKS + diff --git a/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplication.md b/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplication.md new file mode 100644 index 000000000000..51b773024eae --- /dev/null +++ b/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplication.md @@ -0,0 +1,265 @@ +--- +external help file: +Module Name: Az.Compute +online version: https://learn.microsoft.com/powershell/module/az.compute/update-azgalleryapplication +schema: 2.0.0 +--- + +# Update-AzGalleryApplication + +## SYNOPSIS +Update a gallery Application Definition. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzGalleryApplication -GalleryName -Name -ResourceGroupName + [-SubscriptionId ] [-Description ] [-Tag ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzGalleryApplication -InputObject [-Description ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Update a gallery Application Definition. + +## EXAMPLES + +### Example 1: Update a Gallery Application +```powershell +Update-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -Name $name -Description "New Description" +``` + +Updating a Gallery Application. + +## PARAMETERS + +### -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 credentials, account, tenant, and subscription used for communication with Azure. + +```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 +The description of this gallery Application Definition resource. +This property is updatable. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GalleryName +The name of the Shared Application Gallery in which the Application Definition is to be updated. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +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.Compute.Models.IComputeIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the gallery Application Definition to be updated. +The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. +The maximum length is 80 characters. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: GalleryApplicationName + +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 +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```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 +``` + +### -Tag +Resource tags + +```yaml +Type: System.Collections.Hashtable +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.Compute.Models.IComputeIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication + +## NOTES + +ALIASES + +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 + - `[CommandId ]`: The command id. + - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + - `[Id ]`: Resource identity path + - `[InstanceId ]`: The instance ID of the virtual machine. + - `[Location ]`: The location upon which run commands is queried. + - `[ResourceGroupName ]`: The name of the resource group. + - `[RunCommandName ]`: The name of the virtual machine run command. + - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. + - `[VMScaleSetName ]`: The name of the VM scale set. + +## RELATED LINKS + diff --git a/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplication.md b/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplication.md new file mode 100644 index 000000000000..e7d7074a471a --- /dev/null +++ b/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplication.md @@ -0,0 +1,9 @@ +### Example 1: Remove a Gallery Application +```powershell +Remove-AzGalleryApplication -ResourceGroupName $rgNmae -GalleryName $galleryName -Name $name +``` + +Delete a gallery application. + + + diff --git a/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplicationVersion.md new file mode 100644 index 000000000000..31205b5d783c --- /dev/null +++ b/src/Compute/Compute.Autorest/examples/Remove-AzGalleryApplicationVersion.md @@ -0,0 +1,8 @@ +### Example 1: Remove a Gallery Application Version +```powershell +Remove-AzGalleryApplicationVersion -ResourceGroupName $rgNmae -GalleryName $galleryName -GalleryApplicationName $galleryApplicationName -Name $name +``` + +Delete a gallery application version. + + diff --git a/src/Compute/Compute.Autorest/examples/Update-AzGalleryApplication.md b/src/Compute/Compute.Autorest/examples/Update-AzGalleryApplication.md new file mode 100644 index 000000000000..a38bbbbcd101 --- /dev/null +++ b/src/Compute/Compute.Autorest/examples/Update-AzGalleryApplication.md @@ -0,0 +1,7 @@ +### Example 1: Update a Gallery Application +```powershell +Update-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -Name $name -Description "New Description" +``` + +Updating a Gallery Application. + From ae2f3ea9236670a1bd59144ff0cbc347e4dacaa4 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Fri, 15 Mar 2024 19:29:56 -0700 Subject: [PATCH 08/20] Readding some removed files that should not be deleted (3) --- .../docs/Get-AzGalleryApplication.md | 182 +++++++++++++++ .../docs/Get-AzGalleryApplicationVersion.md | 214 ++++++++++++++++++ 2 files changed, 396 insertions(+) create mode 100644 src/Compute/Compute.Autorest/docs/Get-AzGalleryApplication.md create mode 100644 src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md diff --git a/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplication.md b/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplication.md new file mode 100644 index 000000000000..1825d60981c2 --- /dev/null +++ b/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplication.md @@ -0,0 +1,182 @@ +--- +external help file: +Module Name: Az.Compute +online version: https://learn.microsoft.com/powershell/module/az.compute/get-azgalleryapplication +schema: 2.0.0 +--- + +# Get-AzGalleryApplication + +## SYNOPSIS +Retrieves information about a gallery Application Definition. + +## SYNTAX + +### List (Default) +``` +Get-AzGalleryApplication -GalleryName -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzGalleryApplication -GalleryName -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzGalleryApplication -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Retrieves information about a gallery Application Definition. + +## EXAMPLES + +### Example 1: Get a Gallery Application in a Gallery +```powershell +Get-AzGalleryApplication -ResourceGroupName $rgName -GalleryName $galleryName -name $galleryAppName +``` + +Retrieve a Gallery Application resource with the provided Resource Group, Gallery, and Gallery Application name. + +### Example 2: Get all the Gallery Applications in a Gallery +```powershell +Get-AzGalleryApplication -GalleryName $GalleryName -ResourceGroupName $rgName +``` + +Retrieve all the Gallery Application resources in the provided Resource Group and Gallery. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```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 +``` + +### -GalleryName +The name of the Shared Application Gallery from which the Application Definitions are to be retrieved. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +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.Compute.Models.IComputeIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the gallery Application Definition to be retrieved. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: GalleryApplicationName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```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.Compute.Models.IComputeIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplication + +## NOTES + +ALIASES + +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 + - `[CommandId ]`: The command id. + - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + - `[Id ]`: Resource identity path + - `[InstanceId ]`: The instance ID of the virtual machine. + - `[Location ]`: The location upon which run commands is queried. + - `[ResourceGroupName ]`: The name of the resource group. + - `[RunCommandName ]`: The name of the virtual machine run command. + - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. + - `[VMScaleSetName ]`: The name of the VM scale set. + +## RELATED LINKS + diff --git a/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md new file mode 100644 index 000000000000..2b305b450369 --- /dev/null +++ b/src/Compute/Compute.Autorest/docs/Get-AzGalleryApplicationVersion.md @@ -0,0 +1,214 @@ +--- +external help file: +Module Name: Az.Compute +online version: https://learn.microsoft.com/powershell/module/az.compute/get-azgalleryapplicationversion +schema: 2.0.0 +--- + +# Get-AzGalleryApplicationVersion + +## SYNOPSIS +Retrieves information about a gallery Application Version. + +## SYNTAX + +### List (Default) +``` +Get-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzGalleryApplicationVersion -GalleryApplicationName -GalleryName -Name + -ResourceGroupName [-SubscriptionId ] [-Expand ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzGalleryApplicationVersion -InputObject [-Expand ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Retrieves information about a gallery Application Version. + +## EXAMPLES + +### Example 1: Get a Gallery Application Version +```powershell +Get-AzGalleryApplicationVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryApplicationName $galleryAppName -Name $versionName +``` + +Retrieve a Gallery Application Version resource with the provided Resource Group, Gallery, Gallery Application name, and version name. + +### Example 2: Get all the Gallery Application Versions in a GalleryApplication +```powershell +Get-AzGalleryApplicationVersion -GalleryName $GalleryName -ResourceGroupName $rgName -GalleryApplicationName $galleryAppName +``` + +Retrieve all the Gallery Application Version resources in the provided Resource Group, Gallery, and Gallery Application Name. + +## PARAMETERS + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```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 +``` + +### -Expand +The expand expression to apply on the operation. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes +Parameter Sets: Get, GetViaIdentity +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GalleryApplicationName +The name of the gallery Application Definition in which the Application Version resides. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GalleryName +The name of the Shared Application Gallery in which the Application Definition resides. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +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.Compute.Models.IComputeIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the gallery Application Version to be retrieved. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: GalleryApplicationVersionName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```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.Compute.Models.IComputeIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion + +## NOTES + +ALIASES + +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 + - `[CommandId ]`: The command id. + - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + - `[Id ]`: Resource identity path + - `[InstanceId ]`: The instance ID of the virtual machine. + - `[Location ]`: The location upon which run commands is queried. + - `[ResourceGroupName ]`: The name of the resource group. + - `[RunCommandName ]`: The name of the virtual machine run command. + - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. + - `[VMScaleSetName ]`: The name of the VM scale set. + +## RELATED LINKS + From 31ad076c5df41408de8ad25fd46634154e656e48 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Sun, 17 Mar 2024 19:05:48 -0700 Subject: [PATCH 09/20] Adding older deleted cmds to FunctionsToExport --- src/Compute/Compute.Autorest/Az.Compute.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Compute/Compute.Autorest/Az.Compute.psd1 b/src/Compute/Compute.Autorest/Az.Compute.psd1 index 6ba7cf6763da..7e959b62f1e2 100644 --- a/src/Compute/Compute.Autorest/Az.Compute.psd1 +++ b/src/Compute/Compute.Autorest/Az.Compute.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.Compute.private.dll' FormatsToProcess = './Az.Compute.format.ps1xml' - FunctionsToExport = 'Get-AzSpotPlacementRecommender', 'Invoke-AzSpotPlacementRecommender', 'New-AzGalleryApplication', 'New-AzGalleryApplicationVersion', 'Set-AzVMRunCommand', 'Set-AzVmssVMRunCommand', 'Update-AzGalleryApplicationVersion', '*' + FunctionsToExport = 'Get-AzSpotPlacementRecommender', 'Invoke-AzSpotPlacementRecommender', 'Get-AzGalleryApplication', 'Get-AzGalleryApplicationVersion', 'New-AzGalleryApplication', 'New-AzGalleryApplicationVersion', 'Remove-AzGalleryApplication', 'Remove-AzGalleryApplicationVersion', 'Remove-AzVMRunCommand', 'Remove-AzVmssVMRunCommand', 'Set-AzVMRunCommand', 'Set-AzVmssVMRunCommand', 'Update-AzGalleryApplication', 'Update-AzGalleryApplicationVersion', '*' AliasesToExport = '*' PrivateData = @{ PSData = @{ From a7c604b567b09f409a0edd493c36e019d196a0bd Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Sun, 17 Mar 2024 19:09:36 -0700 Subject: [PATCH 10/20] Removing Get SpotPlacementRecommender files --- src/Compute/Compute.Autorest/README.md | 4 + .../UX/Microsoft.Compute/locations.json | 33 ----- .../docs/Get-AzSpotPlacementRecommender.md | 133 ------------------ .../Get-AzSpotPlacementRecommender.md | 22 --- ...nvoke-AzSpotPlacementRecommender.Tests.ps1 | 14 +- 5 files changed, 12 insertions(+), 194 deletions(-) delete mode 100644 src/Compute/Compute.Autorest/docs/Get-AzSpotPlacementRecommender.md delete mode 100644 src/Compute/Compute.Autorest/examples/Get-AzSpotPlacementRecommender.md diff --git a/src/Compute/Compute.Autorest/README.md b/src/Compute/Compute.Autorest/README.md index 6ec45fad1ede..19f59e07d427 100644 --- a/src/Compute/Compute.Autorest/README.md +++ b/src/Compute/Compute.Autorest/README.md @@ -307,4 +307,8 @@ directive: verb: Test subject: DiskInspectionStorageConfiguration remove: true + - where: + verb: Get + subject: SpotPlacementRecommender + remove: true ``` diff --git a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json index 1e922e848d84..4c0869c1fffe 100644 --- a/src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json +++ b/src/Compute/Compute.Autorest/UX/Microsoft.Compute/locations.json @@ -5,39 +5,6 @@ "url": "https://learn.microsoft.com/powershell/module/az.compute" }, "commands": [ - { - "name": "Get-AzSpotPlacementRecommender", - "description": "Gets Spot Placement Recommender diagnostic metadata.", - "path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/diagnostics/spotPlacementRecommender", - "help": { - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.compute/get-azspotplacementrecommender" - }, - "parameterSets": [ - { - "parameters": [ - "-Location ", - "[-SubscriptionId ]" - ] - } - ] - }, - "examples": [ - { - "description": "Gets Spot Placement Recommender diagnostic metadata.", - "parameters": [ - { - "name": "-Location", - "value": "[Path.location]" - }, - { - "name": "-SubscriptionId", - "value": "[Path.subscriptionId]" - } - ] - } - ] - }, { "name": "Invoke-AzSpotPlacementRecommender", "description": "Generates placement scores for Spot VM skus.", diff --git a/src/Compute/Compute.Autorest/docs/Get-AzSpotPlacementRecommender.md b/src/Compute/Compute.Autorest/docs/Get-AzSpotPlacementRecommender.md deleted file mode 100644 index 30f116916554..000000000000 --- a/src/Compute/Compute.Autorest/docs/Get-AzSpotPlacementRecommender.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -external help file: -Module Name: Az.Compute -online version: https://learn.microsoft.com/powershell/module/az.compute/get-azspotplacementrecommender -schema: 2.0.0 ---- - -# Get-AzSpotPlacementRecommender - -## SYNOPSIS -Gets Spot Placement Recommender diagnostic metadata. - -## SYNTAX - -### Get (Default) -``` -Get-AzSpotPlacementRecommender -Location [-SubscriptionId ] [-DefaultProfile ] - [] -``` - -### GetViaIdentity -``` -Get-AzSpotPlacementRecommender -InputObject [-DefaultProfile ] - [] -``` - -## DESCRIPTION -Gets Spot Placement Recommender diagnostic metadata. - -## EXAMPLES - -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -## PARAMETERS - -### -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 -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity -Parameter Sets: GetViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -Location -The name of the Azure region. - -```yaml -Type: System.String -Parameter Sets: Get -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. - -```yaml -Type: System.String[] -Parameter Sets: Get -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.Compute.Models.IComputeIdentity - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210601Preview.IComputeDiagnosticBase - -## NOTES - -## RELATED LINKS - diff --git a/src/Compute/Compute.Autorest/examples/Get-AzSpotPlacementRecommender.md b/src/Compute/Compute.Autorest/examples/Get-AzSpotPlacementRecommender.md deleted file mode 100644 index 6ee1a83db970..000000000000 --- a/src/Compute/Compute.Autorest/examples/Get-AzSpotPlacementRecommender.md +++ /dev/null @@ -1,22 +0,0 @@ -### Example 1: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - diff --git a/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 index 7f322f67f063..3b41c2624da3 100644 --- a/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 +++ b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 @@ -24,22 +24,24 @@ Describe 'Invoke-AzSpotPlacementRecommender' { } It 'PostExpanded' { + { + $response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes + } + } + + It 'Post' { { $spotPlacementRecommenderInput = @{ - desiredLocations = $desiredLocations; desiredSizes = $desiredSizes; - desiredCount = 100; + desiredCoun@t = 100; + desiredLocations = $desiredLocations; availabilityZones = $true } Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput -verbose } } - It 'Post' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - It 'PostViaIdentityExpanded' -skip { { throw [System.NotImplementedException] } | Should -Not -Throw } From a2f3a9ff0eb2261f7b0b49e25c40f6dcea7b8978 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Sun, 17 Mar 2024 19:14:14 -0700 Subject: [PATCH 11/20] Remove Get-AzSpotPlacementRecommender.Tests.ps1, update failing test and doc --- .../docs/Invoke-AzSpotPlacementRecommender.md | 25 ------------------- .../Get-AzSpotPlacementRecommender.Tests.ps1 | 25 ------------------- ...nvoke-AzSpotPlacementRecommender.Tests.ps1 | 2 +- 3 files changed, 1 insertion(+), 51 deletions(-) delete mode 100644 src/Compute/Compute.Autorest/test/Get-AzSpotPlacementRecommender.Tests.ps1 diff --git a/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md b/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md index 234476bcdf7c..6ad514983fa3 100644 --- a/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md +++ b/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md @@ -19,13 +19,6 @@ Invoke-AzSpotPlacementRecommender -Location [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` -### Post -``` -Invoke-AzSpotPlacementRecommender -Location - -SpotPlacementRecommenderInput [-SubscriptionId ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] -``` - ## DESCRIPTION Generates placement scores for Spot VM skus. @@ -215,22 +208,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -SpotPlacementRecommenderInput -SpotPlacementRecommender API Input. -To construct, see NOTES section for SPOTPLACEMENTRECOMMENDERINPUT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210601Preview.ISpotPlacementRecommenderInput -Parameter Sets: Post, PostViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - ### -SubscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -283,8 +260,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20210601Preview.ISpotPlacementRecommenderInput - ### Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.IComputeIdentity ## OUTPUTS diff --git a/src/Compute/Compute.Autorest/test/Get-AzSpotPlacementRecommender.Tests.ps1 b/src/Compute/Compute.Autorest/test/Get-AzSpotPlacementRecommender.Tests.ps1 deleted file mode 100644 index 3769c0cf2762..000000000000 --- a/src/Compute/Compute.Autorest/test/Get-AzSpotPlacementRecommender.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzSpotPlacementRecommender')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzSpotPlacementRecommender.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-AzSpotPlacementRecommender' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 index 3b41c2624da3..fea9bf64132f 100644 --- a/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 +++ b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 @@ -34,7 +34,7 @@ Describe 'Invoke-AzSpotPlacementRecommender' { $spotPlacementRecommenderInput = @{ desiredSizes = $desiredSizes; - desiredCoun@t = 100; + desiredCount = 100; desiredLocations = $desiredLocations; availabilityZones = $true } From 827d4bd70b7e67d8689c53c769d337689aaf3563 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Sun, 17 Mar 2024 19:16:56 -0700 Subject: [PATCH 12/20] Rever changes to docs/Az.Compute.md --- src/Compute/Compute.Autorest/docs/Az.Compute.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Compute/Compute.Autorest/docs/Az.Compute.md b/src/Compute/Compute.Autorest/docs/Az.Compute.md index dd11bf630f22..ff1027459f6c 100644 --- a/src/Compute/Compute.Autorest/docs/Az.Compute.md +++ b/src/Compute/Compute.Autorest/docs/Az.Compute.md @@ -11,9 +11,6 @@ Locale: en-US Microsoft Azure PowerShell: Compute cmdlets ## Az.Compute Cmdlets -### [Get-AzSpotPlacementRecommender](Get-AzSpotPlacementRecommender.md) -Gets Spot Placement Recommender diagnostic metadata. - ### [Invoke-AzSpotPlacementRecommender](Invoke-AzSpotPlacementRecommender.md) Generates placement scores for Spot VM skus. From 855624b3ce7cb9195c4abe4195ad9df1250ebf77 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Sun, 17 Mar 2024 19:18:47 -0700 Subject: [PATCH 13/20] Only remove new functions from diagnostic.json --- src/Compute/Compute.Autorest/README.md | 51 ++------------------------ 1 file changed, 3 insertions(+), 48 deletions(-) diff --git a/src/Compute/Compute.Autorest/README.md b/src/Compute/Compute.Autorest/README.md index 19f59e07d427..a86cc4ca6e15 100644 --- a/src/Compute/Compute.Autorest/README.md +++ b/src/Compute/Compute.Autorest/README.md @@ -3,6 +3,9 @@ This directory contains the PowerShell module for the Compute service. --- +## Status +[![Az.Compute](https://img.shields.io/powershellgallery/v/Az.Compute.svg?style=flat-square&label=Az.Compute "Az.Compute")](https://www.powershellgallery.com/packages/Az.Compute/) + ## Info - Modifiable: yes - Generated: all @@ -243,38 +246,6 @@ directive: verb: Get subject: DiskInspection remove: true - - where: - verb: Get - subject: GalleryApplication - remove: true - - where: - verb: New - subject: GalleryApplication - remove: true - - where: - verb: Remove - subject: GalleryApplication - remove: true - - where: - verb: Update - subject: GalleryApplication - remove: true - - where: - verb: Get - subject: GalleryApplicationVersion - remove: true - - where: - verb: New - subject: GalleryApplicationVersion - remove: true - - where: - verb: Remove - subject: GalleryApplicationVersion - remove: true - - where: - verb: Update - subject: GalleryApplicationVersion - remove: true - where: verb: New subject: DiskInspection @@ -287,22 +258,6 @@ directive: verb: Register subject: DiskInspectionStorageConfiguration remove: true - - where: - verb: Remove - subject: VMRunCommand - remove: true - - where: - verb: Remove - subject: VmssVMRunCommand - remove: true - - where: - verb: Set - subject: VMRunCommand - remove: true - - where: - verb: Set - subject: VmssVMRunCommand - remove: true - where: verb: Test subject: DiskInspectionStorageConfiguration From ddf994eb3505ed58a5b44118b60c11d24c43b234 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Sun, 17 Mar 2024 19:20:37 -0700 Subject: [PATCH 14/20] Reverting changes to docs of other cmdlets --- .../docs/New-AzGalleryApplication.md | 2 + .../docs/New-AzGalleryApplicationVersion.md | 18 +++ .../docs/Set-AzVMRunCommand.md | 144 ++++++++++++++--- .../docs/Set-AzVmssVMRunCommand.md | 146 ++++++++++++++---- .../Update-AzGalleryApplicationVersion.md | 34 ++++ 5 files changed, 293 insertions(+), 51 deletions(-) diff --git a/src/Compute/Compute.Autorest/docs/New-AzGalleryApplication.md b/src/Compute/Compute.Autorest/docs/New-AzGalleryApplication.md index fb471cd8694a..c53071c37cb2 100644 --- a/src/Compute/Compute.Autorest/docs/New-AzGalleryApplication.md +++ b/src/Compute/Compute.Autorest/docs/New-AzGalleryApplication.md @@ -250,5 +250,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES +ALIASES + ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/New-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/docs/New-AzGalleryApplicationVersion.md index 0057ca6fb520..aad843a7312f 100644 --- a/src/Compute/Compute.Autorest/docs/New-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute.Autorest/docs/New-AzGalleryApplicationVersion.md @@ -425,5 +425,23 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES +ALIASES + +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. + + +TARGETREGION : The target regions where the Image Version is going to be replicated to. This property is updatable. + - `Name `: The name of the region. + - `[EncryptionDataDiskImage ]`: A list of encryption specifications for data disk images. + - `Lun `: This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. + - `[DiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. + - `[OSDiskImageDiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. + - `[RegionalReplicaCount ]`: The number of replicas of the Image Version to be created per region. This property is updatable. + - `[SecurityProfileConfidentialVMEncryptionType ]`: confidential VM encryption types + - `[SecurityProfileSecureVMDiskEncryptionSetId ]`: secure VM disk encryption set id + - `[StorageAccountType ]`: Specifies the storage account type to be used to store the image. This property is not updatable. + ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md index b8a3605f5096..5c0fc6c65ca1 100644 --- a/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md +++ b/src/Compute/Compute.Autorest/docs/Set-AzVMRunCommand.md @@ -8,10 +8,25 @@ schema: 2.0.0 # Set-AzVMRunCommand ## SYNOPSIS - +The operation to create or update the run command. ## SYNTAX +### UpdateExpanded (Default) +``` +Set-AzVMRunCommand -ResourceGroupName -RunCommandName -VMName -Location + [-SubscriptionId ] [-AsyncExecution] [-ErrorBlobManagedIdentityClientId ] + [-ErrorBlobManagedIdentityObjectId ] [-ErrorBlobUri ] + [-OutputBlobManagedIdentityClientId ] [-OutputBlobManagedIdentityObjectId ] + [-OutputBlobUri ] [-Parameter ] + [-ProtectedParameter ] [-RunAsPassword ] [-RunAsUser ] + [-ScriptUriManagedIdentityClientId ] [-ScriptUriManagedIdentityObjectId ] + [-SourceCommandId ] [-SourceScript ] [-SourceScriptUri ] [-Tag ] + [-TimeoutInSecond ] [-TreatFailureAsDeploymentFailure] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +### ScriptLocalPath ``` Set-AzVMRunCommand -ResourceGroupName -RunCommandName -VMName -Location -ScriptLocalPath [-SubscriptionId ] [-AsyncExecution] @@ -26,7 +41,7 @@ Set-AzVMRunCommand -ResourceGroupName -RunCommandName -VMName ``` ## DESCRIPTION - +The operation to create or update the run command. ## EXAMPLES @@ -123,7 +138,7 @@ For RunAs to work properly, contact admin of VM and make sure user is added on t ## PARAMETERS ### -AsJob - +Run the command as a job ```yaml Type: System.Management.Automation.SwitchParameter @@ -138,7 +153,8 @@ Accept wildcard characters: False ``` ### -AsyncExecution - +Optional. +If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. ```yaml Type: System.Management.Automation.SwitchParameter @@ -153,7 +169,8 @@ 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 @@ -168,7 +185,8 @@ Accept wildcard characters: False ``` ### -ErrorBlobManagedIdentityClientId - +Client Id (GUID value) of the user-assigned managed identity. +ObjectId should not be used if this is provided. ```yaml Type: System.String @@ -183,7 +201,8 @@ Accept wildcard characters: False ``` ### -ErrorBlobManagedIdentityObjectId - +Object Id (GUID value) of the user-assigned managed identity. +ClientId should not be used if this is provided. ```yaml Type: System.String @@ -198,7 +217,9 @@ Accept wildcard characters: False ``` ### -ErrorBlobUri - +Specifies the Azure storage blob where script error stream will be uploaded. +Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. +Refer errorBlobManagedIdentity parameter. ```yaml Type: System.String @@ -213,7 +234,7 @@ Accept wildcard characters: False ``` ### -Location - +Resource location ```yaml Type: System.String @@ -228,7 +249,7 @@ Accept wildcard characters: False ``` ### -NoWait - +Run the command asynchronously ```yaml Type: System.Management.Automation.SwitchParameter @@ -243,7 +264,8 @@ Accept wildcard characters: False ``` ### -OutputBlobManagedIdentityClientId - +Client Id (GUID value) of the user-assigned managed identity. +ObjectId should not be used if this is provided. ```yaml Type: System.String @@ -258,7 +280,8 @@ Accept wildcard characters: False ``` ### -OutputBlobManagedIdentityObjectId - +Object Id (GUID value) of the user-assigned managed identity. +ClientId should not be used if this is provided. ```yaml Type: System.String @@ -273,7 +296,9 @@ Accept wildcard characters: False ``` ### -OutputBlobUri - +Specifies the Azure storage blob where script output stream will be uploaded. +Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. +Refer outputBlobManagedIdentity parameter. ```yaml Type: System.String @@ -288,6 +313,7 @@ Accept wildcard characters: False ``` ### -Parameter +The parameters used by the script. To construct, see NOTES section for PARAMETER properties and create a hash table. ```yaml @@ -303,6 +329,7 @@ Accept wildcard characters: False ``` ### -ProtectedParameter +The parameters used by the script. To construct, see NOTES section for PROTECTEDPARAMETER properties and create a hash table. ```yaml @@ -318,7 +345,7 @@ Accept wildcard characters: False ``` ### -ResourceGroupName - +The name of the resource group. ```yaml Type: System.String @@ -333,7 +360,7 @@ Accept wildcard characters: False ``` ### -RunAsPassword - +Specifies the user account password on the VM when executing the run command. ```yaml Type: System.String @@ -348,7 +375,7 @@ Accept wildcard characters: False ``` ### -RunAsUser - +Specifies the user account on the VM when executing the run command. ```yaml Type: System.String @@ -363,7 +390,7 @@ Accept wildcard characters: False ``` ### -RunCommandName - +The name of the virtual machine run command. ```yaml Type: System.String @@ -382,7 +409,7 @@ Accept wildcard characters: False ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: ScriptLocalPath Aliases: Required: True @@ -393,7 +420,8 @@ Accept wildcard characters: False ``` ### -ScriptUriManagedIdentityClientId - +Client Id (GUID value) of the user-assigned managed identity. +ObjectId should not be used if this is provided. ```yaml Type: System.String @@ -408,7 +436,8 @@ Accept wildcard characters: False ``` ### -ScriptUriManagedIdentityObjectId - +Object Id (GUID value) of the user-assigned managed identity. +ClientId should not be used if this is provided. ```yaml Type: System.String @@ -422,8 +451,55 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -SubscriptionId +### -SourceCommandId +Specifies a commandId of predefined built-in script. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` +### -SourceScript +Specifies the script content to be executed on the VM. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SourceScriptUri +Specifies the script download location. +It can be either SAS URI of an Azure storage blob with read access or public URI. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. ```yaml Type: System.String @@ -438,7 +514,7 @@ Accept wildcard characters: False ``` ### -Tag - +Resource tags ```yaml Type: System.Collections.Hashtable @@ -453,7 +529,7 @@ Accept wildcard characters: False ``` ### -TimeoutInSecond - +The timeout in seconds to execute the run command. ```yaml Type: System.Int32 @@ -468,7 +544,10 @@ Accept wildcard characters: False ``` ### -TreatFailureAsDeploymentFailure - +Optional. +If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. +If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. +See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results ```yaml Type: System.Management.Automation.SwitchParameter @@ -483,7 +562,7 @@ Accept wildcard characters: False ``` ### -VMName - +The name of the virtual machine where the run command should be created or updated. ```yaml Type: System.String @@ -539,5 +618,20 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES +ALIASES + +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. + + +`PARAMETER `: The parameters used by the script. + - `Name `: The run command parameter name. + - `Value `: The run command parameter value. + +`PROTECTEDPARAMETER `: The parameters used by the script. + - `Name `: The run command parameter name. + - `Value `: The run command parameter value. + ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md b/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md index 69e55f837e9b..60bd99b712b5 100644 --- a/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md +++ b/src/Compute/Compute.Autorest/docs/Set-AzVmssVMRunCommand.md @@ -8,10 +8,25 @@ schema: 2.0.0 # Set-AzVmssVMRunCommand ## SYNOPSIS - +The operation to create or update the VMSS VM run command. ## SYNTAX +### UpdateExpanded (Default) +``` +Set-AzVmssVMRunCommand -InstanceId -ResourceGroupName -RunCommandName + -VMScaleSetName -Location [-SubscriptionId ] [-AsyncExecution] + [-ErrorBlobManagedIdentityClientId ] [-ErrorBlobManagedIdentityObjectId ] + [-ErrorBlobUri ] [-OutputBlobManagedIdentityClientId ] + [-OutputBlobManagedIdentityObjectId ] [-OutputBlobUri ] + [-Parameter ] [-ProtectedParameter ] + [-RunAsPassword ] [-RunAsUser ] [-ScriptUriManagedIdentityClientId ] + [-ScriptUriManagedIdentityObjectId ] [-SourceCommandId ] [-SourceScript ] + [-SourceScriptUri ] [-Tag ] [-TimeoutInSecond ] [-TreatFailureAsDeploymentFailure] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### ScriptLocalPath ``` Set-AzVmssVMRunCommand -InstanceId -ResourceGroupName -RunCommandName -VMScaleSetName -Location -ScriptLocalPath [-SubscriptionId ] @@ -26,7 +41,7 @@ Set-AzVmssVMRunCommand -InstanceId -ResourceGroupName -RunComm ``` ## DESCRIPTION - +The operation to create or update the VMSS VM run command. ## EXAMPLES @@ -123,7 +138,7 @@ For RunAs to work properly, contact admin of VM and make sure user is added on t ## PARAMETERS ### -AsJob - +Run the command as a job ```yaml Type: System.Management.Automation.SwitchParameter @@ -138,7 +153,8 @@ Accept wildcard characters: False ``` ### -AsyncExecution - +Optional. +If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. ```yaml Type: System.Management.Automation.SwitchParameter @@ -153,7 +169,8 @@ 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 @@ -168,7 +185,8 @@ Accept wildcard characters: False ``` ### -ErrorBlobManagedIdentityClientId - +Client Id (GUID value) of the user-assigned managed identity. +ObjectId should not be used if this is provided. ```yaml Type: System.String @@ -183,7 +201,8 @@ Accept wildcard characters: False ``` ### -ErrorBlobManagedIdentityObjectId - +Object Id (GUID value) of the user-assigned managed identity. +ClientId should not be used if this is provided. ```yaml Type: System.String @@ -198,7 +217,9 @@ Accept wildcard characters: False ``` ### -ErrorBlobUri - +Specifies the Azure storage blob where script error stream will be uploaded. +Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. +Refer errorBlobManagedIdentity parameter. ```yaml Type: System.String @@ -213,7 +234,7 @@ Accept wildcard characters: False ``` ### -InstanceId - +The instance ID of the virtual machine. ```yaml Type: System.String @@ -228,7 +249,7 @@ Accept wildcard characters: False ``` ### -Location - +Resource location ```yaml Type: System.String @@ -243,7 +264,7 @@ Accept wildcard characters: False ``` ### -NoWait - +Run the command asynchronously ```yaml Type: System.Management.Automation.SwitchParameter @@ -258,7 +279,8 @@ Accept wildcard characters: False ``` ### -OutputBlobManagedIdentityClientId - +Client Id (GUID value) of the user-assigned managed identity. +ObjectId should not be used if this is provided. ```yaml Type: System.String @@ -273,7 +295,8 @@ Accept wildcard characters: False ``` ### -OutputBlobManagedIdentityObjectId - +Object Id (GUID value) of the user-assigned managed identity. +ClientId should not be used if this is provided. ```yaml Type: System.String @@ -288,7 +311,9 @@ Accept wildcard characters: False ``` ### -OutputBlobUri - +Specifies the Azure storage blob where script output stream will be uploaded. +Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. +Refer outputBlobManagedIdentity parameter. ```yaml Type: System.String @@ -303,6 +328,7 @@ Accept wildcard characters: False ``` ### -Parameter +The parameters used by the script. To construct, see NOTES section for PARAMETER properties and create a hash table. ```yaml @@ -318,6 +344,7 @@ Accept wildcard characters: False ``` ### -ProtectedParameter +The parameters used by the script. To construct, see NOTES section for PROTECTEDPARAMETER properties and create a hash table. ```yaml @@ -333,7 +360,7 @@ Accept wildcard characters: False ``` ### -ResourceGroupName - +The name of the resource group. ```yaml Type: System.String @@ -348,7 +375,7 @@ Accept wildcard characters: False ``` ### -RunAsPassword - +Specifies the user account password on the VM when executing the run command. ```yaml Type: System.String @@ -363,7 +390,7 @@ Accept wildcard characters: False ``` ### -RunAsUser - +Specifies the user account on the VM when executing the run command. ```yaml Type: System.String @@ -378,7 +405,7 @@ Accept wildcard characters: False ``` ### -RunCommandName - +The name of the virtual machine run command. ```yaml Type: System.String @@ -397,7 +424,7 @@ Accept wildcard characters: False ```yaml Type: System.String -Parameter Sets: (All) +Parameter Sets: ScriptLocalPath Aliases: Required: True @@ -408,7 +435,8 @@ Accept wildcard characters: False ``` ### -ScriptUriManagedIdentityClientId - +Client Id (GUID value) of the user-assigned managed identity. +ObjectId should not be used if this is provided. ```yaml Type: System.String @@ -423,7 +451,8 @@ Accept wildcard characters: False ``` ### -ScriptUriManagedIdentityObjectId - +Object Id (GUID value) of the user-assigned managed identity. +ClientId should not be used if this is provided. ```yaml Type: System.String @@ -437,8 +466,55 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -SubscriptionId +### -SourceCommandId +Specifies a commandId of predefined built-in script. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SourceScript +Specifies the script content to be executed on the VM. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SourceScriptUri +Specifies the script download location. +It can be either SAS URI of an Azure storage blob with read access or public URI. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. ```yaml Type: System.String @@ -453,7 +529,7 @@ Accept wildcard characters: False ``` ### -Tag - +Resource tags ```yaml Type: System.Collections.Hashtable @@ -468,7 +544,7 @@ Accept wildcard characters: False ``` ### -TimeoutInSecond - +The timeout in seconds to execute the run command. ```yaml Type: System.Int32 @@ -483,7 +559,10 @@ Accept wildcard characters: False ``` ### -TreatFailureAsDeploymentFailure - +Optional. +If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. +If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. +See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results ```yaml Type: System.Management.Automation.SwitchParameter @@ -498,7 +577,7 @@ Accept wildcard characters: False ``` ### -VMScaleSetName - +The name of the VM scale set. ```yaml Type: System.String @@ -554,5 +633,20 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES +ALIASES + +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. + + +`PARAMETER `: The parameters used by the script. + - `Name `: The run command parameter name. + - `Value `: The run command parameter value. + +`PROTECTEDPARAMETER `: The parameters used by the script. + - `Name `: The run command parameter name. + - `Value `: The run command parameter value. + ## RELATED LINKS diff --git a/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplicationVersion.md b/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplicationVersion.md index 9cb72088c268..d65c084fe875 100644 --- a/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplicationVersion.md +++ b/src/Compute/Compute.Autorest/docs/Update-AzGalleryApplicationVersion.md @@ -349,5 +349,39 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES +ALIASES + +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 + - `[CommandId ]`: The command id. + - `[GalleryApplicationName ]`: The name of the gallery Application Definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryApplicationVersionName ]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryImageName ]`: The name of the gallery image definition to be created or updated. The allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80 characters. + - `[GalleryImageVersionName ]`: The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + - `[GalleryName ]`: The name of the Shared Image Gallery. The allowed characters are alphabets and numbers with dots and periods allowed in the middle. The maximum length is 80 characters. + - `[Id ]`: Resource identity path + - `[InstanceId ]`: The instance ID of the virtual machine. + - `[Location ]`: The location upon which run commands is queried. + - `[ResourceGroupName ]`: The name of the resource group. + - `[RunCommandName ]`: The name of the virtual machine run command. + - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[VMName ]`: The name of the virtual machine where the run command should be created or updated. + - `[VMScaleSetName ]`: The name of the VM scale set. + +TARGETREGION : The target regions where the Image Version is going to be replicated to. This property is updatable. + - `Name `: The name of the region. + - `[EncryptionDataDiskImage ]`: A list of encryption specifications for data disk images. + - `Lun `: This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. + - `[DiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. + - `[OSDiskImageDiskEncryptionSetId ]`: A relative URI containing the resource ID of the disk encryption set. + - `[RegionalReplicaCount ]`: The number of replicas of the Image Version to be created per region. This property is updatable. + - `[SecurityProfileConfidentialVMEncryptionType ]`: confidential VM encryption types + - `[SecurityProfileSecureVMDiskEncryptionSetId ]`: secure VM disk encryption set id + - `[StorageAccountType ]`: Specifies the storage account type to be used to store the image. This property is not updatable. + ## RELATED LINKS From b6aa52c033560872118487249363376c26b4e66a Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Sun, 17 Mar 2024 19:31:15 -0700 Subject: [PATCH 15/20] Update README.md to point to remote swagger --- src/Compute/Compute.Autorest/README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Compute/Compute.Autorest/README.md b/src/Compute/Compute.Autorest/README.md index a86cc4ca6e15..de61d96cdcde 100644 --- a/src/Compute/Compute.Autorest/README.md +++ b/src/Compute/Compute.Autorest/README.md @@ -33,13 +33,12 @@ commit: 1a925d1afe288a5f20d078bbc89214a36a0e4287 require: # readme.azure.noprofile.md is the common configuration file - $(this-folder)/../../readme.azure.noprofile.md -# - $(this-folder)/../../../../../azure-rest-api-specs/specification/compute/resource-manager/readme.md input-file: # You need to specify your swagger files here. - $(repo)/specification/compute/resource-manager/Microsoft.Compute/GalleryRP/stable/2022-01-03/gallery.json - $(repo)/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2023-07-01/runCommand.json -# - $(repo)/specification/compute/resource-manager/Microsoft.Compute/common-types/v1/common.json - - $(this-folder)/../../../../../azure-rest-api-specs/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/preview/2024-03-01-preview/diagnostic.json + - $(repo)/specification/compute/resource-manager/Microsoft.Compute/common-types/v1/common.json + - $(repo)/specification/compute/resource-manager/Microsoft.Compute/DiagnosticRP/preview/2024-03-01-preview/diagnostic.json # If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally module-version: 0.3.0 # Normally, title is the service name From db52c11f8c2f5b534cf422f1098bd36c94f3b6a2 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Sun, 17 Mar 2024 19:39:11 -0700 Subject: [PATCH 16/20] Readd removed Get-AzGalleryApplication Get-AzGalleryApplicationVersion descriptions from Az.Compute.md --- .../Compute.Autorest/docs/Az.Compute.md | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/Compute/Compute.Autorest/docs/Az.Compute.md b/src/Compute/Compute.Autorest/docs/Az.Compute.md index ff1027459f6c..f541dd4d22ac 100644 --- a/src/Compute/Compute.Autorest/docs/Az.Compute.md +++ b/src/Compute/Compute.Autorest/docs/Az.Compute.md @@ -14,17 +14,38 @@ Microsoft Azure PowerShell: Compute cmdlets ### [Invoke-AzSpotPlacementRecommender](Invoke-AzSpotPlacementRecommender.md) Generates placement scores for Spot VM skus. +### [Get-AzGalleryApplication](Get-AzGalleryApplication.md) +Retrieves information about a gallery Application Definition. + +### [Get-AzGalleryApplicationVersion](Get-AzGalleryApplicationVersion.md) +Retrieves information about a gallery Application Version. + ### [New-AzGalleryApplication](New-AzGalleryApplication.md) Create or update a gallery Application Definition. ### [New-AzGalleryApplicationVersion](New-AzGalleryApplicationVersion.md) Create or update a gallery Application Version. -### [Set-AzVMRunCommand](Set-AzVMRunCommand.md) +### [Remove-AzGalleryApplication](Remove-AzGalleryApplication.md) +Delete a gallery Application. + +### [Remove-AzGalleryApplicationVersion](Remove-AzGalleryApplicationVersion.md) +Delete a gallery Application Version. +### [Remove-AzVMRunCommand](Remove-AzVMRunCommand.md) +The operation to delete the run command. + +### [Remove-AzVmssVMRunCommand](Remove-AzVmssVMRunCommand.md) +The operation to delete the VMSS VM run command. + +### [Set-AzVMRunCommand](Set-AzVMRunCommand.md) +The operation to create or update the run command. ### [Set-AzVmssVMRunCommand](Set-AzVmssVMRunCommand.md) +The operation to create or update the VMSS VM run command. +### [Update-AzGalleryApplication](Update-AzGalleryApplication.md) +Update a gallery Application Definition. ### [Update-AzGalleryApplicationVersion](Update-AzGalleryApplicationVersion.md) Update a gallery Application Version. From d08b128ec5b6ee096d69aebd960be289450e44a8 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Mon, 18 Mar 2024 09:43:10 -0700 Subject: [PATCH 17/20] Update README.md commit to the commit version that includes Spot Placement Recommender merge --- src/Compute/Compute.Autorest/README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Compute/Compute.Autorest/README.md b/src/Compute/Compute.Autorest/README.md index de61d96cdcde..1191e34e1c26 100644 --- a/src/Compute/Compute.Autorest/README.md +++ b/src/Compute/Compute.Autorest/README.md @@ -3,9 +3,6 @@ This directory contains the PowerShell module for the Compute service. --- -## Status -[![Az.Compute](https://img.shields.io/powershellgallery/v/Az.Compute.svg?style=flat-square&label=Az.Compute "Az.Compute")](https://www.powershellgallery.com/packages/Az.Compute/) - ## Info - Modifiable: yes - Generated: all @@ -29,7 +26,7 @@ For information on how to develop for `Az.Compute`, see [how-to.md](how-to.md). ### AutoRest Configuration > see https://aka.ms/autorest ``` yaml -commit: 1a925d1afe288a5f20d078bbc89214a36a0e4287 +commit: 77c47a7fba8d8b900595966b81d6bb92a0308370 require: # readme.azure.noprofile.md is the common configuration file - $(this-folder)/../../readme.azure.noprofile.md From 4660338f0c5d15e73cb2325581ed2dab4d8d49c6 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Mon, 18 Mar 2024 23:51:07 -0700 Subject: [PATCH 18/20] Update Az.Compute.psd1 to remove Get-AzSpotPlacementRecommender function to export, add additional examples for SpotPlacementRecommenderInput parameter, update test to include SpotPlacementRecommenderInput example --- src/Compute/Compute.Autorest/Az.Compute.psd1 | 2 +- .../docs/Invoke-AzSpotPlacementRecommender.md | 87 +++++++++++++++++++ .../Invoke-AzSpotPlacementRecommender.md | 78 +++++++++++++++++ ...nvoke-AzSpotPlacementRecommender.Tests.ps1 | 40 ++++++--- 4 files changed, 192 insertions(+), 15 deletions(-) diff --git a/src/Compute/Compute.Autorest/Az.Compute.psd1 b/src/Compute/Compute.Autorest/Az.Compute.psd1 index 7e959b62f1e2..d7f3d2c4f869 100644 --- a/src/Compute/Compute.Autorest/Az.Compute.psd1 +++ b/src/Compute/Compute.Autorest/Az.Compute.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.Compute.private.dll' FormatsToProcess = './Az.Compute.format.ps1xml' - FunctionsToExport = 'Get-AzSpotPlacementRecommender', 'Invoke-AzSpotPlacementRecommender', 'Get-AzGalleryApplication', 'Get-AzGalleryApplicationVersion', 'New-AzGalleryApplication', 'New-AzGalleryApplicationVersion', 'Remove-AzGalleryApplication', 'Remove-AzGalleryApplicationVersion', 'Remove-AzVMRunCommand', 'Remove-AzVmssVMRunCommand', 'Set-AzVMRunCommand', 'Set-AzVmssVMRunCommand', 'Update-AzGalleryApplication', 'Update-AzGalleryApplicationVersion', '*' + FunctionsToExport = 'Get-AzGalleryApplication', 'Get-AzGalleryApplicationVersion', 'Invoke-AzSpotPlacementRecommender', 'New-AzGalleryApplication', 'New-AzGalleryApplicationVersion', 'Remove-AzGalleryApplication', 'Remove-AzGalleryApplicationVersion', 'Remove-AzVMRunCommand', 'Remove-AzVmssVMRunCommand', 'Set-AzVMRunCommand', 'Set-AzVmssVMRunCommand', 'Update-AzGalleryApplication', 'Update-AzGalleryApplicationVersion', '*' AliasesToExport = '*' PrivateData = @{ PSData = @{ diff --git a/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md b/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md index 6ad514983fa3..5d715025dd3a 100644 --- a/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md +++ b/src/Compute/Compute.Autorest/docs/Invoke-AzSpotPlacementRecommender.md @@ -19,6 +19,13 @@ Invoke-AzSpotPlacementRecommender -Location [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` +### Post +``` +Invoke-AzSpotPlacementRecommender -Location + -SpotPlacementRecommenderInput [-SubscriptionId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION Generates placement scores for Spot VM skus. @@ -98,6 +105,86 @@ AvailabilityZone IsQuotaAvailable Region Score Sku Returns zonally scoped spot placement recommender scores for the input. +### Example 3: Regionally scoped Spot Placement Recommender scores using SpotPlacementRecommenderInput parameter as argument +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' +$desiredCount = 1 + +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $false} + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- + True japaneast RestrictedSkuNotAvailable Standard_D2_v3 + True japaneast RestrictedSkuNotAvailable Standard_D2_v2 + True japaneast RestrictedSkuNotAvailable Standard_D4_v3 + True southcentralus High Standard_D2_v3 + True southcentralus High Standard_D2_v2 + True southcentralus High Standard_D4_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v2 + True centralus RestrictedSkuNotAvailable Standard_D4_v3 +``` + +Returns regionally scoped spot placement recommender scores for the input. + +### Example 2: Zonally scoped Spot Placement Recommender scores using SpotPlacementRecommenderInput parameter as argument +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' +$desiredCount = 1 + +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $true} + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- +1 True japaneast High Standard_D2_v3 +2 True japaneast High Standard_D2_v3 +3 True japaneast High Standard_D2_v3 +1 True japaneast High Standard_D2_v2 +2 True japaneast High Standard_D2_v2 +3 True japaneast High Standard_D2_v2 +1 True japaneast High Standard_D4_v3 +2 True japaneast High Standard_D4_v3 +3 True japaneast High Standard_D4_v3 +1 True southcentralus High Standard_D2_v3 +2 True southcentralus High Standard_D2_v3 +3 True southcentralus High Standard_D2_v3 +1 True southcentralus High Standard_D2_v2 +2 True southcentralus High Standard_D2_v2 +3 True southcentralus High Standard_D2_v2 +1 True southcentralus High Standard_D4_v3 +2 True southcentralus High Standard_D4_v3 +3 True southcentralus High Standard_D4_v3 +1 True centralus High Standard_D2_v3 +2 True centralus High Standard_D2_v3 +3 True centralus High Standard_D2_v3 +1 True centralus High Standard_D2_v2 +2 True centralus High Standard_D2_v2 +3 True centralus High Standard_D2_v2 +1 True centralus High Standard_D4_v3 +2 True centralus High Standard_D4_v3 +3 True centralus High Standard_D4_v3 +``` + +Returns zonally scoped spot placement recommender scores for the input. + ## PARAMETERS ### -AvailabilityZone diff --git a/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md b/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md index 794e52a0fea3..2ed3d44b2433 100644 --- a/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md +++ b/src/Compute/Compute.Autorest/examples/Invoke-AzSpotPlacementRecommender.md @@ -72,4 +72,82 @@ AvailabilityZone IsQuotaAvailable Region Score Sku Returns zonally scoped spot placement recommender scores for the input. +### Example 3: Regionally scoped Spot Placement Recommender scores using SpotPlacementRecommenderInput parameter as argument +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' +$desiredCount = 1 + +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $false} + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- + True japaneast RestrictedSkuNotAvailable Standard_D2_v3 + True japaneast RestrictedSkuNotAvailable Standard_D2_v2 + True japaneast RestrictedSkuNotAvailable Standard_D4_v3 + True southcentralus High Standard_D2_v3 + True southcentralus High Standard_D2_v2 + True southcentralus High Standard_D4_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v3 + True centralus RestrictedSkuNotAvailable Standard_D2_v2 + True centralus RestrictedSkuNotAvailable Standard_D4_v3 +``` + +Returns regionally scoped spot placement recommender scores for the input. + +### Example 2: Zonally scoped Spot Placement Recommender scores using SpotPlacementRecommenderInput parameter as argument +```powershell +$resourceSku1 = @{sku = "Standard_D2_v3"} +$resourceSku2 = @{sku = "Standard_D2_v2"} +$resourceSku3 = @{sku = "Standard_D4_v3"} +$desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 +$desiredLocations = 'japaneast','southcentralus','centralus' +$desiredCount = 1 + +$spotPlacementRecommenderInput = @{desiredLocation = $desiredLocations; desiredSize = $desiredSizes; desiredCount = $desiredCount; availabilityZone = $true} + +$response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput +$response.PlacementScore +``` + +```output +AvailabilityZone IsQuotaAvailable Region Score Sku +---------------- ---------------- ------ ----- --- +1 True japaneast High Standard_D2_v3 +2 True japaneast High Standard_D2_v3 +3 True japaneast High Standard_D2_v3 +1 True japaneast High Standard_D2_v2 +2 True japaneast High Standard_D2_v2 +3 True japaneast High Standard_D2_v2 +1 True japaneast High Standard_D4_v3 +2 True japaneast High Standard_D4_v3 +3 True japaneast High Standard_D4_v3 +1 True southcentralus High Standard_D2_v3 +2 True southcentralus High Standard_D2_v3 +3 True southcentralus High Standard_D2_v3 +1 True southcentralus High Standard_D2_v2 +2 True southcentralus High Standard_D2_v2 +3 True southcentralus High Standard_D2_v2 +1 True southcentralus High Standard_D4_v3 +2 True southcentralus High Standard_D4_v3 +3 True southcentralus High Standard_D4_v3 +1 True centralus High Standard_D2_v3 +2 True centralus High Standard_D2_v3 +3 True centralus High Standard_D2_v3 +1 True centralus High Standard_D2_v2 +2 True centralus High Standard_D2_v2 +3 True centralus High Standard_D2_v2 +1 True centralus High Standard_D4_v3 +2 True centralus High Standard_D4_v3 +3 True centralus High Standard_D4_v3 +``` +Returns zonally scoped spot placement recommender scores for the input. \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 index fea9bf64132f..31cece5912d3 100644 --- a/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 +++ b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 @@ -21,32 +21,44 @@ Describe 'Invoke-AzSpotPlacementRecommender' { $resourceSku3 = @{sku = "Standard_D32_v2"} $desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 $desiredLocations = 'eastus','eastus2','westus' + $desiredCount = 1 } It 'PostExpanded' { { - $response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount 1 -DesiredLocation $desiredLocations -DesiredSize $desiredSizes + # Zonal + $response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount $desiredCount -DesiredLocation $desiredLocations -DesiredSize $desiredSizes + $response.PlacementScore + + # Regional + $response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount $desiredCount -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone + $response.PlacementScore } } It 'Post' { { + # Zonal $spotPlacementRecommenderInput = @{ - desiredSizes = $desiredSizes; - desiredCount = 100; - desiredLocations = $desiredLocations; - availabilityZones = $true + desiredSize = $desiredSizes; + desiredCount = $desiredCount; + desiredLocation = $desiredLocations; + availabilityZone = $true } - Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput -verbose - } - } - - It 'PostViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } + $response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput + $response.PlacementScore - It 'PostViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + # Regional + $spotPlacementRecommenderInput = + @{ + desiredSize = $desiredSizes; + desiredCount = $desiredCount; + desiredLocation = $desiredLocations; + availabilityZone = $false + } + $response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput + $response.PlacementScore + } } } From 3c6028c46bdc576b2acd9205c5675b07adea2881 Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Tue, 19 Mar 2024 00:16:16 -0700 Subject: [PATCH 19/20] Update test cases, response should not be null or empty, update env.json, localEnv.json values --- .../test/Invoke-AzSpotPlacementRecommender.Tests.ps1 | 8 ++++---- src/Compute/Compute.Autorest/test/env.json | 10 +++++----- src/Compute/Compute.Autorest/test/localEnv.json | 10 +++++++--- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 index 31cece5912d3..bdccf346defe 100644 --- a/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 +++ b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 @@ -28,11 +28,11 @@ Describe 'Invoke-AzSpotPlacementRecommender' { { # Zonal $response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount $desiredCount -DesiredLocation $desiredLocations -DesiredSize $desiredSizes - $response.PlacementScore + $response.PlacementScore | Should -Not -BeNullOrEmpty -ErrorAction Stop # Regional $response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount $desiredCount -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone - $response.PlacementScore + $response.PlacementScore | Should -Not -BeNullOrEmpty -ErrorAction Stop } } @@ -47,7 +47,7 @@ Describe 'Invoke-AzSpotPlacementRecommender' { availabilityZone = $true } $response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput - $response.PlacementScore + $response.PlacementScore | Should -Not -BeNullOrEmpty -ErrorAction Stop # Regional $spotPlacementRecommenderInput = @@ -58,7 +58,7 @@ Describe 'Invoke-AzSpotPlacementRecommender' { availabilityZone = $false } $response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput - $response.PlacementScore + $response.PlacementScore | Should -Not -BeNullOrEmpty -ErrorAction Stop } } } diff --git a/src/Compute/Compute.Autorest/test/env.json b/src/Compute/Compute.Autorest/test/env.json index ac0b8ef8128e..ffa91c03c3fb 100644 --- a/src/Compute/Compute.Autorest/test/env.json +++ b/src/Compute/Compute.Autorest/test/env.json @@ -1,8 +1,8 @@ { - "SubscriptionId": "e37510d7-33b6-4676-886f-ee75bcc01871", - "Location": "EastUS", - "rgname": "testpwshellcompute", - "ResourceGroupName": "RGComputeTestnfr5c0pt", + "ResourceGroupName": "RGComputeTest5u7v6raj", "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "RandomString": "nfr5c0pt" + "RandomString": "5u7v6raj", + "rgname": "testpwshellcompute", + "SubscriptionId": "be23ca13-8eb4-4d0e-be10-b00451817956", + "Location": "EastUS" } diff --git a/src/Compute/Compute.Autorest/test/localEnv.json b/src/Compute/Compute.Autorest/test/localEnv.json index 7af6cca258cc..19be331097a9 100644 --- a/src/Compute/Compute.Autorest/test/localEnv.json +++ b/src/Compute/Compute.Autorest/test/localEnv.json @@ -1,4 +1,8 @@ { - "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "SubscriptionId": "e37510d7-33b6-4676-886f-ee75bcc01871" - } \ No newline at end of file + "SubscriptionId": "be23ca13-8eb4-4d0e-be10-b00451817956", + "Location": "EastUS", + "rgname": "testpwshellcompute", + "ResourceGroupName": "RGComputeTestbztprklq", + "RandomString": "bztprklq", + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47" +} From 116b7b1a98d2c73b66ed7cd0974a81f68ecfc26a Mon Sep 17 00:00:00 2001 From: Elina Liu Date: Thu, 11 Apr 2024 00:19:56 -0700 Subject: [PATCH 20/20] Add recording file and fix invalid input desired size --- ...-AzSpotPlacementRecommender.Recording.json | 154 ++++++++++++++++++ ...nvoke-AzSpotPlacementRecommender.Tests.ps1 | 6 +- 2 files changed, 157 insertions(+), 3 deletions(-) create mode 100644 src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Recording.json diff --git a/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Recording.json b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Recording.json new file mode 100644 index 000000000000..03b000352107 --- /dev/null +++ b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Recording.json @@ -0,0 +1,154 @@ +{ + "Invoke-AzSpotPlacementRecommender+[NoContext]+PostExpanded+$POST+https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview", + "Content": "{\r\n \"desiredLocations\": [ \"eastus\", \"eastus2\", \"westus\" ],\r\n \"desiredSizes\": [\r\n {\r\n \"sku\": \"Standard_D2_v3\"\r\n },\r\n {\r\n \"sku\": \"Standard_D2_v2\"\r\n },\r\n {\r\n \"sku\": \"Standard_D4_v3\"\r\n }\r\n ],\r\n \"desiredCount\": 1\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "247" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "41003dd1-f92c-4b08-8c67-e931889d08f9" ], + "x-ms-correlation-request-id": [ "067ea019-22cd-450b-82ae-d2d3f23ee68e" ], + "api-supported-versions": [ "2021-06-01-preview, 2024-03-01-preview" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-routing-request-id": [ "WESTUS2:20240411T071740Z:067ea019-22cd-450b-82ae-d2d3f23ee68e" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 500E284CC1CA4188A51B4AE19D59FCDE Ref B: CO6AA3150218031 Ref C: 2024-04-11T07:17:38Z" ], + "Date": [ "Thu, 11 Apr 2024 07:17:39 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1099" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"desiredLocations\":[\"eastus\",\"eastus2\",\"westus\"],\"desiredSizes\":[{\"sku\":\"Standard_D2_v3\"},{\"sku\":\"Standard_D2_v2\"},{\"sku\":\"Standard_D4_v3\"}],\"desiredCount\":1,\"availabilityZones\":false,\"placementScores\":[{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true}]}", + "isContentBase64": false + } + }, + "Invoke-AzSpotPlacementRecommender+[NoContext]+PostExpanded+$POST+https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview+2": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview", + "Content": "{\r\n \"desiredLocations\": [ \"eastus\", \"eastus2\", \"westus\" ],\r\n \"desiredSizes\": [\r\n {\r\n \"sku\": \"Standard_D2_v3\"\r\n },\r\n {\r\n \"sku\": \"Standard_D2_v2\"\r\n },\r\n {\r\n \"sku\": \"Standard_D4_v3\"\r\n }\r\n ],\r\n \"desiredCount\": 1,\r\n \"availabilityZones\": true\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "277" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "3751f746-58fd-4d9d-8ce6-0cc8272b5c7b" ], + "x-ms-correlation-request-id": [ "11fadfa4-feef-4ea0-91b1-f4f8b711e434" ], + "api-supported-versions": [ "2021-06-01-preview, 2024-03-01-preview" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-routing-request-id": [ "WESTUS2:20240411T071742Z:11fadfa4-feef-4ea0-91b1-f4f8b711e434" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 210A529DE53043BEABDE637371BFBF76 Ref B: CO6AA3150218031 Ref C: 2024-04-11T07:17:40Z" ], + "Date": [ "Thu, 11 Apr 2024 07:17:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3372" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"desiredLocations\":[\"eastus\",\"eastus2\",\"westus\"],\"desiredSizes\":[{\"sku\":\"Standard_D2_v3\"},{\"sku\":\"Standard_D2_v2\"},{\"sku\":\"Standard_D4_v3\"}],\"desiredCount\":1,\"availabilityZones\":true,\"placementScores\":[{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"availabilityZone\":\"1\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"availabilityZone\":\"1\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"availabilityZone\":\"1\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"1\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"availabilityZone\":\"1\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"1\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"availabilityZone\":\"1\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"availabilityZone\":\"2\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"availabilityZone\":\"3\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"availabilityZone\":\"1\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"availabilityZone\":\"2\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"availabilityZone\":\"3\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"availabilityZone\":\"1\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"availabilityZone\":\"2\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"availabilityZone\":\"3\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true}]}", + "isContentBase64": false + } + }, + "Invoke-AzSpotPlacementRecommender+[NoContext]+Post+$POST+https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview", + "Content": "{\r\n \"desiredLocations\": [ \"eastus\", \"eastus2\", \"westus\" ],\r\n \"desiredSizes\": [\r\n {\r\n \"sku\": \"Standard_D2_v3\"\r\n },\r\n {\r\n \"sku\": \"Standard_D2_v2\"\r\n },\r\n {\r\n \"sku\": \"Standard_D4_v3\"\r\n }\r\n ],\r\n \"desiredCount\": 1,\r\n \"availabilityZones\": true\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "277" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "dd4f76a8-4f49-4e26-8373-282d2cfd3043" ], + "x-ms-correlation-request-id": [ "57f95cfa-19b8-4e80-814a-1df89a09cadc" ], + "api-supported-versions": [ "2021-06-01-preview, 2024-03-01-preview" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-routing-request-id": [ "WESTUS2:20240411T071744Z:57f95cfa-19b8-4e80-814a-1df89a09cadc" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 60932BA3B6D64E76942B58D9591C3AEA Ref B: CO6AA3150218031 Ref C: 2024-04-11T07:17:42Z" ], + "Date": [ "Thu, 11 Apr 2024 07:17:43 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3372" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"desiredLocations\":[\"eastus\",\"eastus2\",\"westus\"],\"desiredSizes\":[{\"sku\":\"Standard_D2_v3\"},{\"sku\":\"Standard_D2_v2\"},{\"sku\":\"Standard_D4_v3\"}],\"desiredCount\":1,\"availabilityZones\":true,\"placementScores\":[{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"availabilityZone\":\"1\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"availabilityZone\":\"1\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"availabilityZone\":\"1\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"1\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"availabilityZone\":\"1\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"1\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"availabilityZone\":\"3\",\"score\":\"High\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"availabilityZone\":\"1\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"availabilityZone\":\"2\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"availabilityZone\":\"3\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"availabilityZone\":\"1\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"availabilityZone\":\"2\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"availabilityZone\":\"3\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"availabilityZone\":\"1\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"availabilityZone\":\"2\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"availabilityZone\":\"3\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true}]}", + "isContentBase64": false + } + }, + "Invoke-AzSpotPlacementRecommender+[NoContext]+Post+$POST+https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview+2": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/be23ca13-8eb4-4d0e-be10-b00451817956/providers/Microsoft.Compute/locations/eastus/diagnostics/spotPlacementRecommender/generate?api-version=2024-03-01-preview", + "Content": "{\r\n \"desiredLocations\": [ \"eastus\", \"eastus2\", \"westus\" ],\r\n \"desiredSizes\": [\r\n {\r\n \"sku\": \"Standard_D2_v3\"\r\n },\r\n {\r\n \"sku\": \"Standard_D2_v2\"\r\n },\r\n {\r\n \"sku\": \"Standard_D4_v3\"\r\n }\r\n ],\r\n \"desiredCount\": 1,\r\n \"availabilityZones\": false\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "278" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "c5fb1d5b-588a-4716-8b29-58adc34b7c30" ], + "x-ms-correlation-request-id": [ "bf1e6828-aa8e-4eaf-a317-0371f5df06f3" ], + "api-supported-versions": [ "2021-06-01-preview, 2024-03-01-preview" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-routing-request-id": [ "WESTUS2:20240411T071747Z:bf1e6828-aa8e-4eaf-a317-0371f5df06f3" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9D5E3AE06E4F4B00AC32B612D8A44022 Ref B: CO6AA3150218031 Ref C: 2024-04-11T07:17:45Z" ], + "Date": [ "Thu, 11 Apr 2024 07:17:47 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1099" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"desiredLocations\":[\"eastus\",\"eastus2\",\"westus\"],\"desiredSizes\":[{\"sku\":\"Standard_D2_v3\"},{\"sku\":\"Standard_D2_v2\"},{\"sku\":\"Standard_D4_v3\"}],\"desiredCount\":1,\"availabilityZones\":false,\"placementScores\":[{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"eastus2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"eastus2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"eastus2\",\"score\":\"DataNotFoundOrStale\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v3\",\"region\":\"westus\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D2_v2\",\"region\":\"westus\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true},{\"sku\":\"Standard_D4_v3\",\"region\":\"westus\",\"score\":\"RestrictedSkuNotAvailable\",\"isQuotaAvailable\":true}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 index bdccf346defe..2806920b6483 100644 --- a/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 +++ b/src/Compute/Compute.Autorest/test/Invoke-AzSpotPlacementRecommender.Tests.ps1 @@ -18,7 +18,7 @@ Describe 'Invoke-AzSpotPlacementRecommender' { BeforeAll { $resourceSku1 = @{sku = "Standard_D2_v3"} $resourceSku2 = @{sku = "Standard_D2_v2"} - $resourceSku3 = @{sku = "Standard_D32_v2"} + $resourceSku3 = @{sku = "Standard_D4_v3"} $desiredSizes = $resourceSku1,$resourceSku2,$resourceSku3 $desiredLocations = 'eastus','eastus2','westus' $desiredCount = 1 @@ -33,7 +33,7 @@ Describe 'Invoke-AzSpotPlacementRecommender' { # Regional $response = Invoke-AzSpotPlacementRecommender -Location eastus -DesiredCount $desiredCount -DesiredLocation $desiredLocations -DesiredSize $desiredSizes -AvailabilityZone $response.PlacementScore | Should -Not -BeNullOrEmpty -ErrorAction Stop - } + } | Should -Not -Throw } It 'Post' { @@ -59,6 +59,6 @@ Describe 'Invoke-AzSpotPlacementRecommender' { } $response = Invoke-AzSpotPlacementRecommender -Location eastus -SpotPlacementRecommenderInput $spotPlacementRecommenderInput $response.PlacementScore | Should -Not -BeNullOrEmpty -ErrorAction Stop - } + } | Should -Not -Throw } }