swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  title: GuestConfiguration
  version: 2018-01-20-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/guestconfiguration/resource-manager/Microsoft.GuestConfiguration/preview/2018-01-20-preview/guestconfiguration.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: guestconfiguration
  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
security:
  - azure_auth:
      - user_impersonation
parameters: {}
paths:
  /providers/Microsoft.GuestConfiguration/operations:
    get:
      description: Lists all of the available GuestConfiguration REST API operations.
      operationId: Operations_List
      parameters:
        - description: Client Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            description: The response model for the list of Automation operations
            properties:
              value:
                description: List of Automation operations supported by the Automation resource provider.
                items:
                  description: GuestConfiguration REST API operation
                  properties:
                    display:
                      description: Provider, Resource, Operation and description values.
                      properties:
                        description:
                          description: Description about operation.
                          type: string
                        operation:
                          description: "Operation type: Read, write, delete, etc."
                          type: string
                        provider:
                          description: "Service provider: Microsoft.GuestConfiguration"
                          type: string
                        resource:
                          description: "Resource on which the operation is performed:  For ex. "
                          type: string
                    name:
                      description: "Operation name: For ex. providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/write or read"
                      type: string
                    properties:
                      description: Provider, Resource, Operation and description values.
                      properties:
                        statusCode:
                          description: "Service provider: Microsoft.GuestConfiguration"
                          type: string
                      x-ms-client-flatten: true
                  type: object
                type: array
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error response of an operation failure
            properties:
              message:
                description: Error message indicating why the operation failed.
                type: string
      tags:
        - Operations
      x-ms-examples:
        Lists all of the available GuestConfiguration REST API operations:
          parameters:
            api-version: 2018-01-20-preview
          responses:
            "200":
              body:
                value:
                  - display:
                      description: Create new guest configuration assignment.
                      operation: Microsoft.GuestConfiguration/guestConfigurationAssignments/write
                      provider: Microsoft Guest Configuration
                      resource: Microsoft.GuestConfiguration/guestConfigurationAssignments
                    name: Microsoft.GuestConfiguration/guestConfigurationAssignments/write
                    properties: null
                  - display:
                      description: Get guest configuration assignment.
                      operation: Microsoft.GuestConfiguration/guestConfigurationAssignments/read
                      provider: Microsoft Guest Configuration
                      resource: Microsoft.GuestConfiguration/guestConfigurationAssignments
                    name: Microsoft.GuestConfiguration/guestConfigurationAssignments/read
                    properties: null
              headers: {}
      x-ms-pageable:
        nextLinkName: null
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}":
    get:
      description: Get information about a guest configuration assignment
      operationId: GuestConfigurationAssignments_Get
      parameters:
        - description: The resource group name.
          in: path
          name: resourceGroupName
          pattern: ^[-\w\._]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The guest configuration assignment name.
          in: path
          name: guestConfigurationAssignmentName
          required: true
          type: string
        - description: Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: The name of the virtual machine.
          in: path
          name: vmName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Client Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/GuestConfigurationAssignment"
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error response of an operation failure
            properties:
              message:
                description: Error message indicating why the operation failed.
                type: string
      tags:
        - GuestConfigurationAssignments
      x-ms-examples:
        Get a guest configuration assignment:
          parameters:
            api-version: 2018-01-20-preview
            guestConfigurationAssignmentName: SecureProtocol
            resourceGroupName: myResourceGroupName
            subscriptionId: mySubscriptionId
            vmName: myVMName
          responses:
            "200":
              body:
                id: /subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/SecureProtocol
                location: westcentralus
                name: SecureProtocol
                properties:
                  complianceReason: null
                  complianceStatus: Compliant
                  guestConfiguration:
                    configurationParameter: null
                    kind: null
                    name: SecureProtocol
                    type: null
                  latestReportId: /subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/SecureProtocol/reports/5f81272b-c712-4a48-8970-f6f0bcf38441
                  provisioningState: null
              headers: {}
    put:
      description: Creates an association between a VM and guest configuration
      operationId: GuestConfigurationAssignments_CreateOrUpdate
      parameters:
        - description: Name of the guest configuration assignment.
          in: path
          name: guestConfigurationAssignmentName
          required: true
          type: string
        - description: Parameters supplied to the create or update guest configuration assignment.
          in: body
          name: parameters
          required: true
          schema:
            $ref: "#/definitions/GuestConfigurationAssignment"
        - description: Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: The resource group name.
          in: path
          name: resourceGroupName
          pattern: ^[-\w\._]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the virtual machine.
          in: path
          name: vmName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Client Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/GuestConfigurationAssignment"
        "201":
          description: Created
          schema:
            $ref: "#/definitions/GuestConfigurationAssignment"
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error response of an operation failure
            properties:
              message:
                description: Error message indicating why the operation failed.
                type: string
      tags:
        - GuestConfigurationAssignments
      x-ms-examples:
        Create or update guest configuration assignment:
          parameters:
            api-version: 2018-01-20-preview
            guestConfigurationAssignmentName: SecureProtocol
            parameters:
              location: westcentralus
              name: SecureProtocol
              properties:
                guestConfiguration:
                  name: SecureProtocol
            resourceGroupName: myResourceGroupName
            subscriptionId: mySubscriptionId
            vmName: myVMName
          responses:
            "200":
              body:
                id: /subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/SecureProtocol
                location: westcentralus
                name: SecureProtocol
                properties:
                  assignmentHash: null
                  complianceReason: null
                  complianceStatus: Compliant
                  guestConfiguration:
                    configurationParameter: []
                    kind: null
                    name: SecureProtocol
                  provisioningState: null
              headers: {}
            "201":
              body:
                id: /subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/SecureProtocol
                location: westcentralus
                name: SecureProtocol
                properties:
                  assignmentHash: null
                  complianceReason: null
                  complianceStatus: InProgress
                  guestConfiguration:
                    configurationParameter: []
                    kind: null
                    name: SecureProtocol
                  provisioningState: null
              headers: {}
      x-ms-long-running-operation: true
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}/reports":
    get:
      description: List all reports for the guest configuration assignment, latest report first.
      operationId: GuestConfigurationAssignmentReports_List
      parameters:
        - description: The resource group name.
          in: path
          name: resourceGroupName
          pattern: ^[-\w\._]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The guest configuration assignment name.
          in: path
          name: guestConfigurationAssignmentName
          required: true
          type: string
        - description: Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: The name of the virtual machine.
          in: path
          name: vmName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Client Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: "OK. This response is due one of these two reasons: 1. Reports were returned successfully 2. Guest configuration assignment was found, but VM is not registered yet, hence no reports returned."
          schema:
            $ref: "#/definitions/GuestConfigurationAssignmentReportList"
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error response of an operation failure
            properties:
              message:
                description: Error message indicating why the operation failed.
                type: string
      tags:
        - GuestConfigurationAssignmentReports
      x-ms-examples:
        List all guest configuration assignments for a virtual machine:
          parameters:
            api-version: 2018-01-20-preview
            guestConfigurationAssignmentName: SecureProtocol
            resourceGroupName: myResourceGroupName
            subscriptionId: mySubscriptionId
            vmName: myVMName
          responses:
            "200":
              body:
                - configurationVersion: null
                  endTime: 2018-07-10T23:39:21.715+00:00
                  id: /subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/SecureProtocol/reports/5f81272b-c712-4a48-8970-f6f0bcf38441
                  lastModifiedTime: 2018-07-10T23:39:21.7343777+00:00
                  rebootRequested: "False"
                  refreshMode: Pull
                  reportFormatVersion: "2.0"
                  reportId: 5f81272b-c712-4a48-8970-f6f0bcf38441
                  startTime: 2018-07-10T23:39:20.715+00:00
                  status: Compliant
                  type: Consistency
                - configurationVersion: null
                  endTime: 2018-07-10T23:24:19.454+00:00
                  id: /subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/SecureProtocol/reports/326a1ca7-5c44-4ce9-8a34-92399c49d8de
                  lastModifiedTime: 2018-07-10T23:24:19.550552+00:00
                  rebootRequested: "False"
                  refreshMode: Pull
                  reportFormatVersion: "2.0"
                  reportId: 326a1ca7-5c44-4ce9-8a34-92399c49d8de
                  startTime: 2018-07-10T23:24:18.454+00:00
                  status: Compliant
                  type: Consistency
                - configurationVersion: null
                  endTime: 2018-07-10T23:09:21.527+00:00
                  id: /subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/SecureProtocol/reports/f5945e53-77da-44af-ba0b-79765734472c
                  lastModifiedTime: 2018-07-10T23:09:21.5231257+00:00
                  rebootRequested: "False"
                  refreshMode: Pull
                  reportFormatVersion: "2.0"
                  reportId: f5945e53-77da-44af-ba0b-79765734472c
                  startTime: 2018-07-10T23:09:20.527+00:00
                  status: Compliant
                  type: Consistency
                - configurationVersion: null
                  endTime: 2018-07-10T22:54:19.473+00:00
                  id: /subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/SecureProtocol/reports/38d630b4-e046-42d7-b6dc-1dcf3ae55c62
                  lastModifiedTime: 2018-07-10T22:54:19.5473018+00:00
                  rebootRequested: "False"
                  refreshMode: Pull
                  reportFormatVersion: "2.0"
                  reportId: 38d630b4-e046-42d7-b6dc-1dcf3ae55c62
                  startTime: 2018-07-10T22:54:18.473+00:00
                  status: Compliant
                  type: Consistency
              headers: {}
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/{guestConfigurationAssignmentName}/reports/{reportId}":
    get:
      description: Get a report for the guest configuration assignment, by reportId.
      operationId: GuestConfigurationAssignmentReports_Get
      parameters:
        - description: The resource group name.
          in: path
          name: resourceGroupName
          pattern: ^[-\w\._]+$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The guest configuration assignment name.
          in: path
          name: guestConfigurationAssignmentName
          required: true
          type: string
        - description: The GUID for the guest configuration assignment report.
          in: path
          name: reportId
          required: true
          type: string
        - description: Subscription ID which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
        - description: The name of the virtual machine.
          in: path
          name: vmName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Client Api Version.
          in: query
          name: api-version
          required: true
          type: string
      responses:
        "200":
          description: "OK. This response is due one of these two reasons: 1. Report was returned successfully 2. Guest configuration assignment was found, but VM is not registered yet, hence no report was returned."
          schema:
            $ref: "#/definitions/GuestConfigurationAssignmentReport"
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error response of an operation failure
            properties:
              message:
                description: Error message indicating why the operation failed.
                type: string
      tags:
        - GuestConfigurationAssignmentReports
      x-ms-examples:
        Get a guest configuration assignment report by Id for a virtual machine:
          parameters:
            api-version: 2018-01-20-preview
            guestConfigurationAssignmentName: SecureProtocol
            reportId: reportGUID
            resourceGroupName: myResourceGroupName
            subscriptionId: mySubscriptionId
            vmName: myVMName
          responses:
            "200":
              body:
                configurationVersion: null
                endTime: 2018-07-10T23:39:21.715+00:00
                id: /subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.Compute/virtualMachines/myVMName/providers/Microsoft.GuestConfiguration/guestConfigurationAssignments/SecureProtocol/reports/5f81272b-c712-4a48-8970-f6f0bcf38441
                lastModifiedTime: 2018-07-10T23:39:21.7343777+00:00
                rebootRequested: "False"
                refreshMode: Pull
                reportFormatVersion: "2.0"
                reportId: 5f81272b-c712-4a48-8970-f6f0bcf38441
                startTime: 2018-07-10T23:39:20.715+00:00
                status: Compliant
                type: Consistency
              headers: {}
