{ "swagger": "2.0", "info": { "title": "Microsoft Defender for Cloud", "description": "API spec for Microsoft.Security (Microsoft Defender for Cloud) resource provider", "version": "2017-08-01-preview" }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow", "scopes": { "user_impersonation": "impersonate your user account" } } }, "paths": { "/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts": { "get": { "x-ms-examples": { "Update security contact data minimal": { "$ref": "./examples/SecurityContacts/GetSecurityContactsSubscription_min_example.json" }, "Update security contact data full": { "$ref": "./examples/SecurityContacts/GetSecurityContactsSubscription_full_example.json" } }, "tags": [ "Security Contacts" ], "description": "Security contact configurations for the subscription", "operationId": "SecurityContacts_List", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SecurityContactList" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../common/v1/types.json#/definitions/CloudError" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}": { "get": { "x-ms-examples": { "Get security contact data minimal": { "$ref": "./examples/SecurityContacts/GetSecurityContact_min_example.json" }, "Get security contact data full": { "$ref": "./examples/SecurityContacts/GetSecurityContact_full_example.json" } }, "tags": [ "Security Contacts" ], "description": "Security contact configurations for the subscription", "operationId": "SecurityContacts_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" }, { "$ref": "#/parameters/SecurityContactName" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SecurityContact" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../common/v1/types.json#/definitions/CloudError" } } } }, "put": { "x-ms-examples": { "Create security contact data minimal": { "$ref": "./examples/SecurityContacts/CreateSecurityContact_min_example.json" }, "Create security contact data full": { "$ref": "./examples/SecurityContacts/CreateSecurityContact_full_example.json" } }, "tags": [ "Security Contacts" ], "description": "Security contact configurations for the subscription", "operationId": "SecurityContacts_Create", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" }, { "$ref": "#/parameters/SecurityContactName" }, { "$ref": "#/parameters/SecurityContact" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SecurityContact" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../common/v1/types.json#/definitions/CloudError" } } } }, "delete": { "x-ms-examples": { "Delete security contact data": { "$ref": "./examples/SecurityContacts/DeleteSecurityContact_example.json" } }, "tags": [ "Security Contacts" ], "description": "Security contact configurations for the subscription", "operationId": "SecurityContacts_Delete", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" }, { "$ref": "#/parameters/SecurityContactName" } ], "responses": { "204": { "description": "No Content" }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../common/v1/types.json#/definitions/CloudError" } } } }, "patch": { "x-ms-examples": { "Update security contact data minimal": { "$ref": "./examples/SecurityContacts/UpdateSecurityContact_min_example.json" }, "Update security contact data full": { "$ref": "./examples/SecurityContacts/UpdateSecurityContact_full_example.json" } }, "tags": [ "Security Contacts" ], "description": "Security contact configurations for the subscription", "operationId": "SecurityContacts_Update", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ApiVersion" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionId" }, { "$ref": "#/parameters/SecurityContactName" }, { "$ref": "#/parameters/SecurityContact" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SecurityContact" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../common/v1/types.json#/definitions/CloudError" } } } } } }, "definitions": { "SecurityContactList": { "type": "object", "description": "List of security contacts response", "properties": { "value": { "readOnly": true, "description": "List of security contacts", "type": "array", "items": { "$ref": "#/definitions/SecurityContact" } }, "nextLink": { "readOnly": true, "type": "string", "description": "The URI to fetch the next page." } } }, "SecurityContact": { "type": "object", "description": "Contact details for security issues", "properties": { "properties": { "x-ms-client-flatten": true, "description": "Security contact data", "$ref": "#/definitions/SecurityContactProperties" } }, "allOf": [ { "$ref": "../../../common/v1/types.json#/definitions/Resource" } ] }, "SecurityContactProperties": { "type": "object", "description": "describes security contact properties", "properties": { "email": { "type": "string", "format": "email", "description": "The email of this security contact" }, "phone": { "type": "string", "description": "The phone number of this security contact" }, "alertNotifications": { "type": "string", "enum": [ "On", "Off" ], "x-ms-enum": { "name": "alertNotifications", "modelAsString": true, "values": [ { "value": "On", "description": "Get notifications on new alerts" }, { "value": "Off", "description": "Don't get notifications on new alerts" } ] }, "description": "Whether to send security alerts notifications to the security contact" }, "alertsToAdmins": { "type": "string", "enum": [ "On", "Off" ], "x-ms-enum": { "name": "alertsToAdmins", "modelAsString": true, "values": [ { "value": "On", "description": "Send notification on new alerts to the subscription's admins" }, { "value": "Off", "description": "Don't send notification on new alerts to the subscription's admins" } ] }, "description": "Whether to send security alerts notifications to subscription admins" } }, "required": [ "email", "alertNotifications", "alertsToAdmins" ] } }, "parameters": { "SecurityContactName": { "name": "securityContactName", "in": "path", "required": true, "type": "string", "description": "Name of the security contact object", "x-ms-parameter-location": "method" }, "SecurityContact": { "name": "securityContact", "in": "body", "required": true, "description": "Security contact object", "schema": { "$ref": "#/definitions/SecurityContact" }, "x-ms-parameter-location": "method" } } }