Class LifecycleHook
java.lang.Object
com.azure.resourcemanager.compute.models.LifecycleHook
- All Implemented Interfaces:
com.azure.json.JsonSerializable<LifecycleHook>
public final class LifecycleHook
extends Object
implements com.azure.json.JsonSerializable<LifecycleHook>
Describes a lifecycle hook.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet 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 LifecycleHookfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of LifecycleHook from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: Specifies the type of the lifecycle hook.voidvalidate()Validates the instance.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.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.Set the type property: Specifies the type of the lifecycle hook.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 class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
LifecycleHook
public LifecycleHook()Creates an instance of LifecycleHook class.
-
-
Method Details
-
type
Get the type property: Specifies the type of the lifecycle hook.- Returns:
- the type value.
-
withType
Set the type property: Specifies the type of the lifecycle hook.- Parameters:
type- the type value to set.- Returns:
- the LifecycleHook object itself.
-
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.
-
withWaitDuration
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.
-
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.
-
withDefaultAction
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.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<LifecycleHook>- Throws:
IOException
-
fromJson
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.
-