Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new APIs (two List APIs) and update examples #6640

Merged
merged 2 commits into from
Sep 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand All @@ -124,6 +124,51 @@
}
}
}
},
bashahee marked this conversation as resolved.
Show resolved Hide resolved
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings": {
bashahee marked this conversation as resolved.
Show resolved Hide resolved
"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": {
Expand Down Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"parameters": {
"properties": {
"state": "Enabled",
"IsAzureMonitorTargetEnabled": true
"isAzureMonitorTargetEnabled": true
}
}
},
Expand All @@ -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"]
}
}
},
Expand All @@ -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"]
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
bashahee marked this conversation as resolved.
Show resolved Hide resolved
"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
}
}
},
Expand All @@ -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
}
}
},
Expand All @@ -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
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
Expand All @@ -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
}
}
},
Expand All @@ -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
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
}
}
}
}
Loading