UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 18.8 kB
{"openapi":"3.0.0","info":{"description":"The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities.","title":"SqlManagementClient","version":"2017-03-01-preview","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/preview/2017-03-01-preview/ManagedDatabaseSecurityAlertPolicies.json","version":"2.0"}],"x-providerName":"azure.com","x-serviceName":"sql-ManagedDatabaseSecurityAlertPolicies","x-tags":["Azure","Microsoft"]},"paths":{"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies":{"get":{"description":"Gets a list of managed database's security alert policies.","operationId":"ManagedDatabaseSecurityAlertPolicies_ListByDatabase","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"description":"The name of the managed instance.","in":"path","name":"managedInstanceName","required":true,"schema":{"type":"string"},"examples":{"Get a list of the database's threat detection policies.":{"value":"securityalert-2080"}}},{"description":"The name of the managed database for which the security alert policies are defined.","in":"path","name":"databaseName","required":true,"schema":{"type":"string"},"examples":{"Get a list of the database's threat detection policies.":{"value":"testdb"}}},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"Successfully retrieved the managed database security alert policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedDatabaseSecurityAlertPolicyListResult"},"examples":{"Get a list of the database's threat detection policies.":{"$ref":"#/components/examples/Get_a_list_of_the_database_s_threat_detection_policies."}}}}},"default":{"description":"*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings"}},"tags":["ManagedDatabaseSecurityAlertPolicies"],"x-ms-pageable":{"nextLinkName":"nextLink"}}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}":{"get":{"description":"Gets a managed database's security alert policy.","operationId":"ManagedDatabaseSecurityAlertPolicies_Get","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"description":"The name of the managed instance.","in":"path","name":"managedInstanceName","required":true,"schema":{"type":"string"},"examples":{"Get a database's threat detection policy":{"value":"securityalert-2080"}}},{"description":"The name of the managed database for which the security alert policy is defined.","in":"path","name":"databaseName","required":true,"schema":{"type":"string"},"examples":{"Get a database's threat detection 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 a database's threat detection policy":{"value":"default"}}},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"Successfully retrieved the managed database security alert policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedDatabaseSecurityAlertPolicy"},"examples":{"Get a database's threat detection policy":{"$ref":"#/components/examples/Get_a_database_s_threat_detection_policy"}}}}},"default":{"description":"*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings"}},"tags":["ManagedDatabaseSecurityAlertPolicies"]},"put":{"description":"Creates or updates a database's security alert policy.","operationId":"ManagedDatabaseSecurityAlertPolicies_CreateOrUpdate","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"description":"The name of the managed instance.","in":"path","name":"managedInstanceName","required":true,"schema":{"type":"string"},"examples":{"Update a database's threat detection policy with all parameters":{"value":"securityalert-6440"},"Update a database's threat detection policy with minimal parameters":{"value":"securityalert-6440"}}},{"description":"The name of the managed database for which the security alert policy is defined.","in":"path","name":"databaseName","required":true,"schema":{"type":"string"},"examples":{"Update a database's threat detection policy with all parameters":{"value":"testdb"},"Update a database's threat detection policy with minimal parameters":{"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":{"Update a database's threat detection policy with all parameters":{"value":"default"},"Update a database's threat detection policy with minimal parameters":{"value":"default"}}},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedDatabaseSecurityAlertPolicy"}}},"description":"The database security alert policy.","required":true},"responses":{"200":{"description":"Successfully set the managed database security alert policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedDatabaseSecurityAlertPolicy"},"examples":{"Update a database's threat detection policy with all parameters":{"$ref":"#/components/examples/Update_a_database_s_threat_detection_policy_with_all_parameters"},"Update a database's threat detection policy with minimal parameters":{"$ref":"#/components/examples/Update_a_database_s_threat_detection_policy_with_minimal_parameters"}}}}},"201":{"description":"Successfully created the managed database security alert policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedDatabaseSecurityAlertPolicy"},"examples":{"Update a database's threat detection policy with all parameters":{"$ref":"#/components/examples/Update_a_database_s_threat_detection_policy_with_all_parameters"},"Update a database's threat detection policy with minimal parameters":{"$ref":"#/components/examples/Update_a_database_s_threat_detection_policy_with_minimal_parameters"}}}}},"default":{"description":"*** Error Responses: ***"}},"tags":["ManagedDatabaseSecurityAlertPolicies"]}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"Get_a_list_of_the_database_s_threat_detection_policies.":{"value":{"value":[{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/managedInstances/securityalert-2080/databases/testdb","kind":"V12","location":"Japan East","name":"default","properties":{"disabledAlerts":["Usage_Anomaly"],"emailAccountAdmins":true,"emailAddresses":["test@microsoft.com","user@microsoft.com"],"retentionDays":0,"state":"Enabled","storageAccountAccessKey":"","storageEndpoint":""},"type":"Microsoft.Sql/managedInstances/databases/securityAlertPolicies"}]}},"Get_a_database_s_threat_detection_policy":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-6852/providers/Microsoft.Sql/managedInstances/securityalert-2080/databases/testdb","name":"default","properties":{"disabledAlerts":["Usage_Anomaly"],"emailAccountAdmins":true,"emailAddresses":["test@microsoft.com","user@microsoft.com"],"retentionDays":0,"state":"Enabled","storageAccountAccessKey":"","storageEndpoint":""},"type":"Microsoft.Sql/managedInstances/databases/securityAlertPolicies"}},"Update_a_database_s_threat_detection_policy_with_all_parameters":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440/databases/testdb","kind":"V12","name":"default","properties":{"disabledAlerts":["Access_Anomaly","Usage_Anomaly"],"emailAccountAdmins":true,"emailAddresses":["test@microsoft.com","user@microsoft.com"],"retentionDays":6,"state":"Enabled","storageAccountAccessKey":"sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==","storageEndpoint":"https://mystorage.blob.core.windows.net","useServerDefault":"Disabled"},"type":"Microsoft.Sql/managedInstances/databases/securityAlertPolicies"}},"Update_a_database_s_threat_detection_policy_with_minimal_parameters":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/managedInstances/securityalert-6440/databases/testdb","kind":"V12","name":"default","properties":{"disabledAlerts":[],"emailAccountAdmins":true,"emailAddresses":[],"retentionDays":0,"state":"Enabled","storageAccountAccessKey":"","storageEndpoint":""},"type":"Microsoft.Sql/managedInstance/databases/securityAlertPolicies"}}},"parameters":{"ApiVersionParameter":{"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 a list of the database's threat detection policies.":{"value":"2017-03-01=preview"},"Get a database's threat detection policy":{"value":"2017-03-01=preview"},"Update a database's threat detection policy with all parameters":{"value":"2017-03-01-preview"},"Update a database's threat detection policy with minimal parameters":{"value":"2017-03-01-preview"}}},"BlobAuditingPolicyNameParameter":{"description":"The name of the blob auditing policy.","in":"path","name":"blobAuditingPolicyName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","enum":["default"]}},"DatabaseNameParameter":{"description":"The name of the database.","in":"path","name":"databaseName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"}},"ManagedInstanceNameParameter":{"description":"The name of the managed instance.","in":"path","name":"managedInstanceName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"}},"ResourceGroupParameter":{"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 a list of the database's threat detection policies.":{"value":"securityalert-6852"},"Get a database's threat detection policy":{"value":"securityalert-6852"},"Update a database's threat detection policy with all parameters":{"value":"securityalert-4799"},"Update a database's threat detection policy with minimal parameters":{"value":"securityalert-4799"}}},"ServerNameParameter":{"description":"The name of the server.","in":"path","name":"serverName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"}},"SqlVirtualMachineContainerNameParameter":{"description":"The name of the SqlVirtualMachineContainer.","in":"path","name":"sqlVirtualMachineContainerName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"}},"SqlVirtualMachineInstanceNameParameter":{"description":"The name of the SqlVirtualMachineInstance.","in":"path","name":"sqlVirtualMachineInstanceName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"}},"SubscriptionIdParameter":{"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 a list of the database's threat detection policies.":{"value":"00000000-1111-2222-3333-444444444444"},"Get a database's threat detection policy":{"value":"00000000-1111-2222-3333-444444444444"},"Update a database's threat detection policy with all parameters":{"value":"00000000-1111-2222-3333-444444444444"},"Update a database's threat detection policy with minimal parameters":{"value":"00000000-1111-2222-3333-444444444444"}}},"VirtualClusterNameParameter":{"description":"The name of the virtual cluster.","in":"path","name":"virtualClusterName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"}}},"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":{"ManagedDatabaseSecurityAlertPolicy":{"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":"A managed database security alert policy.","properties":{"properties":{"$ref":"#/components/schemas/SecurityAlertPolicyProperties"}},"type":"object"},"ManagedDatabaseSecurityAlertPolicyListResult":{"description":"A list of the managed database's security alert policies.","properties":{"nextLink":{"description":"Link to retrieve next page of results.","readOnly":true,"type":"string"},"value":{"description":"Array of results.","items":{"$ref":"#/components/schemas/ManagedDatabaseSecurityAlertPolicy"},"readOnly":true,"type":"array"}},"type":"object"},"SecurityAlertPolicyProperties":{"description":"Properties of a security alert policy.","properties":{"creationTime":{"description":"Specifies the UTC creation time of the policy.","format":"date-time","readOnly":true,"type":"string"},"disabledAlerts":{"description":"Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action","items":{"type":"string"},"type":"array"},"emailAccountAdmins":{"description":"Specifies that the alert is sent to the account administrators.","type":"boolean"},"emailAddresses":{"description":"Specifies an array of e-mail addresses to which the alert is sent.","items":{"type":"string"},"type":"array"},"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, whether it is enabled or disabled or a policy has not been applied yet on the specific database.","enum":["New","Enabled","Disabled"],"type":"string","x-ms-enum":{"modelAsString":false,"name":"SecurityAlertPolicyState"}},"storageAccountAccessKey":{"description":"Specifies the identifier key of the Threat Detection audit storage account.","type":"string"},"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.","type":"string"}},"required":["state"],"type":"object"}}}}