Skip to content

[Az.ConnectedNetwork] Update generation tool version: autorest.powershe… #27564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// 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 - ConnectedNetwork")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.2")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.2")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]

32 changes: 17 additions & 15 deletions src/ConnectedNetwork/ConnectedNetwork.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,13 @@ input-file:
module-version: 0.1.0
title: ConnectedNetwork
subject-prefix: $(service-name)
identity-correction-for-post: true
resourcegroup-append: true
nested-object-to-string: true

# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
use-extension:
"@autorest/powershell": "3.x"

directive:
- where:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$
remove: true
- where:
verb: Set
Expand Down Expand Up @@ -137,11 +133,17 @@ directive:
- no-inline:
- Device
# The generated cmdlet need to Re-Name
# - model-cmdlet:
# - AzureStackEdgeFormat
# - NetworkInterface
# - NetworkInterfaceIPConfiguration
# - NetworkFunctionUserConfiguration
# - NetworkFunctionVendorConfiguration
# - NetworkFunctionRoleConfiguration
- model-cmdlet:
- model-name: AzureStackEdgeFormat
cmdlet-name: New-AzConnectedNetworkAzureStackEdgeObject
- model-name: NetworkInterface
cmdlet-name: New-AzConnectedNetworkInterfaceObject
- model-name: NetworkInterfaceIPConfiguration
cmdlet-name: New-AzConnectedNetworkInterfaceIPConfigurationObject
- model-name: NetworkFunctionUserConfiguration
cmdlet-name: New-AzConnectedNetworkFunctionUserConfigurationObject
- model-name: NetworkFunctionVendorConfiguration
cmdlet-name: New-AzConnectedNetworkFunctionVendorConfigurationObject
- model-name: NetworkFunctionRoleConfiguration
cmdlet-name: New-AzConnectedNetworkFunctionRoleConfigurationObject
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@

<#
.Synopsis
Create a in-memory object for AzureStackEdgeFormat
Create an in-memory object for AzureStackEdgeFormat.
.Description
Create a in-memory object for AzureStackEdgeFormat
Create an in-memory object for AzureStackEdgeFormat.

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.AzureStackEdgeFormat
Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.AzureStackEdgeFormat
.Link
https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkAzureStackEdgeObject
https://learn.microsoft.com/powershell/module/Az.ConnectedNetwork/new-azconnectednetworkazurestackedgeobject
#>
function New-AzConnectedNetworkAzureStackEdgeObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.AzureStackEdgeFormat')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ModelCmdletAttribute()]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.AzureStackEdgeFormat')]
[CmdletBinding(PositionalBinding=$false)]
Param(

Expand All @@ -36,10 +37,11 @@ function New-AzConnectedNetworkAzureStackEdgeObject {
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.AzureStackEdgeFormat]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.AzureStackEdgeFormat]::New()

$Object.AzureStackEdgeId = $AzureStackEdgeId
$Object.DeviceType = "AzureStackEdge"
if ($PSBoundParameters.ContainsKey('AzureStackEdgeId')) {
$Object.AzureStackEdgeId = $AzureStackEdgeId
}
return $Object
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@

