Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,11 @@
},
"put": {
"x-ms-examples": {
"Create or update a security automation": {
"$ref": "./examples/Automations/PutAutomation_example.json"
"Create or update a security automation for all assessments": {
"$ref": "./examples/Automations/PutAutomationAllAssessments_example.json"
},
"Create or update a security automation for all high severity assessments": {
"$ref": "./examples/Automations/PutAutomationHighSeverityAssessments_example.json"
},
"Disable or enable a security automation": {
"$ref": "./examples/Automations/PutDisableAutomation_example.json"
Expand Down Expand Up @@ -373,6 +376,7 @@
"description": "A valid event source type.",
"enum": [
"Assessments",
"SubAssessments",
"Alerts"
],
"x-ms-enum": {
Expand All @@ -382,6 +386,9 @@
{
"value": "Assessments"
},
{
"value": "SubAssessments"
},
{
"value": "Alerts"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"parameters": {
"api-version": "2019-01-01-preview",
"subscriptionId": "a5caac9c-5c04-49af-b3d0-e204f40345d5",
"automationName": "exampleAutomation",
"resourceGroupName": "exampleResourceGroup",
"Automation": {
"location": "Central US",
"etag": "etag value (must be supplied for update)",
"tags": {},
"properties": {
"description": "An example of a security automation that triggers one LogicApp resource (myTest1) on any security assessment",
"isEnabled": true,
"scopes": [
{
"description": "A description that helps to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5",
"scopePath": "/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"
}
],
"sources": [
{
"eventSource": "Assessments",
"ruleSets": []
}
],
"actions": [
{
"logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1",
"actionType": "LogicApp",
"uri": "https://exampleTriggerUri1.com"
}
]
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/automations/exampleAutomation",
"name": "exampleAutomation",
"type": "Microsoft.Security/automations",
"location": "Central US",
"etag": "new etag value",
"tags": {},
"properties": {
"description": "An example of a security automation that triggers one LogicApp resource (myTest1) on any security assessment",
"isEnabled": true,
"scopes": [
{
"description": "A description that helps to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5",
"scopePath": "/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"
}
],
"sources": [
{
"eventSource": "Assessments",
"ruleSets": []
}
],
"actions": [
{
"logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1",
"actionType": "LogicApp"
}
]
}
}
},
"201": {
"body": {
"id": "/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/exampleResourceGroup/providers/Microsoft.Security/SecurityAutomations/exampleAutomation",
"name": "exampleAutomation",
"type": "Microsoft.Security/SecurityAutomations",
"location": "Central US",
"etag": "new etag value",
"tags": {},
"properties": {
"description": "An example of a security automation that triggers one LogicApp resource (myTest1) on any security assessment",
"isEnabled": true,
"scopes": [
{
"description": "A description that helps to identify this scope - for example: security assessments that relate to the resource group myResourceGroup within the subscription a5caac9c-5c04-49af-b3d0-e204f40345d5",
"scopePath": "/subscriptions/a5caac9c-5c04-49af-b3d0-e204f40345d5/resourceGroups/myResourceGroup"
}
],
"sources": [
{
"eventSource": "Assessments",
"ruleSets": []
}
],
"actions": [
{
"logicAppResourceId": "/subscriptions/e54a4a18-5b94-4f90-9471-bd3decad8a2e/resourceGroups/sample/providers/Microsoft.Logic/workflows/MyTest1",
"actionType": "LogicApp"
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"etag": "etag value (must be supplied for update)",
"tags": {},
"properties": {
"description": "An example of a security automation that triggers one LogicApp resource (myTest1) on any security assessment of type customAssessment",
"description": "An example of a security automation that triggers one LogicApp resource (myTest1) on any high severity security assessment",
"isEnabled": true,
"scopes": [
{
Expand All @@ -24,9 +24,9 @@
{
"rules": [
{
"propertyJPath": "$.Entity.AssessmentType",
"propertyJPath": "properties.metadata.severity",
"propertyType": "String",
"expectedValue": "customAssessment",
"expectedValue": "High",
"operator": "Equals"
}
]
Expand Down Expand Up @@ -54,7 +54,7 @@
"etag": "new etag value",
"tags": {},
"properties": {
"description": "An example of a security automation that triggers one LogicApp resource (myTest1) on any security assessment of type customAssessment",
"description": "An example of a security automation that triggers one LogicApp resource (myTest1) on any high severity security assessment",
"isEnabled": true,
"scopes": [
{
Expand All @@ -69,9 +69,9 @@
{
"rules": [
{
"propertyJPath": "$.Entity.AssessmentType",
"propertyJPath": "properties.metadata.severity",
"propertyType": "String",
"expectedValue": "customAssessment",
"expectedValue": "High",
"operator": "Equals"
}
]
Expand All @@ -97,7 +97,7 @@
"etag": "new etag value",
"tags": {},
"properties": {
"description": "An example of a security automation that triggers one LogicApp resource (myTest1) on any security assessment of type customAssessment",
"description": "An example of a security automation that triggers one LogicApp resource (myTest1) on any high severity security assessment",
"isEnabled": true,
"scopes": [
{
Expand All @@ -112,9 +112,9 @@
{
"rules": [
{
"propertyJPath": "$.Entity.AssessmentType",
"propertyJPath": "properties.metadata.severity",
"propertyType": "String",
"expectedValue": "customAssessment",
"expectedValue": "High",
"operator": "Equals"
}
]
Expand Down
12 changes: 11 additions & 1 deletion specification/security/resource-manager/common/v1/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"$ref": "#/definitions/Resource"
},
{
"$ref": "#/definitions/Location"
"$ref": "#/definitions/LocationReadAndWrite"
},
{
"$ref": "#/definitions/Kind"
Expand Down Expand Up @@ -122,6 +122,16 @@
}
}
},
"LocationReadAndWrite": {
"type": "object",
"description": "Describes an Azure resource with location",
"properties": {
"location": {
"type": "string",
"description": "Location where the resource is stored"
}
}
},
"AscLocationList": {
"type": "object",
"description": "List of locations where ASC saves your data",
Expand Down