-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sphere] Feature generated by auto rest (#24568)
* feature Sphere stable 20240401 * sphere directive redesign * test * Update Sphere test cases * Update message in readme * Fix count parameter set for analyze test coverage
- Loading branch information
Showing
125 changed files
with
91,245 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
bin | ||
obj | ||
.vs | ||
generated | ||
internal | ||
exports | ||
tools | ||
custom/*.psm1 | ||
custom/autogen-model-cmdlets | ||
test/*-TestResults.xml | ||
/*.ps1 | ||
/*.ps1xml | ||
/*.psm1 | ||
/*.snk | ||
/*.csproj | ||
/*.nuspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@{ | ||
GUID = '4855dcb5-d1a4-45e3-b4b2-49d37925ed0b' | ||
RootModule = './Az.Sphere.psm1' | ||
ModuleVersion = '0.1.0' | ||
CompatiblePSEditions = 'Core', 'Desktop' | ||
Author = 'Microsoft Corporation' | ||
CompanyName = 'Microsoft Corporation' | ||
Copyright = 'Microsoft Corporation. All rights reserved.' | ||
Description = 'Microsoft Azure PowerShell: Sphere cmdlets' | ||
PowerShellVersion = '5.1' | ||
DotNetFrameworkVersion = '4.7.2' | ||
RequiredAssemblies = './bin/Az.Sphere.private.dll' | ||
FormatsToProcess = './Az.Sphere.format.ps1xml' | ||
FunctionsToExport = 'Get-AzSphereCatalog', 'Get-AzSphereCatalogDevice', 'Get-AzSphereCatalogDeviceGroup', 'Get-AzSphereCatalogDeviceInsight', 'Get-AzSphereCertificate', 'Get-AzSphereCertificateCertChain', 'Get-AzSphereCertificateProof', 'Get-AzSphereDeployment', 'Get-AzSphereDevice', 'Get-AzSphereDeviceGroup', 'Get-AzSphereImage', 'Get-AzSphereProduct', 'Invoke-AzSphereCountCatalogDevice', 'Invoke-AzSphereCountDeviceGroupDevice', 'Invoke-AzSphereCountProductDevice', 'New-AzSphereCatalog', 'New-AzSphereDeployment', 'New-AzSphereDevice', 'New-AzSphereDeviceCapabilityImage', 'New-AzSphereDeviceGroup', 'New-AzSphereImage', 'New-AzSphereProduct', 'New-AzSphereProductDefaultDeviceGroup', 'Remove-AzSphereCatalog', 'Remove-AzSphereDeviceGroup', 'Remove-AzSphereProduct', 'Update-AzSphereCatalog', 'Update-AzSphereDevice', 'Update-AzSphereDeviceGroup', 'Update-AzSphereProduct' | ||
PrivateData = @{ | ||
PSData = @{ | ||
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Sphere' | ||
LicenseUri = 'https://aka.ms/azps-license' | ||
ProjectUri = 'https://github.com/Azure/azure-powershell' | ||
ReleaseNotes = '' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
<!-- region Generated --> | ||
# Az.Sphere | ||
This directory contains the PowerShell module for the Sphere 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.Sphere`, 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: ebce1c690af6060f0e5a72d875edf752d41d5769 | ||
tag: package-2024-04-01 | ||
require: | ||
# readme.azure.noprofile.md is the common configuration file | ||
- $(this-folder)/../../readme.azure.noprofile.md | ||
- $(repo)/specification/sphere/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/sphere/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: Sphere | ||
subject-prefix: $(service-name) | ||
|
||
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 | ||
- where: | ||
variant: ^(Create|Update)(?!.*?Expanded|ViaJsonString|ViaJsonFilePath) | ||
remove: true | ||
- where: | ||
variant: ^CreateViaIdentity.*$ | ||
remove: true | ||
# Remove unavailable feature | ||
- where: | ||
verb: Remove | ||
subject: ^Device$|Image|Deployment | ||
remove: true | ||
- where: | ||
verb: Update | ||
subject: Image|Deployment | ||
remove: true | ||
- where: | ||
verb: Get | ||
subject: CatalogDeployment | ||
remove: true | ||
# error 'The server responded with an unrecognized response', error message missing in default error response for post path | ||
- where: | ||
verb: Invoke | ||
subject: UploadCatalogImage | ||
remove: true | ||
- where: | ||
verb: Invoke | ||
subject: ClaimDeviceGroupDevice | ||
remove: true | ||
- where: | ||
verb: Invoke | ||
variant: ^Count(.*) | ||
set: | ||
variant: CountDevice$1 | ||
# Remove unexpanded include json parameter set | ||
- where: | ||
variant: ^List(?!.*?Expanded) | ||
subject: CatalogDeviceGroup | ||
remove: true | ||
- where: | ||
variant: ^(Retrieve)(?!.*?Expanded) | ||
subject: CertificateProof | ||
remove: true | ||
- where: | ||
variant: ^Claim(?!.*?Expanded) | ||
subject: ClaimDeviceGroupDevice | ||
hide: true | ||
# New-AzSphereDeviceCapabilityImage remove unexpanded parameter set | ||
- where: | ||
variant: ^(Generate)(?!.*?(Expanded|JsonString|JsonFilePath)) | ||
subject: DeviceCapabilityImage | ||
remove: true | ||
- where: | ||
variant: GenerateViaIdentityExpanded | ||
subject: DeviceCapabilityImage | ||
remove: true | ||
# Remove the set-* cmdlet | ||
- where: | ||
verb: Set | ||
hide: true | ||
``` |
95 changes: 95 additions & 0 deletions
95
src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-certificates.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"resourceType": "catalogs/certificates", | ||
"apiVersion": "2024-04-01", | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.sphere" | ||
}, | ||
"commands": [ | ||
{ | ||
"name": "Get-AzSphereCertificateCertChain", | ||
"description": "Retrieves cert chain.", | ||
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveCertChain", | ||
"help": { | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificatecertchain" | ||
}, | ||
"parameterSets": [ | ||
{ | ||
"parameters": [ | ||
"-CatalogName <String>", | ||
"-ResourceGroupName <String>", | ||
"-SerialNumber <String>", | ||
"[-SubscriptionId <String[]>]" | ||
] | ||
} | ||
] | ||
}, | ||
"examples": [ | ||
{ | ||
"description": "Retrieves cert chain.", | ||
"parameters": [ | ||
{ | ||
"name": "-CatalogName", | ||
"value": "[Path.catalogName]" | ||
}, | ||
{ | ||
"name": "-ResourceGroupName", | ||
"value": "[Path.resourceGroupName]" | ||
}, | ||
{ | ||
"name": "-SerialNumber", | ||
"value": "[Path.serialNumber]" | ||
}, | ||
{ | ||
"name": "-SubscriptionId", | ||
"value": "[Path.subscriptionId]" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "Get-AzSphereCertificate", | ||
"description": "Get a Certificate", | ||
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}", | ||
"help": { | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.sphere/get-azspherecertificate" | ||
}, | ||
"parameterSets": [ | ||
{ | ||
"parameters": [ | ||
"-CatalogName <String>", | ||
"-ResourceGroupName <String>", | ||
"-SerialNumber <String>", | ||
"[-SubscriptionId <String[]>]" | ||
] | ||
} | ||
] | ||
}, | ||
"examples": [ | ||
{ | ||
"description": "Get a Certificate", | ||
"parameters": [ | ||
{ | ||
"name": "-CatalogName", | ||
"value": "[Path.catalogName]" | ||
}, | ||
{ | ||
"name": "-ResourceGroupName", | ||
"value": "[Path.resourceGroupName]" | ||
}, | ||
{ | ||
"name": "-SerialNumber", | ||
"value": "[Path.serialNumber]" | ||
}, | ||
{ | ||
"name": "-SubscriptionId", | ||
"value": "[Path.subscriptionId]" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
52 changes: 52 additions & 0 deletions
52
src/Sphere/Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-images.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"resourceType": "catalogs/images", | ||
"apiVersion": "2024-04-01", | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.sphere" | ||
}, | ||
"commands": [ | ||
{ | ||
"name": "Get-AzSphereImage", | ||
"description": "Get a Image", | ||
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}", | ||
"help": { | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.sphere/get-azsphereimage" | ||
}, | ||
"parameterSets": [ | ||
{ | ||
"parameters": [ | ||
"-CatalogName <String>", | ||
"-Name <String>", | ||
"-ResourceGroupName <String>", | ||
"[-SubscriptionId <String[]>]" | ||
] | ||
} | ||
] | ||
}, | ||
"examples": [ | ||
{ | ||
"description": "Get a Image", | ||
"parameters": [ | ||
{ | ||
"name": "-CatalogName", | ||
"value": "[Path.catalogName]" | ||
}, | ||
{ | ||
"name": "-Name", | ||
"value": "[Path.imageName]" | ||
}, | ||
{ | ||
"name": "-ResourceGroupName", | ||
"value": "[Path.resourceGroupName]" | ||
}, | ||
{ | ||
"name": "-SubscriptionId", | ||
"value": "[Path.subscriptionId]" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
62 changes: 62 additions & 0 deletions
62
.../Sphere.Autorest/UX/Microsoft.AzureSphere/catalogs-products-deviceGroups-deployments.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"resourceType": "catalogs/products/deviceGroups/deployments", | ||
"apiVersion": "2024-04-01", | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.sphere" | ||
}, | ||
"commands": [ | ||
{ | ||
"name": "Get-AzSphereDeployment", | ||
"description": "Get a Deployment.\n'.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", | ||
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", | ||
"help": { | ||
"learnMore": { | ||
"url": "https://learn.microsoft.com/powershell/module/az.sphere/get-azspheredeployment" | ||
}, | ||
"parameterSets": [ | ||
{ | ||
"parameters": [ | ||
"-CatalogName <String>", | ||
"-DeviceGroupName <String>", | ||
"-Name <String>", | ||
"-ProductName <String>", | ||
"-ResourceGroupName <String>", | ||
"[-SubscriptionId <String[]>]" | ||
] | ||
} | ||
] | ||
}, | ||
"examples": [ | ||
{ | ||
"description": "Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", | ||
"parameters": [ | ||
{ | ||
"name": "-CatalogName", | ||
"value": "[Path.catalogName]" | ||
}, | ||
{ | ||
"name": "-DeviceGroupName", | ||
"value": "[Path.deviceGroupName]" | ||
}, | ||
{ | ||
"name": "-Name", | ||
"value": "[Path.deploymentName]" | ||
}, | ||
{ | ||
"name": "-ProductName", | ||
"value": "[Path.productName]" | ||
}, | ||
{ | ||
"name": "-ResourceGroupName", | ||
"value": "[Path.resourceGroupName]" | ||
}, | ||
{ | ||
"name": "-SubscriptionId", | ||
"value": "[Path.subscriptionId]" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.