<#
.Synopsis
Create a in-memory object for NetworkFunctionRoleConfiguration
Create an in-memory object for NetworkFunctionRoleConfiguration.
.Description
Create a in-memory object for NetworkFunctionRoleConfiguration
Create an in-memory object for NetworkFunctionRoleConfiguration.

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionRoleConfiguration
Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.NetworkFunctionRoleConfiguration
.Link
https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkFunctionRoleConfigurationObject
https://learn.microsoft.com/powershell/module/Az.ConnectedNetwork/new-azconnectednetworkfunctionroleconfigurationobject
#>
function New-AzConnectedNetworkFunctionRoleConfigurationObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionRoleConfiguration')]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ModelCmdletAttribute()]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.NetworkFunctionRoleConfiguration')]
[CmdletBinding(PositionalBinding=$false)]
Param(

Expand All @@ -49,21 +50,22 @@ function New-AzConnectedNetworkFunctionRoleConfigurationObject {
[string]
$ImageReferenceVersion,
[Parameter(HelpMessage="The network interface configurations.")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkInterface[]]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.INetworkInterface[]]
$NetworkInterface,
[Parameter(HelpMessage="The VHD name.")]
[string]
$OSDiskName,
[Parameter(HelpMessage="The OS type.")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.OperatingSystemTypes]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PSArgumentCompleterAttribute("Unknown", "Windows", "Linux")]
[string]
$OSDiskOstype,
[Parameter(HelpMessage="Specifies the size of os disk in gigabytes. This is the fully expanded disk size needed of the VHD image on the ASE. This disk size should be greater than the size of the VHD provided in vhdUri.")]
[int]
$OSDiskSizeGb,
[Parameter(HelpMessage="Specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in `".`" <br><br> **Disallowed values:** `"administrator`", `"admin`", `"user`", `"user1`", `"test`", `"user2`", `"test1`", `"user3`", `"admin1`", `"1`", `"123`", `"a`", `"actuser`", `"adm`", `"admin2`", `"aspnet`", `"backup`", `"console`", `"david`", `"guest`", `"john`", `"owner`", `"root`", `"server`", `"sql`", `"support`", `"support_388945a0`", `"sys`", `"test2`", `"test3`", `"user4`", `"user5`". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).")]
[Parameter(HelpMessage="Specifies the name of the administrator account. <br><br> **Windows-only restriction:** Cannot end in `".`" <br><br> **Disallowed values:** `"administrator`", `"admin`", `"user`", `"user1`", `"test`", `"user2`", `"test1`", `"user3`", `"admin1`", `"1`", `"123`", `"a`", `"actuser`", `"adm`", `"admin2`", `"aspnet`", `"backup`", `"console`", `"david`", `"guest`", `"john`", `"owner`", `"root`", `"server`", `"sql`", `"support`", `"support_388945a0`", `"sys`", `"test2`", `"test3`", `"user4`", `"user5`". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters <br><br><li> For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li> For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).")]
[string]
$OSProfileAdminUsername,
[Parameter(HelpMessage="Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. <br><br> **Note: Do not pass any secrets or passwords in customData property** <br><br> This property cannot be updated after the VM is created. <br><br> customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) <br><br> For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).")]
[Parameter(HelpMessage="Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. <br><br> **Note: Do not pass any secrets or passwords in customData property** <br><br> This property cannot be updated after the VM is created. <br><br> customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) <br><br> For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).")]
[string]
$OSProfileCustomData,
[Parameter(HelpMessage="Indicates if custom data is required to deploy this role.")]
Expand All @@ -73,13 +75,14 @@ function New-AzConnectedNetworkFunctionRoleConfigurationObject {
[string]
$RoleName,
[Parameter(HelpMessage="Role type.")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionRoleConfigurationType]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PSArgumentCompleterAttribute("Unknown", "VirtualMachine")]
[string]
$RoleType,
[Parameter(HelpMessage="The list of SSH public keys used to authenticate with linux based VMs.")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ISshPublicKey[]]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.ISshPublicKey[]]
$SshPublicKey,
[Parameter(HelpMessage="Specifies the parameters that are used to add a data disk to a virtual machine.")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDataDisk[]]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IDataDisk[]]
$StorageProfileDataDisk,
[Parameter(HelpMessage="The user parameters for customers. The format of user data parameters has to be matched with the provided user data template.")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IAny]
Expand All @@ -91,34 +94,77 @@ function New-AzConnectedNetworkFunctionRoleConfigurationObject {
[string]
$VhdUri,
[Parameter(HelpMessage="The size of the virtual machine.")]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VirtualMachineSizeTypes]
[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PSArgumentCompleterAttribute("Unknown", "Standard_D1_v2", "Standard_D2_v2", "Standard_D3_v2", "Standard_D4_v2", "Standard_D5_v2", "Standard_D11_v2", "Standard_D12_v2", "Standard_D13_v2", "Standard_DS1_v2", "Standard_DS2_v2", "Standard_DS3_v2", "Standard_DS4_v2", "Standard_DS5_v2", "Standard_DS11_v2", "Standard_DS12_v2", "Standard_DS13_v2", "Standard_F1", "Standard_F2", "Standard_F4", "Standard_F8", "Standard_F16", "Standard_F1s", "Standard_F2s", "Standard_F4s", "Standard_F8s", "Standard_F16s")]
[string]
$VirtualMachineSize
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionRoleConfiguration]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.NetworkFunctionRoleConfiguration]::New()

