Skip to content
Closed
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/StackHCIVM/StackHCIVM.Autorest/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ generated
internal
exports
tools
custom/*.psm1
custom/autogen-model-cmdlets
test/*-TestResults.xml
license.txt
/*.ps1
/*.psd1
/*.ps1xml
/*.psm1
/*.snk
Expand Down
23 changes: 23 additions & 0 deletions src/StackHCIVM/StackHCIVM.Autorest/Az.StackHCIVM.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@{
GUID = 'db997a7e-ee64-49bb-b08c-c549bf733ebe'
RootModule = './Az.StackHCIVM.psm1'
ModuleVersion = '2.0.0'
CompatiblePSEditions = 'Core', 'Desktop'
Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
Copyright = 'Microsoft Corporation. All rights reserved.'
Description = 'Microsoft Azure PowerShell: StackHcivm cmdlets'
PowerShellVersion = '5.1'
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.StackHCIVM.private.dll'
FormatsToProcess = './Az.StackHCIVM.format.ps1xml'
FunctionsToExport = 'Add-AzStackHCIVMVirtualMachineDataDisk', 'Add-AzStackHCIVMVirtualMachineNetworkInterface', 'Get-AzStackHCIVMAttestationStatuses', 'Get-AzStackHCIVMImage', 'Get-AzStackHCIVMLogicalNetwork', 'Get-AzStackHCIVMNetworkInterface', 'Get-AzStackHCIVMNetworkSecurityGroup', 'Get-AzStackHCIVMSecurityRule', 'Get-AzStackHCIVMStoragePath', 'Get-AzStackHCIVMVirtualHardDisk', 'Get-AzStackHCIVMVirtualMachine', 'New-AzStackHCIVMImage', 'New-AzStackHCIVMLogicalNetwork', 'New-AzStackHCIVMNetworkInterface', 'New-AzStackHCIVMNetworkSecurityGroup', 'New-AzStackHCIVMSecurityRule', 'New-AzStackHCIVMStoragePath', 'New-AzStackHCIVMVirtualHardDisk', 'New-AzStackHCIVMVirtualMachine', 'Remove-AzStackHCIVMImage', 'Remove-AzStackHCIVMLogicalNetwork', 'Remove-AzStackHCIVMNetworkInterface', 'Remove-AzStackHCIVMNetworkSecurityGroup', 'Remove-AzStackHCIVMSecurityRule', 'Remove-AzStackHCIVMStoragePath', 'Remove-AzStackHCIVMVirtualHardDisk', 'Remove-AzStackHCIVMVirtualMachine', 'Remove-AzStackHCIVMVirtualMachineDataDisk', 'Remove-AzStackHCIVMVirtualMachineNetworkInterface', 'Restart-AzStackHCIVMVirtualMachine', 'Save-AzStackHCIVMVirtualMachine', 'Start-AzStackHCIVMVirtualMachine', 'Stop-AzStackHCIVMVirtualMachine', 'Suspend-AzStackHCIVMVirtualMachine', 'Update-AzStackHCIVMImage', 'Update-AzStackHCIVMLogicalNetwork', 'Update-AzStackHCIVMNetworkInterface', 'Update-AzStackHCIVMNetworkSecurityGroupTag', 'Update-AzStackHCIVMSecurityRule', 'Update-AzStackHCIVMStoragePath', 'Update-AzStackHCIVMVirtualHardDisk', 'Update-AzStackHCIVMVirtualMachine'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'StackHcivm'
LicenseUri = 'https://aka.ms/azps-license'
ProjectUri = 'https://github.com/Azure/azure-powershell'
ReleaseNotes = ''
}
}
}
26 changes: 26 additions & 0 deletions src/StackHCIVM/StackHCIVM.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an ""AS IS"" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
// is regenerated.

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - StackHcivm")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.1.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.1.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
80 changes: 58 additions & 22 deletions src/StackHCIVM/StackHCIVM.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,20 @@ In this directory, run AutoRest:
> see https://aka.ms/autorest

```yaml
commit: 812f964651d5f1f7148b54ed2cc35cb97be12523
commit: abc9cee615e7859ab5cb684a3780066a200324c0
require:
- $(this-folder)/../../readme.azure.noprofile.md

input-file:
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/common.json
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/galleryImages.json
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/marketplaceGalleryImages.json
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/networkInterfaces.json
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/storageContainers.json
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/virtualHardDisks.json
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/virtualMachineInstances.json
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/logicalNetworks.json
- $(repo)/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-03-15-preview/HybridCompute.json
- $(repo)/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCIVM/preview/2024-02-01-preview/stackhcivm.json
- $(repo)/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2025-01-13/HybridCompute.json

module-version: 0.1.0
module-version: 2.0.0
title: StackHCIVM
service-name: StackHCIVM
subject-prefix: $(service-name)
disable-transform-identity-type: true
flatten-userassignedidentity: false

inlining-threshold: 50
resourcegroup-append: true
directive:
Expand All @@ -83,7 +75,7 @@ directive:
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
"$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
},
"200": {
Expand All @@ -108,7 +100,7 @@ directive:
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
"$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
},
"200": {
Expand Down Expand Up @@ -138,7 +130,7 @@ directive:
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
"$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
},
"200": {
Expand All @@ -163,7 +155,7 @@ directive:
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
"$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
},
"200": {
Expand All @@ -188,7 +180,7 @@ directive:
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
"$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
},
"200": {
Expand All @@ -213,7 +205,7 @@ directive:
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
"$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
},
"200": {
Expand All @@ -238,7 +230,7 @@ directive:
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
"$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
}
},
"200": {
Expand All @@ -255,8 +247,11 @@ directive:
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages/{galleryImageName}"].delete
transform: >-
$["x-ms-long-running-operation"] = true



# Temporarily removing this because of build failure.
# The parameter 'Extension' has multiple parameter types [ISetupExtensionRequest, IMachineExtensionProperties[]] defined, which is not supported.
- remove-operation: SetupExtensions

# Remove the unexpanded parameter set
- where:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^GetViaIdentity$
Expand Down Expand Up @@ -571,6 +566,18 @@ directive:
set:
subject: VirtualMachine
hide: true
- where:
verb: Save
subject: VirtualMachineInstance
set:
subject: VirtualMachine
hide: true
- where:
verb: Suspend
subject: VirtualMachineInstance
set:
subject: VirtualMachine
hide: true
- where:
verb: Get
subject: VirtualMachineInstance
Expand Down Expand Up @@ -637,9 +644,38 @@ directive:
- where:
subject: Extension
hide: true
- where:
subject: ExtensionMetadataV2
remove: true
- where:
subject: ExtensionPublisher
remove: true
- where:
subject: ExtensionType
remove: true
- where:
subject: Gateway
remove: true
- where:
subject: License
remove: true
- where:
subject: MachineRunCommand
remove: true
- where:
subject: MachinePatch
remove: true
- where:
subject: AssessMachinePatch
remove: true
- where:
subject: LicenseProfile
remove: true
- where:
subject: Setting
remove: true
- where:
subject-prefix: StackHciVM
set:
subject-prefix: StackHCIVM

```
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "logicalNetworks",
"apiVersion": "2024-01-01",
"apiVersion": "2024-02-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.stackhcivm"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "networkInterfaces",
"apiVersion": "2024-01-01",
"apiVersion": "2024-02-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.stackhcivm"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"resourceType": "networkSecurityGroups/securityRules",
"apiVersion": "2024-02-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.stackhcivm"
},
"commands": [
{
"name": "Get-AzStackHCIVMSecurityRule",
"description": "Gets the specified security rule.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.stackhcivm/get-azstackhcivmsecurityrule"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-NetworkSecurityGroupName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "Gets the specified security rule.",
"parameters": [
{
"name": "-Name",
"value": "[Path.securityRuleName]"
},
{
"name": "-NetworkSecurityGroupName",
"value": "[Path.networkSecurityGroupName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzStackHCIVMSecurityRule",
"description": "Deletes the specified security rule.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.stackhcivm/remove-azstackhcivmsecurityrule"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-NetworkSecurityGroupName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Deletes the specified security rule.",
"parameters": [
{
"name": "-Name",
"value": "[Path.securityRuleName]"
},
{
"name": "-NetworkSecurityGroupName",
"value": "[Path.networkSecurityGroupName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
}
]
}
Loading
Loading