Language

MockableContainerServiceAIManagerSubscriptionResource.GetAIModelAsync Method

Definition

Get a AIModel

  • Request Path. : /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/aiModels/{aiModelName}.
  • Operation Id. : AIModels_Get.
  • Default Api Version. : 2026-09-02-preview.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ContainerServiceAIManager.AIModelResource>> GetAIModelAsync(Azure.Core.AzureLocation location, string aiModelName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAIModelAsync : Azure.Core.AzureLocation * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ContainerServiceAIManager.AIModelResource>>
override this.GetAIModelAsync : Azure.Core.AzureLocation * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.ContainerServiceAIManager.AIModelResource>>
Public Overridable Function GetAIModelAsync (location As AzureLocation, aiModelName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AIModelResource))

Parameters

location
AzureLocation

The location for the resource.

aiModelName
String

The name of the AI model resource. A stable, format-defined identifier derived from modelId as the lowercase hex of the first 8 bytes (16 characters) of SHA-256(modelId) (e.g. upstream microsoft/Phi-4-mini-instruct produces 9806f0c862fdd920). Callers should treat the name as opaque and use the modelId property as the human-readable reference. The encoding is a permanent contract of this resource provider and does not depend on any upstream naming policy.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

aiModelName is null.

aiModelName is an empty string, and was expected to be non-empty.

Applies to