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
26 changes: 26 additions & 0 deletions src/CloudService/CloudService.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 - CloudService")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.1.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.1.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
50 changes: 31 additions & 19 deletions src/CloudService/CloudService.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ input-file:
title: CloudService
module-version: 0.1.0

identity-correction-for-post: 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:
subject: ^CloudServiceOperatingSystemOSFamily$
Expand All @@ -71,8 +65,20 @@ directive:
set:
subject: CloudServiceOSVersion
- where:
variant: ^Restart$|^RestartViaIdentity$|^Reimage$|^ReimageViaIdentity$|^Rebuild$|^RebuildViaIdentity$
subject: ^CloudService$|^RebuildCloudService$
variant: ^Rebuild$|^RebuildViaIdentity$|^RebuildViaJsonFilePathViaJsonFilePath$|^RebuildViaJsonStringViaJsonString$
subject: RebuildCloudService
remove: true
- where:
subject: ^RebuildCloudService$
set:
subject: Rebuild
- where:
variant: ^Restart$|^RestartViaIdentity$|^Reimage$|^ReimageViaIdentity$
subject: ^CloudService$
remove: true
- where:
variant: ^RebuildViaIdentityRoleInstance$
subject: ^RebuildCloudServiceRoleInstance$
remove: true

- where:
Expand All @@ -88,27 +94,22 @@ directive:
subject: CloudServiceRoleInstanceReimage
verb: Invoke

- where:
subject: ^RebuildCloudService$
variant: ^RebuildExpanded$|^RebuildViaIdentityExpanded$
set:
subject: Rebuild
- where:
subject: ^RebuildCloudServiceRoleInstance$
variant: ^Rebuild$|^RebuildViaIdentity$
set:
subject: RoleInstanceRebuild

- where:
subject: ^CloudServiceUpdateDomain$
verb: Get
subject: ^CloudServicesUpdateDomain$
verb: Get|Update
remove: true
- where:
subject: ^WalkCloudServiceUpdateDomain$
variant: ^Walk$
subject: ^WalkCloudServicesUpdateDomain$
variant: ^Walk$|^WalkViaIdentity$|^WalkViaIdentityCloudService$|^WalkViaIdentityCloudServiceExpanded$|^WalkViaIdentityExpanded$|^WalkViaJsonFilePathViaJsonFilePath$|^WalkViaJsonStringViaJsonString$
remove: true
- where:
subject: ^WalkCloudServiceUpdateDomain$
subject: ^WalkCloudServicesUpdateDomain$
set:
subject: UpdateDomain
verb: Set
Expand All @@ -119,7 +120,7 @@ directive:
remove: true
- where:
subject: ^CloudServiceRoleInstance$
verb: Remove
verb: Remove|Update
remove: true
- where:
variant: ^Delete$|^DeleteViaIdentity$
Expand Down Expand Up @@ -320,4 +321,15 @@ directive:
transform: >-
return "string"

