Skip to main content

maintenances

Creates, updates, deletes, gets or lists a maintenances resource.

Overview

Namemaintenances
TypeResource
Idazure_isv.avs.maintenances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
clusterIdintegerCluster ID for on which maintenance will be applied. Empty if maintenance is at private cloud level.
componentstringtype of maintenance. Known values are: "VCSA", "ESXI", and "NSXT". (VCSA, ESXI, NSXT)
displayNamestringDisplay name for maintenance.
estimatedDurationInMinutesintegerEstimated time maintenance will take in minutes.
impactstringImpact on the resource during maintenance period.
infoLinkstringLink to maintenance info.
maintenanceReadinessobjectIndicates whether the maintenance is ready to proceed.
operationsarrayOperations on maintenance.
provisioningStatestringThe provisioning state. Known values are: "Succeeded", "Failed", "Canceled", and "Updating". (Succeeded, Failed, Canceled, Updating)
scheduledByMicrosoftbooleanIf maintenance is scheduled by Microsoft.
scheduledStartTimestring (date-time)Scheduled maintenance start time.
stateobjectThe state of the maintenance.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, private_cloud_name, maintenance_name, subscription_idGet a Maintenance.
listselectresource_group_name, private_cloud_name, subscription_idstateName, status, from, toList Maintenance resources by subscription ID.
rescheduleexecresource_group_name, private_cloud_name, maintenance_name, subscription_idReschedule a maintenance.
scheduleexecresource_group_name, private_cloud_name, maintenance_name, subscription_idSchedule a maintenance.
initiate_checksexecresource_group_name, private_cloud_name, maintenance_name, subscription_idInitiate 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.

NameDatatypeDescription
maintenance_namestringName of the maintenance. Required.
private_cloud_namestringName of the private cloud. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
fromstring (date-time)date from which result should be returned. ie. scheduledStartTime >= from. Default value is None.
stateNamestringFilter maintenances based on state. Known values are: "NotScheduled", "Scheduled", "InProgress", "Success", "Failed", and "Canceled". Default value is None.
statusstringFilter active or inactive maintenances. Known values are: "Active" and "Inactive". Default value is None.
tostring (date-time)date till which result should be returned. i.e. scheduledStartTime <= to. Default value is None.

SELECT examples

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
;

Lifecycle Methods

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 }}"
}'
;