diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/BlobAuditing.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/BlobAuditing.json index 848f89c87487..36a60c444c4f 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/BlobAuditing.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/BlobAuditing.json @@ -16,13 +16,13 @@ "application/json" ], "paths": { - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}": { "get": { "tags": [ "BlobAuditing" ], - "description": "Gets an extended database's blob auditing policy.", - "operationId": "ExtendedDatabaseBlobAuditingPolicies_Get", + "description": "Gets a database's blob auditing policy.", + "operationId": "DatabaseBlobAuditingPolicies_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -45,18 +45,18 @@ ], "responses": { "200": { - "description": "Successfully retrieved the extended database blob auditing policy.", + "description": "Successfully retrieved the database blob auditing policy.", "schema": { - "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { - "Get an extended database's blob auditing policy": { - "$ref": "./examples/ExtendedDatabaseBlobAuditingGet.json" + "Get a database's blob auditing policy": { + "$ref": "./examples/DatabaseBlobAuditingGet.json" } } }, @@ -64,8 +64,8 @@ "tags": [ "BlobAuditing" ], - "description": "Creates or updates an extended database's blob auditing policy.", - "operationId": "ExtendedDatabaseBlobAuditingPolicies_CreateOrUpdate", + "description": "Creates or updates a database's blob auditing policy.", + "operationId": "DatabaseBlobAuditingPolicies_CreateOrUpdate", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -82,10 +82,10 @@ { "name": "parameters", "in": "body", - "description": "The extended database blob auditing policy.", + "description": "The database blob auditing policy.", "required": true, "schema": { - "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" } }, { @@ -97,41 +97,41 @@ ], "responses": { "200": { - "description": "Successfully set the extended database blob auditing policy.", + "description": "Successfully set the database blob auditing policy.", "schema": { - "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 400 BlobAuditingPredicateExpressionSyntaxError - Invalid value of parameter 'predicateExpression'.\n\n * 400 InvalidDatabaseBlobAuditingPolicyCreateRequest - The create database blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 BlobAuditingPredicateExpressionEmpty - Invalid parameter 'predicateExpression', value can not be empty.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 BlobAuditingInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 BlobAuditingStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 BlobAuditingNoServerIdentity - The server identity is not correctly configured.\n\n * 400 BlobAuditingStorageOutboundFirewallNotAllowed - Storage account is not in the list of allowed FQDNs, and, therefore, the outbound firewall rules will block the request.\n\n * 400 InvalidBlobAuditActionsAndGroupsForDW - Unsupported audit actions or action groups for DW.\n\n * 400 BlobAuditingAdalTokenError - The operation could not get access token for the storage account because an Azure Active Directory error was encountered.\n\n * 400 BlobAuditingInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 BlobAuditingIsNotSupportedOnGeoDr - Blob auditing can be configured on primary databases only.\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 400 InvalidDatabaseBlobAuditingPolicyCreateRequest - The create database blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 BlobAuditingInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 BlobAuditingStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 BlobAuditingNoServerIdentity - The server identity is not correctly configured.\n\n * 400 BlobAuditingStorageOutboundFirewallNotAllowed - Storage account is not in the list of allowed FQDNs, and, therefore, the outbound firewall rules will block the request.\n\n * 400 InvalidBlobAuditActionsAndGroupsForDW - Unsupported audit actions or action groups for DW.\n\n * 400 BlobAuditingAdalTokenError - The operation could not get access token for the storage account because an Azure Active Directory error was encountered.\n\n * 400 BlobAuditingInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 BlobAuditingIsNotSupportedOnGeoDr - Blob auditing can be configured on primary databases only.\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." }, "201": { - "description": "Successfully created the extended database blob auditing policy.", + "description": "Successfully created the database blob auditing policy.", "schema": { - "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" } } }, "x-ms-examples": { - "Create or update an extended database's blob auditing policy with minimal parameters": { - "$ref": "./examples/ExtendedDatabaseBlobAuditingCreateMin.json" + "Create or update a database's blob auditing policy with minimal parameters": { + "$ref": "./examples/DatabaseBlobAuditingCreateMin.json" }, - "Create or update an extended database's blob auditing policy with all parameters": { - "$ref": "./examples/ExtendedDatabaseBlobAuditingCreateMax.json" + "Create or update a database's blob auditing policy with all parameters": { + "$ref": "./examples/DatabaseBlobAuditingCreateMax.json" }, - "Create or update an extended database's azure monitor auditing policy with minimal parameters": { - "$ref": "./examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json" + "Create or update a database's azure monitor auditing policy with minimal parameters": { + "$ref": "./examples/DatabaseAzureMonitorAuditingCreateMin.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings": { "get": { "tags": [ "BlobAuditing" ], - "description": "Lists extended auditing settings of a database.", - "operationId": "ExtendedDatabaseBlobAuditingPolicies_ListByDatabase", + "description": "Lists auditing settings of a database.", + "operationId": "DatabaseBlobAuditingPolicies_ListByDatabase", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -151,32 +151,32 @@ ], "responses": { "200": { - "description": "Successfully retrieved the database extended auditing settings.", + "description": "Successfully retrieved database auditing settings.", "schema": { - "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicyListResult" + "$ref": "#/definitions/DatabaseBlobAuditingPolicyListResult" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { - "List extended auditing settings of a database": { - "$ref": "./examples/DatabaseExtendedAuditingSettingsList.json" + "List audit settings of a database": { + "$ref": "./examples/DatabaseAuditingSettingsList.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}": { "get": { "tags": [ "BlobAuditing" ], - "description": "Gets an extended server's blob auditing policy.", - "operationId": "ExtendedServerBlobAuditingPolicies_Get", + "description": "Gets an extended database's blob auditing policy.", + "operationId": "ExtendedDatabaseBlobAuditingPolicies_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -184,6 +184,9 @@ { "$ref": "#/parameters/ServerNameParameter" }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, { "$ref": "#/parameters/BlobAuditingPolicyNameParameter" }, @@ -196,18 +199,18 @@ ], "responses": { "200": { - "description": "Successfully retrieved the extended server blob auditing policy.", + "description": "Successfully retrieved the extended database blob auditing policy.", "schema": { - "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" } }, "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { - "Get a server's blob extended auditing policy": { - "$ref": "./examples/ExtendedServerBlobAuditingGet.json" + "Get an extended database's blob auditing policy": { + "$ref": "./examples/ExtendedDatabaseBlobAuditingGet.json" } } }, @@ -215,8 +218,8 @@ "tags": [ "BlobAuditing" ], - "description": "Creates or updates an extended server's blob auditing policy.", - "operationId": "ExtendedServerBlobAuditingPolicies_CreateOrUpdate", + "description": "Creates or updates an extended database's blob auditing policy.", + "operationId": "ExtendedDatabaseBlobAuditingPolicies_CreateOrUpdate", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -224,16 +227,19 @@ { "$ref": "#/parameters/ServerNameParameter" }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, { "$ref": "#/parameters/BlobAuditingPolicyNameParameter" }, { "name": "parameters", "in": "body", - "description": "Properties of extended blob auditing policy", + "description": "The extended database blob auditing policy.", "required": true, "schema": { - "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" } }, { @@ -245,36 +251,41 @@ ], "responses": { "200": { - "description": "Successfully updated the extended auditing settings.", + "description": "Successfully set the extended database blob auditing policy.", "schema": { - "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidServerBlobAuditingPolicyCreateRequest - The create server blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 BlobAuditingPredicateExpressionEmpty - Invalid parameter 'predicateExpression', value can not be empty.\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 ServerBlobAuditingPolicyInProgress - Set server blob auditing is already in progress." + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 400 BlobAuditingPredicateExpressionSyntaxError - Invalid value of parameter 'predicateExpression'.\n\n * 400 InvalidDatabaseBlobAuditingPolicyCreateRequest - The create database blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 BlobAuditingPredicateExpressionEmpty - Invalid parameter 'predicateExpression', value can not be empty.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 BlobAuditingInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 BlobAuditingStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 BlobAuditingNoServerIdentity - The server identity is not correctly configured.\n\n * 400 BlobAuditingStorageOutboundFirewallNotAllowed - Storage account is not in the list of allowed FQDNs, and, therefore, the outbound firewall rules will block the request.\n\n * 400 InvalidBlobAuditActionsAndGroupsForDW - Unsupported audit actions or action groups for DW.\n\n * 400 BlobAuditingAdalTokenError - The operation could not get access token for the storage account because an Azure Active Directory error was encountered.\n\n * 400 BlobAuditingInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 BlobAuditingIsNotSupportedOnGeoDr - Blob auditing can be configured on primary databases only.\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." }, - "202": { - "description": "Updating the extended auditing settings is in progress." + "201": { + "description": "Successfully created the extended database blob auditing policy.", + "schema": { + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + } } }, - "x-ms-long-running-operation": true, "x-ms-examples": { - "Update a server's extended blob auditing policy with minimal parameters": { - "$ref": "./examples/ExtendedServerBlobAuditingCreateMin.json" + "Create or update an extended database's blob auditing policy with minimal parameters": { + "$ref": "./examples/ExtendedDatabaseBlobAuditingCreateMin.json" }, - "Update a server's extended blob auditing policy with all parameters": { - "$ref": "./examples/ExtendedServerBlobAuditingCreateMax.json" + "Create or update an extended database's blob auditing policy with all parameters": { + "$ref": "./examples/ExtendedDatabaseBlobAuditingCreateMax.json" + }, + "Create or update an extended database's azure monitor auditing policy with minimal parameters": { + "$ref": "./examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings": { "get": { "tags": [ "BlobAuditing" ], - "description": "Lists extended auditing settings of a server.", - "operationId": "ExtendedServerBlobAuditingPolicies_ListByServer", + "description": "Lists extended auditing settings of a database.", + "operationId": "ExtendedDatabaseBlobAuditingPolicies_ListByDatabase", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -282,6 +293,9 @@ { "$ref": "#/parameters/ServerNameParameter" }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, @@ -291,32 +305,32 @@ ], "responses": { "200": { - "description": "Successfully retrieved extended server auditing settings.", + "description": "Successfully retrieved the database extended auditing settings.", "schema": { - "$ref": "#/definitions/ExtendedServerBlobAuditingPolicyListResult" + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicyListResult" } }, "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { - "List extended auditing settings of a server": { - "$ref": "./examples/ServerExtendedAuditingSettingsList.json" + "List extended auditing settings of a database": { + "$ref": "./examples/DatabaseExtendedAuditingSettingsList.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}": { "get": { "tags": [ "BlobAuditing" ], - "description": "Gets a server's blob auditing policy.", - "operationId": "ServerBlobAuditingPolicies_Get", + "description": "Gets an extended server's blob auditing policy.", + "operationId": "ExtendedServerBlobAuditingPolicies_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -336,18 +350,18 @@ ], "responses": { "200": { - "description": "Successfully retrieved the server blob auditing policy.", + "description": "Successfully retrieved the extended server blob auditing policy.", "schema": { - "$ref": "#/definitions/ServerBlobAuditingPolicy" + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" } }, "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + "description": "*** Error Responses: ***\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" } }, "x-ms-examples": { - "Get a server's blob auditing policy": { - "$ref": "./examples/ServerBlobAuditingGet.json" + "Get a server's blob extended auditing policy": { + "$ref": "./examples/ExtendedServerBlobAuditingGet.json" } } }, @@ -355,8 +369,8 @@ "tags": [ "BlobAuditing" ], - "description": "Creates or updates a server's blob auditing policy.", - "operationId": "ServerBlobAuditingPolicies_CreateOrUpdate", + "description": "Creates or updates an extended server's blob auditing policy.", + "operationId": "ExtendedServerBlobAuditingPolicies_CreateOrUpdate", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -370,10 +384,10 @@ { "name": "parameters", "in": "body", - "description": "Properties of blob auditing policy", + "description": "Properties of extended blob auditing policy", "required": true, "schema": { - "$ref": "#/definitions/ServerBlobAuditingPolicy" + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" } }, { @@ -385,36 +399,36 @@ ], "responses": { "200": { - "description": "Successfully updated the auditing settings.", + "description": "Successfully updated the extended auditing settings.", "schema": { - "$ref": "#/definitions/ServerBlobAuditingPolicy" + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidServerBlobAuditingPolicyCreateRequest - The create server blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 409 ServerBlobAuditingPolicyInProgress - Set server blob auditing is already in progress." + "description": "*** Error Responses: ***\n\n * 400 InvalidServerBlobAuditingPolicyCreateRequest - The create server blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 BlobAuditingPredicateExpressionEmpty - Invalid parameter 'predicateExpression', value can not be empty.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 409 ServerBlobAuditingPolicyInProgress - Set server blob auditing is already in progress." }, "202": { - "description": "Updating the auditing settings is in progress." + "description": "Updating the extended auditing settings is in progress." } }, "x-ms-long-running-operation": true, "x-ms-examples": { - "Update a server's blob auditing policy with minimal parameters": { - "$ref": "./examples/ServerBlobAuditingCreateMin.json" + "Update a server's extended blob auditing policy with minimal parameters": { + "$ref": "./examples/ExtendedServerBlobAuditingCreateMin.json" }, - "Update a server's blob auditing policy with all parameters": { - "$ref": "./examples/ServerBlobAuditingCreateMax.json" + "Update a server's extended blob auditing policy with all parameters": { + "$ref": "./examples/ExtendedServerBlobAuditingCreateMax.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings": { "get": { "tags": [ "BlobAuditing" ], - "description": "Lists auditing settings of a server.", - "operationId": "ServerBlobAuditingPolicies_ListByServer", + "description": "Lists extended auditing settings of a server.", + "operationId": "ExtendedServerBlobAuditingPolicies_ListByServer", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -431,32 +445,32 @@ ], "responses": { "200": { - "description": "Successfully retrieved server auditing settings.", + "description": "Successfully retrieved extended server auditing settings.", "schema": { - "$ref": "#/definitions/ServerBlobAuditingPolicyListResult" + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicyListResult" } }, "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription." + "description": "*** Error Responses: ***\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { - "List auditing settings of a server": { - "$ref": "./examples/ServerAuditingSettingsList.json" + "List extended auditing settings of a server": { + "$ref": "./examples/ServerExtendedAuditingSettingsList.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}": { "get": { "tags": [ "BlobAuditing" ], - "description": "Gets a database's blob auditing policy.", - "operationId": "DatabaseBlobAuditingPolicies_Get", + "description": "Gets a server's blob auditing policy.", + "operationId": "ServerBlobAuditingPolicies_Get", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -464,9 +478,6 @@ { "$ref": "#/parameters/ServerNameParameter" }, - { - "$ref": "#/parameters/DatabaseNameParameter" - }, { "$ref": "#/parameters/BlobAuditingPolicyNameParameter" }, @@ -479,18 +490,18 @@ ], "responses": { "200": { - "description": "Successfully retrieved the database blob auditing policy.", + "description": "Successfully retrieved the server blob auditing policy.", "schema": { - "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + "$ref": "#/definitions/ServerBlobAuditingPolicy" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" } }, "x-ms-examples": { - "Get a database's blob auditing policy": { - "$ref": "./examples/DatabaseBlobAuditingGet.json" + "Get a server's blob auditing policy": { + "$ref": "./examples/ServerBlobAuditingGet.json" } } }, @@ -498,8 +509,8 @@ "tags": [ "BlobAuditing" ], - "description": "Creates or updates a database's blob auditing policy.", - "operationId": "DatabaseBlobAuditingPolicies_CreateOrUpdate", + "description": "Creates or updates a server's blob auditing policy.", + "operationId": "ServerBlobAuditingPolicies_CreateOrUpdate", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -507,19 +518,16 @@ { "$ref": "#/parameters/ServerNameParameter" }, - { - "$ref": "#/parameters/DatabaseNameParameter" - }, { "$ref": "#/parameters/BlobAuditingPolicyNameParameter" }, { "name": "parameters", "in": "body", - "description": "The database blob auditing policy.", + "description": "Properties of blob auditing policy", "required": true, "schema": { - "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + "$ref": "#/definitions/ServerBlobAuditingPolicy" } }, { @@ -531,41 +539,36 @@ ], "responses": { "200": { - "description": "Successfully set the database blob auditing policy.", + "description": "Successfully updated the auditing settings.", "schema": { - "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + "$ref": "#/definitions/ServerBlobAuditingPolicy" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 400 InvalidDatabaseBlobAuditingPolicyCreateRequest - The create database blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 BlobAuditingInsufficientStorageAccountPermissions - Insufficient read or write permissions on the provided storage account.\n\n * 400 BlobAuditingStorageAccountIsDisabled - The provided storage account is disabled.\n\n * 400 BlobAuditingNoServerIdentity - The server identity is not correctly configured.\n\n * 400 BlobAuditingStorageOutboundFirewallNotAllowed - Storage account is not in the list of allowed FQDNs, and, therefore, the outbound firewall rules will block the request.\n\n * 400 InvalidBlobAuditActionsAndGroupsForDW - Unsupported audit actions or action groups for DW.\n\n * 400 BlobAuditingAdalTokenError - The operation could not get access token for the storage account because an Azure Active Directory error was encountered.\n\n * 400 BlobAuditingInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 BlobAuditingIsNotSupportedOnGeoDr - Blob auditing can be configured on primary databases only.\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 400 InvalidServerBlobAuditingPolicyCreateRequest - The create server blob auditing policy request does not exist or has no properties object.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 400 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 BlobAuditingInvalidStorageAccountCredentials - The provided storage account or access key is not valid.\n\n * 400 InsufficientDiskSpaceForAuditing - Insufficient disk space to save auditing metadata in the database\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 409 ServerBlobAuditingPolicyInProgress - Set server blob auditing is already in progress." }, - "201": { - "description": "Successfully created the database blob auditing policy.", - "schema": { - "$ref": "#/definitions/DatabaseBlobAuditingPolicy" - } + "202": { + "description": "Updating the auditing settings is in progress." } }, + "x-ms-long-running-operation": true, "x-ms-examples": { - "Create or update a database's blob auditing policy with minimal parameters": { - "$ref": "./examples/DatabaseBlobAuditingCreateMin.json" - }, - "Create or update a database's blob auditing policy with all parameters": { - "$ref": "./examples/DatabaseBlobAuditingCreateMax.json" + "Update a server's blob auditing policy with minimal parameters": { + "$ref": "./examples/ServerBlobAuditingCreateMin.json" }, - "Create or update a database's azure monitor auditing policy with minimal parameters": { - "$ref": "./examples/DatabaseAzureMonitorAuditingCreateMin.json" + "Update a server's blob auditing policy with all parameters": { + "$ref": "./examples/ServerBlobAuditingCreateMax.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings": { "get": { "tags": [ "BlobAuditing" ], - "description": "Lists auditing settings of a database.", - "operationId": "DatabaseBlobAuditingPolicies_ListByDatabase", + "description": "Lists auditing settings of a server.", + "operationId": "ServerBlobAuditingPolicies_ListByServer", "parameters": [ { "$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter" @@ -573,9 +576,6 @@ { "$ref": "#/parameters/ServerNameParameter" }, - { - "$ref": "#/parameters/DatabaseNameParameter" - }, { "$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter" }, @@ -585,38 +585,34 @@ ], "responses": { "200": { - "description": "Successfully retrieved database auditing settings.", + "description": "Successfully retrieved server auditing settings.", "schema": { - "$ref": "#/definitions/DatabaseBlobAuditingPolicyListResult" + "$ref": "#/definitions/ServerBlobAuditingPolicyListResult" } }, "default": { - "description": "*** Error Responses: ***\n\n * 400 BlobAuditingIsNotSupportedOnResourceType - Blob Auditing is currently not supported for this resource type.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + "description": "*** Error Responses: ***\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { - "List audit settings of a database": { - "$ref": "./examples/DatabaseAuditingSettingsList.json" + "List auditing settings of a server": { + "$ref": "./examples/ServerAuditingSettingsList.json" } } } } }, "definitions": { - "ExtendedDatabaseBlobAuditingPolicyProperties": { - "description": "Properties of an extended database blob auditing policy.", + "DatabaseBlobAuditingPolicyProperties": { + "description": "Properties of a database blob auditing policy.", "required": [ "state" ], "type": "object", "properties": { - "predicateExpression": { - "description": "Specifies condition of where clause when creating an audit.", - "type": "string" - }, "retentionDays": { "format": "int32", "description": "Specifies the number of days to keep in the audit logs in the storage account.", @@ -642,6 +638,10 @@ "description": "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647.", "type": "integer" }, + "isManagedIdentityInUse": { + "description": "Specifies whether Managed Identity is used to access blob storage", + "type": "boolean" + }, "state": { "description": "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.", "enum": [ @@ -674,8 +674,8 @@ } } }, - "ExtendedDatabaseBlobAuditingPolicy": { - "description": "An extended database blob auditing policy.", + "DatabaseBlobAuditingPolicy": { + "description": "A database blob auditing policy.", "type": "object", "allOf": [ { @@ -683,22 +683,27 @@ } ], "properties": { + "kind": { + "description": "Resource kind.", + "type": "string", + "readOnly": true + }, "properties": { - "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicyProperties", + "$ref": "#/definitions/DatabaseBlobAuditingPolicyProperties", "description": "Resource properties.", "x-ms-client-flatten": true } } }, - "ExtendedDatabaseBlobAuditingPolicyListResult": { - "description": "A list of database extended auditing settings.", + "DatabaseBlobAuditingPolicyListResult": { + "description": "A list of database auditing settings.", "type": "object", "properties": { "value": { "description": "Array of results.", "type": "array", "items": { - "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" }, "readOnly": true }, @@ -709,17 +714,13 @@ } } }, - "ExtendedServerBlobAuditingPolicyProperties": { - "description": "Properties of an extended server blob auditing policy.", + "ExtendedDatabaseBlobAuditingPolicyProperties": { + "description": "Properties of an extended database blob auditing policy.", "required": [ "state" ], "type": "object", "properties": { - "isDevopsAuditEnabled": { - "description": "Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor.\r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", - "type": "boolean" - }, "predicateExpression": { "description": "Specifies condition of where clause when creating an audit.", "type": "string" @@ -749,6 +750,10 @@ "description": "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647.", "type": "integer" }, + "isManagedIdentityInUse": { + "description": "Specifies whether Managed Identity is used to access blob storage", + "type": "boolean" + }, "state": { "description": "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.", "enum": [ @@ -781,8 +786,8 @@ } } }, - "ExtendedServerBlobAuditingPolicy": { - "description": "An extended server blob auditing policy.", + "ExtendedDatabaseBlobAuditingPolicy": { + "description": "An extended database blob auditing policy.", "type": "object", "allOf": [ { @@ -791,21 +796,21 @@ ], "properties": { "properties": { - "$ref": "#/definitions/ExtendedServerBlobAuditingPolicyProperties", + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicyProperties", "description": "Resource properties.", "x-ms-client-flatten": true } } }, - "ExtendedServerBlobAuditingPolicyListResult": { - "description": "A list of server extended auditing settings.", + "ExtendedDatabaseBlobAuditingPolicyListResult": { + "description": "A list of database extended auditing settings.", "type": "object", "properties": { "value": { "description": "Array of results.", "type": "array", "items": { - "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" + "$ref": "#/definitions/ExtendedDatabaseBlobAuditingPolicy" }, "readOnly": true }, @@ -816,8 +821,8 @@ } } }, - "ServerBlobAuditingPolicyProperties": { - "description": "Properties of a server blob auditing policy.", + "ExtendedServerBlobAuditingPolicyProperties": { + "description": "Properties of an extended server blob auditing policy.", "required": [ "state" ], @@ -827,6 +832,10 @@ "description": "Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor.\r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", "type": "boolean" }, + "predicateExpression": { + "description": "Specifies condition of where clause when creating an audit.", + "type": "string" + }, "retentionDays": { "format": "int32", "description": "Specifies the number of days to keep in the audit logs in the storage account.", @@ -852,6 +861,10 @@ "description": "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647.", "type": "integer" }, + "isManagedIdentityInUse": { + "description": "Specifies whether Managed Identity is used to access blob storage", + "type": "boolean" + }, "state": { "description": "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.", "enum": [ @@ -884,8 +897,8 @@ } } }, - "ServerBlobAuditingPolicy": { - "description": "A server blob auditing policy.", + "ExtendedServerBlobAuditingPolicy": { + "description": "An extended server blob auditing policy.", "type": "object", "allOf": [ { @@ -894,21 +907,21 @@ ], "properties": { "properties": { - "$ref": "#/definitions/ServerBlobAuditingPolicyProperties", + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicyProperties", "description": "Resource properties.", "x-ms-client-flatten": true } } }, - "ServerBlobAuditingPolicyListResult": { - "description": "A list of server auditing settings.", + "ExtendedServerBlobAuditingPolicyListResult": { + "description": "A list of server extended auditing settings.", "type": "object", "properties": { "value": { "description": "Array of results.", "type": "array", "items": { - "$ref": "#/definitions/ServerBlobAuditingPolicy" + "$ref": "#/definitions/ExtendedServerBlobAuditingPolicy" }, "readOnly": true }, @@ -919,13 +932,17 @@ } } }, - "DatabaseBlobAuditingPolicyProperties": { - "description": "Properties of a database blob auditing policy.", + "ServerBlobAuditingPolicyProperties": { + "description": "Properties of a server blob auditing policy.", "required": [ "state" ], "type": "object", "properties": { + "isDevopsAuditEnabled": { + "description": "Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor.\r\nIn order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true\r\n\r\nWhen using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created.\r\n\r\nDiagnostic Settings URI format:\r\nPUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview\r\n\r\nFor more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207)\r\nor [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043)\r\n", + "type": "boolean" + }, "retentionDays": { "format": "int32", "description": "Specifies the number of days to keep in the audit logs in the storage account.", @@ -951,6 +968,10 @@ "description": "Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.\r\nThe default minimum value is 1000 (1 second). The maximum is 2,147,483,647.", "type": "integer" }, + "isManagedIdentityInUse": { + "description": "Specifies whether Managed Identity is used to access blob storage", + "type": "boolean" + }, "state": { "description": "Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required.", "enum": [ @@ -983,8 +1004,8 @@ } } }, - "DatabaseBlobAuditingPolicy": { - "description": "A database blob auditing policy.", + "ServerBlobAuditingPolicy": { + "description": "A server blob auditing policy.", "type": "object", "allOf": [ { @@ -992,27 +1013,22 @@ } ], "properties": { - "kind": { - "description": "Resource kind.", - "type": "string", - "readOnly": true - }, "properties": { - "$ref": "#/definitions/DatabaseBlobAuditingPolicyProperties", + "$ref": "#/definitions/ServerBlobAuditingPolicyProperties", "description": "Resource properties.", "x-ms-client-flatten": true } } }, - "DatabaseBlobAuditingPolicyListResult": { - "description": "A list of database auditing settings.", + "ServerBlobAuditingPolicyListResult": { + "description": "A list of server auditing settings.", "type": "object", "properties": { "value": { "description": "Array of results.", "type": "array", "items": { - "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + "$ref": "#/definitions/ServerBlobAuditingPolicy" }, "readOnly": true }, @@ -1050,11 +1066,11 @@ "enum": [ "default" ], + "x-ms-parameter-location": "method", "x-ms-enum": { - "name": "BlobAuditingPolicyName", + "name": "blobAuditingPolicyName", "modelAsString": false - }, - "x-ms-parameter-location": "method" + } } }, "securityDefinitions": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseExtendedAuditingSettingsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseExtendedAuditingSettingsList.json index 93fbf4c7e2ff..0e3b4ce501ae 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseExtendedAuditingSettingsList.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/DatabaseExtendedAuditingSettingsList.json @@ -22,7 +22,8 @@ "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", "isStorageSecondaryKeyInUse": false, "predicateExpression": "statement = 'select 1'", - "isAzureMonitorTargetEnabled": false + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false } } ] diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json index a4135e5b6526..432dd4669b84 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json @@ -21,7 +21,8 @@ "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", "isStorageSecondaryKeyInUse": false, "predicateExpression": "statement = 'select 1'", - "isAzureMonitorTargetEnabled": false + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedServerBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedServerBlobAuditingGet.json index ffe75137143c..f17af8081914 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedServerBlobAuditingGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ExtendedServerBlobAuditingGet.json @@ -20,7 +20,8 @@ "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", "isStorageSecondaryKeyInUse": false, "predicateExpression": "object_name = 'SensitiveData'", - "isAzureMonitorTargetEnabled": false + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerAuditingSettingsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerAuditingSettingsList.json index cfb23f65d846..dd210719c660 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerAuditingSettingsList.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerAuditingSettingsList.json @@ -20,7 +20,8 @@ "auditActionsAndGroups": [], "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", "isStorageSecondaryKeyInUse": false, - "isAzureMonitorTargetEnabled": false + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false } } ] diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerBlobAuditingGet.json index 55613ab4de53..2d0870d9e40b 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerBlobAuditingGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerBlobAuditingGet.json @@ -19,7 +19,8 @@ "auditActionsAndGroups": [], "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", "isStorageSecondaryKeyInUse": false, - "isAzureMonitorTargetEnabled": false + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false } } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerExtendedAuditingSettingsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerExtendedAuditingSettingsList.json index 987d2754e792..5bc53c1f3978 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerExtendedAuditingSettingsList.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/examples/ServerExtendedAuditingSettingsList.json @@ -21,7 +21,8 @@ "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", "isStorageSecondaryKeyInUse": false, "predicateExpression": "object_name = 'SensitiveData'", - "isAzureMonitorTargetEnabled": false + "isAzureMonitorTargetEnabled": false, + "isManagedIdentityInUse": false } } ]