Skip to content
Merged
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
Expand Up @@ -11,7 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.ConnectedMachine.private.dll'
FormatsToProcess = './Az.ConnectedMachine.format.ps1xml'
FunctionsToExport = 'Connect-AzConnectedMachine', 'Get-AzConnectedExtensionMetadata', 'Get-AzConnectedLicense', 'Get-AzConnectedMachine', 'Get-AzConnectedMachineExtension', 'Get-AzConnectedNetworkSecurityPerimeterConfiguration', 'Get-AzConnectedPrivateLinkScope', 'Install-AzConnectedMachinePatch', 'Invoke-AzConnectedAssessMachinePatch', 'Invoke-AzConnectedReconcileNetworkSecurityPerimeterConfiguration', 'New-AzConnectedLicense', 'New-AzConnectedLicenseDetail', 'New-AzConnectedMachineExtension', 'New-AzConnectedPrivateLinkScope', 'Remove-AzConnectedLicense', 'Remove-AzConnectedMachine', 'Remove-AzConnectedMachineExtension', 'Remove-AzConnectedPrivateLinkScope', 'Set-AzConnectedLicense', 'Set-AzConnectedMachineExtension', 'Set-AzConnectedPrivateLinkScope', 'Update-AzConnectedExtension', 'Update-AzConnectedMachine', 'Update-AzConnectedMachineExtension', 'Update-AzConnectedPrivateLinkScopeTag'
FunctionsToExport = 'Connect-AzConnectedMachine', 'Get-AzConnectedExtensionMetadata', 'Get-AzConnectedLicense', 'Get-AzConnectedLicenseProfile', 'Get-AzConnectedMachine', 'Get-AzConnectedMachineExtension', 'Get-AzConnectedMachineRunCommand', 'Get-AzConnectedNetworkSecurityPerimeterConfiguration', 'Get-AzConnectedPrivateLinkScope', 'Install-AzConnectedMachinePatch', 'Invoke-AzConnectedAssessMachinePatch', 'Invoke-AzConnectedReconcileNetworkSecurityPerimeterConfiguration', 'New-AzConnectedLicense', 'New-AzConnectedLicenseDetail', 'New-AzConnectedLicenseProfile', 'New-AzConnectedLicenseProfileFeature', 'New-AzConnectedMachineExtension', 'New-AzConnectedMachineRunCommand', 'New-AzConnectedPrivateLinkScope', 'Remove-AzConnectedLicense', 'Remove-AzConnectedLicenseProfile', 'Remove-AzConnectedMachine', 'Remove-AzConnectedMachineExtension', 'Remove-AzConnectedMachineRunCommand', 'Remove-AzConnectedPrivateLinkScope', 'Set-AzConnectedLicense', 'Set-AzConnectedMachineExtension', 'Set-AzConnectedPrivateLinkScope', 'Update-AzConnectedExtension', 'Update-AzConnectedLicenseProfile', 'Update-AzConnectedLicenseProfileFeature', 'Update-AzConnectedMachine', 'Update-AzConnectedMachineExtension', 'Update-AzConnectedMachineRunCommand', 'Update-AzConnectedPrivateLinkScopeTag'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'ConnectedMachine'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

# ----------------------------------------------------------------------------------
# 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.InteropServices;

