swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: API spec for Microsoft.Security (Azure Security Center) resource provider
  title: Security Center
  version: 2017-08-01
  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/security/resource-manager/Microsoft.Security/stable/2017-08-01/complianceResults.json
      version: "2.0"
  x-providerName: azure.com
  x-serviceName: security-complianceResults
  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:
  ComplianceResultName:
    description: name of the desired assessment compliance result
    in: path
    name: complianceResultName
    required: true
    type: string
    x-ms-parameter-location: method
paths:
  "/{resourceId}/providers/Microsoft.Security/complianceResults/{complianceResultName}":
    get:
      description: Security Compliance Result
      operationId: ComplianceResults_Get
      parameters:
        - description: API version for the operation
          in: query
          name: api-version
          required: true
          type: string
        - description: The identifier of the resource.
          in: path
          name: resourceId
          required: true
          type: string
          x-ms-parameter-location: method
        - $ref: "#/parameters/ComplianceResultName"
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ComplianceResult"
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error response structure.
            properties:
              error:
                description: Error details.
                properties:
                  code:
                    description: An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
                    readOnly: true
                    type: string
                  message:
                    description: A message describing the error, intended to be suitable for display in a user interface.
                    readOnly: true
                    type: string
                type: object
                x-ms-external: true
            type: object
            x-ms-external: true
      tags:
        - Compliance Results
      x-ms-examples:
        Get compliance results on subscription:
          parameters:
            api-version: 2017-08-01
            complianceResultName: DesignateMoreThanOneOwner
            resourceId: subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23
          responses:
            "200":
              body:
                id: /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/complianceResults/DesignateMoreThanOneOwner
                name: DesignateMoreThanOneOwner
                properties:
                  resourceStatus: Healthy
                type: Microsoft.Security/complianceResults
  "/{scope}/providers/Microsoft.Security/complianceResults":
    get:
      description: Security compliance results in the subscription
      operationId: ComplianceResults_List
      parameters:
        - description: API version for the operation
          in: query
          name: api-version
          required: true
          type: string
        - description: Scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or management group (/providers/Microsoft.Management/managementGroups/mgName).
          in: path
          name: scope
          required: true
          type: string
          x-ms-parameter-location: method
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/ComplianceResultList"
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error response structure.
            properties:
              error:
                description: Error details.
                properties:
                  code:
                    description: An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
                    readOnly: true
                    type: string
                  message:
                    description: A message describing the error, intended to be suitable for display in a user interface.
                    readOnly: true
                    type: string
                type: object
                x-ms-external: true
            type: object
            x-ms-external: true
      tags:
        - Compliance Results
      x-ms-examples:
        Get compliance results on subscription:
          parameters:
            api-version: 2017-08-01
            scope: subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23
          responses:
            "200":
              body:
                value:
                  - id: /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/complianceResults/DesignateMoreThanOneOwner
                    name: DesignateMoreThanOneOwner
                    properties:
                      resourceStatus: Healthy
                    type: Microsoft.Security/complianceResults
                  - id: /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/complianceResults/RemoveExternalAccountsWithReadPermissions
                    name: RemoveExternalAccountsWithReadPermissions
                    properties:
                      resourceStatus: NotHealthy
                    type: Microsoft.Security/complianceResults
                  - id: /subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/complianceResults/RemoveDeprecatedAccounts
                    name: RemoveDeprecatedAccounts
                    properties:
                      resourceStatus: Healthy
                    type: Microsoft.Security/complianceResults
      x-ms-pageable:
        nextLinkName: nextLink
definitions:
  ComplianceResult:
    allOf:
      - description: Describes an Azure resource.
        properties:
          id:
            description: Resource Id
            readOnly: true
            type: string
          name:
            description: Resource name
            readOnly: true
            type: string
          type:
            description: Resource type
            readOnly: true
            type: string
        type: object
        x-ms-azure-resource: true
    description: a compliance result
    properties:
      properties:
        $ref: "#/definitions/ComplianceResultProperties"
        description: Compliance result data
        x-ms-client-flatten: true
    type: object
  ComplianceResultList:
    description: List of compliance results response
    properties:
      nextLink:
        description: The URI to fetch the next page.
        readOnly: true
        type: string
      value:
        description: List of compliance results
        items:
          $ref: "#/definitions/ComplianceResult"
        type: array
    required:
      - value
  ComplianceResultProperties:
    description: Compliance result data
    properties:
      resourceStatus:
        description: The status of the resource regarding a single assessment
        enum:
          - Healthy
          - NotApplicable
          - OffByPolicy
          - NotHealthy
        readOnly: true
        type: string
        x-ms-enum:
          modelAsString: true
          name: resourceStatus
          values:
            - description: This assessment on the resource is healthy
              value: Healthy
            - description: This assessment is not applicable to this resource
              value: NotApplicable
            - description: This assessment is turned off by policy on this subscription
              value: OffByPolicy
            - description: This assessment on the resource is not healthy
              value: NotHealthy
    type: object
