azure logo
Azure Classic v5.43.0, May 6 23

azure.sql.Database

Explore with Pulumi AI

Import

SQL Databases can be imported using the resource id, e.g.

 $ pulumi import azure:sql/database:Database database1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/servers/myserver/databases/database1

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "West Europe",
    });

    var exampleSqlServer = new Azure.Sql.SqlServer("exampleSqlServer", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        Version = "12.0",
        AdministratorLogin = "4dm1n157r470r",
        AdministratorLoginPassword = "4-v3ry-53cr37-p455w0rd",
        Tags = 
        {
            { "environment", "production" },
        },
    });

    var exampleAccount = new Azure.Storage.Account("exampleAccount", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        AccountTier = "Standard",
        AccountReplicationType = "LRS",
    });

    var exampleDatabase = new Azure.Sql.Database("exampleDatabase", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        ServerName = exampleSqlServer.Name,
        Tags = 
        {
            { "environment", "production" },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/sql"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleSqlServer, err := sql.NewSqlServer(ctx, "exampleSqlServer", &sql.SqlServerArgs{
			ResourceGroupName:          exampleResourceGroup.Name,
			Location:                   exampleResourceGroup.Location,
			Version:                    pulumi.String("12.0"),
			AdministratorLogin:         pulumi.String("4dm1n157r470r"),
			AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
			Tags: pulumi.StringMap{
				"environment": pulumi.String("production"),
			},
		})
		if err != nil {
			return err
		}
		_, err = storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
			ResourceGroupName:      exampleResourceGroup.Name,
			Location:               exampleResourceGroup.Location,
			AccountTier:            pulumi.String("Standard"),
			AccountReplicationType: pulumi.String("LRS"),
		})
		if err != nil {
			return err
		}
		_, err = sql.NewDatabase(ctx, "exampleDatabase", &sql.DatabaseArgs{
			ResourceGroupName: exampleResourceGroup.Name,
			Location:          exampleResourceGroup.Location,
			ServerName:        exampleSqlServer.Name,
			Tags: pulumi.StringMap{
				"environment": pulumi.String("production"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.sql.SqlServer;
import com.pulumi.azure.sql.SqlServerArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.sql.Database;
import com.pulumi.azure.sql.DatabaseArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var exampleSqlServer = new SqlServer("exampleSqlServer", SqlServerArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .location(exampleResourceGroup.location())
            .version("12.0")
            .administratorLogin("4dm1n157r470r")
            .administratorLoginPassword("4-v3ry-53cr37-p455w0rd")
            .tags(Map.of("environment", "production"))
            .build());

        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .location(exampleResourceGroup.location())
            .accountTier("Standard")
            .accountReplicationType("LRS")
            .build());

        var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .location(exampleResourceGroup.location())
            .serverName(exampleSqlServer.name())
            .tags(Map.of("environment", "production"))
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_sql_server = azure.sql.SqlServer("exampleSqlServer",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    version="12.0",
    administrator_login="4dm1n157r470r",
    administrator_login_password="4-v3ry-53cr37-p455w0rd",
    tags={
        "environment": "production",
    })
example_account = azure.storage.Account("exampleAccount",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    account_tier="Standard",
    account_replication_type="LRS")
example_database = azure.sql.Database("exampleDatabase",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    server_name=example_sql_server.name,
    tags={
        "environment": "production",
    })
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleSqlServer = new azure.sql.SqlServer("exampleSqlServer", {
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    version: "12.0",
    administratorLogin: "4dm1n157r470r",
    administratorLoginPassword: "4-v3ry-53cr37-p455w0rd",
    tags: {
        environment: "production",
    },
});
const exampleAccount = new azure.storage.Account("exampleAccount", {
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    accountTier: "Standard",
    accountReplicationType: "LRS",
});
const exampleDatabase = new azure.sql.Database("exampleDatabase", {
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    serverName: exampleSqlServer.name,
    tags: {
        environment: "production",
    },
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleSqlServer:
    type: azure:sql:SqlServer
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      version: '12.0'
      administratorLogin: 4dm1n157r470r
      administratorLoginPassword: 4-v3ry-53cr37-p455w0rd
      tags:
        environment: production
  exampleAccount:
    type: azure:storage:Account
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      accountTier: Standard
      accountReplicationType: LRS
  exampleDatabase:
    type: azure:sql:Database
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      serverName: ${exampleSqlServer.name}
      tags:
        environment: production

Create Database Resource

new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);
@overload
def Database(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             collation: Optional[str] = None,
             create_mode: Optional[str] = None,
             edition: Optional[str] = None,
             elastic_pool_name: Optional[str] = None,
             import_: Optional[DatabaseImportArgs] = None,
             location: Optional[str] = None,
             max_size_bytes: Optional[str] = None,
             max_size_gb: Optional[str] = None,
             name: Optional[str] = None,
             read_scale: Optional[bool] = None,
             requested_service_objective_id: Optional[str] = None,
             requested_service_objective_name: Optional[str] = None,
             resource_group_name: Optional[str] = None,
             restore_point_in_time: Optional[str] = None,
             server_name: Optional[str] = None,
             source_database_deletion_date: Optional[str] = None,
             source_database_id: Optional[str] = None,
             tags: Optional[Mapping[str, str]] = None,
             threat_detection_policy: Optional[DatabaseThreatDetectionPolicyArgs] = None,
             zone_redundant: Optional[bool] = None)
@overload
def Database(resource_name: str,
             args: DatabaseArgs,
             opts: Optional[ResourceOptions] = None)
func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)
public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)
public Database(String name, DatabaseArgs args)
public Database(String name, DatabaseArgs args, CustomResourceOptions options)
type: azure:sql:Database
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DatabaseArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Database Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Database resource accepts the following input properties:

ResourceGroupName string

The name of the resource group in which to create the database. This must be the same as Database Server resource group currently. Changing this forces a new resource to be created.

ServerName string

The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.

Collation string

The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

CreateMode string

Specifies how to create the database. Valid values are: Default, Copy, OnlineSecondary, NonReadableSecondary, PointInTimeRestore, Recovery, Restore or RestoreLongTermRetentionBackup. Must be Default to create a new database. Defaults to Default. Please see Azure SQL Database REST API

Edition string

The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, DataWarehouse, Business, BusinessCritical, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, or Web. Please see Azure SQL database models.

ElasticPoolName string

The name of the elastic database pool.

Import DatabaseImportArgs

A Database Import block as documented below. create_mode must be set to Default.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

MaxSizeBytes string

The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL database models.

MaxSizeGb string
Name string

The name of the database. Changing this forces a new resource to be created.

ReadScale bool

Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.

RequestedServiceObjectiveId string

A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .

RequestedServiceObjectiveName string

The service objective name for the database. Valid values depend on edition and location and may include S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. You can list the available names with the CLI: shell az sql db list-editions -l westus -o table. For further information please see Azure CLI - az sql db.

RestorePointInTime string

The point in time for the restore. Only applies if create_mode is PointInTimeRestore, it should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.

SourceDatabaseDeletionDate string

The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

SourceDatabaseId string

The URI of the source database if create_mode value is not Default.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

ThreatDetectionPolicy DatabaseThreatDetectionPolicyArgs

Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

ZoneRedundant bool

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

ResourceGroupName string

The name of the resource group in which to create the database. This must be the same as Database Server resource group currently. Changing this forces a new resource to be created.

ServerName string

The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.

Collation string

The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

CreateMode string

Specifies how to create the database. Valid values are: Default, Copy, OnlineSecondary, NonReadableSecondary, PointInTimeRestore, Recovery, Restore or RestoreLongTermRetentionBackup. Must be Default to create a new database. Defaults to Default. Please see Azure SQL Database REST API

Edition string

The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, DataWarehouse, Business, BusinessCritical, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, or Web. Please see Azure SQL database models.

ElasticPoolName string

The name of the elastic database pool.

Import DatabaseImportArgs

A Database Import block as documented below. create_mode must be set to Default.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

MaxSizeBytes string

The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL database models.

MaxSizeGb string
Name string

The name of the database. Changing this forces a new resource to be created.

ReadScale bool

Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.

RequestedServiceObjectiveId string

A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .

RequestedServiceObjectiveName string

The service objective name for the database. Valid values depend on edition and location and may include S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. You can list the available names with the CLI: shell az sql db list-editions -l westus -o table. For further information please see Azure CLI - az sql db.

RestorePointInTime string

The point in time for the restore. Only applies if create_mode is PointInTimeRestore, it should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.

SourceDatabaseDeletionDate string

The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

SourceDatabaseId string

The URI of the source database if create_mode value is not Default.

Tags map[string]string

A mapping of tags to assign to the resource.

ThreatDetectionPolicy DatabaseThreatDetectionPolicyArgs

Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

ZoneRedundant bool

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

resourceGroupName String

The name of the resource group in which to create the database. This must be the same as Database Server resource group currently. Changing this forces a new resource to be created.

serverName String

The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.

collation String

The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

createMode String

Specifies how to create the database. Valid values are: Default, Copy, OnlineSecondary, NonReadableSecondary, PointInTimeRestore, Recovery, Restore or RestoreLongTermRetentionBackup. Must be Default to create a new database. Defaults to Default. Please see Azure SQL Database REST API

edition String

The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, DataWarehouse, Business, BusinessCritical, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, or Web. Please see Azure SQL database models.

elasticPoolName String

The name of the elastic database pool.

import_ DatabaseImportArgs

A Database Import block as documented below. create_mode must be set to Default.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maxSizeBytes String

The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL database models.

maxSizeGb String
name String

The name of the database. Changing this forces a new resource to be created.

readScale Boolean

Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.

requestedServiceObjectiveId String

A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .

requestedServiceObjectiveName String

The service objective name for the database. Valid values depend on edition and location and may include S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. You can list the available names with the CLI: shell az sql db list-editions -l westus -o table. For further information please see Azure CLI - az sql db.

restorePointInTime String

The point in time for the restore. Only applies if create_mode is PointInTimeRestore, it should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.

sourceDatabaseDeletionDate String

The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

sourceDatabaseId String

The URI of the source database if create_mode value is not Default.

tags Map<String,String>

A mapping of tags to assign to the resource.

threatDetectionPolicy DatabaseThreatDetectionPolicyArgs

Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

zoneRedundant Boolean

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

resourceGroupName string

The name of the resource group in which to create the database. This must be the same as Database Server resource group currently. Changing this forces a new resource to be created.

serverName string

The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.

collation string

The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

createMode string

Specifies how to create the database. Valid values are: Default, Copy, OnlineSecondary, NonReadableSecondary, PointInTimeRestore, Recovery, Restore or RestoreLongTermRetentionBackup. Must be Default to create a new database. Defaults to Default. Please see Azure SQL Database REST API

edition string

The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, DataWarehouse, Business, BusinessCritical, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, or Web. Please see Azure SQL database models.

elasticPoolName string

The name of the elastic database pool.

import DatabaseImportArgs

A Database Import block as documented below. create_mode must be set to Default.

location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maxSizeBytes string

The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL database models.

maxSizeGb string
name string

The name of the database. Changing this forces a new resource to be created.

readScale boolean

Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.

requestedServiceObjectiveId string

A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .

requestedServiceObjectiveName string

The service objective name for the database. Valid values depend on edition and location and may include S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. You can list the available names with the CLI: shell az sql db list-editions -l westus -o table. For further information please see Azure CLI - az sql db.

restorePointInTime string

The point in time for the restore. Only applies if create_mode is PointInTimeRestore, it should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.

sourceDatabaseDeletionDate string

The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

sourceDatabaseId string

The URI of the source database if create_mode value is not Default.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

threatDetectionPolicy DatabaseThreatDetectionPolicyArgs

Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

zoneRedundant boolean

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

resource_group_name str

The name of the resource group in which to create the database. This must be the same as Database Server resource group currently. Changing this forces a new resource to be created.

server_name str

The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.

collation str

The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

create_mode str

Specifies how to create the database. Valid values are: Default, Copy, OnlineSecondary, NonReadableSecondary, PointInTimeRestore, Recovery, Restore or RestoreLongTermRetentionBackup. Must be Default to create a new database. Defaults to Default. Please see Azure SQL Database REST API

edition str

The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, DataWarehouse, Business, BusinessCritical, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, or Web. Please see Azure SQL database models.

elastic_pool_name str

The name of the elastic database pool.

import_ DatabaseImportArgs

A Database Import block as documented below. create_mode must be set to Default.

location str

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

max_size_bytes str

The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL database models.

max_size_gb str
name str

The name of the database. Changing this forces a new resource to be created.

read_scale bool

Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.

requested_service_objective_id str

A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .

requested_service_objective_name str

The service objective name for the database. Valid values depend on edition and location and may include S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. You can list the available names with the CLI: shell az sql db list-editions -l westus -o table. For further information please see Azure CLI - az sql db.

restore_point_in_time str

The point in time for the restore. Only applies if create_mode is PointInTimeRestore, it should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.

source_database_deletion_date str

The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

source_database_id str

The URI of the source database if create_mode value is not Default.

tags Mapping[str, str]

A mapping of tags to assign to the resource.

threat_detection_policy DatabaseThreatDetectionPolicyArgs

Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

zone_redundant bool

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

resourceGroupName String

The name of the resource group in which to create the database. This must be the same as Database Server resource group currently. Changing this forces a new resource to be created.

serverName String

The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.

collation String

The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

createMode String

Specifies how to create the database. Valid values are: Default, Copy, OnlineSecondary, NonReadableSecondary, PointInTimeRestore, Recovery, Restore or RestoreLongTermRetentionBackup. Must be Default to create a new database. Defaults to Default. Please see Azure SQL Database REST API

edition String

The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, DataWarehouse, Business, BusinessCritical, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, or Web. Please see Azure SQL database models.

elasticPoolName String

The name of the elastic database pool.

import Property Map

A Database Import block as documented below. create_mode must be set to Default.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maxSizeBytes String

The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL database models.

maxSizeGb String
name String

The name of the database. Changing this forces a new resource to be created.

readScale Boolean

Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.

requestedServiceObjectiveId String

A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .

requestedServiceObjectiveName String

The service objective name for the database. Valid values depend on edition and location and may include S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. You can list the available names with the CLI: shell az sql db list-editions -l westus -o table. For further information please see Azure CLI - az sql db.

restorePointInTime String

The point in time for the restore. Only applies if create_mode is PointInTimeRestore, it should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.

sourceDatabaseDeletionDate String

The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

sourceDatabaseId String

The URI of the source database if create_mode value is not Default.

tags Map<String>

A mapping of tags to assign to the resource.

threatDetectionPolicy Property Map

Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

zoneRedundant Boolean

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

Outputs

All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:

CreationDate string

The creation date of the SQL Database.

DefaultSecondaryLocation string

The default secondary location of the SQL Database.

Encryption string
Id string

The provider-assigned unique ID for this managed resource.

CreationDate string

The creation date of the SQL Database.

DefaultSecondaryLocation string

The default secondary location of the SQL Database.

Encryption string
Id string

The provider-assigned unique ID for this managed resource.

creationDate String

The creation date of the SQL Database.

defaultSecondaryLocation String

The default secondary location of the SQL Database.

encryption String
id String

The provider-assigned unique ID for this managed resource.

creationDate string

The creation date of the SQL Database.

defaultSecondaryLocation string

The default secondary location of the SQL Database.

encryption string
id string

The provider-assigned unique ID for this managed resource.

creation_date str

The creation date of the SQL Database.

default_secondary_location str

The default secondary location of the SQL Database.

encryption str
id str

The provider-assigned unique ID for this managed resource.

creationDate String

The creation date of the SQL Database.

defaultSecondaryLocation String

The default secondary location of the SQL Database.

encryption String
id String

The provider-assigned unique ID for this managed resource.

Look up Existing Database Resource

Get an existing Database resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DatabaseState, opts?: CustomResourceOptions): Database
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        collation: Optional[str] = None,
        create_mode: Optional[str] = None,
        creation_date: Optional[str] = None,
        default_secondary_location: Optional[str] = None,
        edition: Optional[str] = None,
        elastic_pool_name: Optional[str] = None,
        encryption: Optional[str] = None,
        import_: Optional[DatabaseImportArgs] = None,
        location: Optional[str] = None,
        max_size_bytes: Optional[str] = None,
        max_size_gb: Optional[str] = None,
        name: Optional[str] = None,
        read_scale: Optional[bool] = None,
        requested_service_objective_id: Optional[str] = None,
        requested_service_objective_name: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        restore_point_in_time: Optional[str] = None,
        server_name: Optional[str] = None,
        source_database_deletion_date: Optional[str] = None,
        source_database_id: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        threat_detection_policy: Optional[DatabaseThreatDetectionPolicyArgs] = None,
        zone_redundant: Optional[bool] = None) -> Database
