Skip to content
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

Generated container-group-profile commands and added container group properties for reuse scenario #26604

Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
fd752c2
Generated container-group-profile commands and added container group …
drishtipeshwani09 Oct 31, 2024
c2bc5cc
fix container instance
kaushik-ms Nov 5, 2024
fff4948
revert test change
kaushik-ms Nov 5, 2024
63b8434
try
kaushik-ms Nov 5, 2024
72e6d4c
fixes
kaushik-ms Nov 5, 2024
51982b6
test change
kaushik-ms Nov 5, 2024
87697cb
fine
kaushik-ms Nov 5, 2024
864ef3e
new object
kaushik-ms Nov 5, 2024
d9ba657
test fixes
kaushik-ms Nov 5, 2024
20bfa77
final
kaushik-ms Nov 5, 2024
599a42b
fix
kaushik-ms Nov 6, 2024
c90f77a
changes
kaushik-ms Nov 6, 2024
69f3ccd
fix
kaushik-ms Nov 6, 2024
0d7946d
Updated examples for container group profiles
drishtipeshwani09 Nov 6, 2024
42efc62
Reverted AssemblyInfo.cs
drishtipeshwani09 Nov 6, 2024
228610f
Modified the docs
drishtipeshwani09 Nov 6, 2024
0c83e5d
Modified the get cg profile doc
drishtipeshwani09 Nov 6, 2024
6abdbc4
changes
kaushik-ms Nov 6, 2024
7e9c915
Merge branch 'feature_containerinstance/new_cmdlets_20240501preview_2…
kaushik-ms Nov 6, 2024
c9e9c6f
example change
kaushik-ms Nov 6, 2024
9f51f7b
readme change
kaushik-ms Nov 6, 2024
4c79d24
Revert changes for no default object
drishtipeshwani09 Nov 6, 2024
871458e
Revert "example change"
drishtipeshwani09 Nov 6, 2024
ba51eec
Modified the parameters for default container object
drishtipeshwani09 Nov 6, 2024
eeeed49
Converting requestcpu and requestmemory as double
drishtipeshwani09 Nov 6, 2024
7c7691e
Enforcing non-nullable values for request cpu and memory
drishtipeshwani09 Nov 6, 2024
11da32c
Supressing the breaking change mentioned in the pipeline as double ->…
drishtipeshwani09 Nov 6, 2024
d8b3ca2
Reverted the changes for container instance object
drishtipeshwani09 Nov 6, 2024
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
2 changes: 2 additions & 0 deletions src/ContainerInstance/ContainerInstance.Autorest/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ tools
custom/*.psm1
custom/autogen-model-cmdlets
test/*-TestResults.xml
license.txt
/*.ps1
/*.psd1
/*.ps1xml
/*.psm1
/*.snk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.ContainerInstance.private.dll'
FormatsToProcess = './Az.ContainerInstance.format.ps1xml'
FunctionsToExport = 'Add-AzContainerInstanceOutput', 'Get-AzContainerGroup', 'Get-AzContainerInstanceCachedImage', 'Get-AzContainerInstanceCapability', 'Get-AzContainerInstanceContainerGroupOutboundNetworkDependencyEndpoint', 'Get-AzContainerInstanceLog', 'Get-AzContainerInstanceUsage', 'Invoke-AzContainerInstanceCommand', 'New-AzContainerGroup', 'New-AzContainerGroupImageRegistryCredentialObject', 'New-AzContainerGroupPortObject', 'New-AzContainerGroupVolumeObject', 'New-AzContainerInstanceEnvironmentVariableObject', 'New-AzContainerInstanceHttpHeaderObject', 'New-AzContainerInstanceInitDefinitionObject', 'New-AzContainerInstanceObject', 'New-AzContainerInstancePortObject', 'New-AzContainerInstanceVolumeMountObject', 'Remove-AzContainerGroup', 'Remove-AzContainerInstanceSubnetServiceAssociationLink', 'Restart-AzContainerGroup', 'Start-AzContainerGroup', 'Stop-AzContainerGroup', 'Update-AzContainerGroup', '*'
FunctionsToExport = 'Add-AzContainerInstanceOutput', 'Get-AzContainerGroup', 'Get-AzContainerInstanceCachedImage', 'Get-AzContainerInstanceCapability', 'Get-AzContainerInstanceContainerGroupOutboundNetworkDependencyEndpoint', 'Get-AzContainerInstanceContainerGroupProfile', 'Get-AzContainerInstanceContainerGroupProfileRevision', 'Get-AzContainerInstanceLog', 'Get-AzContainerInstanceUsage', 'Invoke-AzContainerInstanceCommand', 'New-AzContainerGroup', 'New-AzContainerGroupImageRegistryCredentialObject', 'New-AzContainerGroupPortObject', 'New-AzContainerGroupVolumeObject', 'New-AzContainerInstanceContainerGroupProfile', 'New-AzContainerInstanceEnvironmentVariableObject', 'New-AzContainerInstanceHttpHeaderObject', 'New-AzContainerInstanceInitDefinitionObject', 'New-AzContainerInstanceObject', 'New-AzContainerInstancePortObject', 'New-AzContainerInstanceVolumeMountObject', 'Remove-AzContainerGroup', 'Remove-AzContainerInstanceContainerGroupProfile', 'Remove-AzContainerInstanceSubnetServiceAssociationLink', 'Restart-AzContainerGroup', 'Start-AzContainerGroup', 'Stop-AzContainerGroup', 'Update-AzContainerGroup', 'Update-AzContainerInstanceContainerGroupProfile', '*'
AliasesToExport = 'Get-AzContainerGroupOutboundNetworkDependencyEndpoint', '*'
PrivateData = @{
PSData = @{
Expand Down
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
// https://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("0.1.0.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.0.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
14 changes: 2 additions & 12 deletions src/ContainerInstance/ContainerInstance.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
This directory contains the PowerShell module for the ContainerInstance service.

---
## Status
[![Az.ContainerInstance](https://img.shields.io/powershellgallery/v/Az.ContainerInstance.svg?style=flat-square&label=Az.ContainerInstance "Az.ContainerInstance")](https://www.powershellgallery.com/packages/Az.ContainerInstance/)

## Info
- Modifiable: yes
- Generated: all
Expand All @@ -30,13 +27,13 @@ For information on how to develop for `Az.ContainerInstance`, see [how-to.md](ho
> see https://aka.ms/autorest

``` yaml
commit: 81562c6c057a510ddde50ff40720d254bd5f6dbf
commit: 400510ae981419169f35012c3a217b268e779b2b
require:
# readme.azure.noprofile.md is the common configuration file
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
# You need to specify your swagger files here.
- $(repo)/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/containerInstance.json
- $(repo)/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2024-05-01-preview/containerInstance.json
# If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally
# - (this-folder)/relative-path-to-your-swagger

Expand Down Expand Up @@ -98,13 +95,6 @@ directive:
parameter-name: ImageRegistryCredentials
set:
parameter-name: ImageRegistryCredential
# Sets OSType equal Linux by default
- where:
parameter-name: OSType
set:
default:
description: Sets OSType equal Linux by default.
script: '"Linux"'
# 1. Set IPAddressPort equals $Container.Port
# 2. Set Location mandatory
- where:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"resourceType": "containerGroupProfiles/revisions",
"apiVersion": "2024-05-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance"
},
"commands": [
{
"name": "Get-AzContainerInstanceContainerGroupProfile",
"description": "Gets the properties of the specified container group profile in the specified subscription and resource group.\nThe operation returns the properties of container group profile including containers, image registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}/revisions/{revisionNumber}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance/get-azcontainerinstancecontainergroupprofile"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"-RevisionNumber <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "Gets the properties of the specified revision of the container group profile in the given subscription and resource group. The operation returns the properties of container group profile including containers, image registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc.",
"parameters": [
{
"name": "-Name",
"value": "[Path.containerGroupProfileName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-RevisionNumber",
"value": "[Path.revisionNumber]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"resourceType": "containerGroupProfiles",
"apiVersion": "2024-05-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance"
},
"commands": [
{
"name": "Get-AzContainerInstanceContainerGroupProfile",
"description": "Gets the properties of the specified container group profile in the specified subscription and resource group.\nThe operation returns the properties of container group profile including containers, image registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance/get-azcontainerinstancecontainergroupprofile"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "Gets the properties of the specified container group profile in the specified subscription and resource group. The operation returns the properties of container group profile including containers, image registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc.",
"parameters": [
{
"name": "-Name",
"value": "[Path.containerGroupProfileName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzContainerInstanceContainerGroupProfile",
"description": "Delete the specified container group profile in the specified subscription and resource group.\nThe operation does not delete other resources provided by the user, such as volumes.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance/remove-azcontainerinstancecontainergroupprofile"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Delete the specified container group profile in the specified subscription and resource group. The operation does not delete other resources provided by the user, such as volumes.",
"parameters": [
{
"name": "-Name",
"value": "[Path.containerGroupProfileName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "containerGroups/containers",
"apiVersion": "2022-10-01-preview",
"apiVersion": "2024-05-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "containerGroups",
"apiVersion": "2022-10-01-preview",
"apiVersion": "2024-05-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "virtualNetworks/subnets",
"apiVersion": "2022-10-01-preview",
"apiVersion": "2024-05-01-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance"
},
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.Api20221001Preview.IContainerExecResponse"
/// <param name="response">the body result as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Models.Api20240501Preview.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.Api20221001Preview.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.Api20240501Preview.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