Class VMScaleSetLifecycleHookEventUpdate

java.lang.Object
com.azure.resourcemanager.compute.models.VMScaleSetLifecycleHookEventUpdate
All Implemented Interfaces:
com.azure.json.JsonSerializable<VMScaleSetLifecycleHookEventUpdate>

public final class VMScaleSetLifecycleHookEventUpdate extends Object implements com.azure.json.JsonSerializable<VMScaleSetLifecycleHookEventUpdate>
Specifies information about the virtual machine scale set lifecycle hook event.
  • Constructor Details

    • VMScaleSetLifecycleHookEventUpdate

      public VMScaleSetLifecycleHookEventUpdate()
      Creates an instance of VMScaleSetLifecycleHookEventUpdate 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 VMScaleSetLifecycleHookEventUpdate object itself.
    • waitUntil

      public String 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

      public VMScaleSetLifecycleHookEventUpdate 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. Beyond this timestamp, the platform will apply the defaultAction for the event.
      Parameters:
      waitUntil - the waitUntil value to set.
      Returns:
      the VMScaleSetLifecycleHookEventUpdate object itself.
    • maxWaitUntil

      public String 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

      public String 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

      public LifecycleHookAction 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

      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 VMScaleSetLifecycleHookEventUpdate 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

      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 VMScaleSetLifecycleHookEventUpdate 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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<VMScaleSetLifecycleHookEventUpdate>
      Throws:
      IOException
    • fromJson

      public static VMScaleSetLifecycleHookEventUpdate fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of VMScaleSetLifecycleHookEventUpdate from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of VMScaleSetLifecycleHookEventUpdate 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 VMScaleSetLifecycleHookEventUpdate.