func GetDatabase(ctx *Context, name string, id IDInput, state *DatabaseState, opts ...ResourceOption) (*Database, error)
public static Database Get(string name, Input<string> id, DatabaseState? state, CustomResourceOptions? opts = null)
public static Database get(String name, Output<String> id, DatabaseState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Collation string

The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

CreateMode string

Specifies how to create the database. Valid values are: Default, Copy, OnlineSecondary, NonReadableSecondary, PointInTimeRestore, Recovery, Restore or RestoreLongTermRetentionBackup. Must be Default to create a new database. Defaults to Default. Please see Azure SQL Database REST API

CreationDate string

The creation date of the SQL Database.

DefaultSecondaryLocation string

The default secondary location of the SQL Database.

Edition string

The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, DataWarehouse, Business, BusinessCritical, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, or Web. Please see Azure SQL database models.

ElasticPoolName string

The name of the elastic database pool.

Encryption string
Import DatabaseImportArgs

A Database Import block as documented below. create_mode must be set to Default.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

MaxSizeBytes string

The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL database models.

MaxSizeGb string
Name string

The name of the database. Changing this forces a new resource to be created.

ReadScale bool

Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.

RequestedServiceObjectiveId string

A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .

RequestedServiceObjectiveName string

The service objective name for the database. Valid values depend on edition and location and may include S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. You can list the available names with the CLI: shell az sql db list-editions -l westus -o table. For further information please see Azure CLI - az sql db.

ResourceGroupName string

The name of the resource group in which to create the database. This must be the same as Database Server resource group currently. Changing this forces a new resource to be created.

RestorePointInTime string

The point in time for the restore. Only applies if create_mode is PointInTimeRestore, it should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.

ServerName string

The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.

SourceDatabaseDeletionDate string

The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

SourceDatabaseId string

The URI of the source database if create_mode value is not Default.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

ThreatDetectionPolicy DatabaseThreatDetectionPolicyArgs

Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

ZoneRedundant bool

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

Collation string

The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

CreateMode string

Specifies how to create the database. Valid values are: Default, Copy, OnlineSecondary, NonReadableSecondary, PointInTimeRestore, Recovery, Restore or RestoreLongTermRetentionBackup. Must be Default to create a new database. Defaults to Default. Please see Azure SQL Database REST API

CreationDate string

The creation date of the SQL Database.

DefaultSecondaryLocation string

The default secondary location of the SQL Database.

Edition string

The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, DataWarehouse, Business, BusinessCritical, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, or Web. Please see Azure SQL database models.

ElasticPoolName string

The name of the elastic database pool.

Encryption string
Import DatabaseImportArgs

A Database Import block as documented below. create_mode must be set to Default.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

MaxSizeBytes string

The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL database models.

MaxSizeGb string
Name string

The name of the database. Changing this forces a new resource to be created.

ReadScale bool

Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.

RequestedServiceObjectiveId string

A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .

RequestedServiceObjectiveName string

The service objective name for the database. Valid values depend on edition and location and may include S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. You can list the available names with the CLI: shell az sql db list-editions -l westus -o table. For further information please see Azure CLI - az sql db.

ResourceGroupName string

The name of the resource group in which to create the database. This must be the same as Database Server resource group currently. Changing this forces a new resource to be created.

RestorePointInTime string

The point in time for the restore. Only applies if create_mode is PointInTimeRestore, it should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.

ServerName string

The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.

SourceDatabaseDeletionDate string

The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

SourceDatabaseId string

The URI of the source database if create_mode value is not Default.

Tags map[string]string

A mapping of tags to assign to the resource.

ThreatDetectionPolicy DatabaseThreatDetectionPolicyArgs

Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

ZoneRedundant bool

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

collation String

The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

createMode String

Specifies how to create the database. Valid values are: Default, Copy, OnlineSecondary, NonReadableSecondary, PointInTimeRestore, Recovery, Restore or RestoreLongTermRetentionBackup. Must be Default to create a new database. Defaults to Default. Please see Azure SQL Database REST API

creationDate String

The creation date of the SQL Database.

defaultSecondaryLocation String

The default secondary location of the SQL Database.

edition String

The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, DataWarehouse, Business, BusinessCritical, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, or Web. Please see Azure SQL database models.

elasticPoolName String

The name of the elastic database pool.

encryption String
import_ DatabaseImportArgs

A Database Import block as documented below. create_mode must be set to Default.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maxSizeBytes String

The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL database models.

maxSizeGb String
name String

The name of the database. Changing this forces a new resource to be created.

readScale Boolean

Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.

requestedServiceObjectiveId String

A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .

requestedServiceObjectiveName String

The service objective name for the database. Valid values depend on edition and location and may include S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. You can list the available names with the CLI: shell az sql db list-editions -l westus -o table. For further information please see Azure CLI - az sql db.

resourceGroupName String

The name of the resource group in which to create the database. This must be the same as Database Server resource group currently. Changing this forces a new resource to be created.

restorePointInTime String

The point in time for the restore. Only applies if create_mode is PointInTimeRestore, it should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.

serverName String

The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.

sourceDatabaseDeletionDate String

The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

sourceDatabaseId String

The URI of the source database if create_mode value is not Default.

tags Map<String,String>

A mapping of tags to assign to the resource.

threatDetectionPolicy DatabaseThreatDetectionPolicyArgs

Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

zoneRedundant Boolean

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

collation string

The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

createMode string

Specifies how to create the database. Valid values are: Default, Copy, OnlineSecondary, NonReadableSecondary, PointInTimeRestore, Recovery, Restore or RestoreLongTermRetentionBackup. Must be Default to create a new database. Defaults to Default. Please see Azure SQL Database REST API

creationDate string

The creation date of the SQL Database.

defaultSecondaryLocation string

The default secondary location of the SQL Database.

edition string

The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, DataWarehouse, Business, BusinessCritical, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, or Web. Please see Azure SQL database models.

elasticPoolName string

The name of the elastic database pool.

encryption string
import DatabaseImportArgs

A Database Import block as documented below. create_mode must be set to Default.

location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maxSizeBytes string

The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL database models.

maxSizeGb string
name string

The name of the database. Changing this forces a new resource to be created.

readScale boolean

Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.

requestedServiceObjectiveId string

A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .

requestedServiceObjectiveName string

The service objective name for the database. Valid values depend on edition and location and may include S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. You can list the available names with the CLI: shell az sql db list-editions -l westus -o table. For further information please see Azure CLI - az sql db.

resourceGroupName string

The name of the resource group in which to create the database. This must be the same as Database Server resource group currently. Changing this forces a new resource to be created.

restorePointInTime string

The point in time for the restore. Only applies if create_mode is PointInTimeRestore, it should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.

serverName string

The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.

sourceDatabaseDeletionDate string

The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

sourceDatabaseId string

The URI of the source database if create_mode value is not Default.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

threatDetectionPolicy DatabaseThreatDetectionPolicyArgs

Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

zoneRedundant boolean

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

collation str

The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

create_mode str

Specifies how to create the database. Valid values are: Default, Copy, OnlineSecondary, NonReadableSecondary, PointInTimeRestore, Recovery, Restore or RestoreLongTermRetentionBackup. Must be Default to create a new database. Defaults to Default. Please see Azure SQL Database REST API

creation_date str

The creation date of the SQL Database.

default_secondary_location str

The default secondary location of the SQL Database.

edition str

The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, DataWarehouse, Business, BusinessCritical, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, or Web. Please see Azure SQL database models.

elastic_pool_name str

The name of the elastic database pool.

encryption str
import_ DatabaseImportArgs

A Database Import block as documented below. create_mode must be set to Default.

location str

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

max_size_bytes str

The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL database models.

max_size_gb str
name str

The name of the database. Changing this forces a new resource to be created.

read_scale bool

Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.

requested_service_objective_id str

A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .

requested_service_objective_name str

The service objective name for the database. Valid values depend on edition and location and may include S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. You can list the available names with the CLI: shell az sql db list-editions -l westus -o table. For further information please see Azure CLI - az sql db.

resource_group_name str

The name of the resource group in which to create the database. This must be the same as Database Server resource group currently. Changing this forces a new resource to be created.

restore_point_in_time str

The point in time for the restore. Only applies if create_mode is PointInTimeRestore, it should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.

server_name str

The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.

source_database_deletion_date str

The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

source_database_id str

The URI of the source database if create_mode value is not Default.

tags Mapping[str, str]

A mapping of tags to assign to the resource.

threat_detection_policy DatabaseThreatDetectionPolicyArgs

Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

zone_redundant bool

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

collation String

The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

createMode String

Specifies how to create the database. Valid values are: Default, Copy, OnlineSecondary, NonReadableSecondary, PointInTimeRestore, Recovery, Restore or RestoreLongTermRetentionBackup. Must be Default to create a new database. Defaults to Default. Please see Azure SQL Database REST API

creationDate String

The creation date of the SQL Database.

defaultSecondaryLocation String

The default secondary location of the SQL Database.

edition String

The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, DataWarehouse, Business, BusinessCritical, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, or Web. Please see Azure SQL database models.

elasticPoolName String

The name of the elastic database pool.

encryption String
import Property Map

A Database Import block as documented below. create_mode must be set to Default.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

maxSizeBytes String

The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL database models.

maxSizeGb String
name String

The name of the database. Changing this forces a new resource to be created.

readScale Boolean

Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.

requestedServiceObjectiveId String

A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .

requestedServiceObjectiveName String

The service objective name for the database. Valid values depend on edition and location and may include S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. You can list the available names with the CLI: shell az sql db list-editions -l westus -o table. For further information please see Azure CLI - az sql db.

resourceGroupName String

The name of the resource group in which to create the database. This must be the same as Database Server resource group currently. Changing this forces a new resource to be created.

restorePointInTime String

The point in time for the restore. Only applies if create_mode is PointInTimeRestore, it should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.

serverName String

The name of the SQL Server on which to create the database. Changing this forces a new resource to be created.

sourceDatabaseDeletionDate String

The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

sourceDatabaseId String

The URI of the source database if create_mode value is not Default.

tags Map<String>

A mapping of tags to assign to the resource.

threatDetectionPolicy Property Map

Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

zoneRedundant Boolean

Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.

Supporting Types

DatabaseImport

AdministratorLogin string

Specifies the name of the SQL administrator.

AdministratorLoginPassword string

Specifies the password of the SQL administrator.

AuthenticationType string

Specifies the type of authentication used to access the server. Valid values are SQL or ADPassword.

StorageKey string

Specifies the access key for the storage account.

StorageKeyType string

Specifies the type of access key for the storage account. Valid values are StorageAccessKey or SharedAccessKey.

StorageUri string

Specifies the blob URI of the .bacpac file.

OperationMode string

Specifies the type of import operation being performed. The only allowable value is Import.

AdministratorLogin string

Specifies the name of the SQL administrator.

AdministratorLoginPassword string

Specifies the password of the SQL administrator.

AuthenticationType string

Specifies the type of authentication used to access the server. Valid values are SQL or ADPassword.

StorageKey string

Specifies the access key for the storage account.

StorageKeyType string

Specifies the type of access key for the storage account. Valid values are StorageAccessKey or SharedAccessKey.

StorageUri string

Specifies the blob URI of the .bacpac file.

OperationMode string

Specifies the type of import operation being performed. The only allowable value is Import.

administratorLogin String

Specifies the name of the SQL administrator.

administratorLoginPassword String

Specifies the password of the SQL administrator.

authenticationType String

Specifies the type of authentication used to access the server. Valid values are SQL or ADPassword.

storageKey String

Specifies the access key for the storage account.

storageKeyType String

Specifies the type of access key for the storage account. Valid values are StorageAccessKey or SharedAccessKey.

storageUri String

Specifies the blob URI of the .bacpac file.

operationMode String

Specifies the type of import operation being performed. The only allowable value is Import.

administratorLogin string

Specifies the name of the SQL administrator.

administratorLoginPassword string

Specifies the password of the SQL administrator.

authenticationType string

Specifies the type of authentication used to access the server. Valid values are SQL or ADPassword.

storageKey string

Specifies the access key for the storage account.

storageKeyType string

Specifies the type of access key for the storage account. Valid values are StorageAccessKey or SharedAccessKey.

storageUri string

Specifies the blob URI of the .bacpac file.

operationMode string

Specifies the type of import operation being performed. The only allowable value is Import.

administrator_login str

Specifies the name of the SQL administrator.

administrator_login_password str

Specifies the password of the SQL administrator.

authentication_type str

Specifies the type of authentication used to access the server. Valid values are SQL or ADPassword.

storage_key str

Specifies the access key for the storage account.

storage_key_type str

Specifies the type of access key for the storage account. Valid values are StorageAccessKey or SharedAccessKey.

storage_uri str

Specifies the blob URI of the .bacpac file.

operation_mode str

Specifies the type of import operation being performed. The only allowable value is Import.

administratorLogin String

Specifies the name of the SQL administrator.

administratorLoginPassword String

Specifies the password of the SQL administrator.

authenticationType String

Specifies the type of authentication used to access the server. Valid values are SQL or ADPassword.

storageKey String

Specifies the access key for the storage account.

storageKeyType String

Specifies the type of access key for the storage account. Valid values are StorageAccessKey or SharedAccessKey.

storageUri String

Specifies the blob URI of the .bacpac file.

operationMode String

Specifies the type of import operation being performed. The only allowable value is Import.

DatabaseThreatDetectionPolicy

DisabledAlerts List<string>

Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability.

EmailAccountAdmins string

Should the account administrators be emailed when this alert is triggered? Possible values are Disabled and Enabled.

EmailAddresses List<string>

A list of email addresses which alerts should be sent to.

RetentionDays int

Specifies the number of days to keep in the Threat Detection audit logs.

State string

The State of the Policy. Possible values are Enabled, Disabled or New.

StorageAccountAccessKey string

Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled.

StorageEndpoint string

Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if state is Enabled.

DisabledAlerts []string

Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability.

EmailAccountAdmins string

Should the account administrators be emailed when this alert is triggered? Possible values are Disabled and Enabled.

EmailAddresses []string

A list of email addresses which alerts should be sent to.

RetentionDays int

Specifies the number of days to keep in the Threat Detection audit logs.

State string

The State of the Policy. Possible values are Enabled, Disabled or New.

StorageAccountAccessKey string

Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled.

StorageEndpoint string

Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if state is Enabled.

disabledAlerts List<String>

Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability.

emailAccountAdmins String

Should the account administrators be emailed when this alert is triggered? Possible values are Disabled and Enabled.

emailAddresses List<String>

A list of email addresses which alerts should be sent to.

retentionDays Integer

Specifies the number of days to keep in the Threat Detection audit logs.

state String

The State of the Policy. Possible values are Enabled, Disabled or New.

storageAccountAccessKey String

Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled.

storageEndpoint String

Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if state is Enabled.

disabledAlerts string[]

Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability.

emailAccountAdmins string

Should the account administrators be emailed when this alert is triggered? Possible values are Disabled and Enabled.

emailAddresses string[]

A list of email addresses which alerts should be sent to.

retentionDays number

Specifies the number of days to keep in the Threat Detection audit logs.

state string

The State of the Policy. Possible values are Enabled, Disabled or New.

storageAccountAccessKey string

Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled.

storageEndpoint string

Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if state is Enabled.

disabled_alerts Sequence[str]

Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability.

email_account_admins str

Should the account administrators be emailed when this alert is triggered? Possible values are Disabled and Enabled.

email_addresses Sequence[str]

A list of email addresses which alerts should be sent to.

retention_days int

Specifies the number of days to keep in the Threat Detection audit logs.

state str

The State of the Policy. Possible values are Enabled, Disabled or New.

storage_account_access_key str

Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled.

storage_endpoint str

Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if state is Enabled.

disabledAlerts List<String>

Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability.

emailAccountAdmins String

Should the account administrators be emailed when this alert is triggered? Possible values are Disabled and Enabled.

emailAddresses List<String>

A list of email addresses which alerts should be sent to.

retentionDays Number

Specifies the number of days to keep in the Threat Detection audit logs.

state String

The State of the Policy. Possible values are Enabled, Disabled or New.

storageAccountAccessKey String

Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled.

storageEndpoint String

Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if state is Enabled.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.