{ "swagger": "2.0", "info": { "version": "2014-04-01", "title": "SqlManagementClient", "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." }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingPolicies/{tableAuditingPolicyName}": { "get": { "tags": [ "TableAuditing" ], "description": "Gets a server's table auditing policy. Table auditing is deprecated, use blob auditing instead.", "deprecated": true, "operationId": "ServerTableAuditingPolicies_Get", "x-ms-examples": { "Get server table auditing policy": { "$ref": "./examples/ServerTableAuditingPolicyGet.json" } }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "$ref": "#/parameters/TableAuditingPolicyNameParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully retrieved the server table auditing policy.", "schema": { "$ref": "#/definitions/ServerTableAuditingPolicy" } } } }, "put": { "tags": [ "TableAuditing" ], "description": "Creates or updates a server's table auditing policy. Table auditing is deprecated, use blob auditing instead.", "deprecated": true, "operationId": "ServerTableAuditingPolicies_CreateOrUpdate", "x-ms-examples": { "Create or update server table auditing policy": { "$ref": "./examples/ServerTableAuditingPolicyCreateOrUpdate.json" } }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "$ref": "#/parameters/TableAuditingPolicyNameParameter" }, { "name": "parameters", "in": "body", "description": "The server table auditing policy.", "required": true, "schema": { "$ref": "#/definitions/ServerTableAuditingPolicy" } }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully set the server table auditing policy.", "schema": { "$ref": "#/definitions/ServerTableAuditingPolicy" } }, "201": { "description": "Successfully created the server table auditing policy.", "schema": { "$ref": "#/definitions/ServerTableAuditingPolicy" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingPolicies": { "get": { "tags": [ "TableAuditing" ], "description": "Lists a server's table auditing policies. Table auditing is deprecated, use blob auditing instead.", "deprecated": true, "operationId": "ServerTableAuditingPolicies_ListByServer", "x-ms-examples": { "List server table auditing policy": { "$ref": "./examples/ServerTableAuditingPolicyList.json" } }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully retrieved the server table auditing policies.", "schema": { "$ref": "#/definitions/ServerTableAuditingPolicyListResult" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingPolicies/{tableAuditingPolicyName}": { "get": { "tags": [ "TableAuditing" ], "description": "Gets a database's table auditing policy. Table auditing is deprecated, use blob auditing instead.", "deprecated": true, "operationId": "DatabaseTableAuditingPolicies_Get", "x-ms-examples": { "Get database table auditing policy": { "$ref": "./examples/DatabaseTableAuditingPolicyGet.json" } }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "name": "databaseName", "in": "path", "description": "The name of the database for which the table audit policy is defined.", "required": true, "type": "string" }, { "$ref": "#/parameters/TableAuditingPolicyNameParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully retrieved the database table auditing policy.", "schema": { "$ref": "#/definitions/DatabaseTableAuditingPolicy" } } } }, "put": { "tags": [ "TableAuditing" ], "description": "Creates or updates a database's table auditing policy. Table auditing is deprecated, use blob auditing instead.", "deprecated": true, "operationId": "DatabaseTableAuditingPolicies_CreateOrUpdate", "x-ms-examples": { "Create or update database table auditing policy": { "$ref": "./examples/DatabaseTableAuditingPolicyCreateOrUpdate.json" } }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "name": "databaseName", "in": "path", "description": "The name of the database for which the table auditing policy will be defined.", "required": true, "type": "string" }, { "$ref": "#/parameters/TableAuditingPolicyNameParameter" }, { "name": "parameters", "in": "body", "description": "The database table auditing policy.", "required": true, "schema": { "$ref": "#/definitions/DatabaseTableAuditingPolicy" } }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully set the database table auditing policy.", "schema": { "$ref": "#/definitions/DatabaseTableAuditingPolicy" } }, "201": { "description": "Successfully created the database table auditing policy.", "schema": { "$ref": "#/definitions/DatabaseTableAuditingPolicy" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingPolicies": { "get": { "tags": [ "TableAuditing" ], "description": "Lists a database's table auditing policies. Table auditing is deprecated, use blob auditing instead.", "deprecated": true, "operationId": "DatabaseTableAuditingPolicies_ListByDatabase", "x-ms-examples": { "Get database table auditing policy": { "$ref": "./examples/DatabaseTableAuditingPolicyGet.json" } }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "name": "databaseName", "in": "path", "description": "The name of the database for which the table audit policy is defined.", "required": true, "type": "string" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully retrieved the database table auditing policies.", "schema": { "$ref": "#/definitions/DatabaseTableAuditingPolicyListResult" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/connectionPolicies/{connectionPolicyName}": { "get": { "tags": [ "TableAuditing" ], "description": "Gets a database's connection policy, which is used with table auditing. Table auditing is deprecated, use blob auditing instead.", "deprecated": true, "operationId": "DatabaseConnectionPolicies_Get", "x-ms-examples": { "Get database table auditing policy": { "$ref": "./examples/DatabaseConnectionPolicyGet.json" } }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "name": "databaseName", "in": "path", "description": "The name of the database for which the connection policy is defined.", "required": true, "type": "string" }, { "$ref": "#/parameters/ConnectionPolicyNameParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully retrieved the database connection policy.", "schema": { "$ref": "#/definitions/DatabaseConnectionPolicy" } } } }, "put": { "tags": [ "TableAuditing" ], "description": "Creates or updates a database's connection policy, which is used with table auditing. Table auditing is deprecated, use blob auditing instead.", "deprecated": true, "operationId": "DatabaseConnectionPolicies_CreateOrUpdate", "x-ms-examples": { "Create or update database connection policy": { "$ref": "./examples/DatabaseConnectionPolicyCreateOrUpdate.json" } }, "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "name": "databaseName", "in": "path", "description": "The name of the database for which the connection policy will be defined.", "required": true, "type": "string" }, { "$ref": "#/parameters/ConnectionPolicyNameParameter" }, { "name": "parameters", "in": "body", "description": "The database connection policy.", "required": true, "schema": { "$ref": "#/definitions/DatabaseConnectionPolicy" } }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully set the database connection policy.", "schema": { "$ref": "#/definitions/DatabaseConnectionPolicy" } }, "201": { "description": "Successfully created the database connection policy.", "schema": { "$ref": "#/definitions/DatabaseConnectionPolicy" } } } } } }, "definitions": { "TableAuditingPolicyProperties": { "description": "Properties of a table auditing policy.", "type": "object", "properties": { "auditingState": { "description": "The state of the policy.", "type": "string" }, "auditLogsTableName": { "description": "The audit logs table name.", "type": "string" }, "eventTypesToAudit": { "description": "Comma-separated list of event types to audit.", "type": "string" }, "fullAuditLogsTableName": { "description": "The full audit logs table name.", "type": "string" }, "retentionDays": { "description": "The number of days to keep in the audit logs.", "type": "string" }, "storageAccountKey": { "description": "The key of the auditing storage account.", "type": "string" }, "storageAccountName": { "description": "The table storage account name", "type": "string" }, "storageAccountResourceGroupName": { "description": "The table storage account resource group name", "type": "string" }, "storageAccountSecondaryKey": { "description": "The secondary key of the auditing storage account.", "type": "string" }, "storageAccountSubscriptionId": { "format": "uuid", "description": "The table storage subscription Id.", "type": "string" }, "storageTableEndpoint": { "description": "The storage table endpoint.", "type": "string" } } }, "DatabaseTableAuditingPolicyProperties": { "description": "Properties of a database table auditing policy.", "properties": { "useServerDefault": { "description": "Whether server default is enabled or disabled.", "type": "string" } }, "allOf": [ { "$ref": "#/definitions/TableAuditingPolicyProperties" } ] }, "ServerTableAuditingPolicyProperties": { "description": "Properties of a server table auditing policy.", "allOf": [ { "$ref": "#/definitions/TableAuditingPolicyProperties" } ] }, "DatabaseConnectionPolicyProperties": { "description": "Properties of a database connection policy.", "type": "object", "properties": { "securityEnabledAccess": { "description": "The state of security access.", "type": "string" }, "proxyDnsName": { "description": "The fully qualified host name of the auditing proxy.", "type": "string" }, "proxyPort": { "description": "The port number of the auditing proxy.", "type": "string" }, "visibility": { "description": "The visibility of the auditing proxy.", "type": "string" }, "useServerDefault": { "description": "Whether server default is enabled or disabled.", "type": "string" }, "redirectionState": { "description": "The state of proxy redirection.", "type": "string" }, "state": { "description": "The connection policy state.", "type": "string" } } }, "DatabaseConnectionPolicy": { "description": "A database connection policy.", "type": "object", "allOf": [ { "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" } ], "properties": { "kind": { "description": "Resource kind.", "type": "string", "readOnly": true }, "location": { "type": "string", "readOnly": true, "description": "Resource location." }, "properties": { "$ref": "#/definitions/DatabaseConnectionPolicyProperties", "description": "Resource properties.", "x-ms-client-flatten": true } } }, "DatabaseTableAuditingPolicy": { "description": "A database table auditing policy.", "type": "object", "allOf": [ { "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" } ], "properties": { "kind": { "description": "Resource kind.", "type": "string", "readOnly": true }, "location": { "type": "string", "readOnly": true, "description": "Resource location." }, "properties": { "$ref": "#/definitions/DatabaseTableAuditingPolicyProperties", "description": "Resource properties.", "x-ms-client-flatten": true } } }, "ServerTableAuditingPolicy": { "description": "A server table auditing policy.", "type": "object", "allOf": [ { "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" } ], "properties": { "kind": { "description": "Resource kind.", "type": "string", "readOnly": true }, "location": { "type": "string", "readOnly": true, "description": "Resource location." }, "properties": { "$ref": "#/definitions/ServerTableAuditingPolicyProperties", "description": "Resource properties.", "x-ms-client-flatten": true } } }, "DatabaseTableAuditingPolicyListResult": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/DatabaseTableAuditingPolicy" }, "description": "The list of database table auditing policies." } }, "required": [ "value" ], "description": "Represents the response to a list database table auditing policies request." }, "ServerTableAuditingPolicyListResult": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/ServerTableAuditingPolicy" }, "description": "The list of server table auditing policies." } }, "required": [ "value" ], "description": "Represents the response to a list server table auditing policies request." } }, "parameters": { "ServerNameParameter": { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "DatabaseNameParameter": { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "TableAuditingPolicyNameParameter": { "name": "tableAuditingPolicyName", "in": "path", "description": "The name of the table auditing policy.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "TableAuditingPolicyName", "modelAsString": true }, "x-ms-parameter-location": "method" }, "ConnectionPolicyNameParameter": { "name": "connectionPolicyName", "in": "path", "description": "The name of the connection policy.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "ConnectionPolicyName", "modelAsString": true }, "x-ms-parameter-location": "method" } }, "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" } } } }