Language

CognitiveServicesExtensions.GetCognitiveServicesManagedComputeCapacities Method

Definition

Gets the managed compute capacities for a subscription. Returns available capacity per accelerator type, including deployment size information. <item> Mocking. To mock this method, please mock GetCognitiveServicesManagedComputeCapacities(String, String, ResourceIdentifier, Nullable<AzureLocation>, CancellationToken) instead. </item>

public static Azure.Pageable<Azure.ResourceManager.CognitiveServices.Models.CognitiveServicesManagedComputeCapacity> GetCognitiveServicesManagedComputeCapacities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string offer, string acceleratorType = default, Azure.Core.ResourceIdentifier deploymentId = default, Azure.Core.AzureLocation? location = default, System.Threading.CancellationToken cancellationToken = default);
static member GetCognitiveServicesManagedComputeCapacities : Azure.ResourceManager.Resources.SubscriptionResource * string * string * Azure.Core.ResourceIdentifier * Nullable<Azure.Core.AzureLocation> * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.CognitiveServices.Models.CognitiveServicesManagedComputeCapacity>
<Extension()>
Public Function GetCognitiveServicesManagedComputeCapacities (subscriptionResource As SubscriptionResource, offer As String, Optional acceleratorType As String = Nothing, Optional deploymentId As ResourceIdentifier = Nothing, Optional location As Nullable(Of AzureLocation) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of CognitiveServicesManagedComputeCapacity)

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource the method will execute against.

offer
String

The offer name to query capacity for (required).

acceleratorType
String

Optional accelerator type filter to narrow results to a specific accelerator type.

deploymentId
ResourceIdentifier

Optional deployment resource ID. When provided, returns capacity for the specific region where the deployment is hosted rather than the best available region.

location
Nullable<AzureLocation>

Optional Azure location used to select a DataZone scope. Without a deployment ID, omitted or blank location returns Global and both US and EU DataZone capacities. A supported location returns Global and the matching DataZone capacities; an unsupported location returns Global capacity only. With a deployment ID, a nonblank location must match the parent account location, ignoring case and surrounding whitespace, or the request returns HTTP 400. Capacity is still returned for the deployment's backend region.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of CognitiveServicesManagedComputeCapacity that may take multiple service requests to iterate over.

Exceptions

subscriptionResource is null.

Applies to