Class VMScaleSetLifecycleHookEventProperties
java.lang.Object
com.azure.resourcemanager.compute.fluent.models.VMScaleSetLifecycleHookEventProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<VMScaleSetLifecycleHookEventProperties>
public final class VMScaleSetLifecycleHookEventProperties
extends Object
implements com.azure.json.JsonSerializable<VMScaleSetLifecycleHookEventProperties>
Defines the virtual machine scale set lifecycle hook event properties.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of VMScaleSetLifecycleHookEventProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the additionalContext property: Additional key-value pairs set on the lifecycle hook event that gives customer some useful context/data.Get the defaultAction property: Specify the action that will be applied on the a target resource in the virtual machine scale set lifecycle hook event if the platform does not get a response from the customer for the target resource before waitUntil.fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of VMScaleSetLifecycleHookEventProperties from the JsonReader.Get the maxWaitUntil property: Specifies the exact UTC timestamp in ISO 8601 format till when the customer can delay the lifecycle hook event.state()Get the state property: Specifies the state of the virtual machine scale set lifecycle hook event.Get the targetResources property: List of target resources which are getting processed in the virtual machine scale set lifecycle hook event.Get the timeCreated property: The UTC timestamp in ISO 8601 format at which the platform creates the virtual machine scale set lifecycle hook event entity.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: Defines the type or scenario for sending a virtual machine scale set lifecycle hook event to the customer.voidvalidate()Validates the instance.Get the waitUntil property: Specifies the exact UTC timestamp in ISO 8601 format till which the event would remain in the current lifecycle state waiting for an action from the customer.withAdditionalContext(VMScaleSetLifecycleHookEventAdditionalContext additionalContext) Set the additionalContext property: Additional key-value pairs set on the lifecycle hook event that gives customer some useful context/data.withTargetResources(List<VMScaleSetLifecycleHookEventTargetResource> targetResources) Set the targetResources property: List of target resources which are getting processed in the virtual machine scale set lifecycle hook event.Set the type property: Defines the type or scenario for sending a virtual machine scale set lifecycle hook event to the customer.withWaitUntil(String waitUntil) Set the waitUntil property: Specifies the exact UTC timestamp in ISO 8601 format till which the event would remain in the current lifecycle state waiting for an action 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
-
VMScaleSetLifecycleHookEventProperties
public VMScaleSetLifecycleHookEventProperties()Creates an instance of VMScaleSetLifecycleHookEventProperties class.
-
-
Method Details
-
type
Get the type property: Defines the type or scenario for sending a virtual machine scale set lifecycle hook event to the customer.- Returns:
- the type value.
-
withType
Set the type property: Defines the type or scenario for sending a virtual machine scale set lifecycle hook event to the customer.- Parameters:
type- the type value to set.- Returns:
- the VMScaleSetLifecycleHookEventProperties object itself.
-
waitUntil
Get the waitUntil property: Specifies the exact UTC timestamp in ISO 8601 format till which the event would remain in the current lifecycle state waiting for an action from the customer. Beyond this timestamp, the platform will apply the defaultAction for the event.- Returns:
- the waitUntil value.
-
withWaitUntil
Set the waitUntil property: Specifies the exact UTC timestamp in ISO 8601 format till which the event would remain in the current lifecycle state waiting for an action from the customer. Beyond this timestamp, the platform will apply the defaultAction for the event.- Parameters:
waitUntil- the waitUntil value to set.- Returns:
- the VMScaleSetLifecycleHookEventProperties object itself.
-
maxWaitUntil
Get the maxWaitUntil property: Specifies the exact UTC timestamp in ISO 8601 format till when the customer can delay the lifecycle hook event. The customer will not be allowed to delay the event to a timestamp beyond this.- Returns:
- the maxWaitUntil value.
-
timeCreated
Get the timeCreated property: The UTC timestamp in ISO 8601 format at which the platform creates the virtual machine scale set lifecycle hook event entity.- Returns:
- the timeCreated value.
-
defaultAction
Get the defaultAction property: Specify the action that will be applied on the a target resource in the virtual machine scale set lifecycle hook event if the platform does not get a response from the customer for the target resource before waitUntil.- Returns:
- the defaultAction value.
-
targetResources
Get the targetResources property: List of target resources which are getting processed in the virtual machine scale set lifecycle hook event.- Returns:
- the targetResources value.
-
withTargetResources
public VMScaleSetLifecycleHookEventProperties withTargetResources(List<VMScaleSetLifecycleHookEventTargetResource> targetResources) Set the targetResources property: List of target resources which are getting processed in the virtual machine scale set lifecycle hook event.- Parameters:
targetResources- the targetResources value to set.- Returns:
- the VMScaleSetLifecycleHookEventProperties object itself.
-
additionalContext
Get the additionalContext property: Additional key-value pairs set on the lifecycle hook event that gives customer some useful context/data. The keys in this dictionary are specific to the lifecycle hook type. Different lifecycle hook events can have different sets of keys in the additional context depending on the lifecycle hook type. For example, for a lifecycle hook event with UpgradeAutoOSScheduling type, the additional context can contain the key "priority" that helps customer identify the priority of the Auto OS Upgrade operation triggered on the virtual machine scale set.- Returns:
- the additionalContext value.
-
withAdditionalContext
public VMScaleSetLifecycleHookEventProperties withAdditionalContext(VMScaleSetLifecycleHookEventAdditionalContext additionalContext) Set the additionalContext property: Additional key-value pairs set on the lifecycle hook event that gives customer some useful context/data. The keys in this dictionary are specific to the lifecycle hook type. Different lifecycle hook events can have different sets of keys in the additional context depending on the lifecycle hook type. For example, for a lifecycle hook event with UpgradeAutoOSScheduling type, the additional context can contain the key "priority" that helps customer identify the priority of the Auto OS Upgrade operation triggered on the virtual machine scale set.- Parameters:
additionalContext- the additionalContext value to set.- Returns:
- the VMScaleSetLifecycleHookEventProperties object itself.
-
state
Get the state property: Specifies the state of the virtual machine scale set lifecycle hook event.- Returns:
- the state value.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<VMScaleSetLifecycleHookEventProperties>- Throws:
IOException
-
fromJson
public static VMScaleSetLifecycleHookEventProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of VMScaleSetLifecycleHookEventProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of VMScaleSetLifecycleHookEventProperties 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 VMScaleSetLifecycleHookEventProperties.
-