Skip to content

Commit b8812de

Browse files
Migrate ConnectedMachine from generation to main (#25013)
* Move ConnectedMachine to main * add ChangeLog and suppress Signature Issues --------- Co-authored-by: YanaXu <[email protected]>
1 parent 34c4a48 commit b8812de

File tree

333 files changed

+39464
-11766
lines changed

Some content is hidden

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

333 files changed

+39464
-11766
lines changed

src/ConnectedMachine/ConnectedMachine.Autorest/Az.ConnectedMachine.format.ps1xml

Lines changed: 442 additions & 0 deletions
Large diffs are not rendered by default.

src/ConnectedMachine/ConnectedMachine.Autorest/Az.ConnectedMachine.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.ConnectedMachine.private.dll'
1313
FormatsToProcess = './Az.ConnectedMachine.format.ps1xml'
14-
FunctionsToExport = 'Connect-AzConnectedMachine', 'Get-AzConnectedExtensionMetadata', 'Get-AzConnectedMachine', 'Get-AzConnectedMachineExtension', 'Get-AzConnectedMachineRunCommand', 'Get-AzConnectedPrivateLinkScope', 'Install-AzConnectedMachinePatch', 'Invoke-AzConnectedAssessMachinePatch', 'New-AzConnectedMachineExtension', 'New-AzConnectedMachineRunCommand', 'New-AzConnectedPrivateLinkScope', 'Remove-AzConnectedMachine', 'Remove-AzConnectedMachineExtension', 'Remove-AzConnectedMachineRunCommand', 'Remove-AzConnectedPrivateLinkScope', 'Set-AzConnectedMachineExtension', 'Set-AzConnectedPrivateLinkScope', 'Update-AzConnectedExtension', 'Update-AzConnectedMachine', 'Update-AzConnectedMachineExtension', 'Update-AzConnectedMachineRunCommand', 'Update-AzConnectedPrivateLinkScopeTag'
14+
FunctionsToExport = 'Connect-AzConnectedMachine', 'Get-AzConnectedExtensionMetadata', 'Get-AzConnectedLicense', 'Get-AzConnectedMachine', 'Get-AzConnectedMachineExtension', 'Get-AzConnectedMachineRunCommand', 'Get-AzConnectedNetworkSecurityPerimeterConfiguration', 'Get-AzConnectedPrivateLinkScope', 'Install-AzConnectedMachinePatch', 'Invoke-AzConnectedAssessMachinePatch', 'New-AzConnectedLicense', 'New-AzConnectedLicenseDetail', 'New-AzConnectedMachineExtension', 'New-AzConnectedMachineRunCommand', 'New-AzConnectedPrivateLinkScope', 'Remove-AzConnectedLicense', 'Remove-AzConnectedMachine', 'Remove-AzConnectedMachineExtension', 'Remove-AzConnectedMachineRunCommand', 'Remove-AzConnectedPrivateLinkScope', 'Set-AzConnectedLicense', 'Set-AzConnectedMachineExtension', 'Set-AzConnectedPrivateLinkScope', 'Update-AzConnectedExtension', 'Update-AzConnectedMachine', 'Update-AzConnectedMachineExtension', 'Update-AzConnectedMachineRunCommand', 'Update-AzConnectedPrivateLinkScopeTag'
1515
PrivateData = @{
1616
PSData = @{
1717
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'ConnectedMachine'

src/ConnectedMachine/ConnectedMachine.Autorest/README.md

Lines changed: 45 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ In this directory, run AutoRest:
3838
> see https://aka.ms/autorest
3939
4040
``` yaml
41-
commit: 2d044b8a317aff46d45080f5a797ac376955f648
41+
commit: 9c51b17f1c544eea0f6a67c01a6b763995521f52
4242
require:
4343
- $(this-folder)/../../readme.azure.noprofile.md
4444
input-file:
45-
- $(repo)/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/HybridCompute.json
46-
- $(repo)/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/privateLinkScopes.json
45+
- $(repo)/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/HybridCompute.json
46+
- $(repo)/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-03-31-preview/privateLinkScopes.json
4747

4848
module-version: 0.5.0
4949
title: ConnectedMachine
@@ -81,16 +81,7 @@ directive:
8181
"description": "The expand expression to apply on the operation.",
8282
}
8383
]
84-
85-
- from: swagger-document
86-
where: $.definitions.Machine.properties.properties
87-
transform: >-
88-
return {
89-
"x-ms-client-flatten": true,
90-
"$ref": "#/definitions/MachineProperties",
91-
"description": "Hybrid Compute Machine properties"
92-
}
93-
84+
9485
- from: swagger-document
9586
where: $.definitions.MachineExtensionUpdateProperties.properties
9687
transform: >-
@@ -130,6 +121,7 @@ directive:
130121
"description": "The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all."
131122
}
132123
}
124+
133125
- from: swagger-document
134126
where: $.definitions.MachineExtensionProperties.properties
135127
transform: >-
@@ -178,6 +170,7 @@ directive:
178170
"description": "The machine extension instance view."
179171
}
180172
}
173+
181174
# add 200 response to run-command delete
182175
- from: swagger-document
183176
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"].delete.responses
@@ -210,7 +203,7 @@ directive:
210203
"default": {
211204
"description": "Error response describing why the operation failed.",
212205
"schema": {
213-
"$ref": "https://github.com/Azure/azure-rest-api-specs/blob/2d044b8a317aff46d45080f5a797ac376955f648/specification/common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
206+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
214207
}
215208
}
216209
}
@@ -327,21 +320,48 @@ directive:
327320
subject: MachineRunCommand
328321
verb: Set
329322
remove: true
323+
# internal API
324+
- where:
325+
subject: LicenseProfile
326+
remove: true
327+
- where:
328+
subject: Extension
329+
variant: Upgrade
330+
remove: true
331+
332+
# we will release gateway and setting commands in a seperate module
333+
- where:
334+
subject: Gateway
335+
remove: true
336+
- where:
337+
subject: Setting
338+
remove: true
330339

331-
# add back when swagger change is checked in
340+
# We don't want user to send PATCH to the ESU license API
332341
- where:
333342
subject: License
343+
verb: Update
334344
remove: true
335345
- where:
336-
subject: LicenseProfile
346+
subject: License
347+
verb: Validate
337348
remove: true
349+
- where:
350+
subject: License
351+
verb: Test
352+
remove: true
353+
354+
# We don't want user to talk directly to the network configuration API
338355
- where:
339356
subject: NetworkConfiguration
340357
remove: true
358+
359+
# Remove when this API is fixed
341360
- where:
342-
subject: NetworkSecurityPerimeterConfiguration$
361+
subject: ReconcileNetworkSecurityPerimeterConfiguration$
362+
verb: Invoke
343363
remove: true
344-
364+
345365
# Removing non-expand commands
346366
- where:
347367
subject: MachinePatch
@@ -364,7 +384,13 @@ directive:
364384
description: Gets the list of ResourceGroupName's available for this subscription.
365385
script: Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName
366386

367-
# These APIs are used by the agent so they do not need to be in the cmdlets.
387+
# These APIs are used by the agent so they do not need to be in the cmdlets
368388
- remove-operation: Machines_CreateOrUpdate
369389
- remove-operation: MachineRunCommands_Update
390+
391+
# Create model cmdlet for complex object
392+
- model-cmdlet:
393+
- model-name: LicenseDetails
394+
cmdlet-name: New-AzConnectedLicenseDetail
395+
370396
```
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"resourceType": "licenses",
3+
"apiVersion": "2024-03-31-preview",
4+
"learnMore": {
5+
"url": "https://learn.microsoft.com/powershell/module/az.connectedmachine"
6+
},
7+
"commands": [
8+
{
9+
"name": "Get-AzConnectedLicense",
10+
"description": "Retrieves information about the view of a license.",
11+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}",
12+
"help": {
13+
"learnMore": {
14+
"url": "https://learn.microsoft.com/powershell/module/az.connectedmachine/get-azconnectedlicense"
15+
},
16+
"parameterSets": [
17+
{
18+
"parameters": [
19+
"-Name <String>",
20+
"-ResourceGroupName <String>",
21+
"[-SubscriptionId <String[]>]"
22+
]
23+
}
24+
]
25+
},
26+
"examples": [
27+
{
28+
"description": "Retrieves information about the view of a license.",
29+
"parameters": [
30+
{
31+
"name": "-Name",
32+
"value": "[Path.licenseName]"
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-AzConnectedLicense",
48+
"description": "The operation to delete a license.",
49+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}",
50+
"help": {
51+
"learnMore": {
52+
"url": "https://learn.microsoft.com/powershell/module/az.connectedmachine/remove-azconnectedlicense"
53+
},
54+
"parameterSets": [
55+
{
56+
"parameters": [
57+
"-Name <String>",
58+
"-ResourceGroupName <String>",
59+
"[-SubscriptionId <String>]"
60+
]
61+
}
62+
]
63+
},
64+
"examples": [
65+
{
66+
"description": "The operation to delete a license.",
67+
"parameters": [
68+
{
69+
"name": "-Name",
70+
"value": "[Path.licenseName]"
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/ConnectedMachine/ConnectedMachine.Autorest/UX/Microsoft.HybridCompute/locations-publishers-extensionTypes-versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "locations/publishers/extensionTypes/versions",
3-
"apiVersion": "2023-10-03-preview",
3+
"apiVersion": "2024-03-31-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.connectedmachine"
66
},

src/ConnectedMachine/ConnectedMachine.Autorest/UX/Microsoft.HybridCompute/machines-extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "machines/extensions",
3-
"apiVersion": "2023-10-03-preview",
3+
"apiVersion": "2024-03-31-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.connectedmachine"
66
},

src/ConnectedMachine/ConnectedMachine.Autorest/UX/Microsoft.HybridCompute/machines-runCommands.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "machines/runCommands",
3-
"apiVersion": "2023-10-03-preview",
3+
"apiVersion": "2024-03-31-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.connectedmachine"
66
},

src/ConnectedMachine/ConnectedMachine.Autorest/UX/Microsoft.HybridCompute/machines.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"resourceType": "machines",
3-
"apiVersion": "2023-10-03-preview",
3+
"apiVersion": "2024-03-31-preview",
44
"learnMore": {
55
"url": "https://learn.microsoft.com/powershell/module/az.connectedmachine"
66
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"resourceType": "privateLinkScopes/networkSecurityPerimeterConfigurations",
3+
"apiVersion": "2024-03-31-preview",
4+
"learnMore": {
5+
"url": "https://learn.microsoft.com/powershell/module/az.connectedmachine"
6+
},
7+
"commands": [
8+
{
9+
"name": "Get-AzConnectedNetworkSecurityPerimeterConfiguration",
10+
"description": "Gets the network security perimeter configuration for a private link scope.",
11+
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/networkSecurityPerimeterConfigurations/{perimeterName}",
12+
"help": {
13+
"learnMore": {
14+
"url": "https://learn.microsoft.com/powershell/module/az.connectedmachine/get-azconnectednetworksecurityperimeterconfiguration"
15+
},
16+
"parameterSets": [
17+
{
18+
"parameters": [
19+
"-PerimeterName <String>",
20+
"-ResourceGroupName <String>",
21+
"-ScopeName <String>",
22+
"[-SubscriptionId <String[]>]"
23+
]
24+
}
25+
]
26+
},
27+
"examples": [
28+
{
29+
"description": "Gets the network security perimeter configuration for a private link scope.",
30+
"parameters": [
31+
{
32+
"name": "-PerimeterName",
33+
"value": "[Path.perimeterName]"
34+
},
35+
{
36+
"name": "-ResourceGroupName",
37+
"value": "[Path.resourceGroupName]"
38+
},
39+
{
40+
"name": "-ScopeName",
41+
"value": "[Path.scopeName]"
42+
},
43+
{
44+
"name": "-SubscriptionId",
45+
"value": "[Path.subscriptionId]"
46+
}
47+
]
48+
}
49+
]
50+
}
51+
]
52+
}

src/ConnectedMachine/ConnectedMachine.Autorest/UX/Microsoft.HybridCompute/privateLinkScopes.json

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

0 commit comments

Comments
 (0)