VMScaleSetLifecycleHookEventAdditionalContext Class

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

Implements

public final class VMScaleSetLifecycleHookEventAdditionalContext
implements JsonSerializable<VMScaleSetLifecycleHookEventAdditionalContext>

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.

Constructor Summary

Constructor Description
VMScaleSetLifecycleHookEventAdditionalContext()

Creates an instance of VMScaleSetLifecycleHookEventAdditionalContext class.

Method Summary

Modifier and Type Method and Description
static VMScaleSetLifecycleHookEventAdditionalContext fromJson(JsonReader jsonReader)

Reads an instance of VMScaleSetLifecycleHookEventAdditionalContext from the JsonReader.

String priority()

Get the priority property: Can only be present for a lifecycle hook event of type "UpgradeAutoOSScheduling".

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

VMScaleSetLifecycleHookEventAdditionalContext withPriority(String priority)

Set the priority property: Can only be present for a lifecycle hook event of type "UpgradeAutoOSScheduling".

Methods inherited from java.lang.Object

Constructor Details

VMScaleSetLifecycleHookEventAdditionalContext

public VMScaleSetLifecycleHookEventAdditionalContext()

Creates an instance of VMScaleSetLifecycleHookEventAdditionalContext class.

Method Details

fromJson

public static VMScaleSetLifecycleHookEventAdditionalContext fromJson(JsonReader jsonReader)

Reads an instance of VMScaleSetLifecycleHookEventAdditionalContext from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

priority

public String priority()

Get the priority property: Can only be present for a lifecycle hook event of type "UpgradeAutoOSScheduling". Denotes the priority of the virtual machine scale set lifecycle hook event for the Auto OS Upgrade scheduled on the virtual machine scale set.

Returns:

the priority value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withPriority

public VMScaleSetLifecycleHookEventAdditionalContext withPriority(String priority)

Set the priority property: Can only be present for a lifecycle hook event of type "UpgradeAutoOSScheduling". Denotes the priority of the virtual machine scale set lifecycle hook event for the Auto OS Upgrade scheduled on the virtual machine scale set.

Parameters:

priority - the priority value to set.

Returns:

the VMScaleSetLifecycleHookEventAdditionalContext object itself.

Applies to