Database Advanced Threat Protection Settings - List By Database

Gets a list of database's Advanced Threat Protection states.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings?api-version=2021-11-01

URI Parameters

Name In Required Type Description
databaseName
path True

string

The name of the database.

resourceGroupName
path True

string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

serverName
path True

string

The name of the server.

subscriptionId
path True

string

The subscription ID that identifies an Azure subscription.

api-version
query True

string

The API version to use for the request.

Responses

Name Type Description
200 OK

DatabaseAdvancedThreatProtectionListResult

Successfully retrieved the database Advanced Threat Protection states.

Other Status Codes

*** Error Responses: ***

  • 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.

  • 400 AdvancedThreatProtectionInsufficientDiskSpace - Insufficient disk space to save the Advanced Threat Protection settings metadata in the database

  • 400 InvalidDatabaseAdvancedThreatProtectionCreateRequest - The create database Advanced Threat Protection request does not exist or has no properties object

  • 400 AdvancedThreatProtectionInvalidUserSuppliedParameter - An invalid parameter value was provided by the client

  • 400 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later

  • 400 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later

  • 404 SubscriptionDoesNotHaveServer - The requested server was not found

  • 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.

  • 404 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later

  • 409 DatabaseAdvancedThreatProtectionInProgress - Setting the database Advanced Threat Protection is already in progress

  • 409 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later

  • 500 DatabaseIsUnavailable - Loading failed. Please try again later.

  • 500 UpsertDatabaseAdvancedThreatProtectionFailed - An error has occurred while saving Advanced Threat Protection settings, please try again later

  • 500 GetDatabaseAdvancedThreatProtectionFailed - Failed to get Advanced Threat Protection settings

Examples

Lists the database's Advanced Threat Protection settings.

Sample Request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-6852/providers/Microsoft.Sql/servers/threatprotection-2080/databases/testdb/advancedThreatProtectionSettings?api-version=2021-11-01

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/threatprotection-6852/providers/Microsoft.Sql/servers/threatprotection-2080/databases/testdb/advancedThreatProtectionSettings/Default",
      "name": "Default",
      "type": "Microsoft.Sql/servers/databases/advancedThreatProtectionSettings",
      "systemData": {
        "createdBy": "string",
        "createdByType": "User",
        "createdAt": "2022-04-03T04:41:33.937Z",
        "lastModifiedBy": "string",
        "lastModifiedByType": "User",
        "lastModifiedAt": "2022-04-03T04:41:33.937Z"
      },
      "properties": {
        "state": "Enabled",
        "creationTime": "2022-04-03T04:41:33.937Z"
      }
    }
  ]
}

Definitions

Name Description
AdvancedThreatProtectionState

Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.

createdByType

The type of identity that created the resource.

DatabaseAdvancedThreatProtection

A database Advanced Threat Protection.

DatabaseAdvancedThreatProtectionListResult

A list of the database's Advanced Threat Protection configurations.

systemData

Metadata pertaining to creation and last modification of the resource.

AdvancedThreatProtectionState

Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.

Name Type Description
Disabled

string

Enabled

string

New

string

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

DatabaseAdvancedThreatProtection

A database Advanced Threat Protection.

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.creationTime

string

Specifies the UTC creation time of the policy.

properties.state

AdvancedThreatProtectionState

Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server.

systemData

systemData

SystemData of AdvancedThreatProtectionResource.

type

string

Resource type.

DatabaseAdvancedThreatProtectionListResult

A list of the database's Advanced Threat Protection configurations.

Name Type Description
nextLink

string

Link to retrieve next page of results.

value

DatabaseAdvancedThreatProtection[]

Array of results.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.