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

[Az.DeviceRegistry] - Integrate Azure Device Registry APIs into Azure Powershell Commandlets for version 2024-11-01 #26914

Open
wants to merge 6 commits into
base: generation
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 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
1 change: 1 addition & 0 deletions src/DeviceRegistry/DeviceRegistry.Autorest/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
18 changes: 18 additions & 0 deletions src/DeviceRegistry/DeviceRegistry.Autorest/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
bin
obj
.vs
generated
internal
exports
tools
custom/*.psm1
custom/autogen-model-cmdlets
test/*-TestResults.xml
license.txt
/*.ps1
/*.psd1
/*.ps1xml
/*.psm1
/*.snk
/*.csproj
/*.nuspec
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
// 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.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 - DeviceRegistry")]
[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)]
78 changes: 78 additions & 0 deletions src/DeviceRegistry/DeviceRegistry.Autorest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<!-- region Generated -->
# Az.DeviceRegistry
This directory contains the PowerShell module for the DeviceRegistry service.

---
## Info
- Modifiable: yes
- Generated: all
- Committed: yes
- Packaged: yes

---
## Detail
This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.

## Module Requirements
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater

## Authentication
AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.

## Development
For information on how to develop for `Az.DeviceRegistry`, see [how-to.md](how-to.md).
<!-- endregion -->

### AutoRest Configuration
> see https://aka.ms/autorest

```yaml
# pin the swagger version by using the commit id instead of branch name
commit: 1e620cfbf7df188acef4d6b4a8752aa3aa82fa02
require:
# readme.azure.noprofile.md is the common configuration file
- $(this-folder)/../../readme.azure.noprofile.md
- $(repo)/specification/deviceregistry/resource-manager/readme.md
# 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-local-readme.md

try-require:
- $(repo)/specification/deviceregistry/resource-manager/readme.powershell.md

# For new RP, the version is 0.1.0
module-version: 0.1.0
# Normally, title is the service name
title: DeviceRegistry
subject-prefix: $(service-name)

# The next three configurations are exclusive to v3, and in v4, they are activated by default. If you are still using v3, please uncomment them.
# identity-correction-for-post: true
# resourcegroup-append: true
# nested-object-to-string: true

directive:
# Following are common directives which are normally required in all the RPs
# 1. Remove the unexpanded parameter set
# 2. For New-* cmdlets, ViaIdentity is not required
# Following two directives are v4 specific
- where:
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
variant: ^CreateViaIdentity.*$
remove: true
# Remove GetViaIdentity and GetViaIdentityLocation from the Get-AzDeviceRegistryOperationStatus
- where:
variant: ^GetViaIdentity$|GetViaIdentityLocation$
mryanlo marked this conversation as resolved.
Show resolved Hide resolved
subject: OperationStatus
remove: true
# Follow directive is v3 specific. If you are using v3, uncomment following directive and comments out two directives above
#- where:
# variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
# remove: true

# Remove the set-* cmdlet
- where:
verb: Set
remove: true
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"resourceType": "assetEndpointProfiles",
"apiVersion": "2024-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.deviceregistry"
},
"commands": [
{
"name": "Get-AzDeviceRegistryAssetEndpointProfile",
"description": "Get a AssetEndpointProfile",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.deviceregistry/get-azdeviceregistryassetendpointprofile"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "Get a AssetEndpointProfile",
"parameters": [
{
"name": "-Name",
"value": "[Path.assetEndpointProfileName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzDeviceRegistryAssetEndpointProfile",
"description": "Delete a AssetEndpointProfile",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assetEndpointProfiles/{assetEndpointProfileName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.deviceregistry/remove-azdeviceregistryassetendpointprofile"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Delete a AssetEndpointProfile",
"parameters": [
{
"name": "-Name",
"value": "[Path.assetEndpointProfileName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"resourceType": "assets",
"apiVersion": "2024-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.deviceregistry"
},
"commands": [
{
"name": "Get-AzDeviceRegistryAsset",
"description": "Get a Asset",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.deviceregistry/get-azdeviceregistryasset"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "Get a Asset",
"parameters": [
{
"name": "-Name",
"value": "[Path.assetName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzDeviceRegistryAsset",
"description": "Delete a Asset",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/assets/{assetName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.deviceregistry/remove-azdeviceregistryasset"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Delete a Asset",
"parameters": [
{
"name": "-Name",
"value": "[Path.assetName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"resourceType": "billingContainers",
"apiVersion": "2024-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.deviceregistry"
},
"commands": [
{
"name": "Get-AzDeviceRegistryBillingContainer",
"description": "Get a BillingContainer",
"path": "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/billingContainers/{billingContainerName}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.deviceregistry/get-azdeviceregistrybillingcontainer"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "Get a BillingContainer",
"parameters": [
{
"name": "-Name",
"value": "[Path.billingContainerName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"resourceType": "locations/operationStatuses",
"apiVersion": "2024-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.deviceregistry"
},
"commands": [
{
"name": "Get-AzDeviceRegistryOperationStatus",
"description": "Returns the current status of an async operation.",
"path": "/subscriptions/{subscriptionId}/providers/Microsoft.DeviceRegistry/locations/{location}/operationStatuses/{operationId}",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.deviceregistry/get-azdeviceregistryoperationstatus"
},
"parameterSets": [
{
"parameters": [
"-Location <String>",
"-OperationId <String>",
"[-SubscriptionId <String[]>]"
]
}
]
},
"examples": [
{
"description": "Returns the current status of an async operation.",
"parameters": [
{
"name": "-Location",
"value": "[Path.location]"
},
{
"name": "-OperationId",
"value": "[Path.operationId]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
}
]
}
Loading