openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 11.9 kB
JSON
{"openapi":"3.0.0","info":{"description":"Provides create, read and update functionality for database Threat Detection policies.","title":"Database Threat Detection Policy APIs","version":"2014-04-01","x-apisguru-categories":["cloud"],"x-logo":{"url":"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/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/databaseSecurityAlertPolicies.json","version":"2.0"}],"x-providerName":"azure.com","x-serviceName":"sql-databaseSecurityAlertPolicies","x-tags":["Azure","Microsoft"]},"paths":{"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}":{"get":{"description":"Gets a database's threat detection policy.","operationId":"DatabaseThreatDetectionPolicies_Get","parameters":[{"description":"The subscription ID that identifies an Azure subscription.","in":"path","name":"subscriptionId","required":true,"x-ms-parameter-location":"client","schema":{"type":"string"},"examples":{"Get database security alert policy":{"value":"00000000-1111-2222-3333-444444444444"}}},{"description":"The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Get database security alert policy":{"value":"securityalert-6852"}}},{"$ref":"#/components/parameters/ServerNameParameter"},{"description":"The name of the database for which database Threat Detection policy is defined.","in":"path","name":"databaseName","required":true,"schema":{"type":"string"},"examples":{"Get database security alert policy":{"value":"testdb"}}},{"description":"The name of the security alert policy.","in":"path","name":"securityAlertPolicyName","required":true,"x-ms-enum":{"modelAsString":true,"name":"SecurityAlertPolicyName"},"schema":{"type":"string","enum":["default"]},"examples":{"Get database security alert policy":{"value":"default"}}},{"description":"The API version to use for the request.","in":"query","name":"api-version","required":true,"x-ms-parameter-location":"client","schema":{"type":"string"},"examples":{"Get database security alert policy":{"value":"2014-04-01"}}}],"responses":{"200":{"description":"Successfully retrieved the database Threat Detection policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseSecurityAlertPolicy"},"examples":{"Get database security alert policy":{"$ref":"#/components/examples/Get_database_security_alert_policy"}}}}},"default":{"description":"*** Error Responses: ***\n\n * 500 GetDatabaseSecurityAlertPolicyFailed - Failed to get database Threat Detection security alert policies. * 500 DatabaseIsUnavailable - Your settings are currently unavailable, please try again later"}},"tags":["SecurityAlert"]},"put":{"description":"Creates or updates a database's threat detection policy.","operationId":"DatabaseThreatDetectionPolicies_CreateOrUpdate","parameters":[{"description":"The subscription ID that identifies an Azure subscription.","in":"path","name":"subscriptionId","required":true,"x-ms-parameter-location":"client","schema":{"type":"string"},"examples":{"Create database security alert policy max":{"value":"00000000-1111-2222-3333-444444444444"},"Create database security alert policy min":{"value":"00000000-1111-2222-3333-444444444444"}}},{"description":"The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Create database security alert policy max":{"value":"securityalert-4799"},"Create database security alert policy min":{"value":"securityalert-4799"}}},{"$ref":"#/components/parameters/ServerNameParameter"},{"description":"The name of the database for which database Threat Detection policy is defined.","in":"path","name":"databaseName","required":true,"schema":{"type":"string"},"examples":{"Create database security alert policy max":{"value":"testdb"},"Create database security alert policy min":{"value":"testdb"}}},{"description":"The name of the security alert policy.","in":"path","name":"securityAlertPolicyName","required":true,"x-ms-enum":{"modelAsString":true,"name":"SecurityAlertPolicyName"},"schema":{"type":"string","enum":["default"]},"examples":{"Create database security alert policy max":{"value":"default"},"Create database security alert policy min":{"value":"default"}}},{"description":"The API version to use for the request.","in":"query","name":"api-version","required":true,"x-ms-parameter-location":"client","schema":{"type":"string"},"examples":{"Create database security alert policy max":{"value":"2014-04-01"},"Create database security alert policy min":{"value":"2014-04-01"}}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseSecurityAlertPolicy"}}},"description":"The database Threat Detection policy.","required":true},"responses":{"200":{"description":"Successfully updated the database Threat Detection policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseSecurityAlertPolicy"},"examples":{"Create database security alert policy max":{"$ref":"#/components/examples/Create_database_security_alert_policy_max"},"Create database security alert policy min":{"$ref":"#/components/examples/Create_database_security_alert_policy_min"}}}}},"201":{"description":"Successfully created the database Threat Detection policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseSecurityAlertPolicy"},"examples":{"Create database security alert policy max":{"$ref":"#/components/examples/Create_database_security_alert_policy_max"},"Create database security alert policy min":{"$ref":"#/components/examples/Create_database_security_alert_policy_min"}}}}},"default":{"description":"*** Error Responses: ***\n\n * 500 UpsertDatabaseSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later * 500 DatabaseIsUnavailable - Your settings are currently unavailable, please try again later"}},"tags":["SecurityAlert"]}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"Get_database_security_alert_policy":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/servers/securityalert-2080/databases/testdb","kind":"V12","location":"Japan East","name":"default","properties":{"disabledAlerts":"Usage_Anomaly","emailAccountAdmins":"Enabled","emailAddresses":"test@microsoft.com;user@microsoft.com","retentionDays":0,"state":"Enabled","storageAccountAccessKey":"","storageEndpoint":"","useServerDefault":"Enabled"},"type":"Microsoft.Sql/servers/databases/securityAlertPolicies"}},"Create_database_security_alert_policy_max":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/databases/testdb","kind":"V12","name":"default","properties":{"disabledAlerts":"Access_Anomaly;Usage_Anomaly","emailAccountAdmins":"Enabled","emailAddresses":"test@microsoft.com;user@microsoft.com","retentionDays":6,"state":"Enabled","storageAccountAccessKey":"sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==","storageEndpoint":"https://mystorage.blob.core.windows.net","useServerDefault":"Enabled"},"type":"Microsoft.Sql/servers/databases/securityAlertPolicies"}},"Create_database_security_alert_policy_min":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/databases/testdb","kind":"V12","name":"default","properties":{"disabledAlerts":"","emailAccountAdmins":"Enabled","emailAddresses":"","retentionDays":0,"state":"Enabled","storageAccountAccessKey":"sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==","storageEndpoint":"https://mystorage.blob.core.windows.net","useServerDefault":"Enabled"},"type":"Microsoft.Sql/servers/databases/securityAlertPolicies"}}},"parameters":{"ServerNameParameter":{"description":"The name of the server.","in":"path","name":"serverName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Get database security alert policy":{"value":"securityalert-2080"},"Create database security alert policy max":{"value":"securityalert-6440"},"Create database security alert policy min":{"value":"securityalert-6440"}}}},"securitySchemes":{"azure_auth":{"description":"Azure Active Directory OAuth2 Flow","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.microsoftonline.com/common/oauth2/authorize","scopes":{"user_impersonation":"impersonate your user account"}}}}},"schemas":{"DatabaseSecurityAlertPolicy":{"allOf":[{"allOf":[{"description":"ARM 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":"ARM proxy resource.","properties":{},"type":"object"}],"description":"Contains information about a database Threat Detection policy.","properties":{"kind":{"description":"Resource kind.","readOnly":true,"type":"string"},"location":{"description":"The geo-location where the resource lives","type":"string","x-ms-mutability":["read","create"]},"properties":{"$ref":"#/components/schemas/DatabaseSecurityAlertPolicyProperties"}},"type":"object"},"DatabaseSecurityAlertPolicyProperties":{"description":"Properties for a database Threat Detection policy.","properties":{"disabledAlerts":{"description":"Specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; Data_Exfiltration; Unsafe_Action.","type":"string"},"emailAccountAdmins":{"description":"Specifies that the alert is sent to the account administrators.","enum":["Enabled","Disabled"],"type":"string","x-ms-enum":{"name":"SecurityAlertPolicyEmailAccountAdmins"}},"emailAddresses":{"description":"Specifies the semicolon-separated list of e-mail addresses to which the alert is sent.","type":"string"},"retentionDays":{"description":"Specifies the number of days to keep in the Threat Detection audit logs.","format":"int32","type":"integer"},"state":{"description":"Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.","enum":["New","Enabled","Disabled"],"type":"string","x-ms-enum":{"name":"SecurityAlertPolicyState"}},"storageAccountAccessKey":{"description":"Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required.","type":"string","x-ms-mutability":["create","update"]},"storageEndpoint":{"description":"Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. If state is Enabled, storageEndpoint is required.","type":"string"},"useServerDefault":{"description":"Specifies whether to use the default server policy.","enum":["Enabled","Disabled"],"type":"string","x-ms-enum":{"name":"SecurityAlertPolicyUseServerDefault"}}},"required":["state"],"type":"object"}}}}