Skip to content

Commit d38ddec

Browse files
azure-pipelines[bot]azure-powershell-botvidai-msft
authored
Migrate ContainerInstance from generation to main (#26614)
* Move ContainerInstance to main * Add change log and suppress breaking change * Update Add-AzContainerInstanceOutput.Recording.json --------- Co-authored-by: azure-powershell-bot <[email protected]> Co-authored-by: Vincent Dai <[email protected]>
1 parent 89b2be9 commit d38ddec

File tree

532 files changed

+34615
-6229
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

532 files changed

+34615
-6229
lines changed

src/ContainerInstance/ContainerInstance.Autorest/Az.ContainerInstance.format.ps1xml

Lines changed: 546 additions & 114 deletions
Large diffs are not rendered by default.

src/ContainerInstance/ContainerInstance.Autorest/Az.ContainerInstance.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.ContainerInstance.private.dll'
1313
FormatsToProcess = './Az.ContainerInstance.format.ps1xml'
14-
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', '*'
14+
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-AzContainerInstanceNoDefaultObject', 'New-AzContainerInstanceObject', 'New-AzContainerInstancePortObject', 'New-AzContainerInstanceVolumeMountObject', 'Remove-AzContainerGroup', 'Remove-AzContainerInstanceContainerGroupProfile', 'Remove-AzContainerInstanceSubnetServiceAssociationLink', 'Restart-AzContainerGroup', 'Start-AzContainerGroup', 'Stop-AzContainerGroup', 'Update-AzContainerGroup', 'Update-AzContainerInstanceContainerGroupProfile', '*'
1515
AliasesToExport = 'Get-AzContainerGroupOutboundNetworkDependencyEndpoint', '*'
1616
PrivateData = @{
1717
PSData = @{

src/ContainerInstance/ContainerInstance.Autorest/README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ For information on how to develop for `Az.ContainerInstance`, see [how-to.md](ho
2727
> see https://aka.ms/autorest
2828
2929
``` yaml
30-
commit: 81562c6c057a510ddde50ff40720d254bd5f6dbf
30+
commit: 400510ae981419169f35012c3a217b268e779b2b
3131
require:
3232
# readme.azure.noprofile.md is the common configuration file
3333
- $(this-folder)/../../readme.azure.noprofile.md
3434
input-file:
3535
# You need to specify your swagger files here.
36-
- $(repo)/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2022-10-01-preview/containerInstance.json
36+
- $(repo)/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/preview/2024-05-01-preview/containerInstance.json
3737
# If the swagger has not been put in the repo, you may uncomment the following line and refer to it locally
3838
# - (this-folder)/relative-path-to-your-swagger
3939

@@ -95,13 +95,6 @@ directive:
9595
parameter-name: ImageRegistryCredentials
9696
set:
9797
parameter-name: ImageRegistryCredential
98-
# Sets OSType equal Linux by default
99-
- where:
100-
parameter-name: OSType
101-
set:
102-
default:
103-
description: Sets OSType equal Linux by default.
104-
script: '"Linux"'
10598
# 1. Set IPAddressPort equals $Container.Port
10699
# 2. Set Location mandatory
107100
- where:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"resourceType": "containerGroupProfiles/revisions",
3+
"apiVersion": "2024-05-01-preview",
4+
"learnMore": {
5+
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance"
6+
},
7+
"commands": [
8+
{
9+
"name": "Get-AzContainerInstanceContainerGroupProfile",
10+
"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.",
11+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}/revisions/{revisionNumber}",
12+
"help": {
13+
"learnMore": {
14+
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance/get-azcontainerinstancecontainergroupprofile"
15+
},
16+
"parameterSets": [
17+
{
18+
"parameters": [
19+
"-Name <String>",
20+
"-ResourceGroupName <String>",
21+
"-RevisionNumber <String>",
22+
"[-SubscriptionId <String[]>]"
23+
]
24+
}
25+
]
26+
},
27+
"examples": [
28+
{
29+
"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.",
30+
"parameters": [
31+
{
32+
"name": "-Name",
33+
"value": "[Path.containerGroupProfileName]"
34+
},
35+
{
36+
"name": "-ResourceGroupName",
37+
"value": "[Path.resourceGroupName]"
38+
},
39+
{
40+
"name": "-RevisionNumber",
41+
"value": "[Path.revisionNumber]"
42+
},
43+
{
44+
"name": "-SubscriptionId",
45+
"value": "[Path.subscriptionId]"
46+
}
47+
]
48+
}
49+
]
50+
}
51+
]
52+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"resourceType": "containerGroupProfiles",
3+
"apiVersion": "2024-05-01-preview",
4+
"learnMore": {
5+
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance"
6+
},
7+
"commands": [
8+
{
9+
"name": "Get-AzContainerInstanceContainerGroupProfile",
10+
"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.",
11+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}",
12+
"help": {
13+
"learnMore": {
14+
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance/get-azcontainerinstancecontainergroupprofile"
15+
},
16+
"parameterSets": [
17+
{
18+
"parameters": [
19+
"-Name <String>",
20+
"-ResourceGroupName <String>",
21+
"[-SubscriptionId <String[]>]"
22+
]
23+
}
24+
]
25+
},
26+
"examples": [
27+
{
28+
"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.",
29+
"parameters": [
30+
{
31+
"name": "-Name",
32+
"value": "[Path.containerGroupProfileName]"
33+
},
34+
{
35+
"name": "-ResourceGroupName",
36+
"value": "[Path.resourceGroupName]"
37+
},
38+
{
39+
"name": "-SubscriptionId",
40+
"value": "[Path.subscriptionId]"
41+
}
42+
]
43+
}
44+
]
45+
},
46+
{
47+
"name": "Remove-AzContainerInstanceContainerGroupProfile",
48+
"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.",
49+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroupProfiles/{containerGroupProfileName}",
50+
"help": {
51+
"learnMore": {
52+
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance/remove-azcontainerinstancecontainergroupprofile"
53+
},
54+
"parameterSets": [
55+
{
56+
"parameters": [
57+
"-Name <String>",
58+
"-ResourceGroupName <String>",
59+
"[-SubscriptionId <String>]"
60+
]
61+
}
62+
]
63+
},
64+
"examples": [
65+
{
66+
"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.",
67+
"parameters": [
68+
{
69+
"name": "-Name",
70+
"value": "[Path.containerGroupProfileName]"
71+
},
72+
{
73+
"name": "-ResourceGroupName",
74+
"value": "[Path.resourceGroupName]"
75+
},
76+
{
77+
"name": "-SubscriptionId",
78+
"value": "[Path.subscriptionId]"
79+
}
80+
]
81+
}
82+
]
83+
}
84+
]
85+
}

src/ContainerInstance/ContainerInstance.Autorest/UX/Microsoft.ContainerInstance/containerGroups-containers.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "containerGroups/containers",
3-
"apiVersion": "2022-10-01-preview",
3+
"apiVersion": "2024-05-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance"
66
},

src/ContainerInstance/ContainerInstance.Autorest/UX/Microsoft.ContainerInstance/containerGroups.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "containerGroups",
3-
"apiVersion": "2022-10-01-preview",
3+
"apiVersion": "2024-05-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance"
66
},

src/ContainerInstance/ContainerInstance.Autorest/UX/Microsoft.Network/virtualNetworks-subnets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "virtualNetworks/subnets",
3-
"apiVersion": "2022-10-01-preview",
3+
"apiVersion": "2024-05-01-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.containerinstance"
66
},

src/ContainerInstance/ContainerInstance.Autorest/build-module.ps1

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
1313
# is regenerated.
1414
# ----------------------------------------------------------------------------------
15-
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
15+
param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [Switch]$DisableAfterBuildTasks)
1616
$ErrorActionPreference = 'Stop'
1717

1818
if($PSEdition -ne 'Core') {
@@ -67,6 +67,8 @@ if(-not $Isolated -and -not $Debugger) {
6767
$binFolder = Join-Path $PSScriptRoot 'bin'
6868
$objFolder = Join-Path $PSScriptRoot 'obj'
6969

70+
$isAzure = [System.Convert]::ToBoolean('true')
71+
7072
if(-not $Debugger) {
7173
Write-Host -ForegroundColor Green 'Cleaning build folders...'
7274
$null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder
@@ -143,7 +145,7 @@ if($NoDocs) {
143145
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
144146
}
145147
$null = New-Item -ItemType Directory -Force -Path $docsFolder
146-
$addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
148+
$addComplexInterfaceInfo = !$isAzure
147149
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
148150
}
149151

@@ -169,4 +171,13 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
169171
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
170172
}
171173

172-
Write-Host -ForegroundColor Green '-------------Done-------------'
174+
if (-not $DisableAfterBuildTasks){
175+
$afterBuildTasksPath = Join-Path $PSScriptRoot ''
176+
$afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable
177+
if(Test-Path -Path $afterBuildTasksPath -PathType leaf){
178+
Write-Host -ForegroundColor Green 'Running after build tasks...'
179+
. $afterBuildTasksPath @afterBuildTasksArgs
180+
}
181+
}
182+
183+
Write-Host -ForegroundColor Green '-------------Done-------------'

src/ContainerInstance/ContainerInstance.Autorest/custom/InvokeAzContainerInstanceCommand_ExecuteExpanded.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ public partial class InvokeAzContainerInstanceCommand_ExecuteExpanded : global::
2828
/// on that response. Implement this method in a partial class to enable this behavior
2929
/// </summary>
3030
/// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
31-
/// <param name="response">the body result as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Models.Api20221001Preview.IContainerExecResponse"
31+
/// <param name="response">the body result as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ContainerInstance.Models.Api20240501Preview.IContainerExecResponse"
3232
/// /> from the remote call</param>
3333
/// <param name="returnNow">/// Determines if the rest of the onOk method should be processed, or if the method should return
3434
/// immediately (set to true to skip further processing )</param>
35-
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)
35+
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)
3636
{
3737
var containerExecResponse = response.ConfigureAwait(false).GetAwaiter().GetResult();
3838
socket = new System.Net.WebSockets.ClientWebSocket();

0 commit comments

Comments
 (0)