swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Azure Maintenance Management Client
  title: MaintenanceManagementClient
  version: 2018-06-01-preview
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2018-06-01-preview/Maintenance.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: maintenance-Maintenance
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
parameters:
  ApiVersionParameter:
    description: Version of the API to be used with the client request.
    in: query
    name: api-version
    required: true
    type: string
  SubscriptionIdParameter:
    description: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
    in: path
    name: subscriptionId
    required: true
    type: string
paths:
  /providers/Microsoft.Maintenance/operations:
    get:
      consumes: []
      description: List the available operations supported by the Microsoft.Maintenance resource provider
      operationId: Operations_List
      parameters:
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/OperationsListResult"
        default:
          description: BadRequest
          schema:
            $ref: "#/definitions/MaintenanceError"
      summary: List available operations
      tags:
        - Operations
      x-ms-examples:
        Operations_List:
          parameters:
            api-version: 2018-06-01-preview
          responses:
            "200":
              body:
                value: []
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/providers/Microsoft.Maintenance/maintenanceConfigurations":
    get:
      consumes: []
      operationId: MaintenanceConfigurations_List
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ListMaintenanceConfigurationsResult"
        default:
          description: BadRequest
          schema:
            $ref: "#/definitions/MaintenanceError"
      summary: Get Configuration records within a subscription
      tags:
        - MaintenanceConfigurations
      x-ms-examples:
        MaintenanceConfigurations_List:
          parameters:
            api-version: 2018-06-01-preview
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1
                    location: westus2
                    name: configuration1
                    properties:
                      maintenanceScope: All
                      namespace: Microsoft.Maintenance
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}":
    delete:
      consumes: []
      operationId: MaintenanceConfigurations_Delete
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource Group Name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource Identifier
          in: path
          name: resourceName
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/MaintenanceConfiguration"
        default:
          description: BadRequest
          schema:
            $ref: "#/definitions/MaintenanceError"
      summary: Delete Configuration record
      tags:
        - MaintenanceConfigurations
      x-ms-examples:
        MaintenanceConfigurations_DeleteForResource:
          parameters:
            api-version: 2018-06-01-preview
            resourceGroupName: examplerg
            resourceName: example1
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                id: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1
                location: westus2
                name: configuration1
                properties:
                  namespace: Microsoft.Maintenance
    get:
      consumes: []
      operationId: MaintenanceConfigurations_Get
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource Group Name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource Identifier
          in: path
          name: resourceName
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/MaintenanceConfiguration"
        default:
          description: BadRequest
          schema:
            $ref: "#/definitions/MaintenanceError"
      summary: Get Configuration record
      tags:
        - MaintenanceConfigurations
      x-ms-examples:
        MaintenanceConfigurations_GetForResource:
          parameters:
            api-version: 2018-06-01-preview
            resourceGroupName: examplerg
            resourceName: configuration1
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                id: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1
                location: westus2
                name: configuration1
                properties:
                  maintenanceScope: All
                  namespace: Microsoft.Maintenance
    patch:
      operationId: MaintenanceConfigurations_Update
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource Group Name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource Identifier
          in: path
          name: resourceName
          required: true
          type: string
        - description: The configuration
          in: body
          name: configuration
          required: true
          schema:
            $ref: "#/definitions/MaintenanceConfiguration"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/MaintenanceConfiguration"
        default:
          description: BadRequest
          schema:
            $ref: "#/definitions/MaintenanceError"
      summary: Patch configuration record
      tags:
        - MaintenanceConfigurations
      x-ms-examples:
        MaintenanceConfigurations_UpdateForResource:
          parameters:
            api-version: 2018-06-01-preview
            configuration:
              location: westus2
              properties:
                namespace: Microsoft.Maintenance
            resourceGroupName: examplerg
            resourceName: configuration1
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                id: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1
                location: westus2
                name: configuration1
                properties:
                  maintenanceScope: All
                  namespace: Microsoft.Maintenance
    put:
      operationId: MaintenanceConfigurations_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource Group Name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource Identifier
          in: path
          name: resourceName
          required: true
          type: string
        - description: The configuration
          in: body
          name: configuration
          required: true
          schema:
            $ref: "#/definitions/MaintenanceConfiguration"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/MaintenanceConfiguration"
        default:
          description: BadRequest
          schema:
            $ref: "#/definitions/MaintenanceError"
      summary: Create or Update configuration record
      tags:
        - MaintenanceConfigurations
      x-ms-examples:
        MaintenanceConfigurations_CreateOrUpdateForResource:
          parameters:
            api-version: 2018-06-01-preview
            configuration:
              location: westus2
              properties:
                namespace: Microsoft.Maintenance
            resourceGroupName: examplerg
            resourceName: configuration1
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                id: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1
                location: westus2
                name: configuration1
                properties:
                  maintenanceScope: All
                  namespace: Microsoft.Maintenance
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/default":
    put:
      consumes: []
      description: Apply maintenance updates to resource with parent
      operationId: ApplyUpdates_CreateOrUpdateParent
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource group name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource provider name
          in: path
          name: providerName
          required: true
          type: string
        - description: Resource parent type
          in: path
          name: resourceParentType
          required: true
          type: string
        - description: Resource parent identifier
          in: path
          name: resourceParentName
          required: true
          type: string
        - description: Resource type
          in: path
          name: resourceType
          required: true
          type: string
        - description: Resource identifier
          in: path
          name: resourceName
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ApplyUpdate"
      summary: Apply Updates to resource with parent
      tags:
        - ApplyUpdates
      x-ms-examples:
        ApplyUpdates_CreateOrUpdateParent:
          parameters:
            api-version: 2018-06-01-preview
            providerName: Microsoft.Compute
            resourceGroupName: examplerg
            resourceName: smdvm1
            resourceParentName: smdtest1
            resourceParentType: virtualMachineScaleSets
            resourceType: virtualMachines
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                id: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/virtualMachines/smdvm1/providers/Microsoft.Maintenance/applyUpdates/e9b9685d-78e4-44c4-a81c-64a14f9b87b6
                name: e9b9685d-78e4-44c4-a81c-64a14f9b87b6
                properties:
                  resourceId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/virtualMachines/smdvm1
                  status: Pending
                type: Microsoft.Maintenance/applyUpdates
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/{applyUpdateName}":
    get:
      consumes: []
      description: Track maintenance updates to resource with parent
      operationId: ApplyUpdates_GetParent
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource group name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource parent type
          in: path
          name: resourceParentType
          required: true
          type: string
        - description: Resource parent identifier
          in: path
          name: resourceParentName
          required: true
          type: string
        - description: Resource provider name
          in: path
          name: providerName
          required: true
          type: string
        - description: Resource type
          in: path
          name: resourceType
          required: true
          type: string
        - description: Resource identifier
          in: path
          name: resourceName
          required: true
          type: string
        - description: applyUpdate Id
          in: path
          name: applyUpdateName
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ApplyUpdate"
      summary: Track Updates to resource with parent
      tags:
        - ApplyUpdates
      x-ms-examples:
        ApplyUpdates_GetParent:
          parameters:
            api-version: 2018-06-01-preview
            applyUpdateName: e9b9685d-78e4-44c4-a81c-64a14f9b87b6
            providerName: Microsoft.Compute
            resourceGroupName: examplerg
            resourceName: smdvm1
            resourceParentName: smdtest1
            resourceParentType: virtualMachineScaleSets
            resourceType: virtualMachines
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                id: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/virtualMachines/smdvm1/providers/Microsoft.Maintenance/applyUpdates/e9b9685d-78e4-44c4-a81c-64a14f9b87b6
                name: e9b9685d-78e4-44c4-a81c-64a14f9b87b6
                properties:
                  resourceId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/virtualMachines/smdvm1
                  status: Completed
                type: Microsoft.Maintenance/applyUpdates
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments":
    get:
      consumes: []
      description: List configurationAssignments for resource.
      operationId: ConfigurationAssignments_ListParent
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource group name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource provider name
          in: path
          name: providerName
          required: true
          type: string
        - description: Resource parent type
          in: path
          name: resourceParentType
          required: true
          type: string
        - description: Resource parent identifier
          in: path
          name: resourceParentName
          required: true
          type: string
        - description: Resource type
          in: path
          name: resourceType
          required: true
          type: string
        - description: Resource identifier
          in: path
          name: resourceName
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ListConfigurationAssignmentsResult"
      summary: List configurationAssignments for resource
      tags:
        - ConfigurationAssignments
      x-ms-examples:
        ConfigurationAssignments_ListParent:
          parameters:
            api-version: 2018-06-01-preview
            providerName: Microsoft.Compute
            resourceGroupName: examplerg
            resourceName: smdtestvm1
            resourceParentName: smdtest1
            resourceParentType: virtualMachineScaleSets
            resourceType: virtualMachines
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/virtualMachines/smdtestvm1/providers/Microsoft.Maintenance/configurationAssignments/workervmPolicy
                    name: workervmPolicy
                    properties:
                      maintenanceConfigurationId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/policy1
                      resourceId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/virtualMachines/smdtestvm1
                    type: Microsoft.Maintenance/configurationAssignments
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}":
    delete:
      consumes: []
      description: Unregister configuration for resource.
      operationId: ConfigurationAssignments_DeleteParent
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource group name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource provider name
          in: path
          name: providerName
          required: true
          type: string
        - description: Resource parent type
          in: path
          name: resourceParentType
          required: true
          type: string
        - description: Resource parent identifier
          in: path
          name: resourceParentName
          required: true
          type: string
        - description: Resource type
          in: path
          name: resourceType
          required: true
          type: string
        - description: Resource identifier
          in: path
          name: resourceName
          required: true
          type: string
        - description: Unique configuration assignment name
          in: path
          name: configurationAssignmentName
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ConfigurationAssignment"
      summary: Unregister configuration for resource
      tags:
        - ConfigurationAssignments
      x-ms-examples:
        ConfigurationAssignments_DeleteParent:
          parameters:
            api-version: 2018-06-01-preview
            configurationAssignmentName: workervmConfiguration
            providerName: Microsoft.Compute
            resourceGroupName: examplerg
            resourceName: smdvm1
            resourceParentName: smdtest1
            resourceParentType: virtualMachineScaleSets
            resourceType: virtualMachines
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                id: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/providers/Microsoft.Maintenance/configurationAssignments/workervmConfiguration
                name: workervmConfiguration
                type: Microsoft.Maintenance/configurationAssignments
    put:
      description: Register configuration for resource.
      operationId: ConfigurationAssignments_CreateOrUpdateParent
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource group name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource provider name
          in: path
          name: providerName
          required: true
          type: string
        - description: Resource parent type
          in: path
          name: resourceParentType
          required: true
          type: string
        - description: Resource parent identifier
          in: path
          name: resourceParentName
          required: true
          type: string
        - description: Resource type
          in: path
          name: resourceType
          required: true
          type: string
        - description: Resource identifier
          in: path
          name: resourceName
          required: true
          type: string
        - description: Configuration assignment name
          in: path
          name: configurationAssignmentName
          required: true
          type: string
        - description: The configurationAssignment
          in: body
          name: configurationAssignment
          required: true
          schema:
            $ref: "#/definitions/ConfigurationAssignment"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ConfigurationAssignment"
      summary: Create configuration assignment
      tags:
        - ConfigurationAssignments
      x-ms-examples:
        ConfigurationAssignments_CreateOrUpdateParent:
          parameters:
            api-version: 2018-06-01-preview
            configurationAssignment:
              properties:
                maintenanceConfigurationId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/policy1
            configurationAssignmentName: workervmPolicy
            providerName: Microsoft.Compute
            resourceGroupName: examplerg
            resourceName: smdvm1
            resourceParentName: smdtest1
            resourceParentType: virtualMachineScaleSets
            resourceType: virtualMachines
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                id: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/virtualMachines/smdvm1/providers/Microsoft.Maintenance/configurationAssignments/workervmPolicy
                name: workervmPolicy
                properties:
                  maintenanceConfigurationId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/policy1
                  resourceId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/virtualMachines/smdvm1
                type: Microsoft.Maintenance/configurationAssignments
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/updates":
    get:
      consumes: []
      description: Get updates to resources.
      operationId: Updates_ListParent
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource group name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource provider name
          in: path
          name: providerName
          required: true
          type: string
        - description: Resource parent type
          in: path
          name: resourceParentType
          required: true
          type: string
        - description: Resource parent identifier
          in: path
          name: resourceParentName
          required: true
          type: string
        - description: Resource type
          in: path
          name: resourceType
          required: true
          type: string
        - description: Resource identifier
          in: path
          name: resourceName
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ListUpdatesResult"
      summary: Get Updates to resource
      tags:
        - Updates
      x-ms-examples:
        Updates_ListParent:
          parameters:
            api-version: 2018-06-01-preview
            providerName: Microsoft.Compute
            resourceGroupName: examplerg
            resourceName: "1"
            resourceParentName: smdtest1
            resourceParentType: virtualMachineScaleSets
            resourceType: virtualMachines
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                value:
                  - impactDurationInSec: 1440
                    impactType: Reboot
                    maintenanceScope: Resource
                    notBefore: 2018-10-09T06:17:44.235Z
                    properties:
                      resourceId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/virtualMachines/1
                    status: Pending
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/default":
    put:
      consumes: []
      description: Apply maintenance updates to resource
      operationId: ApplyUpdates_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource group name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource provider name
          in: path
          name: providerName
          required: true
          type: string
        - description: Resource type
          in: path
          name: resourceType
          required: true
          type: string
        - description: Resource identifier
          in: path
          name: resourceName
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ApplyUpdate"
      summary: Apply Updates to resource
      tags:
        - ApplyUpdates
      x-ms-examples:
        ApplyUpdates_CreateOrUpdate:
          parameters:
            api-version: 2018-06-01-preview
            providerName: Microsoft.Compute
            resourceGroupName: examplerg
            resourceName: smdtest1
            resourceType: virtualMachineScaleSets
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                id: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/providers/Microsoft.Maintenance/applyUpdates/e9b9685d-78e4-44c4-a81c-64a14f9b87b6
                name: e9b9685d-78e4-44c4-a81c-64a14f9b87b6
                properties:
                  resourceId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1
                  status: Pending
                type: Microsoft.Maintenance/applyUpdates
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/{applyUpdateName}":
    get:
      consumes: []
      description: Track maintenance updates to resource
      operationId: ApplyUpdates_Get
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource group name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource provider name
          in: path
          name: providerName
          required: true
          type: string
        - description: Resource type
          in: path
          name: resourceType
          required: true
          type: string
        - description: Resource identifier
          in: path
          name: resourceName
          required: true
          type: string
        - description: applyUpdate Id
          in: path
          name: applyUpdateName
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ApplyUpdate"
      summary: Track Updates to resource
      tags:
        - ApplyUpdates
      x-ms-examples:
        ApplyUpdates_Get:
          parameters:
            api-version: 2018-06-01-preview
            applyUpdateName: e9b9685d-78e4-44c4-a81c-64a14f9b87b6
            providerName: Microsoft.Compute
            resourceGroupName: examplerg
            resourceName: smdtest1
            resourceType: virtualMachineScaleSets
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                id: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/providers/Microsoft.Maintenance/applyUpdates/e9b9685d-78e4-44c4-a81c-64a14f9b87b6
                name: e9b9685d-78e4-44c4-a81c-64a14f9b87b6
                properties:
                  resourceId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1
                  status: Completed
                type: Microsoft.Maintenance/applyUpdates
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments":
    get:
      consumes: []
      description: List configurationAssignments for resource.
      operationId: ConfigurationAssignments_List
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource group name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource provider name
          in: path
          name: providerName
          required: true
          type: string
        - description: Resource type
          in: path
          name: resourceType
          required: true
          type: string
        - description: Resource identifier
          in: path
          name: resourceName
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ListConfigurationAssignmentsResult"
      summary: List configurationAssignments for resource
      tags:
        - ConfigurationAssignments
      x-ms-examples:
        ConfigurationAssignments_List:
          parameters:
            api-version: 2018-06-01-preview
            providerName: Microsoft.Compute
            resourceGroupName: examplerg
            resourceName: smdtest1
            resourceType: virtualMachineScaleSets
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/providers/Microsoft.Maintenance/configurationAssignments/workervmConfiguration
                    name: workervmConfiguration
                    properties:
                      maintenanceConfigurationId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1
                      resourceId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1
                    type: Microsoft.Maintenance/configurationAssignments
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/configurationAssignments/{configurationAssignmentName}":
    delete:
      consumes: []
      description: Unregister configuration for resource.
      operationId: ConfigurationAssignments_Delete
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource group name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource provider name
          in: path
          name: providerName
          required: true
          type: string
        - description: Resource type
          in: path
          name: resourceType
          required: true
          type: string
        - description: Resource identifier
          in: path
          name: resourceName
          required: true
          type: string
        - description: Unique configuration assignment name
          in: path
          name: configurationAssignmentName
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ConfigurationAssignment"
      summary: Unregister configuration for resource
      tags:
        - ConfigurationAssignments
      x-ms-examples:
        ConfigurationAssignments_Delete:
          parameters:
            api-version: 2018-06-01-preview
            configurationAssignmentName: workervmConfiguration
            providerName: Microsoft.Compute
            resourceGroupName: examplerg
            resourceName: smdtest1
            resourceType: virtualMachineScaleSets
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                id: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/providers/Microsoft.Maintenance/configurationAssignments/workervmConfiguration
                name: workervmConfiguration
                type: Microsoft.Maintenance/configurationAssignments
    put:
      description: Register configuration for resource.
      operationId: ConfigurationAssignments_CreateOrUpdate
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource group name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource provider name
          in: path
          name: providerName
          required: true
          type: string
        - description: Resource type
          in: path
          name: resourceType
          required: true
          type: string
        - description: Resource identifier
          in: path
          name: resourceName
          required: true
          type: string
        - description: Configuration assignment name
          in: path
          name: configurationAssignmentName
          required: true
          type: string
        - description: The configurationAssignment
          in: body
          name: configurationAssignment
          required: true
          schema:
            $ref: "#/definitions/ConfigurationAssignment"
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ConfigurationAssignment"
      summary: Create configuration assignment
      tags:
        - ConfigurationAssignments
      x-ms-examples:
        ConfigurationAssignments_CreateOrUpdate:
          parameters:
            api-version: 2018-06-01-preview
            configurationAssignment:
              properties:
                maintenanceConfigurationId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1
            configurationAssignmentName: workervmConfiguration
            providerName: Microsoft.Compute
            resourceGroupName: examplerg
            resourceName: smdtest1
            resourceType: virtualMachineScaleSets
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                id: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1/providers/Microsoft.Maintenance/configurationAssignments/workervmConfiguration
                name: workervmConfiguration
                properties:
                  maintenanceConfigurationId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Maintenance/maintenanceConfigurations/configuration1
                  resourceId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1
                type: Microsoft.Maintenance/configurationAssignments
  "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/updates":
    get:
      consumes: []
      description: Get updates to resources.
      operationId: Updates_List
      parameters:
        - $ref: "#/parameters/SubscriptionIdParameter"
        - description: Resource group name
          in: path
          name: resourceGroupName
          required: true
          type: string
        - description: Resource provider name
          in: path
          name: providerName
          required: true
          type: string
        - description: Resource type
          in: path
          name: resourceType
          required: true
          type: string
        - description: Resource identifier
          in: path
          name: resourceName
          required: true
          type: string
        - $ref: "#/parameters/ApiVersionParameter"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ListUpdatesResult"
      summary: Get Updates to resource
      tags:
        - Updates
      x-ms-examples:
        Updates_List:
          parameters:
            api-version: 2018-06-01-preview
            providerName: Microsoft.Compute
            resourceGroupName: examplerg
            resourceName: smdtest1
            resourceType: virtualMachineScaleSets
            subscriptionId: 5b4b650e-28b9-4790-b3ab-ddbd88d727c4
          responses:
            "200":
              body:
                value:
                  - impactDurationInSec: 1440
                    impactType: Reboot
                    maintenanceScope: Resource
                    notBefore: 2018-10-09T06:17:44.235Z
                    properties:
                      resourceId: /subscriptions/5b4b650e-28b9-4790-b3ab-ddbd88d727c4/resourcegroups/examplerg/providers/Microsoft.Compute/virtualMachineScaleSets/smdtest1
                    status: Pending
      x-ms-pageable:
        nextLinkName: null
