Security Center icon

Security Center

API spec for Microsoft

COMMUNITYBEARER0 INSTALLS
OpenAPI Specificationv3.0
{
  "swagger": "2.0",
  "schemes": [
    "https"
  ],
  "host": "management.azure.com",
  "info": {
    "description": "API spec for Microsoft.Security (Azure Security Center) resource provider",
    "title": "Security Center",
    "version": "2015-06-01-preview",
    "x-apisguru-categories": [
      "cloud"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/security/resource-manager/Microsoft.Security/preview/2015-06-01-preview/tasks.json",
        "version": "2.0"
      }
    ],
    "x-providerName": "azure.com",
    "x-serviceName": "security-tasks",
    "x-tags": [
      "Azure",
      "Microsoft"
    ]
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "azure_auth": {
      "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
      "description": "Azure Active Directory OAuth2 Flow",
      "flow": "implicit",
      "scopes": {
        "user_impersonation": "impersonate your user account"
      },
      "type": "oauth2"
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ],
  "parameters": {
    "TaskName": {
      "description": "Name of the task object, will be a GUID",
      "in": "path",
      "name": "taskName",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    },
    "TaskUpdateActionType": {
      "description": "Type of the action to do on the task",
      "enum": [
        "Activate",
        "Dismiss",
        "Start",
        "Resolve",
        "Close"
      ],
      "in": "path",
      "name": "taskUpdateActionType",
      "required": true,
      "type": "string",
      "x-ms-parameter-location": "method"
    }
  },
  "paths": {
    "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks": {
      "get": {
        "description": "Recommended tasks that will help improve the security of the subscription proactively",
        "operationId": "Tasks_ListByHomeRegion",
        "parameters": [
          {
            "description": "API version for the operation",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "Azure subscription ID",
            "in": "path",
            "name": "subscriptionId",
            "pattern": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$",
            "required": true,
            "type": "string"
          },
          {
            "description": "The location where ASC stores the data of the subscription. can be retrieved from Get locations",
            "in": "path",
            "name": "ascLocation",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "client"
          },
          {
            "description": "OData filter. Optional.",
            "in": "query",
            "name": "$filter",
            "required": false,
            "type": "string",
            "x-ms-parameter-location": "method"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SecurityTaskList"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error response structure.",
              "properties": {
                "error": {
                  "description": "Error details.",
                  "properties": {
                    "code": {
                      "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically.",
                      "readOnly": true,
                      "type": "string"
                    },
                    "message": {
                      "description": "A message describing the error, intended to be suitable for display in a user interface.",
                      "readOnly": true,
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-ms-external": true
                }
              },
              "type": "object",
              "x-ms-external": true
            }
          }
        },
        "tags": [
          "Tasks"
        ],
        "x-ms-examples": {
          "Get security recommendations tasks from security data location": {
            "parameters": {
              "api-version": "2015-06-01-preview",
              "ascLocation": "westeurope",
              "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/westeurope/tasks/62609ee7-d0a5-8616-9fe4-1df5cca7758d",
                      "name": "62609ee7-d0a5-8616-9fe4-1df5cca7758d",
                      "properties": {
                        "creationTimeUtc": "2018-03-05T10:42:03.9935508Z",
                        "lastStateChangeTimeUtc": "2018-03-05T10:42:03.9935508Z",
                        "securityTaskParameters": {
                          "location": "uksouth",
                          "name": "NetworkSecurityGroupMissingOnSubnet",
                          "resourceGroup": "myRg",
                          "resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/default",
                          "resourceName": "default",
                          "resourceParent": "vnet1",
                          "resourceType": "Subnet",
                          "uniqueKey": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/default"
                        },
                        "state": "Active",
                        "subState": "NA"
                      },
                      "type": "Microsoft.Security/locations/tasks"
                    },
                    {
                      "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/locations/westeurope/tasks/d55b4dc0-779c-c66c-33e5-d7bce24c4222",
                      "name": "d55b4dc0-779c-c66c-33e5-d7bce24c4222",
                      "properties": {
                        "creationTimeUtc": "2018-04-02T11:41:27.0541014Z",
                        "lastStateChangeTimeUtc": "2018-04-02T11:41:27.0541014Z",
                        "securityTaskParameters": {
                          "isDataDiskEncrypted": false,
                          "isOsDiskEncrypted": false,
                          "name": "EncryptionOnVm",
                          "resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
                          "severity": "High",
                          "uniqueKey": "EncryptionOnVmTaskParameters_/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
                          "vmId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
                          "vmName": "vm1"
                        },
                        "state": "Active",
                        "subState": "NA"
                      },
                      "type": "Microsoft.Security/locations/tasks"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}": {
      "get": {
        "description": "Recommended tasks that will help improve the security of the subscription proactively",
        "operationId": "Tasks_GetSubscriptionLevelTask",
        "parameters": [
          {
            "description": "API version for the operation",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "Azure subscription ID",
            "in": "path",
            "name": "subscriptionId",
            "pattern": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$",
            "required": true,
            "type": "string"
          },
          {
            "description": "The location where ASC stores the data of the subscription. can be retrieved from Get locations",
            "in": "path",
            "name": "ascLocation",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "client"
          },
          {
            "$ref": "#/parameters/TaskName"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SecurityTask"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error response structure.",
              "properties": {
                "error": {
                  "description": "Error details.",
                  "properties": {
                    "code": {
                      "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically.",
                      "readOnly": true,
                      "type": "string"
                    },
                    "message": {
                      "description": "A message describing the error, intended to be suitable for display in a user interface.",
                      "readOnly": true,
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-ms-external": true
                }
              },
              "type": "object",
              "x-ms-external": true
            }
          }
        },
        "tags": [
          "Tasks"
        ],
        "x-ms-examples": {
          "Get security recommendation task from security data location": {
            "parameters": {
              "api-version": "2015-06-01-preview",
              "ascLocation": "westeurope",
              "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
              "taskName": "62609ee7-d0a5-8616-9fe4-1df5cca7758d"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/westeurope/tasks/62609ee7-d0a5-8616-9fe4-1df5cca7758d",
                  "name": "62609ee7-d0a5-8616-9fe4-1df5cca7758d",
                  "properties": {
                    "creationTimeUtc": "2018-03-05T10:42:03.9935508Z",
                    "lastStateChangeTimeUtc": "2018-03-05T10:42:03.9935508Z",
                    "securityTaskParameters": {
                      "location": "uksouth",
                      "name": "NetworkSecurityGroupMissingOnSubnet",
                      "resourceGroup": "myRg",
                      "resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/default",
                      "resourceName": "default",
                      "resourceParent": "vnet1",
                      "resourceType": "Subnet",
                      "uniqueKey": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/default"
                    },
                    "state": "Active",
                    "subState": "NA"
                  },
                  "type": "Microsoft.Security/locations/tasks"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}/{taskUpdateActionType}": {
      "post": {
        "description": "Recommended tasks that will help improve the security of the subscription proactively",
        "operationId": "Tasks_UpdateSubscriptionLevelTaskState",
        "parameters": [
          {
            "description": "API version for the operation",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "Azure subscription ID",
            "in": "path",
            "name": "subscriptionId",
            "pattern": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$",
            "required": true,
            "type": "string"
          },
          {
            "description": "The location where ASC stores the data of the subscription. can be retrieved from Get locations",
            "in": "path",
            "name": "ascLocation",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "client"
          },
          {
            "$ref": "#/parameters/TaskName"
          },
          {
            "$ref": "#/parameters/TaskUpdateActionType"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error response structure.",
              "properties": {
                "error": {
                  "description": "Error details.",
                  "properties": {
                    "code": {
                      "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically.",
                      "readOnly": true,
                      "type": "string"
                    },
                    "message": {
                      "description": "A message describing the error, intended to be suitable for display in a user interface.",
                      "readOnly": true,
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-ms-external": true
                }
              },
              "type": "object",
              "x-ms-external": true
            }
          }
        },
        "tags": [
          "Tasks"
        ],
        "x-ms-examples": {
          "Change security recommendation task state": {
            "parameters": {
              "api-version": "2015-06-01-preview",
              "ascLocation": "westeurope",
              "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
              "taskName": "62609ee7-d0a5-8616-9fe4-1df5cca7758d",
              "taskUpdateActionType": "Dismiss"
            },
            "responses": {
              "204": {}
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/providers/Microsoft.Security/tasks": {
      "get": {
        "description": "Recommended tasks that will help improve the security of the subscription proactively",
        "operationId": "Tasks_List",
        "parameters": [
          {
            "description": "API version for the operation",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "Azure subscription ID",
            "in": "path",
            "name": "subscriptionId",
            "pattern": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$",
            "required": true,
            "type": "string"
          },
          {
            "description": "OData filter. Optional.",
            "in": "query",
            "name": "$filter",
            "required": false,
            "type": "string",
            "x-ms-parameter-location": "method"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SecurityTaskList"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error response structure.",
              "properties": {
                "error": {
                  "description": "Error details.",
                  "properties": {
                    "code": {
                      "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically.",
                      "readOnly": true,
                      "type": "string"
                    },
                    "message": {
                      "description": "A message describing the error, intended to be suitable for display in a user interface.",
                      "readOnly": true,
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-ms-external": true
                }
              },
              "type": "object",
              "x-ms-external": true
            }
          }
        },
        "tags": [
          "Tasks"
        ],
        "x-ms-examples": {
          "Get security recommendations tasks": {
            "parameters": {
              "api-version": "2015-06-01-preview",
              "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/westeurope/tasks/62609ee7-d0a5-8616-9fe4-1df5cca7758d",
                      "name": "62609ee7-d0a5-8616-9fe4-1df5cca7758d",
                      "properties": {
                        "creationTimeUtc": "2018-03-05T10:42:03.9935508Z",
                        "lastStateChangeTimeUtc": "2018-03-05T10:42:03.9935508Z",
                        "securityTaskParameters": {
                          "location": "uksouth",
                          "name": "NetworkSecurityGroupMissingOnSubnet",
                          "resourceGroup": "myRg",
                          "resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/default",
                          "resourceName": "default",
                          "resourceParent": "vnet1",
                          "resourceType": "Subnet",
                          "uniqueKey": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/default"
                        },
                        "state": "Active",
                        "subState": "NA"
                      },
                      "type": "Microsoft.Security/locations/tasks"
                    },
                    {
                      "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/locations/westeurope/tasks/d55b4dc0-779c-c66c-33e5-d7bce24c4222",
                      "name": "d55b4dc0-779c-c66c-33e5-d7bce24c4222",
                      "properties": {
                        "creationTimeUtc": "2018-04-02T11:41:27.0541014Z",
                        "lastStateChangeTimeUtc": "2018-04-02T11:41:27.0541014Z",
                        "securityTaskParameters": {
                          "isDataDiskEncrypted": false,
                          "isOsDiskEncrypted": false,
                          "name": "EncryptionOnVm",
                          "resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
                          "severity": "High",
                          "uniqueKey": "EncryptionOnVmTaskParameters_/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
                          "vmId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
                          "vmName": "vm1"
                        },
                        "state": "Active",
                        "subState": "NA"
                      },
                      "type": "Microsoft.Security/locations/tasks"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks": {
      "get": {
        "description": "Recommended tasks that will help improve the security of the subscription proactively",
        "operationId": "Tasks_ListByResourceGroup",
        "parameters": [
          {
            "description": "API version for the operation",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "Azure subscription ID",
            "in": "path",
            "name": "subscriptionId",
            "pattern": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the resource group within the user's subscription. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The location where ASC stores the data of the subscription. can be retrieved from Get locations",
            "in": "path",
            "name": "ascLocation",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "client"
          },
          {
            "description": "OData filter. Optional.",
            "in": "query",
            "name": "$filter",
            "required": false,
            "type": "string",
            "x-ms-parameter-location": "method"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SecurityTaskList"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error response structure.",
              "properties": {
                "error": {
                  "description": "Error details.",
                  "properties": {
                    "code": {
                      "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically.",
                      "readOnly": true,
                      "type": "string"
                    },
                    "message": {
                      "description": "A message describing the error, intended to be suitable for display in a user interface.",
                      "readOnly": true,
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-ms-external": true
                }
              },
              "type": "object",
              "x-ms-external": true
            }
          }
        },
        "tags": [
          "Tasks"
        ],
        "x-ms-examples": {
          "Get security recommendation tasks in a resource group": {
            "parameters": {
              "api-version": "2015-06-01-preview",
              "ascLocation": "westeurope",
              "resourceGroupName": "myRg",
              "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23"
            },
            "responses": {
              "200": {
                "body": {
                  "value": [
                    {
                      "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/locations/westeurope/tasks/d55b4dc0-779c-c66c-33e5-d7bce24c4222",
                      "name": "d55b4dc0-779c-c66c-33e5-d7bce24c4222",
                      "properties": {
                        "creationTimeUtc": "2018-04-02T11:41:27.0541014Z",
                        "lastStateChangeTimeUtc": "2018-04-02T11:41:27.0541014Z",
                        "securityTaskParameters": {
                          "isDataDiskEncrypted": false,
                          "isOsDiskEncrypted": false,
                          "name": "EncryptionOnVm",
                          "resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
                          "severity": "High",
                          "uniqueKey": "EncryptionOnVmTaskParameters_/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
                          "vmId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
                          "vmName": "vm1"
                        },
                        "state": "Active",
                        "subState": "NA"
                      },
                      "type": "Microsoft.Security/locations/tasks"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}": {
      "get": {
        "description": "Recommended tasks that will help improve the security of the subscription proactively",
        "operationId": "Tasks_GetResourceGroupLevelTask",
        "parameters": [
          {
            "description": "API version for the operation",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "Azure subscription ID",
            "in": "path",
            "name": "subscriptionId",
            "pattern": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the resource group within the user's subscription. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The location where ASC stores the data of the subscription. can be retrieved from Get locations",
            "in": "path",
            "name": "ascLocation",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "client"
          },
          {
            "$ref": "#/parameters/TaskName"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SecurityTask"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error response structure.",
              "properties": {
                "error": {
                  "description": "Error details.",
                  "properties": {
                    "code": {
                      "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically.",
                      "readOnly": true,
                      "type": "string"
                    },
                    "message": {
                      "description": "A message describing the error, intended to be suitable for display in a user interface.",
                      "readOnly": true,
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-ms-external": true
                }
              },
              "type": "object",
              "x-ms-external": true
            }
          }
        },
        "tags": [
          "Tasks"
        ],
        "x-ms-examples": {
          "Get security recommendation task in a resource group": {
            "parameters": {
              "api-version": "2015-06-01-preview",
              "ascLocation": "westeurope",
              "resourceGroupName": "myRg",
              "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
              "taskName": "d55b4dc0-779c-c66c-33e5-d7bce24c4222"
            },
            "responses": {
              "200": {
                "body": {
                  "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/locations/westeurope/tasks/d55b4dc0-779c-c66c-33e5-d7bce24c4222",
                  "name": "d55b4dc0-779c-c66c-33e5-d7bce24c4222",
                  "properties": {
                    "creationTimeUtc": "2018-04-02T11:41:27.0541014Z",
                    "lastStateChangeTimeUtc": "2018-04-02T11:41:27.0541014Z",
                    "securityTaskParameters": {
                      "isDataDiskEncrypted": false,
                      "isOsDiskEncrypted": false,
                      "name": "EncryptionOnVm",
                      "resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
                      "severity": "High",
                      "uniqueKey": "EncryptionOnVmTaskParameters_/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
                      "vmId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
                      "vmName": "vm1"
                    },
                    "state": "Active",
                    "subState": "NA"
                  },
                  "type": "Microsoft.Security/locations/tasks"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/tasks/{taskName}/{taskUpdateActionType}": {
      "post": {
        "description": "Recommended tasks that will help improve the security of the subscription proactively",
        "operationId": "Tasks_UpdateResourceGroupLevelTaskState",
        "parameters": [
          {
            "description": "API version for the operation",
            "in": "query",
            "name": "api-version",
            "required": true,
            "type": "string"
          },
          {
            "description": "Azure subscription ID",
            "in": "path",
            "name": "subscriptionId",
            "pattern": "^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$",
            "required": true,
            "type": "string"
          },
          {
            "description": "The name of the resource group within the user's subscription. The name is case insensitive.",
            "in": "path",
            "maxLength": 90,
            "minLength": 1,
            "name": "resourceGroupName",
            "pattern": "^[-\\w\\._\\(\\)]+$",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "method"
          },
          {
            "description": "The location where ASC stores the data of the subscription. can be retrieved from Get locations",
            "in": "path",
            "name": "ascLocation",
            "required": true,
            "type": "string",
            "x-ms-parameter-location": "client"
          },
          {
            "$ref": "#/parameters/TaskName"
          },
          {
            "$ref": "#/parameters/TaskUpdateActionType"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "description": "Error response describing why the operation failed.",
            "schema": {
              "description": "Error response structure.",
              "properties": {
                "error": {
                  "description": "Error details.",
                  "properties": {
                    "code": {
                      "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically.",
                      "readOnly": true,
                      "type": "string"
                    },
                    "message": {
                      "description": "A message describing the error, intended to be suitable for display in a user interface.",
                      "readOnly": true,
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-ms-external": true
                }
              },
              "type": "object",
              "x-ms-external": true
            }
          }
        },
        "tags": [
          "Tasks"
        ],
        "x-ms-examples": {
          "Change security recommendation task state": {
            "parameters": {
              "api-version": "2015-06-01-preview",
              "ascLocation": "westeurope",
              "resourceGroupName": "myRg",
              "subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23",
              "taskName": "d55b4dc0-779c-c66c-33e5-d7bce24c4222",
              "taskUpdateActionType": "Dismiss"
            },
            "responses": {
              "204": {}
            }
          }
        }
      }
    }
  },
  "definitions": {
    "SecurityTask": {
      "allOf": [
        {
          "description": "Describes an Azure resource.",
          "properties": {
            "id": {
              "description": "Resource Id",
              "readOnly": true,
              "type": "string"
            },
            "name": {
              "description": "Resource name",
              "readOnly": true,
              "type": "string"
            },
            "type": {
              "description": "Resource type",
              "readOnly": true,
              "type": "string"
            }
          },
          "type": "object",
          "x-ms-azure-resource": true
        }
      ],
      "description": "Security task that we recommend to do in order to strengthen security",
      "properties": {
        "properties": {
          "$ref": "#/definitions/SecurityTaskProperties",
          "x-ms-client-flatten": true
        }
      },
      "type": "object"
    },
    "SecurityTaskList": {
      "description": "List of security task recommendations",
      "properties": {
        "nextLink": {
          "description": "The URI to fetch the next page.",
          "readOnly": true,
          "type": "string"
        },
        "value": {
          "items": {
            "$ref": "#/definitions/SecurityTask"
          },
          "readOnly": true,
          "type": "array"
        }
      },
      "type": "object"
    },
    "SecurityTaskParameters": {
      "additionalProperties": true,
      "description": "Changing set of properties, depending on the task type that is derived from the name field",
      "properties": {
        "name": {
          "description": "Name of the task type",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "SecurityTaskProperties": {
      "description": "Describes properties of a task.",
      "properties": {
        "creationTimeUtc": {
          "description": "The time this task was discovered in UTC",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "lastStateChangeTimeUtc": {
          "description": "The time this task's details were last changed in UTC",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "securityTaskParameters": {
          "$ref": "#/definitions/SecurityTaskParameters"
        },
        "state": {
          "description": "State of the task (Active, Resolved etc.)",
          "readOnly": true,
          "type": "string"
        },
        "subState": {
          "description": "Additional data on the state of the task",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}