maintenances
Creates, updates, deletes, gets or lists a maintenances resource.
Overview
| Name | maintenances |
| Type | Resource |
| Id | azure_isv.avs.maintenances |
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. |
clusterId | integer | Cluster ID for on which maintenance will be applied. Empty if maintenance is at private cloud level. |
component | string | type of maintenance. Known values are: "VCSA", "ESXI", and "NSXT". (VCSA, ESXI, NSXT) |
displayName | string | Display name for maintenance. |
estimatedDurationInMinutes | integer | Estimated time maintenance will take in minutes. |
impact | string | Impact on the resource during maintenance period. |
infoLink | string | Link to maintenance info. |
maintenanceReadiness | object | Indicates whether the maintenance is ready to proceed. |
operations | array | Operations on maintenance. |
provisioningState | string | The provisioning state. Known values are: "Succeeded", "Failed", "Canceled", and "Updating". (Succeeded, Failed, Canceled, Updating) |
scheduledByMicrosoft | boolean | If maintenance is scheduled by Microsoft. |
scheduledStartTime | string (date-time) | Scheduled maintenance start time. |
state | object | The state of the maintenance. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| 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. |
clusterId | integer | Cluster ID for on which maintenance will be applied. Empty if maintenance is at private cloud level. |
component | string | type of maintenance. Known values are: "VCSA", "ESXI", and "NSXT". (VCSA, ESXI, NSXT) |
displayName | string | Display name for maintenance. |
estimatedDurationInMinutes | integer | Estimated time maintenance will take in minutes. |
impact | string | Impact on the resource during maintenance period. |
infoLink | string | Link to maintenance info. |
maintenanceReadiness | object | Indicates whether the maintenance is ready to proceed. |
operations | array | Operations on maintenance. |
provisioningState | string | The provisioning state. Known values are: "Succeeded", "Failed", "Canceled", and "Updating". (Succeeded, Failed, Canceled, Updating) |
scheduledByMicrosoft | boolean | If maintenance is scheduled by Microsoft. |
scheduledStartTime | string (date-time) | Scheduled maintenance start time. |
state | object | The state of the maintenance. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, private_cloud_name, maintenance_name, subscription_id | Get a Maintenance. | |
list | select | resource_group_name, private_cloud_name, subscription_id | stateName, status, from, to | List Maintenance resources by subscription ID. |
reschedule | exec | resource_group_name, private_cloud_name, maintenance_name, subscription_id | Reschedule a maintenance. | |
schedule | exec | resource_group_name, private_cloud_name, maintenance_name, subscription_id | Schedule a maintenance. | |
initiate_checks | exec | resource_group_name, private_cloud_name, maintenance_name, subscription_id | Initiate maintenance readiness checks. |
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 |
|---|---|---|
maintenance_name | string | Name of the maintenance. Required. |
private_cloud_name | string | Name of the private cloud. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
from | string (date-time) | date from which result should be returned. ie. scheduledStartTime >= from. Default value is None. |
stateName | string | Filter maintenances based on state. Known values are: "NotScheduled", "Scheduled", "InProgress", "Success", "Failed", and "Canceled". Default value is None. |
status | string | Filter active or inactive maintenances. Known values are: "Active" and "Inactive". Default value is None. |
to | string (date-time) | date till which result should be returned. i.e. scheduledStartTime <= to. Default value is None. |
SELECT examples
- get
- list
Get a Maintenance.
SELECT
id,
name,
clusterId,
component,
displayName,
estimatedDurationInMinutes,
impact,
infoLink,
maintenanceReadiness,
operations,
provisioningState,
scheduledByMicrosoft,
scheduledStartTime,
state,
systemData,
type
FROM azure_isv.avs.maintenances
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND private_cloud_name = '{{ private_cloud_name }}' -- required
AND maintenance_name = '{{ maintenance_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List Maintenance resources by subscription ID.
SELECT
id,
name,
clusterId,
component,
displayName,
estimatedDurationInMinutes,
impact,
infoLink,
maintenanceReadiness,
operations,
provisioningState,
scheduledByMicrosoft,
scheduledStartTime,
state,
systemData,
type
FROM azure_isv.avs.maintenances
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND private_cloud_name = '{{ private_cloud_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND stateName = '{{ stateName }}'
AND status = '{{ status }}'
AND from = '{{ from }}'
AND to = '{{ to }}'
;
Lifecycle Methods
- reschedule
- schedule
- initiate_checks
Reschedule a maintenance.
EXEC azure_isv.avs.maintenances.reschedule
@resource_group_name='{{ resource_group_name }}' --required,
@private_cloud_name='{{ private_cloud_name }}' --required,
@maintenance_name='{{ maintenance_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"rescheduleTime": "{{ rescheduleTime }}",
"message": "{{ message }}"
}'
;
Schedule a maintenance.
EXEC azure_isv.avs.maintenances.schedule
@resource_group_name='{{ resource_group_name }}' --required,
@private_cloud_name='{{ private_cloud_name }}' --required,
@maintenance_name='{{ maintenance_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"scheduleTime": "{{ scheduleTime }}",
"message": "{{ message }}"
}'
;
Initiate maintenance readiness checks.
EXEC azure_isv.avs.maintenances.initiate_checks
@resource_group_name='{{ resource_group_name }}' --required,
@private_cloud_name='{{ private_cloud_name }}' --required,
@maintenance_name='{{ maintenance_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;