MockableHciSubscriptionResource.GetOsImageAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Get a os image.
- Request Path. : /subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/osImages/{osImageName}.
- Operation Id. : OsImages_Get.
- Default Api Version. : 2026-04-01-preview.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Hci.OsImageResource>> GetOsImageAsync(Azure.Core.AzureLocation location, string osImageName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetOsImageAsync : Azure.Core.AzureLocation * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Hci.OsImageResource>>
override this.GetOsImageAsync : Azure.Core.AzureLocation * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Hci.OsImageResource>>
Public Overridable Function GetOsImageAsync (location As AzureLocation, osImageName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of OsImageResource))
Parameters
- location
- AzureLocation
The location for the resource.
- osImageName
- String
The name of the OsImage.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
osImageName is null.
osImageName is an empty string, and was expected to be non-empty.