{ "swagger": "2.0", "info": { "title": "SqlManagementClient", "version": "2025-01-01", "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.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } }, "tags": [ { "name": "ManagedDatabaseSecurityEvents" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityEvents": { "get": { "operationId": "ManagedDatabaseSecurityEvents_ListByDatabase", "tags": [ "ManagedDatabaseSecurityEvents" ], "description": "Gets a list of security events.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string" }, { "name": "$filter", "in": "query", "description": "An OData filter expression that filters elements in the collection.", "required": false, "type": "string" }, { "name": "$skip", "in": "query", "description": "The number of elements in the collection to skip.", "required": false, "type": "integer", "format": "int64" }, { "name": "$top", "in": "query", "description": "The number of elements to return from the collection.", "required": false, "type": "integer", "format": "int64" }, { "name": "$skiptoken", "in": "query", "description": "An opaque token that identifies a starting point in the collection.", "required": false, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/SecurityEventCollection" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get the managed database's security events with maximal parameters": { "$ref": "./examples/ManagedDatabaseSecurityEventsGetMax.json" }, "Get the managed database's security events with minimal parameters": { "$ref": "./examples/ManagedDatabaseSecurityEventsGetMin.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } } }, "definitions": { "SecurityEvent": { "type": "object", "description": "A security event.", "properties": { "properties": { "$ref": "#/definitions/SecurityEventProperties", "description": "Resource properties.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "SecurityEventCollection": { "type": "object", "description": "A list of security events.", "properties": { "value": { "type": "array", "description": "The SecurityEvent items on this page", "items": { "$ref": "#/definitions/SecurityEvent" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "SecurityEventProperties": { "type": "object", "description": "The properties of a security event.", "properties": { "eventTime": { "type": "string", "format": "date-time", "description": "The time when the security event occurred.", "readOnly": true }, "securityEventType": { "$ref": "./common.json#/definitions/SecurityEventType", "description": "The type of the security event.", "readOnly": true }, "subscription": { "type": "string", "description": "The subscription name", "readOnly": true }, "server": { "type": "string", "description": "The server name", "readOnly": true }, "database": { "type": "string", "description": "The database name", "readOnly": true }, "clientIp": { "type": "string", "description": "The IP address of the client who executed the statement.", "readOnly": true }, "applicationName": { "type": "string", "description": "The application used to execute the statement.", "readOnly": true }, "principalName": { "type": "string", "description": "The principal user who executed the statement", "readOnly": true }, "securityEventSqlInjectionAdditionalProperties": { "$ref": "#/definitions/SecurityEventSqlInjectionAdditionalProperties", "description": "The sql injection additional properties, populated only if the type of the security event is sql injection.", "readOnly": true } } }, "SecurityEventSqlInjectionAdditionalProperties": { "type": "object", "description": "The properties of a security event sql injection additional properties.", "properties": { "threatId": { "type": "string", "description": "The threat ID.", "readOnly": true }, "statement": { "type": "string", "description": "The statement", "readOnly": true }, "statementHighlightOffset": { "type": "integer", "format": "int32", "description": "The statement highlight offset", "readOnly": true }, "statementHighlightLength": { "type": "integer", "format": "int32", "description": "The statement highlight length", "readOnly": true }, "errorCode": { "type": "integer", "format": "int32", "description": "The sql error code", "readOnly": true }, "errorSeverity": { "type": "integer", "format": "int32", "description": "The sql error severity", "readOnly": true }, "errorMessage": { "type": "string", "description": "The sql error message", "readOnly": true } } }, "SecurityEventsFilterParameters": { "type": "object", "description": "The properties that are supported in the $filter operation.", "properties": { "eventTime": { "type": "string", "format": "date-time", "description": "Filter on the event time." }, "showServerRecords": { "type": "boolean", "description": "Whether to show server records or not." } } } }, "parameters": {} }