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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/VMware/VMware.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// 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
Expand All @@ -19,10 +22,8 @@
[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 - VMware")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.8.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.8.0")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - AzureVMwareSolutionApi")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.9.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.9.1")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]


248 changes: 0 additions & 248 deletions src/VMware/VMware.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,251 +22,3 @@ AutoRest does not generate authentication code for the module. Authentication is
## Development
For information on how to develop for `Az.VMware`, see [how-to.md](how-to.md).
<!-- endregion -->
Comment on lines 22 to 24

---
## Generation Requirements
Use of the beta version of `autorest.powershell` generator requires the following:
- [NodeJS LTS](https://nodejs.org) (10.15.x LTS preferred)
- **Note**: It *will not work* with Node < 10.x. Using 11.x builds may cause issues as they may introduce instability or breaking changes.
> If you want an easy way to install and update Node, [NVS - Node Version Switcher](../nodejs/installing-via-nvs.md) or [NVM - Node Version Manager](../nodejs/installing-via-nvm.md) is recommended.
- [AutoRest](https://aka.ms/autorest) v3 beta <br>`npm install -g autorest@beta`<br>&nbsp;
- PowerShell 6.0 or greater
- If you don't have it installed, you can use the cross-platform npm package <br>`npm install -g pwsh`<br>&nbsp;
- .NET Core SDK 2.0 or greater
- If you don't have it installed, you can use the cross-platform npm package <br>`npm install -g dotnet-sdk-2.2`<br>&nbsp;

## Run Generation
In this directory, run AutoRest:
> `autorest`

---
### AutoRest Configuration
> see https://aka.ms/autorest

``` yaml
commit: 5214e009eb7f7e43df634c52803dd92bbfe4c978
require:
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
- $(repo)/specification/vmware/resource-manager/Microsoft.AVS/AVS/stable/2025-09-01/vmware.json

module-version: 0.4.0
title: VMware
subject-prefix: $(service-name)

support-json-input: false

directive:
- from: swagger-document
where: $.definitions.AdminCredentials.properties.nsxtPassword
transform: >-
return {
"description": "NSX-T Manager password",
"type": "string",
"readOnly": true,
"x-ms-secret": true,
"format": "password"
}
- from: swagger-document
where: $.definitions.AdminCredentials.properties.vcenterPassword
transform: >-
return {
"description": "vCenter admin password",
"type": "string",
"readOnly": true,
"x-ms-secret": true,
"format": "password"
}
- where:
variant: ^(Create|Update)(?!.*?Expanded)
remove: true
- where:
variant: ^Restrict$|^RestrictViaIdentity$
remove: true
- where:
verb: Set
remove: true
- where:
verb: Get|New|Remove
subject: Addon
hide: true
- where:
verb: New|Remove
subject: PrivateCloud
hide: true
- where:
verb: Get
subject: ScriptCmdlet|ScriptExecutionLog|ScriptPackage|WorkloadNetworkGateway|WorkloadNetworkVirtualMachine
hide: true
- where:
verb: Get|New|Remove
subject: ScriptExecution|WorkloadNetworkPublicIP
hide: true
- where:
verb: Lock
subject: VirtualMachineMovement
hide: true
- where:
verb: Get|New|Update|Remove
subject: WorkloadNetworkDhcp|WorkloadNetworkDnsService|WorkloadNetworkDnsZone|WorkloadNetworkPortMirroring|WorkloadNetworkSegment|WorkloadNetworkVMGroup
hide: true
- where:
verb: New|Get|Remove
subject: HcxEnterpriseSite
remove: true
- where:
verb: Test
subject: ^LocationQuotaAvailability$
variant: ^CheckViaIdentity$
remove: true
# Remove v4 variant
- where:
verb: Test
subject: ^LocationTrialAvailability$
variant: ^Check$|CheckViaIdentity
remove: true
- where:
verb: New
subject: PrivateCloud
variant: CreateViaIdentityExpanded
remove: true
# custom set SKU Name optional
# - where:
# verb: Test
# subject: ^LocationTrialAvailability$
# hide: true
# Remove the list variant as the workloadNetwork only have one enum value
- where:
verb: Get
subject: WorkloadNetwork
# variant: List
hide: true
# Hide parent object variant to fix 'multiple types define RestrictMovement [string, IVirtualMachineRestrictMovement]'
- where:
verb: Lock
subject: VirtualMachineMovement
variant: ^RestrictViaIdentityCluster$|^RestrictViaIdentityPrivateCloud$
remove: true
# Hide HcxEnterpriseSite, ScriptExecution, Addon update
- where:
verb: Update
subject: HcxEnterpriseSite|ScriptExecution|Addon
remove: true
# Prevent flattening of discriminated union types — these must be passed as full objects.
# AddonProperties and PlacementPolicyProperties are polymorphic base types whose subtypes
# are constructed via dedicated New-AzVMware*Object cmdlets.
# VcfLicense is a discriminated union type (base: VcfLicense, concrete: Vcf5License).
# AutoRest cannot safely flatten it, so we keep it as a single -VcfLicense parameter.
- no-inline:
- AddonProperties
- PlacementPolicyProperties
- VcfLicense
# Generate helper object cmdlets for model types that are discriminated unions and
# cannot be flattened into individual cmdlet parameters.
- model-cmdlet:
- model-name: VMPlacementPolicyProperties
cmdlet-name: New-AzVMwareVMPlacementPolicyPropertyObject
- model-name: VmHostPlacementPolicyProperties
cmdlet-name: New-AzVMwareVmHostPlacementPolicyPropertyObject
# Vcf5License is the only concrete subtype of VcfLicense in the 2025-09-01 API.
# The helper cmdlet constructs a Vcf5License object for use with New-AzVMwarePrivateCloud -VcfLicense.
- model-name: Vcf5License
cmdlet-name: New-AzVMwareVcf5LicenseObject
# - model-name: ScriptSecureStringExecutionParameter
# - model-name: ScriptStringExecutionParameter
# - model-name: PSCredentialExecutionParameter
# - model-name: AddonSrmProperties
# cmdlet-name: New-AzVMwareAddonSrmPropertyObject
# - model-name: AddonVrProperties
# cmdlet-name: New-AzVMwareAddonVrPropertyObject
- where:
verb: Get
subject: ^PrivateCloudAdminCredentials$
set:
subject: PrivateCloudAdminCredential
- where:
verb: Invoke
subject: ^RotatePrivateCloudNsxtPassword$
set:
verb: New
subject: PrivateCloudNsxtPassword
- where:
verb: Invoke
subject: ^RotatePrivateCloudVcenterPassword$
set:
verb: New
subject: PrivateCloudVcenterPassword
- where:
verb: Get
subject: ^WorkloadNetworkVirtualMachine$
set:
subject: WorkloadNetworkVM
- where:
verb: New|Get|Update|Remove
subject: ^WorkloadNetworkDhcp$
parameter-name: DhcpId
set:
parameter-name: DhcpName
- where:
verb: New|Get|Update|Remove
subject: ^WorkloadNetworkDnsService$
parameter-name: DnsServiceId
set:
parameter-name: DnsServiceName
- where:
subject: ^Cluster$
parameter-name: PropertiesHosts
set:
parameter-name: PropertiesHost
- where:
verb: New|Get|Update|Remove
subject: ^WorkloadNetworkDnsZone$
parameter-name: DnsZoneId
set:
parameter-name: DnsZoneName
- where:
verb: Get
subject: ^WorkloadNetworkGateway$
parameter-name: GatewayId
set:
parameter-name: GatewayName
- where:
verb: New|Get|Update|Remove
subject: ^WorkloadNetworkPortMirroring$
parameter-name: PortMirroringId
set:
parameter-name: PortMirroringName
- where:
verb: New|Get|Remove
subject: ^WorkloadNetworkPublicIP$
parameter-name: PublicIPId
set:
parameter-name: PublicIPName
- where:
verb: New|Get|Update|Remove
subject: ^WorkloadNetworkSegment$
parameter-name: SegmentId
set:
parameter-name: SegmentName
- where:
verb: New|Get|Update|Remove
subject: ^WorkloadNetworkVMGroup$
parameter-name: VMGroupId
set:
parameter-name: VMGroupName
- where:
verb: New
subject: ^GlobalReachConnection$
parameter-name: PeerExpressRouteCircuit
set:
parameter-name: PeerExpressRouteResourceId
- where:
model-name: Datastore
set:
format-table:
properties:
- Name
- Status
- ProvisioningState
- ResourceGroupName
```
2 changes: 1 addition & 1 deletion src/VMware/VMware.Autorest/docs/Az.VMware.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.VMware
Module Guid: 6bee2b60-5b08-4f28-b776-6dfda4fc70db
Module Guid: 1f14b65e-780f-482d-a5e8-3cd6e516ce55
Download Help Link: https://learn.microsoft.com/powershell/module/az.vmware
Help Version: 1.0.0.0
Locale: en-US
Expand Down
3 changes: 1 addition & 2 deletions src/VMware/VMware.Autorest/docs/New-AzVMwareCluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,7 @@ Accept wildcard characters: False

### -SkuName
The name of the SKU.
E.g.
P3.
Ex - P3.
It is typically a letter+number code

```yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Accept wildcard characters: False
```

### -Location
The name of the Azure region.
A location in a subscription

```yaml
Type: System.String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Accept wildcard characters: False
```

### -Location
The name of the Azure region.
A location in a subscription

```yaml
Type: System.String
Expand All @@ -102,8 +102,7 @@ Accept wildcard characters: False

### -Name
The name of the SKU.
E.g.
P3.
Ex - P3.
It is typically a letter+number code

```yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Accept wildcard characters: False
```

### -Location
The name of the Azure region.
A location in a subscription

```yaml
Type: System.String
Expand Down
3 changes: 1 addition & 2 deletions src/VMware/VMware.Autorest/docs/Update-AzVMwareCluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,7 @@ Accept wildcard characters: False

### -SkuName
The name of the SKU.
E.g.
P3.
Ex - P3.
It is typically a letter+number code

```yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,7 @@ Accept wildcard characters: False

### -SkuName
The name of the SKU.
E.g.
P3.
Ex - P3.
It is typically a letter+number code

```yaml
Expand Down
2 changes: 1 addition & 1 deletion src/VMware/VMware.Autorest/generate-info.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"generate_Id": "6b5fd672-539d-49db-a352-643b92fcf814"
"generate_Id": "8c4a3949-09dd-4d5b-ba2f-bfe0164dfb4d"
}
3 changes: 3 additions & 0 deletions src/VMware/VMware.Autorest/tsp-location.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
directory: specification\vmware\resource-manager\Microsoft.AVS\AVS
commit: 5d221767a7423e746d446de30dbbb5d60086722f
repo: Azure/azure-rest-api-specs
Loading
Loading