definitions:
  ConfigurationParameter:
    description: Represents a configuration parameter.
    properties:
      name:
        description: Name of the configuration parameter.
        readOnly: true
        type: string
      value:
        description: Value of the configuration parameter.
        readOnly: true
        type: string
  ConfigurationParameterList:
    description: Represents the list for configuration parameters.
    properties:
      value:
        description: Represents the list for configuration parameters.
        items:
          $ref: "#/definitions/ConfigurationParameter"
        type: array
  GuestConfigurationAssignment:
    allOf:
      - allOf:
          - description: The core properties of ARM resources
            properties:
              id:
                description: ARM resource id of the guest configuration assignment.
                readOnly: true
                type: string
              location:
                description: Region where the VM is located.
                readOnly: true
                type: string
              name:
                description: Name of the guest configuration assignment.
                readOnly: true
                type: string
              type:
                description: The type of the resource.
                readOnly: true
                type: string
            type: object
            x-ms-azure-resource: true
        description: ARM proxy resource.
        properties: {}
        type: object
    description: Guest configuration assignment is an association between a VM and guest configuration.
    properties:
      properties:
        $ref: "#/definitions/GuestConfigurationAssignmentProperties"
        description: Properties of the Guest configuration assignment.
        x-ms-client-flatten: false
  GuestConfigurationAssignmentList:
    description: The response of the list guest configuration assignment operation.
    properties:
      value:
        description: Result of the list guest configuration assignment operation.
        items:
          $ref: "#/definitions/GuestConfigurationAssignment"
        type: array
  GuestConfigurationAssignmentProperties:
    description: Properties of guest configuration assignment object.
    properties:
      assignmentHash:
        description: Combined hash of the configuration package and parameters.
        readOnly: true
        type: string
      complianceReason:
        description: Reason for the complianceStatus for the assigned guest configuration.
        readOnly: true
        type: string
      complianceStatus:
        description: A value indicating compliance status of the virtual machine for the assigned guest configuration.
        enum:
          - Compliant
          - NotCompliant
          - Pending
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: complianceStatus
      guestConfiguration:
        $ref: "#/definitions/GuestConfigurationNavigation"
        description: The guest configuration to assign.
      latestReportId:
        description: Id of the latest guest configuration assignment report.
        readOnly: true
        type: string
      location:
        description: Region where VM is located.
        readOnly: true
        type: string
      provisioningState:
        description: The provisioning state, which only appears in the response.
        enum:
          - Succeeded
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: provisioningState
  GuestConfigurationAssignmentReport:
    description: Report for the guest configuration. Report contains information such as compliance status, reason and more.
    properties:
      configurationVersion:
        description: Configuration version of the report for the guest configuration assignment.
        type: string
      endTime:
        description: End time of the report for the guest configuration assignment.
        format: date-time
        type: string
        x-nullable: true
      id:
        description: ARM resource id of the report for the guest configuration assignment.
        readOnly: true
        type: string
      lastModifiedTime:
        description: Last modified time report for the guest configuration assignment.
        format: date-time
        type: string
        x-nullable: false
      rebootRequested:
        description: The value indicating whether reboot is requested for the report.
        enum:
          - "True"
          - "False"
        type: string
        x-ms-enum:
          modelAsString: true
          name: rebootRequested
      refreshMode:
        description: Refresh mode of the node report, push or pull.
        enum:
          - Push
          - Pull
          - Disabled
        type: string
        x-ms-enum:
          modelAsString: true
          name: refreshMode
      reportFormatVersion:
        description: Report format version of the report for the guest configuration assignment.
        type: string
      reportId:
        description: GUID of the report for the guest configuration assignment.
        readOnly: true
        type: string
      startTime:
        description: Start time of the report for the guest configuration assignment.
        format: date-time
        type: string
        x-nullable: true
      status:
        description: A value indicating compliance status of the virtual machine for the assigned guest configuration.
        enum:
          - Compliant
          - NotCompliant
          - Pending
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: complianceStatus
      type:
        description: Type of report, Consistency or Initial
        enum:
          - Consistency
          - Initial
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: type
  GuestConfigurationAssignmentReportList:
    description: The response of the list guest configuration assignment report operation.
    properties:
      value:
        description: List of reports for the guest configuration. Report contains information such as compliance status, reason and more.
        items:
          $ref: "#/definitions/GuestConfigurationAssignmentReport"
        type: array
  GuestConfigurationNavigation:
    description: Guest configuration is an artifact that encapsulates DSC configuration and its dependencies. The artifact is a zip file containing DSC configuration (as MOF) and dependent resources and other dependencies like modules.
    properties:
      configurationParameter:
        $ref: "#/definitions/ConfigurationParameterList"
        description: The configuration parameters for the guest configuration.
      kind:
        description: Kind of the guest configuration. For example:DSC
        enum:
          - DSC
        type: string
        x-ms-enum:
          modelAsString: true
          name: kind
      name:
        description: Name of the guest configuration.
        readOnly: true
        type: string
      type:
        description: Type of the guest configuration.
        readOnly: true
        type: string