- model-cmdlet:
- model-name: Extension
cmdlet-name: New-AzCloudServiceExtensionObject
- model-name: LoadBalancerConfiguration
cmdlet-name: New-AzCloudServiceLoadBalancerConfigurationObject
# - model-name: LoadBalancerFrontendIPConfiguration
# cmdlet-name: New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject
- model-name: CloudServiceRoleProfileProperties
cmdlet-name: New-AzCloudServiceRoleProfilePropertiesObject
# - model-name: CloudServiceVaultSecretGroup
# cmdlet-name: New-AzCloudServiceVaultSecretGroupObject
```
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Create a CloudService Resource
#>

function New-AzCloudService {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService')]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudService')]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='quickCreateParameterSetWithoutStorage', Mandatory)]
Expand Down Expand Up @@ -86,7 +86,7 @@ function New-AzCloudService {
[Parameter(ParameterSetName='quickCreateParameterSetWithoutStorage', HelpMessage="Describes a cloud service extension profile.")]
[Parameter(ParameterSetName='quickCreateParameterSetWithStorage', HelpMessage="Describes a cloud service extension profile.")]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudServiceExtensionProfile]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceExtensionProfile]
# Describes a cloud service extension profile.
# To construct, see NOTES section for EXTENSIONPROFILE properties and create a hash table.
${ExtensionProfile},
Expand All @@ -104,16 +104,16 @@ function New-AzCloudService {
[Parameter(ParameterSetName='quickCreateParameterSetWithoutStorage')]
[Parameter(ParameterSetName='quickCreateParameterSetWithStorage')]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudServiceTags]))]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},

[Parameter(ParameterSetName='quickCreateParameterSetWithoutStorage', HelpMessage="Update mode for the cloud service.")]
[Parameter(ParameterSetName='quickCreateParameterSetWithStorage', HelpMessage="Update mode for the cloud service.")]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.CloudService.Support.CloudServiceUpgradeMode])]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.PSArgumentCompleterAttribute("Auto", "Manual", "Simultaneous")]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Support.CloudServiceUpgradeMode]
[System.String]
# Update mode for the cloud service.
# Role instances are allocated to update domains when the service is deployed.
# Updates can be initiated manually in each update domain or initiated automatically in all update domains.Possible Values are <br /><br />**Auto**<br /><br />**Manual** <br /><br />**Simultaneous**<br /><br />If not specified, the default value is Auto.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Create a in-memory object for Diagnostics Extension
#>

function New-AzCloudServiceDiagnosticsExtension {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.Extension')]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Extension')]
param(
[Parameter(HelpMessage="Name of Diagnostics Extension.", Mandatory)]
[string] $Name,
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,55 +1,63 @@

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the \"License\");
# 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,
# 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.
# ----------------------------------------------------------------------------------

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

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.LoadBalancerFrontendIPConfiguration
.Link
https://learn.microsoft.com/powershell/module/Az.CloudService/new-azcloudserviceloadbalancerfrontendipconfigurationobject
#>
function New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.LoadBalancerFrontendIPConfiguration')]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.ModelCmdletAttribute()]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.LoadBalancerFrontendIPConfiguration')]
[CmdletBinding(PositionalBinding=$false)]
Param(

[Parameter(HelpMessage="Name of FrontendIpConfiguration.")]
[Parameter(Mandatory, HelpMessage="The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource.")]
[string]
$Name,
[Parameter(ParameterSetName="DefaultParameterSet", HelpMessage="Resource Id.")]
[string]
$PublicIPAddressId,
[Parameter(ParameterSetName="PrivateIP", HelpMessage="Private IP Address")]
[Parameter(ParameterSetName="PrivateIP", HelpMessage="The virtual network private IP address of the IP configuration.")]
[string]
$PrivateIPAddress,
[Parameter(ParameterSetName="PrivateIP", HelpMessage="Subnet ID")]
[Parameter(ParameterSetName="PrivateIP", HelpMessage="Resource Id.")]
[string]
$SubnetId
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.LoadBalancerFrontendIPConfiguration]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.LoadBalancerFrontendIPConfiguration]::New()

$Object.Name = $Name
if ($PSBoundParameters.ContainsKey("PublicIPAddressId")) {
if ($PSBoundParameters.ContainsKey('Name')) {
$Object.Name = $Name
}
if ($PSBoundParameters.ContainsKey('PublicIPAddressId')) {
$Object.PublicIPAddressId = $PublicIPAddressId
}
if ($PSBoundParameters.ContainsKey("PrivateIPAddress")) {
$Object.privateIPAddress = $PrivateIPAddress
if ($PSBoundParameters.ContainsKey('PrivateIPAddress')) {
$Object.PrivateIPAddress = $PrivateIPAddress
$Object.SubnetId = $SubnetId
}

return $Object
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Create a in-memory object for Remote Desktop Extension
#>

function New-AzCloudServiceRemoteDesktopExtensionObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.Extension')]
[Microsoft.Azure.PowerShell.Cmdlets.CloudService.ModelCmdletAttribute()]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Extension')]
param(
[Parameter(HelpMessage="Name of Remote Desktop Extension.", Mandatory)]
[string] $Name,
Expand Down
Loading