LifecycleHook Class

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

Implements

public final class LifecycleHook
implements JsonSerializable<LifecycleHook>

Describes a lifecycle hook.

Constructor Summary

Constructor Description
LifecycleHook()

Creates an instance of LifecycleHook class.

Method Summary

Modifier and Type Method and Description
LifecycleHookAction defaultAction()

Get the defaultAction property: Specifies the action that will be applied to a target resource in the virtual machine scale set lifecycle hook event if the platform does not receive a response from the customer for the target resource before waitUntil.

static LifecycleHook fromJson(JsonReader jsonReader)

Reads an instance of LifecycleHook from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
VMScaleSetLifecycleHookEventType type()

Get the type property: Specifies the type of the lifecycle hook.

void validate()

Validates the instance.

Duration waitDuration()

Get the waitDuration property: Specifies the time duration a virtual machine scale set lifecycle hook event sent to the customer waits for a response from the customer.

LifecycleHook withDefaultAction(LifecycleHookAction defaultAction)

Set the defaultAction property: Specifies the action that will be applied to a target resource in the virtual machine scale set lifecycle hook event if the platform does not receive a response from the customer for the target resource before waitUntil.

LifecycleHook withType(VMScaleSetLifecycleHookEventType type)

Set the type property: Specifies the type of the lifecycle hook.

LifecycleHook withWaitDuration(Duration waitDuration)

Set the waitDuration property: Specifies the time duration a virtual machine scale set lifecycle hook event sent to the customer waits for a response from the customer.

Methods inherited from java.lang.Object

Constructor Details

LifecycleHook

public LifecycleHook()

Creates an instance of LifecycleHook class.

Method Details

defaultAction

public LifecycleHookAction defaultAction()

Get the defaultAction property: Specifies the action that will be applied to a target resource in the virtual machine scale set lifecycle hook event if the platform does not receive a response from the customer for the target resource before waitUntil.

Returns:

the defaultAction value.

fromJson

public static LifecycleHook fromJson(JsonReader jsonReader)

Reads an instance of LifecycleHook from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of LifecycleHook 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 LifecycleHook.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public VMScaleSetLifecycleHookEventType type()

Get the type property: Specifies the type of the lifecycle hook.

Returns:

the type value.

validate

public void validate()

Validates the instance.

waitDuration

public Duration waitDuration()

Get the waitDuration property: Specifies the time duration a virtual machine scale set lifecycle hook event sent to the customer waits for a response from the customer. It should be in ISO 8601 format.

Returns:

the waitDuration value.

withDefaultAction

public LifecycleHook withDefaultAction(LifecycleHookAction defaultAction)

Set the defaultAction property: Specifies the action that will be applied to a target resource in the virtual machine scale set lifecycle hook event if the platform does not receive a response from the customer for the target resource before waitUntil.

Parameters:

defaultAction - the defaultAction value to set.

Returns:

the LifecycleHook object itself.

withType

public LifecycleHook withType(VMScaleSetLifecycleHookEventType type)

Set the type property: Specifies the type of the lifecycle hook.

Parameters:

type - the type value to set.

Returns:

the LifecycleHook object itself.

withWaitDuration

public LifecycleHook withWaitDuration(Duration waitDuration)

Set the waitDuration property: Specifies the time duration a virtual machine scale set lifecycle hook event sent to the customer waits for a response from the customer. It should be in ISO 8601 format.

Parameters:

waitDuration - the waitDuration value to set.

Returns:

the LifecycleHook object itself.

Applies to