Skip to content

[Az.ContainerInstance] Update generation tool version: autorest.powershell v3->v4 #28376

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 - ContainerInstance")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("4.1.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("4.1.1")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]

41 changes: 27 additions & 14 deletions src/ContainerInstance/ContainerInstance.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,16 @@ module-version: 1.0.3
# Normally, title is the service name
title: ContainerInstance
subject-prefix: $(service-name)
identity-correction-for-post: true
nested-object-to-string: true
resourcegroup-append: true

# If there are post APIs for some kinds of actions in the RP, you may need to
# uncomment following line to support viaIdentity for these post APIs
# identity-correctiEXon-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:
# Following is two common directive which are normally required in all the RPs
# 1. Remove the unexpanded parameter set
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
- where:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^Execute$|^ExecuteViaIdentity$|^ExecuteViaIdentityExpanded$|^AttachViaIdentity$
variant: ^(Create|Update|Execute)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$|^ExecuteViaIdentityExpanded$|^AttachViaIdentity$
remove: true
# Remove the set-* cmdlet
- where:
Expand Down Expand Up @@ -153,8 +145,6 @@ directive:
"type": "object",
"additionalProperties": true
}
# - model-cmdlet:
# - Volume # Hide to customize AzureFileStorageAccountKey from string to securestring

# Fix Typo: Parameters starting with PreviouState will be corrected as PreviousState.
- where:
Expand All @@ -168,4 +158,27 @@ directive:
property-name: ^PreviouState
set:
property-name: PreviousState

# Hide to customize AzureFileStorageAccountKey from string to securestring
- model-cmdlet:
# - model-name: ImageRegistryCredential
# cmdlet-name: New-AzContainerGroupImageRegistryCredentialObject
- model-name: Port
cmdlet-name: New-AzContainerGroupPortObject
# - model-name: Volume
# cmdlet-name: New-AzContainerGroupVolumeObject
# - model-name: EnvironmentVariable
# cmdlet-name: New-AzContainerInstanceEnvironmentVariableObject
- model-name: HttpHeader
cmdlet-name: New-AzContainerInstanceHttpHeaderObject
- model-name: InitContainerDefinition
cmdlet-name: New-AzContainerInstanceInitDefinitionObject
- model-name: Container
cmdlet-name: New-AzContainerInstanceNoDefaultObject
- model-name: Container
cmdlet-name: New-AzContainerInstanceObject
- model-name: ContainerPort
cmdlet-name: New-AzContainerInstancePortObject
- model-name: VolumeMount
cmdlet-name: New-AzContainerInstanceVolumeMountObject
```
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
},
{
"name": "Restart-AzContainerGroup",
"description": "Restarts all containers in a container group in place.\nIf container image has updates, new image will be downloaded.",
"description": "Restarts all containers in a container group in place.\nIf container image has restart new image will be downloaded.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/restart",
"help": {
"learnMore": {
Expand All @@ -139,7 +139,7 @@
},
"examples": [
{
"description": "Restarts all containers in a container group in place. If container image has updates, new image will be downloaded.",
"description": "Restarts all containers in a container group in place. If container image has restart new image will be downloaded.",
"parameters": [
{
"name": "-Name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@ function Invoke-AzContainerInstanceCommand {
[Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Category('Path')]
[System.String]
# The name of the resource group.
# The name is case insensitive.
${ResourceGroupName},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
# Subscription credentials which uniquely identify Microsoft Azure subscription.
# The subscription ID forms part of the URI for every service call.
# The ID of the target subscription.
# The value must be an UUID.
${SubscriptionId},

[Parameter(Mandatory)]
Expand Down Expand Up @@ -83,42 +84,43 @@ function Invoke-AzContainerInstanceCommand {
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Category('Azure')]
[System.Management.Automation.PSObject]
# 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.
${DefaultProfile},

[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
# Wait for .NET debugger to attach
${Break},

[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Category('Runtime')]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Runtime.SendAsyncStep[]]
# SendAsync Pipeline Steps to be appended to the front of the pipeline
${HttpPipelineAppend},

[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Category('Runtime')]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Runtime.SendAsyncStep[]]
# SendAsync Pipeline Steps to be prepended to the front of the pipeline
${HttpPipelinePrepend},

[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Category('Runtime')]
[System.Uri]
# The URI for the proxy server to use
${Proxy},

[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Category('Runtime')]
[System.Management.Automation.PSCredential]
# Credentials for a proxy server to use for the remote call
${ProxyCredential},

[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public partial class InvokeAzContainerInstanceCommand_ExecuteExpanded : global::
/// on that response. Implement this method in a partial class to enable this behavior
/// </summary>
/// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
/// <param name="response">the body result as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Models.Api20240501Preview.IContainerExecResponse"
/// <param name="response">the body result as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Models.IContainerExecResponse"
/// /> from the remote call</param>
/// <param name="returnNow">/// Determines if the rest of the onOk method should be processed, or if the method should return
/// immediately (set to true to skip further processing )</param>
partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Models.Api20240501Preview.IContainerExecResponse> response, ref global::System.Threading.Tasks.Task<bool> returnNow)
partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Models.IContainerExecResponse> response, ref global::System.Threading.Tasks.Task<bool> returnNow)
{
var containerExecResponse = response.ConfigureAwait(false).GetAwaiter().GetResult();
socket = new System.Net.WebSockets.ClientWebSocket();
Expand Down
Loading
Loading