Skip to content
Open
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
1 change: 1 addition & 0 deletions src/ComputeLimit/ComputeLimit.Autorest/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
16 changes: 16 additions & 0 deletions src/ComputeLimit/ComputeLimit.Autorest/.gitignore
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 src/ComputeLimit/ComputeLimit.Autorest/Properties/AssemblyInfo.cs
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)]
90 changes: 90 additions & 0 deletions src/ComputeLimit/ComputeLimit.Autorest/README.md
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

```
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]"
}
]
}
]
}
]
}
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]"
}
]
}
]
}
]
}
Loading
Loading