Documentation ¶
Index ¶
- type Client
- func (client *Client) BeginCreateOrUpdate(ctx context.Context, resourceName string, scope string, ...) (*runtime.Poller[ClientCreateOrUpdateResponse], error)
- func (client *Client) BeginUpdate(ctx context.Context, resourceName string, scope string, ...) (*runtime.Poller[ClientUpdateResponse], error)
- func (client *Client) Get(ctx context.Context, resourceName string, scope string, ...) (ClientGetResponse, error)
- func (client *Client) NewListPager(scope string, options *ClientListOptions) *runtime.Pager[ClientListResponse]
- type ClientBeginCreateOrUpdateOptions
- type ClientBeginUpdateOptions
- type ClientCreateOrUpdateResponse
- type ClientFactory
- type ClientGetOptions
- type ClientGetResponse
- type ClientListOptions
- type ClientListResponse
- type ClientUpdateResponse
- type CommonResourceProperties
- type CreateGenericQuotaRequestParameters
- type CurrentQuotaLimitBase
- type CurrentUsagesBase
- type ExceptionResponse
- type LimitJSONObject
- type LimitJSONObjectClassification
- type LimitObject
- type LimitType
- type Limits
- type LimitsResponse
- type OperationClient
- type OperationClientListOptions
- type OperationClientListResponse
- type OperationDisplay
- type OperationList
- type OperationResponse
- type Properties
- type QuotaLimitTypes
- type QuotaRequestState
- type RequestDetails
- type RequestDetailsList
- type RequestOneResourceProperties
- type RequestOneResourceSubmitResponse
- type RequestProperties
- type RequestStatusClient
- type RequestStatusClientGetOptions
- type RequestStatusClientGetResponse
- type RequestStatusClientListOptions
- type RequestStatusClientListResponse
- type RequestStatusDetails
- type RequestSubmitResponse
- type RequestSubmitResponse202
- type ResourceName
- type ServiceError
- type ServiceErrorDetail
- type SubRequest
- type UsagesClient
- type UsagesClientGetOptions
- type UsagesClientGetResponse
- type UsagesClientListOptions
- type UsagesClientListResponse
- type UsagesLimits
- type UsagesObject
- type UsagesProperties
- type UsagesTypes
Examples ¶
- Client.BeginCreateOrUpdate (QuotasPutRequestForCompute)
- Client.BeginCreateOrUpdate (QuotasPutRequestForNetwork)
- Client.BeginCreateOrUpdate (QuotasPutRequestForNetworkStandardSkuPublicIpAddressesResource)
- Client.BeginCreateOrUpdate (QuotasRequestForMachineLearningServicesLowPriorityResource)
- Client.BeginUpdate (QuotasRequestPatchForCompute)
- Client.BeginUpdate (QuotasRequestPatchForNetwork)
- Client.Get (QuotasGetRequestForCompute)
- Client.Get (QuotasUsagesRequestForNetwork)
- Client.NewListPager (QuotasListQuotaLimitsForCompute)
- Client.NewListPager (QuotasListQuotaLimitsForNetwork)
- Client.NewListPager (QuotasListQuotaLimitsMachineLearningServices)
- OperationClient.NewListPager
- RequestStatusClient.Get (QuotaRequestFailed)
- RequestStatusClient.Get (QuotaRequestInProgress)
- RequestStatusClient.Get (QuotaRequestStatus)
- RequestStatusClient.NewListPager
- UsagesClient.Get (QuotasUsagesRequestForCompute)
- UsagesClient.Get (QuotasUsagesRequestForNetwork)
- UsagesClient.NewListPager (QuotasListUsagesForCompute)
- UsagesClient.NewListPager (QuotasListUsagesForNetwork)
- UsagesClient.NewListPager (QuotasListUsagesMachineLearningServices)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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 2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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 2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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 2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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 LRO 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 LRO 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) 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 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 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 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
MarshalJSON implements the json.Marshaller interface for type Limits.
func (*Limits) UnmarshalJSON ¶ added in v0.6.0
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
func (client *OperationClient) NewListPager(options *OperationClientListOptions) *runtime.Pager[OperationClientListResponse]
NewListPager - List all the operations supported by the Microsoft.Quota resource provider.
Generated from API version 2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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/usages/read"), // Display: &armquota.OperationDisplay{ // Description: to.Ptr("Get the current usages of the specified resource and location"), // Operation: to.Ptr("Get resource usages"), // Provider: to.Ptr("Microsoft Quota"), // Resource: to.Ptr("Resource current usages"), // }, // }, // { // Name: to.Ptr("Microsoft.Quota/quotas/read"), // Display: &armquota.OperationDisplay{ // Description: to.Ptr("Get the current service limit or quota of the specified resource and location"), // 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("Create service limit or quota for the specified resource and location"), // Operation: to.Ptr("Create resource quota limit"), // 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 quota request for the specified resource and location"), // Operation: to.Ptr("Get quota request"), // Provider: to.Ptr("Microsoft Quota"), // Resource: to.Ptr("Resource quota 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 QuotaLimitTypes ¶
type QuotaLimitTypes string
QuotaLimitTypes - The quota or usages limit types.
const ( QuotaLimitTypesIndependent QuotaLimitTypes = "Independent" )
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 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
func (client *RequestStatusClient) Get(ctx context.Context, id string, scope string, options *RequestStatusClientGetOptions) (RequestStatusClientGetResponse, error)
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 2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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
func (client *RequestStatusClient) NewListPager(scope string, options *RequestStatusClientListOptions) *runtime.Pager[RequestStatusClientListResponse]
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 2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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 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 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 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 2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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 2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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/db9788dde7a0c2c0d82e4fdf5f7b4de3843937e3/specification/quota/resource-manager/Microsoft.Quota/stable/2023-02-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.