$Object.CustomProfileMetadataConfigurationPath = $CustomProfileMetadataConfigurationPath
$Object.ImageReferenceExactVersion = $ImageReferenceExactVersion
$Object.ImageReferenceOffer = $ImageReferenceOffer
$Object.ImageReferencePublisher = $ImageReferencePublisher
$Object.ImageReferenceSku = $ImageReferenceSku
$Object.ImageReferenceVersion = $ImageReferenceVersion
$Object.NetworkInterface = $NetworkInterface
$Object.OSDiskName = $OSDiskName
$Object.OSDiskOstype = $OSDiskOstype
$Object.OSDiskSizeGb = $OSDiskSizeGb
$Object.OSProfileAdminUsername = $OSProfileAdminUsername
$Object.OSProfileCustomData = $OSProfileCustomData
$Object.OSProfileCustomDataRequired = $OSProfileCustomDataRequired
$Object.RoleName = $RoleName
$Object.RoleType = $RoleType
$Object.SshPublicKey = $SshPublicKey
$Object.StorageProfileDataDisk = $StorageProfileDataDisk
$Object.UserDataParameter = $UserDataParameter
$Object.UserDataTemplate = $UserDataTemplate
$Object.VhdUri = $VhdUri
$Object.VirtualMachineSize = $VirtualMachineSize
if ($PSBoundParameters.ContainsKey('CustomProfileMetadataConfigurationPath')) {
$Object.CustomProfileMetadataConfigurationPath = $CustomProfileMetadataConfigurationPath
}
if ($PSBoundParameters.ContainsKey('ImageReferenceExactVersion')) {
$Object.ImageReferenceExactVersion = $ImageReferenceExactVersion
}
if ($PSBoundParameters.ContainsKey('ImageReferenceOffer')) {
$Object.ImageReferenceOffer = $ImageReferenceOffer
}
if ($PSBoundParameters.ContainsKey('ImageReferencePublisher')) {
$Object.ImageReferencePublisher = $ImageReferencePublisher
}
if ($PSBoundParameters.ContainsKey('ImageReferenceSku')) {
$Object.ImageReferenceSku = $ImageReferenceSku
}
if ($PSBoundParameters.ContainsKey('ImageReferenceVersion')) {
$Object.ImageReferenceVersion = $ImageReferenceVersion
}
if ($PSBoundParameters.ContainsKey('NetworkInterface')) {
$Object.NetworkInterface = $NetworkInterface
}
if ($PSBoundParameters.ContainsKey('OSDiskName')) {
$Object.OSDiskName = $OSDiskName
}
if ($PSBoundParameters.ContainsKey('OSDiskOstype')) {
$Object.OSDiskOstype = $OSDiskOstype
}
if ($PSBoundParameters.ContainsKey('OSDiskSizeGb')) {
$Object.OSDiskSizeGb = $OSDiskSizeGb
}
if ($PSBoundParameters.ContainsKey('OSProfileAdminUsername')) {
$Object.OSProfileAdminUsername = $OSProfileAdminUsername
}
if ($PSBoundParameters.ContainsKey('OSProfileCustomData')) {
$Object.OSProfileCustomData = $OSProfileCustomData
}
if ($PSBoundParameters.ContainsKey('OSProfileCustomDataRequired')) {
$Object.OSProfileCustomDataRequired = $OSProfileCustomDataRequired
}
if ($PSBoundParameters.ContainsKey('RoleName')) {
$Object.RoleName = $RoleName
}
if ($PSBoundParameters.ContainsKey('RoleType')) {
$Object.RoleType = $RoleType
}
if ($PSBoundParameters.ContainsKey('SshPublicKey')) {
$Object.SshPublicKey = $SshPublicKey
}
if ($PSBoundParameters.ContainsKey('StorageProfileDataDisk')) {
$Object.StorageProfileDataDisk = $StorageProfileDataDisk
}
if ($PSBoundParameters.ContainsKey('UserDataParameter')) {
$Object.UserDataParameter = $UserDataParameter
}
if ($PSBoundParameters.ContainsKey('UserDataTemplate')) {
$Object.UserDataTemplate = $UserDataTemplate
}
if ($PSBoundParameters.ContainsKey('VhdUri')) {
$Object.VhdUri = $VhdUri
}
if ($PSBoundParameters.ContainsKey('VirtualMachineSize')) {
$Object.VirtualMachineSize = $VirtualMachineSize
}
return $Object
}
}
Expand Down
Loading