From daa2f3b7f392c3f04f309e4c2ffb46a696dc3805 Mon Sep 17 00:00:00 2001 From: Miri Date: Thu, 4 Apr 2019 17:57:32 +0300 Subject: [PATCH 01/10] add playbook configurations resource REST specification --- .../DeletePlaybookConfiguration_example.json | 12 + ...ookConfigurationResourceGroup_example.json | 52 ++ ...okConfigurationsResourceGroup_example.json | 55 +++ ...ookConfigurationsSubscription_example.json | 54 ++ .../PutPlaybookConfiguration_example.json | 90 ++++ ...ValidatePlaybookConfiguration_example.json | 56 +++ .../playbookConfigurations.json | 461 ++++++++++++++++++ 7 files changed, 780 insertions(+) create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/DeletePlaybookConfiguration_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/DeletePlaybookConfiguration_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/DeletePlaybookConfiguration_example.json new file mode 100644 index 000000000000..35d5367809ef --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/DeletePlaybookConfiguration_example.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2019-01-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myRg", + "playbookConfigurationName": "myPlaybookConfigName" + }, + "responses": { + "204": { + } + } +} \ No newline at end of file diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json new file mode 100644 index 000000000000..b6dd11ae1dff --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2019-01-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myRg", + "playbookConfigurationName": "myPlaybookConfigName" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", + "name": "myPlaybookConfigName", + "type": "Microsoft.Security/playbookConfigurations", + "properties": { + "description": "Alerts auto dismiss", + "isEnabled": true, + "metadata": { + "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", + "createdBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72", + "lastUpdatedDateTimeUtc": "2019-03-28T08:43:54.5755094Z", + "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" + }, + "scopes": [ + "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a", + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + ], + "sources": [ + { + "eventSource": "AscAlerts", + "ruleSets": [ + { + "rules": [ + { + "propertyJPath": "AlertType", + "propertyType": "System.String", + "expectedValue": "customType", + "conditions": "EqualsIgnoreCase" + } + ] + } + ] + } + ], + "actions": [ + "https://triggerUri1.com", + "https://triggerUri2.com" + ] + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json new file mode 100644 index 000000000000..0b35e3a6d373 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2019-01-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "resourceGroupName": "myRg" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", + "name": "myPlaybookConfigName", + "type": "Microsoft.Security/playbookConfigurations", + "properties": { + "description": "Alerts auto dismiss", + "isEnabled": true, + "metadata": { + "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", + "createdBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72", + "lastUpdatedDateTimeUtc": "2019-03-28T08:43:54.5755094Z", + "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" + }, + "scopes": [ + "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a", + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + ], + "sources": [ + { + "eventSource": "AscAlerts", + "ruleSets": [ + { + "rules": [ + { + "propertyJPath": "AlertType", + "propertyType": "System.String", + "expectedValue": "customType", + "conditions": "EqualsIgnoreCase" + } + ] + } + ] + } + ], + "actions": [ + "https://triggerUri1.com", + "https://triggerUri2.com" + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json new file mode 100644 index 000000000000..8de12f3e96ce --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2019-01-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", + "name": "myPlaybookConfigurationName", + "type": "Microsoft.Security/playbookConfigurations", + "properties": { + "description": "Alerts auto dismiss", + "isEnabled": true, + "metadata": { + "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", + "createdBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72", + "lastUpdatedDateTimeUtc": "2019-03-28T08:43:54.5755094Z", + "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" + }, + "scopes": [ + "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a", + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + ], + "sources": [ + { + "eventSource": "AscAlerts", + "ruleSets": [ + { + "rules": [ + { + "propertyJPath": "AlertType", + "propertyType": "System.String", + "expectedValue": "customType", + "conditions": "EqualsIgnoreCase" + } + ] + } + ] + } + ], + "actions": [ + "https://triggerUri1.com", + "https://triggerUri2.com" + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json new file mode 100644 index 000000000000..8d8e653885ae --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2019-01-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "playbookConfigurationName": "myPlaybookConfigName", + "resourceGroupName": "myRg", + "PlaybookConfiguration": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", + "name": "myPlaybookConfigName", + "type": "Microsoft.Security/playbookConfigurations", + "properties": { + "description": "Alerts auto dismiss", + "isEnabled": true, + "scopes": [ + "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a", + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + ], + "sources": [ + { + "eventSource": "AscAlerts", + "ruleSets": [ + { + "rules": [ + { + "propertyJPath": "AlertType", + "propertyType": "System.String", + "expectedValue": "customType", + "conditions": "EqualsIgnoreCase" + } + ] + } + ] + } + ], + "actions": [ + "https://triggerUri1.com", + "https://triggerUri2.com" + ] + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", + "name": "myPlaybookConfigName", + "type": "Microsoft.Security/playbookConfigurations", + "properties": { + "description": "Alerts auto dismiss", + "isEnabled": true, + "metadata": { + "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", + "createdBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72", + "lastUpdatedDateTimeUtc": "2019-03-28T08:43:54.5755094Z", + "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" + }, + "scopes": [ + "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a", + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + ], + "sources": [ + { + "eventSource": "AscAlerts", + "ruleSets": [ + { + "rules": [ + { + "propertyJPath": "AlertType", + "propertyType": "System.String", + "expectedValue": "customType", + "conditions": "EqualsIgnoreCase" + } + ] + } + ] + } + ], + "actions": [ + "https://triggerUri1.com", + "https://triggerUri2.com" + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json new file mode 100644 index 000000000000..e6f4f6f7d4a8 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "api-version": "2019-01-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "playbookConfigurationName": "myPlaybookConfigName", + "resourceGroupName": "myRg", + "PlaybookConfiguration": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", + "name": "myPlaybookConfigName", + "type": "Microsoft.Security/playbookConfigurations", + "properties": { + "description": "Alerts auto dismiss", + "isEnabled": true, + "metadata": { + "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", + "createdBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72", + "lastUpdatedDateTimeUtc": "2019-03-28T08:43:54.5755094Z", + "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" + }, + "scopes": [ + "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a", + "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + ], + "sources": [ + { + "eventSource": "AscAlerts", + "ruleSets": [ + { + "rules": [ + { + "propertyJPath": "AlertType", + "propertyType": "System.String", + "expectedValue": "customType", + "conditions": "EqualsIgnoreCase" + } + ] + } + ] + } + ], + "actions": [ + "https://triggerUri1.com", + "https://triggerUri2.com" + ] + } + } + }, + "responses": { + "200": { + "body": { + "isValid": true, + "message": "" + } + } + } +} \ No newline at end of file diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json new file mode 100644 index 000000000000..bcba25641622 --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json @@ -0,0 +1,461 @@ +{ + "swagger": "2.0", + "info": { + "title": "Security Center", + "description": "API spec for Microsoft.Security (Azure Security Center) resource provider", + "version": "2019-01-01-preview" + }, + "host": "management.azure.com", + "schemes": [ "https" ], + "consumes": [ "application/json" ], + "produces": [ "application/json" ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Security/playbookConfigurations": { + "get": { + "x-ms-examples": { + "Get playbook configurations of subscription": { + "$ref": "./examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json" + } + }, + "tags": [ "PlaybookConfigurations" ], + "description": "Get all playbook configurations in a subscription.", + "operationId": "PlaybookConfigurations_ListBySubscription", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PlaybookConfigurationList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/playbookConfigurations": { + "get": { + "x-ms-examples": { + "Get playbook configurations of a single resource group": { + "$ref": "./examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json" + } + }, + "tags": [ "PlaybookConfigurations" ], + "description": "Get all playbook configurations in a resource group.", + "operationId": "PlaybookConfigurations_ListByResourceGroup", + "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/PlaybookConfigurationList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/playbookConfigurations/{playbookConfigurationName}": { + "get": { + "x-ms-examples": { + "Get a single playbook configuration details": { + "$ref": "./examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json" + } + }, + "tags": [ "PlaybookConfigurations" ], + "description": "Get the details of a playbook configuration.", + "operationId": "PlaybookConfigurations_GetByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/PlaybookConfigurationName" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PlaybookConfiguration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "put": { + "x-ms-examples": { + "Create or update a single playbook configuration": { + "$ref": "./examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json" + } + }, + "tags": [ "PlaybookConfigurations" ], + "description": "Create or update a playbook configuration. If a playbook configuration is already created and a subsequent create request is issued with different properties, the playbook configuration properties will be updated.", + "operationId": "PlaybookConfigurations_CreateOrUpdateByResourceGroup", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/PlaybookConfigurationName" + }, + { + "in":"body", + "name":"PlaybookConfiguration", + "description":"", + "schema":{ + "$ref": "#/definitions/PlaybookConfiguration" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PlaybookConfiguration" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/PlaybookConfiguration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, + "delete": { + "x-ms-examples": { + "Delete a single playbook configuration": { + "$ref": "./examples/PlaybookConfigurations/DeletePlaybookConfiguration_example.json" + } + }, + "tags": [ "PlaybookConfigurations" ], + "operationId": "PlaybookConfigurations_DeleteByResourceGroup", + "description": "Delete a playbook configuration.", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/PlaybookConfigurationName" + } + ], + "responses": { + "204": { + "description": "NoContent" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/playbookConfigurations/{playbookConfigurationName}/validate": { + "post": { + "x-ms-examples": { + "Validate the playbook configuration model before create or update": { + "$ref": "./examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json" + } + }, + "tags": [ "PlaybookConfigurations" ], + "description": "Validate the playbook configuration model before create or update. Any validation errors are returned to the client.", + "operationId": "PlaybookConfigurations_Validate", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/PlaybookConfigurationName" + }, + { + "in":"body", + "name":"PlaybookConfiguration", + "description":"", + "schema":{"$ref": "#/definitions/PlaybookConfiguration"} + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PlaybookConfigurationValidationStatus" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + } + } + }, + "definitions": { + "PlaybookConfigurationList": { + "description": "List of playbook configurations response.", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "description": "The list of playbook configurations under the given scope.", + "items": { + "$ref": "#/definitions/PlaybookConfiguration" + } + }, + "nextLink": { + "readOnly": true, + "type": "string", + "description": "The URI to fetch the next page." + } + } + }, + "PlaybookConfiguration": { + "type": "object", + "description": "The playbook configuration resource.", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Playbook configuration data", + "$ref": "#/definitions/PlaybookConfigurationProperties" + } + }, + "allOf": [ + { + "$ref": "../../../common/v1/types.json#/definitions/Resource" + } + ] + }, + "PlaybookConfigurationProperties": { + "type": "object", + "description": "The playbook configuration data.", + "properties": { + "description": { + "type": "string", + "description": "The playbook configuration description." + }, + "isEnabled": { + "type": "boolean", + "description": "Indicates whether the playbook configuration is enabled." + }, + "metadata": { + "type": "object", + "description": "The metadata of the playbook configuration resource.", + "$ref": "#/definitions/PlaybookConfigurationMetadata" + }, + "scopes": { + "type": "array", + "description": "A collection of the resources scopes on which the playbook configurations logic is applied.", + "items": { + "type": "string", + "description": "The resources scope." + } + }, + "sources": { + "type": "array", + "description": "A collection of the source event types which evaluate the playbook configuration set of rules.", + "items": { + "$ref": "#/definitions/PlaybookConfigurationSource" + } + }, + "actions": { + "type": "array", + "description": "A collection of the actions which are triggered upon true evaluation of the configured rule sets.", + "items": { + "$ref": "#/definitions/PlaybookConfigurationAction" + } + } + } + }, + "PlaybookConfigurationMetadata": { + "type": "object", + "description": "The metadata of the playbook configuration resource.", + "properties": { + "createdDateTimeUtc": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "The playbook configuration creation date." + }, + "createdBy": { + "readOnly": true, + "type": "string", + "description": "The AAD object id that created the playbook configuration." + }, + "lastUpdatedDateTimeUtc": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "The playbook configuration last updated date." + }, + "lastUpdatedBy": { + "readOnly": true, + "type": "string", + "description": "The AAD object id that last updated the playbook configuration." + } + } + }, + "PlaybookConfigurationSource": { + "type": "object", + "description": "The source event types which evaluate the playbook configuration set of rules. For example - security alerts and recommended tasks.", + "properties": { + "eventSource": { + "type": "string", + "description": "A valid event source type." + }, + "ruleSets": { + "type": "array", + "description": "A set of rules which evaluate upon event interception.", + "items": { + "$ref": "#/definitions/PlaybookConfigurationRuleSet" + } + } + } + }, + "PlaybookConfigurationAction": { + "type": "string", + "description": "The uri that should be triggered.", + "format": "uri" + }, + "PlaybookConfigurationRuleSet": { + "type": "object", + "description": "A rule set which evaluates all its rules upon an event interception.", + "properties": { + "rules": { + "type": "array", + "$ref": "#/definitions/PlaybookConfigurationTriggeringRule" + } + } + }, + "PlaybookConfigurationTriggeringRule": { + "type": "object", + "description": "A logic rule which evaluates upon event interception. The rule is configured by comparing the specified expected value, in an expected property within the event model, by the specified operator.", + "properties": { + "propertyJPath": { + "type": "string", + "description": "The JPath of the entity model property that should be checked." + }, + "propertyType": { + "type": "string", + "description": "The data type of the compared operands." + }, + "expectedValue": { + "type": "string", + "description": "The expected value." + }, + "conditions": { + "type": "string", + "description": "A valid comparer operator to use." + } + } + }, + "PlaybookConfigurationValidationStatus": { + "type": "object", + "description": "The playbook configuration model state property bag.", + "properties": { + "isValid": { + "type": "boolean", + "description": "Indicates whether the model is valid or not." + }, + "message": { + "type": "string", + "description": "The validation message." + } + } + } + }, + "parameters": { + "PlaybookConfigurationName": { + "name": "playbookConfigurationName", + "in": "path", + "required": true, + "type": "string", + "description": "The playbook Configuration name.", + "x-ms-parameter-location": "method" + } + } +} From 9e0ae57e54a38c1b6f0325aa121ef1887a1e531f Mon Sep 17 00:00:00 2001 From: Miri Date: Sun, 14 Apr 2019 16:44:36 +0300 Subject: [PATCH 02/10] fix according to PR comments + some spec changes introduce trackedResource entity --- ...ookConfigurationResourceGroup_example.json | 28 ++++-- ...okConfigurationsResourceGroup_example.json | 30 +++++-- ...ookConfigurationsSubscription_example.json | 30 +++++-- .../PutPlaybookConfiguration_example.json | 57 +++++++++--- ...ValidatePlaybookConfiguration_example.json | 31 +++++-- .../playbookConfigurations.json | 90 ++++++++++++------- .../resource-manager/common/v1/types.json | 44 +++++++++ 7 files changed, 236 insertions(+), 74 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json index b6dd11ae1dff..f78ae80a3640 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json @@ -11,6 +11,8 @@ "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", "name": "myPlaybookConfigName", "type": "Microsoft.Security/playbookConfigurations", + "location": "Central US", + "tags": {}, "properties": { "description": "Alerts auto dismiss", "isEnabled": true, @@ -21,8 +23,14 @@ "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" }, "scopes": [ - "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a", - "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + { + "description": "Some custom description", + "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + }, + { + "description": "Some custom description", + "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + } ], "sources": [ { @@ -31,10 +39,10 @@ { "rules": [ { - "propertyJPath": "AlertType", + "propertyJPath": "$.type", "propertyType": "System.String", "expectedValue": "customType", - "conditions": "EqualsIgnoreCase" + "operator": "EqualsIgnoreCase" } ] } @@ -42,8 +50,16 @@ } ], "actions": [ - "https://triggerUri1.com", - "https://triggerUri2.com" + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri1.com" + }, + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri2.com" + } ] } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json index 0b35e3a6d373..c38a57c6aaa8 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json @@ -12,6 +12,8 @@ "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", "name": "myPlaybookConfigName", "type": "Microsoft.Security/playbookConfigurations", + "location": "Central US", + "tags": {}, "properties": { "description": "Alerts auto dismiss", "isEnabled": true, @@ -22,8 +24,14 @@ "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" }, "scopes": [ - "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a", - "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + { + "description": "Some custom description", + "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + }, + { + "description": "Some custom description", + "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + } ], "sources": [ { @@ -32,10 +40,10 @@ { "rules": [ { - "propertyJPath": "AlertType", + "propertyJPath": "$.type", "propertyType": "System.String", "expectedValue": "customType", - "conditions": "EqualsIgnoreCase" + "operator": "EqualsIgnoreCase" } ] } @@ -43,8 +51,16 @@ } ], "actions": [ - "https://triggerUri1.com", - "https://triggerUri2.com" + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri1.com" + }, + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri2.com" + } ] } } @@ -52,4 +68,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json index 8de12f3e96ce..dac9ad269f9f 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json @@ -11,6 +11,8 @@ "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", "name": "myPlaybookConfigurationName", "type": "Microsoft.Security/playbookConfigurations", + "location": "Central US", + "tags": {}, "properties": { "description": "Alerts auto dismiss", "isEnabled": true, @@ -21,8 +23,14 @@ "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" }, "scopes": [ - "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a", - "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + { + "description": "Some custom description", + "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + }, + { + "description": "Some custom description", + "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + } ], "sources": [ { @@ -31,10 +39,10 @@ { "rules": [ { - "propertyJPath": "AlertType", + "propertyJPath": "$.type", "propertyType": "System.String", "expectedValue": "customType", - "conditions": "EqualsIgnoreCase" + "operator": "EqualsIgnoreCase" } ] } @@ -42,8 +50,16 @@ } ], "actions": [ - "https://triggerUri1.com", - "https://triggerUri2.com" + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri1.com" + }, + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri2.com" + } ] } } @@ -51,4 +67,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json index 8d8e653885ae..4b3b2b43ea18 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json @@ -8,12 +8,19 @@ "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", "name": "myPlaybookConfigName", "type": "Microsoft.Security/playbookConfigurations", + "tags": {}, "properties": { "description": "Alerts auto dismiss", "isEnabled": true, "scopes": [ - "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a", - "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + { + "description": "Some custom description", + "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + }, + { + "description": "Some custom description", + "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + } ], "sources": [ { @@ -22,10 +29,10 @@ { "rules": [ { - "propertyJPath": "AlertType", + "propertyJPath": "$.type", "propertyType": "System.String", "expectedValue": "customType", - "conditions": "EqualsIgnoreCase" + "operator": "EqualsIgnoreCase" } ] } @@ -33,8 +40,16 @@ } ], "actions": [ - "https://triggerUri1.com", - "https://triggerUri2.com" + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri1.com" + }, + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri2.com" + } ] } } @@ -47,6 +62,8 @@ "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", "name": "myPlaybookConfigName", "type": "Microsoft.Security/playbookConfigurations", + "location": "Central US", + "tags": {}, "properties": { "description": "Alerts auto dismiss", "isEnabled": true, @@ -57,8 +74,14 @@ "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" }, "scopes": [ - "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a", - "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + { + "description": "Some custom description", + "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + }, + { + "description": "Some custom description", + "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + } ], "sources": [ { @@ -67,10 +90,10 @@ { "rules": [ { - "propertyJPath": "AlertType", + "propertyJPath": "$.type", "propertyType": "System.String", "expectedValue": "customType", - "conditions": "EqualsIgnoreCase" + "operator": "EqualsIgnoreCase" } ] } @@ -78,8 +101,16 @@ } ], "actions": [ - "https://triggerUri1.com", - "https://triggerUri2.com" + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri1.com" + }, + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri2.com" + } ] } } @@ -87,4 +118,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json index e6f4f6f7d4a8..eff3ec4b8f76 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json @@ -7,7 +7,8 @@ "PlaybookConfiguration": { "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", "name": "myPlaybookConfigName", - "type": "Microsoft.Security/playbookConfigurations", + "type": "Microsoft.Security/playbookConfigurations", + "tags": {}, "properties": { "description": "Alerts auto dismiss", "isEnabled": true, @@ -18,8 +19,14 @@ "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" }, "scopes": [ - "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a", - "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + { + "description": "Some custom description", + "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + }, + { + "description": "Some custom description", + "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + } ], "sources": [ { @@ -28,10 +35,10 @@ { "rules": [ { - "propertyJPath": "AlertType", + "propertyJPath": "$.type", "propertyType": "System.String", "expectedValue": "customType", - "conditions": "EqualsIgnoreCase" + "operator": "EqualsIgnoreCase" } ] } @@ -39,8 +46,16 @@ } ], "actions": [ - "https://triggerUri1.com", - "https://triggerUri2.com" + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri1.com" + }, + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri2.com" + } ] } } @@ -53,4 +68,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json index bcba25641622..bfa7e61f2d5d 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json @@ -11,9 +11,7 @@ "produces": [ "application/json" ], "security": [ { - "azure_auth": [ - "user_impersonation" - ] + "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { @@ -37,7 +35,7 @@ }, "tags": [ "PlaybookConfigurations" ], "description": "Get all playbook configurations in a subscription.", - "operationId": "PlaybookConfigurations_ListBySubscription", + "operationId": "PlaybookConfigurations_List", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -108,7 +106,7 @@ }, "tags": [ "PlaybookConfigurations" ], "description": "Get the details of a playbook configuration.", - "operationId": "PlaybookConfigurations_GetByResourceGroup", + "operationId": "PlaybookConfigurations_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -146,7 +144,7 @@ }, "tags": [ "PlaybookConfigurations" ], "description": "Create or update a playbook configuration. If a playbook configuration is already created and a subsequent create request is issued with different properties, the playbook configuration properties will be updated.", - "operationId": "PlaybookConfigurations_CreateOrUpdateByResourceGroup", + "operationId": "PlaybookConfigurations_CreateOrUpdate", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" @@ -161,12 +159,7 @@ "$ref": "#/parameters/PlaybookConfigurationName" }, { - "in":"body", - "name":"PlaybookConfiguration", - "description":"", - "schema":{ - "$ref": "#/definitions/PlaybookConfiguration" - } + "$ref": "#/parameters/PlaybookConfigurationInBody" } ], "responses": { @@ -189,7 +182,7 @@ } } } - }, + }, "delete": { "x-ms-examples": { "Delete a single playbook configuration": { @@ -197,7 +190,7 @@ } }, "tags": [ "PlaybookConfigurations" ], - "operationId": "PlaybookConfigurations_DeleteByResourceGroup", + "operationId": "PlaybookConfigurations_Delete", "description": "Delete a playbook configuration.", "parameters": [ { @@ -250,10 +243,7 @@ "$ref": "#/parameters/PlaybookConfigurationName" }, { - "in":"body", - "name":"PlaybookConfiguration", - "description":"", - "schema":{"$ref": "#/definitions/PlaybookConfiguration"} + "$ref": "#/parameters/PlaybookConfigurationInBody" } ], "responses": { @@ -276,9 +266,7 @@ "definitions": { "PlaybookConfigurationList": { "description": "List of playbook configurations response.", - "required": [ - "value" - ], + "required": [ "value" ], "properties": { "value": { "type": "array", @@ -306,7 +294,7 @@ }, "allOf": [ { - "$ref": "../../../common/v1/types.json#/definitions/Resource" + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" } ] }, @@ -329,10 +317,9 @@ }, "scopes": { "type": "array", - "description": "A collection of the resources scopes on which the playbook configurations logic is applied.", + "description": "A collection of the subscription's resources scopes on which the playbook configurations logic is applied.", "items": { - "type": "string", - "description": "The resources scope." + "$ref": "#/definitions/PlaybookConfigurationScope" } }, "sources": { @@ -344,7 +331,7 @@ }, "actions": { "type": "array", - "description": "A collection of the actions which are triggered upon true evaluation of the configured rule sets.", + "description": "A collection of the actions which are triggered if all the configured rule set evaluation is true.", "items": { "$ref": "#/definitions/PlaybookConfigurationAction" } @@ -364,7 +351,7 @@ "createdBy": { "readOnly": true, "type": "string", - "description": "The AAD object id that created the playbook configuration." + "description": "The AAD object ID of the entity that created the playbook configuration." }, "lastUpdatedDateTimeUtc": { "readOnly": true, @@ -375,7 +362,7 @@ "lastUpdatedBy": { "readOnly": true, "type": "string", - "description": "The AAD object id that last updated the playbook configuration." + "description": "The AAD object ID of the entity that last updated the playbook configuration." } } }, @@ -396,10 +383,38 @@ } } }, + "PlaybookConfigurationScope": { + "type": "object", + "description": "The subscription's resources scope", + "properties": { + "description": { + "type": "string", + "description": "The resources scope description." + }, + "scopePath": { + "type": "string", + "description": "The resources scope path." + } + } + }, "PlaybookConfigurationAction": { - "type": "string", - "description": "The uri that should be triggered.", - "format": "uri" + "type": "object", + "description": "The action that should be triggered.", + "properties": { + "resourceId": { + "type": "string", + "description": "The triggered resource id." + }, + "resourceProviderNamespace": { + "type": "string", + "description": "The resource provider name." + }, + "uri": { + "type": "string", + "description": "The uri that should be triggered by an Http GET request.", + "format": "uri" + } + } }, "PlaybookConfigurationRuleSet": { "type": "object", @@ -427,9 +442,9 @@ "type": "string", "description": "The expected value." }, - "conditions": { + "operator": { "type": "string", - "description": "A valid comparer operator to use." + "description": "A valid comparer operator to use." } } }, @@ -456,6 +471,15 @@ "type": "string", "description": "The playbook Configuration name.", "x-ms-parameter-location": "method" + }, + "PlaybookConfigurationInBody": { + "name": "PlaybookConfiguration", + "in": "body", + "required": true, + "description": "The playbook configuration resource", + "schema": { + "$ref": "#/definitions/PlaybookConfiguration" + } } } } diff --git a/specification/security/resource-manager/common/v1/types.json b/specification/security/resource-manager/common/v1/types.json index e8b7ace59b60..66a8fef62db5 100644 --- a/specification/security/resource-manager/common/v1/types.json +++ b/specification/security/resource-manager/common/v1/types.json @@ -57,6 +57,50 @@ }, "x-ms-azure-resource": true }, + "TrackedResource": { + "type": "object", + "description": "Describes an Azure tracked resource.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + }, + { + "$ref": "#/definitions/Location" + }, + { + "$ref": "#/definitions/Kind" + }, + { + "$ref": "#/definitions/ETag" + }, + { + "$ref": "#/definitions/Tags" + } + ] + }, + "ETag": { + "type": "object", + "description": "Entity tag is used for comparing two or more entities from the same requested resource. ETags may be returned for individual resources, and then sent via If-Match / If-None-Match headers for concurrency control. ", + "properties": { + "etag": { + "type": "string", + "description": "Entity tag is used for comparing two or more entities from the same requested resource. ETags may be returned for individual resources, and then sent via If-Match / If-None-Match headers for concurrency control. " + } + } + }, + "Tags": { + "type": "object", + "description": "A list of key value pairs that describe the resource.", + "properties": { + "tags": { + "type": "object", + "description": "A list of key value pairs that describe the resource.", + "additionalProperties": { + "type": "string" + } + } + } + }, "Kind": { "type": "object", "description": "Describes an Azure resource with kind", From 29ac581abb49f2ed63c976b946eb19e3ce59d405 Mon Sep 17 00:00:00 2001 From: Miri Date: Sun, 14 Apr 2019 17:15:31 +0300 Subject: [PATCH 03/10] add propertyType and operator enums --- .../playbookConfigurations.json | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json index bfa7e61f2d5d..9b560c99cb31 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json @@ -436,7 +436,18 @@ }, "propertyType": { "type": "string", - "description": "The data type of the compared operands." + "description": "The data type of the compared operands.", + "enum": [ + "System.String", + "System.Boolean", + "System.Byte", + "System.Int16", + "System.Int32", + "System.Single", + "System.Double", + "System.Char" + + ] }, "expectedValue": { "type": "string", @@ -444,7 +455,20 @@ }, "operator": { "type": "string", - "description": "A valid comparer operator to use." + "description": "A valid comparer operator to use.", + "enum": [ + "Equals", + "EqualsIgnoreCase", + "GreaterThan", + "GreaterThanOrEqualTo", + "LesserThan", + "LesserThanOrEqualTo", + "NotEquals", + "NotEqualsIgnoreCase", + "Contains", + "StartsWith", + "EndsWith" + ] } } }, From bfde5d115adf6e33c3fc19dffe0f89fa9d615976 Mon Sep 17 00:00:00 2001 From: Miri Date: Sun, 21 Apr 2019 11:28:15 +0300 Subject: [PATCH 04/10] add 201 response to x-ms-example fix the PlaybookConfigurationRuleSet definition add a new reference to the readme.md file --- .../PutPlaybookConfiguration_example.json | 62 +++++++++++++++++++ .../playbookConfigurations.json | 4 +- .../security/resource-manager/readme.md | 2 + 3 files changed, 67 insertions(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json index 4b3b2b43ea18..326d10cb7a82 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json @@ -116,6 +116,68 @@ } ] } + }, + "201": { + "body": { + "value": [ + { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", + "name": "myPlaybookConfigName", + "type": "Microsoft.Security/playbookConfigurations", + "location": "Central US", + "tags": {}, + "properties": { + "description": "Alerts auto dismiss", + "isEnabled": true, + "metadata": { + "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", + "createdBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72", + "lastUpdatedDateTimeUtc": "2019-03-28T08:43:54.5755094Z", + "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" + }, + "scopes": [ + { + "description": "Some custom description", + "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + }, + { + "description": "Some custom description", + "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + } + ], + "sources": [ + { + "eventSource": "AscAlerts", + "ruleSets": [ + { + "rules": [ + { + "propertyJPath": "$.type", + "propertyType": "System.String", + "expectedValue": "customType", + "operator": "EqualsIgnoreCase" + } + ] + } + ] + } + ], + "actions": [ + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri1.com" + }, + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri2.com" + } + ] + } + } + ] + } } } } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json index 9b560c99cb31..6ac3e813aa42 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json @@ -422,7 +422,9 @@ "properties": { "rules": { "type": "array", - "$ref": "#/definitions/PlaybookConfigurationTriggeringRule" + "items": { + "$ref": "#/definitions/PlaybookConfigurationTriggeringRule" + } } } }, diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 4fa9d76a500f..1589b4e10f7d 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -51,6 +51,7 @@ These settings apply only when `--tag=package-composite-v1` is specified on the ```yaml $(tag) == 'package-composite-v1' input-file: +- Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json - Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json - Microsoft.Security/preview/2017-08-01-preview/pricings.json - Microsoft.Security/preview/2017-08-01-preview/securityContacts.json @@ -83,6 +84,7 @@ These settings apply only when `--tag=package-composite-v2` is specified on the ```yaml $(tag) == 'package-composite-v2' input-file: +- Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json - Microsoft.Security/preview/2019-01-01-preview/regulatoryCompliance.json - Microsoft.Security/stable/2018-06-01/pricings.json - Microsoft.Security/preview/2017-08-01-preview/securityContacts.json From e7c79f817e7c2ebb14099d71e079394fe2083a52 Mon Sep 17 00:00:00 2001 From: Miri Date: Sun, 21 Apr 2019 11:56:31 +0300 Subject: [PATCH 05/10] remove the unnecessary "value" from the Put example response --- .../PutPlaybookConfiguration_example.json | 196 +++++++++--------- 1 file changed, 94 insertions(+), 102 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json index 326d10cb7a82..a7bf597dedf3 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json @@ -57,126 +57,118 @@ "responses": { "200": { "body": { - "value": [ - { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", - "name": "myPlaybookConfigName", - "type": "Microsoft.Security/playbookConfigurations", - "location": "Central US", - "tags": {}, - "properties": { - "description": "Alerts auto dismiss", - "isEnabled": true, - "metadata": { - "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", - "createdBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72", - "lastUpdatedDateTimeUtc": "2019-03-28T08:43:54.5755094Z", - "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" - }, - "scopes": [ - { - "description": "Some custom description", - "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" - }, - { - "description": "Some custom description", - "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" - } - ], - "sources": [ + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", + "name": "myPlaybookConfigName", + "type": "Microsoft.Security/playbookConfigurations", + "location": "Central US", + "tags": {}, + "properties": { + "description": "Alerts auto dismiss", + "isEnabled": true, + "metadata": { + "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", + "createdBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72", + "lastUpdatedDateTimeUtc": "2019-03-28T08:43:54.5755094Z", + "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" + }, + "scopes": [ + { + "description": "Some custom description", + "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + }, + { + "description": "Some custom description", + "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + } + ], + "sources": [ + { + "eventSource": "AscAlerts", + "ruleSets": [ { - "eventSource": "AscAlerts", - "ruleSets": [ + "rules": [ { - "rules": [ - { - "propertyJPath": "$.type", - "propertyType": "System.String", - "expectedValue": "customType", - "operator": "EqualsIgnoreCase" - } - ] + "propertyJPath": "$.type", + "propertyType": "System.String", + "expectedValue": "customType", + "operator": "EqualsIgnoreCase" } ] } - ], - "actions": [ - { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri1.com" - }, - { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri2.com" - } ] } - } - ] + ], + "actions": [ + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri1.com" + }, + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri2.com" + } + ] + } } }, "201": { "body": { - "value": [ - { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", - "name": "myPlaybookConfigName", - "type": "Microsoft.Security/playbookConfigurations", - "location": "Central US", - "tags": {}, - "properties": { - "description": "Alerts auto dismiss", - "isEnabled": true, - "metadata": { - "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", - "createdBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72", - "lastUpdatedDateTimeUtc": "2019-03-28T08:43:54.5755094Z", - "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" - }, - "scopes": [ - { - "description": "Some custom description", - "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" - }, - { - "description": "Some custom description", - "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" - } - ], - "sources": [ + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", + "name": "myPlaybookConfigName", + "type": "Microsoft.Security/playbookConfigurations", + "location": "Central US", + "tags": {}, + "properties": { + "description": "Alerts auto dismiss", + "isEnabled": true, + "metadata": { + "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", + "createdBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72", + "lastUpdatedDateTimeUtc": "2019-03-28T08:43:54.5755094Z", + "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" + }, + "scopes": [ + { + "description": "Some custom description", + "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + }, + { + "description": "Some custom description", + "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + } + ], + "sources": [ + { + "eventSource": "AscAlerts", + "ruleSets": [ { - "eventSource": "AscAlerts", - "ruleSets": [ + "rules": [ { - "rules": [ - { - "propertyJPath": "$.type", - "propertyType": "System.String", - "expectedValue": "customType", - "operator": "EqualsIgnoreCase" - } - ] + "propertyJPath": "$.type", + "propertyType": "System.String", + "expectedValue": "customType", + "operator": "EqualsIgnoreCase" } ] } - ], - "actions": [ - { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri1.com" - }, - { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri2.com" - } ] } - } - ] + ], + "actions": [ + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri1.com" + }, + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri2.com" + } + ] + } } } } From ca68b115a50916a4650d9178057af574a4e6ba69 Mon Sep 17 00:00:00 2001 From: David Fishman Date: Tue, 7 May 2019 20:46:40 +0300 Subject: [PATCH 06/10] Updating with latest PR --- .../PatchPlaybookConfiguration_example.json | 120 ++++++++++++++++++ .../playbookConfigurations.json | 60 +++++++-- 2 files changed, 171 insertions(+), 9 deletions(-) create mode 100644 specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PatchPlaybookConfiguration_example.json diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PatchPlaybookConfiguration_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PatchPlaybookConfiguration_example.json new file mode 100644 index 000000000000..b0de9627b44a --- /dev/null +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PatchPlaybookConfiguration_example.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "api-version": "2019-01-01-preview", + "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", + "playbookConfigurationName": "myPlaybookConfigName", + "resourceGroupName": "myRg", + "PlaybookConfiguration": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", + "name": "myPlaybookConfigName", + "type": "Microsoft.Security/playbookConfigurations", + "tags": {}, + "properties": { + "description": "Alerts auto dismiss", + "isEnabled": true, + "scopes": [ + { + "description": "Some custom description", + "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + }, + { + "description": "Some custom description", + "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + } + ], + "sources": [ + { + "eventSource": "AscAlerts", + "ruleSets": [ + { + "rules": [ + { + "propertyJPath": "$.type", + "propertyType": "System.String", + "expectedValue": "customType", + "operator": "EqualsIgnoreCase" + } + ] + } + ] + } + ], + "actions": [ + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri1.com" + }, + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri2.com" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", + "name": "myPlaybookConfigName", + "type": "Microsoft.Security/playbookConfigurations", + "location": "Central US", + "tags": + { + "ScenarioName" : "ExampleScenario" + }, + "properties": { + "description": "Alerts auto dismiss", + "isEnabled": true, + "metadata": { + "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", + "createdBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72", + "lastUpdatedDateTimeUtc": "2019-03-28T08:43:54.5755094Z", + "lastUpdatedBy": "2c429ed8-089f-42aa-9bb9-92312b8c9f72" + }, + "scopes": [ + { + "description": "Some custom description", + "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + }, + { + "description": "Some custom description", + "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + } + ], + "sources": [ + { + "eventSource": "AscAlerts", + "ruleSets": [ + { + "rules": [ + { + "propertyJPath": "$.type", + "propertyType": "System.String", + "expectedValue": "customType", + "operator": "EqualsIgnoreCase" + } + ] + } + ] + } + ], + "actions": [ + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri1.com" + }, + { + "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "resourceProviderNamespace": "Microsoft.Logic", + "uri": "https://triggerUri2.com" + } + ] + } + } + } + } +} diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json index 6ac3e813aa42..1a0038e2886f 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json @@ -57,6 +57,9 @@ "$ref": "../../../common/v1/types.json#/definitions/CloudError" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -94,6 +97,9 @@ "$ref": "../../../common/v1/types.json#/definitions/CloudError" } } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -183,6 +189,47 @@ } } }, + "patch": { + "x-ms-examples": { + "Create or update a single playbook configuration": { + "$ref": "./examples/PlaybookConfigurations/PatchPlaybookConfiguration_example.json" + } + }, + "tags": [ "PlaybookConfigurations" ], + "description": "Patch an existing playbook configuration. Supports only Tags", + "operationId": "PlaybookConfigurations_Patch", + "parameters": [ + { + "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" + }, + { + "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupName" + }, + { + "$ref": "#/parameters/PlaybookConfigurationName" + }, + { + "$ref": "#/parameters/PlaybookConfigurationInBody" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PlaybookConfiguration" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../common/v1/types.json#/definitions/CloudError" + } + } + } + }, "delete": { "x-ms-examples": { "Delete a single playbook configuration": { @@ -440,15 +487,10 @@ "type": "string", "description": "The data type of the compared operands.", "enum": [ - "System.String", - "System.Boolean", - "System.Byte", - "System.Int16", - "System.Int32", - "System.Single", - "System.Double", - "System.Char" - + "string", + "integer", + "number", + "boolean" ] }, "expectedValue": { From 837b66de09e85e45f2c98080cb8c8262fa787d01 Mon Sep 17 00:00:00 2001 From: David Fishman Date: Sun, 12 May 2019 12:39:05 +0300 Subject: [PATCH 07/10] Fixing Example files --- ...bookConfigurationResourceGroup_example.json | 6 +++--- ...ookConfigurationsResourceGroup_example.json | 6 +++--- ...bookConfigurationsSubscription_example.json | 6 +++--- .../PatchPlaybookConfiguration_example.json | 12 ++++++------ .../PutPlaybookConfiguration_example.json | 18 +++++++++--------- .../ValidatePlaybookConfiguration_example.json | 6 +++--- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json index f78ae80a3640..b7cdde19092b 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json @@ -39,9 +39,9 @@ { "rules": [ { - "propertyJPath": "$.type", - "propertyType": "System.String", - "expectedValue": "customType", + "propertyJPath": "$.Entity.AlertType", + "propertyType": "string", + "expectedValue": "customAlert", "operator": "EqualsIgnoreCase" } ] diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json index c38a57c6aaa8..7dd12ed9cfa2 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json @@ -40,9 +40,9 @@ { "rules": [ { - "propertyJPath": "$.type", - "propertyType": "System.String", - "expectedValue": "customType", + "propertyJPath": "$.Entity.AlertType", + "propertyType": "string", + "expectedValue": "customAlert", "operator": "EqualsIgnoreCase" } ] diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json index dac9ad269f9f..c4f795858907 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json @@ -39,9 +39,9 @@ { "rules": [ { - "propertyJPath": "$.type", - "propertyType": "System.String", - "expectedValue": "customType", + "propertyJPath": "$.Entity.AlertType", + "propertyType": "string", + "expectedValue": "customAlert", "operator": "EqualsIgnoreCase" } ] diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PatchPlaybookConfiguration_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PatchPlaybookConfiguration_example.json index b0de9627b44a..8a39add1e9e0 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PatchPlaybookConfiguration_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PatchPlaybookConfiguration_example.json @@ -29,9 +29,9 @@ { "rules": [ { - "propertyJPath": "$.type", - "propertyType": "System.String", - "expectedValue": "customType", + "propertyJPath": "$.Entity.AlertType", + "propertyType": "string", + "expectedValue": "customAlert", "operator": "EqualsIgnoreCase" } ] @@ -91,9 +91,9 @@ { "rules": [ { - "propertyJPath": "$.type", - "propertyType": "System.String", - "expectedValue": "customType", + "propertyJPath": "$.Entity.AlertType", + "propertyType": "string", + "expectedValue": "customAlert", "operator": "EqualsIgnoreCase" } ] diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json index a7bf597dedf3..e85dc21e9043 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json @@ -29,9 +29,9 @@ { "rules": [ { - "propertyJPath": "$.type", - "propertyType": "System.String", - "expectedValue": "customType", + "propertyJPath": "$.Entity.AlertType", + "propertyType": "string", + "expectedValue": "customAlert", "operator": "EqualsIgnoreCase" } ] @@ -88,9 +88,9 @@ { "rules": [ { - "propertyJPath": "$.type", - "propertyType": "System.String", - "expectedValue": "customType", + "propertyJPath": "$.Entity.AlertType", + "propertyType": "string", + "expectedValue": "customAlert", "operator": "EqualsIgnoreCase" } ] @@ -146,9 +146,9 @@ { "rules": [ { - "propertyJPath": "$.type", - "propertyType": "System.String", - "expectedValue": "customType", + "propertyJPath": "$.Entity.AlertType", + "propertyType": "string", + "expectedValue": "customAlert", "operator": "EqualsIgnoreCase" } ] diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json index eff3ec4b8f76..ead7d56ce57a 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json @@ -35,9 +35,9 @@ { "rules": [ { - "propertyJPath": "$.type", - "propertyType": "System.String", - "expectedValue": "customType", + "propertyJPath": "$.Entity.AlertType", + "propertyType": "string", + "expectedValue": "customAlert", "operator": "EqualsIgnoreCase" } ] From a08ee838f160b28174a1a20c01367b8f67b141bb Mon Sep 17 00:00:00 2001 From: David Fishman Date: Mon, 13 May 2019 08:41:05 +0300 Subject: [PATCH 08/10] Adding descriminator and updating examples --- ...ookConfigurationResourceGroup_example.json | 38 +++---- ...okConfigurationsResourceGroup_example.json | 36 +++--- ...ookConfigurationsSubscription_example.json | 34 +++--- .../PatchPlaybookConfiguration_example.json | 78 ++++++------- .../PutPlaybookConfiguration_example.json | 103 +++++++++--------- ...ValidatePlaybookConfiguration_example.json | 41 +++---- .../playbookConfigurations.json | 90 ++++++++------- 7 files changed, 216 insertions(+), 204 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json index b7cdde19092b..757a31db78f0 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json @@ -1,20 +1,20 @@ { "parameters": { "api-version": "2019-01-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "resourceGroupName": "myRg", - "playbookConfigurationName": "myPlaybookConfigName" + "subscriptionId": "e4272367-5645-4c4e-9c67-3b74b59a6982", + "resourceGroupName": "exampleResourceGroup", + "playbookConfigurationName": "examplePlaybookConfiguration" }, "responses": { "200": { "body": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", - "name": "myPlaybookConfigName", + "id": "/subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/playbookConfigurations/examplePlaybookConfiguration", + "name": "examplePlaybookConfiguration", "type": "Microsoft.Security/playbookConfigurations", "location": "Central US", "tags": {}, "properties": { - "description": "Alerts auto dismiss", + "description": "An example of a playbook configuration that triggers two LogicApp resources (myTest1 and myTest2) on any security assessment of type customAssessment", "isEnabled": true, "metadata": { "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", @@ -24,24 +24,24 @@ }, "scopes": [ { - "description": "Some custom description", - "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + "description": "A description that helps to identify this scope - for example: security assessments that relate to the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26" }, { - "description": "Some custom description", - "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + "description": "A description that help to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/myResourceGroup" } ], "sources": [ { - "eventSource": "AscAlerts", + "eventSource": "AscAssessments", "ruleSets": [ { "rules": [ { - "propertyJPath": "$.Entity.AlertType", + "propertyJPath": "$.Entity.AssessmentType", "propertyType": "string", - "expectedValue": "customAlert", + "expectedValue": "customAssessment", "operator": "EqualsIgnoreCase" } ] @@ -51,14 +51,14 @@ ], "actions": [ { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri1.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "actionType": "LogicApp", + "uri": "(This value contains a secret and will not be retrieved)" }, { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri2.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "actionType": "LogicApp", + "uri": "(This value contains a secret and will not be retrieved)" } ] } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json index 7dd12ed9cfa2..2c5e2c45cdba 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json @@ -1,21 +1,21 @@ { "parameters": { "api-version": "2019-01-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "resourceGroupName": "myRg" + "subscriptionId": "e4272367-5645-4c4e-9c67-3b74b59a6982", + "resourceGroupName": "exampleResourceGroup" }, "responses": { "200": { "body": { "value": [ { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", - "name": "myPlaybookConfigName", + "id": "/subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/playbookConfigurations/examplePlaybookConfiguration", + "name": "examplePlaybookConfiguration", "type": "Microsoft.Security/playbookConfigurations", "location": "Central US", "tags": {}, "properties": { - "description": "Alerts auto dismiss", + "description": "An example of a playbook configuration that triggers two LogicApp resources (myTest1 and myTest2) on any security assessment of type customAssessment", "isEnabled": true, "metadata": { "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", @@ -25,24 +25,24 @@ }, "scopes": [ { - "description": "Some custom description", - "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + "description": "A description that helps to identify this scope - for example: security assessments that relate to the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26" }, { - "description": "Some custom description", - "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + "description": "A description that help to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/myResourceGroup" } ], "sources": [ { - "eventSource": "AscAlerts", + "eventSource": "AscAssessments", "ruleSets": [ { "rules": [ { - "propertyJPath": "$.Entity.AlertType", + "propertyJPath": "$.Entity.AssessmentType", "propertyType": "string", - "expectedValue": "customAlert", + "expectedValue": "customAssessment", "operator": "EqualsIgnoreCase" } ] @@ -52,14 +52,14 @@ ], "actions": [ { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri1.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "actionType": "LogicApp", + "uri": "https://exampleTriggerUri1.com" }, { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri2.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "actionType": "LogicApp", + "uri": "https://exampleTriggerUri2.com" } ] } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json index c4f795858907..dc5ea975c16a 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json @@ -1,20 +1,20 @@ { "parameters": { "api-version": "2019-01-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23" + "subscriptionId": "e4272367-5645-4c4e-9c67-3b74b59a6982" }, "responses": { "200": { "body": { "value": [ { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", - "name": "myPlaybookConfigurationName", + "id": "/subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/playbookConfigurations/examplePlaybookConfiguration", + "name": "examplePlaybookConfiguration", "type": "Microsoft.Security/playbookConfigurations", "location": "Central US", "tags": {}, "properties": { - "description": "Alerts auto dismiss", + "description": "An example of a playbook configuration that triggers two LogicApp resources (myTest1 and myTest2) on any security assessment of type customAssessment", "isEnabled": true, "metadata": { "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", @@ -24,24 +24,24 @@ }, "scopes": [ { - "description": "Some custom description", - "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + "description": "A description that helps to identify this scope - for example: security assessments that relate to the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26" }, { - "description": "Some custom description", - "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + "description": "A description that help to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/myResourceGroup" } ], "sources": [ { - "eventSource": "AscAlerts", + "eventSource": "AscAssessments", "ruleSets": [ { "rules": [ { - "propertyJPath": "$.Entity.AlertType", + "propertyJPath": "$.Entity.AssessmentType", "propertyType": "string", - "expectedValue": "customAlert", + "expectedValue": "customAssessment", "operator": "EqualsIgnoreCase" } ] @@ -51,14 +51,14 @@ ], "actions": [ { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri1.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "actionType": "LogicApp", + "uri": "https://exampleTriggerUri1.com" }, { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri2.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "actionType": "LogicApp", + "uri": "https://exampleTriggerUri2.com" } ] } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PatchPlaybookConfiguration_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PatchPlaybookConfiguration_example.json index 8a39add1e9e0..d30f3dddbe23 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PatchPlaybookConfiguration_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PatchPlaybookConfiguration_example.json @@ -1,37 +1,40 @@ { "parameters": { "api-version": "2019-01-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "playbookConfigurationName": "myPlaybookConfigName", - "resourceGroupName": "myRg", + "subscriptionId": "e4272367-5645-4c4e-9c67-3b74b59a6982", + "playbookConfigurationName": "examplePlaybookConfiguration", + "resourceGroupName": "exampleResourceGroup", "PlaybookConfiguration": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", - "name": "myPlaybookConfigName", + "id": "/subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/playbookConfigurations/examplePlaybookConfiguration", + "name": "examplePlaybookConfiguration", "type": "Microsoft.Security/playbookConfigurations", - "tags": {}, + "location": "Central US", + "tags": { + "ScenarioName" : "ExampleScenario" + }, "properties": { - "description": "Alerts auto dismiss", + "description": "An example of a playbook configuration that triggers two LogicApp resources (myTest1 and myTest2) on any security assessment of type customAssessment", "isEnabled": true, "scopes": [ { - "description": "Some custom description", - "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + "description": "A description that helps to identify this scope - for example: security assessments that relate to the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26" }, { - "description": "Some custom description", - "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + "description": "A description that help to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/myResourceGroup" } ], "sources": [ { - "eventSource": "AscAlerts", + "eventSource": "AscAssessments", "ruleSets": [ { "rules": [ { - "propertyJPath": "$.Entity.AlertType", + "propertyJPath": "$.Entity.AssessmentType", "propertyType": "string", - "expectedValue": "customAlert", + "expectedValue": "customAssessment", "operator": "EqualsIgnoreCase" } ] @@ -41,14 +44,14 @@ ], "actions": [ { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri1.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "actionType": "LogicApp", + "uri": "https://exampleTriggerUri1.com" }, { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri2.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "actionType": "LogicApp", + "uri": "https://exampleTriggerUri2.com" } ] } @@ -57,16 +60,15 @@ "responses": { "200": { "body": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", - "name": "myPlaybookConfigName", + "id": "/subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/playbookConfigurations/examplePlaybookConfiguration", + "name": "examplePlaybookConfiguration", "type": "Microsoft.Security/playbookConfigurations", "location": "Central US", - "tags": - { + "tags": { "ScenarioName" : "ExampleScenario" }, "properties": { - "description": "Alerts auto dismiss", + "description": "An example of a playbook configuration that triggers two LogicApp resources (myTest1 and myTest2) on any security assessment of type customAssessment", "isEnabled": true, "metadata": { "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", @@ -76,24 +78,24 @@ }, "scopes": [ { - "description": "Some custom description", - "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + "description": "A description that helps to identify this scope - for example: security assessments that relate to the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26" }, { - "description": "Some custom description", - "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + "description": "A description that help to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/myResourceGroup" } ], "sources": [ { - "eventSource": "AscAlerts", + "eventSource": "AscAssessments", "ruleSets": [ { "rules": [ { - "propertyJPath": "$.Entity.AlertType", + "propertyJPath": "$.Entity.AssessmentType", "propertyType": "string", - "expectedValue": "customAlert", + "expectedValue": "customAssessment", "operator": "EqualsIgnoreCase" } ] @@ -103,14 +105,14 @@ ], "actions": [ { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri1.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "actionType": "LogicApp", + "uri": "(This value contains a secret and will not be retrieved)" }, { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri2.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "actionType": "LogicApp", + "uri": "(This value contains a secret and will not be retrieved)" } ] } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json index e85dc21e9043..f8d1962cac63 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json @@ -1,37 +1,38 @@ { "parameters": { "api-version": "2019-01-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "playbookConfigurationName": "myPlaybookConfigName", - "resourceGroupName": "myRg", + "subscriptionId": "e4272367-5645-4c4e-9c67-3b74b59a6982", + "playbookConfigurationName": "examplePlaybookConfiguration", + "resourceGroupName": "exampleResourceGroup", "PlaybookConfiguration": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", - "name": "myPlaybookConfigName", + "id": "/subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/playbookConfigurations/examplePlaybookConfiguration", + "name": "examplePlaybookConfiguration", "type": "Microsoft.Security/playbookConfigurations", + "location": "Central US", "tags": {}, "properties": { - "description": "Alerts auto dismiss", + "description": "An example of a playbook configuration that triggers two LogicApp resources (myTest1 and myTest2) on any security assessment of type customAssessment", "isEnabled": true, "scopes": [ { - "description": "Some custom description", - "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + "description": "A description that helps to identify this scope - for example: security assessments that relate to the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26" }, { - "description": "Some custom description", - "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + "description": "A description that help to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/myResourceGroup" } ], "sources": [ { - "eventSource": "AscAlerts", + "eventSource": "AscAssessments", "ruleSets": [ { "rules": [ { - "propertyJPath": "$.Entity.AlertType", + "propertyJPath": "$.Entity.AssessmentType", "propertyType": "string", - "expectedValue": "customAlert", + "expectedValue": "customAssessment", "operator": "EqualsIgnoreCase" } ] @@ -41,14 +42,14 @@ ], "actions": [ { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri1.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "actionType": "LogicApp", + "uri": "https://exampleTriggerUri1.com" }, { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri2.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "actionType": "LogicApp", + "uri": "https://exampleTriggerUri2.com" } ] } @@ -57,13 +58,13 @@ "responses": { "200": { "body": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", - "name": "myPlaybookConfigName", + "id": "/subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/playbookConfigurations/examplePlaybookConfiguration", + "name": "examplePlaybookConfiguration", "type": "Microsoft.Security/playbookConfigurations", "location": "Central US", "tags": {}, "properties": { - "description": "Alerts auto dismiss", + "description": "An example of a playbook configuration that triggers two LogicApp resources (myTest1 and myTest2) on any security assessment of type customAssessment", "isEnabled": true, "metadata": { "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", @@ -73,24 +74,24 @@ }, "scopes": [ { - "description": "Some custom description", - "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + "description": "A description that helps to identify this scope - for example: security assessments that relate to the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26" }, { - "description": "Some custom description", - "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + "description": "A description that help to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/myResourceGroup" } ], "sources": [ { - "eventSource": "AscAlerts", + "eventSource": "AscAssessments", "ruleSets": [ { "rules": [ { - "propertyJPath": "$.Entity.AlertType", + "propertyJPath": "$.Entity.AssessmentType", "propertyType": "string", - "expectedValue": "customAlert", + "expectedValue": "customAssessment", "operator": "EqualsIgnoreCase" } ] @@ -100,14 +101,14 @@ ], "actions": [ { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri1.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "actionType": "LogicApp", + "uri": "(This value contains a secret and will not be retrieved)" }, { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri2.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "actionType": "LogicApp", + "uri": "(This value contains a secret and will not be retrieved)" } ] } @@ -115,13 +116,13 @@ }, "201": { "body": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", - "name": "myPlaybookConfigName", + "id": "/subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/playbookConfigurations/examplePlaybookConfiguration", + "name": "examplePlaybookConfiguration", "type": "Microsoft.Security/playbookConfigurations", "location": "Central US", "tags": {}, "properties": { - "description": "Alerts auto dismiss", + "description": "An example of a playbook configuration that triggers two LogicApp resources (myTest1 and myTest2) on any security assessment of type customAssessment", "isEnabled": true, "metadata": { "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", @@ -131,24 +132,24 @@ }, "scopes": [ { - "description": "Some custom description", - "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + "description": "A description that helps to identify this scope - for example: security assessments that relate to the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26" }, { - "description": "Some custom description", - "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + "description": "A description that help to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/myResourceGroup" } ], "sources": [ { - "eventSource": "AscAlerts", + "eventSource": "AscAssessments", "ruleSets": [ { "rules": [ { - "propertyJPath": "$.Entity.AlertType", + "propertyJPath": "$.Entity.AssessmentType", "propertyType": "string", - "expectedValue": "customAlert", + "expectedValue": "customAssessment", "operator": "EqualsIgnoreCase" } ] @@ -158,14 +159,14 @@ ], "actions": [ { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri1.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "actionType": "LogicApp", + "uri": "(This value contains a secret and will not be retrieved)" }, { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri2.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "actionType": "LogicApp", + "uri": "(This value contains a secret and will not be retrieved)" } ] } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json index ead7d56ce57a..2aa89b2228bf 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json @@ -1,16 +1,17 @@ { "parameters": { "api-version": "2019-01-01-preview", - "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23", - "playbookConfigurationName": "myPlaybookConfigName", - "resourceGroupName": "myRg", + "subscriptionId": "e4272367-5645-4c4e-9c67-3b74b59a6982", + "playbookConfigurationName": "examplePlaybookConfiguration", + "resourceGroupName": "exampleResourceGroup", "PlaybookConfiguration": { - "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/playbookConfigurations/myPlaybookConfigName", - "name": "myPlaybookConfigName", - "type": "Microsoft.Security/playbookConfigurations", + "id": "/subscriptions/e4272367-5645-4c4e-9c67-3b74b59a6982/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/playbookConfigurations/examplePlaybookConfiguration", + "name": "examplePlaybookConfiguration", + "type": "Microsoft.Security/playbookConfigurations", + "location": "Central US", "tags": {}, "properties": { - "description": "Alerts auto dismiss", + "description": "An example of a playbook configuration that triggers two LogicApp resources (myTest1 and myTest2) on any security assessment of type customAssessment", "isEnabled": true, "metadata": { "createdDateTimeUtc": "2019-03-27T08:43:54.5755094Z", @@ -20,24 +21,24 @@ }, "scopes": [ { - "description": "Some custom description", - "scopePath": "/subscriptions/6618f01b-9b61-4cfc-9010-836b34b1bb2a" + "description": "A description that helps to identify this scope - for example: security assessments that relate to the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26" }, { - "description": "Some custom description", - "scopePath": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23" + "description": "A description that help to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription 212f9889-769e-45ae-ab43-6da33674bd26", + "scopePath": "/subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/myResourceGroup" } ], "sources": [ { - "eventSource": "AscAlerts", + "eventSource": "AscAssessments", "ruleSets": [ { "rules": [ { - "propertyJPath": "$.Entity.AlertType", + "propertyJPath": "$.Entity.AssessmentType", "propertyType": "string", - "expectedValue": "customAlert", + "expectedValue": "customAssessment", "operator": "EqualsIgnoreCase" } ] @@ -47,14 +48,14 @@ ], "actions": [ { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri1.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1", + "actionType": "LogicApp", + "uri": "https://exampleTriggerUri1.com" }, { - "resourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", - "resourceProviderNamespace": "Microsoft.Logic", - "uri": "https://triggerUri2.com" + "logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest2", + "actionType": "LogicApp", + "uri": "https://exampleTriggerUri2.com" } ] } diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json index 1a0038e2886f..f5984e0fb7bc 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json @@ -6,14 +6,12 @@ "version": "2019-01-01-preview" }, "host": "management.azure.com", - "schemes": [ "https" ], - "consumes": [ "application/json" ], - "produces": [ "application/json" ], - "security": [ - { - "azure_auth": [ "user_impersonation" ] - } - ], + "schemes": ["https"], + "consumes": ["application/json"], + "produces": ["application/json"], + "security": [{ + "azure_auth": ["user_impersonation"] + }], "securityDefinitions": { "azure_auth": { "type": "oauth2", @@ -33,11 +31,10 @@ "$ref": "./examples/PlaybookConfigurations/GetPlaybookConfigurationsSubscription_example.json" } }, - "tags": [ "PlaybookConfigurations" ], + "tags": ["PlaybookConfigurations"], "description": "Get all playbook configurations in a subscription.", "operationId": "PlaybookConfigurations_List", - "parameters": [ - { + "parameters": [{ "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { @@ -70,11 +67,10 @@ "$ref": "./examples/PlaybookConfigurations/GetPlaybookConfigurationsResourceGroup_example.json" } }, - "tags": [ "PlaybookConfigurations" ], + "tags": ["PlaybookConfigurations"], "description": "Get all playbook configurations in a resource group.", "operationId": "PlaybookConfigurations_ListByResourceGroup", - "parameters": [ - { + "parameters": [{ "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { @@ -110,11 +106,10 @@ "$ref": "./examples/PlaybookConfigurations/GetPlaybookConfigurationResourceGroup_example.json" } }, - "tags": [ "PlaybookConfigurations" ], + "tags": ["PlaybookConfigurations"], "description": "Get the details of a playbook configuration.", "operationId": "PlaybookConfigurations_Get", - "parameters": [ - { + "parameters": [{ "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { @@ -148,11 +143,10 @@ "$ref": "./examples/PlaybookConfigurations/PutPlaybookConfiguration_example.json" } }, - "tags": [ "PlaybookConfigurations" ], + "tags": ["PlaybookConfigurations"], "description": "Create or update a playbook configuration. If a playbook configuration is already created and a subsequent create request is issued with different properties, the playbook configuration properties will be updated.", "operationId": "PlaybookConfigurations_CreateOrUpdate", - "parameters": [ - { + "parameters": [{ "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { @@ -195,11 +189,10 @@ "$ref": "./examples/PlaybookConfigurations/PatchPlaybookConfiguration_example.json" } }, - "tags": [ "PlaybookConfigurations" ], + "tags": ["PlaybookConfigurations"], "description": "Patch an existing playbook configuration. Supports only Tags", "operationId": "PlaybookConfigurations_Patch", - "parameters": [ - { + "parameters": [{ "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { @@ -236,11 +229,10 @@ "$ref": "./examples/PlaybookConfigurations/DeletePlaybookConfiguration_example.json" } }, - "tags": [ "PlaybookConfigurations" ], + "tags": ["PlaybookConfigurations"], "operationId": "PlaybookConfigurations_Delete", "description": "Delete a playbook configuration.", - "parameters": [ - { + "parameters": [{ "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { @@ -273,11 +265,10 @@ "$ref": "./examples/PlaybookConfigurations/ValidatePlaybookConfiguration_example.json" } }, - "tags": [ "PlaybookConfigurations" ], + "tags": ["PlaybookConfigurations"], "description": "Validate the playbook configuration model before create or update. Any validation errors are returned to the client.", "operationId": "PlaybookConfigurations_Validate", - "parameters": [ - { + "parameters": [{ "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { @@ -313,7 +304,7 @@ "definitions": { "PlaybookConfigurationList": { "description": "List of playbook configurations response.", - "required": [ "value" ], + "required": ["value"], "properties": { "value": { "type": "array", @@ -339,11 +330,9 @@ "$ref": "#/definitions/PlaybookConfigurationProperties" } }, - "allOf": [ - { - "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" - } - ] + "allOf": [{ + "$ref": "../../../common/v1/types.json#/definitions/TrackedResource" + }] }, "PlaybookConfigurationProperties": { "type": "object", @@ -447,14 +436,33 @@ "PlaybookConfigurationAction": { "type": "object", "description": "The action that should be triggered.", + "discriminator": "actionType", "properties": { - "resourceId": { + "actionType": { "type": "string", - "description": "The triggered resource id." - }, - "resourceProviderNamespace": { + "description": "type of action that will be triggered by the PlaybookConfiguration", + "enum": ["LogicApp"], + "x-ms-enum": { + "name": "ActionType", + "modelAsString": true, + "values": [{ + "value": "LogicApp" + }] + } + } + } + }, + "PlaybookConfigurationActionLogicApp": { + "type": "object", + "description": "The logic app action that should be triggered.", + "x-ms-discriminator-value": "LogicApp", + "allOf": [{ + "$ref": "#/definitions/PlaybookConfigurationAction" + }], + "properties": { + "logicAppResourceId": { "type": "string", - "description": "The resource provider name." + "description": "The triggered resource id." }, "uri": { "type": "string", @@ -550,4 +558,4 @@ } } } -} +} \ No newline at end of file From 7c02e45dc5e7eeae451106839ab525d9157a389e Mon Sep 17 00:00:00 2001 From: Nir Winter Date: Sun, 25 Aug 2019 13:42:05 +0300 Subject: [PATCH 09/10] Adding event hub action to playbook RP --- .../playbookConfigurations.json | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json index f5984e0fb7bc..36f7bc0da7e3 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json @@ -441,13 +441,18 @@ "actionType": { "type": "string", "description": "type of action that will be triggered by the PlaybookConfiguration", - "enum": ["LogicApp"], + "enum": ["LogicApp", "EventHub"], "x-ms-enum": { "name": "ActionType", "modelAsString": true, - "values": [{ - "value": "LogicApp" - }] + "values": [ + { + "value": "LogicApp" + }, + { + "value": "EventHub" + } + ] } } } @@ -471,6 +476,24 @@ } } }, + "PlaybookConfigurationActionEventHub": { + "type": "object", + "description": "The event hub action that should be triggered.", + "x-ms-discriminator-value": "EventHub", + "allOf": [{ + "$ref": "#/definitions/PlaybookConfigurationAction" + }], + "properties": { + "eventHubResourceId": { + "type": "string", + "description": "The event hub resource id." + }, + "connectionString": { + "type": "string", + "description": "The event hub connection string(the primary or secondary key)." + } + } + }, "PlaybookConfigurationRuleSet": { "type": "object", "description": "A rule set which evaluates all its rules upon an event interception.", From 672852456614dcf0a9200eb3c4daa56030d126b1 Mon Sep 17 00:00:00 2001 From: Omer Abramovich Date: Thu, 26 Sep 2019 15:14:11 +0300 Subject: [PATCH 10/10] adding securityEmail action type --- .../playbookConfigurations.json | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json index 36f7bc0da7e3..07880a039ce2 100644 --- a/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json +++ b/specification/security/resource-manager/Microsoft.Security/preview/2019-01-01-preview/playbookConfigurations.json @@ -441,7 +441,7 @@ "actionType": { "type": "string", "description": "type of action that will be triggered by the PlaybookConfiguration", - "enum": ["LogicApp", "EventHub"], + "enum": ["LogicApp", "EventHub", "SecurityEmail"], "x-ms-enum": { "name": "ActionType", "modelAsString": true, @@ -451,6 +451,9 @@ }, { "value": "EventHub" + }, + { + "value": "SecurityEmail" } ] } @@ -494,6 +497,37 @@ } } }, + "PlaybookConfigurationActionSecurityEmail": { + "type": "object", + "description": "The Security Email action that should be triggered.", + "x-ms-discriminator-value": "SecurityEmail", + "allOf": [{ + "$ref": "#/definitions/PlaybookConfigurationAction" + }], + "properties": { + "subscriptionRbacRoles": { + "type": "array", + "description": "A list of RBAC roles of the subscription for the email to be sent to.", + "items": { + "type":"string", + "enum":[ + "AccountAdmin", + "ServiceAdmin", + "Owner", + "Contributor" + ] + } + }, + "emailAddresses": { + "type": "array", + "description": "A list of email addresses for the email to be sent to.", + "items": { + "type": "string", + "format": "email" + } + } + } + }, "PlaybookConfigurationRuleSet": { "type": "object", "description": "A rule set which evaluates all its rules upon an event interception.",