VMScaleSetLifecycleHookEventProperties Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.fluent.models.VMScaleSetLifecycleHookEventProperties

Implements

public final class VMScaleSetLifecycleHookEventProperties
implements JsonSerializable<VMScaleSetLifecycleHookEventProperties>

Defines the virtual machine scale set lifecycle hook event properties.

Constructor Summary

Constructor Description
VMScaleSetLifecycleHookEventProperties()

Creates an instance of VMScaleSetLifecycleHookEventProperties class.

Method Summary

Modifier and Type Method and Description
VMScaleSetLifecycleHookEventAdditionalContext additionalContext()

Get the additionalContext property: Additional key-value pairs set on the lifecycle hook event that gives customer some useful context/data.

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.

static VMScaleSetLifecycleHookEventProperties fromJson(JsonReader jsonReader)

Reads an instance of VMScaleSetLifecycleHookEventProperties from the JsonReader.

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.

VMScaleSetLifecycleHookEventState state()

Get the state property: Specifies the state of the virtual machine scale set lifecycle hook event.

List<VMScaleSetLifecycleHookEventTargetResource> targetResources()

Get the targetResources property: List of target resources which are getting processed in the virtual machine scale set lifecycle hook event.

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.

JsonWriter toJson(JsonWriter jsonWriter)
VMScaleSetLifecycleHookEventType type()

Get the type property: Defines the type or scenario for sending a virtual machine scale set lifecycle hook event to the customer.

void validate()

Validates the instance.

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.

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.

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.

VMScaleSetLifecycleHookEventProperties withType(VMScaleSetLifecycleHookEventType type)

Set the type property: Defines the type or scenario for sending a virtual machine scale set lifecycle hook event to the customer.

VMScaleSetLifecycleHookEventProperties 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 java.lang.Object

Constructor Details

VMScaleSetLifecycleHookEventProperties

public VMScaleSetLifecycleHookEventProperties()

Creates an instance of VMScaleSetLifecycleHookEventProperties class.

Method Details

additionalContext

public VMScaleSetLifecycleHookEventAdditionalContext 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.

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.

fromJson

public static VMScaleSetLifecycleHookEventProperties fromJson(JsonReader jsonReader)

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.

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.

state

public VMScaleSetLifecycleHookEventState state()

Get the state property: Specifies the state of the virtual machine scale set lifecycle hook event.

Returns:

the state value.

targetResources

public List<VMScaleSetLifecycleHookEventTargetResource> 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.

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public VMScaleSetLifecycleHookEventType 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.

validate

public void validate()

Validates the instance.

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.

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.

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.

withType

public VMScaleSetLifecycleHookEventProperties withType(VMScaleSetLifecycleHookEventType type)

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.

withWaitUntil

public VMScaleSetLifecycleHookEventProperties 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 VMScaleSetLifecycleHookEventProperties object itself.

Applies to