armquota

package module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2025 License: MIT Imports: 15 Imported by: 4

README

Azure Quota Module for Go

The armquota module provides operations for working with Azure Quota.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Quota module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Quota. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Quota module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armquota.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armquota.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewGroupQuotaSubscriptionAllocationClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Quota label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocatedQuotaToSubscriptionList added in v1.1.0

type AllocatedQuotaToSubscriptionList struct {
	// List of Group Quota Limit allocated to subscriptions.
	Value []*AllocatedToSubscription
}

AllocatedQuotaToSubscriptionList - Quota allocated to subscriptions

func (AllocatedQuotaToSubscriptionList) MarshalJSON added in v1.1.0

func (a AllocatedQuotaToSubscriptionList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AllocatedQuotaToSubscriptionList.

func (*AllocatedQuotaToSubscriptionList) UnmarshalJSON added in v1.1.0

func (a *AllocatedQuotaToSubscriptionList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AllocatedQuotaToSubscriptionList.

type AllocatedToSubscription added in v1.1.0

type AllocatedToSubscription struct {
	// The amount of quota allocated to this subscriptionId from the GroupQuotasEntity.
	QuotaAllocated *int64

	// An Azure subscriptionId.
	SubscriptionID *string
}

AllocatedToSubscription - SubscriptionIds and quota allocated to subscriptions from the GroupQuota.

func (AllocatedToSubscription) MarshalJSON added in v1.1.0

func (a AllocatedToSubscription) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AllocatedToSubscription.

func (*AllocatedToSubscription) UnmarshalJSON added in v1.1.0

func (a *AllocatedToSubscription) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AllocatedToSubscription.

type AllocationRequestBase added in v1.1.0

type AllocationRequestBase struct {
	Properties *AllocationRequestBaseProperties
}

AllocationRequestBase - The new quota request allocated to subscription.

func (AllocationRequestBase) MarshalJSON added in v1.1.0

func (a AllocationRequestBase) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AllocationRequestBase.

func (*AllocationRequestBase) UnmarshalJSON added in v1.1.0

func (a *AllocationRequestBase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AllocationRequestBase.

type AllocationRequestBaseProperties added in v1.1.0

type AllocationRequestBaseProperties struct {
	// The new quota limit for the subscription. The incremental quota will be allocated from pre-approved group quota.
	Limit *int64

	// The location for which the subscription is allocated
	Region *string

	// READ-ONLY; Name of the resource provided by the resource provider. This property is already included in the request URI,
	// so it is a readonly property returned in the response.
	Name *AllocationRequestBasePropertiesName
}

func (AllocationRequestBaseProperties) MarshalJSON added in v1.1.0

func (a AllocationRequestBaseProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AllocationRequestBaseProperties.

func (*AllocationRequestBaseProperties) UnmarshalJSON added in v1.1.0

func (a *AllocationRequestBaseProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AllocationRequestBaseProperties.

type AllocationRequestBasePropertiesName added in v1.1.0

type AllocationRequestBasePropertiesName struct {
	// READ-ONLY; Resource display name.
	LocalizedValue *string

	// READ-ONLY; Resource name.
	Value *string
}

AllocationRequestBasePropertiesName - Name of the resource provided by the resource provider. This property is already included in the request URI, so it is a readonly property returned in the response.

func (AllocationRequestBasePropertiesName) MarshalJSON added in v1.1.0

func (a AllocationRequestBasePropertiesName) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AllocationRequestBasePropertiesName.

func (*AllocationRequestBasePropertiesName) UnmarshalJSON added in v1.1.0

func (a *AllocationRequestBasePropertiesName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AllocationRequestBasePropertiesName.

type AllocationRequestStatus added in v1.1.0

type AllocationRequestStatus struct {
	Properties *AllocationRequestStatusProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

AllocationRequestStatus - The subscription quota allocation status.

func (AllocationRequestStatus) MarshalJSON added in v1.1.0

func (a AllocationRequestStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AllocationRequestStatus.

func (*AllocationRequestStatus) UnmarshalJSON added in v1.1.0

func (a *AllocationRequestStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AllocationRequestStatus.

type AllocationRequestStatusList added in v1.1.0

type AllocationRequestStatusList struct {
	// List of QuotaAllocation Request Status
	Value []*AllocationRequestStatus

	// READ-ONLY; The URL to use for getting the next set of results.
	NextLink *string
}

AllocationRequestStatusList - List of QuotaAllocation Request Status

func (AllocationRequestStatusList) MarshalJSON added in v1.1.0

func (a AllocationRequestStatusList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AllocationRequestStatusList.

func (*AllocationRequestStatusList) UnmarshalJSON added in v1.1.0

func (a *AllocationRequestStatusList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AllocationRequestStatusList.

type AllocationRequestStatusProperties added in v1.1.0

type AllocationRequestStatusProperties struct {
	// The new quota request allocated to subscription.
	RequestedResource *AllocationRequestBase

	// READ-ONLY; Details of the failure.
	FaultCode *string

	// READ-ONLY; Request status.
	ProvisioningState *RequestState

	// READ-ONLY; The request submission time. The date conforms to the following format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ
	RequestSubmitTime *time.Time
}

func (AllocationRequestStatusProperties) MarshalJSON added in v1.1.0

func (a AllocationRequestStatusProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AllocationRequestStatusProperties.

func (*AllocationRequestStatusProperties) UnmarshalJSON added in v1.1.0

func (a *AllocationRequestStatusProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AllocationRequestStatusProperties.

type Client added in v0.2.0

type Client struct {
	// contains filtered or unexported fields
}

Client contains the methods for the Quota group. Don't use this type directly, use NewClient() instead.

func NewClient added in v0.2.0

func NewClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error)

NewClient creates a new instance of Client with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*Client) BeginCreateOrUpdate added in v0.2.0

func (client *Client) BeginCreateOrUpdate(ctx context.Context, resourceName string, scope string, createQuotaRequest CurrentQuotaLimitBase, options *ClientBeginCreateOrUpdateOptions) (*runtime.Poller[ClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Create or update the quota limit for the specified resource with the requested value. To update the quota, follow these steps: 1. Use the GET operation for quotas and usages to determine how much quota remains for the specific resource and to calculate the new quota limit. These steps are detailed in this example [https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670]. 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed status of the request. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • resourceName - Resource name for a given resource provider. For example:
  • SKU name for Microsoft.Compute
  • SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
  • scope - The target Azure resource URI. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/. This is the target Azure resource URI for the List GET operation. If a {resourceName} is added after /quotas, then it's the target Azure resource URI in the GET operation for the specific resource.
  • createQuotaRequest - Quota request payload.
  • options - ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method.
Example (QuotasPutRequestForCompute)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/putComputeOneSkuQuotaRequest.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "standardFSv2Family", "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus", armquota.CurrentQuotaLimitBase{
		Properties: &armquota.Properties{
			Name: &armquota.ResourceName{
				Value: to.Ptr("standardFSv2Family"),
			},
			Limit: &armquota.LimitObject{
				LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
				Value:           to.Ptr[int32](10),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CurrentQuotaLimitBase = armquota.CurrentQuotaLimitBase{
	// 	Name: to.Ptr("standardFSv2Family"),
	// 	Type: to.Ptr("Microsoft.Quota/quotas"),
	// 	ID: to.Ptr("/subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/quotas/standardFSv2Family"),
	// 	Properties: &armquota.Properties{
	// 		Name: &armquota.ResourceName{
	// 			Value: to.Ptr("standardFSv2Family"),
	// 		},
	// 		Limit: &armquota.LimitObject{
	// 			LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
	// 			Value: to.Ptr[int32](10),
	// 		},
	// 	},
	// }
}
Output:

Example (QuotasPutRequestForNetwork)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/putNetworkOneSkuQuotaRequest.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "MinPublicIpInterNetworkPrefixLength", "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus", armquota.CurrentQuotaLimitBase{
		Properties: &armquota.Properties{
			Name: &armquota.ResourceName{
				Value: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
			},
			Limit: &armquota.LimitObject{
				LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
				Value:           to.Ptr[int32](10),
			},
			ResourceType: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CurrentQuotaLimitBase = armquota.CurrentQuotaLimitBase{
	// 	Name: to.Ptr("2B5C8515-37D8-4B6A-879B-CD641A2CF605"),
	// 	Type: to.Ptr("Microsoft.Quota/quotas"),
	// 	ID: to.Ptr("/subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/quotaRequests/2B5C8515-37D8-4B6A-879B-CD641A2CF605"),
	// 	Properties: &armquota.Properties{
	// 		Name: &armquota.ResourceName{
	// 			Value: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
	// 		},
	// 		Limit: &armquota.LimitObject{
	// 			LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
	// 			Value: to.Ptr[int32](10),
	// 		},
	// 		ResourceType: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
	// 	},
	// }
}
Output:

Example (QuotasPutRequestForNetworkStandardSkuPublicIpAddressesResource)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/putNetworkOneSkuQuotaRequestStandardSkuPublicIpAddresses.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "StandardSkuPublicIpAddresses", "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus", armquota.CurrentQuotaLimitBase{
		Properties: &armquota.Properties{
			Name: &armquota.ResourceName{
				Value: to.Ptr("StandardSkuPublicIpAddresses"),
			},
			Limit: &armquota.LimitObject{
				LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
				Value:           to.Ptr[int32](10),
			},
			ResourceType: to.Ptr("PublicIpAddresses"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CurrentQuotaLimitBase = armquota.CurrentQuotaLimitBase{
	// 	Name: to.Ptr("2B5C8515-37D8-4B6A-879B-CD641A2CF605"),
	// 	Type: to.Ptr("Microsoft.Quota/quotas"),
	// 	ID: to.Ptr("/subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/quotaRequests/2B5C8515-37D8-4B6A-879B-CD641A2CF605"),
	// 	Properties: &armquota.Properties{
	// 		Name: &armquota.ResourceName{
	// 			Value: to.Ptr("StandardSkuPublicIpAddresses"),
	// 		},
	// 		Limit: &armquota.LimitObject{
	// 			LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
	// 			Value: to.Ptr[int32](10),
	// 		},
	// 		ResourceType: to.Ptr("PublicIpAddresses"),
	// 	},
	// }
}
Output:

Example (QuotasRequestForMachineLearningServicesLowPriorityResource)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/putMachineLearningServicesQuotaRequestLowPriority.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginCreateOrUpdate(ctx, "TotalLowPriorityCores", "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.MachineLearningServices/locations/eastus", armquota.CurrentQuotaLimitBase{
		Properties: &armquota.Properties{
			Name: &armquota.ResourceName{
				Value: to.Ptr("TotalLowPriorityCores"),
			},
			Limit: &armquota.LimitObject{
				LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
				Value:           to.Ptr[int32](10),
			},
			ResourceType: to.Ptr("lowPriority"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CurrentQuotaLimitBase = armquota.CurrentQuotaLimitBase{
	// 	Name: to.Ptr("TotalLowPriorityCores"),
	// 	Type: to.Ptr("Microsoft.Quota/quotas"),
	// 	ID: to.Ptr("/subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.MachineLearningServices/locations/eastus/providers/Microsoft.Quota/quotas/TotalLowPriorityCores"),
	// 	Properties: &armquota.Properties{
	// 		Name: &armquota.ResourceName{
	// 			Value: to.Ptr("TotalLowPriorityCores"),
	// 		},
	// 		Limit: &armquota.LimitObject{
	// 			LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
	// 			Value: to.Ptr[int32](10),
	// 		},
	// 		ResourceType: to.Ptr("lowPriority"),
	// 	},
	// }
}
Output:

func (*Client) BeginUpdate added in v0.2.0

func (client *Client) BeginUpdate(ctx context.Context, resourceName string, scope string, createQuotaRequest CurrentQuotaLimitBase, options *ClientBeginUpdateOptions) (*runtime.Poller[ClientUpdateResponse], error)

BeginUpdate - Update the quota limit for a specific resource to the specified value: 1. Use the Usages-GET and Quota-GET operations to determine the remaining quota for the specific resource and to calculate the new quota limit. These steps are detailed in this example [https://techcommunity.microsoft.com/t5/azure-governance-and-management/using-the-new-quota-rest-api/ba-p/2183670]. 2. Use this PUT operation to update the quota limit. Please check the URI in location header for the detailed status of the request. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • resourceName - Resource name for a given resource provider. For example:
  • SKU name for Microsoft.Compute
  • SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
  • scope - The target Azure resource URI. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/. This is the target Azure resource URI for the List GET operation. If a {resourceName} is added after /quotas, then it's the target Azure resource URI in the GET operation for the specific resource.
  • createQuotaRequest - Quota requests payload.
  • options - ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method.
Example (QuotasRequestPatchForCompute)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/patchComputeQuotaRequest.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginUpdate(ctx, "standardFSv2Family", "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus", armquota.CurrentQuotaLimitBase{
		Properties: &armquota.Properties{
			Name: &armquota.ResourceName{
				Value: to.Ptr("standardFSv2Family"),
			},
			Limit: &armquota.LimitObject{
				LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
				Value:           to.Ptr[int32](10),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CurrentQuotaLimitBase = armquota.CurrentQuotaLimitBase{
	// 	Name: to.Ptr("standardFSv2Family"),
	// 	Type: to.Ptr("Microsoft.Quota/quotas"),
	// 	ID: to.Ptr("/subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/quotas/standardFSv2Family"),
	// 	Properties: &armquota.Properties{
	// 		Name: &armquota.ResourceName{
	// 			LocalizedValue: to.Ptr("Standard FSv2 Family vCPUs"),
	// 			Value: to.Ptr("standardFSv2Family"),
	// 		},
	// 		Limit: &armquota.LimitObject{
	// 			LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
	// 			Value: to.Ptr[int32](10),
	// 		},
	// 	},
	// }
}
Output:

Example (QuotasRequestPatchForNetwork)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/patchNetworkOneSkuQuotaRequest.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewClient().BeginUpdate(ctx, "MinPublicIpInterNetworkPrefixLength", "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus", armquota.CurrentQuotaLimitBase{
		Properties: &armquota.Properties{
			Name: &armquota.ResourceName{
				Value: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
			},
			Limit: &armquota.LimitObject{
				LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
				Value:           to.Ptr[int32](10),
			},
			ResourceType: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CurrentQuotaLimitBase = armquota.CurrentQuotaLimitBase{
	// 	Name: to.Ptr("2B5C8515-37D8-4B6A-879B-CD641A2CF605"),
	// 	Type: to.Ptr("Microsoft.Quota/quotas"),
	// 	ID: to.Ptr("/subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/quotaRequests/2B5C8515-37D8-4B6A-879B-CD641A2CF605"),
	// 	Properties: &armquota.Properties{
	// 		Name: &armquota.ResourceName{
	// 			Value: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
	// 		},
	// 		Limit: &armquota.LimitObject{
	// 			LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
	// 			Value: to.Ptr[int32](10),
	// 		},
	// 		ResourceType: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
	// 	},
	// }
}
Output:

func (*Client) Get added in v0.2.0

func (client *Client) Get(ctx context.Context, resourceName string, scope string, options *ClientGetOptions) (ClientGetResponse, error)

Get - Get the quota limit of a resource. The response can be used to determine the remaining quota to calculate a new quota limit that can be submitted with a PUT request. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • resourceName - Resource name for a given resource provider. For example:
  • SKU name for Microsoft.Compute
  • SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
  • scope - The target Azure resource URI. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/. This is the target Azure resource URI for the List GET operation. If a {resourceName} is added after /quotas, then it's the target Azure resource URI in the GET operation for the specific resource.
  • options - ClientGetOptions contains the optional parameters for the Client.Get method.
Example (QuotasGetRequestForCompute)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/getComputeOneSkuQuotaLimit.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().Get(ctx, "standardNDSFamily", "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CurrentQuotaLimitBase = armquota.CurrentQuotaLimitBase{
	// 	Name: to.Ptr("standardNDSFamily"),
	// 	Type: to.Ptr("Microsoft.Quota/Quotas"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Quotas/standardNDSFamily"),
	// 	Properties: &armquota.Properties{
	// 		Name: &armquota.ResourceName{
	// 			LocalizedValue: to.Ptr("Standard NDS Family vCPUs"),
	// 			Value: to.Ptr("standardNDSFamily"),
	// 		},
	// 		IsQuotaApplicable: to.Ptr(true),
	// 		Limit: &armquota.LimitObject{
	// 			LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
	// 			LimitType: to.Ptr(armquota.QuotaLimitTypesIndependent),
	// 			Value: to.Ptr[int32](100),
	// 		},
	// 		Unit: to.Ptr("Count"),
	// 	},
	// }
}
Output:

Example (QuotasUsagesRequestForNetwork)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/getNetworkOneSkuQuotaLimit.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewClient().Get(ctx, "MinPublicIpInterNetworkPrefixLength", "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CurrentQuotaLimitBase = armquota.CurrentQuotaLimitBase{
	// 	Name: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
	// 	Type: to.Ptr("Microsoft.Quota/Quotas"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/MinPublicIpInterNetworkPrefixLength"),
	// 	Properties: &armquota.Properties{
	// 		Name: &armquota.ResourceName{
	// 			LocalizedValue: to.Ptr("Min Public Ip InterNetwork Prefix Length"),
	// 			Value: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
	// 		},
	// 		IsQuotaApplicable: to.Ptr(true),
	// 		Limit: &armquota.LimitObject{
	// 			LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
	// 			Value: to.Ptr[int32](10),
	// 		},
	// 		ResourceType: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
	// 		Unit: to.Ptr("Count"),
	// 	},
	// }
}
Output:

func (*Client) NewListPager added in v0.4.0

func (client *Client) NewListPager(scope string, options *ClientListOptions) *runtime.Pager[ClientListResponse]

NewListPager - Get a list of current quota limits of all resources for the specified scope. The response from this GET operation can be leveraged to submit requests to update a quota.

Generated from API version 2025-03-01

  • scope - The target Azure resource URI. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/. This is the target Azure resource URI for the List GET operation. If a {resourceName} is added after /quotas, then it's the target Azure resource URI in the GET operation for the specific resource.
  • options - ClientListOptions contains the optional parameters for the Client.NewListPager method.
Example (QuotasListQuotaLimitsForCompute)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/getComputeQuotaLimits.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClient().NewListPager("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.Limits = armquota.Limits{
		// 	Value: []*armquota.CurrentQuotaLimitBase{
		// 		{
		// 			Name: to.Ptr("standardFSv2Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Quotas/standardFSv2Family"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard FSv2 Family vCPUs"),
		// 					Value: to.Ptr("standardFSv2Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardNDSFamily"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Quotas/standardNDSFamily"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard NDS Family vCPUs"),
		// 					Value: to.Ptr("standardNDSFamily"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardNCSv2Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Quotas/standardNCSv2Family"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard NCSv2 Family vCPUs"),
		// 					Value: to.Ptr("standardNCSv2Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardNCSv3Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Quotas/standardNCSv3Family"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard NCSv3 Family vCPUs"),
		// 					Value: to.Ptr("standardNCSv3Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardLSv2Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Quotas/standardLSv2Family"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard LSv2 Family vCPUs"),
		// 					Value: to.Ptr("standardLSv2Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardPBSFamily"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Quotas/standardPBSFamily"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard PBS Family vCPUs"),
		// 					Value: to.Ptr("standardPBSFamily"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardEIv3Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Quotas/standardEIv3Family"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard EIv3 Family vCPUs"),
		// 					Value: to.Ptr("standardEIv3Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardEISv3Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Quotas/standardEISv3Family"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard EISv3 Family vCPUs"),
		// 					Value: to.Ptr("standardEISv3Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardDCSFamily"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Quotas/standardDCSFamily"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard DCS Family vCPUs"),
		// 					Value: to.Ptr("standardDCSFamily"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardNVSv2Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Quotas/standardNVSv2Family"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard NVSv2 Family vCPUs"),
		// 					Value: to.Ptr("standardNVSv2Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardMSv2Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Quotas/standardMSv2Family"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard MSv2 Family vCPUs"),
		// 					Value: to.Ptr("standardMSv2Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("availabilitySets"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Quotas/availabilitySets"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Availability Sets"),
		// 					Value: to.Ptr("availabilitySets"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (QuotasListQuotaLimitsForNetwork)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/getNetworkQuotaLimits.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClient().NewListPager("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.Limits = armquota.Limits{
		// 	Value: []*armquota.CurrentQuotaLimitBase{
		// 		{
		// 			Name: to.Ptr("VirtualNetworks"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Virtual Networks"),
		// 					Value: to.Ptr("VirtualNetworks"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("StaticPublicIPAddresses"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Static Public IP Addresses"),
		// 					Value: to.Ptr("StaticPublicIPAddresses"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NetworkSecurityGroups"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Network Security Groups"),
		// 					Value: to.Ptr("NetworkSecurityGroups"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("PublicIPAddresses"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Public IP Addresses - Basic"),
		// 					Value: to.Ptr("PublicIPAddresses"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("PublicIpPrefixes"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Public Ip Prefixes"),
		// 					Value: to.Ptr("PublicIpPrefixes"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NatGateways"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Nat Gateways"),
		// 					Value: to.Ptr("NatGateways"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NetworkInterfaces"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Network Interfaces"),
		// 					Value: to.Ptr("NetworkInterfaces"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("PrivateEndpoints"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Private Endpoints"),
		// 					Value: to.Ptr("PrivateEndpoints"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("PrivateEndpointRedirectMaps"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Private Endpoint Redirect Maps"),
		// 					Value: to.Ptr("PrivateEndpointRedirectMaps"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("LoadBalancers"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Load Balancers"),
		// 					Value: to.Ptr("LoadBalancers"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("PrivateLinkServices"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Private Link Services"),
		// 					Value: to.Ptr("PrivateLinkServices"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("ApplicationGateways"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Application Gateways"),
		// 					Value: to.Ptr("ApplicationGateways"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("RouteTables"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Route Tables"),
		// 					Value: to.Ptr("RouteTables"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("RouteFilters"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Route Filters"),
		// 					Value: to.Ptr("RouteFilters"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NetworkWatchers"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Network Watchers"),
		// 					Value: to.Ptr("NetworkWatchers"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("PacketCaptures"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Packet Captures"),
		// 					Value: to.Ptr("PacketCaptures"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("ApplicationSecurityGroups"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Application Security Groups."),
		// 					Value: to.Ptr("ApplicationSecurityGroups"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("DdosProtectionPlans"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("DDoS Protection Plans."),
		// 					Value: to.Ptr("DdosProtectionPlans"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("DdosCustomPolicies"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("DDoS customized policies"),
		// 					Value: to.Ptr("DdosCustomPolicies"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("ServiceEndpointPolicies"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Service Endpoint Policies"),
		// 					Value: to.Ptr("ServiceEndpointPolicies"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NetworkIntentPolicies"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Network Intent Policies"),
		// 					Value: to.Ptr("NetworkIntentPolicies"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("StandardSkuLoadBalancers"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard Sku Load Balancers"),
		// 					Value: to.Ptr("StandardSkuLoadBalancers"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("StandardSkuPublicIpAddresses"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Public IP Addresses - Standard"),
		// 					Value: to.Ptr("StandardSkuPublicIpAddresses"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("DnsServersPerVirtualNetwork"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("DNS servers per Virtual Network"),
		// 					Value: to.Ptr("DnsServersPerVirtualNetwork"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("CustomDnsServersPerP2SVpnGateway"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Custom DNS servers per P2SVpnGateway"),
		// 					Value: to.Ptr("CustomDnsServersPerP2SVpnGateway"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("SubnetsPerVirtualNetwork"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Subnets per Virtual Network"),
		// 					Value: to.Ptr("SubnetsPerVirtualNetwork"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("IPConfigurationsPerVirtualNetwork"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("IP Configurations per Virtual Network"),
		// 					Value: to.Ptr("IPConfigurationsPerVirtualNetwork"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("PeeringsPerVirtualNetwork"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Peerings per Virtual Network"),
		// 					Value: to.Ptr("PeeringsPerVirtualNetwork"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("SecurityRulesPerNetworkSecurityGroup"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Security rules per Network Security Group"),
		// 					Value: to.Ptr("SecurityRulesPerNetworkSecurityGroup"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("SecurityRulesPerNetworkIntentPolicy"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Security rules per Network Intent Policy"),
		// 					Value: to.Ptr("SecurityRulesPerNetworkIntentPolicy"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("RoutesPerNetworkIntentPolicy"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Routes per Network Intent Policy"),
		// 					Value: to.Ptr("RoutesPerNetworkIntentPolicy"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("SecurityRuleAddressesOrPortsPerNetworkSecurityGroup"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Security rules addresses or ports per Network Security Group"),
		// 					Value: to.Ptr("SecurityRuleAddressesOrPortsPerNetworkSecurityGroup"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("InboundRulesPerLoadBalancer"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Inbound Rules per Load Balancer"),
		// 					Value: to.Ptr("InboundRulesPerLoadBalancer"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("FrontendIPConfigurationPerLoadBalancer"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Frontend IP Configurations per Load Balancer"),
		// 					Value: to.Ptr("FrontendIPConfigurationPerLoadBalancer"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("OutboundRulesPerLoadBalancer"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Outbound Rules per Load Balancer"),
		// 					Value: to.Ptr("OutboundRulesPerLoadBalancer"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("RoutesPerRouteTable"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Routes per Route Table"),
		// 					Value: to.Ptr("RoutesPerRouteTable"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("RoutesWithServiceTagPerRouteTable"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Routes with service tag per Route Table"),
		// 					Value: to.Ptr("RoutesWithServiceTagPerRouteTable"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/Quotas/"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Min Public Ip InterNetwork Prefix Length"),
		// 					Value: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				Properties: map[string]any{
		// 				},
		// 				ResourceType: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (QuotasListQuotaLimitsMachineLearningServices)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/getMachineLearningServicesQuotaLimits.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewClient().NewListPager("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/eastus", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.Limits = armquota.Limits{
		// 	Value: []*armquota.CurrentQuotaLimitBase{
		// 		{
		// 			Name: to.Ptr("standardDv2Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/eastus/providers/Microsoft.Quota/Quotas/standardDv2Family"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard Dv2 Family vCPUs"),
		// 					Value: to.Ptr("standardDv2Family"),
		// 				},
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				ResourceType: to.Ptr("dedicated"),
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("totalLowPriorityCores"),
		// 			Type: to.Ptr("Microsoft.Quota/Quotas"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/eastus/providers/Microsoft.Quota/Quotas/totalLowPriorityCores"),
		// 			Properties: &armquota.Properties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Total Regional Low-priority vCPUs"),
		// 					Value: to.Ptr("totalLowPriorityCores"),
		// 				},
		// 				Limit: &armquota.LimitObject{
		// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 				ResourceType: to.Ptr("lowPriority"),
		// 				Unit: to.Ptr("Count"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type ClientBeginCreateOrUpdateOptions added in v0.2.0

type ClientBeginCreateOrUpdateOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

ClientBeginCreateOrUpdateOptions contains the optional parameters for the Client.BeginCreateOrUpdate method.

type ClientBeginUpdateOptions added in v0.2.0

type ClientBeginUpdateOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

ClientBeginUpdateOptions contains the optional parameters for the Client.BeginUpdate method.

type ClientCreateOrUpdateResponse added in v0.2.0

type ClientCreateOrUpdateResponse struct {
	// Quota limit.
	CurrentQuotaLimitBase
}

ClientCreateOrUpdateResponse contains the response from method Client.BeginCreateOrUpdate.

type ClientFactory added in v0.6.0

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory added in v0.6.0

func NewClientFactory(credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewClient added in v0.6.0

func (c *ClientFactory) NewClient() *Client

NewClient creates a new instance of Client.

func (*ClientFactory) NewGroupQuotaLimitsClient added in v1.1.0

func (c *ClientFactory) NewGroupQuotaLimitsClient() *GroupQuotaLimitsClient

NewGroupQuotaLimitsClient creates a new instance of GroupQuotaLimitsClient.

func (*ClientFactory) NewGroupQuotaLimitsRequestClient added in v1.1.0

func (c *ClientFactory) NewGroupQuotaLimitsRequestClient() *GroupQuotaLimitsRequestClient

NewGroupQuotaLimitsRequestClient creates a new instance of GroupQuotaLimitsRequestClient.

func (*ClientFactory) NewGroupQuotaSubscriptionAllocationClient added in v1.1.0

func (c *ClientFactory) NewGroupQuotaSubscriptionAllocationClient(subscriptionID string) *GroupQuotaSubscriptionAllocationClient

NewGroupQuotaSubscriptionAllocationClient creates a new instance of GroupQuotaSubscriptionAllocationClient.

func (*ClientFactory) NewGroupQuotaSubscriptionAllocationRequestClient added in v1.1.0

func (c *ClientFactory) NewGroupQuotaSubscriptionAllocationRequestClient(subscriptionID string) *GroupQuotaSubscriptionAllocationRequestClient

NewGroupQuotaSubscriptionAllocationRequestClient creates a new instance of GroupQuotaSubscriptionAllocationRequestClient.

func (*ClientFactory) NewGroupQuotaSubscriptionRequestsClient added in v1.1.0

func (c *ClientFactory) NewGroupQuotaSubscriptionRequestsClient() *GroupQuotaSubscriptionRequestsClient

NewGroupQuotaSubscriptionRequestsClient creates a new instance of GroupQuotaSubscriptionRequestsClient.

func (*ClientFactory) NewGroupQuotaSubscriptionsClient added in v1.1.0

func (c *ClientFactory) NewGroupQuotaSubscriptionsClient(subscriptionID string) *GroupQuotaSubscriptionsClient

NewGroupQuotaSubscriptionsClient creates a new instance of GroupQuotaSubscriptionsClient.

func (*ClientFactory) NewGroupQuotasClient added in v1.1.0

func (c *ClientFactory) NewGroupQuotasClient() *GroupQuotasClient

NewGroupQuotasClient creates a new instance of GroupQuotasClient.

func (*ClientFactory) NewOperationClient added in v0.6.0

func (c *ClientFactory) NewOperationClient() *OperationClient

NewOperationClient creates a new instance of OperationClient.

func (*ClientFactory) NewRequestStatusClient added in v0.6.0

func (c *ClientFactory) NewRequestStatusClient() *RequestStatusClient

NewRequestStatusClient creates a new instance of RequestStatusClient.

func (*ClientFactory) NewUsagesClient added in v0.6.0

func (c *ClientFactory) NewUsagesClient() *UsagesClient

NewUsagesClient creates a new instance of UsagesClient.

type ClientGetOptions added in v0.2.0

type ClientGetOptions struct {
}

ClientGetOptions contains the optional parameters for the Client.Get method.

type ClientGetResponse added in v0.2.0

type ClientGetResponse struct {
	// Quota limit.
	CurrentQuotaLimitBase

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ClientGetResponse contains the response from method Client.Get.

type ClientListOptions added in v0.2.0

type ClientListOptions struct {
}

ClientListOptions contains the optional parameters for the Client.NewListPager method.

type ClientListResponse added in v0.2.0

type ClientListResponse struct {
	// Quota limits.
	Limits

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

ClientListResponse contains the response from method Client.NewListPager.

type ClientUpdateResponse added in v0.2.0

type ClientUpdateResponse struct {
	// Quota limit.
	CurrentQuotaLimitBase
}

ClientUpdateResponse contains the response from method Client.BeginUpdate.

type CommonResourceProperties

type CommonResourceProperties struct {
	// READ-ONLY; Resource ID
	ID *string

	// READ-ONLY; Resource name.
	Name *string

	// READ-ONLY; Resource type. Example: "Microsoft.Quota/quotas"
	Type *string
}

CommonResourceProperties - Resource properties.

func (CommonResourceProperties) MarshalJSON added in v0.6.0

func (c CommonResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CommonResourceProperties.

func (*CommonResourceProperties) UnmarshalJSON added in v0.6.0

func (c *CommonResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CommonResourceProperties.

type CreateGenericQuotaRequestParameters

type CreateGenericQuotaRequestParameters struct {
	// Quota change requests.
	Value []*CurrentQuotaLimitBase
}

CreateGenericQuotaRequestParameters - Quota change requests information.

func (CreateGenericQuotaRequestParameters) MarshalJSON

func (c CreateGenericQuotaRequestParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CreateGenericQuotaRequestParameters.

func (*CreateGenericQuotaRequestParameters) UnmarshalJSON added in v0.6.0

func (c *CreateGenericQuotaRequestParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CreateGenericQuotaRequestParameters.

type CreatedByType added in v1.1.0

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues added in v1.1.0

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type CurrentQuotaLimitBase

type CurrentQuotaLimitBase struct {
	// Quota properties for the specified resource, based on the API called, Quotas or Usages.
	Properties *Properties

	// READ-ONLY; The resource ID.
	ID *string

	// READ-ONLY; The resource name.
	Name *string

	// READ-ONLY; The resource type.
	Type *string
}

CurrentQuotaLimitBase - Quota limit.

func (CurrentQuotaLimitBase) MarshalJSON

func (c CurrentQuotaLimitBase) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CurrentQuotaLimitBase.

func (*CurrentQuotaLimitBase) UnmarshalJSON added in v0.6.0

func (c *CurrentQuotaLimitBase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CurrentQuotaLimitBase.

type CurrentUsagesBase

type CurrentUsagesBase struct {
	// Usage properties for the specified resource.
	Properties *UsagesProperties

	// READ-ONLY; The resource ID.
	ID *string

	// READ-ONLY; The resource name.
	Name *string

	// READ-ONLY; The resource type.
	Type *string
}

CurrentUsagesBase - Resource usage.

func (CurrentUsagesBase) MarshalJSON added in v0.6.0

func (c CurrentUsagesBase) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CurrentUsagesBase.

func (*CurrentUsagesBase) UnmarshalJSON added in v0.6.0

func (c *CurrentUsagesBase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CurrentUsagesBase.

type ErrorAdditionalInfo added in v1.1.0

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON added in v1.1.0

func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON added in v1.1.0

func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetail added in v1.1.0

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorDetail

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON added in v1.1.0

func (e ErrorDetail) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON added in v1.1.0

func (e *ErrorDetail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type ErrorResponse added in v1.1.0

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail
}

ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

func (ErrorResponse) MarshalJSON added in v1.1.0

func (e ErrorResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v1.1.0

func (e *ErrorResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

type ExceptionResponse

type ExceptionResponse struct {
	// API error details.
	Error *ServiceError
}

ExceptionResponse - Error.

func (ExceptionResponse) MarshalJSON added in v0.6.0

func (e ExceptionResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExceptionResponse.

func (*ExceptionResponse) UnmarshalJSON added in v0.6.0

func (e *ExceptionResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExceptionResponse.

type GroupQuotaDetails added in v1.1.0

type GroupQuotaDetails struct {
	// Any comment related to quota request.
	Comment *string

	// The current Group Quota Limit at the parentId level.
	Limit *int64

	// The resource name, such as SKU name.
	ResourceName *string

	// READ-ONLY; Quota allocated to subscriptions
	AllocatedToSubscriptions *AllocatedQuotaToSubscriptionList

	// READ-ONLY; The available Group Quota Limit at the MG level. This Group quota can be allocated to subscription(s).
	AvailableLimit *int64

	// READ-ONLY; Name of the resource provided by the resource provider. This property is already included in the request URI,
	// so it is a readonly property returned in the response.
	Name *GroupQuotaDetailsName

	// READ-ONLY; The usages units, such as Count and Bytes. When requesting quota, use the unit value returned in the GET response
	// in the request body of your PUT operation.
	Unit *string
}

GroupQuotaDetails - Group Quota details.

func (GroupQuotaDetails) MarshalJSON added in v1.1.0

func (g GroupQuotaDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaDetails.

func (*GroupQuotaDetails) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaDetails.

type GroupQuotaDetailsName added in v1.1.0

type GroupQuotaDetailsName struct {
	// READ-ONLY; Resource display name.
	LocalizedValue *string

	// READ-ONLY; Resource name.
	Value *string
}

GroupQuotaDetailsName - Name of the resource provided by the resource provider. This property is already included in the request URI, so it is a readonly property returned in the response.

func (GroupQuotaDetailsName) MarshalJSON added in v1.1.0

func (g GroupQuotaDetailsName) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaDetailsName.

func (*GroupQuotaDetailsName) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaDetailsName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaDetailsName.

type GroupQuotaLimit added in v1.1.0

type GroupQuotaLimit struct {
	// Group Quota properties for the specified resource.
	Properties *GroupQuotaLimitProperties
}

GroupQuotaLimit - Group Quota limit.

func (GroupQuotaLimit) MarshalJSON added in v1.1.0

func (g GroupQuotaLimit) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaLimit.

func (*GroupQuotaLimit) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaLimit) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaLimit.

type GroupQuotaLimitList added in v1.1.0

type GroupQuotaLimitList struct {
	Properties *GroupQuotaLimitListProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

GroupQuotaLimitList - List of Group Quota Limit details.

func (GroupQuotaLimitList) MarshalJSON added in v1.1.0

func (g GroupQuotaLimitList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaLimitList.

func (*GroupQuotaLimitList) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaLimitList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaLimitList.

type GroupQuotaLimitListProperties added in v1.1.0

type GroupQuotaLimitListProperties struct {
	// List of Group Quota Limit details.
	Value []*GroupQuotaLimit

	// READ-ONLY; The URL to use for getting the next set of results.
	NextLink *string

	// READ-ONLY; Request status.
	ProvisioningState *RequestState
}

func (GroupQuotaLimitListProperties) MarshalJSON added in v1.1.0

func (g GroupQuotaLimitListProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaLimitListProperties.

func (*GroupQuotaLimitListProperties) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaLimitListProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaLimitListProperties.

type GroupQuotaLimitProperties added in v1.1.0

type GroupQuotaLimitProperties struct {
	// Any comment related to quota request.
	Comment *string

	// The current Group Quota Limit at the parentId level.
	Limit *int64

	// The resource name, such as SKU name.
	ResourceName *string

	// READ-ONLY; Quota allocated to subscriptions
	AllocatedToSubscriptions *AllocatedQuotaToSubscriptionList

	// READ-ONLY; The available Group Quota Limit at the MG level. This Group quota can be allocated to subscription(s).
	AvailableLimit *int64

	// READ-ONLY; Name of the resource provided by the resource provider. This property is already included in the request URI,
	// so it is a readonly property returned in the response.
	Name *GroupQuotaDetailsName

	// READ-ONLY; The usages units, such as Count and Bytes. When requesting quota, use the unit value returned in the GET response
	// in the request body of your PUT operation.
	Unit *string
}

GroupQuotaLimitProperties - Group Quota properties for the specified resource.

func (GroupQuotaLimitProperties) MarshalJSON added in v1.1.0

func (g GroupQuotaLimitProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaLimitProperties.

func (*GroupQuotaLimitProperties) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaLimitProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaLimitProperties.

type GroupQuotaLimitsClient added in v1.1.0

type GroupQuotaLimitsClient struct {
	// contains filtered or unexported fields
}

GroupQuotaLimitsClient contains the methods for the GroupQuotaLimits group. Don't use this type directly, use NewGroupQuotaLimitsClient() instead.

func NewGroupQuotaLimitsClient added in v1.1.0

func NewGroupQuotaLimitsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupQuotaLimitsClient, error)

NewGroupQuotaLimitsClient creates a new instance of GroupQuotaLimitsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*GroupQuotaLimitsClient) List added in v1.1.0

func (client *GroupQuotaLimitsClient) List(ctx context.Context, managementGroupID string, groupQuotaName string, resourceProviderName string, location string, options *GroupQuotaLimitsClientListOptions) (GroupQuotaLimitsClientListResponse, error)

List - Gets the GroupQuotaLimits for the specified resource provider and location for resource names passed in $filter=resourceName eq {SKU}. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • resourceProviderName - The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API.
  • location - The name of the Azure region.
  • options - GroupQuotaLimitsClientListOptions contains the optional parameters for the GroupQuotaLimitsClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotaLimits/ListGroupQuotaLimits-Compute.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGroupQuotaLimitsClient().List(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", "Microsoft.Compute", "westus", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GroupQuotaLimitList = armquota.GroupQuotaLimitList{
	// 	Name: to.Ptr("westus"),
	// 	Type: to.Ptr("Microsoft.Quota/groupQuotas/groupQuotaLimits"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1/resourceProviders/Microsoft.Compute/groupQuotaLimits/westus"),
	// 	Properties: &armquota.GroupQuotaLimitListProperties{
	// 		ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
	// 		Value: []*armquota.GroupQuotaLimit{
	// 			{
	// 				Properties: &armquota.GroupQuotaLimitProperties{
	// 					Name: &armquota.GroupQuotaDetailsName{
	// 						LocalizedValue: to.Ptr("standard DDv4 Family vCPUs"),
	// 						Value: to.Ptr("standardddv4family"),
	// 					},
	// 					AllocatedToSubscriptions: &armquota.AllocatedQuotaToSubscriptionList{
	// 						Value: []*armquota.AllocatedToSubscription{
	// 							{
	// 								QuotaAllocated: to.Ptr[int64](20),
	// 								SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 							},
	// 							{
	// 								QuotaAllocated: to.Ptr[int64](30),
	// 								SubscriptionID: to.Ptr("A000000-0000-0000-0000-000000000000"),
	// 						}},
	// 					},
	// 					AvailableLimit: to.Ptr[int64](50),
	// 					Limit: to.Ptr[int64](100),
	// 					ResourceName: to.Ptr("standardddv4family"),
	// 					Unit: to.Ptr("count"),
	// 				},
	// 			},
	// 			{
	// 				Properties: &armquota.GroupQuotaLimitProperties{
	// 					Name: &armquota.GroupQuotaDetailsName{
	// 						LocalizedValue: to.Ptr("Standard AV2 Family vCPUs"),
	// 						Value: to.Ptr("standardav2family"),
	// 					},
	// 					AllocatedToSubscriptions: &armquota.AllocatedQuotaToSubscriptionList{
	// 						Value: []*armquota.AllocatedToSubscription{
	// 							{
	// 								QuotaAllocated: to.Ptr[int64](20),
	// 								SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 						}},
	// 					},
	// 					AvailableLimit: to.Ptr[int64](80),
	// 					Limit: to.Ptr[int64](100),
	// 					ResourceName: to.Ptr("standardav2family"),
	// 					Unit: to.Ptr("count"),
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

type GroupQuotaLimitsClientListOptions added in v1.1.0

type GroupQuotaLimitsClientListOptions struct {
}

GroupQuotaLimitsClientListOptions contains the optional parameters for the GroupQuotaLimitsClient.List method.

type GroupQuotaLimitsClientListResponse added in v1.1.0

type GroupQuotaLimitsClientListResponse struct {
	// List of Group Quota Limit details.
	GroupQuotaLimitList
}

GroupQuotaLimitsClientListResponse contains the response from method GroupQuotaLimitsClient.List.

type GroupQuotaLimitsRequestClient added in v1.1.0

type GroupQuotaLimitsRequestClient struct {
	// contains filtered or unexported fields
}

GroupQuotaLimitsRequestClient contains the methods for the GroupQuotaLimitsRequest group. Don't use this type directly, use NewGroupQuotaLimitsRequestClient() instead.

func NewGroupQuotaLimitsRequestClient added in v1.1.0

func NewGroupQuotaLimitsRequestClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupQuotaLimitsRequestClient, error)

NewGroupQuotaLimitsRequestClient creates a new instance of GroupQuotaLimitsRequestClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*GroupQuotaLimitsRequestClient) BeginUpdate added in v1.1.0

func (client *GroupQuotaLimitsRequestClient) BeginUpdate(ctx context.Context, managementGroupID string, groupQuotaName string, resourceProviderName string, location string, options *GroupQuotaLimitsRequestClientBeginUpdateOptions) (*runtime.Poller[GroupQuotaLimitsRequestClientUpdateResponse], error)

BeginUpdate - Create the GroupQuota requests for a specific ResourceProvider/Location/Resource. The resourceName properties are specified in the request body. Only 1 resource quota can be requested. Please note that patch request creates a new groupQuota request. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • resourceProviderName - The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API.
  • location - The name of the Azure region.
  • options - GroupQuotaLimitsRequestClientBeginUpdateOptions contains the optional parameters for the GroupQuotaLimitsRequestClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotaLimitsRequests/PatchGroupQuotaLimitsRequests-Compute.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGroupQuotaLimitsRequestClient().BeginUpdate(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", "Microsoft.Compute", "westus", &armquota.GroupQuotaLimitsRequestClientBeginUpdateOptions{GroupQuotaRequest: &armquota.GroupQuotaLimitList{
		Properties: &armquota.GroupQuotaLimitListProperties{
			Value: []*armquota.GroupQuotaLimit{
				{
					Properties: &armquota.GroupQuotaLimitProperties{
						Comment:      to.Ptr("Contoso requires more quota."),
						Limit:        to.Ptr[int64](110),
						ResourceName: to.Ptr("standardddv4family"),
					},
				},
				{
					Properties: &armquota.GroupQuotaLimitProperties{
						Comment:      to.Ptr("Contoso requires more quota."),
						Limit:        to.Ptr[int64](110),
						ResourceName: to.Ptr("standardav2family"),
					},
				}},
		},
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GroupQuotaLimitList = armquota.GroupQuotaLimitList{
	// 	Name: to.Ptr("westus"),
	// 	Type: to.Ptr("Microsoft.Quota/groupQuotas/groupQuotaLimits"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1/resourceProviders/Microsoft.Compute/groupQuotaLimits/westus"),
	// 	Properties: &armquota.GroupQuotaLimitListProperties{
	// 		ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
	// 		Value: []*armquota.GroupQuotaLimit{
	// 			{
	// 				Properties: &armquota.GroupQuotaLimitProperties{
	// 					Name: &armquota.GroupQuotaDetailsName{
	// 						LocalizedValue: to.Ptr("standard DDv4 Family vCPUs"),
	// 						Value: to.Ptr("standardddv4family"),
	// 					},
	// 					AllocatedToSubscriptions: &armquota.AllocatedQuotaToSubscriptionList{
	// 						Value: []*armquota.AllocatedToSubscription{
	// 							{
	// 								QuotaAllocated: to.Ptr[int64](20),
	// 								SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 							},
	// 							{
	// 								QuotaAllocated: to.Ptr[int64](30),
	// 								SubscriptionID: to.Ptr("A000000-0000-0000-0000-000000000000"),
	// 						}},
	// 					},
	// 					AvailableLimit: to.Ptr[int64](50),
	// 					Limit: to.Ptr[int64](100),
	// 					ResourceName: to.Ptr("standardddv4family"),
	// 					Unit: to.Ptr("count"),
	// 				},
	// 			},
	// 			{
	// 				Properties: &armquota.GroupQuotaLimitProperties{
	// 					Name: &armquota.GroupQuotaDetailsName{
	// 						LocalizedValue: to.Ptr("Standard AV2 Family vCPUs"),
	// 						Value: to.Ptr("standardav2family"),
	// 					},
	// 					AllocatedToSubscriptions: &armquota.AllocatedQuotaToSubscriptionList{
	// 						Value: []*armquota.AllocatedToSubscription{
	// 							{
	// 								QuotaAllocated: to.Ptr[int64](20),
	// 								SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 						}},
	// 					},
	// 					AvailableLimit: to.Ptr[int64](80),
	// 					Limit: to.Ptr[int64](100),
	// 					ResourceName: to.Ptr("standardav2family"),
	// 					Unit: to.Ptr("count"),
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

func (*GroupQuotaLimitsRequestClient) Get added in v1.1.0

Get - Get API to check the status of a GroupQuota request by requestId. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • requestID - Request Id.
  • options - GroupQuotaLimitsRequestClientGetOptions contains the optional parameters for the GroupQuotaLimitsRequestClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotaLimitsRequests/GroupQuotaLimitsRequests_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGroupQuotaLimitsRequestClient().Get(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", "requestId", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SubmittedResourceRequestStatus = armquota.SubmittedResourceRequestStatus{
	// 	Name: to.Ptr("requestId"),
	// 	Type: to.Ptr("Microsoft.Quota/groupQuotas/groupQuotaLimitsRequests"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1/resourceProviders/Microsoft.Compute/groupQuotaLimitsRequests/requestId"),
	// 	Properties: &armquota.SubmittedResourceRequestStatusProperties{
	// 		FaultCode: to.Ptr("ResourceNotAvailableForOffer"),
	// 		ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
	// 		RequestSubmitTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-03-20T05:29:34.144Z"); return t}()),
	// 		RequestedResource: &armquota.GroupQuotaRequestBase{
	// 			Properties: &armquota.GroupQuotaRequestBaseProperties{
	// 				Name: &armquota.GroupQuotaRequestBasePropertiesName{
	// 					LocalizedValue: to.Ptr("standard DDv4 Family vCPUs"),
	// 					Value: to.Ptr("standardddv4family"),
	// 				},
	// 				Comments: to.Ptr(""),
	// 				Limit: to.Ptr[int64](100),
	// 				Region: to.Ptr("westus"),
	// 			},
	// 		},
	// 	},
	// }
}
Output:

func (*GroupQuotaLimitsRequestClient) NewListPager added in v1.1.0

func (client *GroupQuotaLimitsRequestClient) NewListPager(managementGroupID string, groupQuotaName string, resourceProviderName string, filter string, options *GroupQuotaLimitsRequestClientListOptions) *runtime.Pager[GroupQuotaLimitsRequestClientListResponse]

NewListPager - Get API to check the status of a GroupQuota request by requestId.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • resourceProviderName - The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API.
  • filter - FIELD SUPPORTED OPERATORS location eq {location} and resource eq {resourceName} Example: $filter=location eq eastus and resourceName eq cores
  • options - GroupQuotaLimitsRequestClientListOptions contains the optional parameters for the GroupQuotaLimitsRequestClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotaLimitsRequests/GroupQuotaLimitsRequests_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGroupQuotaLimitsRequestClient().NewListPager("E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", "Microsoft.Compute", "location eq westus", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SubmittedResourceRequestStatusList = armquota.SubmittedResourceRequestStatusList{
		// 	Value: []*armquota.SubmittedResourceRequestStatus{
		// 		{
		// 			Name: to.Ptr("requestId1"),
		// 			Type: to.Ptr("Microsoft.Quota/groupQuotas/groupQuotaLimitsRequests"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1/resourceProviders/Microsoft.Compute/groupQuotaLimitsRequests/requestId1"),
		// 			Properties: &armquota.SubmittedResourceRequestStatusProperties{
		// 				FaultCode: to.Ptr("ResourceNotAvailableForOffer"),
		// 				ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
		// 				RequestSubmitTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-18T00:12:34.004Z"); return t}()),
		// 				RequestedResource: &armquota.GroupQuotaRequestBase{
		// 					Properties: &armquota.GroupQuotaRequestBaseProperties{
		// 						Name: &armquota.GroupQuotaRequestBasePropertiesName{
		// 							LocalizedValue: to.Ptr("standard DDv4 Family vCPUs"),
		// 							Value: to.Ptr("standardddv4family"),
		// 						},
		// 						Comments: to.Ptr("Contoso requires more quota."),
		// 						Limit: to.Ptr[int64](100),
		// 						Region: to.Ptr("westus"),
		// 					},
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("requestId2"),
		// 			Type: to.Ptr("Microsoft.Quota/groupQuotas/groupQuotaLimitsRequests"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1/resourceProviders/Microsoft.Compute/groupQuotaLimitsRequests/requestId2"),
		// 			Properties: &armquota.SubmittedResourceRequestStatusProperties{
		// 				FaultCode: to.Ptr(""),
		// 				ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
		// 				RequestSubmitTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-17T00:57:43.410Z"); return t}()),
		// 				RequestedResource: &armquota.GroupQuotaRequestBase{
		// 					Properties: &armquota.GroupQuotaRequestBaseProperties{
		// 						Name: &armquota.GroupQuotaRequestBasePropertiesName{
		// 							LocalizedValue: to.Ptr("standardav2family"),
		// 							Value: to.Ptr("standardav2family"),
		// 						},
		// 						Comments: to.Ptr("Contoso requires more quota."),
		// 						Limit: to.Ptr[int64](150),
		// 						Region: to.Ptr("westus"),
		// 					},
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type GroupQuotaLimitsRequestClientBeginUpdateOptions added in v1.1.0

type GroupQuotaLimitsRequestClientBeginUpdateOptions struct {
	// The GroupQuotaRequest body details for specific resourceProvider/location/resources.
	GroupQuotaRequest *GroupQuotaLimitList

	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

GroupQuotaLimitsRequestClientBeginUpdateOptions contains the optional parameters for the GroupQuotaLimitsRequestClient.BeginUpdate method.

type GroupQuotaLimitsRequestClientGetOptions added in v1.1.0

type GroupQuotaLimitsRequestClientGetOptions struct {
}

GroupQuotaLimitsRequestClientGetOptions contains the optional parameters for the GroupQuotaLimitsRequestClient.Get method.

type GroupQuotaLimitsRequestClientGetResponse added in v1.1.0

type GroupQuotaLimitsRequestClientGetResponse struct {
	// Status of a single GroupQuota request.
	SubmittedResourceRequestStatus
}

GroupQuotaLimitsRequestClientGetResponse contains the response from method GroupQuotaLimitsRequestClient.Get.

type GroupQuotaLimitsRequestClientListOptions added in v1.1.0

type GroupQuotaLimitsRequestClientListOptions struct {
}

GroupQuotaLimitsRequestClientListOptions contains the optional parameters for the GroupQuotaLimitsRequestClient.NewListPager method.

type GroupQuotaLimitsRequestClientListResponse added in v1.1.0

type GroupQuotaLimitsRequestClientListResponse struct {
	// Share Quota Entity list.
	SubmittedResourceRequestStatusList
}

GroupQuotaLimitsRequestClientListResponse contains the response from method GroupQuotaLimitsRequestClient.NewListPager.

type GroupQuotaLimitsRequestClientUpdateResponse added in v1.1.0

type GroupQuotaLimitsRequestClientUpdateResponse struct {
	// List of Group Quota Limit details.
	GroupQuotaLimitList
}

GroupQuotaLimitsRequestClientUpdateResponse contains the response from method GroupQuotaLimitsRequestClient.BeginUpdate.

type GroupQuotaList added in v1.1.0

type GroupQuotaList struct {
	// List of Group Quotas at MG level.
	Value []*GroupQuotasEntity

	// READ-ONLY; The URL to use for getting the next set of results.
	NextLink *string
}

GroupQuotaList - List of Group Quotas at MG level.

func (GroupQuotaList) MarshalJSON added in v1.1.0

func (g GroupQuotaList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaList.

func (*GroupQuotaList) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaList.

type GroupQuotaRequestBase added in v1.1.0

type GroupQuotaRequestBase struct {
	Properties *GroupQuotaRequestBaseProperties
}

GroupQuotaRequestBase - The new GroupQuota limit requested.

func (GroupQuotaRequestBase) MarshalJSON added in v1.1.0

func (g GroupQuotaRequestBase) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaRequestBase.

func (*GroupQuotaRequestBase) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaRequestBase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaRequestBase.

type GroupQuotaRequestBaseProperties added in v1.1.0

type GroupQuotaRequestBaseProperties struct {
	// GroupQuota Request comments and details for request. This is optional paramter to provide more details related to the requested
	// resource.
	Comments *string

	// The new quota limit for the subscription. The incremental quota will be allocated from pre-approved group quota.
	Limit *int64

	// Location/Azure region for the quota requested for resource.
	Region *string

	// READ-ONLY; Name of the resource provided by the resource provider. This property is already included in the request URI,
	// so it is a readonly property returned in the response.
	Name *GroupQuotaRequestBasePropertiesName
}

func (GroupQuotaRequestBaseProperties) MarshalJSON added in v1.1.0

func (g GroupQuotaRequestBaseProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaRequestBaseProperties.

func (*GroupQuotaRequestBaseProperties) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaRequestBaseProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaRequestBaseProperties.

type GroupQuotaRequestBasePropertiesName added in v1.1.0

type GroupQuotaRequestBasePropertiesName struct {
	// READ-ONLY; Resource display name.
	LocalizedValue *string

	// READ-ONLY; Resource name.
	Value *string
}

GroupQuotaRequestBasePropertiesName - Name of the resource provided by the resource provider. This property is already included in the request URI, so it is a readonly property returned in the response.

func (GroupQuotaRequestBasePropertiesName) MarshalJSON added in v1.1.0

func (g GroupQuotaRequestBasePropertiesName) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaRequestBasePropertiesName.

func (*GroupQuotaRequestBasePropertiesName) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaRequestBasePropertiesName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaRequestBasePropertiesName.

type GroupQuotaSubscriptionAllocationClient added in v1.1.0

type GroupQuotaSubscriptionAllocationClient struct {
	// contains filtered or unexported fields
}

GroupQuotaSubscriptionAllocationClient contains the methods for the GroupQuotaSubscriptionAllocation group. Don't use this type directly, use NewGroupQuotaSubscriptionAllocationClient() instead.

func NewGroupQuotaSubscriptionAllocationClient added in v1.1.0

func NewGroupQuotaSubscriptionAllocationClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupQuotaSubscriptionAllocationClient, error)

NewGroupQuotaSubscriptionAllocationClient creates a new instance of GroupQuotaSubscriptionAllocationClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*GroupQuotaSubscriptionAllocationClient) List added in v1.1.0

List - Gets all the quota allocated to a subscription for the specified resource provider and location for resource names passed in $filter=resourceName eq {SKU}. This will include the GroupQuota and total quota allocated to the subscription. Only the Group quota allocated to the subscription can be allocated back to the MG Group Quota. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • resourceProviderName - The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API.
  • location - The name of the Azure region.
  • options - GroupQuotaSubscriptionAllocationClientListOptions contains the optional parameters for the GroupQuotaSubscriptionAllocationClient.List method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/SubscriptionQuotaAllocation/SubscriptionQuotaAllocation_List-Compute.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGroupQuotaSubscriptionAllocationClient("<subscription-id>").List(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", "Microsoft.Compute", "westus", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SubscriptionQuotaAllocationsList = armquota.SubscriptionQuotaAllocationsList{
	// 	Name: to.Ptr("westus"),
	// 	Type: to.Ptr("Microsoft.Quota/groupQuotas/quotaAllocations"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Quota/groupQuotas/groupquota1/resourceProviders/Microsoft.Compute/quotaAllocations/westus"),
	// 	Properties: &armquota.SubscriptionQuotaAllocationsListProperties{
	// 		ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
	// 		Value: []*armquota.SubscriptionQuotaAllocations{
	// 			{
	// 				Properties: &armquota.SubscriptionQuotaAllocationsProperties{
	// 					Name: &armquota.SubscriptionQuotaDetailsName{
	// 						LocalizedValue: to.Ptr("standard DDv4 Family vCPUs"),
	// 						Value: to.Ptr("standardddv4family"),
	// 					},
	// 					Limit: to.Ptr[int64](25),
	// 					ResourceName: to.Ptr("standardddv4family"),
	// 					ShareableQuota: to.Ptr[int64](15),
	// 				},
	// 			},
	// 			{
	// 				Properties: &armquota.SubscriptionQuotaAllocationsProperties{
	// 					Name: &armquota.SubscriptionQuotaDetailsName{
	// 						LocalizedValue: to.Ptr("standard Av2 Family vCPUs"),
	// 						Value: to.Ptr("standardav2family"),
	// 					},
	// 					Limit: to.Ptr[int64](30),
	// 					ResourceName: to.Ptr("standardav2family"),
	// 					ShareableQuota: to.Ptr[int64](0),
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

type GroupQuotaSubscriptionAllocationClientListOptions added in v1.1.0

type GroupQuotaSubscriptionAllocationClientListOptions struct {
}

GroupQuotaSubscriptionAllocationClientListOptions contains the optional parameters for the GroupQuotaSubscriptionAllocationClient.List method.

type GroupQuotaSubscriptionAllocationClientListResponse added in v1.1.0

type GroupQuotaSubscriptionAllocationClientListResponse struct {
	// Subscription quota list.
	SubscriptionQuotaAllocationsList
}

GroupQuotaSubscriptionAllocationClientListResponse contains the response from method GroupQuotaSubscriptionAllocationClient.List.

type GroupQuotaSubscriptionAllocationRequestClient added in v1.1.0

type GroupQuotaSubscriptionAllocationRequestClient struct {
	// contains filtered or unexported fields
}

GroupQuotaSubscriptionAllocationRequestClient contains the methods for the GroupQuotaSubscriptionAllocationRequest group. Don't use this type directly, use NewGroupQuotaSubscriptionAllocationRequestClient() instead.

func NewGroupQuotaSubscriptionAllocationRequestClient added in v1.1.0

func NewGroupQuotaSubscriptionAllocationRequestClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupQuotaSubscriptionAllocationRequestClient, error)

NewGroupQuotaSubscriptionAllocationRequestClient creates a new instance of GroupQuotaSubscriptionAllocationRequestClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*GroupQuotaSubscriptionAllocationRequestClient) BeginUpdate added in v1.1.0

BeginUpdate - Request to assign quota from group quota to a specific Subscription. The assign GroupQuota to subscriptions or reduce the quota allocated to subscription to give back the unused quota ( quota >= usages) to the groupQuota. So, this API can be used to assign Quota to subscriptions and assign back unused quota to group quota, which can be assigned to another subscriptions in the GroupQuota. User can collect unused quotas from multiple subscriptions within the groupQuota and assign the groupQuota to the subscription, where it's needed. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • resourceProviderName - The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API.
  • location - The name of the Azure region.
  • allocateQuotaRequest - Quota requests payload.
  • options - GroupQuotaSubscriptionAllocationRequestClientBeginUpdateOptions contains the optional parameters for the GroupQuotaSubscriptionAllocationRequestClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/SubscriptionQuotaAllocationRequests/PatchSubscriptionQuotaAllocationRequest-Compute.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGroupQuotaSubscriptionAllocationRequestClient("<subscription-id>").BeginUpdate(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", "Microsoft.Compute", "westus", armquota.SubscriptionQuotaAllocationsList{
		Properties: &armquota.SubscriptionQuotaAllocationsListProperties{
			Value: []*armquota.SubscriptionQuotaAllocations{
				{
					Properties: &armquota.SubscriptionQuotaAllocationsProperties{
						Limit:        to.Ptr[int64](110),
						ResourceName: to.Ptr("standardddv4family"),
					},
				},
				{
					Properties: &armquota.SubscriptionQuotaAllocationsProperties{
						Limit:        to.Ptr[int64](110),
						ResourceName: to.Ptr("standardav2family"),
					},
				}},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.SubscriptionQuotaAllocationsList = armquota.SubscriptionQuotaAllocationsList{
	// 	Name: to.Ptr("westus"),
	// 	Type: to.Ptr("Microsoft.Quota/groupQuotas/quotaAllocations"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Quota/groupQuotas/groupquota1/resourceProviders/Microsoft.Compute/quotaAllocations/westus"),
	// 	Properties: &armquota.SubscriptionQuotaAllocationsListProperties{
	// 		ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
	// 		Value: []*armquota.SubscriptionQuotaAllocations{
	// 			{
	// 				Properties: &armquota.SubscriptionQuotaAllocationsProperties{
	// 					Name: &armquota.SubscriptionQuotaDetailsName{
	// 						LocalizedValue: to.Ptr("standard DDv4 Family vCPUs"),
	// 						Value: to.Ptr("standardddv4family"),
	// 					},
	// 					Limit: to.Ptr[int64](25),
	// 					ResourceName: to.Ptr("standardddv4family"),
	// 					ShareableQuota: to.Ptr[int64](15),
	// 				},
	// 			},
	// 			{
	// 				Properties: &armquota.SubscriptionQuotaAllocationsProperties{
	// 					Name: &armquota.SubscriptionQuotaDetailsName{
	// 						LocalizedValue: to.Ptr("standard Av2 Family vCPUs"),
	// 						Value: to.Ptr("standardav2family"),
	// 					},
	// 					Limit: to.Ptr[int64](30),
	// 					ResourceName: to.Ptr("standardav2family"),
	// 					ShareableQuota: to.Ptr[int64](0),
	// 				},
	// 		}},
	// 	},
	// }
}
Output:

func (*GroupQuotaSubscriptionAllocationRequestClient) Get added in v1.1.0

Get - Get the quota allocation request status for the subscriptionId by allocationId. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • resourceProviderName - The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API.
  • allocationID - Request Id.
  • options - GroupQuotaSubscriptionAllocationRequestClientGetOptions contains the optional parameters for the GroupQuotaSubscriptionAllocationRequestClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/SubscriptionQuotaAllocationRequests/SubscriptionQuotaAllocationRequests_Get-Compute.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGroupQuotaSubscriptionAllocationRequestClient("<subscription-id>").Get(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", "Microsoft.Compute", "AE000000-0000-0000-0000-00000000000A", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.AllocationRequestStatus = armquota.AllocationRequestStatus{
	// 	Name: to.Ptr("AE000000-0000-0000-0000-00000000000A"),
	// 	Type: to.Ptr("Microsoft.Quota/groupQuotas/quotaAllocationRequests"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Quota/groupQuotas/groupquota1/quotaAllocationRequests/AE000000-0000-0000-0000-00000000000A"),
	// 	Properties: &armquota.AllocationRequestStatusProperties{
	// 		FaultCode: to.Ptr("ContactSupport"),
	// 		ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
	// 		RequestSubmitTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-17T01:06:02.191Z"); return t}()),
	// 		RequestedResource: &armquota.AllocationRequestBase{
	// 			Properties: &armquota.AllocationRequestBaseProperties{
	// 				Name: &armquota.AllocationRequestBasePropertiesName{
	// 					LocalizedValue: to.Ptr("standard Av2 Family vCPUs"),
	// 					Value: to.Ptr("standardav2family"),
	// 				},
	// 				Limit: to.Ptr[int64](75),
	// 				Region: to.Ptr("westus"),
	// 			},
	// 		},
	// 	},
	// }
}
Output:

func (*GroupQuotaSubscriptionAllocationRequestClient) NewListPager added in v1.1.0

NewListPager - Get all the quotaAllocationRequests for a resourceProvider/location. The filter paramter for location is required.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • resourceProviderName - The resource provider name, such as - Microsoft.Compute. Currently only Microsoft.Compute resource provider supports this API.
  • filter - FIELD SUPPORTED OPERATORS location eq {location} Example: $filter=location eq eastus
  • options - GroupQuotaSubscriptionAllocationRequestClientListOptions contains the optional parameters for the GroupQuotaSubscriptionAllocationRequestClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/SubscriptionQuotaAllocationRequests/SubscriptionQuotaAllocationRequests_List-Compute.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGroupQuotaSubscriptionAllocationRequestClient("<subscription-id>").NewListPager("E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", "Microsoft.Compute", "location eq westus", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.AllocationRequestStatusList = armquota.AllocationRequestStatusList{
		// 	Value: []*armquota.AllocationRequestStatus{
		// 		{
		// 			Name: to.Ptr("AE000000-0000-0000-0000-00000000000A"),
		// 			Type: to.Ptr("Microsoft.Quota/groupQuotas/quotaAllocationRequests"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Quota/groupQuotas/groupquota1/resourceProviders/Microsoft.Compute/quotaAllocationRequests/AE000000-0000-0000-0000-00000000000A"),
		// 			Properties: &armquota.AllocationRequestStatusProperties{
		// 				FaultCode: to.Ptr("ContactSupport"),
		// 				ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
		// 				RequestSubmitTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-03-20T06:18:59.913Z"); return t}()),
		// 				RequestedResource: &armquota.AllocationRequestBase{
		// 					Properties: &armquota.AllocationRequestBaseProperties{
		// 						Name: &armquota.AllocationRequestBasePropertiesName{
		// 							LocalizedValue: to.Ptr("standard Av2 Family vCPUs"),
		// 							Value: to.Ptr("standardav2family"),
		// 						},
		// 						Limit: to.Ptr[int64](75),
		// 						Region: to.Ptr("westus"),
		// 					},
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type GroupQuotaSubscriptionAllocationRequestClientBeginUpdateOptions added in v1.1.0

type GroupQuotaSubscriptionAllocationRequestClientBeginUpdateOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

GroupQuotaSubscriptionAllocationRequestClientBeginUpdateOptions contains the optional parameters for the GroupQuotaSubscriptionAllocationRequestClient.BeginUpdate method.

type GroupQuotaSubscriptionAllocationRequestClientGetOptions added in v1.1.0

type GroupQuotaSubscriptionAllocationRequestClientGetOptions struct {
}

GroupQuotaSubscriptionAllocationRequestClientGetOptions contains the optional parameters for the GroupQuotaSubscriptionAllocationRequestClient.Get method.

type GroupQuotaSubscriptionAllocationRequestClientGetResponse added in v1.1.0

type GroupQuotaSubscriptionAllocationRequestClientGetResponse struct {
	// The subscription quota allocation status.
	AllocationRequestStatus
}

GroupQuotaSubscriptionAllocationRequestClientGetResponse contains the response from method GroupQuotaSubscriptionAllocationRequestClient.Get.

type GroupQuotaSubscriptionAllocationRequestClientListOptions added in v1.1.0

type GroupQuotaSubscriptionAllocationRequestClientListOptions struct {
}

GroupQuotaSubscriptionAllocationRequestClientListOptions contains the optional parameters for the GroupQuotaSubscriptionAllocationRequestClient.NewListPager method.

type GroupQuotaSubscriptionAllocationRequestClientListResponse added in v1.1.0

type GroupQuotaSubscriptionAllocationRequestClientListResponse struct {
	// List of QuotaAllocation Request Status
	AllocationRequestStatusList
}

GroupQuotaSubscriptionAllocationRequestClientListResponse contains the response from method GroupQuotaSubscriptionAllocationRequestClient.NewListPager.

type GroupQuotaSubscriptionAllocationRequestClientUpdateResponse added in v1.1.0

type GroupQuotaSubscriptionAllocationRequestClientUpdateResponse struct {
	// Subscription quota list.
	SubscriptionQuotaAllocationsList
}

GroupQuotaSubscriptionAllocationRequestClientUpdateResponse contains the response from method GroupQuotaSubscriptionAllocationRequestClient.BeginUpdate.

type GroupQuotaSubscriptionID added in v1.1.0

type GroupQuotaSubscriptionID struct {
	Properties *GroupQuotaSubscriptionIDProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

GroupQuotaSubscriptionID - This represents a Azure subscriptionId that is associated with a GroupQuotasEntity.

func (GroupQuotaSubscriptionID) MarshalJSON added in v1.1.0

func (g GroupQuotaSubscriptionID) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaSubscriptionID.

func (*GroupQuotaSubscriptionID) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaSubscriptionID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaSubscriptionID.

type GroupQuotaSubscriptionIDList added in v1.1.0

type GroupQuotaSubscriptionIDList struct {
	// List of GroupQuotaSubscriptionIds
	Value []*GroupQuotaSubscriptionID

	// READ-ONLY; The URL to use for getting the next set of results.
	NextLink *string
}

GroupQuotaSubscriptionIDList - List of GroupQuotaSubscriptionIds

func (GroupQuotaSubscriptionIDList) MarshalJSON added in v1.1.0

func (g GroupQuotaSubscriptionIDList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaSubscriptionIDList.

func (*GroupQuotaSubscriptionIDList) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaSubscriptionIDList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaSubscriptionIDList.

type GroupQuotaSubscriptionIDProperties added in v1.1.0

type GroupQuotaSubscriptionIDProperties struct {
	// An Azure subscriptionId.
	SubscriptionID *string

	// READ-ONLY; Status of this subscriptionId being associated with the GroupQuotasEntity.
	ProvisioningState *RequestState
}

func (GroupQuotaSubscriptionIDProperties) MarshalJSON added in v1.1.0

func (g GroupQuotaSubscriptionIDProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaSubscriptionIDProperties.

func (*GroupQuotaSubscriptionIDProperties) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaSubscriptionIDProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaSubscriptionIDProperties.

type GroupQuotaSubscriptionRequestStatus added in v1.1.0

type GroupQuotaSubscriptionRequestStatus struct {
	Properties *GroupQuotaSubscriptionRequestStatusProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

GroupQuotaSubscriptionRequestStatus - The new quota limit request status.

func (GroupQuotaSubscriptionRequestStatus) MarshalJSON added in v1.1.0

func (g GroupQuotaSubscriptionRequestStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaSubscriptionRequestStatus.

func (*GroupQuotaSubscriptionRequestStatus) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaSubscriptionRequestStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaSubscriptionRequestStatus.

type GroupQuotaSubscriptionRequestStatusList added in v1.1.0

type GroupQuotaSubscriptionRequestStatusList struct {
	// List of GroupQuotaSubscriptionRequests Status
	Value []*GroupQuotaSubscriptionRequestStatus

	// READ-ONLY; The URL to use for getting the next set of results.
	NextLink *string
}

GroupQuotaSubscriptionRequestStatusList - List of GroupQuotaSubscriptionRequests Status

func (GroupQuotaSubscriptionRequestStatusList) MarshalJSON added in v1.1.0

func (g GroupQuotaSubscriptionRequestStatusList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaSubscriptionRequestStatusList.

func (*GroupQuotaSubscriptionRequestStatusList) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaSubscriptionRequestStatusList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaSubscriptionRequestStatusList.

type GroupQuotaSubscriptionRequestStatusProperties added in v1.1.0

type GroupQuotaSubscriptionRequestStatusProperties struct {
	// The request submission time. The date conforms to the following format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ
	RequestSubmitTime *time.Time

	// The subscription Id
	SubscriptionID *string

	// READ-ONLY; Status of this subscriptionId being associated with the GroupQuotasEntity.
	ProvisioningState *RequestState
}

func (GroupQuotaSubscriptionRequestStatusProperties) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type GroupQuotaSubscriptionRequestStatusProperties.

func (*GroupQuotaSubscriptionRequestStatusProperties) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaSubscriptionRequestStatusProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaSubscriptionRequestStatusProperties.

type GroupQuotaSubscriptionRequestsClient added in v1.1.0

type GroupQuotaSubscriptionRequestsClient struct {
	// contains filtered or unexported fields
}

GroupQuotaSubscriptionRequestsClient contains the methods for the GroupQuotaSubscriptionRequests group. Don't use this type directly, use NewGroupQuotaSubscriptionRequestsClient() instead.

func NewGroupQuotaSubscriptionRequestsClient added in v1.1.0

func NewGroupQuotaSubscriptionRequestsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupQuotaSubscriptionRequestsClient, error)

NewGroupQuotaSubscriptionRequestsClient creates a new instance of GroupQuotaSubscriptionRequestsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*GroupQuotaSubscriptionRequestsClient) Get added in v1.1.0

Get - Get API to check the status of a subscriptionIds request by requestId. Use the polling API - OperationsStatus URI specified in Azure-AsyncOperation header field, with retry-after duration in seconds to check the intermediate status. This API provides the finals status with the request details and status. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • requestID - Request Id.
  • options - GroupQuotaSubscriptionRequestsClientGetOptions contains the optional parameters for the GroupQuotaSubscriptionRequestsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/SubscriptionRequests/SubscriptionRequests_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGroupQuotaSubscriptionRequestsClient().Get(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", "00000000-0000-0000-0000-000000000000", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GroupQuotaSubscriptionRequestStatus = armquota.GroupQuotaSubscriptionRequestStatus{
	// 	Name: to.Ptr("11111111-1111-1111-1111-111111111111"),
	// 	Type: to.Ptr("Microsoft.Quota/groupQuotas/SubscriptionRequest"),
	// 	ID: to.Ptr("/subscriptions/11111111-1111-1111-1111-111111111111"),
	// 	Properties: &armquota.GroupQuotaSubscriptionRequestStatusProperties{
	// 		ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
	// 		RequestSubmitTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-17T00:56:45.009Z"); return t}()),
	// 		SubscriptionID: to.Ptr("11111111-1111-1111-1111-111111111111"),
	// 	},
	// }
}
Output:

func (*GroupQuotaSubscriptionRequestsClient) NewListPager added in v1.1.0

NewListPager - List API to check the status of a subscriptionId requests by requestId. Request history is maintained for 1 year.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • options - GroupQuotaSubscriptionRequestsClientListOptions contains the optional parameters for the GroupQuotaSubscriptionRequestsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/SubscriptionRequests/SubscriptionRequests_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGroupQuotaSubscriptionRequestsClient().NewListPager("E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GroupQuotaSubscriptionRequestStatusList = armquota.GroupQuotaSubscriptionRequestStatusList{
		// 	Value: []*armquota.GroupQuotaSubscriptionRequestStatus{
		// 		{
		// 			Name: to.Ptr("11111111-1111-1111-1111-111111111111"),
		// 			Type: to.Ptr("Microsoft.Quota/groupQuotas/SubscriptionRequest"),
		// 			ID: to.Ptr("/subscriptions/11111111-1111-1111-1111-111111111111"),
		// 			Properties: &armquota.GroupQuotaSubscriptionRequestStatusProperties{
		// 				ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
		// 				RequestSubmitTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-17T00:56:45.009Z"); return t}()),
		// 				SubscriptionID: to.Ptr("11111111-1111-1111-1111-111111111111"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type GroupQuotaSubscriptionRequestsClientGetOptions added in v1.1.0

type GroupQuotaSubscriptionRequestsClientGetOptions struct {
}

GroupQuotaSubscriptionRequestsClientGetOptions contains the optional parameters for the GroupQuotaSubscriptionRequestsClient.Get method.

type GroupQuotaSubscriptionRequestsClientGetResponse added in v1.1.0

type GroupQuotaSubscriptionRequestsClientGetResponse struct {
	// The new quota limit request status.
	GroupQuotaSubscriptionRequestStatus
}

GroupQuotaSubscriptionRequestsClientGetResponse contains the response from method GroupQuotaSubscriptionRequestsClient.Get.

type GroupQuotaSubscriptionRequestsClientListOptions added in v1.1.0

type GroupQuotaSubscriptionRequestsClientListOptions struct {
}

GroupQuotaSubscriptionRequestsClientListOptions contains the optional parameters for the GroupQuotaSubscriptionRequestsClient.NewListPager method.

type GroupQuotaSubscriptionRequestsClientListResponse added in v1.1.0

type GroupQuotaSubscriptionRequestsClientListResponse struct {
	// List of GroupQuotaSubscriptionRequests Status
	GroupQuotaSubscriptionRequestStatusList
}

GroupQuotaSubscriptionRequestsClientListResponse contains the response from method GroupQuotaSubscriptionRequestsClient.NewListPager.

type GroupQuotaSubscriptionsClient added in v1.1.0

type GroupQuotaSubscriptionsClient struct {
	// contains filtered or unexported fields
}

GroupQuotaSubscriptionsClient contains the methods for the GroupQuotaSubscriptions group. Don't use this type directly, use NewGroupQuotaSubscriptionsClient() instead.

func NewGroupQuotaSubscriptionsClient added in v1.1.0

func NewGroupQuotaSubscriptionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupQuotaSubscriptionsClient, error)

NewGroupQuotaSubscriptionsClient creates a new instance of GroupQuotaSubscriptionsClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*GroupQuotaSubscriptionsClient) BeginCreateOrUpdate added in v1.1.0

BeginCreateOrUpdate - Adds a subscription to GroupQuotas. The subscriptions will be validated based on the additionalAttributes defined in the GroupQuota. The additionalAttributes works as filter for the subscriptions, which can be included in the GroupQuotas. The request's TenantId is validated against the subscription's TenantId. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • options - GroupQuotaSubscriptionsClientBeginCreateOrUpdateOptions contains the optional parameters for the GroupQuotaSubscriptionsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotasSubscriptions/PutGroupQuotasSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGroupQuotaSubscriptionsClient("<subscription-id>").BeginCreateOrUpdate(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GroupQuotaSubscriptionID = armquota.GroupQuotaSubscriptionID{
	// 	Name: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Type: to.Ptr("Microsoft.Quota/groupQuotas/subscriptions"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1/subscriptions/00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armquota.GroupQuotaSubscriptionIDProperties{
	// 		ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
	// 		SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	},
	// }
}
Output:

func (*GroupQuotaSubscriptionsClient) BeginDelete added in v1.1.0

BeginDelete - Removes the subscription from GroupQuotas. The request's TenantId is validated against the subscription's TenantId. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • options - GroupQuotaSubscriptionsClientBeginDeleteOptions contains the optional parameters for the GroupQuotaSubscriptionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotasSubscriptions/DeleteGroupQuotaSubscriptions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGroupQuotaSubscriptionsClient("<subscription-id>").BeginDelete(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*GroupQuotaSubscriptionsClient) BeginUpdate added in v1.1.0

BeginUpdate - Updates the GroupQuotas with the subscription to add to the subscriptions list. The subscriptions will be validated if additionalAttributes are defined in the GroupQuota. The request's TenantId is validated against the subscription's TenantId. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • options - GroupQuotaSubscriptionsClientBeginUpdateOptions contains the optional parameters for the GroupQuotaSubscriptionsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotasSubscriptions/PatchGroupQuotasSubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGroupQuotaSubscriptionsClient("<subscription-id>").BeginUpdate(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GroupQuotaSubscriptionID = armquota.GroupQuotaSubscriptionID{
	// 	Name: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Type: to.Ptr("Microsoft.Quota/groupQuotas/subscriptions"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1/subscriptions/00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armquota.GroupQuotaSubscriptionIDProperties{
	// 		ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
	// 		SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	},
	// }
}
Output:

func (*GroupQuotaSubscriptionsClient) Get added in v1.1.0

Get - Returns the subscriptionIds along with its provisioning state for being associated with the GroupQuota. If the subscription is not a member of GroupQuota, it will return 404, else 200. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • options - GroupQuotaSubscriptionsClientGetOptions contains the optional parameters for the GroupQuotaSubscriptionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotasSubscriptions/GetGroupQuotaSubscriptions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGroupQuotaSubscriptionsClient("<subscription-id>").Get(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GroupQuotaSubscriptionID = armquota.GroupQuotaSubscriptionID{
	// 	Name: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Type: to.Ptr("Microsoft.Quota/groupQuotas/subscriptions"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1/subscriptions/00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armquota.GroupQuotaSubscriptionIDProperties{
	// 		ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
	// 		SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	},
	// }
}
Output:

func (*GroupQuotaSubscriptionsClient) NewListPager added in v1.1.0

NewListPager - Returns a list of the subscriptionIds associated with the GroupQuotas.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • options - GroupQuotaSubscriptionsClientListOptions contains the optional parameters for the GroupQuotaSubscriptionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotasSubscriptions/ListGroupQuotaSubscriptions.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGroupQuotaSubscriptionsClient("<subscription-id>").NewListPager("E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GroupQuotaSubscriptionIDList = armquota.GroupQuotaSubscriptionIDList{
		// 	Value: []*armquota.GroupQuotaSubscriptionID{
		// 		{
		// 			Name: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Type: to.Ptr("Microsoft.Quota/groupQuotas/subscriptions"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1/subscriptions/00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armquota.GroupQuotaSubscriptionIDProperties{
		// 				ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
		// 				SubscriptionID: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("11111111-1111-1111-1111-111111111111"),
		// 			Type: to.Ptr("Microsoft.Quota/groupQuotas/subscriptions"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1/subscriptions/11111111-1111-1111-1111-111111111111"),
		// 			Properties: &armquota.GroupQuotaSubscriptionIDProperties{
		// 				ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
		// 				SubscriptionID: to.Ptr("11111111-1111-1111-1111-111111111111"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type GroupQuotaSubscriptionsClientBeginCreateOrUpdateOptions added in v1.1.0

type GroupQuotaSubscriptionsClientBeginCreateOrUpdateOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

GroupQuotaSubscriptionsClientBeginCreateOrUpdateOptions contains the optional parameters for the GroupQuotaSubscriptionsClient.BeginCreateOrUpdate method.

type GroupQuotaSubscriptionsClientBeginDeleteOptions added in v1.1.0

type GroupQuotaSubscriptionsClientBeginDeleteOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

GroupQuotaSubscriptionsClientBeginDeleteOptions contains the optional parameters for the GroupQuotaSubscriptionsClient.BeginDelete method.

type GroupQuotaSubscriptionsClientBeginUpdateOptions added in v1.1.0

type GroupQuotaSubscriptionsClientBeginUpdateOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

GroupQuotaSubscriptionsClientBeginUpdateOptions contains the optional parameters for the GroupQuotaSubscriptionsClient.BeginUpdate method.

type GroupQuotaSubscriptionsClientCreateOrUpdateResponse added in v1.1.0

type GroupQuotaSubscriptionsClientCreateOrUpdateResponse struct {
	// This represents a Azure subscriptionId that is associated with a GroupQuotasEntity.
	GroupQuotaSubscriptionID
}

GroupQuotaSubscriptionsClientCreateOrUpdateResponse contains the response from method GroupQuotaSubscriptionsClient.BeginCreateOrUpdate.

type GroupQuotaSubscriptionsClientDeleteResponse added in v1.1.0

type GroupQuotaSubscriptionsClientDeleteResponse struct {
}

GroupQuotaSubscriptionsClientDeleteResponse contains the response from method GroupQuotaSubscriptionsClient.BeginDelete.

type GroupQuotaSubscriptionsClientGetOptions added in v1.1.0

type GroupQuotaSubscriptionsClientGetOptions struct {
}

GroupQuotaSubscriptionsClientGetOptions contains the optional parameters for the GroupQuotaSubscriptionsClient.Get method.

type GroupQuotaSubscriptionsClientGetResponse added in v1.1.0

type GroupQuotaSubscriptionsClientGetResponse struct {
	// This represents a Azure subscriptionId that is associated with a GroupQuotasEntity.
	GroupQuotaSubscriptionID
}

GroupQuotaSubscriptionsClientGetResponse contains the response from method GroupQuotaSubscriptionsClient.Get.

type GroupQuotaSubscriptionsClientListOptions added in v1.1.0

type GroupQuotaSubscriptionsClientListOptions struct {
}

GroupQuotaSubscriptionsClientListOptions contains the optional parameters for the GroupQuotaSubscriptionsClient.NewListPager method.

type GroupQuotaSubscriptionsClientListResponse added in v1.1.0

type GroupQuotaSubscriptionsClientListResponse struct {
	// List of GroupQuotaSubscriptionIds
	GroupQuotaSubscriptionIDList
}

GroupQuotaSubscriptionsClientListResponse contains the response from method GroupQuotaSubscriptionsClient.NewListPager.

type GroupQuotaSubscriptionsClientUpdateResponse added in v1.1.0

type GroupQuotaSubscriptionsClientUpdateResponse struct {
	// This represents a Azure subscriptionId that is associated with a GroupQuotasEntity.
	GroupQuotaSubscriptionID
}

GroupQuotaSubscriptionsClientUpdateResponse contains the response from method GroupQuotaSubscriptionsClient.BeginUpdate.

type GroupQuotaUsagesBase added in v1.1.0

type GroupQuotaUsagesBase struct {
	// Quota/limits for the resource.
	Limit *int64

	// Name of the resource provided by the resource provider. This property is already included in the request URI, so it is
	// a readonly property returned in the response.
	Name *GroupQuotaUsagesBaseName

	// Usages for the resource.
	Usages *int64

	// READ-ONLY; Representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, Percent, CountPerSecond,
	// BytesPerSecond. Based on -
	// https://armwiki.azurewebsites.net/api_contracts/UsagesAPIContract.html?q=usages . Different RPs may have different units,
	// Count, type as int64 should work for most of the integer values.
	Unit *string
}

GroupQuotaUsagesBase - Resource details with usages and GroupQuota.

func (GroupQuotaUsagesBase) MarshalJSON added in v1.1.0

func (g GroupQuotaUsagesBase) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaUsagesBase.

func (*GroupQuotaUsagesBase) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaUsagesBase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaUsagesBase.

type GroupQuotaUsagesBaseName added in v1.1.0

type GroupQuotaUsagesBaseName struct {
	// Resource name.
	Value *string

	// READ-ONLY; Resource display name.
	LocalizedValue *string
}

GroupQuotaUsagesBaseName - Name of the resource provided by the resource provider. This property is already included in the request URI, so it is a readonly property returned in the response.

func (GroupQuotaUsagesBaseName) MarshalJSON added in v1.1.0

func (g GroupQuotaUsagesBaseName) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotaUsagesBaseName.

func (*GroupQuotaUsagesBaseName) UnmarshalJSON added in v1.1.0

func (g *GroupQuotaUsagesBaseName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotaUsagesBaseName.

type GroupQuotasClient added in v1.1.0

type GroupQuotasClient struct {
	// contains filtered or unexported fields
}

GroupQuotasClient contains the methods for the GroupQuotas group. Don't use this type directly, use NewGroupQuotasClient() instead.

func NewGroupQuotasClient added in v1.1.0

func NewGroupQuotasClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*GroupQuotasClient, error)

NewGroupQuotasClient creates a new instance of GroupQuotasClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*GroupQuotasClient) BeginCreateOrUpdate added in v1.1.0

func (client *GroupQuotasClient) BeginCreateOrUpdate(ctx context.Context, managementGroupID string, groupQuotaName string, options *GroupQuotasClientBeginCreateOrUpdateOptions) (*runtime.Poller[GroupQuotasClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates a new GroupQuota for the name passed. A RequestId will be returned by the Service. The status can be polled periodically. The status Async polling is using standards defined at - https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#asynchronous-operations. Use the OperationsStatus URI provided in Azure-AsyncOperation header, the duration will be specified in retry-after header. Once the operation gets to terminal state - Succeeded | Failed, then the URI will change to Get URI and full details can be checked. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • options - GroupQuotasClientBeginCreateOrUpdateOptions contains the optional parameters for the GroupQuotasClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotas/PutGroupQuotas.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGroupQuotasClient().BeginCreateOrUpdate(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", &armquota.GroupQuotasClientBeginCreateOrUpdateOptions{GroupQuotaPutRequestBody: &armquota.GroupQuotasEntity{
		Properties: &armquota.GroupQuotasEntityProperties{
			DisplayName: to.Ptr("GroupQuota1"),
		},
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GroupQuotasEntity = armquota.GroupQuotasEntity{
	// 	Name: to.Ptr("groupquota1"),
	// 	Type: to.Ptr("Microsoft.Quota/groupQuotas"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1"),
	// 	Properties: &armquota.GroupQuotasEntityProperties{
	// 		DisplayName: to.Ptr("GroupQuota1"),
	// 		ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
	// 	},
	// }
}
Output:

func (*GroupQuotasClient) BeginDelete added in v1.1.0

func (client *GroupQuotasClient) BeginDelete(ctx context.Context, managementGroupID string, groupQuotaName string, options *GroupQuotasClientBeginDeleteOptions) (*runtime.Poller[GroupQuotasClientDeleteResponse], error)

BeginDelete - Deletes the GroupQuotas for the name passed. All the remaining shareQuota in the GroupQuotas will be lost. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • options - GroupQuotasClientBeginDeleteOptions contains the optional parameters for the GroupQuotasClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotas/DeleteGroupQuotas.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGroupQuotasClient().BeginDelete(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}
Output:

func (*GroupQuotasClient) BeginUpdate added in v1.1.0

func (client *GroupQuotasClient) BeginUpdate(ctx context.Context, managementGroupID string, groupQuotaName string, options *GroupQuotasClientBeginUpdateOptions) (*runtime.Poller[GroupQuotasClientUpdateResponse], error)

BeginUpdate - Updates the GroupQuotas for the name passed. A GroupQuotas RequestId will be returned by the Service. The status can be polled periodically. The status Async polling is using standards defined at - https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#asynchronous-operations. Use the OperationsStatus URI provided in Azure-AsyncOperation header, the duration will be specified in retry-after header. Once the operation gets to terminal state - Succeeded | Failed, then the URI will change to Get URI and full details can be checked. Any change in the filters will be applicable to the future quota assignments, existing quota allocated to subscriptions from the GroupQuotas remains unchanged. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • options - GroupQuotasClientBeginUpdateOptions contains the optional parameters for the GroupQuotasClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotas/PatchGroupQuotas.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewGroupQuotasClient().BeginUpdate(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", &armquota.GroupQuotasClientBeginUpdateOptions{GroupQuotasPatchRequestBody: &armquota.GroupQuotasEntityPatch{
		Properties: &armquota.GroupQuotasEntityPatchProperties{
			DisplayName: to.Ptr("UpdatedGroupQuota1"),
		},
	},
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GroupQuotasEntity = armquota.GroupQuotasEntity{
	// 	Name: to.Ptr("groupquota1"),
	// 	Type: to.Ptr("Microsoft.Quota/groupQuotas"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1"),
	// 	Properties: &armquota.GroupQuotasEntityProperties{
	// 		DisplayName: to.Ptr("UpdatedGroupQuota1"),
	// 		ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
	// 	},
	// }
}
Output:

func (*GroupQuotasClient) Get added in v1.1.0

func (client *GroupQuotasClient) Get(ctx context.Context, managementGroupID string, groupQuotaName string, options *GroupQuotasClientGetOptions) (GroupQuotasClientGetResponse, error)

Get - Gets the GroupQuotas for the name passed. It will return the GroupQuotas properties only. The details on group quota can be access from the group quota APIs. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • groupQuotaName - The GroupQuota name. The name should be unique for the provided context tenantId/MgId.
  • options - GroupQuotasClientGetOptions contains the optional parameters for the GroupQuotasClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotas/GetGroupQuotas.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewGroupQuotasClient().Get(ctx, "E7EC67B3-7657-4966-BFFC-41EFD36BAA09", "groupquota1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.GroupQuotasEntity = armquota.GroupQuotasEntity{
	// 	Name: to.Ptr("groupquota1"),
	// 	Type: to.Ptr("Microsoft.Quota/groupQuotas"),
	// 	ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1"),
	// 	Properties: &armquota.GroupQuotasEntityProperties{
	// 		DisplayName: to.Ptr("GroupQuota1"),
	// 		ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
	// 	},
	// }
}
Output:

func (*GroupQuotasClient) NewListPager added in v1.1.0

func (client *GroupQuotasClient) NewListPager(managementGroupID string, options *GroupQuotasClientListOptions) *runtime.Pager[GroupQuotasClientListResponse]

NewListPager - Lists GroupQuotas for the scope passed. It will return the GroupQuotas QuotaEntity properties only.The details on group quota can be access from the group quota APIs.

Generated from API version 2025-03-01

  • managementGroupID - Management Group Id.
  • options - GroupQuotasClientListOptions contains the optional parameters for the GroupQuotasClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GroupQuotas/GetGroupQuotasList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewGroupQuotasClient().NewListPager("E7EC67B3-7657-4966-BFFC-41EFD36BAA09", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.GroupQuotaList = armquota.GroupQuotaList{
		// 	Value: []*armquota.GroupQuotasEntity{
		// 		{
		// 			Name: to.Ptr("groupquota1"),
		// 			Type: to.Ptr("Microsoft.Quota/groupQuotas"),
		// 			ID: to.Ptr("/providers/Microsoft.Management/managementGroups/E7EC67B3-7657-4966-BFFC-41EFD36BAA09/providers/Microsoft.Quota/groupQuotas/groupquota1"),
		// 			Properties: &armquota.GroupQuotasEntityProperties{
		// 				DisplayName: to.Ptr("GroupQuota1"),
		// 				ProvisioningState: to.Ptr(armquota.RequestStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}
Output:

type GroupQuotasClientBeginCreateOrUpdateOptions added in v1.1.0

type GroupQuotasClientBeginCreateOrUpdateOptions struct {
	// The GroupQuota body details for creation or update of a GroupQuota entity.
	GroupQuotaPutRequestBody *GroupQuotasEntity

	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

GroupQuotasClientBeginCreateOrUpdateOptions contains the optional parameters for the GroupQuotasClient.BeginCreateOrUpdate method.

type GroupQuotasClientBeginDeleteOptions added in v1.1.0

type GroupQuotasClientBeginDeleteOptions struct {
	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

GroupQuotasClientBeginDeleteOptions contains the optional parameters for the GroupQuotasClient.BeginDelete method.

type GroupQuotasClientBeginUpdateOptions added in v1.1.0

type GroupQuotasClientBeginUpdateOptions struct {
	// The GroupQuotas Patch Request.
	GroupQuotasPatchRequestBody *GroupQuotasEntityPatch

	// Resumes the long-running operation from the provided token.
	ResumeToken string
}

GroupQuotasClientBeginUpdateOptions contains the optional parameters for the GroupQuotasClient.BeginUpdate method.

type GroupQuotasClientCreateOrUpdateResponse added in v1.1.0

type GroupQuotasClientCreateOrUpdateResponse struct {
	// Properties and filters for ShareQuota. The request parameter is optional, if there are no filters specified.
	GroupQuotasEntity
}

GroupQuotasClientCreateOrUpdateResponse contains the response from method GroupQuotasClient.BeginCreateOrUpdate.

type GroupQuotasClientDeleteResponse added in v1.1.0

type GroupQuotasClientDeleteResponse struct {
}

GroupQuotasClientDeleteResponse contains the response from method GroupQuotasClient.BeginDelete.

type GroupQuotasClientGetOptions added in v1.1.0

type GroupQuotasClientGetOptions struct {
}

GroupQuotasClientGetOptions contains the optional parameters for the GroupQuotasClient.Get method.

type GroupQuotasClientGetResponse added in v1.1.0

type GroupQuotasClientGetResponse struct {
	// Properties and filters for ShareQuota. The request parameter is optional, if there are no filters specified.
	GroupQuotasEntity
}

GroupQuotasClientGetResponse contains the response from method GroupQuotasClient.Get.

type GroupQuotasClientListOptions added in v1.1.0

type GroupQuotasClientListOptions struct {
}

GroupQuotasClientListOptions contains the optional parameters for the GroupQuotasClient.NewListPager method.

type GroupQuotasClientListResponse added in v1.1.0

type GroupQuotasClientListResponse struct {
	// List of Group Quotas at MG level.
	GroupQuotaList
}

GroupQuotasClientListResponse contains the response from method GroupQuotasClient.NewListPager.

type GroupQuotasClientUpdateResponse added in v1.1.0

type GroupQuotasClientUpdateResponse struct {
	// Properties and filters for ShareQuota. The request parameter is optional, if there are no filters specified.
	GroupQuotasEntity
}

GroupQuotasClientUpdateResponse contains the response from method GroupQuotasClient.BeginUpdate.

type GroupQuotasEntity added in v1.1.0

type GroupQuotasEntity struct {
	// Properties
	Properties *GroupQuotasEntityProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

GroupQuotasEntity - Properties and filters for ShareQuota. The request parameter is optional, if there are no filters specified.

func (GroupQuotasEntity) MarshalJSON added in v1.1.0

func (g GroupQuotasEntity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotasEntity.

func (*GroupQuotasEntity) UnmarshalJSON added in v1.1.0

func (g *GroupQuotasEntity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotasEntity.

type GroupQuotasEntityBase added in v1.1.0

type GroupQuotasEntityBase struct {
	// Display name of the GroupQuota entity.
	DisplayName *string

	// READ-ONLY; Provisioning state of the operation.
	ProvisioningState *RequestState
}

GroupQuotasEntityBase - Properties and filters for ShareQuota. The request parameter is optional, if there are no filters specified.

func (GroupQuotasEntityBase) MarshalJSON added in v1.1.0

func (g GroupQuotasEntityBase) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotasEntityBase.

func (*GroupQuotasEntityBase) UnmarshalJSON added in v1.1.0

func (g *GroupQuotasEntityBase) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotasEntityBase.

type GroupQuotasEntityBasePatch added in v1.1.0

type GroupQuotasEntityBasePatch struct {
	// Display name of the GroupQuota entity.
	DisplayName *string

	// READ-ONLY; Provisioning state of the operation.
	ProvisioningState *RequestState
}

GroupQuotasEntityBasePatch - Properties and filters for ShareQuota. The request parameter is optional, if there are no filters specified.

func (GroupQuotasEntityBasePatch) MarshalJSON added in v1.1.0

func (g GroupQuotasEntityBasePatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotasEntityBasePatch.

func (*GroupQuotasEntityBasePatch) UnmarshalJSON added in v1.1.0

func (g *GroupQuotasEntityBasePatch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotasEntityBasePatch.

type GroupQuotasEntityPatch added in v1.1.0

type GroupQuotasEntityPatch struct {
	// Properties
	Properties *GroupQuotasEntityPatchProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

GroupQuotasEntityPatch - Properties and filters for ShareQuota. The request parameter is optional, if there are no filters specified.

func (GroupQuotasEntityPatch) MarshalJSON added in v1.1.0

func (g GroupQuotasEntityPatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotasEntityPatch.

func (*GroupQuotasEntityPatch) UnmarshalJSON added in v1.1.0

func (g *GroupQuotasEntityPatch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotasEntityPatch.

type GroupQuotasEntityPatchProperties added in v1.1.0

type GroupQuotasEntityPatchProperties struct {
	// Display name of the GroupQuota entity.
	DisplayName *string

	// READ-ONLY; Provisioning state of the operation.
	ProvisioningState *RequestState
}

GroupQuotasEntityPatchProperties - Properties

func (GroupQuotasEntityPatchProperties) MarshalJSON added in v1.1.0

func (g GroupQuotasEntityPatchProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotasEntityPatchProperties.

func (*GroupQuotasEntityPatchProperties) UnmarshalJSON added in v1.1.0

func (g *GroupQuotasEntityPatchProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotasEntityPatchProperties.

type GroupQuotasEntityProperties added in v1.1.0

type GroupQuotasEntityProperties struct {
	// Display name of the GroupQuota entity.
	DisplayName *string

	// READ-ONLY; Provisioning state of the operation.
	ProvisioningState *RequestState
}

GroupQuotasEntityProperties - Properties

func (GroupQuotasEntityProperties) MarshalJSON added in v1.1.0

func (g GroupQuotasEntityProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type GroupQuotasEntityProperties.

func (*GroupQuotasEntityProperties) UnmarshalJSON added in v1.1.0

func (g *GroupQuotasEntityProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type GroupQuotasEntityProperties.

type LROResponse added in v1.1.0

type LROResponse struct {
	Properties *LROResponseProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

LROResponse - The provisioning state for the operation.

func (LROResponse) MarshalJSON added in v1.1.0

func (l LROResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LROResponse.

func (*LROResponse) UnmarshalJSON added in v1.1.0

func (l *LROResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LROResponse.

type LROResponseProperties added in v1.1.0

type LROResponseProperties struct {
	// READ-ONLY; Request status.
	ProvisioningState *RequestState
}

func (LROResponseProperties) MarshalJSON added in v1.1.0

func (l LROResponseProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LROResponseProperties.

func (*LROResponseProperties) UnmarshalJSON added in v1.1.0

func (l *LROResponseProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LROResponseProperties.

type LimitJSONObject

type LimitJSONObject struct {
	// REQUIRED; The limit object type.
	LimitObjectType *LimitType
}

LimitJSONObject - LimitJson abstract class.

func (*LimitJSONObject) GetLimitJSONObject

func (l *LimitJSONObject) GetLimitJSONObject() *LimitJSONObject

GetLimitJSONObject implements the LimitJSONObjectClassification interface for type LimitJSONObject.

func (LimitJSONObject) MarshalJSON added in v0.6.0

func (l LimitJSONObject) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LimitJSONObject.

func (*LimitJSONObject) UnmarshalJSON

func (l *LimitJSONObject) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LimitJSONObject.

type LimitJSONObjectClassification

type LimitJSONObjectClassification interface {
	// GetLimitJSONObject returns the LimitJSONObject content of the underlying type.
	GetLimitJSONObject() *LimitJSONObject
}

LimitJSONObjectClassification provides polymorphic access to related types. Call the interface's GetLimitJSONObject() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *LimitJSONObject, *LimitObject

type LimitObject

type LimitObject struct {
	// REQUIRED; The limit object type.
	LimitObjectType *LimitType

	// REQUIRED; The quota/limit value
	Value *int32

	// The quota or usages limit types.
	LimitType *QuotaLimitTypes
}

LimitObject - The resource quota limit value.

func (*LimitObject) GetLimitJSONObject added in v0.2.0

func (l *LimitObject) GetLimitJSONObject() *LimitJSONObject

GetLimitJSONObject implements the LimitJSONObjectClassification interface for type LimitObject.

func (LimitObject) MarshalJSON

func (l LimitObject) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LimitObject.

func (*LimitObject) UnmarshalJSON

func (l *LimitObject) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LimitObject.

type LimitType

type LimitType string

LimitType - The limit object type.

const (
	LimitTypeLimitValue LimitType = "LimitValue"
)

func PossibleLimitTypeValues

func PossibleLimitTypeValues() []LimitType

PossibleLimitTypeValues returns the possible values for the LimitType const type.

type Limits added in v0.2.0

type Limits struct {
	// The URI used to fetch the next page of quota limits. When there are no more pages, this string is null.
	NextLink *string

	// List of quota limits.
	Value []*CurrentQuotaLimitBase
}

Limits - Quota limits.

func (Limits) MarshalJSON added in v0.2.0

func (l Limits) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Limits.

func (*Limits) UnmarshalJSON added in v0.6.0

func (l *Limits) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Limits.

type LimitsResponse added in v0.2.0

type LimitsResponse struct {
	// The URI used to fetch the next page of quota limits. When there are no more pages, this is null.
	NextLink *string

	// List of quota limits with the quota request status.
	Value []*CurrentQuotaLimitBase
}

LimitsResponse - Quota limits request response.

func (LimitsResponse) MarshalJSON added in v0.2.0

func (l LimitsResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LimitsResponse.

func (*LimitsResponse) UnmarshalJSON added in v0.6.0

func (l *LimitsResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LimitsResponse.

type OperationClient added in v0.2.0

type OperationClient struct {
	// contains filtered or unexported fields
}

OperationClient contains the methods for the QuotaOperation group. Don't use this type directly, use NewOperationClient() instead.

func NewOperationClient added in v0.2.0

func NewOperationClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationClient, error)

NewOperationClient creates a new instance of OperationClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationClient) NewListPager added in v0.4.0

NewListPager - List all the operations supported by the Microsoft.Quota resource provider.

Generated from API version 2025-03-01

  • options - OperationClientListOptions contains the optional parameters for the OperationClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/GetOperations.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOperationClient().NewListPager(nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OperationList = armquota.OperationList{
		// 	Value: []*armquota.OperationResponse{
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/quotas/read"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Get the current Service limit or quota of the specified resource"),
		// 				Operation: to.Ptr("Get resource Quota limit"),
		// 				Provider: to.Ptr("Microsoft.Quota"),
		// 				Resource: to.Ptr("Resource Quota limit"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/quotas/write"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Creates the service limit or quota request for the specified resource"),
		// 				Operation: to.Ptr("Creates resource Quota limit request"),
		// 				Provider: to.Ptr("Microsoft.Quota"),
		// 				Resource: to.Ptr("Resource Quota limit"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/quotaRequests/read"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Get any service limit request for the specified resource"),
		// 				Operation: to.Ptr("Get Quota limit request"),
		// 				Provider: to.Ptr("Microsoft.Quota"),
		// 				Resource: to.Ptr("Resource Quota limit request"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/usages/read"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Get the usages for resource providers"),
		// 				Operation: to.Ptr("Get the usages for providers"),
		// 				Provider: to.Ptr("Microsoft.Quota"),
		// 				Resource: to.Ptr("usages information"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/operations/read"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Get the Operations supported by Microsoft.Quota"),
		// 				Operation: to.Ptr("Get the Operations supported by Microsoft.Quota"),
		// 				Provider: to.Ptr("Microsoft.Quota"),
		// 				Resource: to.Ptr("Read Operation"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/register/action"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Register the subscription with Microsoft.Quota Resource Provider"),
		// 				Operation: to.Ptr("Register the subscription with Microsoft.Quota Resource Provider"),
		// 				Provider: to.Ptr("Microsoft.Quota"),
		// 				Resource: to.Ptr("Subscription registration with Resource provider"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/groupQuotas/read"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Get the GroupQuota"),
		// 				Operation: to.Ptr("Get GroupQuota resource"),
		// 				Provider: to.Ptr("Microsoft.Quota"),
		// 				Resource: to.Ptr("GroupQuota resource"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/groupQuotas/write"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Creates the GroupQuota resource"),
		// 				Operation: to.Ptr("Creates GroupQuota resource"),
		// 				Provider: to.Ptr("Microsoft.Quota"),
		// 				Resource: to.Ptr("GroupQuota Resource"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/groupQuotas/subscriptions/read"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Get the GroupQuota subscriptions"),
		// 				Operation: to.Ptr("Get GroupQuota subscriptions"),
		// 				Provider: to.Ptr("Microsoft.Quota"),
		// 				Resource: to.Ptr("Subscriptions added to GroupQuota resource"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/groupQuotas/subscriptions/write"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Add Subscriptions to GroupQuota resource"),
		// 				Operation: to.Ptr("Adds subscription to GroupQuota resource"),
		// 				Provider: to.Ptr("Creates request to add subscription to GroupQuota resource"),
		// 				Resource: to.Ptr("Subscriptions added to GroupQuota resource"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/groupQuotas/groupQuotaLimits/read"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Get the current GroupQuota of the specified resource"),
		// 				Operation: to.Ptr("Get GroupQuota resource Quota limit"),
		// 				Provider: to.Ptr("Microsoft.Quota"),
		// 				Resource: to.Ptr("GroupQuota Resource Quota limit"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/groupQuotas/groupQuotaLimits/write"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Creates the GroupQuota request for the specified resource"),
		// 				Operation: to.Ptr("Creates GroupQuota resource Quota limit request"),
		// 				Provider: to.Ptr("Microsoft.Quota"),
		// 				Resource: to.Ptr("GroupQuota Resource Quota limit"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/groupQuotas/groupQuotaRequests/read"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Get the GroupQuota request status for the specific request"),
		// 				Operation: to.Ptr("Get GroupQuota request status"),
		// 				Provider: to.Ptr("Microsoft.Quota"),
		// 				Resource: to.Ptr("GroupQuota request"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/groupQuotas/quotaAllocations/read"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Get the current GroupQuota to Subscription Quota allocation"),
		// 				Operation: to.Ptr("Get GroupQuota to Subscription Quota allocation"),
		// 				Provider: to.Ptr("Microsoft.Quota"),
		// 				Resource: to.Ptr("GroupQuota to Subscription Quota allocation"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/groupQuotas/quotaAllocations/write"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Creates the GroupQuota to subscription Quota limit request for the specified resource"),
		// 				Operation: to.Ptr("Creates GroupQuota to subscription Quota limit request"),
		// 				Provider: to.Ptr("Microsoft.Quota"),
		// 				Resource: to.Ptr("GroupQuota to Subscription Quota allocation"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("Microsoft.Quota/groupQuotas/quotaAllocationRequests/read"),
		// 			Display: &armquota.OperationDisplay{
		// 				Description: to.Ptr("Get the GroupQuota to Subscription Quota allocation request status for the specific request"),
		// 				Operation: to.Ptr("Get GroupQuota to Subscription Quota allocation request status"),
		// 				Provider: to.Ptr("Microsoft.Quota"),
		// 				Resource: to.Ptr("GroupQuota to Subscription Quota allocation request"),
		// 			},
		// 	}},
		// }
	}
}
Output:

type OperationClientListOptions added in v0.2.0

type OperationClientListOptions struct {
}

OperationClientListOptions contains the optional parameters for the OperationClient.NewListPager method.

type OperationClientListResponse added in v0.2.0

type OperationClientListResponse struct {
	OperationList
}

OperationClientListResponse contains the response from method OperationClient.NewListPager.

type OperationDisplay

type OperationDisplay struct {
	// Operation description.
	Description *string

	// Operation name.
	Operation *string

	// Provider name.
	Provider *string

	// Resource name.
	Resource *string
}

func (OperationDisplay) MarshalJSON added in v0.6.0

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationDisplay.

func (*OperationDisplay) UnmarshalJSON added in v0.6.0

func (o *OperationDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.

type OperationList

type OperationList struct {
	// URL to get the next page of items.
	NextLink *string
	Value    []*OperationResponse
}

func (OperationList) MarshalJSON

func (o OperationList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationList.

func (*OperationList) UnmarshalJSON added in v0.6.0

func (o *OperationList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationList.

type OperationResponse

type OperationResponse struct {
	Display *OperationDisplay
	Name    *string
	Origin  *string
}

func (OperationResponse) MarshalJSON added in v0.6.0

func (o OperationResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationResponse.

func (*OperationResponse) UnmarshalJSON added in v0.6.0

func (o *OperationResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationResponse.

type Properties added in v0.2.0

type Properties struct {
	// Resource quota limit properties.
	Limit LimitJSONObjectClassification

	// Resource name provided by the resource provider. Use this property name when requesting quota.
	Name *ResourceName

	// Additional properties for the specific resource provider.
	Properties any

	// The name of the resource type. Optional field.
	ResourceType *string

	// READ-ONLY; States if quota can be requested for this resource.
	IsQuotaApplicable *bool

	// READ-ONLY; The time period over which the quota usage values are summarized. For example: *P1D (per one day) *PT1M (per
	// one minute) *PT1S (per one second). This parameter is optional because, for some resources
	// like compute, the period is irrelevant.
	QuotaPeriod *string

	// READ-ONLY; The quota units, such as Count and Bytes. When requesting quota, use the unit value returned in the GET response
	// in the request body of your PUT operation.
	Unit *string
}

Properties - Quota properties for the specified resource.

func (Properties) MarshalJSON added in v0.2.0

func (p Properties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Properties.

func (*Properties) UnmarshalJSON added in v0.2.0

func (p *Properties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Properties.

type ProxyResource added in v1.1.0

type ProxyResource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

func (ProxyResource) MarshalJSON added in v1.1.0

func (p ProxyResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v1.1.0

func (p *ProxyResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

type QuotaLimitTypes

type QuotaLimitTypes string

QuotaLimitTypes - The quota or usages limit types.

const (
	QuotaLimitTypesIndependent QuotaLimitTypes = "Independent"
	QuotaLimitTypesShared      QuotaLimitTypes = "Shared"
)

func PossibleQuotaLimitTypesValues

func PossibleQuotaLimitTypesValues() []QuotaLimitTypes

PossibleQuotaLimitTypesValues returns the possible values for the QuotaLimitTypes const type.

type QuotaRequestState

type QuotaRequestState string

QuotaRequestState - Quota request status.

const (
	QuotaRequestStateAccepted   QuotaRequestState = "Accepted"
	QuotaRequestStateFailed     QuotaRequestState = "Failed"
	QuotaRequestStateInProgress QuotaRequestState = "InProgress"
	QuotaRequestStateInvalid    QuotaRequestState = "Invalid"
	QuotaRequestStateSucceeded  QuotaRequestState = "Succeeded"
)

func PossibleQuotaRequestStateValues

func PossibleQuotaRequestStateValues() []QuotaRequestState

PossibleQuotaRequestStateValues returns the possible values for the QuotaRequestState const type.

type RequestDetails added in v0.2.0

type RequestDetails struct {
	// Quota request details.
	Properties *RequestProperties

	// READ-ONLY; Quota request ID.
	ID *string

	// READ-ONLY; Quota request name.
	Name *string

	// READ-ONLY; Resource type. "Microsoft.Quota/quotas".
	Type *string
}

RequestDetails - List of quota requests with details.

func (RequestDetails) MarshalJSON added in v0.6.0

func (r RequestDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestDetails.

func (*RequestDetails) UnmarshalJSON added in v0.6.0

func (r *RequestDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestDetails.

type RequestDetailsList added in v0.2.0

type RequestDetailsList struct {
	// The URI for fetching the next page of quota limits. When there are no more pages, this string is null.
	NextLink *string

	// Quota request details.
	Value []*RequestDetails
}

RequestDetailsList - Quota request information.

func (RequestDetailsList) MarshalJSON added in v0.2.0

func (r RequestDetailsList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestDetailsList.

func (*RequestDetailsList) UnmarshalJSON added in v0.6.0

func (r *RequestDetailsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestDetailsList.

type RequestOneResourceProperties added in v0.2.0

type RequestOneResourceProperties struct {
	// Error details of the quota request.
	Error *ServiceErrorDetail

	// Resource quota limit properties.
	Limit *LimitObject

	// Resource name provided by the resource provider. Use this property name when requesting quota.
	Name *ResourceName

	// Additional properties for the specific resource provider.
	Properties any

	// The name of the resource type. Optional field.
	ResourceType *string

	// The quota limit units, such as Count and Bytes. When requesting quota, use the unit value returned in the GET response
	// in the request body of your PUT operation.
	Unit *string

	// READ-ONLY; Usage information for the current resource.
	CurrentValue *int32

	// READ-ONLY; States if quota can be requested for this resource.
	IsQuotaApplicable *bool

	// READ-ONLY; User-friendly status message.
	Message *string

	// READ-ONLY; Quota request status.
	ProvisioningState *QuotaRequestState

	// READ-ONLY; The time period over which the quota usage values are summarized. For example: *P1D (per one day) *PT1M (per
	// one minute) *PT1S (per one second). This parameter is optional because, for some resources
	// like compute, the period is irrelevant.
	QuotaPeriod *string

	// READ-ONLY; Quota request submission time. The date conforms to the following ISO 8601 standard format: yyyy-MM-ddTHH:mm:ssZ.
	RequestSubmitTime *time.Time
}

RequestOneResourceProperties - Quota request.

func (RequestOneResourceProperties) MarshalJSON added in v0.2.0

func (r RequestOneResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestOneResourceProperties.

func (*RequestOneResourceProperties) UnmarshalJSON added in v0.2.0

func (r *RequestOneResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestOneResourceProperties.

type RequestOneResourceSubmitResponse added in v0.2.0

type RequestOneResourceSubmitResponse struct {
	// Quota request details.
	Properties *RequestOneResourceProperties

	// READ-ONLY; Quota request ID.
	ID *string

	// READ-ONLY; The name of the quota request.
	Name *string

	// READ-ONLY; Resource type. "Microsoft.Quota/ServiceLimitRequests"
	Type *string
}

RequestOneResourceSubmitResponse - Quota request response.

func (RequestOneResourceSubmitResponse) MarshalJSON added in v0.6.0

func (r RequestOneResourceSubmitResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestOneResourceSubmitResponse.

func (*RequestOneResourceSubmitResponse) UnmarshalJSON added in v0.6.0

func (r *RequestOneResourceSubmitResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestOneResourceSubmitResponse.

type RequestProperties added in v0.2.0

type RequestProperties struct {
	// Error details of the quota request.
	Error *ServiceErrorDetail

	// Quota request details.
	Value []*SubRequest

	// READ-ONLY; User-friendly status message.
	Message *string

	// READ-ONLY; The quota request status.
	ProvisioningState *QuotaRequestState

	// READ-ONLY; The quota request submission time. The date conforms to the following format specified by the ISO 8601 standard:
	// yyyy-MM-ddTHH:mm:ssZ
	RequestSubmitTime *time.Time
}

RequestProperties - Quota request properties.

func (RequestProperties) MarshalJSON added in v0.2.0

func (r RequestProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestProperties.

func (*RequestProperties) UnmarshalJSON added in v0.2.0

func (r *RequestProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestProperties.

type RequestState added in v1.1.0

type RequestState string

RequestState - Request status.

const (
	RequestStateAccepted   RequestState = "Accepted"
	RequestStateCanceled   RequestState = "Canceled"
	RequestStateCreated    RequestState = "Created"
	RequestStateFailed     RequestState = "Failed"
	RequestStateInProgress RequestState = "InProgress"
	RequestStateInvalid    RequestState = "Invalid"
	RequestStateSucceeded  RequestState = "Succeeded"
)

func PossibleRequestStateValues added in v1.1.0

func PossibleRequestStateValues() []RequestState

PossibleRequestStateValues returns the possible values for the RequestState const type.

type RequestStatusClient added in v0.2.0

type RequestStatusClient struct {
	// contains filtered or unexported fields
}

RequestStatusClient contains the methods for the QuotaRequestStatus group. Don't use this type directly, use NewRequestStatusClient() instead.

func NewRequestStatusClient added in v0.2.0

func NewRequestStatusClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*RequestStatusClient, error)

NewRequestStatusClient creates a new instance of RequestStatusClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*RequestStatusClient) Get added in v0.2.0

Get - Get the quota request details and status by quota request ID for the resources of the resource provider at a specific location. The quota request ID id is returned in the response of the PUT operation. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • id - Quota request ID.
  • scope - The target Azure resource URI. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/. This is the target Azure resource URI for the List GET operation. If a {resourceName} is added after /quotas, then it's the target Azure resource URI in the GET operation for the specific resource.
  • options - RequestStatusClientGetOptions contains the optional parameters for the RequestStatusClient.Get method.
Example (QuotaRequestFailed)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/getQuotaRequestStatusFailed.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRequestStatusClient().Get(ctx, "2B5C8515-37D8-4B6A-879B-CD641A2CF605", "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RequestDetails = armquota.RequestDetails{
	// 	Name: to.Ptr("2B5C8515-37D8-4B6A-879B-CD641A2CF605"),
	// 	Type: to.Ptr("Microsoft.Quota/quotaRequests"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/quotaRequests/2B5C8515-37D8-4B6A-879B-CD641A2CF605"),
	// 	Properties: &armquota.RequestProperties{
	// 		Error: &armquota.ServiceErrorDetail{
	// 			Code: to.Ptr("ContactSupport"),
	// 			Message: to.Ptr("Request failed, please contact support."),
	// 		},
	// 		Message: to.Ptr("Request failed, please contact support."),
	// 		ProvisioningState: to.Ptr(armquota.QuotaRequestStateSucceeded),
	// 		RequestSubmitTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-08-19T19:23:17.904Z"); return t}()),
	// 		Value: []*armquota.SubRequest{
	// 			{
	// 				Name: &armquota.ResourceName{
	// 					LocalizedValue: to.Ptr("Standard NC Promo Family vCPUs"),
	// 					Value: to.Ptr("standardNCPromoFamily"),
	// 				},
	// 				Limit: &armquota.LimitObject{
	// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
	// 					Value: to.Ptr[int32](50),
	// 				},
	// 				Message: to.Ptr("Request failed, please contact support."),
	// 				ProvisioningState: to.Ptr(armquota.QuotaRequestStateSucceeded),
	// 				SubRequestID: to.Ptr("AD07450A-DE86-4FD3-859B-107BEF218C4C"),
	// 		}},
	// 	},
	// }
}
Output:

Example (QuotaRequestInProgress)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/getQuotaRequestStatusInProgress.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRequestStatusClient().Get(ctx, "2B5C8515-37D8-4B6A-879B-CD641A2CF605", "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RequestDetails = armquota.RequestDetails{
	// 	Name: to.Ptr("2B5C8515-37D8-4B6A-879B-CD641A2CF605"),
	// 	Type: to.Ptr("Microsoft.Quota/quotaRequests"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/quotaRequests/2B5C8515-37D8-4B6A-879B-CD641A2CF605"),
	// 	Properties: &armquota.RequestProperties{
	// 		Message: to.Ptr("Request processing"),
	// 		ProvisioningState: to.Ptr(armquota.QuotaRequestStateSucceeded),
	// 		RequestSubmitTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-08-19T19:23:17.904Z"); return t}()),
	// 		Value: []*armquota.SubRequest{
	// 			{
	// 				Name: &armquota.ResourceName{
	// 					LocalizedValue: to.Ptr("Standard HCS Family vCPUs"),
	// 					Value: to.Ptr("standardHCSFamily"),
	// 				},
	// 				Limit: &armquota.LimitObject{
	// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
	// 					Value: to.Ptr[int32](50),
	// 				},
	// 				Message: to.Ptr("Request completed"),
	// 				ProvisioningState: to.Ptr(armquota.QuotaRequestStateSucceeded),
	// 				SubRequestID: to.Ptr("AD07450A-DE86-4FD3-859B-107BEF218C4C"),
	// 			},
	// 			{
	// 				Name: &armquota.ResourceName{
	// 					LocalizedValue: to.Ptr("Standard NC Promo Family vCPUs"),
	// 					Value: to.Ptr("standardNCPromoFamily"),
	// 				},
	// 				Limit: &armquota.LimitObject{
	// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
	// 					Value: to.Ptr[int32](50),
	// 				},
	// 				Message: to.Ptr("Request processing"),
	// 				ProvisioningState: to.Ptr(armquota.QuotaRequestStateSucceeded),
	// 				SubRequestID: to.Ptr("AD07450A-DE86-4FD3-859B-107BEF218C4C"),
	// 		}},
	// 	},
	// }
}
Output:

Example (QuotaRequestStatus)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/getQuotaRequestStatusById.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewRequestStatusClient().Get(ctx, "2B5C8515-37D8-4B6A-879B-CD641A2CF605", "subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.RequestDetails = armquota.RequestDetails{
	// 	Name: to.Ptr("2B5C8515-37D8-4B6A-879B-CD641A2CF605"),
	// 	Type: to.Ptr("Microsoft.Quota/quotaRequests"),
	// 	ID: to.Ptr("/subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/quotaRequests/2B5C8515-37D8-4B6A-879B-CD641A2CF605"),
	// 	Properties: &armquota.RequestProperties{
	// 		Message: to.Ptr("Request completed"),
	// 		ProvisioningState: to.Ptr(armquota.QuotaRequestStateSucceeded),
	// 		RequestSubmitTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-08-19T19:23:17.904Z"); return t}()),
	// 		Value: []*armquota.SubRequest{
	// 			{
	// 				Name: &armquota.ResourceName{
	// 					LocalizedValue: to.Ptr("Standard NC Promo Family vCPUs"),
	// 					Value: to.Ptr("standardNCPromoFamily"),
	// 				},
	// 				Limit: &armquota.LimitObject{
	// 					LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
	// 					Value: to.Ptr[int32](50),
	// 				},
	// 				Message: to.Ptr("Request completed"),
	// 				ProvisioningState: to.Ptr(armquota.QuotaRequestStateSucceeded),
	// 				Unit: to.Ptr("Count"),
	// 		}},
	// 	},
	// }
}
Output:

func (*RequestStatusClient) NewListPager added in v0.4.0

NewListPager - For the specified scope, get the current quota requests for a one year period ending at the time is made. Use the oData filter to select quota requests.

Generated from API version 2025-03-01

  • scope - The target Azure resource URI. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/. This is the target Azure resource URI for the List GET operation. If a {resourceName} is added after /quotas, then it's the target Azure resource URI in the GET operation for the specific resource.
  • options - RequestStatusClientListOptions contains the optional parameters for the RequestStatusClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/getQuotaRequestsHistory.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewRequestStatusClient().NewListPager("subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus", &armquota.RequestStatusClientListOptions{Filter: nil,
		Top:       nil,
		Skiptoken: nil,
	})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.RequestDetailsList = armquota.RequestDetailsList{
		// 	Value: []*armquota.RequestDetails{
		// 		{
		// 			Name: to.Ptr("2B5C8515-37D8-4B6A-879B-CD641A2CF605"),
		// 			Type: to.Ptr("Microsoft.Quota/quotaRequests"),
		// 			ID: to.Ptr("/subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/quotaRequests/2B5C8515-37D8-4B6A-879B-CD641A2CF605"),
		// 			Properties: &armquota.RequestProperties{
		// 				Message: to.Ptr("Request completed"),
		// 				ProvisioningState: to.Ptr(armquota.QuotaRequestStateSucceeded),
		// 				RequestSubmitTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-08-19T19:23:17.904Z"); return t}()),
		// 				Value: []*armquota.SubRequest{
		// 					{
		// 						Name: &armquota.ResourceName{
		// 							LocalizedValue: to.Ptr("Standard NC Promo Family vCPUs"),
		// 							Value: to.Ptr("standardNCPromoFamily"),
		// 						},
		// 						Limit: &armquota.LimitObject{
		// 							LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 							Value: to.Ptr[int32](50),
		// 						},
		// 						Message: to.Ptr("Request completed"),
		// 						ProvisioningState: to.Ptr(armquota.QuotaRequestStateSucceeded),
		// 						SubRequestID: to.Ptr("AD07450A-DE86-4FD3-859B-107BEF218C4C"),
		// 				}},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("7E73A85C-83BB-4DE4-903F-076F1A2B91D6"),
		// 			Type: to.Ptr("Microsoft.Quota/quotaRequests"),
		// 			ID: to.Ptr("/subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/quotaRequests/7E73A85C-83BB-4DE4-903F-076F1A2B91D6"),
		// 			Properties: &armquota.RequestProperties{
		// 				Message: to.Ptr("Request completed"),
		// 				ProvisioningState: to.Ptr(armquota.QuotaRequestStateSucceeded),
		// 				RequestSubmitTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-08-18T19:23:17.904Z"); return t}()),
		// 				Value: []*armquota.SubRequest{
		// 					{
		// 						Name: &armquota.ResourceName{
		// 							LocalizedValue: to.Ptr("Standard NV Promo Family vCPUs"),
		// 							Value: to.Ptr("standardNVPromoFamily"),
		// 						},
		// 						Limit: &armquota.LimitObject{
		// 							LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 							Value: to.Ptr[int32](150),
		// 						},
		// 						Message: to.Ptr("Request completed"),
		// 						ProvisioningState: to.Ptr(armquota.QuotaRequestStateSucceeded),
		// 						SubRequestID: to.Ptr("AD07450A-DE86-4FD3-859B-107BEF218C4C"),
		// 				}},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("5E460077-AB53-4802-8997-A6940E0B7649"),
		// 			Type: to.Ptr("Microsoft.Quota/quotaRequests"),
		// 			ID: to.Ptr("/subscriptions/D7EC67B3-7657-4966-BFFC-41EFD36BAAB3/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/quotaRequests/5E460077-AB53-4802-8997-A6940E0B7649"),
		// 			Properties: &armquota.RequestProperties{
		// 				Error: &armquota.ServiceErrorDetail{
		// 					Code: to.Ptr("ResourceNotAvailableForOffer"),
		// 					Message: to.Ptr("The resource is currently unavailable in the location for the offer type."),
		// 				},
		// 				Message: to.Ptr("The resource is currently unavailable in the location for the offer type."),
		// 				ProvisioningState: to.Ptr(armquota.QuotaRequestStateSucceeded),
		// 				RequestSubmitTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-08-17T19:23:17.904Z"); return t}()),
		// 				Value: []*armquota.SubRequest{
		// 					{
		// 						Name: &armquota.ResourceName{
		// 							LocalizedValue: to.Ptr("Standard HBS Family vCPUs"),
		// 							Value: to.Ptr("standardHBSFamily"),
		// 						},
		// 						Limit: &armquota.LimitObject{
		// 							LimitObjectType: to.Ptr(armquota.LimitTypeLimitValue),
		// 							Value: to.Ptr[int32](52),
		// 						},
		// 						Message: to.Ptr("Request failed, please contact support."),
		// 						ProvisioningState: to.Ptr(armquota.QuotaRequestStateSucceeded),
		// 						SubRequestID: to.Ptr("AD07450A-DE86-4FD3-859B-107BEF218C4C"),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}
Output:

type RequestStatusClientGetOptions added in v0.2.0

type RequestStatusClientGetOptions struct {
}

RequestStatusClientGetOptions contains the optional parameters for the RequestStatusClient.Get method.

type RequestStatusClientGetResponse added in v0.2.0

type RequestStatusClientGetResponse struct {
	// List of quota requests with details.
	RequestDetails
}

RequestStatusClientGetResponse contains the response from method RequestStatusClient.Get.

type RequestStatusClientListOptions added in v0.2.0

type RequestStatusClientListOptions struct {
	// FIELD SUPPORTED OPERATORS
	// requestSubmitTime ge, le, eq, gt, lt
	// provisioningState eq {QuotaRequestState}
	// resourceName eq {resourceName}
	Filter *string

	// The Skiptoken parameter is used only if a previous operation returned a partial result. If a previous response contains
	// a nextLink element, its value includes a skiptoken parameter that specifies a
	// starting point to use for subsequent calls.
	Skiptoken *string

	// Number of records to return.
	Top *int32
}

RequestStatusClientListOptions contains the optional parameters for the RequestStatusClient.NewListPager method.

type RequestStatusClientListResponse added in v0.2.0

type RequestStatusClientListResponse struct {
	// Quota request information.
	RequestDetailsList
}

RequestStatusClientListResponse contains the response from method RequestStatusClient.NewListPager.

type RequestStatusDetails added in v0.2.0

type RequestStatusDetails struct {
	// Resource quota limit properties.
	Limit *LimitObject

	// Resource name provided by the resource provider. Use this property name when requesting quota.
	Name *ResourceName

	// Additional properties for the specific resource provider.
	Properties any

	// The name of the resource type. Optional field.
	ResourceType *string

	// The quota limit units, such as Count and Bytes. When requesting quota, use the unit value returned in the GET response
	// in the request body of your PUT operation.
	Unit *string

	// READ-ONLY; User-friendly message.
	Message *string

	// READ-ONLY; Quota request status.
	ProvisioningState *QuotaRequestState

	// READ-ONLY; The time period over which the quota usage values are summarized. For example: *P1D (per one day) *PT1M (per
	// one minute) *PT1S (per one second). This parameter is optional because, for some resources
	// like compute, the period is irrelevant.
	QuotaPeriod *string
}

RequestStatusDetails - Quota request status details.

func (RequestStatusDetails) MarshalJSON added in v0.6.0

func (r RequestStatusDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestStatusDetails.

func (*RequestStatusDetails) UnmarshalJSON added in v0.6.0

func (r *RequestStatusDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestStatusDetails.

type RequestSubmitResponse added in v0.2.0

type RequestSubmitResponse struct {
	// Quota request details.
	Properties *RequestProperties

	// READ-ONLY; Quota request ID.
	ID *string

	// READ-ONLY; Quota request name.
	Name *string

	// READ-ONLY; Resource type. "Microsoft.Quota/quotas".
	Type *string
}

RequestSubmitResponse - Quota request response.

func (RequestSubmitResponse) MarshalJSON added in v0.6.0

func (r RequestSubmitResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestSubmitResponse.

func (*RequestSubmitResponse) UnmarshalJSON added in v0.6.0

func (r *RequestSubmitResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestSubmitResponse.

type RequestSubmitResponse202 added in v0.2.0

type RequestSubmitResponse202 struct {
	// Quota request status.
	Properties *RequestStatusDetails

	// READ-ONLY; The quota request ID. To check the request status, use the id value in a Quota Request Status [https://docs.microsoft.com/en-us/rest/api/reserved-vm-instances/quotarequeststatus/get]
	// GET operation.
	ID *string

	// READ-ONLY; Operation ID.
	Name *string

	// READ-ONLY; Resource type.
	Type *string
}

RequestSubmitResponse202 - The quota request response with the quota request ID.

func (RequestSubmitResponse202) MarshalJSON added in v0.6.0

func (r RequestSubmitResponse202) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RequestSubmitResponse202.

func (*RequestSubmitResponse202) UnmarshalJSON added in v0.6.0

func (r *RequestSubmitResponse202) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RequestSubmitResponse202.

type Resource added in v1.1.0

type Resource struct {
	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

func (Resource) MarshalJSON added in v1.1.0

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v1.1.0

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceBaseRequest added in v1.1.0

type ResourceBaseRequest struct {
	// Quota requested for the resource.
	Limit *int64

	// READ-ONLY; The resource name, such as SKU name.
	ResourceName *string

	// READ-ONLY; Representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, Percent, CountPerSecond,
	// BytesPerSecond. Based on -
	// https://armwiki.azurewebsites.net/api_contracts/UsagesAPIContract.html?q=usages . Different RPs may have different units,
	// Count, type as int64 should work for most of the integer values.
	Unit *string
}

ResourceBaseRequest - Resource definition with the requested quota.

func (ResourceBaseRequest) MarshalJSON added in v1.1.0

func (r ResourceBaseRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceBaseRequest.

func (*ResourceBaseRequest) UnmarshalJSON added in v1.1.0

func (r *ResourceBaseRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceBaseRequest.

type ResourceName

type ResourceName struct {
	// Resource name.
	Value *string

	// READ-ONLY; Resource display name.
	LocalizedValue *string
}

ResourceName - Name of the resource provided by the resource Provider. When requesting quota, use this property name.

func (ResourceName) MarshalJSON added in v0.6.0

func (r ResourceName) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceName.

func (*ResourceName) UnmarshalJSON added in v0.6.0

func (r *ResourceName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceName.

type ResourceUsageList added in v1.1.0

type ResourceUsageList struct {
	// List of resource usages at Group Quotas.
	Value []*ResourceUsages

	// READ-ONLY; The URL to use for getting the next set of results.
	NextLink *string
}

ResourceUsageList - List of resource usages and quotas for GroupQuota.

func (ResourceUsageList) MarshalJSON added in v1.1.0

func (r ResourceUsageList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceUsageList.

func (*ResourceUsageList) UnmarshalJSON added in v1.1.0

func (r *ResourceUsageList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsageList.

type ResourceUsages added in v1.1.0

type ResourceUsages struct {
	// Resource details with usages and GroupQuota.
	Properties *GroupQuotaUsagesBase

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ResourceUsages - Resource details with usages and GroupQuota.

func (ResourceUsages) MarshalJSON added in v1.1.0

func (r ResourceUsages) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceUsages.

func (*ResourceUsages) UnmarshalJSON added in v1.1.0

func (r *ResourceUsages) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUsages.

type ServiceError

type ServiceError struct {
	// Error code.
	Code *string

	// Error message.
	Message *string

	// READ-ONLY; List of error details.
	Details []*ServiceErrorDetail
}

ServiceError - API error details.

func (ServiceError) MarshalJSON

func (s ServiceError) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceError.

func (*ServiceError) UnmarshalJSON added in v0.6.0

func (s *ServiceError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceError.

type ServiceErrorDetail

type ServiceErrorDetail struct {
	// READ-ONLY; Error code.
	Code *string

	// READ-ONLY; Error message.
	Message *string
}

ServiceErrorDetail - Error details.

func (ServiceErrorDetail) MarshalJSON added in v0.6.0

func (s ServiceErrorDetail) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceErrorDetail.

func (*ServiceErrorDetail) UnmarshalJSON added in v0.6.0

func (s *ServiceErrorDetail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceErrorDetail.

type SubRequest

type SubRequest struct {
	// Resource quota limit properties.
	Limit LimitJSONObjectClassification

	// Resource name.
	Name *ResourceName

	// Quota limit units, such as Count and Bytes. When requesting quota, use the unit value returned in the GET response in the
	// request body of your PUT operation.
	Unit *string

	// READ-ONLY; User-friendly status message.
	Message *string

	// READ-ONLY; The quota request status.
	ProvisioningState *QuotaRequestState

	// READ-ONLY; Resource type for which the quota properties were requested.
	ResourceType *string

	// READ-ONLY; Quota request ID.
	SubRequestID *string
}

SubRequest - Request property.

func (SubRequest) MarshalJSON

func (s SubRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubRequest.

func (*SubRequest) UnmarshalJSON

func (s *SubRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubRequest.

type SubmittedResourceRequestStatus added in v1.1.0

type SubmittedResourceRequestStatus struct {
	Properties *SubmittedResourceRequestStatusProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

SubmittedResourceRequestStatus - Status of a single GroupQuota request.

func (SubmittedResourceRequestStatus) MarshalJSON added in v1.1.0

func (s SubmittedResourceRequestStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubmittedResourceRequestStatus.

func (*SubmittedResourceRequestStatus) UnmarshalJSON added in v1.1.0

func (s *SubmittedResourceRequestStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubmittedResourceRequestStatus.

type SubmittedResourceRequestStatusList added in v1.1.0

type SubmittedResourceRequestStatusList struct {
	// Subscription groupQuotaRequests list.
	Value []*SubmittedResourceRequestStatus

	// READ-ONLY; The URL to use for getting the next set of results.
	NextLink *string
}

SubmittedResourceRequestStatusList - Share Quota Entity list.

func (SubmittedResourceRequestStatusList) MarshalJSON added in v1.1.0

func (s SubmittedResourceRequestStatusList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubmittedResourceRequestStatusList.

func (*SubmittedResourceRequestStatusList) UnmarshalJSON added in v1.1.0

func (s *SubmittedResourceRequestStatusList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubmittedResourceRequestStatusList.

type SubmittedResourceRequestStatusProperties added in v1.1.0

type SubmittedResourceRequestStatusProperties struct {
	// Requested Resource.
	RequestedResource *GroupQuotaRequestBase

	// READ-ONLY; Details of the failure.
	FaultCode *string

	// READ-ONLY; Request status.
	ProvisioningState *RequestState

	// READ-ONLY; The request submission time. The date conforms to the following format specified by the ISO 8601 standard: yyyy-MM-ddTHH:mm:ssZ
	RequestSubmitTime *time.Time
}

func (SubmittedResourceRequestStatusProperties) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type SubmittedResourceRequestStatusProperties.

func (*SubmittedResourceRequestStatusProperties) UnmarshalJSON added in v1.1.0

func (s *SubmittedResourceRequestStatusProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubmittedResourceRequestStatusProperties.

type SubscriptionGroupQuotaAssignment added in v1.1.0

type SubscriptionGroupQuotaAssignment struct {
	// The group quota id of the quota source.
	GroupQuotaID *string

	// The amount of quota allocated to this subscriptionId from the quota source.
	QuotaAllocated *int64
}

SubscriptionGroupQuotaAssignment - MGId the source of group quota.

func (SubscriptionGroupQuotaAssignment) MarshalJSON added in v1.1.0

func (s SubscriptionGroupQuotaAssignment) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionGroupQuotaAssignment.

func (*SubscriptionGroupQuotaAssignment) UnmarshalJSON added in v1.1.0

func (s *SubscriptionGroupQuotaAssignment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionGroupQuotaAssignment.

type SubscriptionQuotaAllocationRequestList added in v1.1.0

type SubscriptionQuotaAllocationRequestList struct {
	// Allocated Group Quota to subscriptions.
	Value []*AllocationRequestStatus

	// READ-ONLY; The URL to use for getting the next set of results.
	NextLink *string
}

SubscriptionQuotaAllocationRequestList - List of Allocated Group Quota to the subscriptions.

func (SubscriptionQuotaAllocationRequestList) MarshalJSON added in v1.1.0

func (s SubscriptionQuotaAllocationRequestList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionQuotaAllocationRequestList.

func (*SubscriptionQuotaAllocationRequestList) UnmarshalJSON added in v1.1.0

func (s *SubscriptionQuotaAllocationRequestList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionQuotaAllocationRequestList.

type SubscriptionQuotaAllocations added in v1.1.0

type SubscriptionQuotaAllocations struct {
	// Quota properties for the specified resource.
	Properties *SubscriptionQuotaAllocationsProperties
}

SubscriptionQuotaAllocations - Quota allocated to a subscription for the specific Resource Provider, Location, ResourceName. This will include the GroupQuota and total quota allocated to the subscription. Only the Group quota allocated to the subscription can be allocated back to the MG Group Quota.

func (SubscriptionQuotaAllocations) MarshalJSON added in v1.1.0

func (s SubscriptionQuotaAllocations) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionQuotaAllocations.

func (*SubscriptionQuotaAllocations) UnmarshalJSON added in v1.1.0

func (s *SubscriptionQuotaAllocations) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionQuotaAllocations.

type SubscriptionQuotaAllocationsList added in v1.1.0

type SubscriptionQuotaAllocationsList struct {
	Properties *SubscriptionQuotaAllocationsListProperties

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

SubscriptionQuotaAllocationsList - Subscription quota list.

func (SubscriptionQuotaAllocationsList) MarshalJSON added in v1.1.0

func (s SubscriptionQuotaAllocationsList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionQuotaAllocationsList.

func (*SubscriptionQuotaAllocationsList) UnmarshalJSON added in v1.1.0

func (s *SubscriptionQuotaAllocationsList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionQuotaAllocationsList.

type SubscriptionQuotaAllocationsListProperties added in v1.1.0

type SubscriptionQuotaAllocationsListProperties struct {
	// Subscription quota list.
	Value []*SubscriptionQuotaAllocations

	// READ-ONLY; The URL to use for getting the next set of results.
	NextLink *string

	// READ-ONLY; Request status.
	ProvisioningState *RequestState
}

func (SubscriptionQuotaAllocationsListProperties) MarshalJSON added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type SubscriptionQuotaAllocationsListProperties.

func (*SubscriptionQuotaAllocationsListProperties) UnmarshalJSON added in v1.1.0

func (s *SubscriptionQuotaAllocationsListProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionQuotaAllocationsListProperties.

type SubscriptionQuotaAllocationsProperties added in v1.1.0

type SubscriptionQuotaAllocationsProperties struct {
	// The total quota limit for the subscription.
	Limit *int64

	// The resource name, such as SKU name.
	ResourceName *string

	// READ-ONLY; Name of the resource provided by the resource provider. This property is already included in the request URI,
	// so it is a readonly property returned in the response.
	Name *SubscriptionQuotaDetailsName

	// READ-ONLY; The shareable quota for the subscription.
	ShareableQuota *int64
}

SubscriptionQuotaAllocationsProperties - Quota properties for the specified resource.

func (SubscriptionQuotaAllocationsProperties) MarshalJSON added in v1.1.0

func (s SubscriptionQuotaAllocationsProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionQuotaAllocationsProperties.

func (*SubscriptionQuotaAllocationsProperties) UnmarshalJSON added in v1.1.0

func (s *SubscriptionQuotaAllocationsProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionQuotaAllocationsProperties.

type SubscriptionQuotaAllocationsStatusList added in v1.1.0

type SubscriptionQuotaAllocationsStatusList struct {
	// Subscription quota allocation status list.
	Value []*SubmittedResourceRequestStatus

	// READ-ONLY; The URL to use for getting the next set of results.
	NextLink *string
}

SubscriptionQuotaAllocationsStatusList - Subscription quota allocation requests status list.

func (SubscriptionQuotaAllocationsStatusList) MarshalJSON added in v1.1.0

func (s SubscriptionQuotaAllocationsStatusList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionQuotaAllocationsStatusList.

func (*SubscriptionQuotaAllocationsStatusList) UnmarshalJSON added in v1.1.0

func (s *SubscriptionQuotaAllocationsStatusList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionQuotaAllocationsStatusList.

type SubscriptionQuotaDetails added in v1.1.0

type SubscriptionQuotaDetails struct {
	// The total quota limit for the subscription.
	Limit *int64

	// The resource name, such as SKU name.
	ResourceName *string

	// READ-ONLY; Name of the resource provided by the resource provider. This property is already included in the request URI,
	// so it is a readonly property returned in the response.
	Name *SubscriptionQuotaDetailsName

	// READ-ONLY; The shareable quota for the subscription.
	ShareableQuota *int64
}

SubscriptionQuotaDetails - Subscription Quota details.

func (SubscriptionQuotaDetails) MarshalJSON added in v1.1.0

func (s SubscriptionQuotaDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionQuotaDetails.

func (*SubscriptionQuotaDetails) UnmarshalJSON added in v1.1.0

func (s *SubscriptionQuotaDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionQuotaDetails.

type SubscriptionQuotaDetailsName added in v1.1.0

type SubscriptionQuotaDetailsName struct {
	// READ-ONLY; Resource display name.
	LocalizedValue *string

	// READ-ONLY; Resource name.
	Value *string
}

SubscriptionQuotaDetailsName - Name of the resource provided by the resource provider. This property is already included in the request URI, so it is a readonly property returned in the response.

func (SubscriptionQuotaDetailsName) MarshalJSON added in v1.1.0

func (s SubscriptionQuotaDetailsName) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubscriptionQuotaDetailsName.

func (*SubscriptionQuotaDetailsName) UnmarshalJSON added in v1.1.0

func (s *SubscriptionQuotaDetailsName) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubscriptionQuotaDetailsName.

type SystemData added in v1.1.0

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON added in v1.1.0

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON added in v1.1.0

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type UsagesClient

type UsagesClient struct {
	// contains filtered or unexported fields
}

UsagesClient contains the methods for the Usages group. Don't use this type directly, use NewUsagesClient() instead.

func NewUsagesClient

func NewUsagesClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*UsagesClient, error)

NewUsagesClient creates a new instance of UsagesClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*UsagesClient) Get

func (client *UsagesClient) Get(ctx context.Context, resourceName string, scope string, options *UsagesClientGetOptions) (UsagesClientGetResponse, error)

Get - Get the current usage of a resource. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2025-03-01

  • resourceName - Resource name for a given resource provider. For example:
  • SKU name for Microsoft.Compute
  • SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
  • scope - The target Azure resource URI. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/. This is the target Azure resource URI for the List GET operation. If a {resourceName} is added after /quotas, then it's the target Azure resource URI in the GET operation for the specific resource.
  • options - UsagesClientGetOptions contains the optional parameters for the UsagesClient.Get method.
Example (QuotasUsagesRequestForCompute)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/getComputeOneSkuUsages.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewUsagesClient().Get(ctx, "standardNDSFamily", "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CurrentUsagesBase = armquota.CurrentUsagesBase{
	// 	Name: to.Ptr("standardNDSFamily"),
	// 	Type: to.Ptr("Microsoft.Quota/Usages"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Usages/standardNDSFamily"),
	// 	Properties: &armquota.UsagesProperties{
	// 		Name: &armquota.ResourceName{
	// 			LocalizedValue: to.Ptr("Standard NDS Family vCPUs"),
	// 			Value: to.Ptr("standardNDSFamily"),
	// 		},
	// 		IsQuotaApplicable: to.Ptr(true),
	// 		Unit: to.Ptr("Count"),
	// 		Usages: &armquota.UsagesObject{
	// 			UsagesType: to.Ptr(armquota.UsagesTypesIndividual),
	// 			Value: to.Ptr[int32](10),
	// 		},
	// 	},
	// }
}
Output:

Example (QuotasUsagesRequestForNetwork)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/getNetworkOneSkuUsages.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewUsagesClient().Get(ctx, "MinPublicIpInterNetworkPrefixLength", "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.CurrentUsagesBase = armquota.CurrentUsagesBase{
	// 	Name: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
	// 	Type: to.Ptr("Microsoft.Quota/usages"),
	// 	ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/MinPublicIpInterNetworkPrefixLength"),
	// 	Properties: &armquota.UsagesProperties{
	// 		Name: &armquota.ResourceName{
	// 			LocalizedValue: to.Ptr("Min Public Ip InterNetwork Prefix Length"),
	// 			Value: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
	// 		},
	// 		IsQuotaApplicable: to.Ptr(true),
	// 		ResourceType: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
	// 		Unit: to.Ptr("Count"),
	// 		Usages: &armquota.UsagesObject{
	// 			Value: to.Ptr[int32](10),
	// 		},
	// 	},
	// }
}
Output:

func (*UsagesClient) NewListPager added in v0.4.0

func (client *UsagesClient) NewListPager(scope string, options *UsagesClientListOptions) *runtime.Pager[UsagesClientListResponse]

NewListPager - Get a list of current usage for all resources for the scope specified.

Generated from API version 2025-03-01

  • scope - The target Azure resource URI. For example, /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/. This is the target Azure resource URI for the List GET operation. If a {resourceName} is added after /quotas, then it's the target Azure resource URI in the GET operation for the specific resource.
  • options - UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method.
Example (QuotasListUsagesForCompute)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/getComputeUsages.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewUsagesClient().NewListPager("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.UsagesLimits = armquota.UsagesLimits{
		// 	Value: []*armquota.CurrentUsagesBase{
		// 		{
		// 			Name: to.Ptr("standardFSv2Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Usages/standardFSv2Family"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard FSv2 Family vCPUs"),
		// 					Value: to.Ptr("standardFSv2Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardNDSFamily"),
		// 			Type: to.Ptr("Microsoft.Quota/Usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Usages/standardNDSFamily"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard NDS Family vCPUs"),
		// 					Value: to.Ptr("standardNDSFamily"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardNCSv2Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Usages/standardNCSv2Family"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard NCSv2 Family vCPUs"),
		// 					Value: to.Ptr("standardNCSv2Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardNCSv3Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Usages/standardNCSv3Family"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard NCSv3 Family vCPUs"),
		// 					Value: to.Ptr("standardNCSv3Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardLSv2Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Usages/standardLSv2Family"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard LSv2 Family vCPUs"),
		// 					Value: to.Ptr("standardLSv2Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardPBSFamily"),
		// 			Type: to.Ptr("Microsoft.Quota/Usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Usages/standardPBSFamily"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard PBS Family vCPUs"),
		// 					Value: to.Ptr("standardPBSFamily"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardEIv3Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Usages/standardEIv3Family"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard EIv3 Family vCPUs"),
		// 					Value: to.Ptr("standardEIv3Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardEISv3Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Usages/standardEISv3Family"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard EISv3 Family vCPUs"),
		// 					Value: to.Ptr("standardEISv3Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardDCSFamily"),
		// 			Type: to.Ptr("Microsoft.Quota/Usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Usages/standardDCSFamily"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard DCS Family vCPUs"),
		// 					Value: to.Ptr("standardDCSFamily"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardNVSv2Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Usages/standardNVSv2Family"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard NVSv2 Family vCPUs"),
		// 					Value: to.Ptr("standardNVSv2Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("standardMSv2Family"),
		// 			Type: to.Ptr("Microsoft.Quota/Usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Usages/standardMSv2Family"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard MSv2 Family vCPUs"),
		// 					Value: to.Ptr("standardMSv2Family"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("availabilitySets"),
		// 			Type: to.Ptr("Microsoft.Quota/Usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/providers/Microsoft.Quota/Usages/availabilitySets"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Availability Sets"),
		// 					Value: to.Ptr("availabilitySets"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (QuotasListUsagesForNetwork)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/getNetworkUsages.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewUsagesClient().NewListPager("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.UsagesLimits = armquota.UsagesLimits{
		// 	Value: []*armquota.CurrentUsagesBase{
		// 		{
		// 			Name: to.Ptr("VirtualNetworks"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Virtual Networks"),
		// 					Value: to.Ptr("VirtualNetworks"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("StaticPublicIPAddresses"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Static Public IP Addresses"),
		// 					Value: to.Ptr("StaticPublicIPAddresses"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NetworkSecurityGroups"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Network Security Groups"),
		// 					Value: to.Ptr("NetworkSecurityGroups"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("PublicIPAddresses"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Public IP Addresses - Basic"),
		// 					Value: to.Ptr("PublicIPAddresses"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Properties: map[string]any{
		// 				},
		// 				ResourceType: to.Ptr("PublicIpAddresses"),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("PublicIpPrefixes"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Public Ip Prefixes"),
		// 					Value: to.Ptr("PublicIpPrefixes"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NatGateways"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Nat Gateways"),
		// 					Value: to.Ptr("NatGateways"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NetworkInterfaces"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Network Interfaces"),
		// 					Value: to.Ptr("NetworkInterfaces"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("PrivateEndpoints"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Private Endpoints"),
		// 					Value: to.Ptr("PrivateEndpoints"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("PrivateEndpointRedirectMaps"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Private Endpoint Redirect Maps"),
		// 					Value: to.Ptr("PrivateEndpointRedirectMaps"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("LoadBalancers"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Load Balancers"),
		// 					Value: to.Ptr("LoadBalancers"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("PrivateLinkServices"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Private Link Services"),
		// 					Value: to.Ptr("PrivateLinkServices"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("ApplicationGateways"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Application Gateways"),
		// 					Value: to.Ptr("ApplicationGateways"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("RouteTables"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Route Tables"),
		// 					Value: to.Ptr("RouteTables"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("RouteFilters"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Route Filters"),
		// 					Value: to.Ptr("RouteFilters"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("NetworkWatchers"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Network Watchers"),
		// 					Value: to.Ptr("NetworkWatchers"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("PacketCaptures"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Packet Captures"),
		// 					Value: to.Ptr("PacketCaptures"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("ApplicationSecurityGroups"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Application Security Groups."),
		// 					Value: to.Ptr("ApplicationSecurityGroups"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("StandardSkuLoadBalancers"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard Sku Load Balancers"),
		// 					Value: to.Ptr("StandardSkuLoadBalancers"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("StandardSkuPublicIpAddresses"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Public IP Addresses - Standard"),
		// 					Value: to.Ptr("StandardSkuPublicIpAddresses"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				ResourceType: to.Ptr("PublicIpAddresses"),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("DnsServersPerVirtualNetwork"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("DNS servers per Virtual Network"),
		// 					Value: to.Ptr("DnsServersPerVirtualNetwork"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(false),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/providers/Microsoft.Quota/usages/"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Min Public Ip InterNetwork Prefix Length"),
		// 					Value: to.Ptr("MinPublicIpInterNetworkPrefixLength"),
		// 				},
		// 				IsQuotaApplicable: to.Ptr(true),
		// 				Properties: map[string]any{
		// 				},
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

Example (QuotasListUsagesMachineLearningServices)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8691e5081766c7ad602a9e55de841d07bed5196a/specification/quota/resource-manager/Microsoft.Quota/stable/2025-03-01/examples/getMachineLearningServicesUsages.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/quota/armquota"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armquota.NewClientFactory(cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewUsagesClient().NewListPager("subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/eastus", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.UsagesLimits = armquota.UsagesLimits{
		// 	Value: []*armquota.CurrentUsagesBase{
		// 		{
		// 			Name: to.Ptr("standardDv2Family"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/eastus/providers/Microsoft.Quota/usages/standardDv2Family"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Standard Dv2 Family vCPUs"),
		// 					Value: to.Ptr("standardDv2Family"),
		// 				},
		// 				ResourceType: to.Ptr("dedicated"),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("totalLowPriorityCores"),
		// 			Type: to.Ptr("Microsoft.Quota/usages"),
		// 			ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.MachineLearningServices/locations/eastus/providers/Microsoft.Quota/usages/totalLowPriorityCores"),
		// 			Properties: &armquota.UsagesProperties{
		// 				Name: &armquota.ResourceName{
		// 					LocalizedValue: to.Ptr("Total Regional Low-priority vCPUs"),
		// 					Value: to.Ptr("totalLowPriorityCores"),
		// 				},
		// 				ResourceType: to.Ptr("lowPriority"),
		// 				Unit: to.Ptr("Count"),
		// 				Usages: &armquota.UsagesObject{
		// 					Value: to.Ptr[int32](10),
		// 				},
		// 			},
		// 	}},
		// }
	}
}
Output:

type UsagesClientGetOptions added in v0.2.0

type UsagesClientGetOptions struct {
}

UsagesClientGetOptions contains the optional parameters for the UsagesClient.Get method.

type UsagesClientGetResponse added in v0.2.0

type UsagesClientGetResponse struct {
	// Resource usage.
	CurrentUsagesBase

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

UsagesClientGetResponse contains the response from method UsagesClient.Get.

type UsagesClientListOptions added in v0.2.0

type UsagesClientListOptions struct {
}

UsagesClientListOptions contains the optional parameters for the UsagesClient.NewListPager method.

type UsagesClientListResponse added in v0.2.0

type UsagesClientListResponse struct {
	// Quota limits.
	UsagesLimits

	// ETag contains the information returned from the ETag header response.
	ETag *string
}

UsagesClientListResponse contains the response from method UsagesClient.NewListPager.

type UsagesLimits

type UsagesLimits struct {
	// The URI used to fetch the next page of quota limits. When there are no more pages, this is null.
	NextLink *string

	// List of quota limits.
	Value []*CurrentUsagesBase
}

UsagesLimits - Quota limits.

func (UsagesLimits) MarshalJSON

func (u UsagesLimits) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UsagesLimits.

func (*UsagesLimits) UnmarshalJSON added in v0.6.0

func (u *UsagesLimits) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UsagesLimits.

type UsagesObject

type UsagesObject struct {
	// REQUIRED; The usages value.
	Value *int32

	// The quota or usages limit types.
	UsagesType *UsagesTypes
}

UsagesObject - The resource usages value.

func (UsagesObject) MarshalJSON added in v0.6.0

func (u UsagesObject) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UsagesObject.

func (*UsagesObject) UnmarshalJSON added in v0.6.0

func (u *UsagesObject) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UsagesObject.

type UsagesProperties

type UsagesProperties struct {
	// Resource name provided by the resource provider. Use this property name when requesting quota.
	Name *ResourceName

	// Additional properties for the specific resource provider.
	Properties any

	// The name of the resource type. Optional field.
	ResourceType *string

	// The quota limit properties for this resource.
	Usages *UsagesObject

	// READ-ONLY; States if quota can be requested for this resource.
	IsQuotaApplicable *bool

	// READ-ONLY; The time period for the summary of the quota usage values. For example: *P1D (per one day) *PT1M (per one minute)
	// *PT1S (per one second). This parameter is optional because it is not relevant for all
	// resources such as compute.
	QuotaPeriod *string

	// READ-ONLY; The units for the quota usage, such as Count and Bytes. When requesting quota, use the unit value returned in
	// the GET response in the request body of your PUT operation.
	Unit *string
}

UsagesProperties - Usage properties for the specified resource.

func (UsagesProperties) MarshalJSON added in v0.6.0

func (u UsagesProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type UsagesProperties.

func (*UsagesProperties) UnmarshalJSON added in v0.6.0

func (u *UsagesProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type UsagesProperties.

type UsagesTypes

type UsagesTypes string

UsagesTypes - The quota or usages limit types.

const (
	UsagesTypesCombined   UsagesTypes = "Combined"
	UsagesTypesIndividual UsagesTypes = "Individual"
)

func PossibleUsagesTypesValues

func PossibleUsagesTypesValues() []UsagesTypes

PossibleUsagesTypesValues returns the possible values for the UsagesTypes const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL