diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/blobAuditing.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/blobAuditing.json index 914d197ebf0c..42e8f9389761 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/blobAuditing.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/blobAuditing.json @@ -103,7 +103,7 @@ } }, "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 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 InvalidBlobAuditActionsAndGroupsForDW - Unsupported audit actions or action groups for DW.\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 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 BlobAuditingInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\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 InvalidBlobAuditActionsAndGroupsForDW - Unsupported audit actions or action groups for DW.\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 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." }, "201": { "description": "Successfully created the database blob auditing policy.", @@ -124,6 +124,51 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Lists auditing settings of a database.", + "operationId": "DatabaseBlobAuditingPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database auditing settings.", + "schema": { + "$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." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List audit settings of a database": { + "$ref": "./examples/DatabaseAuditingSettingsList.json" + } + } + } } }, "definitions": { @@ -205,6 +250,25 @@ "x-ms-client-flatten": true } } + }, + "DatabaseBlobAuditingPolicyListResult": { + "description": "A list of database auditing settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } } }, "parameters": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseAuditingSettingsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseAuditingSettingsList.json new file mode 100644 index 000000000000..77250996c600 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseAuditingSettingsList.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-6852", + "serverName": "blobauditingtest-2080", + "databaseName": "testdb", + "api-version": "2015-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb/auditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "isAzureMonitorTargetEnabled": false + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json index ae0dcecf831f..6db2c2bf6827 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json @@ -9,7 +9,7 @@ "parameters": { "properties": { "state": "Enabled", - "IsAzureMonitorTargetEnabled": true + "isAzureMonitorTargetEnabled": true } } }, @@ -20,18 +20,14 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/auditingSettings", "kind": "V12", - "properties": { - "state": "Enabled", - "isAzureMonitorTargetEnabled": true, - "storageAccountAccessKey": "", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ] + "properties": { + "state":"Enabled", + "isAzureMonitorTargetEnabled": true, + "storageAccountAccessKey": "", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups":["SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP","FAILED_DATABASE_AUTHENTICATION_GROUP","BATCH_COMPLETED_GROUP"] } } }, @@ -41,20 +37,16 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/auditingSettings", "kind": "V12", - "properties": { - "state": "Enabled", - "isAzureMonitorTargetEnabled": true, - "storageAccountAccessKey": "", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ] + "properties": { + "state":"Enabled", + "isAzureMonitorTargetEnabled": true, + "storageAccountAccessKey": "", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups":["SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP","FAILED_DATABASE_AUTHENTICATION_GROUP","BATCH_COMPLETED_GROUP"] } } } } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseBlobAuditingCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseBlobAuditingCreateMax.json index 7bfa3b938cce..194627f146a2 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseBlobAuditingCreateMax.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseBlobAuditingCreateMax.json @@ -8,18 +8,14 @@ "api-version": "2015-05-01-preview", "parameters": { "properties": { - "state": "Enabled", - "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "retentionDays": 6, - "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", - "UPDATE on database::TestDatabaseName by public" - ], - "isAzureMonitorTargetEnabled": true + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups":["DATABASE_LOGOUT_GROUP","DATABASE_ROLE_MEMBER_CHANGE_GROUP", "UPDATE on database::TestDatabaseName by public"], + "isAzureMonitorTargetEnabled": true } } }, @@ -30,19 +26,15 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/auditingSettings", "kind": "V12", - "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "storageAccountAccessKey": "", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", - "UPDATE on database::TestDatabaseName by public" - ], - "isAzureMonitorTargetEnabled": true + "properties": { + "state":"Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountAccessKey": "", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": ["DATABASE_LOGOUT_GROUP", "DATABASE_ROLE_MEMBER_CHANGE_GROUP", "UPDATE on database::TestDatabaseName by public"], + "isAzureMonitorTargetEnabled": true } } }, @@ -52,21 +44,17 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/auditingSettings", "kind": "V12", - "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "storageAccountAccessKey": "", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", - "UPDATE on database::TestDatabaseName by public" - ], - "isAzureMonitorTargetEnabled": true + "properties": { + "state":"Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountAccessKey": "", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "DATABASE_LOGOUT_GROUP", "DATABASE_ROLE_MEMBER_CHANGE_GROUP", "UPDATE on database::TestDatabaseName by public" ], + "isAzureMonitorTargetEnabled": true } } } } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseBlobAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseBlobAuditingCreateMin.json index 03709b48f11d..bb5604509093 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseBlobAuditingCreateMin.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseBlobAuditingCreateMin.json @@ -8,9 +8,9 @@ "api-version": "2015-05-01-preview", "parameters": { "properties": { - "state": "Enabled", - "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", - "storageEndpoint": "https://mystorage.blob.core.windows.net" + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" } } }, @@ -21,18 +21,15 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/auditingSettings", "kind": "V12", - "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "storageAccountAccessKey": "", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ] + "properties": { + "state":"Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountAccessKey": "", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP" ], + "isAzureMonitorTargetEnabled": false } } }, @@ -42,20 +39,17 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/auditingSettings", "kind": "V12", - "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "storageAccountAccessKey": "", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ] + "properties": { + "state":"Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountAccessKey": "", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP" ], + "isAzureMonitorTargetEnabled": false } } } } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseBlobAuditingGet.json index dae05c903d9a..94719bf88354 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseBlobAuditingGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2015-05-01-preview/examples/DatabaseBlobAuditingGet.json @@ -9,20 +9,21 @@ }, "responses": { "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb", - "name": "default", - "type": "Microsoft.Sql/servers/databases/auditingSettings", - "kind": "V12", - "properties": { - "state": "Disabled", - "storageEndpoint": "", - "retentionDays": 0, - "auditActionsAndGroups": [], - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "isAzureMonitorTargetEnabled": false + } } - } } } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/blobAuditing.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/blobAuditing.json index 2dccfe7db6d6..3c1bbd9c563d 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/blobAuditing.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/blobAuditing.json @@ -103,7 +103,7 @@ } }, "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 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 InvalidBlobAuditActionsAndGroupsForDW - Unsupported audit actions or action groups for DW.\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 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 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 BlobAuditingInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\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 InvalidBlobAuditActionsAndGroupsForDW - Unsupported audit actions or action groups for DW.\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 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." }, "201": { "description": "Successfully created the extended database blob auditing policy.", @@ -157,7 +157,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + "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." } }, "x-ms-examples": { @@ -206,7 +206,7 @@ } }, "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 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\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 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." }, "202": { "description": "Updating the extended auditing settings is in progress." @@ -255,7 +255,7 @@ } }, "default": { - "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + "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." } }, "x-ms-examples": { @@ -304,7 +304,7 @@ } }, "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 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\n\n * 400 InvalidBlobAuditActions - Invalid audit action\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\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 InvalidBlobAuditActionsAndGroups - Invalid audit actions or action groups.\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." }, "202": { "description": "Updating the auditing settings is in progress." @@ -321,6 +321,48 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Lists auditing settings of a server.", + "operationId": "ServerBlobAuditingPolicies_ListByServer", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved server auditing settings.", + "schema": { + "$ref": "#/definitions/ServerBlobAuditingPolicyListResult" + } + }, + "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." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List auditing settings of a server": { + "$ref": "./examples/ServerAuditingSettingsList.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}": { "get": { "tags": [ @@ -408,7 +450,7 @@ } }, "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 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 InvalidBlobAuditActionsAndGroupsForDW - Unsupported audit actions or action groups for DW.\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 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 BlobAuditingInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\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 InvalidBlobAuditActionsAndGroupsForDW - Unsupported audit actions or action groups for DW.\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 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." }, "201": { "description": "Successfully created the database blob auditing policy.", @@ -429,6 +471,51 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings": { + "get": { + "tags": [ + "BlobAuditing" + ], + "description": "Lists auditing settings of a database.", + "operationId": "DatabaseBlobAuditingPolicies_ListByDatabase", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved database auditing settings.", + "schema": { + "$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." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List audit settings of a database": { + "$ref": "./examples/DatabaseAuditingSettingsList.json" + } + } + } } }, "definitions": { @@ -662,6 +749,25 @@ } } }, + "ServerBlobAuditingPolicyListResult": { + "description": "A list of server auditing settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/ServerBlobAuditingPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, "DatabaseBlobAuditingPolicyProperties": { "description": "Properties of a database blob auditing policy.", "required": [ @@ -740,6 +846,25 @@ "x-ms-client-flatten": true } } + }, + "DatabaseBlobAuditingPolicyListResult": { + "description": "A list of database auditing settings.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseBlobAuditingPolicy" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } } }, "parameters": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseAuditingSettingsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseAuditingSettingsList.json new file mode 100644 index 000000000000..f4aa6c3b0e00 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseAuditingSettingsList.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-6852", + "serverName": "blobauditingtest-2080", + "databaseName": "testdb", + "api-version": "2015-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "isAzureMonitorTargetEnabled": false + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json index ae0dcecf831f..6db2c2bf6827 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json @@ -9,7 +9,7 @@ "parameters": { "properties": { "state": "Enabled", - "IsAzureMonitorTargetEnabled": true + "isAzureMonitorTargetEnabled": true } } }, @@ -20,18 +20,14 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/auditingSettings", "kind": "V12", - "properties": { - "state": "Enabled", - "isAzureMonitorTargetEnabled": true, - "storageAccountAccessKey": "", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ] + "properties": { + "state":"Enabled", + "isAzureMonitorTargetEnabled": true, + "storageAccountAccessKey": "", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups":["SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP","FAILED_DATABASE_AUTHENTICATION_GROUP","BATCH_COMPLETED_GROUP"] } } }, @@ -41,20 +37,16 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/auditingSettings", "kind": "V12", - "properties": { - "state": "Enabled", - "isAzureMonitorTargetEnabled": true, - "storageAccountAccessKey": "", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ] + "properties": { + "state":"Enabled", + "isAzureMonitorTargetEnabled": true, + "storageAccountAccessKey": "", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups":["SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP","FAILED_DATABASE_AUTHENTICATION_GROUP","BATCH_COMPLETED_GROUP"] } } } } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseBlobAuditingCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseBlobAuditingCreateMax.json index 7bfa3b938cce..194627f146a2 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseBlobAuditingCreateMax.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseBlobAuditingCreateMax.json @@ -8,18 +8,14 @@ "api-version": "2015-05-01-preview", "parameters": { "properties": { - "state": "Enabled", - "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "retentionDays": 6, - "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", - "UPDATE on database::TestDatabaseName by public" - ], - "isAzureMonitorTargetEnabled": true + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups":["DATABASE_LOGOUT_GROUP","DATABASE_ROLE_MEMBER_CHANGE_GROUP", "UPDATE on database::TestDatabaseName by public"], + "isAzureMonitorTargetEnabled": true } } }, @@ -30,19 +26,15 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/auditingSettings", "kind": "V12", - "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "storageAccountAccessKey": "", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", - "UPDATE on database::TestDatabaseName by public" - ], - "isAzureMonitorTargetEnabled": true + "properties": { + "state":"Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountAccessKey": "", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": ["DATABASE_LOGOUT_GROUP", "DATABASE_ROLE_MEMBER_CHANGE_GROUP", "UPDATE on database::TestDatabaseName by public"], + "isAzureMonitorTargetEnabled": true } } }, @@ -52,21 +44,17 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/auditingSettings", "kind": "V12", - "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "storageAccountAccessKey": "", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", - "UPDATE on database::TestDatabaseName by public" - ], - "isAzureMonitorTargetEnabled": true + "properties": { + "state":"Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountAccessKey": "", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "DATABASE_LOGOUT_GROUP", "DATABASE_ROLE_MEMBER_CHANGE_GROUP", "UPDATE on database::TestDatabaseName by public" ], + "isAzureMonitorTargetEnabled": true } } } } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseBlobAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseBlobAuditingCreateMin.json index a33e1aeaadea..bb5604509093 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseBlobAuditingCreateMin.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseBlobAuditingCreateMin.json @@ -8,9 +8,9 @@ "api-version": "2015-05-01-preview", "parameters": { "properties": { - "state": "Enabled", - "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", - "storageEndpoint": "https://mystorage.blob.core.windows.net" + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" } } }, @@ -21,19 +21,15 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/auditingSettings", "kind": "V12", - "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "storageAccountAccessKey": "", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ], - "isAzureMonitorTargetEnabled": true + "properties": { + "state":"Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountAccessKey": "", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP" ], + "isAzureMonitorTargetEnabled": false } } }, @@ -43,21 +39,17 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/auditingSettings", "kind": "V12", - "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "storageAccountAccessKey": "", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ], - "isAzureMonitorTargetEnabled": true + "properties": { + "state":"Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountAccessKey": "", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP" ], + "isAzureMonitorTargetEnabled": false } } } } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseBlobAuditingGet.json index 0c5a321a808b..94719bf88354 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseBlobAuditingGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DatabaseBlobAuditingGet.json @@ -9,21 +9,21 @@ }, "responses": { "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb", - "name": "default", - "type": "Microsoft.Sql/servers/databases/auditingSettings", - "kind": "V12", - "properties": { - "state": "Disabled", - "storageEndpoint": "", - "retentionDays": 0, - "auditActionsAndGroups": [], - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "isAzureMonitorTargetEnabled": true + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/auditingSettings", + "kind": "V12", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "isAzureMonitorTargetEnabled": false + } } - } } } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json index 3c31571b6545..14d01b0281a1 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json @@ -20,16 +20,12 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", "properties": { - "state": "Enabled", - "isAzureMonitorTargetEnabled": true, - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ] + "state": "Enabled", + "isAzureMonitorTargetEnabled": true, + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups":["SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP","FAILED_DATABASE_AUTHENTICATION_GROUP","BATCH_COMPLETED_GROUP"] } } }, @@ -39,18 +35,14 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", "properties": { - "state": "Enabled", - "isAzureMonitorTargetEnabled": true, - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ] + "state": "Enabled", + "isAzureMonitorTargetEnabled": true, + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups":["SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP","FAILED_DATABASE_AUTHENTICATION_GROUP","BATCH_COMPLETED_GROUP"] } } } } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json index 229fc8d69795..880fdabb023b 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json @@ -8,19 +8,15 @@ "api-version": "2017-03-01-preview", "parameters": { "properties": { - "state": "Enabled", - "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "retentionDays": 6, - "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", - "UPDATE on database::TestDatabaseName by public" - ], - "predicateExpression": "statement = 'select 1'", - "isAzureMonitorTargetEnabled": true + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "DATABASE_LOGOUT_GROUP", "DATABASE_ROLE_MEMBER_CHANGE_GROUP", "UPDATE on database::TestDatabaseName by public" ], + "predicateExpression": "statement = 'select 1'", + "isAzureMonitorTargetEnabled": true } } }, @@ -31,18 +27,14 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", - "UPDATE on database::TestDatabaseName by public" - ], - "predicateExpression": "statement = 'select 1'", - "isAzureMonitorTargetEnabled": true + "state":"Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "DATABASE_LOGOUT_GROUP", "DATABASE_ROLE_MEMBER_CHANGE_GROUP", "UPDATE on database::TestDatabaseName by public" ], + "predicateExpression": "statement = 'select 1'", + "isAzureMonitorTargetEnabled": true } } }, @@ -52,20 +44,16 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", - "UPDATE on database::TestDatabaseName by public" - ], - "predicateExpression": "statement = 'select 1'", - "isAzureMonitorTargetEnabled": true + "state":"Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "DATABASE_LOGOUT_GROUP", "DATABASE_ROLE_MEMBER_CHANGE_GROUP", "UPDATE on database::TestDatabaseName by public" ], + "predicateExpression": "statement = 'select 1'", + "isAzureMonitorTargetEnabled": true } } } } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json index af1a8b0e97d7..c45b3514c1d3 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json @@ -8,9 +8,9 @@ "api-version": "2017-03-01-preview", "parameters": { "properties": { - "state": "Enabled", - "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", - "storageEndpoint": "https://mystorage.blob.core.windows.net" + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" } } }, @@ -21,17 +21,13 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ], - "isAzureMonitorTargetEnabled": false + "state":"Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP" ], + "isAzureMonitorTargetEnabled": false } } }, @@ -41,19 +37,15 @@ "name": "default", "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "retentionDays": 0, - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ], - "isAzureMonitorTargetEnabled": false + "state":"Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 0, + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP" ], + "isAzureMonitorTargetEnabled": false } } } } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json index 6b5ac989be3f..1b5a16828782 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json @@ -9,21 +9,21 @@ }, "responses": { "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb", - "name": "default", - "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", - "properties": { - "state": "Disabled", - "storageEndpoint": "", - "retentionDays": 0, - "auditActionsAndGroups": [], - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "predicateExpression": "statement = 'select 1'", - "isAzureMonitorTargetEnabled": false + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/databases/testdb", + "name": "default", + "type": "Microsoft.Sql/servers/databases/extendedAuditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "predicateExpression": "statement = 'select 1'", + "isAzureMonitorTargetEnabled": false + } } - } } } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json index 2b5ab9c1ccb1..53bc860a3920 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json @@ -1,53 +1,45 @@ { - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "blobauditingtest-4799", - "serverName": "blobauditingtest-6440", - "blobAuditingPolicyName": "default", - "api-version": "2017-03-01-preview", "parameters": { - "properties": { - "state": "Enabled", - "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "retentionDays": 6, - "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ], - "predicateExpression": "object_name = 'SensitiveData'", - "isAzureMonitorTargetEnabled": true - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/extendedAuditingSettings/default", - "name": "default", - "type": "Microsoft.Sql/servers/extendedAuditingSettings", - "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "retentionDays": 6, - "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ], - "predicateExpression": "object_name = 'SensitiveData'", - "isAzureMonitorTargetEnabled": true + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "default", + "api-version": "2017-03-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP" ], + "predicateExpression": "object_name = 'SensitiveData'", + "isAzureMonitorTargetEnabled": true + } } - } }, - "202": { - "startTime": "2017-11-22T09:34:54.72Z", - "operation": "UpsertServerEngineAuditingPolicy" + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/extendedAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP" ], + "predicateExpression": "object_name = 'SensitiveData'", + "isAzureMonitorTargetEnabled": true + } + } + }, + "202": { + "startTime": "2017-11-22T09:34:54.72Z", + "operation": "UpsertServerEngineAuditingPolicy" + } } - } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json index 0666af4b48ea..e95c459688bb 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json @@ -1,42 +1,38 @@ { - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "blobauditingtest-4799", - "serverName": "blobauditingtest-6440", - "blobAuditingPolicyName": "default", - "api-version": "2017-03-01-preview", "parameters": { - "properties": { - "state": "Enabled", - "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", - "storageEndpoint": "https://mystorage.blob.core.windows.net" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/extendedAuditingSettings/default", - "name": "default", - "type": "Microsoft.Sql/servers/extendedAuditingSettings", - "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "retentionDays": 6, - "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ], - "isAzureMonitorTargetEnabled": false + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "default", + "api-version": "2017-03-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" + } } - } }, - "202": { - "startTime": "2017-11-22T09:34:54.72Z", - "operation": "UpsertServerEngineAuditingPolicy" + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/extendedAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/extendedAuditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP" ], + "isAzureMonitorTargetEnabled": false + } + } + }, + "202": { + "startTime": "2017-11-22T09:34:54.72Z", + "operation": "UpsertServerEngineAuditingPolicy" + } } - } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedServerBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedServerBlobAuditingGet.json index 6b0e4ee7e98d..fe470ca3be68 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedServerBlobAuditingGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ExtendedServerBlobAuditingGet.json @@ -8,21 +8,21 @@ }, "responses": { "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/extendedAuditingSettings/default", - "name": "default", - "type": "Microsoft.Sql/servers/extendedAuditingSettings", - "properties": { - "state": "Disabled", - "storageEndpoint": "", - "retentionDays": 0, - "auditActionsAndGroups": [], - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "predicateExpression": "object_name = 'SensitiveData'", - "isAzureMonitorTargetEnabled": false + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/extendedAuditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/extendedAuditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "predicateExpression": "object_name = 'SensitiveData'", + "isAzureMonitorTargetEnabled": false + } } - } } } -} +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerAuditingSettingsList.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerAuditingSettingsList.json new file mode 100644 index 000000000000..9e33d878d5c2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerAuditingSettingsList.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/auditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/auditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "isAzureMonitorTargetEnabled": false + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingCreateMax.json index 2cdb03719134..f40d22cc4dc8 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingCreateMax.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingCreateMax.json @@ -1,51 +1,43 @@ { - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "blobauditingtest-4799", - "serverName": "blobauditingtest-6440", - "blobAuditingPolicyName": "default", - "api-version": "2017-03-01-preview", "parameters": { - "properties": { - "state": "Enabled", - "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "retentionDays": 6, - "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ], - "isAzureMonitorTargetEnabled": true - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/auditingSettings/default", - "name": "default", - "type": "Microsoft.Sql/servers/auditingSettings", - "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "retentionDays": 6, - "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ], - "isAzureMonitorTargetEnabled": true + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "default", + "api-version": "2017-03-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP" ], + "isAzureMonitorTargetEnabled": true + } } - } }, - "202": { - "startTime": "2017-11-22T09:34:54.72Z", - "operation": "UpsertServerEngineAuditingPolicy" + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/auditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/auditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP" ], + "isAzureMonitorTargetEnabled": true + } + } + }, + "202": { + "startTime": "2017-11-22T09:34:54.72Z", + "operation": "UpsertServerEngineAuditingPolicy" + } } - } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingCreateMin.json index 0123254a8c73..217a8d05ce80 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingCreateMin.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingCreateMin.json @@ -7,36 +7,31 @@ "api-version": "2017-03-01-preview", "parameters": { "properties": { - "state": "Enabled", - "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", - "storageEndpoint": "https://mystorage.blob.core.windows.net" + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net" } } }, "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/auditingSettings/default", - "name": "default", - "type": "Microsoft.Sql/servers/auditingSettings", - "properties": { - "state": "Enabled", - "storageEndpoint": "https://mystorage.blob.core.windows.net", - "retentionDays": 6, - "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", - "isStorageSecondaryKeyInUse": false, - "auditActionsAndGroups": [ - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP" - ], - "isAzureMonitorTargetEnabled": false + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/auditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/auditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP" ] + } + } + }, + "202": { + "startTime": "2017-11-22T09:34:54.72Z", + "operation": "UpsertServerEngineAuditingPolicy" } - } - }, - "202": { - "startTime": "2017-11-22T09:34:54.72Z", - "operation": "UpsertServerEngineAuditingPolicy" } - } } diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingGet.json index f857b9e9c561..f7b40e033649 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingGet.json @@ -8,20 +8,20 @@ }, "responses": { "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/auditingSettings/default", - "name": "default", - "type": "Microsoft.Sql/servers/auditingSettings", - "properties": { - "state": "Disabled", - "storageEndpoint": "", - "retentionDays": 0, - "auditActionsAndGroups": [], - "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", - "isStorageSecondaryKeyInUse": false, - "isAzureMonitorTargetEnabled": false + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-6852/providers/Microsoft.Sql/servers/blobauditingtest-2080/auditingSettings/default", + "name": "default", + "type": "Microsoft.Sql/servers/auditingSettings", + "properties": { + "state": "Disabled", + "storageEndpoint": "", + "retentionDays": 0, + "auditActionsAndGroups": [], + "storageAccountSubscriptionId": "00000000-0000-0000-0000-000000000000", + "isStorageSecondaryKeyInUse": false, + "isAzureMonitorTargetEnabled": false + } } - } } } -} +} \ No newline at end of file