-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Add new Az.ComputeLimit module for shared compute limits #29266
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
Open
deepnandu
wants to merge
4
commits into
Azure:main
Choose a base branch
from
deepnandu:computelimit-new-cmdlets-sharedlimit
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 | ||
| test/*-TestResults.xml | ||
| license.txt | ||
| /*.ps1 | ||
| /*.psd1 | ||
| /*.ps1xml | ||
| /*.psm1 | ||
| /*.snk | ||
| /*.csproj | ||
| /*.nuspec |
26 changes: 26 additions & 0 deletions
26
src/ComputeLimit/ComputeLimit.Autorest/Properties/AssemblyInfo.cs
This file contains hidden or 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,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 - ComputeLimit")] | ||
| [assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.0")] | ||
| [assembly: System.Reflection.AssemblyVersionAttribute("0.1.0")] | ||
| [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] | ||
| [assembly: System.CLSCompliantAttribute(false)] |
This file contains hidden or 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,90 @@ | ||
| <!-- region Generated --> | ||
| # Az.ComputeLimit | ||
| This directory contains the PowerShell module for the ComputeLimit 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.ComputeLimit`, see [how-to.md](how-to.md). | ||
| <!-- endregion --> | ||
|
|
||
| ### AutoRest Configuration | ||
| > see https://aka.ms/autorest | ||
|
|
||
| ``` yaml | ||
| commit: 661354eacb7c1e697aa2d7be980c7ebe02255138 | ||
|
|
||
| require: | ||
| - $(this-folder)/../../readme.azure.noprofile.md | ||
| - $(repo)/specification/computelimit/resource-manager/Microsoft.ComputeLimit/ComputeLimit/readme.md | ||
|
|
||
| module-version: 0.1.0 | ||
| title: ComputeLimit | ||
| # No service-name prefix: cmdlets are Get-AzSharedLimit, not Get-AzComputeLimitSharedLimit | ||
| subject-prefix: '' | ||
|
|
||
| identity-correction-for-post: true | ||
| resourcegroup-append: true | ||
| nested-object-to-string: true | ||
| auto-switch-view: false | ||
|
|
||
| inlining-threshold: 50 | ||
|
|
||
| use-extension: | ||
| "@autorest/powershell": "4.x" | ||
|
|
||
| directive: | ||
| # 1. Remove Set-* cmdlets (AutoRest generates both New- and Set- for PUT; | ||
| # we only want Add-) | ||
| - where: | ||
| verb: Set | ||
| remove: true | ||
|
|
||
| # 2. Remove Update-* cmdlets (no PATCH operations needed) | ||
| - where: | ||
| verb: Update | ||
| remove: true | ||
|
|
||
| # 3. Remove Operations_List cmdlet (internal Azure infra, not user-facing) | ||
| - where: | ||
| subject: Operation | ||
| remove: true | ||
|
|
||
| # 4. Rename New- to Add- for SharedLimit | ||
| # (swagger PUT "SharedLimits_Create" maps to New-, but desired verb is Add-) | ||
| - where: | ||
| verb: New | ||
| subject: SharedLimit | ||
| set: | ||
| verb: Add | ||
|
|
||
| # 5. Rename New- to Add- for GuestSubscription | ||
| # (swagger PUT "GuestSubscriptions_Create" maps to New-, but desired verb is Add-) | ||
| - where: | ||
| verb: New | ||
| subject: GuestSubscription | ||
| set: | ||
| verb: Add | ||
|
|
||
| # 6. Remove JsonFilePath and JsonString variants | ||
| # (keep only Expanded parameter sets for a clean experience) | ||
| - where: | ||
| variant: ^(Create|Update)(?=.*?(JsonFilePath|JsonString)) | ||
| remove: true | ||
|
|
||
| ``` |
123 changes: 123 additions & 0 deletions
123
...teLimit/ComputeLimit.Autorest/UX/Microsoft.ComputeLimit/locations-guestSubscriptions.json
This file contains hidden or 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,123 @@ | ||
| { | ||
| "resourceType": "locations/guestSubscriptions", | ||
| "apiVersion": "2025-08-15", | ||
| "learnMore": { | ||
| "url": "https://learn.microsoft.com/powershell/module/az.computelimit" | ||
| }, | ||
| "commands": [ | ||
| { | ||
| "name": "Add-AzGuestSubscription", | ||
| "description": "Adds a subscription as a guest to consume the compute limits shared by the host subscription.", | ||
| "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions/{guestSubscriptionId}", | ||
| "help": { | ||
| "learnMore": { | ||
| "url": "https://learn.microsoft.com/powershell/module/az.computelimit/add-azguestsubscription" | ||
| }, | ||
| "parameterSets": [ | ||
| { | ||
| "parameters": [ | ||
| "-Id <String>", | ||
| "-Location <String>", | ||
| "[-SubscriptionId <String>]" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "examples": [ | ||
| { | ||
| "description": "Adds a subscription as a guest to consume the compute limits shared by the host subscription.", | ||
| "parameters": [ | ||
| { | ||
| "name": "-Id", | ||
| "value": "[Path.guestSubscriptionId]" | ||
| }, | ||
| { | ||
| "name": "-Location", | ||
| "value": "[Path.location]" | ||
| }, | ||
| { | ||
| "name": "-SubscriptionId", | ||
| "value": "[Path.subscriptionId]" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "name": "Get-AzGuestSubscription", | ||
| "description": "Gets the properties of a guest subscription.", | ||
| "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions/{guestSubscriptionId}", | ||
| "help": { | ||
| "learnMore": { | ||
| "url": "https://learn.microsoft.com/powershell/module/az.computelimit/get-azguestsubscription" | ||
| }, | ||
| "parameterSets": [ | ||
| { | ||
| "parameters": [ | ||
| "-Id <String>", | ||
| "-Location <String>", | ||
| "[-SubscriptionId <String[]>]" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "examples": [ | ||
| { | ||
| "description": "Gets the properties of a guest subscription.", | ||
| "parameters": [ | ||
| { | ||
| "name": "-Id", | ||
| "value": "[Path.guestSubscriptionId]" | ||
| }, | ||
| { | ||
| "name": "-Location", | ||
| "value": "[Path.location]" | ||
| }, | ||
| { | ||
| "name": "-SubscriptionId", | ||
| "value": "[Path.subscriptionId]" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "name": "Remove-AzGuestSubscription", | ||
| "description": "Deletes a subscription as a guest to stop consuming the compute limits shared by the host subscription.", | ||
| "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/guestSubscriptions/{guestSubscriptionId}", | ||
| "help": { | ||
| "learnMore": { | ||
| "url": "https://learn.microsoft.com/powershell/module/az.computelimit/remove-azguestsubscription" | ||
| }, | ||
| "parameterSets": [ | ||
| { | ||
| "parameters": [ | ||
| "-Id <String>", | ||
| "-Location <String>", | ||
| "[-SubscriptionId <String>]" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "examples": [ | ||
| { | ||
| "description": "Deletes a subscription as a guest to stop consuming the compute limits shared by the host subscription.", | ||
| "parameters": [ | ||
| { | ||
| "name": "-Id", | ||
| "value": "[Path.guestSubscriptionId]" | ||
| }, | ||
| { | ||
| "name": "-Location", | ||
| "value": "[Path.location]" | ||
| }, | ||
| { | ||
| "name": "-SubscriptionId", | ||
| "value": "[Path.subscriptionId]" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
123 changes: 123 additions & 0 deletions
123
src/ComputeLimit/ComputeLimit.Autorest/UX/Microsoft.ComputeLimit/locations-sharedLimits.json
This file contains hidden or 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,123 @@ | ||
| { | ||
| "resourceType": "locations/sharedLimits", | ||
| "apiVersion": "2025-08-15", | ||
| "learnMore": { | ||
| "url": "https://learn.microsoft.com/powershell/module/az.computelimit" | ||
| }, | ||
| "commands": [ | ||
| { | ||
| "name": "Add-AzSharedLimit", | ||
| "description": "Enables sharing of a compute limit by the host subscription with its guest subscriptions.", | ||
| "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/sharedLimits/{name}", | ||
| "help": { | ||
| "learnMore": { | ||
| "url": "https://learn.microsoft.com/powershell/module/az.computelimit/add-azsharedlimit" | ||
| }, | ||
| "parameterSets": [ | ||
| { | ||
| "parameters": [ | ||
| "-Location <String>", | ||
| "-Name <String>", | ||
| "[-SubscriptionId <String>]" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "examples": [ | ||
| { | ||
| "description": "Enables sharing of a compute limit by the host subscription with its guest subscriptions.", | ||
| "parameters": [ | ||
| { | ||
| "name": "-Location", | ||
| "value": "[Path.location]" | ||
| }, | ||
| { | ||
| "name": "-Name", | ||
| "value": "[Path.name]" | ||
| }, | ||
| { | ||
| "name": "-SubscriptionId", | ||
| "value": "[Path.subscriptionId]" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "name": "Get-AzSharedLimit", | ||
| "description": "Gets the properties of a compute limit shared by the host subscription with its guest subscriptions.", | ||
| "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/sharedLimits/{name}", | ||
| "help": { | ||
| "learnMore": { | ||
| "url": "https://learn.microsoft.com/powershell/module/az.computelimit/get-azsharedlimit" | ||
| }, | ||
| "parameterSets": [ | ||
| { | ||
| "parameters": [ | ||
| "-Location <String>", | ||
| "-Name <String>", | ||
| "[-SubscriptionId <String[]>]" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "examples": [ | ||
| { | ||
| "description": "Gets the properties of a compute limit shared by the host subscription with its guest subscriptions.", | ||
| "parameters": [ | ||
| { | ||
| "name": "-Location", | ||
| "value": "[Path.location]" | ||
| }, | ||
| { | ||
| "name": "-Name", | ||
| "value": "[Path.name]" | ||
| }, | ||
| { | ||
| "name": "-SubscriptionId", | ||
| "value": "[Path.subscriptionId]" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "name": "Remove-AzSharedLimit", | ||
| "description": "Disables sharing of a compute limit by the host subscription with its guest subscriptions.", | ||
| "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeLimit/locations/{location}/sharedLimits/{name}", | ||
| "help": { | ||
| "learnMore": { | ||
| "url": "https://learn.microsoft.com/powershell/module/az.computelimit/remove-azsharedlimit" | ||
| }, | ||
| "parameterSets": [ | ||
| { | ||
| "parameters": [ | ||
| "-Location <String>", | ||
| "-Name <String>", | ||
| "[-SubscriptionId <String>]" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "examples": [ | ||
| { | ||
| "description": "Disables sharing of a compute limit by the host subscription with its guest subscriptions.", | ||
| "parameters": [ | ||
| { | ||
| "name": "-Location", | ||
| "value": "[Path.location]" | ||
| }, | ||
| { | ||
| "name": "-Name", | ||
| "value": "[Path.name]" | ||
| }, | ||
| { | ||
| "name": "-SubscriptionId", | ||
| "value": "[Path.subscriptionId]" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.