{ "swagger": "2.0", "info": { "title": "Microsoft Defender for Cloud", "version": "2017-08-01", "description": "API spec for Microsoft.Security (Microsoft Defender for Cloud) resource provider", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } }, "tags": [ { "name": "Compliance Results" } ], "paths": { "/{scope}/providers/Microsoft.Security/complianceResults": { "get": { "operationId": "ComplianceResults_List", "tags": [ "Compliance Results" ], "description": "Security compliance results in the subscription", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "name": "scope", "in": "path", "description": "The fully qualified Azure Resource manager identifier of the resource.", "required": true, "type": "string", "x-ms-skip-url-encoding": true } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ComplianceResultList" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Common.CloudError" } } }, "x-ms-examples": { "Get compliance results on subscription": { "$ref": "./examples/ComplianceResults/ListComplianceResults_example.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/{resourceId}/providers/Microsoft.Security/complianceResults/{complianceResultName}": { "get": { "operationId": "ComplianceResults_Get", "tags": [ "Compliance Results" ], "description": "Security Compliance Result", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "name": "resourceId", "in": "path", "description": "The fully qualified Azure Resource manager identifier of the resource.", "required": true, "type": "string", "x-ms-skip-url-encoding": true }, { "name": "complianceResultName", "in": "path", "description": "The compliance result key.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ComplianceResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Common.CloudError" } } }, "x-ms-examples": { "Get compliance results on subscription": { "$ref": "./examples/ComplianceResults/GetComplianceResults_example.json" } } } } }, "definitions": { "Common.CloudError": { "type": "object", "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).", "properties": { "error": { "$ref": "#/definitions/Common.CloudErrorBody", "description": "The error object.", "x-ms-client-flatten": true } }, "x-ms-external": true }, "Common.CloudErrorBody": { "type": "object", "description": "The error detail.", "properties": { "code": { "type": "string", "description": "The error code.", "readOnly": true }, "message": { "type": "string", "description": "The error message.", "readOnly": true }, "target": { "type": "string", "description": "The error target.", "readOnly": true }, "details": { "type": "array", "description": "The error details.", "items": { "$ref": "#/definitions/Common.CloudErrorBody" }, "readOnly": true, "x-ms-identifiers": [] }, "additionalInfo": { "type": "array", "description": "The error additional info.", "items": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorAdditionalInfo" }, "readOnly": true, "x-ms-identifiers": [] } }, "x-ms-external": true }, "ComplianceResult": { "type": "object", "description": "a compliance result", "properties": { "properties": { "$ref": "#/definitions/ComplianceResultProperties", "description": "Compliance result data", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "ComplianceResultList": { "type": "object", "description": "List of compliance results response", "properties": { "value": { "type": "array", "description": "The ComplianceResult items on this page", "items": { "$ref": "#/definitions/ComplianceResult" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "ComplianceResultProperties": { "type": "object", "description": "Compliance result data", "properties": { "resourceStatus": { "$ref": "#/definitions/ResourceStatus", "description": "The status of the resource regarding a single assessment", "readOnly": true } } }, "ResourceStatus": { "type": "string", "description": "The status of the resource regarding a single assessment", "enum": [ "Healthy", "NotApplicable", "OffByPolicy", "NotHealthy" ], "x-ms-enum": { "name": "ResourceStatus", "modelAsString": true, "values": [ { "name": "Healthy", "value": "Healthy", "description": "This assessment on the resource is healthy" }, { "name": "NotApplicable", "value": "NotApplicable", "description": "This assessment is not applicable to this resource" }, { "name": "OffByPolicy", "value": "OffByPolicy", "description": "This assessment is turned off by policy on this subscription" }, { "name": "NotHealthy", "value": "NotHealthy", "description": "This assessment on the resource is not healthy" } ] } } }, "parameters": {} }