@@ -6,20 +6,20 @@ Retrieves the state of a specific capacity.
66. DESCRIPTION
77The Get-FabricCapacityState function retrieves the state of a specific capacity. It supports multiple aliases for flexibility.
88
9- . PARAMETER subscriptionID
9+ . PARAMETER SubscriptionID
1010The ID of the subscription. This is a mandatory parameter. This is a parameter found in Azure, not Fabric.
1111
12- . PARAMETER resourcegroup
12+ . PARAMETER ResourceGroup
1313The resource group. This is a mandatory parameter. This is a parameter found in Azure, not Fabric.
1414
15- . PARAMETER capacity
15+ . PARAMETER Capacity
1616The capacity. This is a mandatory parameter. This is a parameter found in Azure, not Fabric.
1717
1818. EXAMPLE
1919 This example retrieves the state of a specific capacity given the subscription ID, resource group, and capacity.
2020
2121 ```powershell
22- Get-FabricCapacityState -subscriptionID "your-subscription-id" -resourcegroupID "your-resource-group" -capacityID "your-capacity"
22+ Get-FabricCapacityState -SubscriptionID "your-subscription-id" -ResourceGroup "your-resource-group" -Capacity "your-capacity"
2323 ```
2424
2525. NOTES
@@ -36,20 +36,21 @@ Author: Ioana Bouariu
3636 # Define mandatory parameters for the subscription ID, resource group, and capacity.
3737 Param (
3838 [Parameter (Mandatory = $true )]
39- [guid ]$subscriptionID ,
39+ [guid ]$SubscriptionID ,
4040 [Parameter (Mandatory = $true )]
41- [string ]$resourcegroup ,
41+ [string ]$ResourceGroup ,
4242 [Parameter (Mandatory = $true )]
4343 [string ]$capacity
4444 )
4545
4646 Confirm-TokenState
4747
4848 $AzureBaseApiUrl = Get-PSFConfigValue ' FabricTools.AzureApi.BaseUrl'
49+ $headers = Get-PSFConfigValue ' FabricTools.AzureSession.Headers'
4950
5051 # Define the URL for the GET request.
51- $getCapacityState = " $AzureBaseApiUrl /subscriptions/$subscriptionID /resourceGroups/$resourcegroup /providers/Microsoft.Fabric/capacities/$capacity /?api-version=2022-07-01-preview"
52+ $getCapacityState = " $AzureBaseApiUrl /subscriptions/$SubscriptionID /resourceGroups/$ResourceGroup /providers/Microsoft.Fabric/capacities/$Capacity /?api-version=2022-07-01-preview"
5253
5354 # Make the GET request and return the response.
54- return Invoke-RestMethod - Method GET - Uri $getCapacityState - Headers $script :AzureSession .HeaderParams - ErrorAction Stop
55+ return Invoke-RestMethod - Method GET - Uri $getCapacityState - Headers $headers - ErrorAction Stop
5556}
0 commit comments