From 60b311c10c1de2583d21065332a28f65b6025e8b Mon Sep 17 00:00:00 2001 From: Hila Markovitch Date: Thu, 7 Mar 2019 17:54:45 +0200 Subject: [PATCH 01/14] Regulatory compliance API --- ...atoryComplianceAssessmentList_example.json | 59 ++ ...egulatoryComplianceAssessment_example.json | 30 + ...gulatoryComplianceControlList_example.json | 55 ++ ...etRegulatoryComplianceControl_example.json | 28 + ...ulatoryComplianceStandardList_example.json | 60 ++ ...tRegulatoryComplianceStandard_example.json | 25 + .../regulatoryCompliance.json | 621 ++++++++++++++++++ 7 files changed, 878 insertions(+) create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceAssessmentList_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceAssessment_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceControlList_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceControl_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceStandardList_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceStandard_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceAssessmentList_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceAssessmentList_example.json new file mode 100644 index 000000000000..0a5bd1c785d8 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceAssessmentList_example.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2019-01-01", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "regulatoryComplianceStandardName": "PCI-DSS-3.2", + "regulatoryComplianceControlName": "1.1" + }, + "responses": { + "200": { + "body": { + "value": [{ + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/1.1/regulatoryComplianceAssessments/968548cb-02b3-8cd2-11f8-0cf64ab1a347", + "name": "968548cb-02b3-8cd2-11f8-0cf64ab1a347", + "type": "Microsoft.Security/regulatoryComplianceAssessment", + "properties": { + "controlName": "1.1", + "description": "Troubleshoot missing scan data on your machines", + "assessmentType": "Assessment", + "assessmentDetailsLink": "https://management.azure.com/subscriptions/a27e854a-8578-4395-8eaf-6fc7849f3050/providers/Microsoft.Security/securityStatuses/968548cb-02b3-8cd2-11f8-0cf64ab1a347", + "state": "failed", + "passedResources": 7, + "failedResources": 4, + "skippedResources": 0 + } + }, + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/2/regulatoryComplianceAssessments/3bcd234d-c9c7-c2a2-89e0-c01f419c1a8a", + "name": "3bcd234d-c9c7-c2a2-89e0-c01f419c1a8a", + "type": "Microsoft.Security/regulatoryComplianceAssessment", + "properties": { + "controlName": "1.1", + "description": "Resolve endpoint protection health issues on your machines", + "assessmentType": "Assessment", + "assessmentDetailsLink": "https://management.azure.com/subscriptions/a27e854a-8578-4395-8eaf-6fc7849f3050/providers/Microsoft.Security/securityStatuses/3bcd234d-c9c7-c2a2-89e0-c01f419c1a8a", + "state": "skipped", + "passedResources": 0, + "failedResources": 0, + "skippedResources": 10 + } + }, + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/2.1/regulatoryComplianceAssessments/d1db3318-01ff-16de-29eb-28b344515626", + "name": "d1db3318-01ff-16de-29eb-28b344515626", + "type": "Microsoft.Security/regulatoryComplianceAssessment", + "properties": { + "controlName": "1.1", + "description": "Install monitoring agent on your machines", + "assessmentType": "Assessment", + "assessmentDetailsLink": "https://management.azure.com/subscriptions/a27e854a-8578-4395-8eaf-6fc7849f3050/providers/Microsoft.Security/securityStatuses/d1db3318-01ff-16de-29eb-28b344515626", + "state": "passed", + "passedResources": 8, + "failedResources": 0, + "skippedResources": 0 + } + }] + } + } + } + } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceAssessment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceAssessment_example.json new file mode 100644 index 000000000000..fb587b9143f8 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceAssessment_example.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2019-01-01", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "regulatoryComplianceStandardName": "PCI-DSS-3.2", + "regulatoryComplianceControlName": "1.1", + "regulatoryComplianceAssessmentName": "968548cb-02b3-8cd2-11f8-0cf64ab1a347" + }, + "responses": { + "200": { + "body": { + "value": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/1.1/regulatoryComplianceAssessments/968548cb-02b3-8cd2-11f8-0cf64ab1a347", + "name": "968548cb-02b3-8cd2-11f8-0cf64ab1a347", + "type": "Microsoft.Security/regulatoryComplianceAssessment", + "properties": { + "controlName": "1.1", + "description": "Troubleshoot missing scan data on your machines", + "assessmentType": "Assessment", + "assessmentDetailsLink": "https://management.azure.com/subscriptions/a27e854a-8578-4395-8eaf-6fc7849f3050/providers/Microsoft.Security/securityStatuses/968548cb-02b3-8cd2-11f8-0cf64ab1a347", + "state": "failed", + "passedResources": 7, + "failedResources": 4, + "skippedResources": 0 + } + } + } + } + } + } \ No newline at end of file diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceControlList_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceControlList_example.json new file mode 100644 index 000000000000..c6d14084ec14 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceControlList_example.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2019-01-01", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "regulatoryComplianceStandardName": "PCI-DSS-3.2" + }, + "responses": { + "200": { + "body": { + "value": [{ + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/1.1", + "name": "1.1", + "type": "Microsoft.Security/regulatoryComplianceControl", + "properties": { + "standardName": "PCI-DSS-3.2", + "description": "Common Criteria Related to Organization and Management.", + "state": "failed", + "passedAssessments": 7, + "failedAssessments": 4, + "skippedAssessments": 0, + "unsupportedAssessments": 0 + } + }, + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/2", + "name": "2", + "type": "Microsoft.Security/regulatoryComplianceControl", + "properties": { + "standardName": "PCI-DSS-3.2", + "description": "Confidential information is protected during the system design, development, testing, implementation, and change processes in accordance with confidentiality commitments and requirements.", + "state": "skipped", + "passedAssessments": 0, + "failedAssessments": 0, + "skippedAssessments": 10, + "unsupportedAssessments": 0 + } + }, + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/2.1", + "name": "2.1", + "type": "Microsoft.Security/regulatoryComplianceControl", + "properties": { + "standardName": "PCI-DSS-3.2", + "description": "Changes to confidentiality commitments and requirements are communicated to internal and external users, vendors, and other third parties whose products and services are included in the system.", + "state": "unsupported", + "passedAssessments": 0, + "failedAssessments": 0, + "skippedAssessments": 0, + "unsupportedAssessments": 0 + } + }] + } + } + } + } \ No newline at end of file diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceControl_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceControl_example.json new file mode 100644 index 000000000000..7827996423b2 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceControl_example.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2019-01-01", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "regulatoryComplianceStandardName": "PCI-DSS-3.2", + "regulatoryComplianceControlName": "1.1" + }, + "responses": { + "200": { + "body": { + "value": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2/regulatoryComplianceControls/1.1", + "name": "1.1", + "type": "Microsoft.Security/regulatoryComplianceControl", + "properties": { + "standardName": "PCI-DSS-3.2", + "description": "Common Criteria Related to Organization and Management", + "state": "failed", + "passedAssessments": 7, + "failedAssessments": 4, + "skippedAssessments": 0, + "unsupportedAssessments": 0 + } + } + } + } + } + } \ No newline at end of file diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceStandardList_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceStandardList_example.json new file mode 100644 index 000000000000..48f00fa6037c --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceStandardList_example.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2019-01-01", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + }, + "responses": { + "200": { + "body": { + "value": [{ + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2", + "name": "PCI-DSS-3.2", + "type": "Microsoft.Security/regulatoryComplianceStandard", + "properties": { + "state": "failed", + "passedControls": 7, + "failedControls": 4, + "skippedControls": 0, + "unsupportedControls": 0 + } + }, + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/ISO-27001", + "name": "ISO-27001", + "type": "Microsoft.Security/regulatoryComplianceStandard", + "properties": { + "state": "skipped", + "passedControls": 0, + "failedControls": 0, + "skippedControls": 10, + "unsupportedControls": 0 + } + }, + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/AZURE-CIS", + "name": "AZURE-CIS", + "type": "Microsoft.Security/regulatoryComplianceStandard", + "properties": { + "state": "unsupported", + "passedControls": 0, + "failedControls": 0, + "skippedControls": 0, + "unsupportedControls": 0 + } + }, + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/SOC-TSP", + "name": "SOC-TSP", + "type": "Microsoft.Security/regulatoryComplianceStandard", + "properties": { + "state": "passed", + "passedControls": 15, + "failedControls": 0, + "skippedControls": 0, + "unsupportedControls": 0 + } + }] + } + } + } + } \ No newline at end of file diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceStandard_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceStandard_example.json new file mode 100644 index 000000000000..27954f21caba --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/RegulatoryCompliance/getRegulatoryComplianceStandard_example.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2019-01-01", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "regulatoryComplianceStandardName": "PCI-DSS-3.2" + }, + "responses": { + "200": { + "body": { + "value": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/regulatoryComplianceStandards/PCI-DSS-3.2", + "name": "PCI-DSS-3.2", + "type": "Microsoft.Security/regulatoryComplianceStandard", + "properties": { + "state": "failed", + "passedControls": 7, + "failedControls": 4, + "skippedControls": 0, + "unsupportedControls": 0 + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json new file mode 100644 index 000000000000..4a9766141bfc --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json @@ -0,0 +1,621 @@ +{ + "swagger": "2.0", + "info": { + "title": "Security Center", + "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", + "version": "2019-01-01-preview" + }, + "host": "management.azure.com", + "schemes": ["https"], + "consumes": ["application/json"], + "produces": ["application/json"], + "security": [ + { + "azure_auth": ["user_impersonation"] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards": { + "get": { + "x-ms-examples": { + "Get all supported regulatory compliance standards details and state": { + "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceStandardList_example.json" + } + }, + "tags": ["RegulatoryCompliance"], + "description": "Supported regulatory compliance standards details and state", + "operationId": "RegulatoryCompliance_ListRegulatoryComplianceStandards", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ODataFilter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RegulatoryComplianceStandardList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}": { + "get": { + "x-ms-examples": { + "Get selected regulatory compliance standard details and state": { + "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceStandard_example.json" + } + }, + "tags": ["RegulatoryCompliance"], + "description": "Supported regulatory compliance details state for selected standard", + "operationId": "RegulatoryCompliance_GetRegulatoryComplianceStandard", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceStandardName" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RegulatoryComplianceStandard" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls": { + "get": { + "x-ms-examples": { + "Get all regulatory compliance controls details and state for selected standard": { + "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceControlList_example.json" + } + }, + "tags": ["RegulatoryCompliance"], + "description": "All supported regulatory compliance controls details and state for selected standard", + "operationId": "RegulatoryCompliance_ListRegulatoryComplianceControls", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceStandardName" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ODataFilter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RegulatoryComplianceControlList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}": { + "get": { + "x-ms-examples": { + "Get selected regulatory compliance control details and state": { + "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceControl_example.json" + } + }, + "tags": ["RegulatoryCompliance"], + "description": "Selected regulatory compliance control details and state", + "operationId": "RegulatoryCompliance_GetRegulatoryComplianceControl", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceStandardName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceControlName" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RegulatoryComplianceControl" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments": { + "get": { + "x-ms-examples": { + "Get all assessments mapped to selected regulatory compliance control": { + "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceAssessmentList_example.json" + } + }, + "tags": ["RegulatoryCompliance"], + "description": "Details and state of assessments mapped to selected regulatory compliance control", + "operationId": "RegulatoryCompliance_ListRegulatoryComplianceAssessments", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceStandardName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceControlName" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ODataFilter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RegulatoryComplianceAssessmentList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}": { + "get": { + "x-ms-examples": { + "Get selected regulatory compliance assessment details and state": { + "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceAssessment_example.json" + } + }, + "tags": ["RegulatoryCompliance"], + "description": "Supported regulatory compliance details and state for selected assessment", + "operationId": "RegulatoryCompliance_GetRegulatoryComplianceAssessment", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceStandardName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceControlName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceAssessmentName" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RegulatoryComplianceAssessment" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + } + }, + "definitions": { + "RegulatoryComplianceStandardList": { + "description": "List of regulatory compliance standards response", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/RegulatoryComplianceStandard" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URI to fetch the next page." + } + } + }, + "RegulatoryComplianceStandard": { + "type": "object", + "description": "Regulatory compliance standard details and state", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Regulatory compliance standard data", + "$ref": "#/definitions/RegulatoryComplianceStandardProperties" + } + }, + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/Resource" + } + ] + }, + "RegulatoryComplianceStandardProperties": { + "type": "object", + "description": "Regulatory compliance standard data", + "properties": { + "state": { + "type": "string", + "description": "Aggregative state based on the standard's supported controls states", + "enum": ["Passed", "Failed", "Skipped", "Unsupported"], + "x-ms-enum": { + "name": "state", + "modelAsString": true, + "values": [ + { + "value": "Passed", + "description": "All supported regulatory compliance controls in the given standard have a passed state" + }, + { + "value": "Failed", + "description": "At least one supported regulatory compliance control in the given standard has a state of failed" + }, + { + "value": "Skipped", + "description": "All supported regulatory compliance controls in the given standard have a state of skipped" + }, + { + "value": "Unsupported", + "description": "No supported regulatory compliance data for the given standard" + } + ] + } + }, + "passedControls": { + "readOnly": true, + "type": "integer", + "description": "The number of supported regulatory compliance controls of the given standard with a passed state" + }, + "failedControls": { + "readOnly": true, + "type": "integer", + "description": "The number of supported regulatory compliance controls of the given standard with a failed state" + }, + "skippedControls": { + "readOnly": true, + "type": "integer", + "description": "The number of supported regulatory compliance controls of the given standard with a skipped state" + }, + "unsupportedControls": { + "readOnly": true, + "type": "integer", + "description": "The number of regulatory compliance controls of the given standard which are unsupported by automated assessments" + } + } + }, + "RegulatoryComplianceControlList": { + "description": "List of regulatory compliance controls response", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "description": "List of regulatory compliance controls", + "items": { + "$ref": "#/definitions/RegulatoryComplianceControl" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URI to fetch the next page." + } + } + }, + "RegulatoryComplianceControl": { + "type": "object", + "description": "Regulatory compliance control details and state", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Regulatory compliance control data", + "$ref": "#/definitions/RegulatoryComplianceControlProperties" + } + }, + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/Resource" + } + ] + }, + "RegulatoryComplianceControlProperties": { + "type": "object", + "description": "Regulatory compliance control data", + "properties": { + "description": { + "readOnly": true, + "type": "string", + "description": "The description of the regulatory compliance control" + }, + "state": { + "type": "string", + "description": "Aggregative state based on the control's supported assessments states", + "enum": ["Passed", "Failed", "Skipped", "Unsupported"], + "x-ms-enum": { + "name": "state", + "modelAsString": true, + "values": [ + { + "value": "Passed", + "description": "All supported regulatory compliance assessments in the given control have a passed state" + }, + { + "value": "Failed", + "description": "At least one supported regulatory compliance assessment in the given control has a state of failed" + }, + { + "value": "Skipped", + "description": "All supported regulatory compliance assessments in the given control have a state of skipped" + }, + { + "value": "Unsupported", + "description": "No supported regulatory assessment data for the given control" + } + ] + } + }, + "passedAssessments": { + "readOnly": true, + "type": "integer", + "description": "The number of supported regulatory compliance assessments of the given control with a passed state" + }, + "failedAssessments": { + "readOnly": true, + "type": "integer", + "description": "The number of supported regulatory compliance assessments of the given control with a failed state" + }, + "skippedAssessments": { + "readOnly": true, + "type": "integer", + "description": "The number of supported regulatory compliance assessments of the given control with a skipped state" + } + } + }, + "RegulatoryComplianceAssessmentList": { + "description": "List of regulatory compliance assessment response", + "required": ["value"], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/RegulatoryComplianceAssessment" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URI to fetch the next page." + } + } + }, + "RegulatoryComplianceAssessment": { + "type": "object", + "description": "Regulatory compliance assessment details and state", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Regulatory compliance assessment data", + "$ref": "#/definitions/RegulatoryComplianceAssessmentProperties" + } + }, + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/Resource" + } + ] + }, + "RegulatoryComplianceAssessmentProperties": { + "type": "object", + "description": "Regulatory compliance assessment data", + "properties": { + "description": { + "readOnly": true, + "type": "string", + "description": "The description of the regulatory compliance assessment" + }, + "assessmentType": { + "readOnly": true, + "type": "string", + "description": "The expected type of assessment (‘assessment’ or ‘baseline’) contained in the AssessmentDetailsLink", + "x-ms-enum": { + "name": "assessmentType", + "modelAsString": true, + "values": [ + { + "value": "Assessment", + "description": "Data ype is of security assessment" + }, + { + "value": "Rule", + "description": "Data ype is of security rule" + } + ] + } + }, + "assessmentDetailsLink": { + "readOnly": true, + "type": "string", + "description": "Link to more detailed assessment results data. The response type will be according to the assessmentType field" + }, + "state": { + "type": "string", + "description": "Aggregative state based on the assessment's scanned resources states", + "enum": ["Passed", "Failed", "Skipped"], + "x-ms-enum": { + "name": "state", + "modelAsString": true, + "values": [ + { + "value": "Passed", + "description": "All related resources passed the given assessment" + }, + { + "value": "Failed", + "description": "The given assessment failed on at least one resource" + }, + { + "value": "Skipped", + "description": "The given assessment skipped on all related resources" + } + ] + } + }, + "passedResources": { + "readOnly": true, + "type": "integer", + "description": "The given assessment's related resources count with passed state." + }, + "failedResources": { + "readOnly": true, + "type": "integer", + "description": "The given assessment's related resources count with failed state." + }, + "skippedResources": { + "readOnly": true, + "type": "integer", + "description": "The given assessment's related resources count with skipped state." + } + } + }, + "AscLocationList": { + "type": "object", + "description": "List of locations where ASC saves your data", + "properties": { + "value": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/AscLocation" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URI to fetch the next page." + } + } + } + }, + "parameters": { + "RegulatoryComplianceStandardName": { + "name": "regulatoryComplianceStandardName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the regulatory compliance standard object", + "x-ms-parameter-location": "method" + }, + "RegulatoryComplianceControlName": { + "name": "regulatoryComplianceControlName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the regulatory compliance control object", + "x-ms-parameter-location": "method" + }, + "RegulatoryComplianceAssessmentName": { + "name": "regulatoryComplianceAssessmentName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the regulatory compliance assessment object", + "x-ms-parameter-location": "method" + } + } +} From 73573acb96bfdbfa210d383f43f68ff95f1581bc Mon Sep 17 00:00:00 2001 From: Hila Markovitch Date: Thu, 7 Mar 2019 18:11:01 +0200 Subject: [PATCH 02/14] Regulatory compliance API --- .../preview/2019-01-01-preview/regulatoryCompliance.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json index 4a9766141bfc..7c79601c8991 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json @@ -106,6 +106,7 @@ "$ref": "../../../common/v1/types.json#/definitions/CloudError" } } + } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls": { From bdfab42b7537073beaa0944cd92ad91ad1ec5777 Mon Sep 17 00:00:00 2001 From: Hila Markovitch Date: Thu, 7 Mar 2019 18:30:48 +0200 Subject: [PATCH 03/14] Regulatory compliance API --- .../regulatoryCompliance.json | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json index 7c79601c8991..cc7f47dee6ac 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json @@ -104,7 +104,7 @@ "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../common/v1/types.json#/definitions/CloudError" - } +} } } } @@ -573,24 +573,6 @@ "description": "The given assessment's related resources count with skipped state." } } - }, - "AscLocationList": { - "type": "object", - "description": "List of locations where ASC saves your data", - "properties": { - "value": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/AscLocation" - } - }, - "nextLink": { - "readOnly": true, - "type": "string", - "description": "The URI to fetch the next page." - } - } } }, "parameters": { From 76d548e04d913bd1e85df8659df11545f7c3c17a Mon Sep 17 00:00:00 2001 From: Hila Markovitch Date: Sun, 10 Mar 2019 09:53:28 +0200 Subject: [PATCH 04/14] Regulatory compliance API --- .../2019-01-01-preview/regulatoryCompliance.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json index cc7f47dee6ac..de29ac637489 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json @@ -35,7 +35,7 @@ }, "tags": ["RegulatoryCompliance"], "description": "Supported regulatory compliance standards details and state", - "operationId": "RegulatoryCompliance_ListRegulatoryComplianceStandards", + "operationId": "RegulatoryComplianceStandards_List", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -78,7 +78,7 @@ }, "tags": ["RegulatoryCompliance"], "description": "Supported regulatory compliance details state for selected standard", - "operationId": "RegulatoryCompliance_GetRegulatoryComplianceStandard", + "operationId": "RegulatoryComplianceStandards_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -118,7 +118,7 @@ }, "tags": ["RegulatoryCompliance"], "description": "All supported regulatory compliance controls details and state for selected standard", - "operationId": "RegulatoryCompliance_ListRegulatoryComplianceControls", + "operationId": "RegulatoryComplianceControls_List", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -164,7 +164,7 @@ }, "tags": ["RegulatoryCompliance"], "description": "Selected regulatory compliance control details and state", - "operationId": "RegulatoryCompliance_GetRegulatoryComplianceControl", + "operationId": "RegulatoryComplianceControls_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -207,7 +207,7 @@ }, "tags": ["RegulatoryCompliance"], "description": "Details and state of assessments mapped to selected regulatory compliance control", - "operationId": "RegulatoryCompliance_ListRegulatoryComplianceAssessments", + "operationId": "RegulatoryComplianceAssessments_List", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -256,7 +256,7 @@ }, "tags": ["RegulatoryCompliance"], "description": "Supported regulatory compliance details and state for selected assessment", - "operationId": "RegulatoryCompliance_GetRegulatoryComplianceAssessment", + "operationId": "RegulatoryComplianceAssessments_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" From b90c3c833e8cfab9ba60e9ca4248e75da0c8c278 Mon Sep 17 00:00:00 2001 From: himarkov <47382544+himarkov@users.noreply.github.com> Date: Sun, 10 Mar 2019 10:34:55 +0200 Subject: [PATCH 05/14] Regulatory compliance API --- .../2019-01-01-preview/regulatoryCompliance.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json index cc7f47dee6ac..de29ac637489 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json @@ -35,7 +35,7 @@ }, "tags": ["RegulatoryCompliance"], "description": "Supported regulatory compliance standards details and state", - "operationId": "RegulatoryCompliance_ListRegulatoryComplianceStandards", + "operationId": "RegulatoryComplianceStandards_List", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -78,7 +78,7 @@ }, "tags": ["RegulatoryCompliance"], "description": "Supported regulatory compliance details state for selected standard", - "operationId": "RegulatoryCompliance_GetRegulatoryComplianceStandard", + "operationId": "RegulatoryComplianceStandards_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -118,7 +118,7 @@ }, "tags": ["RegulatoryCompliance"], "description": "All supported regulatory compliance controls details and state for selected standard", - "operationId": "RegulatoryCompliance_ListRegulatoryComplianceControls", + "operationId": "RegulatoryComplianceControls_List", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -164,7 +164,7 @@ }, "tags": ["RegulatoryCompliance"], "description": "Selected regulatory compliance control details and state", - "operationId": "RegulatoryCompliance_GetRegulatoryComplianceControl", + "operationId": "RegulatoryComplianceControls_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -207,7 +207,7 @@ }, "tags": ["RegulatoryCompliance"], "description": "Details and state of assessments mapped to selected regulatory compliance control", - "operationId": "RegulatoryCompliance_ListRegulatoryComplianceAssessments", + "operationId": "RegulatoryComplianceAssessments_List", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -256,7 +256,7 @@ }, "tags": ["RegulatoryCompliance"], "description": "Supported regulatory compliance details and state for selected assessment", - "operationId": "RegulatoryCompliance_GetRegulatoryComplianceAssessment", + "operationId": "RegulatoryComplianceAssessments_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" From f944986652323eff605364e7e9723eb3a3d0f3ba Mon Sep 17 00:00:00 2001 From: Hila Markovitch Date: Wed, 20 Mar 2019 10:11:33 +0200 Subject: [PATCH 06/14] Regulatory compliance API readme update --- .../preview/2019-01-01-preview/security.json | 723 ++++++++++++++++++ .../security/resource-manager/readme.md | 1 + 2 files changed, 724 insertions(+) create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/security.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/security.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/security.json new file mode 100644 index 000000000000..2f37fdf47f71 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/security.json @@ -0,0 +1,723 @@ +{ + "swagger": "2.0", + "info": { + "title": "Security Center", + "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", + "version": "2019-01-01-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards": { + "get": { + "x-ms-examples": { + "Get all supported regulatory compliance standards details and state": { + "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceStandardList_example.json" + } + }, + "tags": [ "RegulatoryCompliance"], + "description": "Supported regulatory compliance standards details and state", + "operationId": "RegulatoryComplianceStandards_List", + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/ODataFilter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RegulatoryComplianceStandardList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}": { + "get": { + "x-ms-examples": { + "Get selected regulatory compliance standard details and state": { + "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceStandard_example.json" + } + }, + "tags": [ "RegulatoryCompliance"], + "description": "Supported regulatory compliance details state for selected standard", + "operationId": "RegulatoryComplianceStandards_Get", + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceStandardName" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RegulatoryComplianceStandard" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls": { + "get": { + "x-ms-examples": { + "Get all regulatory compliance controls details and state for selected standard": { + "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceControlList_example.json" + } + }, + "tags": [ "RegulatoryCompliance"], + "description": "All supported regulatory compliance controls details and state for selected standard", + "operationId": "RegulatoryComplianceControls_List", + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceStandardName" + }, + { + "$ref": "#/parameters/ODataFilter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RegulatoryComplianceControlList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}": { + "get": { + "x-ms-examples": { + "Get selected regulatory compliance control details and state": { + "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceControl_example.json" + } + }, + "tags": [ "RegulatoryCompliance"], + "description": "Selected regulatory compliance control details and state", + "operationId": "RegulatoryComplianceControls_Get", + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceStandardName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceControlName" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RegulatoryComplianceControl" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments": { + "get": { + "x-ms-examples": { + "Get all assessments mapped to selected regulatory compliance control": { + "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceAssessmentList_example.json" + } + }, + "tags": [ "RegulatoryCompliance"], + "description": "Details and state of assessments mapped to selected regulatory compliance control", + "operationId": "RegulatoryComplianceAssessments_List", + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceStandardName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceControlName" + }, + { + "$ref": "#/parameters/ODataFilter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RegulatoryComplianceAssessmentList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}": { + "get": { + "x-ms-examples": { + "Get selected regulatory compliance assessment details and state": { + "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceAssessment_example.json" + } + }, + "tags": [ "RegulatoryCompliance"], + "description": "Supported regulatory compliance details and state for selected assessment", + "operationId": "RegulatoryComplianceAssessments_Get", + "parameters": [ + { + "$ref": "#/parameters/ApiVersion" + }, + { + "$ref": "#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceStandardName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceControlName" + }, + { + "$ref": "#/parameters/RegulatoryComplianceAssessmentName" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RegulatoryComplianceAssessment" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + } + } + } + }, + "definitions": { + "CloudError": { + "x-ms-external": true, + "type": "object", + "description": "Error response structure.", + "properties": { + "error": { + "x-ms-client-flatten": true, + "description": "Error data", + "$ref": "#/definitions/CloudErrorBody" + } + } + }, + "CloudErrorBody": { + "x-ms-external": true, + "type": "object", + "description": "Error details.", + "properties": { + "code": { + "readOnly": true, + "type": "string", + "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically." + }, + "message": { + "readOnly": true, + "type": "string", + "description": "A message describing the error, intended to be suitable for display in a user interface." + } + } + }, + "Resource": { + "type": "object", + "description": "Describes an Azure resource.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource Id" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "Resource name" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type" + } + }, + "x-ms-azure-resource": true + }, + "Kind": { + "type": "object", + "description": "Describes an Azure resource with kind", + "properties": { + "kind": { + "type": "string", + "description": "Kind of the resource" + } + } + }, + "RegulatoryComplianceStandardList": { + "description": "List of regulatory compliance standards response", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/RegulatoryComplianceStandard" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URI to fetch the next page." + } + } + }, + "RegulatoryComplianceStandard": { + "type": "object", + "description": "Regulatory compliance standard details and state", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Regulatory compliance standard data", + "$ref": "#/definitions/RegulatoryComplianceStandardProperties" + } + }, + "allOf": [{ + "$ref": "#/definitions/Resource" + }] + }, + "RegulatoryComplianceStandardProperties": { + "type": "object", + "description": "Regulatory compliance standard data", + "properties": { + "state": { + "type": "string", + "description": "Regulatory compliance standard state", + "enum": ["Passed", "Failed", "Skipped", "Unsupported"], + "x-ms-enum": { + "name": "state", + "modelAsString": true, + "values": [{ + "value": "Passed", + "description": "All supported regulatory compliance controls in the standard have a passed state" + }, + { + "value": "Failed", + "description": "At least one supported regulatory compliance control in the standard has a state of failed" + }, + { + "value": "Skipped", + "description": "All supported regulatory compliance controls in the standard have a state of skipped" + }, + { + "value": "Unsupported", + "description": "No supported regulatory compliance data for the standard" + } + ] + } + }, + "passedControls": { + "readOnly": true, + "type": "integer", + "description": "The number of supported regulatory compliance controls of the given standard with a passed state" + }, + "failedControls": { + "readOnly": true, + "type": "integer", + "description": "The number of supported regulatory compliance controls of the given standard with a failed state" + }, + "skippedControls": { + "readOnly": true, + "type": "integer", + "description": "The number of supported regulatory compliance controls of the given standard with a skipped state" + }, + "unsupportedControls": { + "readOnly": true, + "type": "integer", + "description": "The number of regulatory compliance controls of the given standard which are unsupported by automated assessments" + } + } + }, + "RegulatoryComplianceControlList": { + "description": "List of regulatory compliance controls response", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "description": "List of regulatory compliance controls", + "items": { + "$ref": "#/definitions/RegulatoryComplianceControl" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URI to fetch the next page." + } + } + }, + "RegulatoryComplianceControl": { + "type": "object", + "description": "Regulatory compliance control details and state", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Regulatory compliance control data", + "$ref": "#/definitions/RegulatoryComplianceControlProperties" + } + }, + "allOf": [{ + "$ref": "#/definitions/Resource" + }] + }, + "RegulatoryComplianceControlProperties": { + "type": "object", + "description": "Regulatory compliance control data", + "properties": { + "description": { + "readOnly": true, + "type": "string", + "description": "The description of the regulatory compliance control" + }, + "state": { + "type": "string", + "description": "Regulatory compliance standard state", + "enum": ["Passed", "Failed", "Skipped", "Unsupported"], + "x-ms-enum": { + "name": "state", + "modelAsString": true, + "values": [{ + "value": "Passed", + "description": "All supported regulatory compliance assessments in the control have a passed state" + }, + { + "value": "Failed", + "description": "At least one supported regulatory compliance assessment in the control has a state of failed" + }, + { + "value": "Skipped", + "description": "All supported regulatory compliance assessments in the control have a state of skipped" + }, + { + "value": "Unsupported", + "description": "No supported regulatory assessment data for the control" + } + ] + } + }, + "passedAssessments": { + "readOnly": true, + "type": "integer", + "description": "The number of supported regulatory compliance assessments of the given control with a passed state" + }, + "failedAssessments": { + "readOnly": true, + "type": "integer", + "description": "The number of supported regulatory compliance assessments of the given control with a failed state" + }, + "skippedAssessments": { + "readOnly": true, + "type": "integer", + "description": "The number of supported regulatory compliance assessments of the given control with a skipped state" + } + } + }, + "RegulatoryComplianceAssessmentList": { + "description": "List of regulatory compliance assessment response", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/RegulatoryComplianceAssessment" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URI to fetch the next page." + } + } + }, + "RegulatoryComplianceAssessment": { + "type": "object", + "description": "Regulatory compliance assessment details and state", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Regulatory compliance assessment data", + "$ref": "#/definitions/RegulatoryComplianceAssessmentProperties" + } + }, + "allOf": [{ + "$ref": "#/definitions/Resource" + }] + }, + "RegulatoryComplianceAssessmentProperties": { + "type": "object", + "description": "Regulatory compliance assessment data", + "properties": { + "description": { + "readOnly": true, + "type": "string", + "description": "The description of the regulatory compliance assessment" + }, + "assessmentType": { + "readOnly": true, + "type": "string", + "description": "The expected type of assessment contained in the AssessmentDetailsLink", + "enum": ["Assessment", "Rule"], + "x-ms-enum": { + "name": "state", + "modelAsString": true, + "values": [{ + "value": "Assessment", + "description": "Data ype is of security assessment" + }, + { + "value": "Rule", + "description": "Data ype is of security rule" + } + ] + } + }, + "assessmentDetailsLink": { + "readOnly": true, + "type": "string", + "description": "Link to more detailed assessment results data. The response type will be according to the assessmentType field" + }, + "state": { + "type": "string", + "description": "Regulatory compliance standard state", + "enum": ["Passed", "Failed", "Skipped"], + "x-ms-enum": { + "name": "state", + "modelAsString": true, + "values": [{ + "value": "Passed", + "description": "All related resources passed the assessment" + }, + { + "value": "Failed", + "description": "The assessment failed on at least one resource" + }, + { + "value": "Skipped", + "description": "The assessment skipped on all related resources" + } + ] + } + }, + "passedResources": { + "readOnly": true, + "type": "integer", + "description": "The assessment's related resources count with passed state." + }, + "failedResources": { + "readOnly": true, + "type": "integer", + "description": "The assessment's related resources count with failed state." + }, + "skippedResources": { + "readOnly": true, + "type": "integer", + "description": "The assessment's related resources count with skipped state." + } + } + } + }, + "parameters": { + "SubscriptionId": { + "name": "subscriptionId", + "in": "path", + "required": true, + "pattern": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$", + "type": "string", + "description": "Azure subscription ID" + }, + "ResourceGroupName": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group within the user's subscription. The name is case insensitive.", + "pattern": "^[-\\w\\._\\(\\)]+$", + "minLength": 1, + "maxLength": 90, + "x-ms-parameter-location": "method" + }, + "ApiVersion": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "enum": [ + "2019-01-01" + ], + "description": "API version for the operation" + }, + "ODataFilter": { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "OData filter. Optional.", + "x-ms-parameter-location": "method" + }, + "ODataSelect": { + "name": "$select", + "in": "query", + "required": false, + "type": "string", + "description": "OData select. Optional.", + "x-ms-parameter-location": "method" + }, + "ODataExpand": { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "description": "OData expand. Optional.", + "x-ms-parameter-location": "method" + }, + "RegulatoryComplianceStandardName": { + "name": "regulatoryComplianceStandardName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the regulatory compliance standard object", + "x-ms-parameter-location": "method" + }, + "RegulatoryComplianceControlName": { + "name": "regulatoryComplianceControlName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the regulatory compliance control object", + "x-ms-parameter-location": "method" + }, + "RegulatoryComplianceAssessmentName": { + "name": "regulatoryComplianceAssessmentName", + "in": "path", + "required": true, + "type": "string", + "description": "Name of the regulatory compliance assessment object", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 711c121ebab7..9b93c520ca62 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -47,6 +47,7 @@ These settings apply only when `--tag=package-composite-v1` is specified on the input-file: - Microsoft.Security/preview/2017-08-01-preview/security.json - Microsoft.Security/preview/2015-06-01-preview/security.json +- Microsoft.Security/preview/2019-01-01-preview/security.json ``` --- From 4cbcdfc3e04d7c4408cbe898637e9a793b535566 Mon Sep 17 00:00:00 2001 From: Hila Markovitch Date: Wed, 20 Mar 2019 10:24:03 +0200 Subject: [PATCH 07/14] Regulatory compliance API readme update --- .../security/resource-manager/readme.md | 88 +++++++++++++++---- 1 file changed, 69 insertions(+), 19 deletions(-) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 9b93c520ca62..1150682bf9cd 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -10,7 +10,8 @@ This is the AutoRest configuration file for Security. To build the SDK for Security, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: -> `autorest` + +- Microsoft.Security/preview/2019-01-01-preview/.json> `autorest` To see additional help and options, run: @@ -25,7 +26,7 @@ To see additional help and options, run: ```yaml directive: - suppress: ValidFormats - from: security.json + from: securityContacts.json where: $.definitions.SecurityContactProperties.properties.email.format reason: email format is allowed ``` @@ -35,19 +36,75 @@ directive: These are the global settings for the Security API. ```yaml +title: SecurityCenter +description: API spec for Microsoft.Security (Azure Security Center) resource provider openapi-type: arm -tag: package-composite-v1 +tag: package-composite-v2 ``` +## Composite packages + +The following packages may be composed from multiple api-versions. + ### Tag: package-composite-v1 These settings apply only when `--tag=package-composite-v1` is specified on the command line. ```yaml $(tag) == 'package-composite-v1' input-file: -- Microsoft.Security/preview/2017-08-01-preview/security.json -- Microsoft.Security/preview/2015-06-01-preview/security.json -- Microsoft.Security/preview/2019-01-01-preview/security.json +- Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json +- Microsoft.Security/preview/2017-08-01-preview/pricings.json +- Microsoft.Security/preview/2017-08-01-preview/securityContacts.json +- Microsoft.Security/preview/2017-08-01-preview/workspaceSettings.json +- Microsoft.Security/preview/2017-08-01-preview/autoProvisioningSettings.json +- Microsoft.Security/preview/2017-08-01-preview/compliances.json +- Microsoft.Security/preview/2017-08-01-preview/advancedThreatProtectionSettings.json +- Microsoft.Security/preview/2017-08-01-preview/settings.json +- Microsoft.Security/preview/2017-08-01-preview/informationProtectionPolicies.json +- Microsoft.Security/preview/2015-06-01-preview/operations.json +- Microsoft.Security/preview/2015-06-01-preview/locations.json +- Microsoft.Security/preview/2015-06-01-preview/tasks.json +- Microsoft.Security/preview/2015-06-01-preview/alerts.json +- Microsoft.Security/preview/2015-06-01-preview/discoveredSecuritySolutions.json +- Microsoft.Security/preview/2015-06-01-preview/jitNetworkAccessPolicies.json +- Microsoft.Security/preview/2015-06-01-preview/externalSecuritySolutions.json +- Microsoft.Security/preview/2015-06-01-preview/topologies.json +- Microsoft.Security/preview/2015-06-01-preview/allowedConnections.json + +# Needed when there is more than one input file +override-info: + title: SecurityCenter +``` + +### Tag: package-composite-v2 + +These settings apply only when `--tag=package-composite-v2` is specified on the command line. + +```yaml $(tag) == 'package-composite-v2' +input-file: +- Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance/.json +- Microsoft.Security/stable/2018-06-01/pricings.json +- Microsoft.Security/preview/2017-08-01-preview/securityContacts.json +- Microsoft.Security/preview/2017-08-01-preview/workspaceSettings.json +- Microsoft.Security/preview/2017-08-01-preview/autoProvisioningSettings.json +- Microsoft.Security/preview/2017-08-01-preview/compliances.json +- Microsoft.Security/preview/2017-08-01-preview/advancedThreatProtectionSettings.json +- Microsoft.Security/preview/2017-08-01-preview/settings.json +- Microsoft.Security/preview/2017-08-01-preview/informationProtectionPolicies.json +- Microsoft.Security/preview/2015-06-01-preview/operations.json +- Microsoft.Security/preview/2015-06-01-preview/locations.json +- Microsoft.Security/preview/2015-06-01-preview/tasks.json +- Microsoft.Security/stable/2019-01-01/alerts.json +- Microsoft.Security/preview/2015-06-01-preview/discoveredSecuritySolutions.json +- Microsoft.Security/preview/2015-06-01-preview/jitNetworkAccessPolicies.json +- Microsoft.Security/preview/2015-06-01-preview/externalSecuritySolutions.json +- Microsoft.Security/preview/2015-06-01-preview/topologies.json +- Microsoft.Security/preview/2015-06-01-preview/allowedConnections.json + +# Needed when there is more than one input file +override-info: + title: SecurityCenter +>>>>>>> master ``` --- @@ -69,18 +126,7 @@ swagger-to-sdk: ## C# -These settings apply only when `--csharp` is specified on the command line. -Please also specify `--csharp-sdks-folder=`. - -```yaml $(csharp) -csharp: - azure-arm: true - license-header: MICROSOFT_MIT_NO_VERSION - namespace: Microsoft.Azure.Management.Security - payload-flattening-threshold: 2 - output-folder: $(csharp-sdks-folder)/SecurityCenter/Management.SecurityCenter/Generated - clear-output-folder: true -``` +See configuration in [readme.csharp.md](./readme.csharp.md) ## Go @@ -96,4 +142,8 @@ See configuration in [readme.nodejs.md](./readme.nodejs.md) ## TypeScript -See configuration in [readme.typescript.md](./readme.typescript.md) \ No newline at end of file +See configuration in [readme.typescript.md](./readme.typescript.md) + +## Ruby + +See configuration in [readme.ruby.md](./readme.ruby.md) \ No newline at end of file From 380e97baafb920d264d07136a800893f6f3f8ec1 Mon Sep 17 00:00:00 2001 From: himarkov <47382544+himarkov@users.noreply.github.com> Date: Wed, 20 Mar 2019 10:28:43 +0200 Subject: [PATCH 08/14] Update readme.md --- specification/security/resource-manager/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 782f74f4e550..f6a2922af11a 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -82,7 +82,7 @@ These settings apply only when `--tag=package-composite-v2` is specified on the ```yaml $(tag) == 'package-composite-v2' input-file: -- Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance/.json +- Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json - Microsoft.Security/stable/2018-06-01/pricings.json - Microsoft.Security/preview/2017-08-01-preview/securityContacts.json - Microsoft.Security/preview/2017-08-01-preview/workspaceSettings.json @@ -145,4 +145,4 @@ See configuration in [readme.typescript.md](./readme.typescript.md) ## Ruby -See configuration in [readme.ruby.md](./readme.ruby.md) \ No newline at end of file +See configuration in [readme.ruby.md](./readme.ruby.md) From cc77f9f864e29362244d0471aafd9b8d01370d7e Mon Sep 17 00:00:00 2001 From: himarkov <47382544+himarkov@users.noreply.github.com> Date: Wed, 20 Mar 2019 10:29:32 +0200 Subject: [PATCH 09/14] Update readme.md --- specification/security/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index f6a2922af11a..e3844e2f3236 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -11,7 +11,7 @@ This is the AutoRest configuration file for Security. To build the SDK for Security, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: -- Microsoft.Security/preview/2019-01-01-preview/.json> `autorest` +> `autorest` To see additional help and options, run: From 8265205605c5f5d3f82e4f0eabc9c1fb6f235be2 Mon Sep 17 00:00:00 2001 From: himarkov <47382544+himarkov@users.noreply.github.com> Date: Wed, 20 Mar 2019 10:30:02 +0200 Subject: [PATCH 10/14] Update readme.md --- specification/security/resource-manager/readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index e3844e2f3236..44408a6ea173 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -10,7 +10,6 @@ This is the AutoRest configuration file for Security. To build the SDK for Security, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: - > `autorest` To see additional help and options, run: From c995c15d94b18e48de69084cf2759ddfd7b6e39f Mon Sep 17 00:00:00 2001 From: himarkov <47382544+himarkov@users.noreply.github.com> Date: Wed, 20 Mar 2019 10:34:29 +0200 Subject: [PATCH 11/14] Delete security.json --- .../preview/2019-01-01-preview/security.json | 723 ------------------ 1 file changed, 723 deletions(-) delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/security.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/security.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/security.json deleted file mode 100644 index 2f37fdf47f71..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/security.json +++ /dev/null @@ -1,723 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Security Center", - "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", - "version": "2019-01-01-preview" - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "azure_auth": [ - "user_impersonation" - ] - } - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards": { - "get": { - "x-ms-examples": { - "Get all supported regulatory compliance standards details and state": { - "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceStandardList_example.json" - } - }, - "tags": [ "RegulatoryCompliance"], - "description": "Supported regulatory compliance standards details and state", - "operationId": "RegulatoryComplianceStandards_List", - "parameters": [ - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/SubscriptionId" - }, - { - "$ref": "#/parameters/ResourceGroupName" - }, - { - "$ref": "#/parameters/ODataFilter" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/RegulatoryComplianceStandardList" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}": { - "get": { - "x-ms-examples": { - "Get selected regulatory compliance standard details and state": { - "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceStandard_example.json" - } - }, - "tags": [ "RegulatoryCompliance"], - "description": "Supported regulatory compliance details state for selected standard", - "operationId": "RegulatoryComplianceStandards_Get", - "parameters": [ - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/SubscriptionId" - }, - { - "$ref": "#/parameters/ResourceGroupName" - }, - { - "$ref": "#/parameters/RegulatoryComplianceStandardName" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/RegulatoryComplianceStandard" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls": { - "get": { - "x-ms-examples": { - "Get all regulatory compliance controls details and state for selected standard": { - "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceControlList_example.json" - } - }, - "tags": [ "RegulatoryCompliance"], - "description": "All supported regulatory compliance controls details and state for selected standard", - "operationId": "RegulatoryComplianceControls_List", - "parameters": [ - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/SubscriptionId" - }, - { - "$ref": "#/parameters/ResourceGroupName" - }, - { - "$ref": "#/parameters/RegulatoryComplianceStandardName" - }, - { - "$ref": "#/parameters/ODataFilter" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/RegulatoryComplianceControlList" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}": { - "get": { - "x-ms-examples": { - "Get selected regulatory compliance control details and state": { - "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceControl_example.json" - } - }, - "tags": [ "RegulatoryCompliance"], - "description": "Selected regulatory compliance control details and state", - "operationId": "RegulatoryComplianceControls_Get", - "parameters": [ - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/SubscriptionId" - }, - { - "$ref": "#/parameters/ResourceGroupName" - }, - { - "$ref": "#/parameters/RegulatoryComplianceStandardName" - }, - { - "$ref": "#/parameters/RegulatoryComplianceControlName" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/RegulatoryComplianceControl" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments": { - "get": { - "x-ms-examples": { - "Get all assessments mapped to selected regulatory compliance control": { - "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceAssessmentList_example.json" - } - }, - "tags": [ "RegulatoryCompliance"], - "description": "Details and state of assessments mapped to selected regulatory compliance control", - "operationId": "RegulatoryComplianceAssessments_List", - "parameters": [ - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/SubscriptionId" - }, - { - "$ref": "#/parameters/ResourceGroupName" - }, - { - "$ref": "#/parameters/RegulatoryComplianceStandardName" - }, - { - "$ref": "#/parameters/RegulatoryComplianceControlName" - }, - { - "$ref": "#/parameters/ODataFilter" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/RegulatoryComplianceAssessmentList" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/regulatoryComplianceStandards/{regulatoryComplianceStandardName}/regulatoryComplianceControls/{regulatoryComplianceControlName}/regulatoryComplianceAssessments/{regulatoryComplianceAssessmentName}": { - "get": { - "x-ms-examples": { - "Get selected regulatory compliance assessment details and state": { - "$ref": "./examples/RegulatoryCompliance/getRegulatoryComplianceAssessment_example.json" - } - }, - "tags": [ "RegulatoryCompliance"], - "description": "Supported regulatory compliance details and state for selected assessment", - "operationId": "RegulatoryComplianceAssessments_Get", - "parameters": [ - { - "$ref": "#/parameters/ApiVersion" - }, - { - "$ref": "#/parameters/SubscriptionId" - }, - { - "$ref": "#/parameters/ResourceGroupName" - }, - { - "$ref": "#/parameters/RegulatoryComplianceStandardName" - }, - { - "$ref": "#/parameters/RegulatoryComplianceControlName" - }, - { - "$ref": "#/parameters/RegulatoryComplianceAssessmentName" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/RegulatoryComplianceAssessment" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - } - } - } - }, - "definitions": { - "CloudError": { - "x-ms-external": true, - "type": "object", - "description": "Error response structure.", - "properties": { - "error": { - "x-ms-client-flatten": true, - "description": "Error data", - "$ref": "#/definitions/CloudErrorBody" - } - } - }, - "CloudErrorBody": { - "x-ms-external": true, - "type": "object", - "description": "Error details.", - "properties": { - "code": { - "readOnly": true, - "type": "string", - "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically." - }, - "message": { - "readOnly": true, - "type": "string", - "description": "A message describing the error, intended to be suitable for display in a user interface." - } - } - }, - "Resource": { - "type": "object", - "description": "Describes an Azure resource.", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "Resource Id" - }, - "name": { - "readOnly": true, - "type": "string", - "description": "Resource name" - }, - "type": { - "readOnly": true, - "type": "string", - "description": "Resource type" - } - }, - "x-ms-azure-resource": true - }, - "Kind": { - "type": "object", - "description": "Describes an Azure resource with kind", - "properties": { - "kind": { - "type": "string", - "description": "Kind of the resource" - } - } - }, - "RegulatoryComplianceStandardList": { - "description": "List of regulatory compliance standards response", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/RegulatoryComplianceStandard" - } - }, - "nextLink": { - "readOnly": true, - "type": "string", - "description": "The URI to fetch the next page." - } - } - }, - "RegulatoryComplianceStandard": { - "type": "object", - "description": "Regulatory compliance standard details and state", - "properties": { - "properties": { - "x-ms-client-flatten": true, - "description": "Regulatory compliance standard data", - "$ref": "#/definitions/RegulatoryComplianceStandardProperties" - } - }, - "allOf": [{ - "$ref": "#/definitions/Resource" - }] - }, - "RegulatoryComplianceStandardProperties": { - "type": "object", - "description": "Regulatory compliance standard data", - "properties": { - "state": { - "type": "string", - "description": "Regulatory compliance standard state", - "enum": ["Passed", "Failed", "Skipped", "Unsupported"], - "x-ms-enum": { - "name": "state", - "modelAsString": true, - "values": [{ - "value": "Passed", - "description": "All supported regulatory compliance controls in the standard have a passed state" - }, - { - "value": "Failed", - "description": "At least one supported regulatory compliance control in the standard has a state of failed" - }, - { - "value": "Skipped", - "description": "All supported regulatory compliance controls in the standard have a state of skipped" - }, - { - "value": "Unsupported", - "description": "No supported regulatory compliance data for the standard" - } - ] - } - }, - "passedControls": { - "readOnly": true, - "type": "integer", - "description": "The number of supported regulatory compliance controls of the given standard with a passed state" - }, - "failedControls": { - "readOnly": true, - "type": "integer", - "description": "The number of supported regulatory compliance controls of the given standard with a failed state" - }, - "skippedControls": { - "readOnly": true, - "type": "integer", - "description": "The number of supported regulatory compliance controls of the given standard with a skipped state" - }, - "unsupportedControls": { - "readOnly": true, - "type": "integer", - "description": "The number of regulatory compliance controls of the given standard which are unsupported by automated assessments" - } - } - }, - "RegulatoryComplianceControlList": { - "description": "List of regulatory compliance controls response", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "description": "List of regulatory compliance controls", - "items": { - "$ref": "#/definitions/RegulatoryComplianceControl" - } - }, - "nextLink": { - "readOnly": true, - "type": "string", - "description": "The URI to fetch the next page." - } - } - }, - "RegulatoryComplianceControl": { - "type": "object", - "description": "Regulatory compliance control details and state", - "properties": { - "properties": { - "x-ms-client-flatten": true, - "description": "Regulatory compliance control data", - "$ref": "#/definitions/RegulatoryComplianceControlProperties" - } - }, - "allOf": [{ - "$ref": "#/definitions/Resource" - }] - }, - "RegulatoryComplianceControlProperties": { - "type": "object", - "description": "Regulatory compliance control data", - "properties": { - "description": { - "readOnly": true, - "type": "string", - "description": "The description of the regulatory compliance control" - }, - "state": { - "type": "string", - "description": "Regulatory compliance standard state", - "enum": ["Passed", "Failed", "Skipped", "Unsupported"], - "x-ms-enum": { - "name": "state", - "modelAsString": true, - "values": [{ - "value": "Passed", - "description": "All supported regulatory compliance assessments in the control have a passed state" - }, - { - "value": "Failed", - "description": "At least one supported regulatory compliance assessment in the control has a state of failed" - }, - { - "value": "Skipped", - "description": "All supported regulatory compliance assessments in the control have a state of skipped" - }, - { - "value": "Unsupported", - "description": "No supported regulatory assessment data for the control" - } - ] - } - }, - "passedAssessments": { - "readOnly": true, - "type": "integer", - "description": "The number of supported regulatory compliance assessments of the given control with a passed state" - }, - "failedAssessments": { - "readOnly": true, - "type": "integer", - "description": "The number of supported regulatory compliance assessments of the given control with a failed state" - }, - "skippedAssessments": { - "readOnly": true, - "type": "integer", - "description": "The number of supported regulatory compliance assessments of the given control with a skipped state" - } - } - }, - "RegulatoryComplianceAssessmentList": { - "description": "List of regulatory compliance assessment response", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/RegulatoryComplianceAssessment" - } - }, - "nextLink": { - "readOnly": true, - "type": "string", - "description": "The URI to fetch the next page." - } - } - }, - "RegulatoryComplianceAssessment": { - "type": "object", - "description": "Regulatory compliance assessment details and state", - "properties": { - "properties": { - "x-ms-client-flatten": true, - "description": "Regulatory compliance assessment data", - "$ref": "#/definitions/RegulatoryComplianceAssessmentProperties" - } - }, - "allOf": [{ - "$ref": "#/definitions/Resource" - }] - }, - "RegulatoryComplianceAssessmentProperties": { - "type": "object", - "description": "Regulatory compliance assessment data", - "properties": { - "description": { - "readOnly": true, - "type": "string", - "description": "The description of the regulatory compliance assessment" - }, - "assessmentType": { - "readOnly": true, - "type": "string", - "description": "The expected type of assessment contained in the AssessmentDetailsLink", - "enum": ["Assessment", "Rule"], - "x-ms-enum": { - "name": "state", - "modelAsString": true, - "values": [{ - "value": "Assessment", - "description": "Data ype is of security assessment" - }, - { - "value": "Rule", - "description": "Data ype is of security rule" - } - ] - } - }, - "assessmentDetailsLink": { - "readOnly": true, - "type": "string", - "description": "Link to more detailed assessment results data. The response type will be according to the assessmentType field" - }, - "state": { - "type": "string", - "description": "Regulatory compliance standard state", - "enum": ["Passed", "Failed", "Skipped"], - "x-ms-enum": { - "name": "state", - "modelAsString": true, - "values": [{ - "value": "Passed", - "description": "All related resources passed the assessment" - }, - { - "value": "Failed", - "description": "The assessment failed on at least one resource" - }, - { - "value": "Skipped", - "description": "The assessment skipped on all related resources" - } - ] - } - }, - "passedResources": { - "readOnly": true, - "type": "integer", - "description": "The assessment's related resources count with passed state." - }, - "failedResources": { - "readOnly": true, - "type": "integer", - "description": "The assessment's related resources count with failed state." - }, - "skippedResources": { - "readOnly": true, - "type": "integer", - "description": "The assessment's related resources count with skipped state." - } - } - } - }, - "parameters": { - "SubscriptionId": { - "name": "subscriptionId", - "in": "path", - "required": true, - "pattern": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$", - "type": "string", - "description": "Azure subscription ID" - }, - "ResourceGroupName": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group within the user's subscription. The name is case insensitive.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 90, - "x-ms-parameter-location": "method" - }, - "ApiVersion": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "enum": [ - "2019-01-01" - ], - "description": "API version for the operation" - }, - "ODataFilter": { - "name": "$filter", - "in": "query", - "required": false, - "type": "string", - "description": "OData filter. Optional.", - "x-ms-parameter-location": "method" - }, - "ODataSelect": { - "name": "$select", - "in": "query", - "required": false, - "type": "string", - "description": "OData select. Optional.", - "x-ms-parameter-location": "method" - }, - "ODataExpand": { - "name": "$expand", - "in": "query", - "required": false, - "type": "string", - "description": "OData expand. Optional.", - "x-ms-parameter-location": "method" - }, - "RegulatoryComplianceStandardName": { - "name": "regulatoryComplianceStandardName", - "in": "path", - "required": true, - "type": "string", - "description": "Name of the regulatory compliance standard object", - "x-ms-parameter-location": "method" - }, - "RegulatoryComplianceControlName": { - "name": "regulatoryComplianceControlName", - "in": "path", - "required": true, - "type": "string", - "description": "Name of the regulatory compliance control object", - "x-ms-parameter-location": "method" - }, - "RegulatoryComplianceAssessmentName": { - "name": "regulatoryComplianceAssessmentName", - "in": "path", - "required": true, - "type": "string", - "description": "Name of the regulatory compliance assessment object", - "x-ms-parameter-location": "method" - } - } -} From cbfcf950cdb7a04d8ca4c1a8c69e97bf985e5a58 Mon Sep 17 00:00:00 2001 From: himarkov <47382544+himarkov@users.noreply.github.com> Date: Wed, 20 Mar 2019 10:40:02 +0200 Subject: [PATCH 12/14] Update regulatoryCompliance.json --- .../2019-01-01-preview/regulatoryCompliance.json | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json index de29ac637489..7b89b0c253dc 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json @@ -514,20 +514,6 @@ "readOnly": true, "type": "string", "description": "The expected type of assessment (‘assessment’ or ‘baseline’) contained in the AssessmentDetailsLink", - "x-ms-enum": { - "name": "assessmentType", - "modelAsString": true, - "values": [ - { - "value": "Assessment", - "description": "Data ype is of security assessment" - }, - { - "value": "Rule", - "description": "Data ype is of security rule" - } - ] - } }, "assessmentDetailsLink": { "readOnly": true, From 1f8f6bcbce9509571d20980c903b0d7485bd23b6 Mon Sep 17 00:00:00 2001 From: himarkov <47382544+himarkov@users.noreply.github.com> Date: Wed, 20 Mar 2019 10:46:55 +0200 Subject: [PATCH 13/14] Update regulatoryCompliance.json --- .../2019-01-01-preview/regulatoryCompliance.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json index 7b89b0c253dc..5789af2e2fa5 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json @@ -523,7 +523,7 @@ "state": { "type": "string", "description": "Aggregative state based on the assessment's scanned resources states", - "enum": ["Passed", "Failed", "Skipped"], + "enum": ["Passed", "Failed", "Skipped", "Unsupported"], "x-ms-enum": { "name": "state", "modelAsString": true, @@ -539,6 +539,10 @@ { "value": "Skipped", "description": "The given assessment skipped on all related resources" + }, + { + "value": "Unsupported", + "description": "The given assessment has no supported resources" } ] } @@ -557,6 +561,11 @@ "readOnly": true, "type": "integer", "description": "The given assessment's related resources count with skipped state." + }, + "unsupportedResources": { + "readOnly": true, + "type": "integer", + "description": "The given assessment's related resources count with unsupported state." } } } From 57997a34834cb3e70253fc7573647886666edb4f Mon Sep 17 00:00:00 2001 From: himarkov <47382544+himarkov@users.noreply.github.com> Date: Wed, 20 Mar 2019 10:52:16 +0200 Subject: [PATCH 14/14] Update regulatoryCompliance.json --- .../preview/2019-01-01-preview/regulatoryCompliance.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json index 5789af2e2fa5..59dfb5bc3409 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json @@ -513,7 +513,7 @@ "assessmentType": { "readOnly": true, "type": "string", - "description": "The expected type of assessment (‘assessment’ or ‘baseline’) contained in the AssessmentDetailsLink", + "description": "The expected type of assessment contained in the AssessmentDetailsLink" }, "assessmentDetailsLink": { "readOnly": true,