Skip to content

Commit f394b13

Browse files
Migrate ConnectedMachine from generation to main (#23681)
* Move ConnectedMachine to main * Update ChangeLog.md for connectedmachine --------- Co-authored-by: Xiaogang <[email protected]>
1 parent 0bf016d commit f394b13

File tree

838 files changed

+117361
-21772
lines changed

Some content is hidden

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

838 files changed

+117361
-21772
lines changed

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

Lines changed: 2661 additions & 953 deletions
Large diffs are not rendered by default.
Lines changed: 20 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,23 @@
1-
#
2-
# Module manifest for module 'Az.ConnectedMachine'
3-
#
4-
# Generated by: Microsoft Corporation
5-
#
6-
# Generated on: 11/10/2023
7-
#
8-
91
@{
10-
11-
# Script module or binary module file associated with this manifest.
12-
RootModule = './Az.ConnectedMachine.psm1'
13-
14-
# Version number of this module.
15-
ModuleVersion = '0.5.2'
16-
17-
# Supported PSEditions
18-
CompatiblePSEditions = 'Core', 'Desktop'
19-
20-
# ID used to uniquely identify this module
21-
GUID = '259a0542-8329-4b9e-8f72-dab0efc583e9'
22-
23-
# Author of this module
24-
Author = 'Microsoft Corporation'
25-
26-
# Company or vendor of this module
27-
CompanyName = 'Microsoft Corporation'
28-
29-
# Copyright statement for this module
30-
Copyright = 'Microsoft Corporation. All rights reserved.'
31-
32-
# Description of the functionality provided by this module
33-
Description = 'Microsoft Azure PowerShell: ConnectedMachine cmdlets'
34-
35-
# Minimum version of the PowerShell engine required by this module
36-
PowerShellVersion = '5.1'
37-
38-
# Name of the PowerShell host required by this module
39-
# PowerShellHostName = ''
40-
41-
# Minimum version of the PowerShell host required by this module
42-
# PowerShellHostVersion = ''
43-
44-
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
45-
DotNetFrameworkVersion = '4.7.2'
46-
47-
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
48-
# ClrVersion = ''
49-
50-
# Processor architecture (None, X86, Amd64) required by this module
51-
# ProcessorArchitecture = ''
52-
53-
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.13.2'; })
55-
56-
# Assemblies that must be loaded prior to importing this module
57-
RequiredAssemblies = './bin/Az.ConnectedMachine.private.dll'
58-
59-
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
60-
# ScriptsToProcess = @()
61-
62-
# Type files (.ps1xml) to be loaded when importing this module
63-
# TypesToProcess = @()
64-
65-
# Format files (.ps1xml) to be loaded when importing this module
66-
FormatsToProcess = './Az.ConnectedMachine.format.ps1xml'
67-
68-
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
69-
# NestedModules = @()
70-
71-
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
72-
FunctionsToExport = 'Connect-AzConnectedMachine', 'Get-AzConnectedExtensionMetadata',
73-
'Get-AzConnectedMachine', 'Get-AzConnectedMachineExtension',
74-
'Get-AzConnectedPrivateLinkScope',
75-
'Install-AzConnectedMachinePatch',
76-
'Invoke-AzConnectedAssessMachinePatch',
77-
'New-AzConnectedMachineExtension',
78-
'New-AzConnectedPrivateLinkScope', 'Remove-AzConnectedMachine',
79-
'Remove-AzConnectedMachineExtension',
80-
'Remove-AzConnectedPrivateLinkScope',
81-
'Set-AzConnectedMachineExtension',
82-
'Set-AzConnectedPrivateLinkScope', 'Update-AzConnectedExtension',
83-
'Update-AzConnectedMachine', 'Update-AzConnectedMachineExtension',
84-
'Update-AzConnectedPrivateLinkScopeTag'
85-
86-
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
87-
CmdletsToExport = @()
88-
89-
# Variables to export from this module
90-
# VariablesToExport = @()
91-
92-
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
93-
AliasesToExport = '*'
94-
95-
# DSC resources to export from this module
96-
# DscResourcesToExport = @()
97-
98-
# List of all modules packaged with this module
99-
# ModuleList = @()
100-
101-
# List of all files packaged with this module
102-
# FileList = @()
103-
104-
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
105-
PrivateData = @{
106-
2+
GUID = '259a0542-8329-4b9e-8f72-dab0efc583e9'
3+
RootModule = './Az.ConnectedMachine.psm1'
4+
ModuleVersion = '0.5.0'
5+
CompatiblePSEditions = 'Core', 'Desktop'
6+
Author = 'Microsoft Corporation'
7+
CompanyName = 'Microsoft Corporation'
8+
Copyright = 'Microsoft Corporation. All rights reserved.'
9+
Description = 'Microsoft Azure PowerShell: ConnectedMachine cmdlets'
10+
PowerShellVersion = '5.1'
11+
DotNetFrameworkVersion = '4.7.2'
12+
RequiredAssemblies = './bin/Az.ConnectedMachine.private.dll'
13+
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'
15+
PrivateData = @{
10716
PSData = @{
108-
109-
# Tags applied to this module. These help with module discovery in online galleries.
110-
Tags = 'Azure','ResourceManager','ARM','PSModule','ConnectedMachine'
111-
112-
# A URL to the license for this module.
113-
LicenseUri = 'https://aka.ms/azps-license'
114-
115-
# A URL to the main website for this project.
116-
ProjectUri = 'https://github.com/Azure/azure-powershell'
117-
118-
# A URL to an icon representing this module.
119-
# IconUri = ''
120-
121-
# ReleaseNotes of this module
122-
ReleaseNotes = '* Removed the version check in MachineExtensionProperties'
123-
124-
# Prerelease string of this module
125-
# Prerelease = ''
126-
127-
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
128-
# RequireLicenseAcceptance = $false
129-
130-
# External dependent modules of this module
131-
# ExternalModuleDependencies = @()
132-
133-
} # End of PSData hashtable
134-
135-
} # End of PrivateData hashtable
136-
137-
# HelpInfo URI of this module
138-
# HelpInfoURI = ''
139-
140-
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
141-
# DefaultCommandPrefix = ''
142-
17+
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'ConnectedMachine'
18+
LicenseUri = 'https://aka.ms/azps-license'
19+
ProjectUri = 'https://github.com/Azure/azure-powershell'
20+
ReleaseNotes = ''
21+
}
22+
}
14323
}
144-

