UNPKG

openapi-directory

Version:

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

1 lines 18.2 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/serverSecurityAlertPolicies.json","version":"2.0"}],"x-providerName":"azure.com","x-serviceName":"sql-serverSecurityAlertPolicies","x-tags":["Azure","Microsoft"]},"paths":{"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies":{"get":{"description":"Get the server's threat detection policies.","operationId":"ServerSecurityAlertPolicies_ListByServer","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"$ref":"#/components/parameters/ServerNameParameter"},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"Successfully retrieved the server threat detection policies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogicalServerSecurityAlertPolicyListResult"},"examples":{"List the server's threat detection policies":{"$ref":"#/components/examples/List_the_server_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":["ServerSecurityAlertPolicies"],"x-ms-pageable":{"nextLinkName":"nextLink"}}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}":{"get":{"description":"Get a server's security alert policy.","operationId":"ServerSecurityAlertPolicies_Get","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"$ref":"#/components/parameters/ServerNameParameter"},{"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 server's threat detection policy":{"value":"Default"}}},{"$ref":"#/components/parameters/SubscriptionIdParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"Successfully retrieved the server threat detection policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerSecurityAlertPolicy"},"examples":{"Get a server's threat detection policy":{"$ref":"#/components/examples/Get_a_server_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":["ServerSecurityAlertPolicies"]},"put":{"description":"Creates or updates a threat detection policy.","operationId":"ServerSecurityAlertPolicies_CreateOrUpdate","parameters":[{"$ref":"#/components/parameters/ResourceGroupParameter"},{"$ref":"#/components/parameters/ServerNameParameter"},{"description":"The name of the threat detection policy.","in":"path","name":"securityAlertPolicyName","required":true,"x-ms-enum":{"modelAsString":true,"name":"SecurityAlertPolicyName"},"schema":{"type":"string","enum":["Default"]},"examples":{"Update a server's threat detection policy with all parameters":{"value":"Default"},"Update a server'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/ServerSecurityAlertPolicy"}}},"description":"The server security alert policy.","required":true},"responses":{"200":{"description":"Successfully updated the threat detection policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerSecurityAlertPolicy"},"examples":{"Update a server's threat detection policy with all parameters":{"$ref":"#/components/examples/Update_a_server_s_threat_detection_policy_with_all_parameters"},"Update a server's threat detection policy with minimal parameters":{"$ref":"#/components/examples/Update_a_server_s_threat_detection_policy_with_minimal_parameters"}}}}},"202":{"description":"Created request to set the server 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 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later"}},"tags":["ServerSecurityAlertPolicies"],"x-ms-long-running-operation":true}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"List_the_server_s_threat_detection_policies":{"value":{"value":[{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies","name":"Default","properties":{"disabledAlerts":["Access_Anomaly"],"emailAccountAdmins":true,"emailAddresses":["test@microsoft.com;user@microsoft.com"],"retentionDays":0,"state":"Disabled","storageAccountAccessKey":"","storageEndpoint":"https://mystorage.blob.core.windows.net"},"type":"Microsoft.Sql/servers/securityAlertPolicies"}]}},"Get_a_server_s_threat_detection_policy":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies/default","name":"Default","properties":{"disabledAlerts":["Access_Anomaly"],"emailAccountAdmins":true,"emailAddresses":["test@microsoft.com;user@microsoft.com"],"retentionDays":0,"state":"Disabled","storageAccountAccessKey":"","storageEndpoint":"https://mystorage.blob.core.windows.net"},"type":"Microsoft.Sql/servers/securityAlertPolicies"}},"Update_a_server_s_threat_detection_policy_with_all_parameters":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies/default","name":"Default","properties":{"disabledAlerts":["Access_Anomaly","Usage_Anomaly"],"emailAccountAdmins":true,"emailAddresses":["testSecurityAlert@microsoft.com"],"retentionDays":5,"state":"Enabled","storageAccountAccessKey":"","storageEndpoint":"https://mystorage.blob.core.windows.net"},"type":"Microsoft.Sql/servers/securityAlertPolicies"}},"Update_a_server_s_threat_detection_policy_with_minimal_parameters":{"value":{"id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.Sql/servers/securityalert-6440/securityAlertPolicies/default","name":"Default","properties":{"disabledAlerts":[""],"emailAccountAdmins":true,"emailAddresses":[""],"retentionDays":0,"state":"Enabled","storageAccountAccessKey":"","storageEndpoint":"https://mystorage.blob.core.windows.net"},"type":"Microsoft.Sql/servers/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":{"List the server's threat detection policies":{"value":"2017-03-01-preview"},"Get a server's threat detection policy":{"value":"2017-03-01-preview"},"Update a server's threat detection policy with all parameters":{"value":"2017-03-01-preview"},"Update a server'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":{"List the server's threat detection policies":{"value":"securityalert-4799"},"Get a server's threat detection policy":{"value":"securityalert-4799"},"Update a server's threat detection policy with all parameters":{"value":"securityalert-4799"},"Update a server'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"},"examples":{"List the server's threat detection policies":{"value":"securityalert-6440"},"Get a server's threat detection policy":{"value":"securityalert-6440"},"Update a server's threat detection policy with all parameters":{"value":"securityalert-6440"},"Update a server's threat detection policy with minimal parameters":{"value":"securityalert-6440"}}},"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":{"List the server's threat detection policies":{"value":"00000000-1111-2222-3333-444444444444"},"Get a server's threat detection policy":{"value":"00000000-1111-2222-3333-444444444444"},"Update a server's threat detection policy with all parameters":{"value":"00000000-1111-2222-3333-444444444444"},"Update a server'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":{"LogicalServerSecurityAlertPolicyListResult":{"description":"A list of the server'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/ServerSecurityAlertPolicy"},"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"},"ServerSecurityAlertPolicy":{"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 server security alert policy.","properties":{"properties":{"$ref":"#/components/schemas/SecurityAlertPolicyProperties"}},"type":"object"}}}}