VMScaleSetLifecycleHookEventTargetResource Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.VMScaleSetLifecycleHookEventTargetResource

Implements

public final class VMScaleSetLifecycleHookEventTargetResource
implements JsonSerializable<VMScaleSetLifecycleHookEventTargetResource>

Define a single target ARM resource in a virtual machine scale set lifecycle hook event. Currently, this can be a virtual machine scale set resource or an individual virtual machine resource within a VMScaleSet.

Constructor Summary

Constructor Description
VMScaleSetLifecycleHookEventTargetResource()

Creates an instance of VMScaleSetLifecycleHookEventTargetResource class.

Method Summary

Modifier and Type Method and Description
LifecycleHookActionState actionState()

Get the actionState property: State of the lifecycle hook for the target resource.

static VMScaleSetLifecycleHookEventTargetResource fromJson(JsonReader jsonReader)

Reads an instance of VMScaleSetLifecycleHookEventTargetResource from the JsonReader.

ApiEntityReference resource()

Get the resource property: Specifies the target ARM resource.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

VMScaleSetLifecycleHookEventTargetResource withActionState(LifecycleHookActionState actionState)

Set the actionState property: State of the lifecycle hook for the target resource.

VMScaleSetLifecycleHookEventTargetResource withResource(ApiEntityReference resource)

Set the resource property: Specifies the target ARM resource.

Methods inherited from java.lang.Object

Constructor Details

VMScaleSetLifecycleHookEventTargetResource

public VMScaleSetLifecycleHookEventTargetResource()

Creates an instance of VMScaleSetLifecycleHookEventTargetResource class.

Method Details

actionState

public LifecycleHookActionState actionState()

Get the actionState property: State of the lifecycle hook for the target resource. The customer can patch this property to move the lifecycle hook to a terminal state.

Returns:

the actionState value.

fromJson

public static VMScaleSetLifecycleHookEventTargetResource fromJson(JsonReader jsonReader)

Reads an instance of VMScaleSetLifecycleHookEventTargetResource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of VMScaleSetLifecycleHookEventTargetResource if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the VMScaleSetLifecycleHookEventTargetResource.

resource

public ApiEntityReference resource()

Get the resource property: Specifies the target ARM resource. Currently, this can be a virtual machine scale set resource or an individual virtual machine resource within a VMScaleSet.

Returns:

the resource value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withActionState

public VMScaleSetLifecycleHookEventTargetResource withActionState(LifecycleHookActionState actionState)

Set the actionState property: State of the lifecycle hook for the target resource. The customer can patch this property to move the lifecycle hook to a terminal state.

Parameters:

actionState - the actionState value to set.

Returns:

the VMScaleSetLifecycleHookEventTargetResource object itself.

withResource

public VMScaleSetLifecycleHookEventTargetResource withResource(ApiEntityReference resource)

Set the resource property: Specifies the target ARM resource. Currently, this can be a virtual machine scale set resource or an individual virtual machine resource within a VMScaleSet.

Parameters:

resource - the resource value to set.

Returns:

the VMScaleSetLifecycleHookEventTargetResource object itself.

Applies to