src/ConnectedMachine/ConnectedMachine.Autorest/README.md

Lines changed: 113 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,46 +26,75 @@ AutoRest does not generate authentication code for the module. Authentication is
2626
For information on how to develop for `Az.ConnectedMachine`, see [how-to.md](how-to.md).
2727
<!-- endregion -->
2828

29+
2930
<!-- region Generated -->
3031
# Az.ConnectedMachine
3132
This directory contains the PowerShell module for Hybrid Compute.
32-
33+
3334
---
3435
## Run Generation
3536
In this directory, run AutoRest:
3637
> `autorest`
37-
38+
3839
---
3940
### AutoRest Configuration
4041
> see https://aka.ms/autorest
41-
42+
4243
``` yaml
43-
branch: 2ef47d44ce28c909893ead9b6485e8253ee5eed7
44+
commit: 2d044b8a317aff46d45080f5a797ac376955f648
4445
require:
45-
- $(this-folder)/../readme.azure.noprofile.md
46+
- $(this-folder)/../../readme.azure.noprofile.md
4647
input-file:
47-
- $(repo)/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-12-27/HybridCompute.json
48-
- $(repo)/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-12-27/privateLinkScopes.json
49-
48+
- $(repo)/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/HybridCompute.json
49+
- $(repo)/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/privateLinkScopes.json
50+
5051
module-version: 0.5.0
5152
title: ConnectedMachine
5253
subject-prefix: 'Connected'
5354

54-
identity-correction-for-post: true
55-
resourcegroup-append: true
56-
nested-object-to-string: true
57-
5855
directive:
59-
- from: swagger-document
56+
- from: swagger-document
57+
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}"].get.parameters
58+
transform: >-
59+
return [
60+
{
61+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
62+
},
63+
{
64+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
65+
},
66+
{
67+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
68+
},
69+
{
70+
"name": "machineName",
71+
"in": "path",
72+
"required": true,
73+
"type": "string",
74+
"pattern": "^[a-zA-Z0-9-_\\.]{1,54}$",
75+
"minLength": 1,
76+
"maxLength": 54,
77+
"description": "The name of the hybrid machine."
78+
},
79+
{
80+
"name": "$expand",
81+
"in": "query",
82+
"required": false,
83+
"type": "string",
84+
"description": "The expand expression to apply on the operation.",
85+
}
86+
]
87+
88+
- from: swagger-document
6089
where: $.definitions.Machine.properties.properties
6190
transform: >-
6291
return {
6392
"x-ms-client-flatten": true,
6493
"$ref": "#/definitions/MachineProperties",
6594
"description": "Hybrid Compute Machine properties"
6695
}
67-
68-
- from: swagger-document
96+
97+
- from: swagger-document
6998
where: $.definitions.MachineExtensionUpdateProperties.properties
7099
transform: >-
71100
return {
@@ -152,13 +181,49 @@ directive:
152181
"description": "The machine extension instance view."
153182
}
154183
}
184+
# add 200 response to run-command delete
185+
- from: swagger-document
186+
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"].delete.responses
187+
transform: >-
188+
return {
189+
"200": {
190+
"description": "OK"
191+
},
192+
"202": {
193+
"description": "Accepted",
194+
"headers": {
195+
"Location": {
196+
"description": "The URL of the resource used to check the status of the asynchronous operation.",
197+
"type": "string"
198+
},
199+
"Retry-After": {
200+
"description": "The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation.",
201+
"type": "integer",
202+
"format": "int32"
203+
},
204+
"Azure-AsyncOperation": {
205+
"description": "The URI to poll for completion status.",
206+
"type": "string"
207+
}
208+
}
209+
},
210+
"204": {
211+
"description": "No Content"
212+
},
213+
"default": {
214+
"description": "Error response describing why the operation failed.",
215+
"schema": {
216+
"$ref": "https://github.com/Azure/azure-rest-api-specs/blob/2d044b8a317aff46d45080f5a797ac376955f648/specification/common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
217+
}
218+
}
219+
}
155220
156221
# GetViaIdentity isn't useful until Azure PowerShell supports piping of different subjects
157222
- where:
158223
verb: Get
159-
variant: ^GetViaIdentity\d?$
224+
variant: ^GetViaIdentity.*$
160225
remove: true
161-
226+
162227
# Make parameters friendlier for extensions
163228
- where:
164229
subject: MachineExtension
@@ -200,7 +265,7 @@ directive:
200265
parameter-name: AgentUpgradeEnableAutomaticUpgrade
201266
set:
202267
parameter-name: AgentUpgradeEnableAutomatic
203-
268+
204269
# Formatting
205270
- where:
206271
model-name: Machine
@@ -234,7 +299,7 @@ directive:
234299
- Location
235300
- PublicNetworkAccess
236301
- ProvisioningState
237-
302+
238303
# Removing cmlets
239304
- where:
240305
subject: PrivateEndpointConnection
@@ -247,16 +312,39 @@ directive:
247312
subject: PrivateLinkScopeValidationDetail
248313
remove: true
249314
- where:
250-
verb: Get
251315
subject: NetworkProfile
252316
remove: true
317+
- where:
318+
subject: AgentVersion
319+
remove: true
320+
- where:
321+
subject: HybridIdentityMetadata
322+
remove: true
323+
- where:
324+
subject: MachineRunCommand
325+
verb: Set
326+
remove: true
253327

328+
# add back when swagger change is checked in
329+
- where:
330+
subject: License
331+
remove: true
332+
- where:
333+
subject: LicenseProfile
334+
remove: true
335+
- where:
336+
subject: NetworkConfiguration
337+
remove: true
338+
- where:
339+
subject: NetworkSecurityPerimeterConfiguration$
340+
remove: true
341+
254342
# Removing non-expand commands
255343
- where:
256344
subject: MachinePatch
257-
variant: ^Install$|^InstallViaIdentity$
345+
variant: ^(Install)(?!.*?Expanded|JsonFilePath|JsonString)
258346
remove: true
259-
347+
260348
# Completers
261349
- where:
262350
parameter-name: Location
@@ -272,8 +360,8 @@ directive:
272360
name: ResourceGroupName Completer
273361
description: Gets the list of ResourceGroupName's available for this subscription.
274362
script: Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName
275-
363+
276364
# These APIs are used by the agent so they do not need to be in the cmdlets.
277-
- remove-operation:
278-
- Machines_CreateOrUpdate
365+
- remove-operation: Machines_CreateOrUpdate
366+
- remove-operation: MachineRunCommands_Update
279367
```

0 commit comments

Comments
 (0)