definitions:
  ApplyUpdate:
    allOf:
      - $ref: "#/definitions/Resource"
    description: Apply Update request
    properties:
      properties:
        $ref: "#/definitions/ApplyUpdateProperties"
        description: Properties of the apply update
        x-ms-client-flatten: true
    type: object
  ApplyUpdateProperties:
    description: Properties for apply update
    properties:
      lastUpdateTime:
        description: Last Update time
        format: date-time
        type: string
      resourceId:
        description: The resourceId
        type: string
      status:
        description: The status
        enum:
          - Pending
          - InProgress
          - Completed
          - RetryNow
          - RetryLater
        type: string
        x-ms-enum:
          modelAsString: true
          name: UpdateStatus
    type: object
  ConfigurationAssignment:
    allOf:
      - $ref: "#/definitions/Resource"
    description: Configuration Assignment
    properties:
      location:
        description: Location of the resource
        type: string
      properties:
        $ref: "#/definitions/ConfigurationAssignmentProperties"
        description: Properties of the configuration assignment
        x-ms-client-flatten: true
    type: object
  ConfigurationAssignmentProperties:
    description: Properties for configuration assignment
    properties:
      maintenanceConfigurationId:
        description: The maintenance configuration Id
        type: string
      resourceId:
        description: The unique resourceId
        type: string
    type: object
  ErrorDetails:
    description: An error response details received from the Azure Maintenance service.
    properties:
      code:
        description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
        type: string
      message:
        description: Human-readable representation of the error.
        type: string
    type: object
  ListConfigurationAssignmentsResult:
    description: Response for ConfigurationAssignments list
    properties:
      value:
        description: The list of configuration Assignments
        items:
          $ref: "#/definitions/ConfigurationAssignment"
        type: array
    type: object
  ListMaintenanceConfigurationsResult:
    description: Response for MaintenanceConfigurations list
    properties:
      value:
        description: The list of maintenance Configurations
        items:
          $ref: "#/definitions/MaintenanceConfiguration"
        type: array
    type: object
  ListUpdatesResult:
    description: Response for Updates list
    properties:
      value:
        description: The pending updates
        items:
          $ref: "#/definitions/Update"
        type: array
    type: object
  MaintenanceConfiguration:
    allOf:
      - $ref: "#/definitions/Resource"
    description: Maintenance configuration record type
    properties:
      location:
        description: Gets or sets location of the resource
        type: string
      properties:
        $ref: "#/definitions/MaintenanceConfigurationProperties"
        description: Gets or sets properties of the resource
        x-ms-client-flatten: true
      tags:
        additionalProperties:
          type: string
        description: Gets or sets tags of the resource
        type: object
    type: object
  MaintenanceConfigurationProperties:
    description: Properties for maintenance configuration
    properties:
      extensionProperties:
        additionalProperties:
          type: string
        description: Gets or sets extensionProperties of the maintenanceConfiguration
        type: object
      maintenanceScope:
        description: Gets or sets maintenanceScope of the configuration
        enum:
          - All
          - Host
          - Resource
          - InResource
        type: string
        x-ms-enum:
          modelAsString: true
          name: MaintenanceScope
      namespace:
        description: Gets or sets namespace of the resource
        type: string
    type: object
  MaintenanceError:
    description: An error response received from the Azure Maintenance service.
    properties:
      error:
        $ref: "#/definitions/ErrorDetails"
        description: Details of the error
    type: object
  Operation:
    description: Represents an operation returned by the GetOperations request
    properties:
      display:
        $ref: "#/definitions/OperationInfo"
        description: Display name of the operation
      name:
        description: Name of the operation
        type: string
      origin:
        description: Origin of the operation
        type: string
      properties:
        description: Properties of the operation
        type: object
        x-ms-client-flatten: true
    type: object
  OperationInfo:
    description: Information about an operation
    properties:
      description:
        description: Description of the operation
        type: string
      operation:
        description: Name of the operation
        type: string
      provider:
        description: Name of the provider
        type: string
      resource:
        description: Name of the resource type
        type: string
    type: object
  OperationsListResult:
    description: Result of the List Operations operation
    properties:
      value:
        description: A collection of operations
        items:
          $ref: "#/definitions/Operation"
        type: array
    type: object
  Resource:
    description: Definition of a Resource
    properties:
      id:
        description: Fully qualified identifier of the resource
        readOnly: true
        type: string
      name:
        description: Name of the resource
        readOnly: true
        type: string
      type:
        description: Type of the resource
        readOnly: true
        type: string
    type: object
    x-ms-azure-resource: true
  Update:
    description: Maintenance update on a resource
    properties:
      impactDurationInSec:
        description: Duration of impact in seconds
        format: int32
        type: integer
      impactType:
        description: The impact type
        enum:
          - None
          - Freeze
          - Restart
          - Redeploy
        type: string
        x-ms-enum:
          modelAsString: true
          name: ImpactType
      maintenanceScope:
        description: The impact area
        enum:
          - All
          - Host
          - Resource
          - InResource
        type: string
        x-ms-enum:
          modelAsString: true
          name: MaintenanceScope
      notBefore:
        description: Time when Azure will start force updates if not self-updated by customer before this time
        format: date-time
        type: string
      properties:
        $ref: "#/definitions/UpdateProperties"
        description: Properties of the apply update
        x-ms-client-flatten: true
      status:
        description: The status
        enum:
          - Pending
          - InProgress
          - Completed
          - RetryNow
          - RetryLater
        type: string
        x-ms-enum:
          modelAsString: true
          name: UpdateStatus
    type: object
  UpdateProperties:
    description: Properties for update
    properties:
      resourceId:
        description: The resourceId
        type: string
    type: object
