virtual_machine_scale_set_life_cycle_hook_events
Creates, updates, deletes, gets or lists a virtual_machine_scale_set_life_cycle_hook_events resource.
Overview
| Name | virtual_machine_scale_set_life_cycle_hook_events |
| Type | Resource |
| Id | azure.compute.virtual_machine_scale_set_life_cycle_hook_events |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
additionalContext | object | 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. |
defaultAction | string | 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. Known values are: "Approve" and "Reject". (Approve, Reject) |
maxWaitUntil | string | 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. |
state | string | Specifies the state of the virtual machine scale set lifecycle hook event. Known values are: "Active" and "Completed". (Active, Completed) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetResources | array | List of target resources which are getting processed in the virtual machine scale set lifecycle hook event. |
timeCreated | string | The UTC timestamp in ISO 8601 format at which the platform creates the virtual machine scale set lifecycle hook event entity. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
waitUntil | string | 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. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
additionalContext | object | 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. |
defaultAction | string | 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. Known values are: "Approve" and "Reject". (Approve, Reject) |
maxWaitUntil | string | 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. |
state | string | Specifies the state of the virtual machine scale set lifecycle hook event. Known values are: "Active" and "Completed". (Active, Completed) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetResources | array | List of target resources which are getting processed in the virtual machine scale set lifecycle hook event. |
timeCreated | string | The UTC timestamp in ISO 8601 format at which the platform creates the virtual machine scale set lifecycle hook event entity. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
waitUntil | string | 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. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, vm_scale_set_name, lifecycle_hook_event_name, subscription_id | Gets a virtual machine scale set lifecycle hook event. | |
list | select | resource_group_name, vm_scale_set_name, subscription_id | Gets a list of virtual machine scale set lifecycle hook events created for a virtual machine scale set resource. | |
update | update | resource_group_name, vm_scale_set_name, lifecycle_hook_event_name, subscription_id | The operation to update a virtual machine scale set lifecycle hook event. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
lifecycle_hook_event_name | string | The name of the VMScaleSetLifecycleHookEvent. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
vm_scale_set_name | string | The name of the VM scale set. Required. |
SELECT examples
- get
- list
Gets a virtual machine scale set lifecycle hook event.
SELECT
id,
name,
additionalContext,
defaultAction,
maxWaitUntil,
state,
systemData,
targetResources,
timeCreated,
type,
waitUntil
FROM azure.compute.virtual_machine_scale_set_life_cycle_hook_events
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND vm_scale_set_name = '{{ vm_scale_set_name }}' -- required
AND lifecycle_hook_event_name = '{{ lifecycle_hook_event_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets a list of virtual machine scale set lifecycle hook events created for a virtual machine scale set resource.
SELECT
id,
name,
additionalContext,
defaultAction,
maxWaitUntil,
state,
systemData,
targetResources,
timeCreated,
type,
waitUntil
FROM azure.compute.virtual_machine_scale_set_life_cycle_hook_events
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND vm_scale_set_name = '{{ vm_scale_set_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
UPDATE examples
- update
The operation to update a virtual machine scale set lifecycle hook event.
UPDATE azure.compute.virtual_machine_scale_set_life_cycle_hook_events
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND vm_scale_set_name = '{{ vm_scale_set_name }}' --required
AND lifecycle_hook_event_name = '{{ lifecycle_hook_event_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;