VmScaleSetLifecycleHookEventCollection.GetAsync 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.
Gets a virtual machine scale set lifecycle hook event.
- Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/lifecycleHookEvents/{lifecycleHookEventName}
- Operation Id: VirtualMachineScaleSetLifeCycleHookEvents_Get
- Default Api Version: 2025-11-01
- Resource: VmScaleSetLifecycleHookEventResource
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Compute.VmScaleSetLifecycleHookEventResource>> GetAsync(string lifecycleHookEventName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Compute.VmScaleSetLifecycleHookEventResource>>
override this.GetAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Compute.VmScaleSetLifecycleHookEventResource>>
Public Overridable Function GetAsync (lifecycleHookEventName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of VmScaleSetLifecycleHookEventResource))
Parameters
- lifecycleHookEventName
- String
The name of the VMScaleSetLifecycleHookEvent.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
lifecycleHookEventName is an empty string, and was expected to be non-empty.
lifecycleHookEventName is null.