From 9678550a1f24b2df08df7e52bb73a176ee1c87ec Mon Sep 17 00:00:00 2001 From: dochollidayxx Date: Thu, 19 Aug 2021 10:47:37 -0400 Subject: [PATCH 01/28] Adds base for updating Microsoft.Security from version stable/2021-07-01 to version 2021-08-01-preview --- .../examples/Settings/GetSetting_example.json | 20 ++ .../Settings/GetSettings_example.json | 50 +++ .../Settings/UpdateSetting_example.json | 26 ++ .../preview/2021-08-01-preview/settings.json | 301 ++++++++++++++++++ 4 files changed, 397 insertions(+) create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSetting_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSettings_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/UpdateSetting_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/settings.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSetting_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSetting_example.json new file mode 100644 index 000000000000..1ac66c2d42d9 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSetting_example.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2021-07-01", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "settingName": "MCAS" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", + "name": "MCAS", + "kind": "DataExportSettings", + "type": "Microsoft.Security/settings", + "properties": { + "enabled": true + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSettings_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSettings_example.json new file mode 100644 index 000000000000..220cdf57cfea --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSettings_example.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2021-07-01", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", + "name": "MCAS", + "kind": "DataExportSettings", + "type": "Microsoft.Security/settings", + "properties": { + "enabled": true + } + }, + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/WDATP", + "name": "WDATP", + "kind": "DataExportSettings", + "type": "Microsoft.Security/settings", + "properties": { + "enabled": false + } + }, + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW", + "name": "WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW", + "kind": "DataExportSettings", + "type": "Microsoft.Security/settings", + "properties": { + "enabled": false + } + }, + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/Sentinel", + "name": "Sentinel", + "kind": "AlertSyncSettings", + "type": "Microsoft.Security/settings", + "properties": { + "enabled": false + } + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/UpdateSetting_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/UpdateSetting_example.json new file mode 100644 index 000000000000..659eca933372 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/UpdateSetting_example.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2021-07-01", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "settingName": "MCAS", + "setting": { + "kind": "DataExportSettings", + "properties": { + "enabled": true + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", + "name": "MCAS", + "kind": "DataExportSettings", + "type": "Microsoft.Security/settings", + "properties": { + "enabled": true + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/settings.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/settings.json new file mode 100644 index 000000000000..e1aca0eb04e7 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/settings.json @@ -0,0 +1,301 @@ +{ + "swagger": "2.0", + "info": { + "title": "Security Center", + "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", + "version": "2021-07-01" + }, + "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}/providers/Microsoft.Security/settings": { + "get": { + "x-ms-examples": { + "Get settings of subscription": { + "$ref": "./examples/Settings/GetSettings_example.json" + } + }, + "tags": [ + "Settings" + ], + "description": "Settings about different configurations in security center", + "operationId": "Settings_List", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SettingsList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/settings/{settingName}": { + "get": { + "x-ms-examples": { + "Get a setting on subscription": { + "$ref": "./examples/Settings/GetSetting_example.json" + } + }, + "tags": [ + "Settings" + ], + "description": "Settings of different configurations in security center", + "operationId": "Settings_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/SettingName" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Setting" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "put": { + "x-ms-examples": { + "Update a setting for subscription": { + "$ref": "./examples/Settings/UpdateSetting_example.json" + } + }, + "tags": [ + "Settings" + ], + "description": "updating settings about different configurations in security center", + "operationId": "Settings_Update", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "#/parameters/SettingName" + }, + { + "$ref": "#/parameters/Setting" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Setting" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + } + }, + "definitions": { + "SettingsList": { + "type": "object", + "description": "Subscription settings list.", + "properties": { + "value": { + "type": "array", + "description": "The settings list.", + "items": { + "$ref": "#/definitions/Setting" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URI to fetch the next page." + } + } + }, + "DataExportSettings": { + "type": "object", + "description": "Represents a data export setting", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Data export setting data", + "$ref": "#/definitions/DataExportSettingProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Setting" + } + ], + "x-ms-discriminator-value": "DataExportSettings" + }, + "AlertSyncSettings": { + "type": "object", + "description": "Represents an alert sync setting", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Alert sync setting data", + "$ref": "#/definitions/AlertSyncSettingProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Setting" + } + ], + "x-ms-discriminator-value": "AlertSyncSettings" + }, + "Setting": { + "type": "object", + "description": "The kind of the security setting", + "properties": { + "kind": { + "type": "string", + "description": "the kind of the settings string", + "enum": [ + "DataExportSettings", + "AlertSuppressionSetting", + "AlertSyncSettings" + ], + "x-ms-enum": { + "name": "SettingKind", + "modelAsString": true, + "values": [ + { + "value": "DataExportSettings" + }, + { + "value": "AlertSuppressionSetting" + }, + { + "value": "AlertSyncSettings" + } + ] + } + } + }, + "discriminator": "kind", + "required": [ + "kind" + ], + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/Resource" + } + ] + }, + "DataExportSettingProperties": { + "type": "object", + "description": "The data export setting properties", + "properties": { + "enabled": { + "type": "boolean", + "description": "Is the data export setting enabled" + } + }, + "required": [ + "enabled" + ] + }, + "AlertSyncSettingProperties": { + "type": "object", + "description": "The alert sync setting properties", + "properties": { + "enabled": { + "type": "boolean", + "description": "Is the alert sync setting enabled" + } + }, + "required": [ + "enabled" + ] + } + }, + "parameters": { + "SettingName": { + "name": "settingName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the setting", + "enum": [ + "MCAS", + "WDATP", + "WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW", + "Sentinel" + ], + "x-ms-parameter-location": "method" + }, + "Setting": { + "name": "setting", + "in": "body", + "required": true, + "description": "Setting object", + "schema": { + "$ref": "#/definitions/Setting" + }, + "x-ms-parameter-location": "method" + } + } +} From affd393fd4c63ab37c2eded960db3ff46e691a34 Mon Sep 17 00:00:00 2001 From: dochollidayxx Date: Thu, 19 Aug 2021 10:47:59 -0400 Subject: [PATCH 02/28] Updates readme --- specification/security/resource-manager/readme.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index af7c25d76a62..18af8d627e3e 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -54,7 +54,7 @@ These are the global settings for the Security API. title: SecurityCenter description: API spec for Microsoft.Security (Azure Security Center) resource provider openapi-type: arm -tag: package-composite-v3 +tag: package-preview-2021-08 ``` ### Composite packages @@ -62,6 +62,14 @@ tag: package-composite-v3 The following packages may be composed from multiple api-versions. +### Tag: package-preview-2021-08 + +These settings apply only when `--tag=package-preview-2021-08` is specified on the command line. + +```yaml $(tag) == 'package-preview-2021-08' +input-file: + - Microsoft.Security/preview/2021-08-01-preview/settings.json +``` ### Tag: package-composite-v1 These settings apply only when `--tag=package-composite-v1` is specified on the command line. From 149a360d04c5457c88e8ba437ce188af3f6be6ee Mon Sep 17 00:00:00 2001 From: dochollidayxx Date: Thu, 19 Aug 2021 10:48:01 -0400 Subject: [PATCH 03/28] Updates API version in new specs and examples --- .../examples/Settings/GetSetting_example.json | 2 +- .../examples/Settings/GetSettings_example.json | 2 +- .../examples/Settings/UpdateSetting_example.json | 2 +- .../Microsoft.Security/preview/2021-08-01-preview/settings.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSetting_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSetting_example.json index 1ac66c2d42d9..c2e5a7e11296 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSetting_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSetting_example.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-07-01", + "api-version": "2021-08-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "settingName": "MCAS" }, diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSettings_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSettings_example.json index 220cdf57cfea..910e8cbe1687 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSettings_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSettings_example.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-07-01", + "api-version": "2021-08-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23" }, "responses": { diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/UpdateSetting_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/UpdateSetting_example.json index 659eca933372..1738f283b971 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/UpdateSetting_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/UpdateSetting_example.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-07-01", + "api-version": "2021-08-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "settingName": "MCAS", "setting": { diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/settings.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/settings.json index e1aca0eb04e7..966e7257ff78 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/settings.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/settings.json @@ -3,7 +3,7 @@ "info": { "title": "Security Center", "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", - "version": "2021-07-01" + "version": "2021-08-01-preview" }, "host": "management.azure.com", "schemes": [ From f7ded94cb7db9fa9d9e7001a680abe8841eaaee0 Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Fri, 20 Aug 2021 11:04:02 -0400 Subject: [PATCH 04/28] First pass at Microsoft.Security/standards for review/preview --- .../Standards/DeleteStandard_example.json | 11 + .../Standards/GetStandard_example.json | 24 ++ .../Standards/ListStandards_example.json | 40 +++ .../Standards/PutStandard_example.json | 46 +++ .../preview/2021-08-01-preview/standards.json | 274 ++++++++++++++++++ .../security/resource-manager/readme.md | 1 + 6 files changed, 396 insertions(+) create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/DeleteStandard_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/DeleteStandard_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/DeleteStandard_example.json new file mode 100644 index 000000000000..09ea5a5ddf7a --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/DeleteStandard_example.json @@ -0,0 +1,11 @@ +{ + "parameters" : { + "api-version": "2021-08-01-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "standardId": "8bb8be0a-6010-4789-812f-e4d661c4ed0e" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json new file mode 100644 index 000000000000..d62662258213 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2021-08-01-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "standardId": "21300918-b2e3-0346-785f-c77ff57d243b" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/standards", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "Cross cloud standard 1", + "standardType": "Custom", + "description": "Controls and security data implementing security recommendations defined in Azure Security", + "category": "SecurityCenter" + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json new file mode 100644 index 000000000000..eb89f3327c09 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2021-08-01-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/standards", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "Cross cloud standard 1", + "standardType": "Custom", + "description": "Controls and security data implementing security recommendations defined in Azure Security", + "category": "SecurityCenter" + } + }, + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/standards/155afdf9-d239-4a5c-847f-89da613e7143", + "name": "155afdf9-d239-4a5c-847f-89da613e7143", + "type": "Microsoft.Security/standards", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "Cross cloud standard 2", + "standardType": "Custom", + "description": "Controls and security data implementing security recommendations defined in Azure Security", + "category": "SecurityCenter" + } + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json new file mode 100644 index 000000000000..fe5d8b2de3e2 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2021-08-01-preview", + "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "standardId": "8bb8be0a-6010-4789-812f-e4d661c4ed0e", + "standard": { + "properties": { + "displayName": "Azure Test Security Standard 1", + "description": "description of Azure Test Security Standard 1", + "category": "SecurityCenter" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/provider/Microsoft.Security/standards/8bb8be0a-6010-4789-812f-e4d661c4ed0e", + "name": "8bb8be0a-6010-4789-812f-e4d661c4ed0e", + "type": "Microsoft.Security/standards", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "Azure Test Security Standard 1", + "standardType": "Custom", + "description": "description of Azure Test Security Standard 1", + "category": "SecurityCenter" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/provider/Microsoft.Security/standards/8bb8be0a-6010-4789-812f-e4d661c4ed0e", + "name": "8bb8be0a-6010-4789-812f-e4d661c4ed0e", + "type": "Microsoft.Security/standards", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "Azure Test Security Standard 1", + "standardType": "Custom", + "description": "description of Azure Test Security Standard 1", + "category": "SecurityCenter" + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json new file mode 100644 index 000000000000..635d1c878cfe --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json @@ -0,0 +1,274 @@ +{ + "swagger": "2.0", + "info": { + "title": "Security Center", + "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", + "version": "2021-08-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": { + "/{scope}/providers/Microsoft.Security/standards": { + "get": { + "x-ms-examples": { + "List security standards": { + "$ref": "./examples/Standards/ListStandards_example.json" + } + }, + "tags": [ + "Standards" + ], + "description": "Get security standards on all your resources inside a scope", + "operationId": "Standards_List", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/Scope" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/StandardList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/{scope}/providers/Microsoft.Security/standards/{standardId}": { + "get": { + "x-ms-examples": { + "Get a specific security standard by scope and standardId": { + "$ref": "./examples/Standards/GetStandard_example.json" + } + }, + "tags": [ + "Standards" + ], + "description": "Get a specific security standard for the requested scope", + "operationId": "Standards_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/Scope" + }, + { + "$ref": "#/parameters/StandardId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Standard" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "put": { + "x-ms-examples": { + "Create a security standard on a specified scope": { + "$ref": "./examples/Standards/PutStandard_example.json" + } + }, + "tags": [ + "Standards" + ], + "description": "Create a security standard on the given scope. Available only for custom standards. Will create/update the required standard definitions.", + "operationId": "Standards_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/Scope" + }, + { + "$ref": "#/parameters/StandardId" + }, + { + "$ref": "#/parameters/StandardBody" + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Standard" + } + }, + "200": { + "description": "OK - Updated", + "schema": { + "$ref": "#/definitions/Standard" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "delete": { + "x-ms-examples": { + "Delete a security standard over the specified scope": { + "$ref": "./examples/Standards/DeleteStandard_example.json" + } + }, + "tags": [ + "Standards" + ], + "description": "Delete a security standard on a scope.", + "operationId": "Standards_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/Scope" + }, + { + "$ref": "#/parameters/StandardId" + } + ], + "responses": { + "200": { + "description": "OK - Standard was deleted" + }, + "204": { + "description": "No Content - Standard does not exist" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + } + }, + "definitions": { + "StandardList": { + "type": "object", + "description": "Page of a Standard list", + "properties": { + "value": { + "description": "Collection of standards in this page", + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/Standard" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URI to fetch the next page" + } + } + }, + "Standard": { + "type": "object", + "description": "Security Standard on a resource", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/StandardProperties" + } + }, + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ] + }, + "StandardProperties": { + "type": "object", + "description": "Describes properties of a standard.", + "properties": { + "displayName": { + "type": "string" + }, + "standardType": { + "type": "string", + "readOnly": true + }, + "description": { + "type": "string" + }, + "category": { + "type": "string" + } + } + } + }, + "parameters": { + "StandardId": { + "name": "standardId", + "in": "path", + "required": true, + "type": "string", + "description": "The Security Standard key - unique key for the standard type", + "x-ms-parameter-location": "method" + }, + "StandardBody": { + "name": "standard", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Standard" + }, + "description": "Custom security standard over a pre-defined scope", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 18af8d627e3e..bd708573e76d 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -69,6 +69,7 @@ These settings apply only when `--tag=package-preview-2021-08` is specified on t ```yaml $(tag) == 'package-preview-2021-08' input-file: - Microsoft.Security/preview/2021-08-01-preview/settings.json + - Microsoft.Security/preview/2021-08-01-preview/standards.json ``` ### Tag: package-composite-v1 From d75f3610039559205eedb470e1ed03f7bded34b2 Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Mon, 23 Aug 2021 09:27:04 -0400 Subject: [PATCH 05/28] Addressing Round-1 feedback, adding missing descriptions and changing scoping to match ProxyResource type --- .../Standards/DeleteStandard_example.json | 3 +- .../Standards/GetStandard_example.json | 5 ++-- .../Standards/ListStandards_example.json | 7 +++-- .../Standards/PutStandard_example.json | 7 +++-- .../preview/2021-08-01-preview/standards.json | 28 +++++++++++++++---- 5 files changed, 35 insertions(+), 15 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/DeleteStandard_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/DeleteStandard_example.json index 09ea5a5ddf7a..fae15996c541 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/DeleteStandard_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/DeleteStandard_example.json @@ -1,7 +1,8 @@ { "parameters" : { "api-version": "2021-08-01-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myResourceGroup", "standardId": "8bb8be0a-6010-4789-812f-e4d661c4ed0e" }, "responses": { diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json index d62662258213..a158e8115eb5 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json @@ -1,13 +1,14 @@ { "parameters": { "api-version": "2021-08-01-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myResourceGroup", "standardId": "21300918-b2e3-0346-785f-c77ff57d243b" }, "responses": { "200": { "body": { - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", "type": "Microsoft.Security/standards", "location": "East US", diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json index eb89f3327c09..8829abf3a495 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json @@ -1,14 +1,15 @@ { "parameters": { "api-version": "2021-08-01-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myResourceGroup" }, "responses": { "200": { "body": { "value": [ { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", "type": "Microsoft.Security/standards", "location": "East US", @@ -21,7 +22,7 @@ } }, { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/standards/155afdf9-d239-4a5c-847f-89da613e7143", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standards/155afdf9-d239-4a5c-847f-89da613e7143", "name": "155afdf9-d239-4a5c-847f-89da613e7143", "type": "Microsoft.Security/standards", "location": "East US", diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json index fe5d8b2de3e2..5c4abf649579 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json @@ -1,7 +1,8 @@ { "parameters": { "api-version": "2021-08-01-preview", - "scope": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myResourceGroup", "standardId": "8bb8be0a-6010-4789-812f-e4d661c4ed0e", "standard": { "properties": { @@ -14,7 +15,7 @@ "responses": { "200": { "body": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/provider/Microsoft.Security/standards/8bb8be0a-6010-4789-812f-e4d661c4ed0e", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/provider/Microsoft.Security/standards/8bb8be0a-6010-4789-812f-e4d661c4ed0e", "name": "8bb8be0a-6010-4789-812f-e4d661c4ed0e", "type": "Microsoft.Security/standards", "location": "East US", @@ -29,7 +30,7 @@ }, "201": { "body": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/provider/Microsoft.Security/standards/8bb8be0a-6010-4789-812f-e4d661c4ed0e", + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/provider/Microsoft.Security/standards/8bb8be0a-6010-4789-812f-e4d661c4ed0e", "name": "8bb8be0a-6010-4789-812f-e4d661c4ed0e", "type": "Microsoft.Security/standards", "location": "East US", diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json index 635d1c878cfe..4cde5d6c0349 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json @@ -34,7 +34,7 @@ } }, "paths": { - "/{scope}/providers/Microsoft.Security/standards": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/standards": { "get": { "x-ms-examples": { "List security standards": { @@ -51,7 +51,10 @@ "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { - "$ref": "../../../common/v1/types.json#/parameters/Scope" + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" } ], "responses": { @@ -73,7 +76,7 @@ } } }, - "/{scope}/providers/Microsoft.Security/standards/{standardId}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/standards/{standardId}": { "get": { "x-ms-examples": { "Get a specific security standard by scope and standardId": { @@ -90,7 +93,10 @@ "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { - "$ref": "../../../common/v1/types.json#/parameters/Scope" + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" }, { "$ref": "#/parameters/StandardId" @@ -127,7 +133,10 @@ "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { - "$ref": "../../../common/v1/types.json#/parameters/Scope" + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" }, { "$ref": "#/parameters/StandardId" @@ -173,7 +182,10 @@ "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { - "$ref": "../../../common/v1/types.json#/parameters/Scope" + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" }, { "$ref": "#/parameters/StandardId" @@ -236,16 +248,20 @@ "description": "Describes properties of a standard.", "properties": { "displayName": { + "description": "display name of the standard, equivalent to the standardId", "type": "string" }, "standardType": { + "description": "standard type (Custom or BuiltIn only currently)", "type": "string", "readOnly": true }, "description": { + "description": "description of the standard", "type": "string" }, "category": { + "description": "category of the standard provided", "type": "string" } } From 551900c5ce99c9b3252bacc4c545a7afe361850f Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Mon, 23 Aug 2021 15:18:01 -0400 Subject: [PATCH 06/28] First pass for Microsoft.Security\standardComponents --- .../DeleteStandardComponent_example.json | 12 + .../GetStandardComponent_example.json | 37 +++ .../ListStandardComponents_example.json | 65 ++++ .../PutStandardComponent_example.json | 84 +++++ .../standardComponents.json | 311 ++++++++++++++++++ .../preview/2021-08-01-preview/standards.json | 1 + .../security/resource-manager/readme.md | 1 + 7 files changed, 511 insertions(+) create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/DeleteStandardComponent_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/GetStandardComponent_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/ListStandardComponents_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/PutStandardComponent_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardComponents.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/DeleteStandardComponent_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/DeleteStandardComponent_example.json new file mode 100644 index 000000000000..34af1e5406a8 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/DeleteStandardComponent_example.json @@ -0,0 +1,12 @@ +{ + "parameters" : { + "api-version": "2021-08-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myResourceGroup", + "standardComponentId": "8bb8be0a-6010-4789-812f-e4d661c4ed0e" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/GetStandardComponent_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/GetStandardComponent_example.json new file mode 100644 index 000000000000..dbc085ebd42f --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/GetStandardComponent_example.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2021-08-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myResourceGroup", + "standardComponentId": "21300918-b2e3-0346-785f-c77ff57d243b" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardComponents/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/standardComponents", + "location": "East US", + "etag": "etag value", + "properties": { + "mappedResourceType": "Microsoft.Security/assessments", + "defaultEffect": "Audit", + "allowedEffects": [ + "Audit", + "ExemptByResource" + ], + "standardDefinitions": [ + { + "name": "asc default", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + { + "name": "AWS PCI", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3asdfds9-d0c9-4c3d-847f-89da613e70a8" + } + ] + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/ListStandardComponents_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/ListStandardComponents_example.json new file mode 100644 index 000000000000..beaf68c39fb5 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/ListStandardComponents_example.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "api-version": "2021-08-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myResourceGroup" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardComponents/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/standardComponents", + "location": "East US", + "etag": "etag value", + "properties": { + "mappedResourceType": "Microsoft.Security/assessments", + "defaultEffect": "Audit", + "allowedEffects": [ + "Audit", + "ExemptByResource" + ], + "standardDefinitions": [ + { + "name": "asc default", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + { + "name": "AWS PCI", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3asdfds9-d0c9-4c3d-847f-89da613e70a8" + } + ] + } + }, + { + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardComponents/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/standardComponents", + "location": "East US", + "etag": "etag value", + "properties": { + "mappedResourceType": "Microsoft.Security/assessments", + "defaultEffect": "Audit", + "allowedEffects": [ + "Audit", + "ExemptByResource" + ], + "standardDefinitions": [ + { + "name": "asc default", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + { + "name": "AWS PCI", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3asdfds9-d0c9-4c3d-847f-89da613e70a8" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/PutStandardComponent_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/PutStandardComponent_example.json new file mode 100644 index 000000000000..490279e9bece --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/PutStandardComponent_example.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "api-version": "2021-08-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myResourceGroup", + "standardComponentId": "8bb8be0a-6010-4789-812f-e4d661c4ed0e", + "standardComponent": { + "properties": { + "mappedResourceType": "Microsoft.Security/assessments", + "defaultEffect": "Audit", + "allowedEffects": [ + "Audit", + "ExemptByResource" + ], + "standardDefinitions": [ + { + "name": "asc default", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + { + "name": "AWS PCI", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3asdfds9-d0c9-4c3d-847f-89da613e70a8" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardComponents/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/standardComponents", + "location": "East US", + "etag": "etag value", + "properties": { + "mappedResourceType": "Microsoft.Security/assessments", + "defaultEffect": "Audit", + "allowedEffects": [ + "Audit", + "ExemptByResource" + ], + "standardDefinitions": [ + { + "name": "asc default", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + { + "name": "AWS PCI", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3asdfds9-d0c9-4c3d-847f-89da613e70a8" + } + ] + } + } + }, + "201": { + "body": { + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardComponents/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/standardComponents", + "location": "East US", + "etag": "etag value", + "properties": { + "mappedResourceType": "Microsoft.Security/assessments", + "defaultEffect": "Audit", + "allowedEffects": [ + "Audit", + "ExemptByResource" + ], + "standardDefinitions": [ + { + "name": "asc default", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + { + "name": "AWS PCI", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3asdfds9-d0c9-4c3d-847f-89da613e70a8" + } + ] + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardComponents.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardComponents.json new file mode 100644 index 000000000000..23479c1fe086 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardComponents.json @@ -0,0 +1,311 @@ +{ + "swagger": "2.0", + "info": { + "title": "Security Center", + "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", + "version": "2021-08-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/standardComponents": { + "get": { + "x-ms-examples": { + "List security standardComponents": { + "$ref": "./examples/StandardComponents/ListStandardComponents_example.json" + } + }, + "tags": [ + "StandardComponents" + ], + "description": "Get all standardComponents on all resources in the provided scope", + "operationId": "StandardComponents_List", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/StandardComponentList" + } + }, + "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/standardComponents/{standardComponentId}": { + "get": { + "x-ms-examples": { + "Get a specific security standard component by scope and standardComponentId": { + "$ref": "./examples/StandardComponents/GetStandardComponent_example.json" + } + }, + "tags": [ + "StandardComponents" + ], + "description": "Get a specific standardComponent for the requested scope", + "operationId": "StandardComponents_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/StandardComponentId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/StandardComponent" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "put": { + "x-ms-examples": { + "Create a security standard component on a specified scope": { + "$ref": "./examples/StandardComponents/PutStandardComponent_example.json" + } + }, + "tags": [ + "StandardComponents" + ], + "description": "Create a security component on the given scope.", + "operationId": "StandardComponents_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/StandardComponentId" + }, + { + "$ref": "#/parameters/StandardComponentBody" + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/StandardComponent" + } + }, + "200": { + "description": "OK - Updated", + "schema": { + "$ref": "#/definitions/StandardComponent" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "delete": { + "x-ms-examples": { + "Delete a security standard component over the specified scope": { + "$ref": "./examples/StandardComponents/DeleteStandardComponents_example.json" + } + }, + "tags": [ + "StandardComponents" + ], + "description": "Delete a security component over the given scope", + "operationId": "StandardComponents_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/StandardComponentId" + } + ], + "responses": { + "200": { + "description": "OK - StandardComponent was deleted" + }, + "204": { + "description": "No Content - StandardComponent does not exist" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + } + }, + "definitions": { + "StandardComponentList": { + "type": "object", + "description": "Page of a standardComponent list", + "properties": { + "value": { + "description": "Collection of standardComponents in this page", + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/StandardComponent" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URI to fetch the next page" + } + } + }, + "StandardComponent": { + "type": "object", + "description": "Individual component of a Security Standard, with mapped resourceType and definitions", + "properties": { + "properties": { + "description": "Properties of a standardComponent", + "x-ms-client-flatten": true, + "$ref": "#/definitions/StandardComponentProperties" + } + }, + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ] + }, + "StandardComponentProperties": { + "type": "object", + "description": "Describes properties of a standardComponent", + "properties": { + "mappedResourceType": { + "description": "Azure resource type tied to this standard, default is microsoft.security/assessments", + "type": "string" + }, + "defaultEffect": { + "description": "the effect of the component, such as a policy effect (audit, exemptByResource, etc)", + "type": "string" + }, + "allowedEffects": { + "description": "the allowable effect types as applied to this component", + "type": "array", + "items": { + "type": "string", + "description": "effect type such as audit or exemptByResource" + } + }, + "standardDefinitions": { + "type": "array", + "description": "an array of standardDefinition objects", + "items": { + "$ref": "#/definitions/StandardDefinitionProperties" + } + } + } + }, + "StandardDefinitionProperties": { + "type": "object", + "description": "Describes properties of a standard definition", + "properties": { + "name": { + "type": "string", + "description": "name of the standard definition e.g. 'asc default'" + }, + "id": { + "description": "Azure resourceId of the standardDefinition", + "type": "string" + } + } + } + }, + "parameters": { + "StandardComponentId": { + "name": "standardComponentId", + "in": "path", + "required": true, + "type": "string", + "description": "the standardComponent key - unique key for the standardComponent type", + "x-ms-parameter-location": "method" + }, + "StandardComponentBody": { + "name": "standardComponent", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/StandardComponent" + }, + "description": "Custom security standardComponent over a pre-defined scope", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json index 4cde5d6c0349..f998bbd468e2 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json @@ -233,6 +233,7 @@ "description": "Security Standard on a resource", "properties": { "properties": { + "description": "Properties of a security standard", "x-ms-client-flatten": true, "$ref": "#/definitions/StandardProperties" } diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index bd708573e76d..638274031543 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -70,6 +70,7 @@ These settings apply only when `--tag=package-preview-2021-08` is specified on t input-file: - Microsoft.Security/preview/2021-08-01-preview/settings.json - Microsoft.Security/preview/2021-08-01-preview/standards.json + - Microsoft.Security/preview/2021-08-01-preview/standardComponents.json ``` ### Tag: package-composite-v1 From 8e32e2df817852d3830642768eb42d7f3bb137aa Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Mon, 23 Aug 2021 17:07:47 -0400 Subject: [PATCH 07/28] Changes to fix a typo in an example spec --- .../preview/2021-08-01-preview/standardComponents.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardComponents.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardComponents.json index 23479c1fe086..e1576d541604 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardComponents.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardComponents.json @@ -169,7 +169,7 @@ "delete": { "x-ms-examples": { "Delete a security standard component over the specified scope": { - "$ref": "./examples/StandardComponents/DeleteStandardComponents_example.json" + "$ref": "./examples/StandardComponents/DeleteStandardComponent_example.json" } }, "tags": [ From 255431dea1406de64873ceb3f80af0cc73440f04 Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Tue, 31 Aug 2021 10:05:40 -0400 Subject: [PATCH 08/28] Added Microsoft.Security/standardAssignments --- .../DeleteStandardAssignment_example.json | 12 + .../GetStandardAssignment_example.json | 39 + ...bscriptionStandardAssignments_example.json | 68 ++ .../ListStandardAssignments_example.json | 69 ++ .../PutStandardAssignment_example.json | 82 +++ .../standardAssignments.json | 350 +++++++++ .../resource-manager/common/v2/types.json | 686 ++++++++++++++++++ .../security/resource-manager/readme.md | 1 + 8 files changed, 1307 insertions(+) create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/DeleteStandardAssignment_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json create mode 100644 specification/security/resource-manager/common/v2/types.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/DeleteStandardAssignment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/DeleteStandardAssignment_example.json new file mode 100644 index 000000000000..5bc56578959c --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/DeleteStandardAssignment_example.json @@ -0,0 +1,12 @@ +{ + "parameters" : { + "api-version": "2021-08-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myResourceGroup", + "standardAssignmentId": "8bb8be0a-6010-4789-812f-e4d661c4ed0e" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json new file mode 100644 index 000000000000..8245ee1b658b --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2021-08-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myResourceGroup", + "standardAssignmentId": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/standardAssignments", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "ASC Default", + "description": "Set of policies monitored by Azure Security Center for cross cloud", + "standardDefinitions": [ + { + "name": "asc default", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + } + ], + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", + "notScope": "", + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json new file mode 100644 index 000000000000..96a46513e231 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "api-version": "2021-08-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/standardAssignments", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "ASC Default", + "description": "Set of policies monitored by Azure Security Center for cross cloud", + "standardDefinitions": [ + { + "name": "asc default", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + } + ], + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", + "notScope": "", + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } + } + }, + { + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/standardAssignments", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "ASC Default", + "description": "Set of policies monitored by Azure Security Center for cross cloud", + "standardDefinitions": [ + { + "name": "asc default", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + } + ], + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", + "notScope": "", + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } + } + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json new file mode 100644 index 000000000000..732c65a64d1c --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2021-08-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myResourceGroup" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/standardAssignments", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "ASC Default", + "description": "Set of policies monitored by Azure Security Center for cross cloud", + "standardDefinitions": [ + { + "name": "asc default", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + } + ], + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", + "notScope": "", + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } + } + }, + { + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/standardAssignments", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "ASC Default", + "description": "Set of policies monitored by Azure Security Center for cross cloud", + "standardDefinitions": [ + { + "name": "asc default", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + } + ], + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", + "notScope": "", + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } + } + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json new file mode 100644 index 000000000000..48547f979bae --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2021-08-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myResourceGroup", + "standardAssignmentId": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "standardAssignment": { + "properties": { + "displayName": "ASC Default", + "description": "Set of policies monitored by Azure Security Center for cross cloud", + "standardDefinitions": [ + { + "name": "asc default", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + } + ], + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", + "notScope": "" + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/standardAssignments", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "ASC Default", + "description": "Set of policies monitored by Azure Security Center for cross cloud", + "standardDefinitions": [ + { + "name": "asc default", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + } + ], + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", + "notScope": "", + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } + } + } + }, + "201": { + "body": { + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/standardAssignments", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "ASC Default", + "description": "Set of policies monitored by Azure Security Center for cross cloud", + "standardDefinitions": [ + { + "name": "asc default", + "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + } + ], + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", + "notScope": "", + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json new file mode 100644 index 000000000000..3ffeada0985c --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json @@ -0,0 +1,350 @@ +{ + "swagger": "2.0", + "info": { + "title": "Security Center", + "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", + "version": "2021-08-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}/providers/Microsoft.Security/standardAssignments": { + "get": { + "x-ms-examples": { + "List security standardAssignments by subscription level scope": { + "$ref": "./examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json" + } + }, + "tags": [ + "StandardAssignments" + ], + "description": "Get a list of all relevant standardAssignments over a subscription level scope", + "operationId": "StandardAssignments_ListBySubscription", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/StandardAssignmentList" + } + }, + "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/standardAssignments": { + "get": { + "x-ms-examples": { + "List security standardAssignments by subscriptionId and resourceGroup scope": { + "$ref": "./examples/StandardAssignments/ListStandardAssignments_example.json" + } + }, + "tags": [ + "StandardAssignments" + ], + "description": "Get a list of all relevant standardAssignments available for scope", + "operationId": "StandardAssignments_List", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/StandardAssignmentList" + } + }, + "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/standardAssignments/{standardAssignmentId}": { + "get": { + "x-ms-examples": { + "Get security standardAssignments by by specific standardAssignmentId": { + "$ref": "./examples/StandardAssignments/GetStandardAssignment_example.json" + } + }, + "tags": [ + "StandardAssignments" + ], + "description": "Get a specific standard assignment for the requested scope by resourceId", + "operationId": "StandardAssignments_Get", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/StandardAssignmentId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/StandardAssignment" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "put": { + "x-ms-examples": { + "Create or update security standardAssignment": { + "$ref": "./examples/StandardAssignments/PutStandardAssignment_example.json" + } + }, + "tags": [ + "StandardAssignments" + ], + "description": "Create a security assignment on the given scope. Will create/update the required standard assignment. ", + "operationId": "StandardAssignments_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/StandardAssignmentId" + }, + { + "$ref": "#/parameters/StandardAssignmentBody" + } + ], + "responses": { + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/StandardAssignment" + } + }, + "200": { + "description": "OK - Updated", + "schema": { + "$ref": "#/definitions/StandardAssignment" + } + }, + "default": { + "description": "Error response describing why the operation failed", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "delete": { + "x-ms-examples": { + "Delete security standardAssignment": { + "$ref": "./examples/StandardAssignments/DeleteStandardAssignment_example.json" + } + }, + "tags": [ + "StandardAssignments" + ], + "description": "Delete a standard assignment over a given scope", + "operationId": "StandardAssignments_Delete", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/StandardAssignmentId" + } + ], + "responses": { + "200": { + "description": "OK - Standard was deleted" + }, + "204": { + "description": "No Content - Standard does not exist" + }, + "default": { + "description": "Error response describing why the operation failed" + } + } + } + } + }, + "definitions": { + "StandardAssignmentList": { + "type": "object", + "description": "Page of a standard assignment list", + "properties": { + "value": { + "description": "Collection of standardAssignments in this page", + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/StandardAssignment" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URI to fetch the next page" + } + } + }, + "StandardAssignment": { + "type": "object", + "description": "Security Assignment on a resource group over a given scope", + "properties": { + "properties": { + "description": "Properties of a security assignment", + "x-ms-client-flatten": true, + "$ref": "#/definitions/StandardAssignmentProperties" + } + }, + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + } + ] + }, + "StandardAssignmentProperties": { + "type": "object", + "description": "Describes the properties of a standardAssignment", + "properties": { + "displayName": { + "description": "display name of the standardAssignment", + "type": "string" + }, + "description": { + "description": "description of the standardAssignment", + "type": "string" + }, + "standardDefinitions": { + "description": "List of standardDefinitions applicable to the standardAssignment over the provided scope", + "type": "array", + "items": { + "$ref": "#/definitions/StandardDefinitionItem" + } + }, + "scope": { + "description": "Scope to which the standardAssignment applies - can be a subscription path or a resource group under that subscription", + "type": "string" + }, + "notScope": { + "description": "excluded scope for the standard Assignment", + "type": "string" + }, + "systemData": { + "$ref": "../../../common/v2/types.json#/definitions/systemData" + } + } + }, + "StandardDefinitionItem": { + "type": "object", + "description": "describe the properties of a standardDefinition", + "properties": { + "name": { + "description": "name of the appropriate standard definition", + "type": "string" + }, + "id": { + "description": "full resourceId of the standardDefinition object", + "type": "string" + } + } + } + }, + "parameters": { + "StandardAssignmentId": { + "name": "standardAssignmentId", + "in": "path", + "required": true, + "type": "string", + "description": "The security assignment key - unique key for the standard assignment", + "x-ms-parameter-location": "method" + }, + "StandardAssignmentBody": { + "name": "standardAssignmentBody", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/StandardAssignment" + }, + "description": "Custom standard assignment over a pre-defined scope", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/security/resource-manager/common/v2/types.json b/specification/security/resource-manager/common/v2/types.json new file mode 100644 index 000000000000..a6224050586b --- /dev/null +++ b/specification/security/resource-manager/common/v2/types.json @@ -0,0 +1,686 @@ +{ + "swagger": "2.0", + "info": { + "version": "2.0", + "title": "Common types" + }, + "paths": {}, + "definitions": { + "Resource": { + "title": "Resource", + "description": "Common fields that are returned in the response for all Azure Resource Manager resources", + "type": "object", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the resource" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" + } + }, + "x-ms-azure-resource": true + }, + "AzureEntityResource": { + "x-ms-client-name": "AzureEntityResource", + "title": "Entity Resource", + "description": "The resource model definition for an Azure Resource Manager resource with an etag.", + "type": "object", + "properties": { + "etag": { + "type": "string", + "readOnly": true, + "description": "Resource Etag." + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "TrackedResource": { + "title": "Tracked Resource", + "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Resource tags." + }, + "location": { + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "The geo-location where the resource lives" + } + }, + "required": [ + "location" + ], + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "ProxyResource": { + "title": "Proxy Resource", + "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "ResourceModelWithAllowedPropertySet": { + "description": "The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set.", + "type": "object", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the resource" + }, + "type": { + "readOnly": true, + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" + }, + "location": { + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "The geo-location where the resource lives" + }, + "managedBy": { + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource." + }, + "kind": { + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.", + "pattern": "^[-\\w\\._,\\(\\)]+$" + }, + "etag": { + "readOnly": true, + "type": "string", + "description": "The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. " + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Resource tags." + }, + "identity": { + "allOf": [ + { + "$ref": "#/definitions/Identity" + } + ] + }, + "sku": { + "allOf": [ + { + "$ref": "#/definitions/Sku" + } + ] + }, + "plan": { + "allOf": [ + { + "$ref": "#/definitions/Plan" + } + ] + } + }, + "x-ms-azure-resource": true + }, + "Sku": { + "description": "The resource model definition representing SKU", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the SKU. Ex - P3. It is typically a letter+number code" + }, + "tier": { + "type": "string", + "enum": [ + "Free", + "Basic", + "Standard", + "Premium" + ], + "x-ms-enum": { + "name": "SkuTier", + "modelAsString": false + }, + "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT." + }, + "size": { + "type": "string", + "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. " + }, + "family": { + "type": "string", + "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here." + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted." + } + }, + "required": [ + "name" + ] + }, + "Identity": { + "description": "Identity for the resource.", + "type": "object", + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal ID of resource identity." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of resource." + }, + "type": { + "type": "string", + "description": "The identity type.", + "enum": [ + "SystemAssigned" + ], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": false + } + } + } + }, + "Plan": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A user defined name of the 3rd Party Artifact that is being procured." + }, + "publisher": { + "type": "string", + "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic" + }, + "product": { + "type": "string", + "description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. " + }, + "promotionCode": { + "type": "string", + "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact." + }, + "version": { + "type": "string", + "description": "The version of the desired product/artifact." + } + }, + "description": "Plan for the resource.", + "required": [ + "name", + "publisher", + "product" + ] + }, + "ErrorDetail": { + "description": "The error detail.", + "type": "object", + "properties": { + "code": { + "readOnly": true, + "type": "string", + "description": "The error code." + }, + "message": { + "readOnly": true, + "type": "string", + "description": "The error message." + }, + "target": { + "readOnly": true, + "type": "string", + "description": "The error target." + }, + "details": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDetail" + }, + "description": "The error details." + }, + "additionalInfo": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorAdditionalInfo" + }, + "description": "The error additional info." + } + } + }, + "ErrorResponse": { + "title": "Error response", + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).", + "type": "object", + "properties": { + "error": { + "description": "The error object.", + "$ref": "#/definitions/ErrorDetail" + } + } + }, + "ErrorAdditionalInfo": { + "type": "object", + "properties": { + "type": { + "readOnly": true, + "type": "string", + "description": "The additional info type." + }, + "info": { + "readOnly": true, + "type": "object", + "description": "The additional info." + } + }, + "description": "The resource management error additional info." + }, + "Operation": { + "title": "REST API Operation", + "description": "Details of a REST API operation, returned from the Resource Provider Operations API", + "type": "object", + "properties": { + "name": { + "description": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": "string", + "readOnly": true + }, + "isDataAction": { + "description": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.", + "type": "boolean", + "readOnly": true + }, + "display": { + "description": "Localized display information for this particular operation.", + "type": "object", + "properties": { + "provider": { + "description": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": "string", + "readOnly": true + } + } + }, + "origin": { + "description": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": "string", + "readOnly": true, + "enum": [ + "user", + "system", + "user,system" + ], + "x-ms-enum": { + "name": "Origin", + "modelAsString": true + } + }, + "actionType": { + "description": "Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": "string", + "readOnly": true, + "enum": [ + "Internal" + ], + "x-ms-enum": { + "name": "ActionType", + "modelAsString": true + } + } + } + }, + "OperationListResult": { + "description": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "description": "List of operations supported by the resource provider", + "readOnly": true + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of operation list results (if there are any).", + "readOnly": true + } + } + }, + "OperationStatusResult": { + "description": "The current status of an async operation.", + "type": "object", + "required": [ + "status" + ], + "properties": { + "id": { + "description": "Fully qualified ID for the async operation.", + "type": "string" + }, + "name": { + "description": "Name of the async operation.", + "type": "string" + }, + "status": { + "description": "Operation status.", + "type": "string" + }, + "percentComplete": { + "description": "Percent of the operation that is complete.", + "type": "number", + "minimum": 0, + "maximum": 100 + }, + "startTime": { + "description": "The start time of the operation.", + "type": "string", + "format": "date-time" + }, + "endTime": { + "description": "The end time of the operation.", + "type": "string", + "format": "date-time" + }, + "operations": { + "description": "The operations list.", + "type": "array", + "items": { + "$ref": "#/definitions/OperationStatusResult" + } + }, + "error": { + "description": "If present, details of the operation error.", + "$ref": "#/definitions/ErrorDetail" + } + } + }, + "locationData": { + "description": "Metadata pertaining to the geographic location of the resource.", + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 256, + "description": "A canonical name for the geographic or physical location." + }, + "city": { + "type": "string", + "description": "The city or locality where the resource is located." + }, + "district": { + "type": "string", + "description": "The district, state, or province where the resource is located." + }, + "countryOrRegion": { + "type": "string", + "description": "The country or region where the resource is located" + } + }, + "required": [ + "name" + ] + }, + "systemData": { + "description": "Metadata pertaining to creation and last modification of the resource.", + "type": "object", + "readOnly": true, + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "type": "string", + "description": "The type of identity that created the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "type": "string", + "description": "The type of identity that last modified the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" + } + } + }, + "encryptionProperties": { + "description": "Configuration of key for data encryption", + "type": "object", + "properties": { + "status": { + "description": "Indicates whether or not the encryption is enabled for container registry.", + "enum": [ + "enabled", + "disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "EncryptionStatus", + "modelAsString": true + } + }, + "keyVaultProperties": { + "$ref": "#/definitions/KeyVaultProperties", + "description": "Key vault properties." + } + } + }, + "KeyVaultProperties": { + "type": "object", + "properties": { + "keyIdentifier": { + "description": "Key vault uri to access the encryption key.", + "type": "string" + }, + "identity": { + "description": "The client ID of the identity which will be used to access key vault.", + "type": "string" + } + } + }, + "CheckNameAvailabilityRequest": { + "description": "The check availability request body.", + "type": "object", + "properties": { + "name": { + "description": "The name of the resource for which availability needs to be checked.", + "type": "string" + }, + "type": { + "description": "The resource type.", + "type": "string" + } + } + }, + "CheckNameAvailabilityResponse": { + "description": "The check availability result.", + "type": "object", + "properties": { + "nameAvailable": { + "description": "Indicates if the resource name is available.", + "type": "boolean" + }, + "reason": { + "description": "The reason why the given name is not available.", + "type": "string", + "enum": [ + "Invalid", + "AlreadyExists" + ], + "x-ms-enum": { + "name": "CheckNameAvailabilityReason", + "modelAsString": true + } + }, + "message": { + "description": "Detailed reason why the given name is available.", + "type": "string" + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the target subscription.", + "minLength": 1 + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for this operation.", + "minLength": 1 + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group. The name is case insensitive.", + "minLength": 1, + "maxLength": 90, + "x-ms-parameter-location": "method" + }, + "OperationIdParameter": { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of an ongoing async operation.", + "minLength": 1, + "x-ms-parameter-location": "method" + }, + "LocationParameter": { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "description": "The name of Azure region.", + "minLength": 1, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 638274031543..38975e1366ec 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -71,6 +71,7 @@ input-file: - Microsoft.Security/preview/2021-08-01-preview/settings.json - Microsoft.Security/preview/2021-08-01-preview/standards.json - Microsoft.Security/preview/2021-08-01-preview/standardComponents.json + - Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json ``` ### Tag: package-composite-v1 From 05a3e9651946f4190e4d6cb993bf17c177178397 Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Tue, 31 Aug 2021 10:27:42 -0400 Subject: [PATCH 09/28] Fix naming convention issue --- .../preview/2021-08-01-preview/standardAssignments.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json index 3ffeada0985c..acb8a9956022 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json @@ -337,7 +337,7 @@ "x-ms-parameter-location": "method" }, "StandardAssignmentBody": { - "name": "standardAssignmentBody", + "name": "standardAssignment", "in": "body", "required": true, "schema": { From e8cb807ea1cc524c7ac2fa5861869a96bb932960 Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Thu, 2 Sep 2021 08:51:42 -0400 Subject: [PATCH 10/28] Removed types based on Hila's feedback --- .../examples/Settings/GetSetting_example.json | 20 -- .../Settings/GetSettings_example.json | 50 --- .../Settings/UpdateSetting_example.json | 26 -- .../DeleteStandardComponent_example.json | 12 - .../GetStandardComponent_example.json | 37 --- .../ListStandardComponents_example.json | 65 ---- .../PutStandardComponent_example.json | 84 ----- .../preview/2021-08-01-preview/settings.json | 301 ----------------- .../standardComponents.json | 311 ------------------ .../security/resource-manager/readme.md | 2 - 10 files changed, 908 deletions(-) delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSetting_example.json delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSettings_example.json delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/UpdateSetting_example.json delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/DeleteStandardComponent_example.json delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/GetStandardComponent_example.json delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/ListStandardComponents_example.json delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/PutStandardComponent_example.json delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/settings.json delete mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardComponents.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSetting_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSetting_example.json deleted file mode 100644 index c2e5a7e11296..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSetting_example.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "parameters": { - "api-version": "2021-08-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "settingName": "MCAS" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", - "name": "MCAS", - "kind": "DataExportSettings", - "type": "Microsoft.Security/settings", - "properties": { - "enabled": true - } - } - } - } -} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSettings_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSettings_example.json deleted file mode 100644 index 910e8cbe1687..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/GetSettings_example.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "parameters": { - "api-version": "2021-08-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", - "name": "MCAS", - "kind": "DataExportSettings", - "type": "Microsoft.Security/settings", - "properties": { - "enabled": true - } - }, - { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/WDATP", - "name": "WDATP", - "kind": "DataExportSettings", - "type": "Microsoft.Security/settings", - "properties": { - "enabled": false - } - }, - { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW", - "name": "WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW", - "kind": "DataExportSettings", - "type": "Microsoft.Security/settings", - "properties": { - "enabled": false - } - }, - { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/Sentinel", - "name": "Sentinel", - "kind": "AlertSyncSettings", - "type": "Microsoft.Security/settings", - "properties": { - "enabled": false - } - } - ] - } - } - } -} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/UpdateSetting_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/UpdateSetting_example.json deleted file mode 100644 index 1738f283b971..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Settings/UpdateSetting_example.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "parameters": { - "api-version": "2021-08-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "settingName": "MCAS", - "setting": { - "kind": "DataExportSettings", - "properties": { - "enabled": true - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/settings/MCAS", - "name": "MCAS", - "kind": "DataExportSettings", - "type": "Microsoft.Security/settings", - "properties": { - "enabled": true - } - } - } - } -} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/DeleteStandardComponent_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/DeleteStandardComponent_example.json deleted file mode 100644 index 34af1e5406a8..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/DeleteStandardComponent_example.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parameters" : { - "api-version": "2021-08-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "resourceGroupName": "myResourceGroup", - "standardComponentId": "8bb8be0a-6010-4789-812f-e4d661c4ed0e" - }, - "responses": { - "200": {}, - "204": {} - } -} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/GetStandardComponent_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/GetStandardComponent_example.json deleted file mode 100644 index dbc085ebd42f..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/GetStandardComponent_example.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "parameters": { - "api-version": "2021-08-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "resourceGroupName": "myResourceGroup", - "standardComponentId": "21300918-b2e3-0346-785f-c77ff57d243b" - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardComponents/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "type": "Microsoft.Security/standardComponents", - "location": "East US", - "etag": "etag value", - "properties": { - "mappedResourceType": "Microsoft.Security/assessments", - "defaultEffect": "Audit", - "allowedEffects": [ - "Audit", - "ExemptByResource" - ], - "standardDefinitions": [ - { - "name": "asc default", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" - }, - { - "name": "AWS PCI", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3asdfds9-d0c9-4c3d-847f-89da613e70a8" - } - ] - } - } - } - } -} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/ListStandardComponents_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/ListStandardComponents_example.json deleted file mode 100644 index beaf68c39fb5..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/ListStandardComponents_example.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "parameters": { - "api-version": "2021-08-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "resourceGroupName": "myResourceGroup" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardComponents/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "type": "Microsoft.Security/standardComponents", - "location": "East US", - "etag": "etag value", - "properties": { - "mappedResourceType": "Microsoft.Security/assessments", - "defaultEffect": "Audit", - "allowedEffects": [ - "Audit", - "ExemptByResource" - ], - "standardDefinitions": [ - { - "name": "asc default", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" - }, - { - "name": "AWS PCI", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3asdfds9-d0c9-4c3d-847f-89da613e70a8" - } - ] - } - }, - { - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardComponents/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "type": "Microsoft.Security/standardComponents", - "location": "East US", - "etag": "etag value", - "properties": { - "mappedResourceType": "Microsoft.Security/assessments", - "defaultEffect": "Audit", - "allowedEffects": [ - "Audit", - "ExemptByResource" - ], - "standardDefinitions": [ - { - "name": "asc default", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" - }, - { - "name": "AWS PCI", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3asdfds9-d0c9-4c3d-847f-89da613e70a8" - } - ] - } - } - ] - } - } - } -} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/PutStandardComponent_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/PutStandardComponent_example.json deleted file mode 100644 index 490279e9bece..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardComponents/PutStandardComponent_example.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "parameters": { - "api-version": "2021-08-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "resourceGroupName": "myResourceGroup", - "standardComponentId": "8bb8be0a-6010-4789-812f-e4d661c4ed0e", - "standardComponent": { - "properties": { - "mappedResourceType": "Microsoft.Security/assessments", - "defaultEffect": "Audit", - "allowedEffects": [ - "Audit", - "ExemptByResource" - ], - "standardDefinitions": [ - { - "name": "asc default", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" - }, - { - "name": "AWS PCI", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3asdfds9-d0c9-4c3d-847f-89da613e70a8" - } - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardComponents/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "type": "Microsoft.Security/standardComponents", - "location": "East US", - "etag": "etag value", - "properties": { - "mappedResourceType": "Microsoft.Security/assessments", - "defaultEffect": "Audit", - "allowedEffects": [ - "Audit", - "ExemptByResource" - ], - "standardDefinitions": [ - { - "name": "asc default", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" - }, - { - "name": "AWS PCI", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3asdfds9-d0c9-4c3d-847f-89da613e70a8" - } - ] - } - } - }, - "201": { - "body": { - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardComponents/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "type": "Microsoft.Security/standardComponents", - "location": "East US", - "etag": "etag value", - "properties": { - "mappedResourceType": "Microsoft.Security/assessments", - "defaultEffect": "Audit", - "allowedEffects": [ - "Audit", - "ExemptByResource" - ], - "standardDefinitions": [ - { - "name": "asc default", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" - }, - { - "name": "AWS PCI", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3asdfds9-d0c9-4c3d-847f-89da613e70a8" - } - ] - } - } - } - } -} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/settings.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/settings.json deleted file mode 100644 index 966e7257ff78..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/settings.json +++ /dev/null @@ -1,301 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Security Center", - "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", - "version": "2021-08-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}/providers/Microsoft.Security/settings": { - "get": { - "x-ms-examples": { - "Get settings of subscription": { - "$ref": "./examples/Settings/GetSettings_example.json" - } - }, - "tags": [ - "Settings" - ], - "description": "Settings about different configurations in security center", - "operationId": "Settings_List", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/SettingsList" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../common/v1/types.json#/definitions/CloudError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/settings/{settingName}": { - "get": { - "x-ms-examples": { - "Get a setting on subscription": { - "$ref": "./examples/Settings/GetSetting_example.json" - } - }, - "tags": [ - "Settings" - ], - "description": "Settings of different configurations in security center", - "operationId": "Settings_Get", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" - }, - { - "$ref": "#/parameters/SettingName" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Setting" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../common/v1/types.json#/definitions/CloudError" - } - } - } - }, - "put": { - "x-ms-examples": { - "Update a setting for subscription": { - "$ref": "./examples/Settings/UpdateSetting_example.json" - } - }, - "tags": [ - "Settings" - ], - "description": "updating settings about different configurations in security center", - "operationId": "Settings_Update", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" - }, - { - "$ref": "#/parameters/SettingName" - }, - { - "$ref": "#/parameters/Setting" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Setting" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../common/v1/types.json#/definitions/CloudError" - } - } - } - } - } - }, - "definitions": { - "SettingsList": { - "type": "object", - "description": "Subscription settings list.", - "properties": { - "value": { - "type": "array", - "description": "The settings list.", - "items": { - "$ref": "#/definitions/Setting" - } - }, - "nextLink": { - "readOnly": true, - "type": "string", - "description": "The URI to fetch the next page." - } - } - }, - "DataExportSettings": { - "type": "object", - "description": "Represents a data export setting", - "properties": { - "properties": { - "x-ms-client-flatten": true, - "description": "Data export setting data", - "$ref": "#/definitions/DataExportSettingProperties" - } - }, - "allOf": [ - { - "$ref": "#/definitions/Setting" - } - ], - "x-ms-discriminator-value": "DataExportSettings" - }, - "AlertSyncSettings": { - "type": "object", - "description": "Represents an alert sync setting", - "properties": { - "properties": { - "x-ms-client-flatten": true, - "description": "Alert sync setting data", - "$ref": "#/definitions/AlertSyncSettingProperties" - } - }, - "allOf": [ - { - "$ref": "#/definitions/Setting" - } - ], - "x-ms-discriminator-value": "AlertSyncSettings" - }, - "Setting": { - "type": "object", - "description": "The kind of the security setting", - "properties": { - "kind": { - "type": "string", - "description": "the kind of the settings string", - "enum": [ - "DataExportSettings", - "AlertSuppressionSetting", - "AlertSyncSettings" - ], - "x-ms-enum": { - "name": "SettingKind", - "modelAsString": true, - "values": [ - { - "value": "DataExportSettings" - }, - { - "value": "AlertSuppressionSetting" - }, - { - "value": "AlertSyncSettings" - } - ] - } - } - }, - "discriminator": "kind", - "required": [ - "kind" - ], - "allOf": [ - { - "$ref": "../../../common/v1/types.json#/definitions/Resource" - } - ] - }, - "DataExportSettingProperties": { - "type": "object", - "description": "The data export setting properties", - "properties": { - "enabled": { - "type": "boolean", - "description": "Is the data export setting enabled" - } - }, - "required": [ - "enabled" - ] - }, - "AlertSyncSettingProperties": { - "type": "object", - "description": "The alert sync setting properties", - "properties": { - "enabled": { - "type": "boolean", - "description": "Is the alert sync setting enabled" - } - }, - "required": [ - "enabled" - ] - } - }, - "parameters": { - "SettingName": { - "name": "settingName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the setting", - "enum": [ - "MCAS", - "WDATP", - "WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW", - "Sentinel" - ], - "x-ms-parameter-location": "method" - }, - "Setting": { - "name": "setting", - "in": "body", - "required": true, - "description": "Setting object", - "schema": { - "$ref": "#/definitions/Setting" - }, - "x-ms-parameter-location": "method" - } - } -} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardComponents.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardComponents.json deleted file mode 100644 index e1576d541604..000000000000 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardComponents.json +++ /dev/null @@ -1,311 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Security Center", - "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", - "version": "2021-08-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/standardComponents": { - "get": { - "x-ms-examples": { - "List security standardComponents": { - "$ref": "./examples/StandardComponents/ListStandardComponents_example.json" - } - }, - "tags": [ - "StandardComponents" - ], - "description": "Get all standardComponents on all resources in the provided scope", - "operationId": "StandardComponents_List", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/StandardComponentList" - } - }, - "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/standardComponents/{standardComponentId}": { - "get": { - "x-ms-examples": { - "Get a specific security standard component by scope and standardComponentId": { - "$ref": "./examples/StandardComponents/GetStandardComponent_example.json" - } - }, - "tags": [ - "StandardComponents" - ], - "description": "Get a specific standardComponent for the requested scope", - "operationId": "StandardComponents_Get", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" - }, - { - "$ref": "#/parameters/StandardComponentId" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/StandardComponent" - } - }, - "default": { - "description": "Error response describing why the operation failed", - "schema": { - "$ref": "../../../common/v1/types.json#/definitions/CloudError" - } - } - } - }, - "put": { - "x-ms-examples": { - "Create a security standard component on a specified scope": { - "$ref": "./examples/StandardComponents/PutStandardComponent_example.json" - } - }, - "tags": [ - "StandardComponents" - ], - "description": "Create a security component on the given scope.", - "operationId": "StandardComponents_CreateOrUpdate", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" - }, - { - "$ref": "#/parameters/StandardComponentId" - }, - { - "$ref": "#/parameters/StandardComponentBody" - } - ], - "responses": { - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/StandardComponent" - } - }, - "200": { - "description": "OK - Updated", - "schema": { - "$ref": "#/definitions/StandardComponent" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../common/v1/types.json#/definitions/CloudError" - } - } - } - }, - "delete": { - "x-ms-examples": { - "Delete a security standard component over the specified scope": { - "$ref": "./examples/StandardComponents/DeleteStandardComponent_example.json" - } - }, - "tags": [ - "StandardComponents" - ], - "description": "Delete a security component over the given scope", - "operationId": "StandardComponents_Delete", - "parameters": [ - { - "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" - }, - { - "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" - }, - { - "$ref": "#/parameters/StandardComponentId" - } - ], - "responses": { - "200": { - "description": "OK - StandardComponent was deleted" - }, - "204": { - "description": "No Content - StandardComponent does not exist" - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../common/v1/types.json#/definitions/CloudError" - } - } - } - } - } - }, - "definitions": { - "StandardComponentList": { - "type": "object", - "description": "Page of a standardComponent list", - "properties": { - "value": { - "description": "Collection of standardComponents in this page", - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/StandardComponent" - } - }, - "nextLink": { - "readOnly": true, - "type": "string", - "description": "The URI to fetch the next page" - } - } - }, - "StandardComponent": { - "type": "object", - "description": "Individual component of a Security Standard, with mapped resourceType and definitions", - "properties": { - "properties": { - "description": "Properties of a standardComponent", - "x-ms-client-flatten": true, - "$ref": "#/definitions/StandardComponentProperties" - } - }, - "allOf": [ - { - "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" - } - ] - }, - "StandardComponentProperties": { - "type": "object", - "description": "Describes properties of a standardComponent", - "properties": { - "mappedResourceType": { - "description": "Azure resource type tied to this standard, default is microsoft.security/assessments", - "type": "string" - }, - "defaultEffect": { - "description": "the effect of the component, such as a policy effect (audit, exemptByResource, etc)", - "type": "string" - }, - "allowedEffects": { - "description": "the allowable effect types as applied to this component", - "type": "array", - "items": { - "type": "string", - "description": "effect type such as audit or exemptByResource" - } - }, - "standardDefinitions": { - "type": "array", - "description": "an array of standardDefinition objects", - "items": { - "$ref": "#/definitions/StandardDefinitionProperties" - } - } - } - }, - "StandardDefinitionProperties": { - "type": "object", - "description": "Describes properties of a standard definition", - "properties": { - "name": { - "type": "string", - "description": "name of the standard definition e.g. 'asc default'" - }, - "id": { - "description": "Azure resourceId of the standardDefinition", - "type": "string" - } - } - } - }, - "parameters": { - "StandardComponentId": { - "name": "standardComponentId", - "in": "path", - "required": true, - "type": "string", - "description": "the standardComponent key - unique key for the standardComponent type", - "x-ms-parameter-location": "method" - }, - "StandardComponentBody": { - "name": "standardComponent", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/StandardComponent" - }, - "description": "Custom security standardComponent over a pre-defined scope", - "x-ms-parameter-location": "method" - } - } -} diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 38975e1366ec..89a595ff846e 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -68,9 +68,7 @@ These settings apply only when `--tag=package-preview-2021-08` is specified on t ```yaml $(tag) == 'package-preview-2021-08' input-file: - - Microsoft.Security/preview/2021-08-01-preview/settings.json - Microsoft.Security/preview/2021-08-01-preview/standards.json - - Microsoft.Security/preview/2021-08-01-preview/standardComponents.json - Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json ``` ### Tag: package-composite-v1 From fd9ca41c2748d2a3c26d0de951498a4236e5a79d Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Thu, 2 Sep 2021 09:39:54 -0400 Subject: [PATCH 11/28] Changes to data model for both API calls --- .../GetStandardAssignment_example.json | 18 +++--- ...bscriptionStandardAssignments_example.json | 36 ++++++----- .../ListStandardAssignments_example.json | 36 ++++++----- .../PutStandardAssignment_example.json | 56 ++++++++++------- .../Standards/GetStandard_example.json | 10 ++- .../ListBySubscriptionStandards_example.json | 56 +++++++++++++++++ .../Standards/ListStandards_example.json | 20 +++++- .../Standards/PutStandard_example.json | 30 ++++++++- .../standardAssignments.json | 62 ++++++++++++++----- .../preview/2021-08-01-preview/standards.json | 56 +++++++++++++++++ 10 files changed, 302 insertions(+), 78 deletions(-) create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListBySubscriptionStandards_example.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json index 8245ee1b658b..90b6a5c557b3 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json @@ -16,14 +16,18 @@ "properties": { "displayName": "ASC Default", "description": "Set of policies monitored by Azure Security Center for cross cloud", - "standardDefinitions": [ - { - "name": "asc default", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" - } - ], + "assignedStandard": { + "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + "effect": "Exempt", + "expiresOn": "2021-12-31-T23:59:00.0000000Z", + "additonalData": { + "exemptionCategory": "waiver" + }, + "metadata": { + "ticketId": 12345 + }, "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", - "notScope": "", "systemData": { "createdBy": "user@contoso.com", "createdByType": "User", diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json index 96a46513e231..882ee73d3dd3 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json @@ -16,14 +16,18 @@ "properties": { "displayName": "ASC Default", "description": "Set of policies monitored by Azure Security Center for cross cloud", - "standardDefinitions": [ - { - "name": "asc default", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" - } - ], + "assignedStandard": { + "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + "effect": "Exempt", + "expiresOn": "2021-12-31-T23:59:00.0000000Z", + "additonalData": { + "exemptionCategory": "waiver" + }, + "metadata": { + "ticketId": 12345 + }, "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", - "notScope": "", "systemData": { "createdBy": "user@contoso.com", "createdByType": "User", @@ -43,14 +47,18 @@ "properties": { "displayName": "ASC Default", "description": "Set of policies monitored by Azure Security Center for cross cloud", - "standardDefinitions": [ - { - "name": "asc default", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" - } - ], + "assignedStandard": { + "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + "effect": "Exempt", + "expiresOn": "2021-12-31-T23:59:00.0000000Z", + "additonalData": { + "exemptionCategory": "waiver" + }, + "metadata": { + "ticketId": 12345 + }, "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", - "notScope": "", "systemData": { "createdBy": "user@contoso.com", "createdByType": "User", diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json index 732c65a64d1c..e0a1e368e43a 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json @@ -17,14 +17,18 @@ "properties": { "displayName": "ASC Default", "description": "Set of policies monitored by Azure Security Center for cross cloud", - "standardDefinitions": [ - { - "name": "asc default", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" - } - ], + "assignedStandard": { + "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + "effect": "Exempt", + "expiresOn": "2021-12-31-T23:59:00.0000000Z", + "additonalData": { + "exemptionCategory": "waiver" + }, + "metadata": { + "ticketId": 12345 + }, "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", - "notScope": "", "systemData": { "createdBy": "user@contoso.com", "createdByType": "User", @@ -44,14 +48,18 @@ "properties": { "displayName": "ASC Default", "description": "Set of policies monitored by Azure Security Center for cross cloud", - "standardDefinitions": [ - { - "name": "asc default", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" - } - ], + "assignedStandard": { + "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + "effect": "Exempt", + "expiresOn": "2021-12-31-T23:59:00.0000000Z", + "additonalData": { + "exemptionCategory": "waiver" + }, + "metadata": { + "ticketId": 12345 + }, "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", - "notScope": "", "systemData": { "createdBy": "user@contoso.com", "createdByType": "User", diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json index 48547f979bae..b7526604c176 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json @@ -8,14 +8,18 @@ "properties": { "displayName": "ASC Default", "description": "Set of policies monitored by Azure Security Center for cross cloud", - "standardDefinitions": [ - { - "name": "asc default", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" - } - ], - "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", - "notScope": "" + "assignedStandard": { + "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + "effect": "Exempt", + "expiresOn": "2021-12-31-T23:59:00.0000000Z", + "additonalData": { + "exemptionCategory": "waiver" + }, + "metadata": { + "ticketId": 12345 + }, + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg" } } }, @@ -30,14 +34,18 @@ "properties": { "displayName": "ASC Default", "description": "Set of policies monitored by Azure Security Center for cross cloud", - "standardDefinitions": [ - { - "name": "asc default", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" - } - ], + "assignedStandard": { + "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + "effect": "Exempt", + "expiresOn": "2021-12-31-T23:59:00.0000000Z", + "additonalData": { + "exemptionCategory": "waiver" + }, + "metadata": { + "ticketId": 12345 + }, "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", - "notScope": "", "systemData": { "createdBy": "user@contoso.com", "createdByType": "User", @@ -59,14 +67,18 @@ "properties": { "displayName": "ASC Default", "description": "Set of policies monitored by Azure Security Center for cross cloud", - "standardDefinitions": [ - { - "name": "asc default", - "id": "/providers/Microsoft.Security/StandardDefinitions/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" - } - ], + "assignedStandard": { + "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + "effect": "Exempt", + "expiresOn": "2021-12-31-T23:59:00.0000000Z", + "additonalData": { + "exemptionCategory": "waiver" + }, + "metadata": { + "ticketId": 12345 + }, "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", - "notScope": "", "systemData": { "createdBy": "user@contoso.com", "createdByType": "User", diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json index a158e8115eb5..357977d42696 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json @@ -17,7 +17,15 @@ "displayName": "Cross cloud standard 1", "standardType": "Custom", "description": "Controls and security data implementing security recommendations defined in Azure Security", - "category": "SecurityCenter" + "category": "SecurityCenter", + "components": [ + { + "key": "1195afff-c881-495e-9bc5-1486211ae03f" + }, + { + "key": "dbd0cb49-b563-45e7-9724-889e799fa648" + } + ] } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListBySubscriptionStandards_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListBySubscriptionStandards_example.json new file mode 100644 index 000000000000..7b92a5f7a491 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListBySubscriptionStandards_example.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "api-version": "2021-08-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/standards", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "Cross cloud standard 1", + "standardType": "Custom", + "description": "Controls and security data implementing security recommendations defined in Azure Security", + "category": "SecurityCenter", + "components": [ + { + "key": "1195afff-c881-495e-9bc5-1486211ae03f" + }, + { + "key": "dbd0cb49-b563-45e7-9724-889e799fa648" + } + ] + } + }, + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standards/155afdf9-d239-4a5c-847f-89da613e7143", + "name": "155afdf9-d239-4a5c-847f-89da613e7143", + "type": "Microsoft.Security/standards", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "Cross cloud standard 2", + "standardType": "Custom", + "description": "Controls and security data implementing security recommendations defined in Azure Security", + "category": "SecurityCenter", + "components": [ + { + "key": "1195afff-c881-495e-9bc5-1486211ae03f" + }, + { + "key": "dbd0cb49-b563-45e7-9724-889e799fa648" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json index 8829abf3a495..75e84ad0526f 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json @@ -18,7 +18,15 @@ "displayName": "Cross cloud standard 1", "standardType": "Custom", "description": "Controls and security data implementing security recommendations defined in Azure Security", - "category": "SecurityCenter" + "category": "SecurityCenter", + "components": [ + { + "key": "1195afff-c881-495e-9bc5-1486211ae03f" + }, + { + "key": "dbd0cb49-b563-45e7-9724-889e799fa648" + } + ] } }, { @@ -31,7 +39,15 @@ "displayName": "Cross cloud standard 2", "standardType": "Custom", "description": "Controls and security data implementing security recommendations defined in Azure Security", - "category": "SecurityCenter" + "category": "SecurityCenter", + "components": [ + { + "key": "1195afff-c881-495e-9bc5-1486211ae03f" + }, + { + "key": "dbd0cb49-b563-45e7-9724-889e799fa648" + } + ] } } ] diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json index 5c4abf649579..458346bb4e42 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json @@ -8,7 +8,15 @@ "properties": { "displayName": "Azure Test Security Standard 1", "description": "description of Azure Test Security Standard 1", - "category": "SecurityCenter" + "category": "SecurityCenter", + "components": [ + { + "key": "1195afff-c881-495e-9bc5-1486211ae03f" + }, + { + "key": "dbd0cb49-b563-45e7-9724-889e799fa648" + } + ] } } }, @@ -24,7 +32,15 @@ "displayName": "Azure Test Security Standard 1", "standardType": "Custom", "description": "description of Azure Test Security Standard 1", - "category": "SecurityCenter" + "category": "SecurityCenter", + "components": [ + { + "key": "1195afff-c881-495e-9bc5-1486211ae03f" + }, + { + "key": "dbd0cb49-b563-45e7-9724-889e799fa648" + } + ] } } }, @@ -39,7 +55,15 @@ "displayName": "Azure Test Security Standard 1", "standardType": "Custom", "description": "description of Azure Test Security Standard 1", - "category": "SecurityCenter" + "category": "SecurityCenter", + "components": [ + { + "key": "1195afff-c881-495e-9bc5-1486211ae03f" + }, + { + "key": "dbd0cb49-b563-45e7-9724-889e799fa648" + } + ] } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json index acb8a9956022..ffb8e03a6150 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json @@ -292,36 +292,68 @@ "description": "description of the standardAssignment", "type": "string" }, - "standardDefinitions": { - "description": "List of standardDefinitions applicable to the standardAssignment over the provided scope", - "type": "array", - "items": { - "$ref": "#/definitions/StandardDefinitionItem" - } + "assignedStandard": { + "description": "List of assigned standards as applied to this standard assignment over the given scope", + "$ref": "#/definitions/AssignedStandardItem" + }, + "assignedComponent": { + "description": "List of Microsoft.Security/assessments as applied to this standard assignment over the given scope", + "$ref": "#/definitions/AssignedComponentItem" }, "scope": { "description": "Scope to which the standardAssignment applies - can be a subscription path or a resource group under that subscription", "type": "string" }, - "notScope": { - "description": "excluded scope for the standard Assignment", + "effect": { + "description": "expected effect of this assignment (Disable/Exempt/etc)", "type": "string" }, + "expiresOn": { + "description": "Expiration date of this assignment as a full ISO date", + "type": "string", + "format": "date-time" + }, + "additionalData": { + "description": "Additional data about the assignment", + "type": "object", + "properties": { + "exemptionCategory": { + "description": "Exemption category of this assignment", + "type": "string" + } + } + }, + "metadata": { + "description": "Metadata about this standardAssignment", + "type": "object", + "properties": { + "ticketId": { + "type": "integer", + "description": "TicketID in reference to this standardAssignment" + } + } + }, "systemData": { "$ref": "../../../common/v2/types.json#/definitions/systemData" } } }, - "StandardDefinitionItem": { + "AssignedStandardItem": { "type": "object", - "description": "describe the properties of a standardDefinition", + "description": "describe the properties of a of a security standard object reference", "properties": { - "name": { - "description": "name of the appropriate standard definition", - "type": "string" - }, "id": { - "description": "full resourceId of the standardDefinition object", + "description": "full resourceId of the Microsoft.Security/standard object", + "type": "string" + } + } + }, + "AssignedComponentItem": { + "type": "object", + "description": "describe the properties of a security assessment object reference (by key)", + "properties": { + "key": { + "description": "unique key to a security assessment object", "type": "string" } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json index f998bbd468e2..ca804dab53dd 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json @@ -34,6 +34,45 @@ } }, "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/standards": { + "get": { + "x-ms-examples": { + "List security standards by subscription level scope": { + "$ref": "./examples/Standards/ListBySubscriptionStandards_example.json" + } + }, + "tags": [ + "Standards" + ], + "description": "Get a list of all relevant security standards over a subscription level scope.", + "operationId": "Standards_ListBySubscription", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/StandardList" + } + }, + "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/standards": { "get": { "x-ms-examples": { @@ -264,6 +303,23 @@ "category": { "description": "category of the standard provided", "type": "string" + }, + "components": { + "description": "List of assessment objects containing assessment unique keys to apply to standard scope", + "type": "array", + "items": { + "$ref": "#/definitions/StandardAssessmentProperties" + } + } + } + }, + "StandardAssessmentProperties": { + "type": "object", + "description": "Describes properties of an assessment as related to the standard", + "properties": { + "key": { + "description": "Assessment Key matching assessmentMetadata", + "type": "string" } } } From fa893f9ec38f3002517f3353db3ed41e323b5941 Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Thu, 2 Sep 2021 10:00:58 -0400 Subject: [PATCH 12/28] Fix example errors and typos --- .../GetStandardAssignment_example.json | 4 ++-- ...istBySubscriptionStandardAssignments_example.json | 8 ++++---- .../ListStandardAssignments_example.json | 8 ++++---- .../PutStandardAssignment_example.json | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json index 90b6a5c557b3..f1b196422237 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json @@ -20,8 +20,8 @@ "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" }, "effect": "Exempt", - "expiresOn": "2021-12-31-T23:59:00.0000000Z", - "additonalData": { + "expiresOn": "2022-05-01T19:50:47.083633Z", + "additionalData": { "exemptionCategory": "waiver" }, "metadata": { diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json index 882ee73d3dd3..eb3fae19843d 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json @@ -20,8 +20,8 @@ "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" }, "effect": "Exempt", - "expiresOn": "2021-12-31-T23:59:00.0000000Z", - "additonalData": { + "expiresOn": "2022-05-01T19:50:47.083633Z", + "additionalData": { "exemptionCategory": "waiver" }, "metadata": { @@ -51,8 +51,8 @@ "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" }, "effect": "Exempt", - "expiresOn": "2021-12-31-T23:59:00.0000000Z", - "additonalData": { + "expiresOn": "2022-05-01T19:50:47.083633Z", + "additionalData": { "exemptionCategory": "waiver" }, "metadata": { diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json index e0a1e368e43a..dd79f48b65e7 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json @@ -21,8 +21,8 @@ "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" }, "effect": "Exempt", - "expiresOn": "2021-12-31-T23:59:00.0000000Z", - "additonalData": { + "expiresOn": "2022-05-01T19:50:47.083633Z", + "additionalData": { "exemptionCategory": "waiver" }, "metadata": { @@ -52,8 +52,8 @@ "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" }, "effect": "Exempt", - "expiresOn": "2021-12-31-T23:59:00.0000000Z", - "additonalData": { + "expiresOn": "2022-05-01T19:50:47.083633Z", + "additionalData": { "exemptionCategory": "waiver" }, "metadata": { diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json index b7526604c176..4f57d279f978 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json @@ -12,8 +12,8 @@ "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" }, "effect": "Exempt", - "expiresOn": "2021-12-31-T23:59:00.0000000Z", - "additonalData": { + "expiresOn": "2022-05-01T19:50:47.083633Z", + "additionalData": { "exemptionCategory": "waiver" }, "metadata": { @@ -38,8 +38,8 @@ "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" }, "effect": "Exempt", - "expiresOn": "2021-12-31-T23:59:00.0000000Z", - "additonalData": { + "expiresOn": "2022-05-01T19:50:47.083633Z", + "additionalData": { "exemptionCategory": "waiver" }, "metadata": { @@ -71,8 +71,8 @@ "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" }, "effect": "Exempt", - "expiresOn": "2021-12-31-T23:59:00.0000000Z", - "additonalData": { + "expiresOn": "2022-05-01T19:50:47.083633Z", + "additionalData": { "exemptionCategory": "waiver" }, "metadata": { From 06a8c3b7335df52509a7abc1acf41eff5916404c Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Thu, 2 Sep 2021 10:22:57 -0400 Subject: [PATCH 13/28] Add systemData to Microsoft.Security/standards --- .../Standards/GetStandard_example.json | 10 +++++++++- .../ListBySubscriptionStandards_example.json | 20 +++++++++++++++++-- .../Standards/ListStandards_example.json | 20 +++++++++++++++++-- .../Standards/PutStandard_example.json | 20 +++++++++++++++++-- .../standardAssignments.json | 3 ++- .../preview/2021-08-01-preview/standards.json | 4 ++++ 6 files changed, 69 insertions(+), 8 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json index 357977d42696..0406743db29f 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json @@ -25,7 +25,15 @@ { "key": "dbd0cb49-b563-45e7-9724-889e799fa648" } - ] + ], + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListBySubscriptionStandards_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListBySubscriptionStandards_example.json index 7b92a5f7a491..21167e30b639 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListBySubscriptionStandards_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListBySubscriptionStandards_example.json @@ -25,7 +25,15 @@ { "key": "dbd0cb49-b563-45e7-9724-889e799fa648" } - ] + ], + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } } }, { @@ -46,7 +54,15 @@ { "key": "dbd0cb49-b563-45e7-9724-889e799fa648" } - ] + ], + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } } } ] diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json index 75e84ad0526f..52d77233bd89 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json @@ -26,7 +26,15 @@ { "key": "dbd0cb49-b563-45e7-9724-889e799fa648" } - ] + ], + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } } }, { @@ -47,7 +55,15 @@ { "key": "dbd0cb49-b563-45e7-9724-889e799fa648" } - ] + ], + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } } } ] diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json index 458346bb4e42..aad761c5cd8b 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json @@ -40,7 +40,15 @@ { "key": "dbd0cb49-b563-45e7-9724-889e799fa648" } - ] + ], + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } } } }, @@ -63,7 +71,15 @@ { "key": "dbd0cb49-b563-45e7-9724-889e799fa648" } - ] + ], + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json index ffb8e03a6150..a6388f64f385 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json @@ -334,7 +334,8 @@ } }, "systemData": { - "$ref": "../../../common/v2/types.json#/definitions/systemData" + "$ref": "../../../common/v2/types.json#/definitions/systemData", + "readOnly": true } } }, diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json index ca804dab53dd..be6a0af0c8b5 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json @@ -310,6 +310,10 @@ "items": { "$ref": "#/definitions/StandardAssessmentProperties" } + }, + "systemData": { + "$ref": "../../../common/v2/types.json#/definitions/systemData", + "readOnly": true } } }, From 7c7155ca4dc55f83b7c8b72039ad2f6426ebe164 Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Thu, 2 Sep 2021 10:37:12 -0400 Subject: [PATCH 14/28] Changes to fix systemData linting --- .../2021-08-01-preview/standardAssignments.json | 11 +++++++---- .../preview/2021-08-01-preview/standards.json | 10 ++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json index a6388f64f385..15656f1180cb 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json @@ -272,6 +272,12 @@ "description": "Properties of a security assignment", "x-ms-client-flatten": true, "$ref": "#/definitions/StandardAssignmentProperties" + }, + "systemData": { + "readOnly": true, + "type": "object", + "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "$ref": "../../../common/v2/types.json#/definitions/systemData" } }, "allOf": [ @@ -329,13 +335,10 @@ "properties": { "ticketId": { "type": "integer", + "format": "int64", "description": "TicketID in reference to this standardAssignment" } } - }, - "systemData": { - "$ref": "../../../common/v2/types.json#/definitions/systemData", - "readOnly": true } } }, diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json index be6a0af0c8b5..7404ca40c507 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json @@ -275,6 +275,12 @@ "description": "Properties of a security standard", "x-ms-client-flatten": true, "$ref": "#/definitions/StandardProperties" + }, + "systemData": { + "readOnly": true, + "type": "object", + "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "$ref": "../../../common/v2/types.json#/definitions/systemData" } }, "allOf": [ @@ -310,10 +316,6 @@ "items": { "$ref": "#/definitions/StandardAssessmentProperties" } - }, - "systemData": { - "$ref": "../../../common/v2/types.json#/definitions/systemData", - "readOnly": true } } }, From 13975c323a39629113268368da3f5bf73189f57b Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Thu, 2 Sep 2021 10:54:06 -0400 Subject: [PATCH 15/28] un-nest systemData fields in examples --- .../GetStandardAssignment_example.json | 18 +++++----- ...bscriptionStandardAssignments_example.json | 36 +++++++++---------- .../ListStandardAssignments_example.json | 36 +++++++++---------- .../PutStandardAssignment_example.json | 36 +++++++++---------- 4 files changed, 63 insertions(+), 63 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json index f1b196422237..7943795c227f 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json @@ -27,15 +27,15 @@ "metadata": { "ticketId": 12345 }, - "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg" + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json index eb3fae19843d..c645eafc3690 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json @@ -27,15 +27,15 @@ "metadata": { "ticketId": 12345 }, - "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg" + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" } }, { @@ -58,15 +58,15 @@ "metadata": { "ticketId": 12345 }, - "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg" + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" } } ] diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json index dd79f48b65e7..450c10e2116b 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json @@ -28,15 +28,15 @@ "metadata": { "ticketId": 12345 }, - "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg" + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" } }, { @@ -59,15 +59,15 @@ "metadata": { "ticketId": 12345 }, - "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg" + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" } } ] diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json index 4f57d279f978..edaa486c2b2e 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json @@ -45,15 +45,15 @@ "metadata": { "ticketId": 12345 }, - "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg" + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" } } }, @@ -78,15 +78,15 @@ "metadata": { "ticketId": 12345 }, - "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg", - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg" + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" } } } From b1077b5ad60ec4dc86cb3211f4d5163863079942 Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Thu, 2 Sep 2021 11:00:22 -0400 Subject: [PATCH 16/28] More systemData placement --- .../Standards/GetStandard_example.json | 18 +++++----- .../ListBySubscriptionStandards_example.json | 36 +++++++++---------- .../Standards/ListStandards_example.json | 36 +++++++++---------- .../Standards/PutStandard_example.json | 36 +++++++++---------- 4 files changed, 63 insertions(+), 63 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json index 0406743db29f..b21f0cff101e 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/GetStandard_example.json @@ -25,15 +25,15 @@ { "key": "dbd0cb49-b563-45e7-9724-889e799fa648" } - ], - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } + ] + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListBySubscriptionStandards_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListBySubscriptionStandards_example.json index 21167e30b639..ab68d16db797 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListBySubscriptionStandards_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListBySubscriptionStandards_example.json @@ -25,15 +25,15 @@ { "key": "dbd0cb49-b563-45e7-9724-889e799fa648" } - ], - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } + ] + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" } }, { @@ -54,15 +54,15 @@ { "key": "dbd0cb49-b563-45e7-9724-889e799fa648" } - ], - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } + ] + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" } } ] diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json index 52d77233bd89..333264a9acdd 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/ListStandards_example.json @@ -26,15 +26,15 @@ { "key": "dbd0cb49-b563-45e7-9724-889e799fa648" } - ], - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } + ] + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" } }, { @@ -55,15 +55,15 @@ { "key": "dbd0cb49-b563-45e7-9724-889e799fa648" } - ], - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } + ] + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" } } ] diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json index aad761c5cd8b..f5f1c7edb385 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/PutStandard_example.json @@ -40,15 +40,15 @@ { "key": "dbd0cb49-b563-45e7-9724-889e799fa648" } - ], - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } + ] + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" } } }, @@ -71,15 +71,15 @@ { "key": "dbd0cb49-b563-45e7-9724-889e799fa648" } - ], - "systemData": { - "createdBy": "user@contoso.com", - "createdByType": "User", - "createdAt": "2021-08-31T13:47:50.328Z", - "lastModifiedBy": "user@contoso.com", - "lastModifiedByType": "User", - "lastModifiedAt": "2021-08-31T13:47:50.328Z" - } + ] + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" } } } From f2850293132e62396bd287ddc11a4f138045ffad Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Thu, 9 Sep 2021 09:30:42 -0400 Subject: [PATCH 17/28] Naming convention name to assignments from standardAssignment --- ...ndardAssignments.json => assignments.json} | 80 +++++++++---------- .../DeleteAssignment_example.json} | 2 +- .../GetAssignment_example.json} | 6 +- .../ListAssignments_example.json} | 8 +- ...istBySubscriptionAssignments_example.json} | 8 +- .../PutAssignment_example.json} | 12 +-- .../preview/2021-08-01-preview/standards.json | 12 ++- .../security/resource-manager/readme.md | 2 +- 8 files changed, 63 insertions(+), 67 deletions(-) rename specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/{standardAssignments.json => assignments.json} (82%) rename specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/{StandardAssignments/DeleteStandardAssignment_example.json => Assignments/DeleteAssignment_example.json} (77%) rename specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/{StandardAssignments/GetStandardAssignment_example.json => Assignments/GetAssignment_example.json} (84%) rename specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/{StandardAssignments/ListStandardAssignments_example.json => Assignments/ListAssignments_example.json} (92%) rename specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/{StandardAssignments/ListBySubscriptionStandardAssignments_example.json => Assignments/ListBySubscriptionAssignments_example.json} (92%) rename specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/{StandardAssignments/PutStandardAssignment_example.json => Assignments/PutAssignment_example.json} (87%) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json similarity index 82% rename from specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json rename to specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json index 15656f1180cb..cac7169093e4 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json @@ -34,18 +34,18 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.Security/standardAssignments": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/assignments": { "get": { "x-ms-examples": { "List security standardAssignments by subscription level scope": { - "$ref": "./examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json" + "$ref": "./examples/Assignments/ListBySubscriptionAssignments_example.json" } }, "tags": [ - "StandardAssignments" + "Assignments" ], "description": "Get a list of all relevant standardAssignments over a subscription level scope", - "operationId": "StandardAssignments_ListBySubscription", + "operationId": "Assignments_ListBySubscription", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -58,7 +58,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/StandardAssignmentList" + "$ref": "#/definitions/AssignmentList" } }, "default": { @@ -73,18 +73,18 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/standardAssignments": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/assignments": { "get": { "x-ms-examples": { "List security standardAssignments by subscriptionId and resourceGroup scope": { - "$ref": "./examples/StandardAssignments/ListStandardAssignments_example.json" + "$ref": "./examples/Assignments/ListAssignments_example.json" } }, "tags": [ - "StandardAssignments" + "Assignments" ], "description": "Get a list of all relevant standardAssignments available for scope", - "operationId": "StandardAssignments_List", + "operationId": "Assignments_List", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -100,7 +100,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/StandardAssignmentList" + "$ref": "#/definitions/AssignmentList" } }, "default": { @@ -115,18 +115,18 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/standardAssignments/{standardAssignmentId}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/assignments/{assignmentId}": { "get": { "x-ms-examples": { "Get security standardAssignments by by specific standardAssignmentId": { - "$ref": "./examples/StandardAssignments/GetStandardAssignment_example.json" + "$ref": "./examples/Assignments/GetAssignment_example.json" } }, "tags": [ - "StandardAssignments" + "Assignments" ], "description": "Get a specific standard assignment for the requested scope by resourceId", - "operationId": "StandardAssignments_Get", + "operationId": "Assignments_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -138,14 +138,14 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" }, { - "$ref": "#/parameters/StandardAssignmentId" + "$ref": "#/parameters/AssignmentId" } ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/StandardAssignment" + "$ref": "#/definitions/Assignment" } }, "default": { @@ -158,15 +158,15 @@ }, "put": { "x-ms-examples": { - "Create or update security standardAssignment": { - "$ref": "./examples/StandardAssignments/PutStandardAssignment_example.json" + "Create or update security assignment": { + "$ref": "./examples/Assignments/PutAssignment_example.json" } }, "tags": [ - "StandardAssignments" + "Assignments" ], "description": "Create a security assignment on the given scope. Will create/update the required standard assignment. ", - "operationId": "StandardAssignments_CreateOrUpdate", + "operationId": "Assignments_CreateOrUpdate", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -178,23 +178,23 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" }, { - "$ref": "#/parameters/StandardAssignmentId" + "$ref": "#/parameters/AssignmentId" }, { - "$ref": "#/parameters/StandardAssignmentBody" + "$ref": "#/parameters/AssignmentBody" } ], "responses": { "201": { "description": "Created", "schema": { - "$ref": "#/definitions/StandardAssignment" + "$ref": "#/definitions/Assignment" } }, "200": { "description": "OK - Updated", "schema": { - "$ref": "#/definitions/StandardAssignment" + "$ref": "#/definitions/Assignment" } }, "default": { @@ -207,15 +207,15 @@ }, "delete": { "x-ms-examples": { - "Delete security standardAssignment": { - "$ref": "./examples/StandardAssignments/DeleteStandardAssignment_example.json" + "Delete security assignment": { + "$ref": "./examples/Assignments/DeleteAssignment_example.json" } }, "tags": [ - "StandardAssignments" + "Assignments" ], "description": "Delete a standard assignment over a given scope", - "operationId": "StandardAssignments_Delete", + "operationId": "Assignments_Delete", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -227,7 +227,7 @@ "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" }, { - "$ref": "#/parameters/StandardAssignmentId" + "$ref": "#/parameters/AssignmentId" } ], "responses": { @@ -245,7 +245,7 @@ } }, "definitions": { - "StandardAssignmentList": { + "AssignmentList": { "type": "object", "description": "Page of a standard assignment list", "properties": { @@ -254,7 +254,7 @@ "readOnly": true, "type": "array", "items": { - "$ref": "#/definitions/StandardAssignment" + "$ref": "#/definitions/Assignment" } }, "nextLink": { @@ -264,18 +264,16 @@ } } }, - "StandardAssignment": { + "Assignment": { "type": "object", "description": "Security Assignment on a resource group over a given scope", "properties": { "properties": { "description": "Properties of a security assignment", "x-ms-client-flatten": true, - "$ref": "#/definitions/StandardAssignmentProperties" + "$ref": "#/definitions/AssignmentProperties" }, "systemData": { - "readOnly": true, - "type": "object", "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", "$ref": "../../../common/v2/types.json#/definitions/systemData" } @@ -286,7 +284,7 @@ } ] }, - "StandardAssignmentProperties": { + "AssignmentProperties": { "type": "object", "description": "Describes the properties of a standardAssignment", "properties": { @@ -364,20 +362,20 @@ } }, "parameters": { - "StandardAssignmentId": { - "name": "standardAssignmentId", + "AssignmentId": { + "name": "assignmentId", "in": "path", "required": true, "type": "string", "description": "The security assignment key - unique key for the standard assignment", "x-ms-parameter-location": "method" }, - "StandardAssignmentBody": { - "name": "standardAssignment", + "AssignmentBody": { + "name": "assignment", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/StandardAssignment" + "$ref": "#/definitions/Assignment" }, "description": "Custom standard assignment over a pre-defined scope", "x-ms-parameter-location": "method" diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/DeleteStandardAssignment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/DeleteAssignment_example.json similarity index 77% rename from specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/DeleteStandardAssignment_example.json rename to specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/DeleteAssignment_example.json index 5bc56578959c..0e869c3ae9bb 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/DeleteStandardAssignment_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/DeleteAssignment_example.json @@ -3,7 +3,7 @@ "api-version": "2021-08-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "resourceGroupName": "myResourceGroup", - "standardAssignmentId": "8bb8be0a-6010-4789-812f-e4d661c4ed0e" + "assignmentId": "8bb8be0a-6010-4789-812f-e4d661c4ed0e" }, "responses": { "200": {}, diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/GetAssignment_example.json similarity index 84% rename from specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json rename to specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/GetAssignment_example.json index 7943795c227f..32e810b59ccb 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/GetStandardAssignment_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/GetAssignment_example.json @@ -3,14 +3,14 @@ "api-version": "2021-08-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "resourceGroupName": "myResourceGroup", - "standardAssignmentId": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + "assignmentId": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8" }, "responses": { "200": { "body": { - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/assignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "type": "Microsoft.Security/standardAssignments", + "type": "Microsoft.Security/assignments", "location": "East US", "etag": "etag value", "properties": { diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/ListAssignments_example.json similarity index 92% rename from specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json rename to specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/ListAssignments_example.json index 450c10e2116b..fa1133a2a29b 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListStandardAssignments_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/ListAssignments_example.json @@ -9,9 +9,9 @@ "body": { "value": [ { - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/assignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "type": "Microsoft.Security/standardAssignments", + "type": "Microsoft.Security/assignments", "location": "East US", "etag": "etag value", "properties": { @@ -40,9 +40,9 @@ } }, { - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/assignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "type": "Microsoft.Security/standardAssignments", + "type": "Microsoft.Security/assignment", "location": "East US", "etag": "etag value", "properties": { diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/ListBySubscriptionAssignments_example.json similarity index 92% rename from specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json rename to specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/ListBySubscriptionAssignments_example.json index c645eafc3690..254ff8ac8cbd 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/ListBySubscriptionStandardAssignments_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/ListBySubscriptionAssignments_example.json @@ -8,9 +8,9 @@ "body": { "value": [ { - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/assignements/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "type": "Microsoft.Security/standardAssignments", + "type": "Microsoft.Security/assignments", "location": "East US", "etag": "etag value", "properties": { @@ -39,9 +39,9 @@ } }, { - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/assignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "type": "Microsoft.Security/standardAssignments", + "type": "Microsoft.Security/assignments", "location": "East US", "etag": "etag value", "properties": { diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/PutAssignment_example.json similarity index 87% rename from specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json rename to specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/PutAssignment_example.json index edaa486c2b2e..d469445c4f10 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/StandardAssignments/PutStandardAssignment_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/PutAssignment_example.json @@ -3,8 +3,8 @@ "api-version": "2021-08-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "resourceGroupName": "myResourceGroup", - "standardAssignmentId": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "standardAssignment": { + "assignmentId": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "assignment": { "properties": { "displayName": "ASC Default", "description": "Set of policies monitored by Azure Security Center for cross cloud", @@ -26,9 +26,9 @@ "responses": { "200": { "body": { - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/assignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "type": "Microsoft.Security/standardAssignments", + "type": "Microsoft.Security/assignments", "location": "East US", "etag": "etag value", "properties": { @@ -59,9 +59,9 @@ }, "201": { "body": { - "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/standardAssignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/assignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", - "type": "Microsoft.Security/standardAssignments", + "type": "Microsoft.Security/assignments", "location": "East US", "etag": "etag value", "properties": { diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json index 7404ca40c507..ab1fafca8d00 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json @@ -277,8 +277,6 @@ "$ref": "#/definitions/StandardProperties" }, "systemData": { - "readOnly": true, - "type": "object", "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", "$ref": "../../../common/v2/types.json#/definitions/systemData" } @@ -311,20 +309,20 @@ "type": "string" }, "components": { - "description": "List of assessment objects containing assessment unique keys to apply to standard scope", + "description": "List of component objects containing component unique keys (such as assessment keys) to apply to standard scope. Currently only supports assessment keys.", "type": "array", "items": { - "$ref": "#/definitions/StandardAssessmentProperties" + "$ref": "#/definitions/StandardComponentProperties" } } } }, - "StandardAssessmentProperties": { + "StandardComponentProperties": { "type": "object", - "description": "Describes properties of an assessment as related to the standard", + "description": "Describes properties of an component as related to the standard", "properties": { "key": { - "description": "Assessment Key matching assessmentMetadata", + "description": "Component Key matching componentMetadata", "type": "string" } } diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 89a595ff846e..bb53cd3e556c 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -69,7 +69,7 @@ These settings apply only when `--tag=package-preview-2021-08` is specified on t ```yaml $(tag) == 'package-preview-2021-08' input-file: - Microsoft.Security/preview/2021-08-01-preview/standards.json - - Microsoft.Security/preview/2021-08-01-preview/standardAssignments.json + - Microsoft.Security/preview/2021-08-01-preview/assignments.json ``` ### Tag: package-composite-v1 From a1732f307230e4036dd1154aea32c971ed65c54e Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Tue, 14 Sep 2021 13:13:16 -0400 Subject: [PATCH 18/28] Additional example added --- .../2021-08-01-preview/assignments.json | 5 +- .../Assignments/PutAssignment_example.json | 9 +++ .../PutDefaultAssignment_example.json | 73 +++++++++++++++++++ 3 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/PutDefaultAssignment_example.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json index cac7169093e4..337afd4f3838 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json @@ -158,8 +158,11 @@ }, "put": { "x-ms-examples": { - "Create or update security assignment": { + "Exempt Recommendation From standard and resource": { "$ref": "./examples/Assignments/PutAssignment_example.json" + }, + "Define a default standard assignment": { + "$ref": "./examples/Assignments/PutDefaultAssignment_example.json" } }, "tags": [ diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/PutAssignment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/PutAssignment_example.json index d469445c4f10..0f91a2aab821 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/PutAssignment_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/PutAssignment_example.json @@ -11,6 +11,9 @@ "assignedStandard": { "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" }, + "assignedComponent": { + "key": "1195afff-c881-495e-9bc5-1486211ae03f" + }, "effect": "Exempt", "expiresOn": "2022-05-01T19:50:47.083633Z", "additionalData": { @@ -37,6 +40,9 @@ "assignedStandard": { "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" }, + "assignedComponent": { + "key": "1195afff-c881-495e-9bc5-1486211ae03f" + }, "effect": "Exempt", "expiresOn": "2022-05-01T19:50:47.083633Z", "additionalData": { @@ -70,6 +76,9 @@ "assignedStandard": { "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" }, + "assignedComponent": { + "key": "1195afff-c881-495e-9bc5-1486211ae03f" + }, "effect": "Exempt", "expiresOn": "2022-05-01T19:50:47.083633Z", "additionalData": { diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/PutDefaultAssignment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/PutDefaultAssignment_example.json new file mode 100644 index 000000000000..562e8d7c875a --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/PutDefaultAssignment_example.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2021-08-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myResourceGroup", + "assignmentId": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "assignment": { + "properties": { + "displayName": "ASC Default", + "description": "Set of policies monitored by Azure Security Center for cross cloud", + "assignedStandard": { + "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + "effect": "audit", + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg" + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/assignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/assignments", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "ASC Default", + "description": "Set of policies monitored by Azure Security Center for cross cloud", + "assignedStandard": { + "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + "effect": "audit", + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg" + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } + } + }, + "201": { + "body": { + "id": "subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/providers/Microsoft.Security/assignments/1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8", + "type": "Microsoft.Security/assignments", + "location": "East US", + "etag": "etag value", + "properties": { + "displayName": "ASC Default", + "description": "Set of policies monitored by Azure Security Center for cross cloud", + "assignedStandard": { + "id": "/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8" + }, + "effect": "audit", + "scope": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg" + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2021-08-31T13:47:50.328Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-08-31T13:47:50.328Z" + } + } + } + } +} From 2ca2b2719b6493ba2c799de2ae327c4d5e7787e3 Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Mon, 20 Sep 2021 13:20:51 -0400 Subject: [PATCH 19/28] Changes to address descriptive comments on field types --- .../preview/2021-08-01-preview/assignments.json | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json index 337afd4f3838..ebcaa72e4506 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json @@ -300,11 +300,11 @@ "type": "string" }, "assignedStandard": { - "description": "List of assigned standards as applied to this standard assignment over the given scope", + "description": "Standard item with key as applied to this standard assignment over the given scope", "$ref": "#/definitions/AssignedStandardItem" }, "assignedComponent": { - "description": "List of Microsoft.Security/assessments as applied to this standard assignment over the given scope", + "description": "Component item with key as applied to this standard assignment over the given scope", "$ref": "#/definitions/AssignedComponentItem" }, "scope": { @@ -331,15 +331,8 @@ } }, "metadata": { - "description": "Metadata about this standardAssignment", - "type": "object", - "properties": { - "ticketId": { - "type": "integer", - "format": "int64", - "description": "TicketID in reference to this standardAssignment" - } - } + "description": "The assignment metadata. Metadata is an open ended object and is typically a collection of key value pairs.", + "type": "object" } } }, From a5aa447d621b793ebaa1999d729e0afc531e4d0a Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Mon, 20 Sep 2021 14:03:39 -0400 Subject: [PATCH 20/28] Add systemData readOnly --- .../preview/2021-08-01-preview/assignments.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json index ebcaa72e4506..e8462f4f4e5e 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json @@ -277,6 +277,8 @@ "$ref": "#/definitions/AssignmentProperties" }, "systemData": { + "readOnly": true, + "type": "object", "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", "$ref": "../../../common/v2/types.json#/definitions/systemData" } From 7438ad14bc462475a996235bea2c9ad1d5f69f32 Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Mon, 20 Sep 2021 14:26:44 -0400 Subject: [PATCH 21/28] prettier-fix against examples --- .../examples/Assignments/DeleteAssignment_example.json | 2 +- .../examples/Standards/DeleteStandard_example.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/DeleteAssignment_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/DeleteAssignment_example.json index 0e869c3ae9bb..6134d4a1a0a0 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/DeleteAssignment_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Assignments/DeleteAssignment_example.json @@ -1,5 +1,5 @@ { - "parameters" : { + "parameters": { "api-version": "2021-08-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "resourceGroupName": "myResourceGroup", diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/DeleteStandard_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/DeleteStandard_example.json index fae15996c541..275b7ca62600 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/DeleteStandard_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/examples/Standards/DeleteStandard_example.json @@ -1,5 +1,5 @@ { - "parameters" : { + "parameters": { "api-version": "2021-08-01-preview", "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", "resourceGroupName": "myResourceGroup", From 31272afe86dc1e6f8ffb9369768ceeed93af81c4 Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Mon, 20 Sep 2021 14:35:53 -0400 Subject: [PATCH 22/28] Cleaned types to ref standard v2 common-types entry similar to securityForIoT --- .../preview/2021-08-01-preview/standards.json | 4 +- .../resource-manager/common/v2/types.json | 686 ------------------ 2 files changed, 3 insertions(+), 687 deletions(-) delete mode 100644 specification/security/resource-manager/common/v2/types.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json index ab1fafca8d00..4c4a5203cba0 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/standards.json @@ -277,8 +277,10 @@ "$ref": "#/definitions/StandardProperties" }, "systemData": { + "readOnly": true, + "type": "object", "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", - "$ref": "../../../common/v2/types.json#/definitions/systemData" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" } }, "allOf": [ diff --git a/specification/security/resource-manager/common/v2/types.json b/specification/security/resource-manager/common/v2/types.json deleted file mode 100644 index a6224050586b..000000000000 --- a/specification/security/resource-manager/common/v2/types.json +++ /dev/null @@ -1,686 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "Resource": { - "title": "Resource", - "description": "Common fields that are returned in the response for all Azure Resource Manager resources", - "type": "object", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - }, - "name": { - "readOnly": true, - "type": "string", - "description": "The name of the resource" - }, - "type": { - "readOnly": true, - "type": "string", - "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" - } - }, - "x-ms-azure-resource": true - }, - "AzureEntityResource": { - "x-ms-client-name": "AzureEntityResource", - "title": "Entity Resource", - "description": "The resource model definition for an Azure Resource Manager resource with an etag.", - "type": "object", - "properties": { - "etag": { - "type": "string", - "readOnly": true, - "description": "Resource Etag." - } - }, - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "TrackedResource": { - "title": "Tracked Resource", - "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", - "type": "object", - "properties": { - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "Resource tags." - }, - "location": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "The geo-location where the resource lives" - } - }, - "required": [ - "location" - ], - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "ProxyResource": { - "title": "Proxy Resource", - "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "ResourceModelWithAllowedPropertySet": { - "description": "The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set.", - "type": "object", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "x-ms-mutability": [ - "read" - ], - "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - }, - "name": { - "readOnly": true, - "type": "string", - "description": "The name of the resource" - }, - "type": { - "readOnly": true, - "type": "string", - "x-ms-mutability": [ - "read" - ], - "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" - }, - "location": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "The geo-location where the resource lives" - }, - "managedBy": { - "type": "string", - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource." - }, - "kind": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.", - "pattern": "^[-\\w\\._,\\(\\)]+$" - }, - "etag": { - "readOnly": true, - "type": "string", - "description": "The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. " - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "Resource tags." - }, - "identity": { - "allOf": [ - { - "$ref": "#/definitions/Identity" - } - ] - }, - "sku": { - "allOf": [ - { - "$ref": "#/definitions/Sku" - } - ] - }, - "plan": { - "allOf": [ - { - "$ref": "#/definitions/Plan" - } - ] - } - }, - "x-ms-azure-resource": true - }, - "Sku": { - "description": "The resource model definition representing SKU", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the SKU. Ex - P3. It is typically a letter+number code" - }, - "tier": { - "type": "string", - "enum": [ - "Free", - "Basic", - "Standard", - "Premium" - ], - "x-ms-enum": { - "name": "SkuTier", - "modelAsString": false - }, - "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT." - }, - "size": { - "type": "string", - "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. " - }, - "family": { - "type": "string", - "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here." - }, - "capacity": { - "type": "integer", - "format": "int32", - "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted." - } - }, - "required": [ - "name" - ] - }, - "Identity": { - "description": "Identity for the resource.", - "type": "object", - "properties": { - "principalId": { - "readOnly": true, - "type": "string", - "description": "The principal ID of resource identity." - }, - "tenantId": { - "readOnly": true, - "type": "string", - "description": "The tenant ID of resource." - }, - "type": { - "type": "string", - "description": "The identity type.", - "enum": [ - "SystemAssigned" - ], - "x-ms-enum": { - "name": "ResourceIdentityType", - "modelAsString": false - } - } - } - }, - "Plan": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "A user defined name of the 3rd Party Artifact that is being procured." - }, - "publisher": { - "type": "string", - "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic" - }, - "product": { - "type": "string", - "description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. " - }, - "promotionCode": { - "type": "string", - "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact." - }, - "version": { - "type": "string", - "description": "The version of the desired product/artifact." - } - }, - "description": "Plan for the resource.", - "required": [ - "name", - "publisher", - "product" - ] - }, - "ErrorDetail": { - "description": "The error detail.", - "type": "object", - "properties": { - "code": { - "readOnly": true, - "type": "string", - "description": "The error code." - }, - "message": { - "readOnly": true, - "type": "string", - "description": "The error message." - }, - "target": { - "readOnly": true, - "type": "string", - "description": "The error target." - }, - "details": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorDetail" - }, - "description": "The error details." - }, - "additionalInfo": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorAdditionalInfo" - }, - "description": "The error additional info." - } - } - }, - "ErrorResponse": { - "title": "Error response", - "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).", - "type": "object", - "properties": { - "error": { - "description": "The error object.", - "$ref": "#/definitions/ErrorDetail" - } - } - }, - "ErrorAdditionalInfo": { - "type": "object", - "properties": { - "type": { - "readOnly": true, - "type": "string", - "description": "The additional info type." - }, - "info": { - "readOnly": true, - "type": "object", - "description": "The additional info." - } - }, - "description": "The resource management error additional info." - }, - "Operation": { - "title": "REST API Operation", - "description": "Details of a REST API operation, returned from the Resource Provider Operations API", - "type": "object", - "properties": { - "name": { - "description": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", - "type": "string", - "readOnly": true - }, - "isDataAction": { - "description": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.", - "type": "boolean", - "readOnly": true - }, - "display": { - "description": "Localized display information for this particular operation.", - "type": "object", - "properties": { - "provider": { - "description": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", - "type": "string", - "readOnly": true - }, - "description": { - "description": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", - "type": "string", - "readOnly": true - } - } - }, - "origin": { - "description": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", - "type": "string", - "readOnly": true, - "enum": [ - "user", - "system", - "user,system" - ], - "x-ms-enum": { - "name": "Origin", - "modelAsString": true - } - }, - "actionType": { - "description": "Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", - "type": "string", - "readOnly": true, - "enum": [ - "Internal" - ], - "x-ms-enum": { - "name": "ActionType", - "modelAsString": true - } - } - } - }, - "OperationListResult": { - "description": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "description": "List of operations supported by the resource provider", - "readOnly": true - }, - "nextLink": { - "type": "string", - "description": "URL to get the next set of operation list results (if there are any).", - "readOnly": true - } - } - }, - "OperationStatusResult": { - "description": "The current status of an async operation.", - "type": "object", - "required": [ - "status" - ], - "properties": { - "id": { - "description": "Fully qualified ID for the async operation.", - "type": "string" - }, - "name": { - "description": "Name of the async operation.", - "type": "string" - }, - "status": { - "description": "Operation status.", - "type": "string" - }, - "percentComplete": { - "description": "Percent of the operation that is complete.", - "type": "number", - "minimum": 0, - "maximum": 100 - }, - "startTime": { - "description": "The start time of the operation.", - "type": "string", - "format": "date-time" - }, - "endTime": { - "description": "The end time of the operation.", - "type": "string", - "format": "date-time" - }, - "operations": { - "description": "The operations list.", - "type": "array", - "items": { - "$ref": "#/definitions/OperationStatusResult" - } - }, - "error": { - "description": "If present, details of the operation error.", - "$ref": "#/definitions/ErrorDetail" - } - } - }, - "locationData": { - "description": "Metadata pertaining to the geographic location of the resource.", - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 256, - "description": "A canonical name for the geographic or physical location." - }, - "city": { - "type": "string", - "description": "The city or locality where the resource is located." - }, - "district": { - "type": "string", - "description": "The district, state, or province where the resource is located." - }, - "countryOrRegion": { - "type": "string", - "description": "The country or region where the resource is located" - } - }, - "required": [ - "name" - ] - }, - "systemData": { - "description": "Metadata pertaining to creation and last modification of the resource.", - "type": "object", - "readOnly": true, - "properties": { - "createdBy": { - "type": "string", - "description": "The identity that created the resource." - }, - "createdByType": { - "type": "string", - "description": "The type of identity that created the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource creation (UTC)." - }, - "lastModifiedBy": { - "type": "string", - "description": "The identity that last modified the resource." - }, - "lastModifiedByType": { - "type": "string", - "description": "The type of identity that last modified the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "lastModifiedAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource last modification (UTC)" - } - } - }, - "encryptionProperties": { - "description": "Configuration of key for data encryption", - "type": "object", - "properties": { - "status": { - "description": "Indicates whether or not the encryption is enabled for container registry.", - "enum": [ - "enabled", - "disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "EncryptionStatus", - "modelAsString": true - } - }, - "keyVaultProperties": { - "$ref": "#/definitions/KeyVaultProperties", - "description": "Key vault properties." - } - } - }, - "KeyVaultProperties": { - "type": "object", - "properties": { - "keyIdentifier": { - "description": "Key vault uri to access the encryption key.", - "type": "string" - }, - "identity": { - "description": "The client ID of the identity which will be used to access key vault.", - "type": "string" - } - } - }, - "CheckNameAvailabilityRequest": { - "description": "The check availability request body.", - "type": "object", - "properties": { - "name": { - "description": "The name of the resource for which availability needs to be checked.", - "type": "string" - }, - "type": { - "description": "The resource type.", - "type": "string" - } - } - }, - "CheckNameAvailabilityResponse": { - "description": "The check availability result.", - "type": "object", - "properties": { - "nameAvailable": { - "description": "Indicates if the resource name is available.", - "type": "boolean" - }, - "reason": { - "description": "The reason why the given name is not available.", - "type": "string", - "enum": [ - "Invalid", - "AlreadyExists" - ], - "x-ms-enum": { - "name": "CheckNameAvailabilityReason", - "modelAsString": true - } - }, - "message": { - "description": "Detailed reason why the given name is available.", - "type": "string" - } - } - } - }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of the target subscription.", - "minLength": 1 - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to use for this operation.", - "minLength": 1 - }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group. The name is case insensitive.", - "minLength": 1, - "maxLength": 90, - "x-ms-parameter-location": "method" - }, - "OperationIdParameter": { - "name": "operationId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of an ongoing async operation.", - "minLength": 1, - "x-ms-parameter-location": "method" - }, - "LocationParameter": { - "name": "location", - "in": "path", - "required": true, - "type": "string", - "description": "The name of Azure region.", - "minLength": 1, - "x-ms-parameter-location": "method" - } - } -} From ace846d1595832ba0a54a0219beb33b70c35b0e4 Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Mon, 20 Sep 2021 14:51:12 -0400 Subject: [PATCH 23/28] Re-added v2 folder? --- .../resource-manager/common/v2/types.json | 686 ++++++++++++++++++ 1 file changed, 686 insertions(+) create mode 100644 specification/security/resource-manager/common/v2/types.json diff --git a/specification/security/resource-manager/common/v2/types.json b/specification/security/resource-manager/common/v2/types.json new file mode 100644 index 000000000000..a6224050586b --- /dev/null +++ b/specification/security/resource-manager/common/v2/types.json @@ -0,0 +1,686 @@ +{ + "swagger": "2.0", + "info": { + "version": "2.0", + "title": "Common types" + }, + "paths": {}, + "definitions": { + "Resource": { + "title": "Resource", + "description": "Common fields that are returned in the response for all Azure Resource Manager resources", + "type": "object", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the resource" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" + } + }, + "x-ms-azure-resource": true + }, + "AzureEntityResource": { + "x-ms-client-name": "AzureEntityResource", + "title": "Entity Resource", + "description": "The resource model definition for an Azure Resource Manager resource with an etag.", + "type": "object", + "properties": { + "etag": { + "type": "string", + "readOnly": true, + "description": "Resource Etag." + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "TrackedResource": { + "title": "Tracked Resource", + "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Resource tags." + }, + "location": { + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "The geo-location where the resource lives" + } + }, + "required": [ + "location" + ], + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "ProxyResource": { + "title": "Proxy Resource", + "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "ResourceModelWithAllowedPropertySet": { + "description": "The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set.", + "type": "object", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the resource" + }, + "type": { + "readOnly": true, + "type": "string", + "x-ms-mutability": [ + "read" + ], + "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" + }, + "location": { + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "The geo-location where the resource lives" + }, + "managedBy": { + "type": "string", + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource." + }, + "kind": { + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.", + "pattern": "^[-\\w\\._,\\(\\)]+$" + }, + "etag": { + "readOnly": true, + "type": "string", + "description": "The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. " + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Resource tags." + }, + "identity": { + "allOf": [ + { + "$ref": "#/definitions/Identity" + } + ] + }, + "sku": { + "allOf": [ + { + "$ref": "#/definitions/Sku" + } + ] + }, + "plan": { + "allOf": [ + { + "$ref": "#/definitions/Plan" + } + ] + } + }, + "x-ms-azure-resource": true + }, + "Sku": { + "description": "The resource model definition representing SKU", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the SKU. Ex - P3. It is typically a letter+number code" + }, + "tier": { + "type": "string", + "enum": [ + "Free", + "Basic", + "Standard", + "Premium" + ], + "x-ms-enum": { + "name": "SkuTier", + "modelAsString": false + }, + "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT." + }, + "size": { + "type": "string", + "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. " + }, + "family": { + "type": "string", + "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here." + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted." + } + }, + "required": [ + "name" + ] + }, + "Identity": { + "description": "Identity for the resource.", + "type": "object", + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal ID of resource identity." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of resource." + }, + "type": { + "type": "string", + "description": "The identity type.", + "enum": [ + "SystemAssigned" + ], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": false + } + } + } + }, + "Plan": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A user defined name of the 3rd Party Artifact that is being procured." + }, + "publisher": { + "type": "string", + "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic" + }, + "product": { + "type": "string", + "description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. " + }, + "promotionCode": { + "type": "string", + "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact." + }, + "version": { + "type": "string", + "description": "The version of the desired product/artifact." + } + }, + "description": "Plan for the resource.", + "required": [ + "name", + "publisher", + "product" + ] + }, + "ErrorDetail": { + "description": "The error detail.", + "type": "object", + "properties": { + "code": { + "readOnly": true, + "type": "string", + "description": "The error code." + }, + "message": { + "readOnly": true, + "type": "string", + "description": "The error message." + }, + "target": { + "readOnly": true, + "type": "string", + "description": "The error target." + }, + "details": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDetail" + }, + "description": "The error details." + }, + "additionalInfo": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorAdditionalInfo" + }, + "description": "The error additional info." + } + } + }, + "ErrorResponse": { + "title": "Error response", + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).", + "type": "object", + "properties": { + "error": { + "description": "The error object.", + "$ref": "#/definitions/ErrorDetail" + } + } + }, + "ErrorAdditionalInfo": { + "type": "object", + "properties": { + "type": { + "readOnly": true, + "type": "string", + "description": "The additional info type." + }, + "info": { + "readOnly": true, + "type": "object", + "description": "The additional info." + } + }, + "description": "The resource management error additional info." + }, + "Operation": { + "title": "REST API Operation", + "description": "Details of a REST API operation, returned from the Resource Provider Operations API", + "type": "object", + "properties": { + "name": { + "description": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": "string", + "readOnly": true + }, + "isDataAction": { + "description": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.", + "type": "boolean", + "readOnly": true + }, + "display": { + "description": "Localized display information for this particular operation.", + "type": "object", + "properties": { + "provider": { + "description": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": "string", + "readOnly": true + } + } + }, + "origin": { + "description": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": "string", + "readOnly": true, + "enum": [ + "user", + "system", + "user,system" + ], + "x-ms-enum": { + "name": "Origin", + "modelAsString": true + } + }, + "actionType": { + "description": "Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": "string", + "readOnly": true, + "enum": [ + "Internal" + ], + "x-ms-enum": { + "name": "ActionType", + "modelAsString": true + } + } + } + }, + "OperationListResult": { + "description": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "description": "List of operations supported by the resource provider", + "readOnly": true + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of operation list results (if there are any).", + "readOnly": true + } + } + }, + "OperationStatusResult": { + "description": "The current status of an async operation.", + "type": "object", + "required": [ + "status" + ], + "properties": { + "id": { + "description": "Fully qualified ID for the async operation.", + "type": "string" + }, + "name": { + "description": "Name of the async operation.", + "type": "string" + }, + "status": { + "description": "Operation status.", + "type": "string" + }, + "percentComplete": { + "description": "Percent of the operation that is complete.", + "type": "number", + "minimum": 0, + "maximum": 100 + }, + "startTime": { + "description": "The start time of the operation.", + "type": "string", + "format": "date-time" + }, + "endTime": { + "description": "The end time of the operation.", + "type": "string", + "format": "date-time" + }, + "operations": { + "description": "The operations list.", + "type": "array", + "items": { + "$ref": "#/definitions/OperationStatusResult" + } + }, + "error": { + "description": "If present, details of the operation error.", + "$ref": "#/definitions/ErrorDetail" + } + } + }, + "locationData": { + "description": "Metadata pertaining to the geographic location of the resource.", + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 256, + "description": "A canonical name for the geographic or physical location." + }, + "city": { + "type": "string", + "description": "The city or locality where the resource is located." + }, + "district": { + "type": "string", + "description": "The district, state, or province where the resource is located." + }, + "countryOrRegion": { + "type": "string", + "description": "The country or region where the resource is located" + } + }, + "required": [ + "name" + ] + }, + "systemData": { + "description": "Metadata pertaining to creation and last modification of the resource.", + "type": "object", + "readOnly": true, + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "type": "string", + "description": "The type of identity that created the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "type": "string", + "description": "The type of identity that last modified the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" + } + } + }, + "encryptionProperties": { + "description": "Configuration of key for data encryption", + "type": "object", + "properties": { + "status": { + "description": "Indicates whether or not the encryption is enabled for container registry.", + "enum": [ + "enabled", + "disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "EncryptionStatus", + "modelAsString": true + } + }, + "keyVaultProperties": { + "$ref": "#/definitions/KeyVaultProperties", + "description": "Key vault properties." + } + } + }, + "KeyVaultProperties": { + "type": "object", + "properties": { + "keyIdentifier": { + "description": "Key vault uri to access the encryption key.", + "type": "string" + }, + "identity": { + "description": "The client ID of the identity which will be used to access key vault.", + "type": "string" + } + } + }, + "CheckNameAvailabilityRequest": { + "description": "The check availability request body.", + "type": "object", + "properties": { + "name": { + "description": "The name of the resource for which availability needs to be checked.", + "type": "string" + }, + "type": { + "description": "The resource type.", + "type": "string" + } + } + }, + "CheckNameAvailabilityResponse": { + "description": "The check availability result.", + "type": "object", + "properties": { + "nameAvailable": { + "description": "Indicates if the resource name is available.", + "type": "boolean" + }, + "reason": { + "description": "The reason why the given name is not available.", + "type": "string", + "enum": [ + "Invalid", + "AlreadyExists" + ], + "x-ms-enum": { + "name": "CheckNameAvailabilityReason", + "modelAsString": true + } + }, + "message": { + "description": "Detailed reason why the given name is available.", + "type": "string" + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the target subscription.", + "minLength": 1 + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for this operation.", + "minLength": 1 + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group. The name is case insensitive.", + "minLength": 1, + "maxLength": 90, + "x-ms-parameter-location": "method" + }, + "OperationIdParameter": { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of an ongoing async operation.", + "minLength": 1, + "x-ms-parameter-location": "method" + }, + "LocationParameter": { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "description": "The name of Azure region.", + "minLength": 1, + "x-ms-parameter-location": "method" + } + } +} From 6fb1c8341663031b4226f55aa23aee1a83ffae22 Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Mon, 20 Sep 2021 15:05:22 -0400 Subject: [PATCH 24/28] Missed a change here? --- .../preview/2021-08-01-preview/assignments.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json index e8462f4f4e5e..be26e1b90a31 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2021-08-01-preview/assignments.json @@ -280,7 +280,7 @@ "readOnly": true, "type": "object", "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", - "$ref": "../../../common/v2/types.json#/definitions/systemData" + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" } }, "allOf": [ From 96db7d03167a7a7f13b301eb444fd484c2e28e57 Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Mon, 20 Sep 2021 15:07:07 -0400 Subject: [PATCH 25/28] Cleanup of v2 type completely, updated readme.md --- .../resource-manager/common/v2/types.json | 686 ------------------ .../security/resource-manager/readme.md | 3 + 2 files changed, 3 insertions(+), 686 deletions(-) delete mode 100644 specification/security/resource-manager/common/v2/types.json diff --git a/specification/security/resource-manager/common/v2/types.json b/specification/security/resource-manager/common/v2/types.json deleted file mode 100644 index a6224050586b..000000000000 --- a/specification/security/resource-manager/common/v2/types.json +++ /dev/null @@ -1,686 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2.0", - "title": "Common types" - }, - "paths": {}, - "definitions": { - "Resource": { - "title": "Resource", - "description": "Common fields that are returned in the response for all Azure Resource Manager resources", - "type": "object", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - }, - "name": { - "readOnly": true, - "type": "string", - "description": "The name of the resource" - }, - "type": { - "readOnly": true, - "type": "string", - "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" - } - }, - "x-ms-azure-resource": true - }, - "AzureEntityResource": { - "x-ms-client-name": "AzureEntityResource", - "title": "Entity Resource", - "description": "The resource model definition for an Azure Resource Manager resource with an etag.", - "type": "object", - "properties": { - "etag": { - "type": "string", - "readOnly": true, - "description": "Resource Etag." - } - }, - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "TrackedResource": { - "title": "Tracked Resource", - "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", - "type": "object", - "properties": { - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "Resource tags." - }, - "location": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "The geo-location where the resource lives" - } - }, - "required": [ - "location" - ], - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "ProxyResource": { - "title": "Proxy Resource", - "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ] - }, - "ResourceModelWithAllowedPropertySet": { - "description": "The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set.", - "type": "object", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "x-ms-mutability": [ - "read" - ], - "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - }, - "name": { - "readOnly": true, - "type": "string", - "description": "The name of the resource" - }, - "type": { - "readOnly": true, - "type": "string", - "x-ms-mutability": [ - "read" - ], - "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" - }, - "location": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "The geo-location where the resource lives" - }, - "managedBy": { - "type": "string", - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource." - }, - "kind": { - "type": "string", - "x-ms-mutability": [ - "read", - "create" - ], - "description": "Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.", - "pattern": "^[-\\w\\._,\\(\\)]+$" - }, - "etag": { - "readOnly": true, - "type": "string", - "description": "The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. " - }, - "tags": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-ms-mutability": [ - "read", - "create", - "update" - ], - "description": "Resource tags." - }, - "identity": { - "allOf": [ - { - "$ref": "#/definitions/Identity" - } - ] - }, - "sku": { - "allOf": [ - { - "$ref": "#/definitions/Sku" - } - ] - }, - "plan": { - "allOf": [ - { - "$ref": "#/definitions/Plan" - } - ] - } - }, - "x-ms-azure-resource": true - }, - "Sku": { - "description": "The resource model definition representing SKU", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the SKU. Ex - P3. It is typically a letter+number code" - }, - "tier": { - "type": "string", - "enum": [ - "Free", - "Basic", - "Standard", - "Premium" - ], - "x-ms-enum": { - "name": "SkuTier", - "modelAsString": false - }, - "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT." - }, - "size": { - "type": "string", - "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. " - }, - "family": { - "type": "string", - "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here." - }, - "capacity": { - "type": "integer", - "format": "int32", - "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted." - } - }, - "required": [ - "name" - ] - }, - "Identity": { - "description": "Identity for the resource.", - "type": "object", - "properties": { - "principalId": { - "readOnly": true, - "type": "string", - "description": "The principal ID of resource identity." - }, - "tenantId": { - "readOnly": true, - "type": "string", - "description": "The tenant ID of resource." - }, - "type": { - "type": "string", - "description": "The identity type.", - "enum": [ - "SystemAssigned" - ], - "x-ms-enum": { - "name": "ResourceIdentityType", - "modelAsString": false - } - } - } - }, - "Plan": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "A user defined name of the 3rd Party Artifact that is being procured." - }, - "publisher": { - "type": "string", - "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic" - }, - "product": { - "type": "string", - "description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. " - }, - "promotionCode": { - "type": "string", - "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact." - }, - "version": { - "type": "string", - "description": "The version of the desired product/artifact." - } - }, - "description": "Plan for the resource.", - "required": [ - "name", - "publisher", - "product" - ] - }, - "ErrorDetail": { - "description": "The error detail.", - "type": "object", - "properties": { - "code": { - "readOnly": true, - "type": "string", - "description": "The error code." - }, - "message": { - "readOnly": true, - "type": "string", - "description": "The error message." - }, - "target": { - "readOnly": true, - "type": "string", - "description": "The error target." - }, - "details": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorDetail" - }, - "description": "The error details." - }, - "additionalInfo": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorAdditionalInfo" - }, - "description": "The error additional info." - } - } - }, - "ErrorResponse": { - "title": "Error response", - "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).", - "type": "object", - "properties": { - "error": { - "description": "The error object.", - "$ref": "#/definitions/ErrorDetail" - } - } - }, - "ErrorAdditionalInfo": { - "type": "object", - "properties": { - "type": { - "readOnly": true, - "type": "string", - "description": "The additional info type." - }, - "info": { - "readOnly": true, - "type": "object", - "description": "The additional info." - } - }, - "description": "The resource management error additional info." - }, - "Operation": { - "title": "REST API Operation", - "description": "Details of a REST API operation, returned from the Resource Provider Operations API", - "type": "object", - "properties": { - "name": { - "description": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", - "type": "string", - "readOnly": true - }, - "isDataAction": { - "description": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.", - "type": "boolean", - "readOnly": true - }, - "display": { - "description": "Localized display information for this particular operation.", - "type": "object", - "properties": { - "provider": { - "description": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", - "type": "string", - "readOnly": true - }, - "description": { - "description": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", - "type": "string", - "readOnly": true - } - } - }, - "origin": { - "description": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", - "type": "string", - "readOnly": true, - "enum": [ - "user", - "system", - "user,system" - ], - "x-ms-enum": { - "name": "Origin", - "modelAsString": true - } - }, - "actionType": { - "description": "Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", - "type": "string", - "readOnly": true, - "enum": [ - "Internal" - ], - "x-ms-enum": { - "name": "ActionType", - "modelAsString": true - } - } - } - }, - "OperationListResult": { - "description": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/Operation" - }, - "description": "List of operations supported by the resource provider", - "readOnly": true - }, - "nextLink": { - "type": "string", - "description": "URL to get the next set of operation list results (if there are any).", - "readOnly": true - } - } - }, - "OperationStatusResult": { - "description": "The current status of an async operation.", - "type": "object", - "required": [ - "status" - ], - "properties": { - "id": { - "description": "Fully qualified ID for the async operation.", - "type": "string" - }, - "name": { - "description": "Name of the async operation.", - "type": "string" - }, - "status": { - "description": "Operation status.", - "type": "string" - }, - "percentComplete": { - "description": "Percent of the operation that is complete.", - "type": "number", - "minimum": 0, - "maximum": 100 - }, - "startTime": { - "description": "The start time of the operation.", - "type": "string", - "format": "date-time" - }, - "endTime": { - "description": "The end time of the operation.", - "type": "string", - "format": "date-time" - }, - "operations": { - "description": "The operations list.", - "type": "array", - "items": { - "$ref": "#/definitions/OperationStatusResult" - } - }, - "error": { - "description": "If present, details of the operation error.", - "$ref": "#/definitions/ErrorDetail" - } - } - }, - "locationData": { - "description": "Metadata pertaining to the geographic location of the resource.", - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 256, - "description": "A canonical name for the geographic or physical location." - }, - "city": { - "type": "string", - "description": "The city or locality where the resource is located." - }, - "district": { - "type": "string", - "description": "The district, state, or province where the resource is located." - }, - "countryOrRegion": { - "type": "string", - "description": "The country or region where the resource is located" - } - }, - "required": [ - "name" - ] - }, - "systemData": { - "description": "Metadata pertaining to creation and last modification of the resource.", - "type": "object", - "readOnly": true, - "properties": { - "createdBy": { - "type": "string", - "description": "The identity that created the resource." - }, - "createdByType": { - "type": "string", - "description": "The type of identity that created the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "createdAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource creation (UTC)." - }, - "lastModifiedBy": { - "type": "string", - "description": "The identity that last modified the resource." - }, - "lastModifiedByType": { - "type": "string", - "description": "The type of identity that last modified the resource.", - "enum": [ - "User", - "Application", - "ManagedIdentity", - "Key" - ], - "x-ms-enum": { - "name": "createdByType", - "modelAsString": true - } - }, - "lastModifiedAt": { - "type": "string", - "format": "date-time", - "description": "The timestamp of resource last modification (UTC)" - } - } - }, - "encryptionProperties": { - "description": "Configuration of key for data encryption", - "type": "object", - "properties": { - "status": { - "description": "Indicates whether or not the encryption is enabled for container registry.", - "enum": [ - "enabled", - "disabled" - ], - "type": "string", - "x-ms-enum": { - "name": "EncryptionStatus", - "modelAsString": true - } - }, - "keyVaultProperties": { - "$ref": "#/definitions/KeyVaultProperties", - "description": "Key vault properties." - } - } - }, - "KeyVaultProperties": { - "type": "object", - "properties": { - "keyIdentifier": { - "description": "Key vault uri to access the encryption key.", - "type": "string" - }, - "identity": { - "description": "The client ID of the identity which will be used to access key vault.", - "type": "string" - } - } - }, - "CheckNameAvailabilityRequest": { - "description": "The check availability request body.", - "type": "object", - "properties": { - "name": { - "description": "The name of the resource for which availability needs to be checked.", - "type": "string" - }, - "type": { - "description": "The resource type.", - "type": "string" - } - } - }, - "CheckNameAvailabilityResponse": { - "description": "The check availability result.", - "type": "object", - "properties": { - "nameAvailable": { - "description": "Indicates if the resource name is available.", - "type": "boolean" - }, - "reason": { - "description": "The reason why the given name is not available.", - "type": "string", - "enum": [ - "Invalid", - "AlreadyExists" - ], - "x-ms-enum": { - "name": "CheckNameAvailabilityReason", - "modelAsString": true - } - }, - "message": { - "description": "Detailed reason why the given name is available.", - "type": "string" - } - } - } - }, - "parameters": { - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of the target subscription.", - "minLength": 1 - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to use for this operation.", - "minLength": 1 - }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group. The name is case insensitive.", - "minLength": 1, - "maxLength": 90, - "x-ms-parameter-location": "method" - }, - "OperationIdParameter": { - "name": "operationId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of an ongoing async operation.", - "minLength": 1, - "x-ms-parameter-location": "method" - }, - "LocationParameter": { - "name": "location", - "in": "path", - "required": true, - "type": "string", - "description": "The name of Azure region.", - "minLength": 1, - "x-ms-parameter-location": "method" - } - } -} diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index bb53cd3e556c..d6887b6fb400 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -70,6 +70,9 @@ These settings apply only when `--tag=package-preview-2021-08` is specified on t input-file: - Microsoft.Security/preview/2021-08-01-preview/standards.json - Microsoft.Security/preview/2021-08-01-preview/assignments.json + +override-info: + title: SecurityCenter ``` ### Tag: package-composite-v1 From 51a82a6fc75ad972930a5fd3a3e48fe69bd5c967 Mon Sep 17 00:00:00 2001 From: dochollidayxx Date: Mon, 20 Sep 2021 15:14:27 -0400 Subject: [PATCH 26/28] Adds suppression to readme --- specification/security/resource-manager/readme.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index d6887b6fb400..65e0ec6fb002 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -44,6 +44,10 @@ directive: from: ingestionSettings.json where: $.definitions.IngestionConnectionString.properties.value reason: Secrets are OK to return in a POST response. + - suppress: OperationsAPIImplementation + where: $.paths + from: settings.json + reason: Operations API has nothing to do with current additions. ``` ### Basic Information @@ -61,12 +65,11 @@ tag: package-preview-2021-08 The following packages may be composed from multiple api-versions. - ### Tag: package-preview-2021-08 These settings apply only when `--tag=package-preview-2021-08` is specified on the command line. -```yaml $(tag) == 'package-preview-2021-08' +``` yaml $(tag) == 'package-preview-2021-08' input-file: - Microsoft.Security/preview/2021-08-01-preview/standards.json - Microsoft.Security/preview/2021-08-01-preview/assignments.json @@ -74,6 +77,7 @@ input-file: override-info: title: SecurityCenter ``` + ### Tag: package-composite-v1 These settings apply only when `--tag=package-composite-v1` is specified on the command line. From 96c068c8bc4e7a46ead06d9ebd0e215979604d1f Mon Sep 17 00:00:00 2001 From: dochollidayxx Date: Mon, 20 Sep 2021 15:19:28 -0400 Subject: [PATCH 27/28] Adds suppression to readme --- specification/security/resource-manager/readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 65e0ec6fb002..18608ec61fbb 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -48,6 +48,10 @@ directive: where: $.paths from: settings.json reason: Operations API has nothing to do with current additions. + - suppress: OperationsAPIImplementation + where: $.paths + from: assignments.json + reason: Suppression of OperationsAPI as it doesn't apply to this specific file. ``` ### Basic Information From 3e275707ec5fe164777e48dfdaf432bbfe1e6cf6 Mon Sep 17 00:00:00 2001 From: Adam Holliday Date: Mon, 20 Sep 2021 15:27:14 -0400 Subject: [PATCH 28/28] Change modification to suppress operations linting --- specification/security/resource-manager/readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 18608ec61fbb..f100924dc10c 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -52,6 +52,10 @@ directive: where: $.paths from: assignments.json reason: Suppression of OperationsAPI as it doesn't apply to this specific file. + - suppress: OperationsAPIImplementation + where: $.paths + from: standards.json + reason: Suppression of OperationsAPI as it doesn't apply to this specific file. ``` ### Basic Information