[assembly: AssemblyTitle("Microsoft Azure Powershell - ConnectedMachine")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Microsoft Azure PowerShell")]
[assembly: AssemblyCopyright("Copyright © Microsoft")]

[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
[assembly: Guid("3fb4bd3c-26fa-4518-839a-b925456e7650")]
[assembly: AssemblyVersion("0.1.0")]
[assembly: AssemblyFileVersion("0.1.0")]
115 changes: 65 additions & 50 deletions src/ConnectedMachine/ConnectedMachine.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ In this directory, run AutoRest:
> see https://aka.ms/autorest

``` yaml
commit: f41d0c9332078cb2ef07b749081d94915255ada5
commit: a9980ec5181a161dd26c5277f7651722b60503ea
require:
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
- $(repo)/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/HybridCompute.json
- $(repo)/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/privateLinkScopes.json
- $(repo)/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/HybridCompute.json
- $(repo)/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/privateLinkScopes.json

module-version: 0.1.0
title: ConnectedMachine
Expand Down Expand Up @@ -176,41 +176,41 @@ directive:
}

# add 200 response to run-command delete - comment out for stable release
# - from: swagger-document
# where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"].delete.responses
# transform: >-
# return {
# "200": {
# "description": "OK"
# },
# "202": {
# "description": "Accepted",
# "headers": {
# "Location": {
# "description": "The URL of the resource used to check the status of the asynchronous operation.",
# "type": "string"
# },
# "Retry-After": {
# "description": "The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation.",
# "type": "integer",
# "format": "int32"
# },
# "Azure-AsyncOperation": {
# "description": "The URI to poll for completion status.",
# "type": "string"
# }
# }
# },
# "204": {
# "description": "No Content"
# },
# "default": {
# "description": "Error response describing why the operation failed.",
# "schema": {
# "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
# }
# }
# }
- from: swagger-document
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}"].delete.responses
transform: >-
return {
"200": {
"description": "OK"
},
"202": {
"description": "Accepted",
"headers": {
"Location": {
"description": "The URL of the resource used to check the status of the asynchronous operation.",
"type": "string"
},
"Retry-After": {
"description": "The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation.",
"type": "integer",
"format": "int32"
},
"Azure-AsyncOperation": {
"description": "The URI to poll for completion status.",
"type": "string"
}
}
},
"204": {
"description": "No Content"
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
}
}
}

# GetViaIdentity isn't useful until Azure PowerShell supports piping of different subjects
- where:
Expand Down Expand Up @@ -259,6 +259,11 @@ directive:
parameter-name: AgentUpgradeEnableAutomaticUpgrade
set:
parameter-name: AgentUpgradeEnableAutomatic
- where:
subject: MachineRunCommand
parameter-name: SubscriptionId
set:
alias: Subscription

# Rename Tag to Tags
- where:
Expand Down Expand Up @@ -324,23 +329,18 @@ directive:
subject: MachineRunCommand
verb: Set
remove: true
# internal API
- where:
subject: LicenseProfile
remove: true
- where:
subject: Extension
variant: Upgrade
remove: true

# we will release gateway and setting commands in a seperate module - comment out for stable release
# - where:
# subject: Gateway
# remove: true
# Remove when this API version is added - comment out for stable release
# - where:
# subject: Setting
# remove: true
# we will release gateway and setting commands in a seperate module
- where:
subject: Gateway
remove: true
- where:
subject: Setting
remove: true

# We don't want user to send PATCH to the ESU license API
- where:
Expand All @@ -356,6 +356,12 @@ directive:
verb: Test
remove: true

# hide Set-AzConnectedLicenseProfile (PUT) from user and keep Update-AzConnectedLicenseProfile (PATCH)
- where:
subject: LicenseProfile
verb: Set
remove: true

# We don't want user to talk directly to the network configuration API
- where:
subject: NetworkConfiguration
Expand Down Expand Up @@ -392,5 +398,14 @@ directive:
- model-cmdlet:
- model-name: LicenseDetails
cmdlet-name: New-AzConnectedLicenseDetail

# Generate complex object for Update-AzConnectedLicenseProfile
- model-cmdlet:
- model-name: ProductFeatureUpdate
cmdlet-name: Update-AzConnectedLicenseProfileFeature
# Generate complex object for New-AzConnectedLicenseProfile, change prefix to New- will cause CI styling issue
- model-cmdlet:
- model-name: ProductFeature
cmdlet-name: New-AzConnectedLicenseProfileFeature

```
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "licenses",
"apiVersion": "2024-07-10",
"apiVersion": "2024-07-31-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.connectedmachine"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "locations/publishers/extensionTypes/versions",
"apiVersion": "2024-07-10",
"apiVersion": "2024-07-31-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.connectedmachine"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "machines/extensions",
"apiVersion": "2024-07-10",
"apiVersion": "2024-07-31-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.connectedmachine"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"resourceType": "machines/licenseProfiles",
"apiVersion": "2024-07-31-preview",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.connectedmachine"
},
"commands": [
{
"name": "Get-AzConnectedLicenseProfile",
"description": "Retrieves information about the view of a license profile.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.connectedmachine/get-azconnectedlicenseprofile"
},
"parameterSets": [
{
"parameters": [
"-MachineName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "Retrieves information about the view of a license profile.",
"parameters": [
{
"name": "-MachineName",
"value": "[Path.machineName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzConnectedLicenseProfile",
"description": "The operation to delete a license profile.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.connectedmachine/remove-azconnectedlicenseprofile"
},
"parameterSets": [
{
"parameters": [
"-MachineName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "The operation to delete a license profile.",
"parameters": [
{
"name": "-MachineName",
"value": "[Path.machineName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
}
]
}
Loading