azure.mssql.Database
Explore with Pulumi AI
Manages a MS SQL Database.
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 exampleAccount = new Azure.Storage.Account("exampleAccount", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleServer = new Azure.MSSql.Server("exampleServer", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
Version = "12.0",
AdministratorLogin = "4dm1n157r470r",
AdministratorLoginPassword = "4-v3ry-53cr37-p455w0rd",
});
var test = new Azure.MSSql.Database("test", new()
{
ServerId = exampleServer.Id,
Collation = "SQL_Latin1_General_CP1_CI_AS",
LicenseType = "LicenseIncluded",
MaxSizeGb = 4,
ReadScale = true,
SkuName = "S0",
ZoneRedundant = true,
Tags =
{
{ "foo", "bar" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mssql"
"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
}
_, 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
}
exampleServer, err := mssql.NewServer(ctx, "exampleServer", &mssql.ServerArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
Version: pulumi.String("12.0"),
AdministratorLogin: pulumi.String("4dm1n157r470r"),
AdministratorLoginPassword: pulumi.String("4-v3ry-53cr37-p455w0rd"),
})
if err != nil {
return err
}
_, err = mssql.NewDatabase(ctx, "test", &mssql.DatabaseArgs{
ServerId: exampleServer.ID(),
Collation: pulumi.String("SQL_Latin1_General_CP1_CI_AS"),
LicenseType: pulumi.String("LicenseIncluded"),
MaxSizeGb: pulumi.Int(4),
ReadScale: pulumi.Bool(true),
SkuName: pulumi.String("S0"),
ZoneRedundant: pulumi.Bool(true),
Tags: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
})
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.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.mssql.Server;
import com.pulumi.azure.mssql.ServerArgs;
import com.pulumi.azure.mssql.Database;
import com.pulumi.azure.mssql.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 exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleServer = new Server("exampleServer", ServerArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.version("12.0")
.administratorLogin("4dm1n157r470r")
.administratorLoginPassword("4-v3ry-53cr37-p455w0rd")
.build());
var test = new Database("test", DatabaseArgs.builder()
.serverId(exampleServer.id())
.collation("SQL_Latin1_General_CP1_CI_AS")
.licenseType("LicenseIncluded")
.maxSizeGb(4)
.readScale(true)
.skuName("S0")
.zoneRedundant(true)
.tags(Map.of("foo", "bar"))
.build());
}
}
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
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_server = azure.mssql.Server("exampleServer",
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")
test = azure.mssql.Database("test",
server_id=example_server.id,
collation="SQL_Latin1_General_CP1_CI_AS",
license_type="LicenseIncluded",
max_size_gb=4,
read_scale=True,
sku_name="S0",
zone_redundant=True,
tags={
"foo": "bar",
})
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleServer = new azure.mssql.Server("exampleServer", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
version: "12.0",
administratorLogin: "4dm1n157r470r",
administratorLoginPassword: "4-v3ry-53cr37-p455w0rd",
});
const test = new azure.mssql.Database("test", {
serverId: exampleServer.id,
collation: "SQL_Latin1_General_CP1_CI_AS",
licenseType: "LicenseIncluded",
maxSizeGb: 4,
readScale: true,
skuName: "S0",
zoneRedundant: true,
tags: {
foo: "bar",
},
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleAccount:
type: azure:storage:Account
properties:
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
accountTier: Standard
accountReplicationType: LRS
exampleServer:
type: azure:mssql:Server
properties:
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
version: '12.0'
administratorLogin: 4dm1n157r470r
administratorLoginPassword: 4-v3ry-53cr37-p455w0rd
test:
type: azure:mssql:Database
properties:
serverId: ${exampleServer.id}
collation: SQL_Latin1_General_CP1_CI_AS
licenseType: LicenseIncluded
maxSizeGb: 4
readScale: true
skuName: S0
zoneRedundant: true
tags:
foo: bar
Create Database Resource
new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);
@overload
def Database(resource_name: str,
opts: Optional[ResourceOptions] = None,
auto_pause_delay_in_minutes: Optional[int] = None,
collation: Optional[str] = None,
create_mode: Optional[str] = None,
creation_source_database_id: Optional[str] = None,
elastic_pool_id: Optional[str] = None,
geo_backup_enabled: Optional[bool] = None,
import_: Optional[DatabaseImportArgs] = None,
ledger_enabled: Optional[bool] = None,
license_type: Optional[str] = None,
long_term_retention_policy: Optional[DatabaseLongTermRetentionPolicyArgs] = None,
maintenance_configuration_name: Optional[str] = None,
max_size_gb: Optional[int] = None,
min_capacity: Optional[float] = None,
name: Optional[str] = None,
read_replica_count: Optional[int] = None,
read_scale: Optional[bool] = None,
recover_database_id: Optional[str] = None,
restore_dropped_database_id: Optional[str] = None,
restore_point_in_time: Optional[str] = None,
sample_name: Optional[str] = None,
server_id: Optional[str] = None,
short_term_retention_policy: Optional[DatabaseShortTermRetentionPolicyArgs] = None,
sku_name: Optional[str] = None,
storage_account_type: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
threat_detection_policy: Optional[DatabaseThreatDetectionPolicyArgs] = None,
transparent_data_encryption_enabled: Optional[bool] = 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:mssql: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:
- Server
Id string The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created.
- Auto
Pause intDelay In Minutes Time in minutes after which database is automatically paused. A value of
-1
means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases.- Collation string
Specifies the collation of the database. Changing this forces a new resource to be created.
- Create
Mode string The create mode of the database. Possible values are
Copy
,Default
,OnlineSecondary
,PointInTimeRestore
,Recovery
,Restore
,RestoreExternalBackup
,RestoreExternalBackupSecondary
,RestoreLongTermRetentionBackup
andSecondary
. Mutually exclusive withimport
. Changing this forces a new resource to be created.- Creation
Source stringDatabase Id The ID of the source database from which to create the new database. This should only be used for databases with
create_mode
values that use another database as reference. Changing this forces a new resource to be created.- Elastic
Pool stringId Specifies the ID of the elastic pool containing this database.
- Geo
Backup boolEnabled A boolean that specifies if the Geo Backup Policy is enabled. Defaults to
true
.- Import
Database
Import Args A Database Import block as documented below. Mutually exclusive with
create_mode
.- Ledger
Enabled bool A boolean that specifies if this is a ledger database. Defaults to
false
. Changing this forces a new resource to be created.- License
Type string Specifies the license type applied to this database. Possible values are
LicenseIncluded
andBasePrice
.- Long
Term DatabaseRetention Policy Long Term Retention Policy Args A
long_term_retention_policy
block as defined below.- Maintenance
Configuration stringName The name of the Public Maintenance Configuration window to apply to the database. Valid values include
SQL_Default
,SQL_EastUS_DB_1
,SQL_EastUS2_DB_1
,SQL_SoutheastAsia_DB_1
,SQL_AustraliaEast_DB_1
,SQL_NorthEurope_DB_1
,SQL_SouthCentralUS_DB_1
,SQL_WestUS2_DB_1
,SQL_UKSouth_DB_1
,SQL_WestEurope_DB_1
,SQL_EastUS_DB_2
,SQL_EastUS2_DB_2
,SQL_WestUS2_DB_2
,SQL_SoutheastAsia_DB_2
,SQL_AustraliaEast_DB_2
,SQL_NorthEurope_DB_2
,SQL_SouthCentralUS_DB_2
,SQL_UKSouth_DB_2
,SQL_WestEurope_DB_2
,SQL_AustraliaSoutheast_DB_1
,SQL_BrazilSouth_DB_1
,SQL_CanadaCentral_DB_1
,SQL_CanadaEast_DB_1
,SQL_CentralUS_DB_1
,SQL_EastAsia_DB_1
,SQL_FranceCentral_DB_1
,SQL_GermanyWestCentral_DB_1
,SQL_CentralIndia_DB_1
,SQL_SouthIndia_DB_1
,SQL_JapanEast_DB_1
,SQL_JapanWest_DB_1
,SQL_NorthCentralUS_DB_1
,SQL_UKWest_DB_1
,SQL_WestUS_DB_1
,SQL_AustraliaSoutheast_DB_2
,SQL_BrazilSouth_DB_2
,SQL_CanadaCentral_DB_2
,SQL_CanadaEast_DB_2
,SQL_CentralUS_DB_2
,SQL_EastAsia_DB_2
,SQL_FranceCentral_DB_2
,SQL_GermanyWestCentral_DB_2
,SQL_CentralIndia_DB_2
,SQL_SouthIndia_DB_2
,SQL_JapanEast_DB_2
,SQL_JapanWest_DB_2
,SQL_NorthCentralUS_DB_2
,SQL_UKWest_DB_2
,SQL_WestUS_DB_2
,SQL_WestCentralUS_DB_1
,SQL_FranceSouth_DB_1
,SQL_WestCentralUS_DB_2
,SQL_FranceSouth_DB_2
,SQL_SwitzerlandNorth_DB_1
,SQL_SwitzerlandNorth_DB_2
,SQL_BrazilSoutheast_DB_1
,SQL_UAENorth_DB_1
,SQL_BrazilSoutheast_DB_2
,SQL_UAENorth_DB_2
. Defaults toSQL_Default
.- Max
Size intGb The max size of the database in gigabytes.
- Min
Capacity double Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
- Name string
The name of the MS SQL Database. Changing this forces a new resource to be created.
- Read
Replica intCount The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
- Read
Scale bool If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
- Recover
Database stringId The ID of the database to be recovered. This property is only applicable when the
create_mode
isRecovery
.- Restore
Dropped stringDatabase Id The ID of the database to be restored. This property is only applicable when the
create_mode
isRestore
.- Restore
Point stringIn Time Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for
create_mode
=PointInTimeRestore
databases.- Sample
Name string Specifies the name of the sample schema to apply when creating this database. Possible value is
AdventureWorksLT
.- Short
Term DatabaseRetention Policy Short Term Retention Policy Args A
short_term_retention_policy
block as defined below.- Sku
Name string Specifies the name of the SKU used by the database. For example,
GP_S_Gen5_2
,HS_Gen4_1
,BC_Gen5_2
,ElasticPool
,Basic
,S0
,P2
,DW100c
,DS100
. Changing this from the HyperScale service tier to another service tier will create a new resource.- Storage
Account stringType Specifies the storage account type used to store backups for this database. Possible values are
Geo
,Local
andZone
. The default value isGeo
.- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Threat
Detection DatabasePolicy Threat Detection Policy Args Threat detection policy configuration. The
threat_detection_policy
block supports fields documented below.- Transparent
Data boolEncryption Enabled If set to true, Transparent Data Encryption will be enabled on the database. Defaults to
true
.- 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. This property is only settable for Premium and Business Critical databases.
- Server
Id string The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created.
- Auto
Pause intDelay In Minutes Time in minutes after which database is automatically paused. A value of
-1
means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases.- Collation string
Specifies the collation of the database. Changing this forces a new resource to be created.
- Create
Mode string The create mode of the database. Possible values are
Copy
,Default
,OnlineSecondary
,PointInTimeRestore
,Recovery
,Restore
,RestoreExternalBackup
,RestoreExternalBackupSecondary
,RestoreLongTermRetentionBackup
andSecondary
. Mutually exclusive withimport
. Changing this forces a new resource to be created.- Creation
Source stringDatabase Id The ID of the source database from which to create the new database. This should only be used for databases with
create_mode
values that use another database as reference. Changing this forces a new resource to be created.- Elastic
Pool stringId Specifies the ID of the elastic pool containing this database.
- Geo
Backup boolEnabled A boolean that specifies if the Geo Backup Policy is enabled. Defaults to
true
.- Import
Database
Import Args A Database Import block as documented below. Mutually exclusive with
create_mode
.- Ledger
Enabled bool A boolean that specifies if this is a ledger database. Defaults to
false
. Changing this forces a new resource to be created.- License
Type string Specifies the license type applied to this database. Possible values are
LicenseIncluded
andBasePrice
.- Long
Term DatabaseRetention Policy Long Term Retention Policy Args A
long_term_retention_policy
block as defined below.- Maintenance
Configuration stringName The name of the Public Maintenance Configuration window to apply to the database. Valid values include
SQL_Default
,SQL_EastUS_DB_1
,SQL_EastUS2_DB_1
,SQL_SoutheastAsia_DB_1
,SQL_AustraliaEast_DB_1
,SQL_NorthEurope_DB_1
,SQL_SouthCentralUS_DB_1
,SQL_WestUS2_DB_1
,SQL_UKSouth_DB_1
,SQL_WestEurope_DB_1
,SQL_EastUS_DB_2
,SQL_EastUS2_DB_2
,SQL_WestUS2_DB_2
,SQL_SoutheastAsia_DB_2
,SQL_AustraliaEast_DB_2
,SQL_NorthEurope_DB_2
,SQL_SouthCentralUS_DB_2
,SQL_UKSouth_DB_2
,SQL_WestEurope_DB_2
,SQL_AustraliaSoutheast_DB_1
,SQL_BrazilSouth_DB_1
,SQL_CanadaCentral_DB_1
,SQL_CanadaEast_DB_1
,SQL_CentralUS_DB_1
,SQL_EastAsia_DB_1
,SQL_FranceCentral_DB_1
,SQL_GermanyWestCentral_DB_1
,SQL_CentralIndia_DB_1
,SQL_SouthIndia_DB_1
,SQL_JapanEast_DB_1
,SQL_JapanWest_DB_1
,SQL_NorthCentralUS_DB_1
,SQL_UKWest_DB_1
,SQL_WestUS_DB_1
,SQL_AustraliaSoutheast_DB_2
,SQL_BrazilSouth_DB_2
,SQL_CanadaCentral_DB_2
,SQL_CanadaEast_DB_2
,SQL_CentralUS_DB_2
,SQL_EastAsia_DB_2
,SQL_FranceCentral_DB_2
,SQL_GermanyWestCentral_DB_2
,SQL_CentralIndia_DB_2
,SQL_SouthIndia_DB_2
,SQL_JapanEast_DB_2
,SQL_JapanWest_DB_2
,SQL_NorthCentralUS_DB_2
,SQL_UKWest_DB_2
,SQL_WestUS_DB_2
,SQL_WestCentralUS_DB_1
,SQL_FranceSouth_DB_1
,SQL_WestCentralUS_DB_2
,SQL_FranceSouth_DB_2
,SQL_SwitzerlandNorth_DB_1
,SQL_SwitzerlandNorth_DB_2
,SQL_BrazilSoutheast_DB_1
,SQL_UAENorth_DB_1
,SQL_BrazilSoutheast_DB_2
,SQL_UAENorth_DB_2
. Defaults toSQL_Default
.- Max
Size intGb The max size of the database in gigabytes.
- Min
Capacity float64 Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
- Name string
The name of the MS SQL Database. Changing this forces a new resource to be created.
- Read
Replica intCount The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
- Read
Scale bool If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
- Recover
Database stringId The ID of the database to be recovered. This property is only applicable when the
create_mode
isRecovery
.- Restore
Dropped stringDatabase Id The ID of the database to be restored. This property is only applicable when the
create_mode
isRestore
.- Restore
Point stringIn Time Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for
create_mode
=PointInTimeRestore
databases.- Sample
Name string Specifies the name of the sample schema to apply when creating this database. Possible value is
AdventureWorksLT
.- Short
Term DatabaseRetention Policy Short Term Retention Policy Args A
short_term_retention_policy
block as defined below.- Sku
Name string Specifies the name of the SKU used by the database. For example,
GP_S_Gen5_2
,HS_Gen4_1
,BC_Gen5_2
,ElasticPool
,Basic
,S0
,P2
,DW100c
,DS100
. Changing this from the HyperScale service tier to another service tier will create a new resource.- Storage
Account stringType Specifies the storage account type used to store backups for this database. Possible values are
Geo
,Local
andZone
. The default value isGeo
.- map[string]string
A mapping of tags to assign to the resource.
- Threat
Detection DatabasePolicy Threat Detection Policy Args Threat detection policy configuration. The
threat_detection_policy
block supports fields documented below.- Transparent
Data boolEncryption Enabled If set to true, Transparent Data Encryption will be enabled on the database. Defaults to
true
.- 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. This property is only settable for Premium and Business Critical databases.
- server
Id String The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created.
- auto
Pause IntegerDelay In Minutes Time in minutes after which database is automatically paused. A value of
-1
means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases.- collation String
Specifies the collation of the database. Changing this forces a new resource to be created.
- create
Mode String The create mode of the database. Possible values are
Copy
,Default
,OnlineSecondary
,PointInTimeRestore
,Recovery
,Restore
,RestoreExternalBackup
,RestoreExternalBackupSecondary
,RestoreLongTermRetentionBackup
andSecondary
. Mutually exclusive withimport
. Changing this forces a new resource to be created.- creation
Source StringDatabase Id The ID of the source database from which to create the new database. This should only be used for databases with
create_mode
values that use another database as reference. Changing this forces a new resource to be created.- elastic
Pool StringId Specifies the ID of the elastic pool containing this database.
- geo
Backup BooleanEnabled A boolean that specifies if the Geo Backup Policy is enabled. Defaults to
true
.- import_
Database
Import Args A Database Import block as documented below. Mutually exclusive with
create_mode
.- ledger
Enabled Boolean A boolean that specifies if this is a ledger database. Defaults to
false
. Changing this forces a new resource to be created.- license
Type String Specifies the license type applied to this database. Possible values are
LicenseIncluded
andBasePrice
.- long
Term DatabaseRetention Policy Long Term Retention Policy Args A
long_term_retention_policy
block as defined below.- maintenance
Configuration StringName The name of the Public Maintenance Configuration window to apply to the database. Valid values include
SQL_Default
,SQL_EastUS_DB_1
,SQL_EastUS2_DB_1
,SQL_SoutheastAsia_DB_1
,SQL_AustraliaEast_DB_1
,SQL_NorthEurope_DB_1
,SQL_SouthCentralUS_DB_1
,SQL_WestUS2_DB_1
,SQL_UKSouth_DB_1
,SQL_WestEurope_DB_1
,SQL_EastUS_DB_2
,SQL_EastUS2_DB_2
,SQL_WestUS2_DB_2
,SQL_SoutheastAsia_DB_2
,SQL_AustraliaEast_DB_2
,SQL_NorthEurope_DB_2
,SQL_SouthCentralUS_DB_2
,SQL_UKSouth_DB_2
,SQL_WestEurope_DB_2
,SQL_AustraliaSoutheast_DB_1
,SQL_BrazilSouth_DB_1
,SQL_CanadaCentral_DB_1
,SQL_CanadaEast_DB_1
,SQL_CentralUS_DB_1
,SQL_EastAsia_DB_1
,SQL_FranceCentral_DB_1
,SQL_GermanyWestCentral_DB_1
,SQL_CentralIndia_DB_1
,SQL_SouthIndia_DB_1
,SQL_JapanEast_DB_1
,SQL_JapanWest_DB_1
,SQL_NorthCentralUS_DB_1
,SQL_UKWest_DB_1
,SQL_WestUS_DB_1
,SQL_AustraliaSoutheast_DB_2
,SQL_BrazilSouth_DB_2
,SQL_CanadaCentral_DB_2
,SQL_CanadaEast_DB_2
,SQL_CentralUS_DB_2
,SQL_EastAsia_DB_2
,SQL_FranceCentral_DB_2
,SQL_GermanyWestCentral_DB_2
,SQL_CentralIndia_DB_2
,SQL_SouthIndia_DB_2
,SQL_JapanEast_DB_2
,SQL_JapanWest_DB_2
,SQL_NorthCentralUS_DB_2
,SQL_UKWest_DB_2
,SQL_WestUS_DB_2
,SQL_WestCentralUS_DB_1
,SQL_FranceSouth_DB_1
,SQL_WestCentralUS_DB_2
,SQL_FranceSouth_DB_2
,SQL_SwitzerlandNorth_DB_1
,SQL_SwitzerlandNorth_DB_2
,SQL_BrazilSoutheast_DB_1
,SQL_UAENorth_DB_1
,SQL_BrazilSoutheast_DB_2
,SQL_UAENorth_DB_2
. Defaults toSQL_Default
.- max
Size IntegerGb The max size of the database in gigabytes.
- min
Capacity Double Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
- name String
The name of the MS SQL Database. Changing this forces a new resource to be created.
- read
Replica IntegerCount The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
- read
Scale Boolean If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
- recover
Database StringId The ID of the database to be recovered. This property is only applicable when the
create_mode
isRecovery
.- restore
Dropped StringDatabase Id The ID of the database to be restored. This property is only applicable when the
create_mode
isRestore
.- restore
Point StringIn Time Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for
create_mode
=PointInTimeRestore
databases.- sample
Name String Specifies the name of the sample schema to apply when creating this database. Possible value is
AdventureWorksLT
.- short
Term DatabaseRetention Policy Short Term Retention Policy Args A
short_term_retention_policy
block as defined below.- sku
Name String Specifies the name of the SKU used by the database. For example,
GP_S_Gen5_2
,HS_Gen4_1
,BC_Gen5_2
,ElasticPool
,Basic
,S0
,P2
,DW100c
,DS100
. Changing this from the HyperScale service tier to another service tier will create a new resource.- storage
Account StringType Specifies the storage account type used to store backups for this database. Possible values are
Geo
,Local
andZone
. The default value isGeo
.- Map<String,String>
A mapping of tags to assign to the resource.
- threat
Detection DatabasePolicy Threat Detection Policy Args Threat detection policy configuration. The
threat_detection_policy
block supports fields documented below.- transparent
Data BooleanEncryption Enabled If set to true, Transparent Data Encryption will be enabled on the database. Defaults to
true
.- zone
Redundant Boolean Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases.
- server
Id string The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created.
- auto
Pause numberDelay In Minutes Time in minutes after which database is automatically paused. A value of
-1
means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases.- collation string
Specifies the collation of the database. Changing this forces a new resource to be created.
- create
Mode string The create mode of the database. Possible values are
Copy
,Default
,OnlineSecondary
,PointInTimeRestore
,Recovery
,Restore
,RestoreExternalBackup
,RestoreExternalBackupSecondary
,RestoreLongTermRetentionBackup
andSecondary
. Mutually exclusive withimport
. Changing this forces a new resource to be created.- creation
Source stringDatabase Id The ID of the source database from which to create the new database. This should only be used for databases with
create_mode
values that use another database as reference. Changing this forces a new resource to be created.- elastic
Pool stringId Specifies the ID of the elastic pool containing this database.
- geo
Backup booleanEnabled A boolean that specifies if the Geo Backup Policy is enabled. Defaults to
true
.- import
Database
Import Args A Database Import block as documented below. Mutually exclusive with
create_mode
.- ledger
Enabled boolean A boolean that specifies if this is a ledger database. Defaults to
false
. Changing this forces a new resource to be created.- license
Type string Specifies the license type applied to this database. Possible values are
LicenseIncluded
andBasePrice
.- long
Term DatabaseRetention Policy Long Term Retention Policy Args A
long_term_retention_policy
block as defined below.- maintenance
Configuration stringName The name of the Public Maintenance Configuration window to apply to the database. Valid values include
SQL_Default
,SQL_EastUS_DB_1
,SQL_EastUS2_DB_1
,SQL_SoutheastAsia_DB_1
,SQL_AustraliaEast_DB_1
,SQL_NorthEurope_DB_1
,SQL_SouthCentralUS_DB_1
,SQL_WestUS2_DB_1
,SQL_UKSouth_DB_1
,SQL_WestEurope_DB_1
,SQL_EastUS_DB_2
,SQL_EastUS2_DB_2
,SQL_WestUS2_DB_2
,SQL_SoutheastAsia_DB_2
,SQL_AustraliaEast_DB_2
,SQL_NorthEurope_DB_2
,SQL_SouthCentralUS_DB_2
,SQL_UKSouth_DB_2
,SQL_WestEurope_DB_2
,SQL_AustraliaSoutheast_DB_1
,SQL_BrazilSouth_DB_1
,SQL_CanadaCentral_DB_1
,SQL_CanadaEast_DB_1
,SQL_CentralUS_DB_1
,SQL_EastAsia_DB_1
,SQL_FranceCentral_DB_1
,SQL_GermanyWestCentral_DB_1
,SQL_CentralIndia_DB_1
,SQL_SouthIndia_DB_1
,SQL_JapanEast_DB_1
,SQL_JapanWest_DB_1
,SQL_NorthCentralUS_DB_1
,SQL_UKWest_DB_1
,SQL_WestUS_DB_1
,SQL_AustraliaSoutheast_DB_2
,SQL_BrazilSouth_DB_2
,SQL_CanadaCentral_DB_2
,SQL_CanadaEast_DB_2
,SQL_CentralUS_DB_2
,SQL_EastAsia_DB_2
,SQL_FranceCentral_DB_2
,SQL_GermanyWestCentral_DB_2
,SQL_CentralIndia_DB_2
,SQL_SouthIndia_DB_2
,SQL_JapanEast_DB_2
,SQL_JapanWest_DB_2
,SQL_NorthCentralUS_DB_2
,SQL_UKWest_DB_2
,SQL_WestUS_DB_2
,SQL_WestCentralUS_DB_1
,SQL_FranceSouth_DB_1
,SQL_WestCentralUS_DB_2
,SQL_FranceSouth_DB_2
,SQL_SwitzerlandNorth_DB_1
,SQL_SwitzerlandNorth_DB_2
,SQL_BrazilSoutheast_DB_1
,SQL_UAENorth_DB_1
,SQL_BrazilSoutheast_DB_2
,SQL_UAENorth_DB_2
. Defaults toSQL_Default
.- max
Size numberGb The max size of the database in gigabytes.
- min
Capacity number Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
- name string
The name of the MS SQL Database. Changing this forces a new resource to be created.
- read
Replica numberCount The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
- read
Scale boolean If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
- recover
Database stringId The ID of the database to be recovered. This property is only applicable when the
create_mode
isRecovery
.- restore
Dropped stringDatabase Id The ID of the database to be restored. This property is only applicable when the
create_mode
isRestore
.- restore
Point stringIn Time Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for
create_mode
=PointInTimeRestore
databases.- sample
Name string Specifies the name of the sample schema to apply when creating this database. Possible value is
AdventureWorksLT
.- short
Term DatabaseRetention Policy Short Term Retention Policy Args A
short_term_retention_policy
block as defined below.- sku
Name string Specifies the name of the SKU used by the database. For example,
GP_S_Gen5_2
,HS_Gen4_1
,BC_Gen5_2
,ElasticPool
,Basic
,S0
,P2
,DW100c
,DS100
. Changing this from the HyperScale service tier to another service tier will create a new resource.- storage
Account stringType Specifies the storage account type used to store backups for this database. Possible values are
Geo
,Local
andZone
. The default value isGeo
.- {[key: string]: string}
A mapping of tags to assign to the resource.
- threat
Detection DatabasePolicy Threat Detection Policy Args Threat detection policy configuration. The
threat_detection_policy
block supports fields documented below.- transparent
Data booleanEncryption Enabled If set to true, Transparent Data Encryption will be enabled on the database. Defaults to
true
.- zone
Redundant boolean Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases.
- server_
id str The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created.
- auto_
pause_ intdelay_ in_ minutes Time in minutes after which database is automatically paused. A value of
-1
means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases.- collation str
Specifies the collation of the database. Changing this forces a new resource to be created.
- create_
mode str The create mode of the database. Possible values are
Copy
,Default
,OnlineSecondary
,PointInTimeRestore
,Recovery
,Restore
,RestoreExternalBackup
,RestoreExternalBackupSecondary
,RestoreLongTermRetentionBackup
andSecondary
. Mutually exclusive withimport
. Changing this forces a new resource to be created.- creation_
source_ strdatabase_ id The ID of the source database from which to create the new database. This should only be used for databases with
create_mode
values that use another database as reference. Changing this forces a new resource to be created.- elastic_
pool_ strid Specifies the ID of the elastic pool containing this database.
- geo_
backup_ boolenabled A boolean that specifies if the Geo Backup Policy is enabled. Defaults to
true
.- import_
Database
Import Args A Database Import block as documented below. Mutually exclusive with
create_mode
.- ledger_
enabled bool A boolean that specifies if this is a ledger database. Defaults to
false
. Changing this forces a new resource to be created.- license_
type str Specifies the license type applied to this database. Possible values are
LicenseIncluded
andBasePrice
.- long_
term_ Databaseretention_ policy Long Term Retention Policy Args A
long_term_retention_policy
block as defined below.- maintenance_
configuration_ strname The name of the Public Maintenance Configuration window to apply to the database. Valid values include
SQL_Default
,SQL_EastUS_DB_1
,SQL_EastUS2_DB_1
,SQL_SoutheastAsia_DB_1
,SQL_AustraliaEast_DB_1
,SQL_NorthEurope_DB_1
,SQL_SouthCentralUS_DB_1
,SQL_WestUS2_DB_1
,SQL_UKSouth_DB_1
,SQL_WestEurope_DB_1
,SQL_EastUS_DB_2
,SQL_EastUS2_DB_2
,SQL_WestUS2_DB_2
,SQL_SoutheastAsia_DB_2
,SQL_AustraliaEast_DB_2
,SQL_NorthEurope_DB_2
,SQL_SouthCentralUS_DB_2
,SQL_UKSouth_DB_2
,SQL_WestEurope_DB_2
,SQL_AustraliaSoutheast_DB_1
,SQL_BrazilSouth_DB_1
,SQL_CanadaCentral_DB_1
,SQL_CanadaEast_DB_1
,SQL_CentralUS_DB_1
,SQL_EastAsia_DB_1
,SQL_FranceCentral_DB_1
,SQL_GermanyWestCentral_DB_1
,SQL_CentralIndia_DB_1
,SQL_SouthIndia_DB_1
,SQL_JapanEast_DB_1
,SQL_JapanWest_DB_1
,SQL_NorthCentralUS_DB_1
,SQL_UKWest_DB_1
,SQL_WestUS_DB_1
,SQL_AustraliaSoutheast_DB_2
,SQL_BrazilSouth_DB_2
,SQL_CanadaCentral_DB_2
,SQL_CanadaEast_DB_2
,SQL_CentralUS_DB_2
,SQL_EastAsia_DB_2
,SQL_FranceCentral_DB_2
,SQL_GermanyWestCentral_DB_2
,SQL_CentralIndia_DB_2
,SQL_SouthIndia_DB_2
,SQL_JapanEast_DB_2
,SQL_JapanWest_DB_2
,SQL_NorthCentralUS_DB_2
,SQL_UKWest_DB_2
,SQL_WestUS_DB_2
,SQL_WestCentralUS_DB_1
,SQL_FranceSouth_DB_1
,SQL_WestCentralUS_DB_2
,SQL_FranceSouth_DB_2
,SQL_SwitzerlandNorth_DB_1
,SQL_SwitzerlandNorth_DB_2
,SQL_BrazilSoutheast_DB_1
,SQL_UAENorth_DB_1
,SQL_BrazilSoutheast_DB_2
,SQL_UAENorth_DB_2
. Defaults toSQL_Default
.- max_
size_ intgb The max size of the database in gigabytes.
- min_
capacity float Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
- name str
The name of the MS SQL Database. Changing this forces a new resource to be created.
- read_
replica_ intcount The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
- read_
scale bool If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
- recover_
database_ strid The ID of the database to be recovered. This property is only applicable when the
create_mode
isRecovery
.- restore_
dropped_ strdatabase_ id The ID of the database to be restored. This property is only applicable when the
create_mode
isRestore
.- restore_
point_ strin_ time Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for
create_mode
=PointInTimeRestore
databases.- sample_
name str Specifies the name of the sample schema to apply when creating this database. Possible value is
AdventureWorksLT
.- short_
term_ Databaseretention_ policy Short Term Retention Policy Args A
short_term_retention_policy
block as defined below.- sku_
name str Specifies the name of the SKU used by the database. For example,
GP_S_Gen5_2
,HS_Gen4_1
,BC_Gen5_2
,ElasticPool
,Basic
,S0
,P2
,DW100c
,DS100
. Changing this from the HyperScale service tier to another service tier will create a new resource.- storage_
account_ strtype Specifies the storage account type used to store backups for this database. Possible values are
Geo
,Local
andZone
. The default value isGeo
.- Mapping[str, str]
A mapping of tags to assign to the resource.
- threat_
detection_ Databasepolicy Threat Detection Policy Args Threat detection policy configuration. The
threat_detection_policy
block supports fields documented below.- transparent_
data_ boolencryption_ enabled If set to true, Transparent Data Encryption will be enabled on the database. Defaults to
true
.- 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. This property is only settable for Premium and Business Critical databases.
- server
Id String The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created.
- auto
Pause NumberDelay In Minutes Time in minutes after which database is automatically paused. A value of
-1
means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases.- collation String
Specifies the collation of the database. Changing this forces a new resource to be created.
- create
Mode String The create mode of the database. Possible values are
Copy
,Default
,OnlineSecondary
,PointInTimeRestore
,Recovery
,Restore
,RestoreExternalBackup
,RestoreExternalBackupSecondary
,RestoreLongTermRetentionBackup
andSecondary
. Mutually exclusive withimport
. Changing this forces a new resource to be created.- creation
Source StringDatabase Id The ID of the source database from which to create the new database. This should only be used for databases with
create_mode
values that use another database as reference. Changing this forces a new resource to be created.- elastic
Pool StringId Specifies the ID of the elastic pool containing this database.
- geo
Backup BooleanEnabled A boolean that specifies if the Geo Backup Policy is enabled. Defaults to
true
.- import Property Map
A Database Import block as documented below. Mutually exclusive with
create_mode
.- ledger
Enabled Boolean A boolean that specifies if this is a ledger database. Defaults to
false
. Changing this forces a new resource to be created.- license
Type String Specifies the license type applied to this database. Possible values are
LicenseIncluded
andBasePrice
.- long
Term Property MapRetention Policy A
long_term_retention_policy
block as defined below.- maintenance
Configuration StringName The name of the Public Maintenance Configuration window to apply to the database. Valid values include
SQL_Default
,SQL_EastUS_DB_1
,SQL_EastUS2_DB_1
,SQL_SoutheastAsia_DB_1
,SQL_AustraliaEast_DB_1
,SQL_NorthEurope_DB_1
,SQL_SouthCentralUS_DB_1
,SQL_WestUS2_DB_1
,SQL_UKSouth_DB_1
,SQL_WestEurope_DB_1
,SQL_EastUS_DB_2
,SQL_EastUS2_DB_2
,SQL_WestUS2_DB_2
,SQL_SoutheastAsia_DB_2
,SQL_AustraliaEast_DB_2
,SQL_NorthEurope_DB_2
,SQL_SouthCentralUS_DB_2
,SQL_UKSouth_DB_2
,SQL_WestEurope_DB_2
,SQL_AustraliaSoutheast_DB_1
,SQL_BrazilSouth_DB_1
,SQL_CanadaCentral_DB_1
,SQL_CanadaEast_DB_1
,SQL_CentralUS_DB_1
,SQL_EastAsia_DB_1
,SQL_FranceCentral_DB_1
,SQL_GermanyWestCentral_DB_1
,SQL_CentralIndia_DB_1
,SQL_SouthIndia_DB_1
,SQL_JapanEast_DB_1
,SQL_JapanWest_DB_1
,SQL_NorthCentralUS_DB_1
,SQL_UKWest_DB_1
,SQL_WestUS_DB_1
,SQL_AustraliaSoutheast_DB_2
,SQL_BrazilSouth_DB_2
,SQL_CanadaCentral_DB_2
,SQL_CanadaEast_DB_2
,SQL_CentralUS_DB_2
,SQL_EastAsia_DB_2
,SQL_FranceCentral_DB_2
,SQL_GermanyWestCentral_DB_2
,SQL_CentralIndia_DB_2
,SQL_SouthIndia_DB_2
,SQL_JapanEast_DB_2
,SQL_JapanWest_DB_2
,SQL_NorthCentralUS_DB_2
,SQL_UKWest_DB_2
,SQL_WestUS_DB_2
,SQL_WestCentralUS_DB_1
,SQL_FranceSouth_DB_1
,SQL_WestCentralUS_DB_2
,SQL_FranceSouth_DB_2
,SQL_SwitzerlandNorth_DB_1
,SQL_SwitzerlandNorth_DB_2
,SQL_BrazilSoutheast_DB_1
,SQL_UAENorth_DB_1
,SQL_BrazilSoutheast_DB_2
,SQL_UAENorth_DB_2
. Defaults toSQL_Default
.- max
Size NumberGb The max size of the database in gigabytes.
- min
Capacity Number Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
- name String
The name of the MS SQL Database. Changing this forces a new resource to be created.
- read
Replica NumberCount The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
- read
Scale Boolean If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
- recover
Database StringId The ID of the database to be recovered. This property is only applicable when the
create_mode
isRecovery
.- restore
Dropped StringDatabase Id The ID of the database to be restored. This property is only applicable when the
create_mode
isRestore
.- restore
Point StringIn Time Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for
create_mode
=PointInTimeRestore
databases.- sample
Name String Specifies the name of the sample schema to apply when creating this database. Possible value is
AdventureWorksLT
.- short
Term Property MapRetention Policy A
short_term_retention_policy
block as defined below.- sku
Name String Specifies the name of the SKU used by the database. For example,
GP_S_Gen5_2
,HS_Gen4_1
,BC_Gen5_2
,ElasticPool
,Basic
,S0
,P2
,DW100c
,DS100
. Changing this from the HyperScale service tier to another service tier will create a new resource.- storage
Account StringType Specifies the storage account type used to store backups for this database. Possible values are
Geo
,Local
andZone
. The default value isGeo
.- Map<String>
A mapping of tags to assign to the resource.
- threat
Detection Property MapPolicy Threat detection policy configuration. The
threat_detection_policy
block supports fields documented below.- transparent
Data BooleanEncryption Enabled If set to true, Transparent Data Encryption will be enabled on the database. Defaults to
true
.- zone
Redundant Boolean Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases.
Outputs
All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- 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,
auto_pause_delay_in_minutes: Optional[int] = None,
collation: Optional[str] = None,
create_mode: Optional[str] = None,
creation_source_database_id: Optional[str] = None,
elastic_pool_id: Optional[str] = None,
geo_backup_enabled: Optional[bool] = None,
import_: Optional[DatabaseImportArgs] = None,
ledger_enabled: Optional[bool] = None,
license_type: Optional[str] = None,
long_term_retention_policy: Optional[DatabaseLongTermRetentionPolicyArgs] = None,
maintenance_configuration_name: Optional[str] = None,
max_size_gb: Optional[int] = None,
min_capacity: Optional[float] = None,
name: Optional[str] = None,
read_replica_count: Optional[int] = None,
read_scale: Optional[bool] = None,
recover_database_id: Optional[str] = None,
restore_dropped_database_id: Optional[str] = None,
restore_point_in_time: Optional[str] = None,
sample_name: Optional[str] = None,
server_id: Optional[str] = None,
short_term_retention_policy: Optional[DatabaseShortTermRetentionPolicyArgs] = None,
sku_name: Optional[str] = None,
storage_account_type: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
threat_detection_policy: Optional[DatabaseThreatDetectionPolicyArgs] = None,
transparent_data_encryption_enabled: Optional[bool] = 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.
- Auto
Pause intDelay In Minutes Time in minutes after which database is automatically paused. A value of
-1
means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases.- Collation string
Specifies the collation of the database. Changing this forces a new resource to be created.
- Create
Mode string The create mode of the database. Possible values are
Copy
,Default
,OnlineSecondary
,PointInTimeRestore
,Recovery
,Restore
,RestoreExternalBackup
,RestoreExternalBackupSecondary
,RestoreLongTermRetentionBackup
andSecondary
. Mutually exclusive withimport
. Changing this forces a new resource to be created.- Creation
Source stringDatabase Id The ID of the source database from which to create the new database. This should only be used for databases with
create_mode
values that use another database as reference. Changing this forces a new resource to be created.- Elastic
Pool stringId Specifies the ID of the elastic pool containing this database.
- Geo
Backup boolEnabled A boolean that specifies if the Geo Backup Policy is enabled. Defaults to
true
.- Import
Database
Import Args A Database Import block as documented below. Mutually exclusive with
create_mode
.- Ledger
Enabled bool A boolean that specifies if this is a ledger database. Defaults to
false
. Changing this forces a new resource to be created.- License
Type string Specifies the license type applied to this database. Possible values are
LicenseIncluded
andBasePrice
.- Long
Term DatabaseRetention Policy Long Term Retention Policy Args A
long_term_retention_policy
block as defined below.- Maintenance
Configuration stringName The name of the Public Maintenance Configuration window to apply to the database. Valid values include
SQL_Default
,SQL_EastUS_DB_1
,SQL_EastUS2_DB_1
,SQL_SoutheastAsia_DB_1
,SQL_AustraliaEast_DB_1
,SQL_NorthEurope_DB_1
,SQL_SouthCentralUS_DB_1
,SQL_WestUS2_DB_1
,SQL_UKSouth_DB_1
,SQL_WestEurope_DB_1
,SQL_EastUS_DB_2
,SQL_EastUS2_DB_2
,SQL_WestUS2_DB_2
,SQL_SoutheastAsia_DB_2
,SQL_AustraliaEast_DB_2
,SQL_NorthEurope_DB_2
,SQL_SouthCentralUS_DB_2
,SQL_UKSouth_DB_2
,SQL_WestEurope_DB_2
,SQL_AustraliaSoutheast_DB_1
,SQL_BrazilSouth_DB_1
,SQL_CanadaCentral_DB_1
,SQL_CanadaEast_DB_1
,SQL_CentralUS_DB_1
,SQL_EastAsia_DB_1
,SQL_FranceCentral_DB_1
,SQL_GermanyWestCentral_DB_1
,SQL_CentralIndia_DB_1
,SQL_SouthIndia_DB_1
,SQL_JapanEast_DB_1
,SQL_JapanWest_DB_1
,SQL_NorthCentralUS_DB_1
,SQL_UKWest_DB_1
,SQL_WestUS_DB_1
,SQL_AustraliaSoutheast_DB_2
,SQL_BrazilSouth_DB_2
,SQL_CanadaCentral_DB_2
,SQL_CanadaEast_DB_2
,SQL_CentralUS_DB_2
,SQL_EastAsia_DB_2
,SQL_FranceCentral_DB_2
,SQL_GermanyWestCentral_DB_2
,SQL_CentralIndia_DB_2
,SQL_SouthIndia_DB_2
,SQL_JapanEast_DB_2
,SQL_JapanWest_DB_2
,SQL_NorthCentralUS_DB_2
,SQL_UKWest_DB_2
,SQL_WestUS_DB_2
,SQL_WestCentralUS_DB_1
,SQL_FranceSouth_DB_1
,SQL_WestCentralUS_DB_2
,SQL_FranceSouth_DB_2
,SQL_SwitzerlandNorth_DB_1
,SQL_SwitzerlandNorth_DB_2
,SQL_BrazilSoutheast_DB_1
,SQL_UAENorth_DB_1
,SQL_BrazilSoutheast_DB_2
,SQL_UAENorth_DB_2
. Defaults toSQL_Default
.- Max
Size intGb The max size of the database in gigabytes.
- Min
Capacity double Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
- Name string
The name of the MS SQL Database. Changing this forces a new resource to be created.
- Read
Replica intCount The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
- Read
Scale bool If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
- Recover
Database stringId The ID of the database to be recovered. This property is only applicable when the
create_mode
isRecovery
.- Restore
Dropped stringDatabase Id The ID of the database to be restored. This property is only applicable when the
create_mode
isRestore
.- Restore
Point stringIn Time Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for
create_mode
=PointInTimeRestore
databases.- Sample
Name string Specifies the name of the sample schema to apply when creating this database. Possible value is
AdventureWorksLT
.- Server
Id string The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created.
- Short
Term DatabaseRetention Policy Short Term Retention Policy Args A
short_term_retention_policy
block as defined below.- Sku
Name string Specifies the name of the SKU used by the database. For example,
GP_S_Gen5_2
,HS_Gen4_1
,BC_Gen5_2
,ElasticPool
,Basic
,S0
,P2
,DW100c
,DS100
. Changing this from the HyperScale service tier to another service tier will create a new resource.- Storage
Account stringType Specifies the storage account type used to store backups for this database. Possible values are
Geo
,Local
andZone
. The default value isGeo
.- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Threat
Detection DatabasePolicy Threat Detection Policy Args Threat detection policy configuration. The
threat_detection_policy
block supports fields documented below.- Transparent
Data boolEncryption Enabled If set to true, Transparent Data Encryption will be enabled on the database. Defaults to
true
.- 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. This property is only settable for Premium and Business Critical databases.
- Auto
Pause intDelay In Minutes Time in minutes after which database is automatically paused. A value of
-1
means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases.- Collation string
Specifies the collation of the database. Changing this forces a new resource to be created.
- Create
Mode string The create mode of the database. Possible values are
Copy
,Default
,OnlineSecondary
,PointInTimeRestore
,Recovery
,Restore
,RestoreExternalBackup
,RestoreExternalBackupSecondary
,RestoreLongTermRetentionBackup
andSecondary
. Mutually exclusive withimport
. Changing this forces a new resource to be created.- Creation
Source stringDatabase Id The ID of the source database from which to create the new database. This should only be used for databases with
create_mode
values that use another database as reference. Changing this forces a new resource to be created.- Elastic
Pool stringId Specifies the ID of the elastic pool containing this database.
- Geo
Backup boolEnabled A boolean that specifies if the Geo Backup Policy is enabled. Defaults to
true
.- Import
Database
Import Args A Database Import block as documented below. Mutually exclusive with
create_mode
.- Ledger
Enabled bool A boolean that specifies if this is a ledger database. Defaults to
false
. Changing this forces a new resource to be created.- License
Type string Specifies the license type applied to this database. Possible values are
LicenseIncluded
andBasePrice
.- Long
Term DatabaseRetention Policy Long Term Retention Policy Args A
long_term_retention_policy
block as defined below.- Maintenance
Configuration stringName The name of the Public Maintenance Configuration window to apply to the database. Valid values include
SQL_Default
,SQL_EastUS_DB_1
,SQL_EastUS2_DB_1
,SQL_SoutheastAsia_DB_1
,SQL_AustraliaEast_DB_1
,SQL_NorthEurope_DB_1
,SQL_SouthCentralUS_DB_1
,SQL_WestUS2_DB_1
,SQL_UKSouth_DB_1
,SQL_WestEurope_DB_1
,SQL_EastUS_DB_2
,SQL_EastUS2_DB_2
,SQL_WestUS2_DB_2
,SQL_SoutheastAsia_DB_2
,SQL_AustraliaEast_DB_2
,SQL_NorthEurope_DB_2
,SQL_SouthCentralUS_DB_2
,SQL_UKSouth_DB_2
,SQL_WestEurope_DB_2
,SQL_AustraliaSoutheast_DB_1
,SQL_BrazilSouth_DB_1
,SQL_CanadaCentral_DB_1
,SQL_CanadaEast_DB_1
,SQL_CentralUS_DB_1
,SQL_EastAsia_DB_1
,SQL_FranceCentral_DB_1
,SQL_GermanyWestCentral_DB_1
,SQL_CentralIndia_DB_1
,SQL_SouthIndia_DB_1
,SQL_JapanEast_DB_1
,SQL_JapanWest_DB_1
,SQL_NorthCentralUS_DB_1
,SQL_UKWest_DB_1
,SQL_WestUS_DB_1
,SQL_AustraliaSoutheast_DB_2
,SQL_BrazilSouth_DB_2
,SQL_CanadaCentral_DB_2
,SQL_CanadaEast_DB_2
,SQL_CentralUS_DB_2
,SQL_EastAsia_DB_2
,SQL_FranceCentral_DB_2
,SQL_GermanyWestCentral_DB_2
,SQL_CentralIndia_DB_2
,SQL_SouthIndia_DB_2
,SQL_JapanEast_DB_2
,SQL_JapanWest_DB_2
,SQL_NorthCentralUS_DB_2
,SQL_UKWest_DB_2
,SQL_WestUS_DB_2
,SQL_WestCentralUS_DB_1
,SQL_FranceSouth_DB_1
,SQL_WestCentralUS_DB_2
,SQL_FranceSouth_DB_2
,SQL_SwitzerlandNorth_DB_1
,SQL_SwitzerlandNorth_DB_2
,SQL_BrazilSoutheast_DB_1
,SQL_UAENorth_DB_1
,SQL_BrazilSoutheast_DB_2
,SQL_UAENorth_DB_2
. Defaults toSQL_Default
.- Max
Size intGb The max size of the database in gigabytes.
- Min
Capacity float64 Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
- Name string
The name of the MS SQL Database. Changing this forces a new resource to be created.
- Read
Replica intCount The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
- Read
Scale bool If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
- Recover
Database stringId The ID of the database to be recovered. This property is only applicable when the
create_mode
isRecovery
.- Restore
Dropped stringDatabase Id The ID of the database to be restored. This property is only applicable when the
create_mode
isRestore
.- Restore
Point stringIn Time Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for
create_mode
=PointInTimeRestore
databases.- Sample
Name string Specifies the name of the sample schema to apply when creating this database. Possible value is
AdventureWorksLT
.- Server
Id string The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created.
- Short
Term DatabaseRetention Policy Short Term Retention Policy Args A
short_term_retention_policy
block as defined below.- Sku
Name string Specifies the name of the SKU used by the database. For example,
GP_S_Gen5_2
,HS_Gen4_1
,BC_Gen5_2
,ElasticPool
,Basic
,S0
,P2
,DW100c
,DS100
. Changing this from the HyperScale service tier to another service tier will create a new resource.- Storage
Account stringType Specifies the storage account type used to store backups for this database. Possible values are
Geo
,Local
andZone
. The default value isGeo
.- map[string]string
A mapping of tags to assign to the resource.
- Threat
Detection DatabasePolicy Threat Detection Policy Args Threat detection policy configuration. The
threat_detection_policy
block supports fields documented below.- Transparent
Data boolEncryption Enabled If set to true, Transparent Data Encryption will be enabled on the database. Defaults to
true
.- 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. This property is only settable for Premium and Business Critical databases.
- auto
Pause IntegerDelay In Minutes Time in minutes after which database is automatically paused. A value of
-1
means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases.- collation String
Specifies the collation of the database. Changing this forces a new resource to be created.
- create
Mode String The create mode of the database. Possible values are
Copy
,Default
,OnlineSecondary
,PointInTimeRestore
,Recovery
,Restore
,RestoreExternalBackup
,RestoreExternalBackupSecondary
,RestoreLongTermRetentionBackup
andSecondary
. Mutually exclusive withimport
. Changing this forces a new resource to be created.- creation
Source StringDatabase Id The ID of the source database from which to create the new database. This should only be used for databases with
create_mode
values that use another database as reference. Changing this forces a new resource to be created.- elastic
Pool StringId Specifies the ID of the elastic pool containing this database.
- geo
Backup BooleanEnabled A boolean that specifies if the Geo Backup Policy is enabled. Defaults to
true
.- import_
Database
Import Args A Database Import block as documented below. Mutually exclusive with
create_mode
.- ledger
Enabled Boolean A boolean that specifies if this is a ledger database. Defaults to
false
. Changing this forces a new resource to be created.- license
Type String Specifies the license type applied to this database. Possible values are
LicenseIncluded
andBasePrice
.- long
Term DatabaseRetention Policy Long Term Retention Policy Args A
long_term_retention_policy
block as defined below.- maintenance
Configuration StringName The name of the Public Maintenance Configuration window to apply to the database. Valid values include
SQL_Default
,SQL_EastUS_DB_1
,SQL_EastUS2_DB_1
,SQL_SoutheastAsia_DB_1
,SQL_AustraliaEast_DB_1
,SQL_NorthEurope_DB_1
,SQL_SouthCentralUS_DB_1
,SQL_WestUS2_DB_1
,SQL_UKSouth_DB_1
,SQL_WestEurope_DB_1
,SQL_EastUS_DB_2
,SQL_EastUS2_DB_2
,SQL_WestUS2_DB_2
,SQL_SoutheastAsia_DB_2
,SQL_AustraliaEast_DB_2
,SQL_NorthEurope_DB_2
,SQL_SouthCentralUS_DB_2
,SQL_UKSouth_DB_2
,SQL_WestEurope_DB_2
,SQL_AustraliaSoutheast_DB_1
,SQL_BrazilSouth_DB_1
,SQL_CanadaCentral_DB_1
,SQL_CanadaEast_DB_1
,SQL_CentralUS_DB_1
,SQL_EastAsia_DB_1
,SQL_FranceCentral_DB_1
,SQL_GermanyWestCentral_DB_1
,SQL_CentralIndia_DB_1
,SQL_SouthIndia_DB_1
,SQL_JapanEast_DB_1
,SQL_JapanWest_DB_1
,SQL_NorthCentralUS_DB_1
,SQL_UKWest_DB_1
,SQL_WestUS_DB_1
,SQL_AustraliaSoutheast_DB_2
,SQL_BrazilSouth_DB_2
,SQL_CanadaCentral_DB_2
,SQL_CanadaEast_DB_2
,SQL_CentralUS_DB_2
,SQL_EastAsia_DB_2
,SQL_FranceCentral_DB_2
,SQL_GermanyWestCentral_DB_2
,SQL_CentralIndia_DB_2
,SQL_SouthIndia_DB_2
,SQL_JapanEast_DB_2
,SQL_JapanWest_DB_2
,SQL_NorthCentralUS_DB_2
,SQL_UKWest_DB_2
,SQL_WestUS_DB_2
,SQL_WestCentralUS_DB_1
,SQL_FranceSouth_DB_1
,SQL_WestCentralUS_DB_2
,SQL_FranceSouth_DB_2
,SQL_SwitzerlandNorth_DB_1
,SQL_SwitzerlandNorth_DB_2
,SQL_BrazilSoutheast_DB_1
,SQL_UAENorth_DB_1
,SQL_BrazilSoutheast_DB_2
,SQL_UAENorth_DB_2
. Defaults toSQL_Default
.- max
Size IntegerGb The max size of the database in gigabytes.
- min
Capacity Double Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
- name String
The name of the MS SQL Database. Changing this forces a new resource to be created.
- read
Replica IntegerCount The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
- read
Scale Boolean If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
- recover
Database StringId The ID of the database to be recovered. This property is only applicable when the
create_mode
isRecovery
.- restore
Dropped StringDatabase Id The ID of the database to be restored. This property is only applicable when the
create_mode
isRestore
.- restore
Point StringIn Time Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for
create_mode
=PointInTimeRestore
databases.- sample
Name String Specifies the name of the sample schema to apply when creating this database. Possible value is
AdventureWorksLT
.- server
Id String The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created.
- short
Term DatabaseRetention Policy Short Term Retention Policy Args A
short_term_retention_policy
block as defined below.- sku
Name String Specifies the name of the SKU used by the database. For example,
GP_S_Gen5_2
,HS_Gen4_1
,BC_Gen5_2
,ElasticPool
,Basic
,S0
,P2
,DW100c
,DS100
. Changing this from the HyperScale service tier to another service tier will create a new resource.- storage
Account StringType Specifies the storage account type used to store backups for this database. Possible values are
Geo
,Local
andZone
. The default value isGeo
.- Map<String,String>
A mapping of tags to assign to the resource.
- threat
Detection DatabasePolicy Threat Detection Policy Args Threat detection policy configuration. The
threat_detection_policy
block supports fields documented below.- transparent
Data BooleanEncryption Enabled If set to true, Transparent Data Encryption will be enabled on the database. Defaults to
true
.- zone
Redundant Boolean Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases.
- auto
Pause numberDelay In Minutes Time in minutes after which database is automatically paused. A value of
-1
means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases.- collation string
Specifies the collation of the database. Changing this forces a new resource to be created.
- create
Mode string The create mode of the database. Possible values are
Copy
,Default
,OnlineSecondary
,PointInTimeRestore
,Recovery
,Restore
,RestoreExternalBackup
,RestoreExternalBackupSecondary
,RestoreLongTermRetentionBackup
andSecondary
. Mutually exclusive withimport
. Changing this forces a new resource to be created.- creation
Source stringDatabase Id The ID of the source database from which to create the new database. This should only be used for databases with
create_mode
values that use another database as reference. Changing this forces a new resource to be created.- elastic
Pool stringId Specifies the ID of the elastic pool containing this database.
- geo
Backup booleanEnabled A boolean that specifies if the Geo Backup Policy is enabled. Defaults to
true
.- import
Database
Import Args A Database Import block as documented below. Mutually exclusive with
create_mode
.- ledger
Enabled boolean A boolean that specifies if this is a ledger database. Defaults to
false
. Changing this forces a new resource to be created.- license
Type string Specifies the license type applied to this database. Possible values are
LicenseIncluded
andBasePrice
.- long
Term DatabaseRetention Policy Long Term Retention Policy Args A
long_term_retention_policy
block as defined below.- maintenance
Configuration stringName The name of the Public Maintenance Configuration window to apply to the database. Valid values include
SQL_Default
,SQL_EastUS_DB_1
,SQL_EastUS2_DB_1
,SQL_SoutheastAsia_DB_1
,SQL_AustraliaEast_DB_1
,SQL_NorthEurope_DB_1
,SQL_SouthCentralUS_DB_1
,SQL_WestUS2_DB_1
,SQL_UKSouth_DB_1
,SQL_WestEurope_DB_1
,SQL_EastUS_DB_2
,SQL_EastUS2_DB_2
,SQL_WestUS2_DB_2
,SQL_SoutheastAsia_DB_2
,SQL_AustraliaEast_DB_2
,SQL_NorthEurope_DB_2
,SQL_SouthCentralUS_DB_2
,SQL_UKSouth_DB_2
,SQL_WestEurope_DB_2
,SQL_AustraliaSoutheast_DB_1
,SQL_BrazilSouth_DB_1
,SQL_CanadaCentral_DB_1
,SQL_CanadaEast_DB_1
,SQL_CentralUS_DB_1
,SQL_EastAsia_DB_1
,SQL_FranceCentral_DB_1
,SQL_GermanyWestCentral_DB_1
,SQL_CentralIndia_DB_1
,SQL_SouthIndia_DB_1
,SQL_JapanEast_DB_1
,SQL_JapanWest_DB_1
,SQL_NorthCentralUS_DB_1
,SQL_UKWest_DB_1
,SQL_WestUS_DB_1
,SQL_AustraliaSoutheast_DB_2
,SQL_BrazilSouth_DB_2
,SQL_CanadaCentral_DB_2
,SQL_CanadaEast_DB_2
,SQL_CentralUS_DB_2
,SQL_EastAsia_DB_2
,SQL_FranceCentral_DB_2
,SQL_GermanyWestCentral_DB_2
,SQL_CentralIndia_DB_2
,SQL_SouthIndia_DB_2
,SQL_JapanEast_DB_2
,SQL_JapanWest_DB_2
,SQL_NorthCentralUS_DB_2
,SQL_UKWest_DB_2
,SQL_WestUS_DB_2
,SQL_WestCentralUS_DB_1
,SQL_FranceSouth_DB_1
,SQL_WestCentralUS_DB_2
,SQL_FranceSouth_DB_2
,SQL_SwitzerlandNorth_DB_1
,SQL_SwitzerlandNorth_DB_2
,SQL_BrazilSoutheast_DB_1
,SQL_UAENorth_DB_1
,SQL_BrazilSoutheast_DB_2
,SQL_UAENorth_DB_2
. Defaults toSQL_Default
.- max
Size numberGb The max size of the database in gigabytes.
- min
Capacity number Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
- name string
The name of the MS SQL Database. Changing this forces a new resource to be created.
- read
Replica numberCount The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
- read
Scale boolean If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
- recover
Database stringId The ID of the database to be recovered. This property is only applicable when the
create_mode
isRecovery
.- restore
Dropped stringDatabase Id The ID of the database to be restored. This property is only applicable when the
create_mode
isRestore
.- restore
Point stringIn Time Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for
create_mode
=PointInTimeRestore
databases.- sample
Name string Specifies the name of the sample schema to apply when creating this database. Possible value is
AdventureWorksLT
.- server
Id string The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created.
- short
Term DatabaseRetention Policy Short Term Retention Policy Args A
short_term_retention_policy
block as defined below.- sku
Name string Specifies the name of the SKU used by the database. For example,
GP_S_Gen5_2
,HS_Gen4_1
,BC_Gen5_2
,ElasticPool
,Basic
,S0
,P2
,DW100c
,DS100
. Changing this from the HyperScale service tier to another service tier will create a new resource.- storage
Account stringType Specifies the storage account type used to store backups for this database. Possible values are
Geo
,Local
andZone
. The default value isGeo
.- {[key: string]: string}
A mapping of tags to assign to the resource.
- threat
Detection DatabasePolicy Threat Detection Policy Args Threat detection policy configuration. The
threat_detection_policy
block supports fields documented below.- transparent
Data booleanEncryption Enabled If set to true, Transparent Data Encryption will be enabled on the database. Defaults to
true
.- zone
Redundant boolean Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases.
- auto_
pause_ intdelay_ in_ minutes Time in minutes after which database is automatically paused. A value of
-1
means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases.- collation str
Specifies the collation of the database. Changing this forces a new resource to be created.
- create_
mode str The create mode of the database. Possible values are
Copy
,Default
,OnlineSecondary
,PointInTimeRestore
,Recovery
,Restore
,RestoreExternalBackup
,RestoreExternalBackupSecondary
,RestoreLongTermRetentionBackup
andSecondary
. Mutually exclusive withimport
. Changing this forces a new resource to be created.- creation_
source_ strdatabase_ id The ID of the source database from which to create the new database. This should only be used for databases with
create_mode
values that use another database as reference. Changing this forces a new resource to be created.- elastic_
pool_ strid Specifies the ID of the elastic pool containing this database.
- geo_
backup_ boolenabled A boolean that specifies if the Geo Backup Policy is enabled. Defaults to
true
.- import_
Database
Import Args A Database Import block as documented below. Mutually exclusive with
create_mode
.- ledger_
enabled bool A boolean that specifies if this is a ledger database. Defaults to
false
. Changing this forces a new resource to be created.- license_
type str Specifies the license type applied to this database. Possible values are
LicenseIncluded
andBasePrice
.- long_
term_ Databaseretention_ policy Long Term Retention Policy Args A
long_term_retention_policy
block as defined below.- maintenance_
configuration_ strname The name of the Public Maintenance Configuration window to apply to the database. Valid values include
SQL_Default
,SQL_EastUS_DB_1
,SQL_EastUS2_DB_1
,SQL_SoutheastAsia_DB_1
,SQL_AustraliaEast_DB_1
,SQL_NorthEurope_DB_1
,SQL_SouthCentralUS_DB_1
,SQL_WestUS2_DB_1
,SQL_UKSouth_DB_1
,SQL_WestEurope_DB_1
,SQL_EastUS_DB_2
,SQL_EastUS2_DB_2
,SQL_WestUS2_DB_2
,SQL_SoutheastAsia_DB_2
,SQL_AustraliaEast_DB_2
,SQL_NorthEurope_DB_2
,SQL_SouthCentralUS_DB_2
,SQL_UKSouth_DB_2
,SQL_WestEurope_DB_2
,SQL_AustraliaSoutheast_DB_1
,SQL_BrazilSouth_DB_1
,SQL_CanadaCentral_DB_1
,SQL_CanadaEast_DB_1
,SQL_CentralUS_DB_1
,SQL_EastAsia_DB_1
,SQL_FranceCentral_DB_1
,SQL_GermanyWestCentral_DB_1
,SQL_CentralIndia_DB_1
,SQL_SouthIndia_DB_1
,SQL_JapanEast_DB_1
,SQL_JapanWest_DB_1
,SQL_NorthCentralUS_DB_1
,SQL_UKWest_DB_1
,SQL_WestUS_DB_1
,SQL_AustraliaSoutheast_DB_2
,SQL_BrazilSouth_DB_2
,SQL_CanadaCentral_DB_2
,SQL_CanadaEast_DB_2
,SQL_CentralUS_DB_2
,SQL_EastAsia_DB_2
,SQL_FranceCentral_DB_2
,SQL_GermanyWestCentral_DB_2
,SQL_CentralIndia_DB_2
,SQL_SouthIndia_DB_2
,SQL_JapanEast_DB_2
,SQL_JapanWest_DB_2
,SQL_NorthCentralUS_DB_2
,SQL_UKWest_DB_2
,SQL_WestUS_DB_2
,SQL_WestCentralUS_DB_1
,SQL_FranceSouth_DB_1
,SQL_WestCentralUS_DB_2
,SQL_FranceSouth_DB_2
,SQL_SwitzerlandNorth_DB_1
,SQL_SwitzerlandNorth_DB_2
,SQL_BrazilSoutheast_DB_1
,SQL_UAENorth_DB_1
,SQL_BrazilSoutheast_DB_2
,SQL_UAENorth_DB_2
. Defaults toSQL_Default
.- max_
size_ intgb The max size of the database in gigabytes.
- min_
capacity float Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
- name str
The name of the MS SQL Database. Changing this forces a new resource to be created.
- read_
replica_ intcount The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
- read_
scale bool If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
- recover_
database_ strid The ID of the database to be recovered. This property is only applicable when the
create_mode
isRecovery
.- restore_
dropped_ strdatabase_ id The ID of the database to be restored. This property is only applicable when the
create_mode
isRestore
.- restore_
point_ strin_ time Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for
create_mode
=PointInTimeRestore
databases.- sample_
name str Specifies the name of the sample schema to apply when creating this database. Possible value is
AdventureWorksLT
.- server_
id str The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created.
- short_
term_ Databaseretention_ policy Short Term Retention Policy Args A
short_term_retention_policy
block as defined below.- sku_
name str Specifies the name of the SKU used by the database. For example,
GP_S_Gen5_2
,HS_Gen4_1
,BC_Gen5_2
,ElasticPool
,Basic
,S0
,P2
,DW100c
,DS100
. Changing this from the HyperScale service tier to another service tier will create a new resource.- storage_
account_ strtype Specifies the storage account type used to store backups for this database. Possible values are
Geo
,Local
andZone
. The default value isGeo
.- Mapping[str, str]
A mapping of tags to assign to the resource.
- threat_
detection_ Databasepolicy Threat Detection Policy Args Threat detection policy configuration. The
threat_detection_policy
block supports fields documented below.- transparent_
data_ boolencryption_ enabled If set to true, Transparent Data Encryption will be enabled on the database. Defaults to
true
.- 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. This property is only settable for Premium and Business Critical databases.
- auto
Pause NumberDelay In Minutes Time in minutes after which database is automatically paused. A value of
-1
means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases.- collation String
Specifies the collation of the database. Changing this forces a new resource to be created.
- create
Mode String The create mode of the database. Possible values are
Copy
,Default
,OnlineSecondary
,PointInTimeRestore
,Recovery
,Restore
,RestoreExternalBackup
,RestoreExternalBackupSecondary
,RestoreLongTermRetentionBackup
andSecondary
. Mutually exclusive withimport
. Changing this forces a new resource to be created.- creation
Source StringDatabase Id The ID of the source database from which to create the new database. This should only be used for databases with
create_mode
values that use another database as reference. Changing this forces a new resource to be created.- elastic
Pool StringId Specifies the ID of the elastic pool containing this database.
- geo
Backup BooleanEnabled A boolean that specifies if the Geo Backup Policy is enabled. Defaults to
true
.- import Property Map
A Database Import block as documented below. Mutually exclusive with
create_mode
.- ledger
Enabled Boolean A boolean that specifies if this is a ledger database. Defaults to
false
. Changing this forces a new resource to be created.- license
Type String Specifies the license type applied to this database. Possible values are
LicenseIncluded
andBasePrice
.- long
Term Property MapRetention Policy A
long_term_retention_policy
block as defined below.- maintenance
Configuration StringName The name of the Public Maintenance Configuration window to apply to the database. Valid values include
SQL_Default
,SQL_EastUS_DB_1
,SQL_EastUS2_DB_1
,SQL_SoutheastAsia_DB_1
,SQL_AustraliaEast_DB_1
,SQL_NorthEurope_DB_1
,SQL_SouthCentralUS_DB_1
,SQL_WestUS2_DB_1
,SQL_UKSouth_DB_1
,SQL_WestEurope_DB_1
,SQL_EastUS_DB_2
,SQL_EastUS2_DB_2
,SQL_WestUS2_DB_2
,SQL_SoutheastAsia_DB_2
,SQL_AustraliaEast_DB_2
,SQL_NorthEurope_DB_2
,SQL_SouthCentralUS_DB_2
,SQL_UKSouth_DB_2
,SQL_WestEurope_DB_2
,SQL_AustraliaSoutheast_DB_1
,SQL_BrazilSouth_DB_1
,SQL_CanadaCentral_DB_1
,SQL_CanadaEast_DB_1
,SQL_CentralUS_DB_1
,SQL_EastAsia_DB_1
,SQL_FranceCentral_DB_1
,SQL_GermanyWestCentral_DB_1
,SQL_CentralIndia_DB_1
,SQL_SouthIndia_DB_1
,SQL_JapanEast_DB_1
,SQL_JapanWest_DB_1
,SQL_NorthCentralUS_DB_1
,SQL_UKWest_DB_1
,SQL_WestUS_DB_1
,SQL_AustraliaSoutheast_DB_2
,SQL_BrazilSouth_DB_2
,SQL_CanadaCentral_DB_2
,SQL_CanadaEast_DB_2
,SQL_CentralUS_DB_2
,SQL_EastAsia_DB_2
,SQL_FranceCentral_DB_2
,SQL_GermanyWestCentral_DB_2
,SQL_CentralIndia_DB_2
,SQL_SouthIndia_DB_2
,SQL_JapanEast_DB_2
,SQL_JapanWest_DB_2
,SQL_NorthCentralUS_DB_2
,SQL_UKWest_DB_2
,SQL_WestUS_DB_2
,SQL_WestCentralUS_DB_1
,SQL_FranceSouth_DB_1
,SQL_WestCentralUS_DB_2
,SQL_FranceSouth_DB_2
,SQL_SwitzerlandNorth_DB_1
,SQL_SwitzerlandNorth_DB_2
,SQL_BrazilSoutheast_DB_1
,SQL_UAENorth_DB_1
,SQL_BrazilSoutheast_DB_2
,SQL_UAENorth_DB_2
. Defaults toSQL_Default
.- max
Size NumberGb The max size of the database in gigabytes.
- min
Capacity Number Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
- name String
The name of the MS SQL Database. Changing this forces a new resource to be created.
- read
Replica NumberCount The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
- read
Scale Boolean If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
- recover
Database StringId The ID of the database to be recovered. This property is only applicable when the
create_mode
isRecovery
.- restore
Dropped StringDatabase Id The ID of the database to be restored. This property is only applicable when the
create_mode
isRestore
.- restore
Point StringIn Time Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for
create_mode
=PointInTimeRestore
databases.- sample
Name String Specifies the name of the sample schema to apply when creating this database. Possible value is
AdventureWorksLT
.- server
Id String The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created.
- short
Term Property MapRetention Policy A
short_term_retention_policy
block as defined below.- sku
Name String Specifies the name of the SKU used by the database. For example,
GP_S_Gen5_2
,HS_Gen4_1
,BC_Gen5_2
,ElasticPool
,Basic
,S0
,P2
,DW100c
,DS100
. Changing this from the HyperScale service tier to another service tier will create a new resource.- storage
Account StringType Specifies the storage account type used to store backups for this database. Possible values are
Geo
,Local
andZone
. The default value isGeo
.- Map<String>
A mapping of tags to assign to the resource.
- threat
Detection Property MapPolicy Threat detection policy configuration. The
threat_detection_policy
block supports fields documented below.- transparent
Data BooleanEncryption Enabled If set to true, Transparent Data Encryption will be enabled on the database. Defaults to
true
.- zone
Redundant Boolean Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases.
Supporting Types
DatabaseImport
- Administrator
Login string Specifies the name of the SQL administrator.
- Administrator
Login stringPassword Specifies the password of the SQL administrator.
- Authentication
Type string Specifies the type of authentication used to access the server. Valid values are
SQL
orADPassword
.- Storage
Key string Specifies the access key for the storage account.
- Storage
Key stringType Specifies the type of access key for the storage account. Valid values are
StorageAccessKey
orSharedAccessKey
.- Storage
Uri string Specifies the blob URI of the .bacpac file.
- Storage
Account stringId The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storage_uri parameter.
- Administrator
Login string Specifies the name of the SQL administrator.
- Administrator
Login stringPassword Specifies the password of the SQL administrator.
- Authentication
Type string Specifies the type of authentication used to access the server. Valid values are
SQL
orADPassword
.- Storage
Key string Specifies the access key for the storage account.
- Storage
Key stringType Specifies the type of access key for the storage account. Valid values are
StorageAccessKey
orSharedAccessKey
.- Storage
Uri string Specifies the blob URI of the .bacpac file.
- Storage
Account stringId The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storage_uri parameter.
- administrator
Login String Specifies the name of the SQL administrator.
- administrator
Login StringPassword Specifies the password of the SQL administrator.
- authentication
Type String Specifies the type of authentication used to access the server. Valid values are
SQL
orADPassword
.- storage
Key String Specifies the access key for the storage account.
- storage
Key StringType Specifies the type of access key for the storage account. Valid values are
StorageAccessKey
orSharedAccessKey
.- storage
Uri String Specifies the blob URI of the .bacpac file.
- storage
Account StringId The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storage_uri parameter.
- administrator
Login string Specifies the name of the SQL administrator.
- administrator
Login stringPassword Specifies the password of the SQL administrator.
- authentication
Type string Specifies the type of authentication used to access the server. Valid values are
SQL
orADPassword
.- storage
Key string Specifies the access key for the storage account.
- storage
Key stringType Specifies the type of access key for the storage account. Valid values are
StorageAccessKey
orSharedAccessKey
.- storage
Uri string Specifies the blob URI of the .bacpac file.
- storage
Account stringId The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storage_uri parameter.
- administrator_
login str Specifies the name of the SQL administrator.
- administrator_
login_ strpassword Specifies the password of the SQL administrator.
- authentication_
type str Specifies the type of authentication used to access the server. Valid values are
SQL
orADPassword
.- storage_
key str Specifies the access key for the storage account.
- storage_
key_ strtype Specifies the type of access key for the storage account. Valid values are
StorageAccessKey
orSharedAccessKey
.- storage_
uri str Specifies the blob URI of the .bacpac file.
- storage_
account_ strid The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storage_uri parameter.
- administrator
Login String Specifies the name of the SQL administrator.
- administrator
Login StringPassword Specifies the password of the SQL administrator.
- authentication
Type String Specifies the type of authentication used to access the server. Valid values are
SQL
orADPassword
.- storage
Key String Specifies the access key for the storage account.
- storage
Key StringType Specifies the type of access key for the storage account. Valid values are
StorageAccessKey
orSharedAccessKey
.- storage
Uri String Specifies the blob URI of the .bacpac file.
- storage
Account StringId The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storage_uri parameter.
DatabaseLongTermRetentionPolicy
- Monthly
Retention string The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g.
P1Y
,P1M
,P4W
orP30D
.- Week
Of intYear The week of year to take the yearly backup. Value has to be between
1
and52
.- Weekly
Retention string The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g.
P1Y
,P1M
,P1W
orP7D
.- Yearly
Retention string The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g.
P1Y
,P12M
,P52W
orP365D
.
- Monthly
Retention string The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g.
P1Y
,P1M
,P4W
orP30D
.- Week
Of intYear The week of year to take the yearly backup. Value has to be between
1
and52
.- Weekly
Retention string The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g.
P1Y
,P1M
,P1W
orP7D
.- Yearly
Retention string The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g.
P1Y
,P12M
,P52W
orP365D
.
- monthly
Retention String The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g.
P1Y
,P1M
,P4W
orP30D
.- week
Of IntegerYear The week of year to take the yearly backup. Value has to be between
1
and52
.- weekly
Retention String The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g.
P1Y
,P1M
,P1W
orP7D
.- yearly
Retention String The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g.
P1Y
,P12M
,P52W
orP365D
.
- monthly
Retention string The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g.
P1Y
,P1M
,P4W
orP30D
.- week
Of numberYear The week of year to take the yearly backup. Value has to be between
1
and52
.- weekly
Retention string The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g.
P1Y
,P1M
,P1W
orP7D
.- yearly
Retention string The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g.
P1Y
,P12M
,P52W
orP365D
.
- monthly_
retention str The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g.
P1Y
,P1M
,P4W
orP30D
.- week_
of_ intyear The week of year to take the yearly backup. Value has to be between
1
and52
.- weekly_
retention str The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g.
P1Y
,P1M
,P1W
orP7D
.- yearly_
retention str The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g.
P1Y
,P12M
,P52W
orP365D
.
- monthly
Retention String The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g.
P1Y
,P1M
,P4W
orP30D
.- week
Of NumberYear The week of year to take the yearly backup. Value has to be between
1
and52
.- weekly
Retention String The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g.
P1Y
,P1M
,P1W
orP7D
.- yearly
Retention String The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g.
P1Y
,P12M
,P52W
orP365D
.
DatabaseShortTermRetentionPolicy
- Retention
Days int Point In Time Restore configuration. Value has to be between
7
and35
.- Backup
Interval intIn Hours The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be
12
or24
. Defaults to12
hours.
- Retention
Days int Point In Time Restore configuration. Value has to be between
7
and35
.- Backup
Interval intIn Hours The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be
12
or24
. Defaults to12
hours.
- retention
Days Integer Point In Time Restore configuration. Value has to be between
7
and35
.- backup
Interval IntegerIn Hours The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be
12
or24
. Defaults to12
hours.
- retention
Days number Point In Time Restore configuration. Value has to be between
7
and35
.- backup
Interval numberIn Hours The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be
12
or24
. Defaults to12
hours.
- retention_
days int Point In Time Restore configuration. Value has to be between
7
and35
.- backup_
interval_ intin_ hours The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be
12
or24
. Defaults to12
hours.
- retention
Days Number Point In Time Restore configuration. Value has to be between
7
and35
.- backup
Interval NumberIn Hours The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be
12
or24
. Defaults to12
hours.
DatabaseThreatDetectionPolicy
- Disabled
Alerts List<string> Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly
,Sql_Injection
andSql_Injection_Vulnerability
.- Email
Account stringAdmins Should the account administrators be emailed when this alert is triggered? Possible values are
Disabled
andEnabled
.- Email
Addresses List<string> 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 string
The State of the Policy. Possible values are
Enabled
,Disabled
orNew
.- Storage
Account stringAccess Key Specifies the identifier key of the Threat Detection audit storage account. Required if
state
isEnabled
.- Storage
Endpoint 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
isEnabled
.
- Disabled
Alerts []string Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly
,Sql_Injection
andSql_Injection_Vulnerability
.- Email
Account stringAdmins Should the account administrators be emailed when this alert is triggered? Possible values are
Disabled
andEnabled
.- Email
Addresses []string 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 string
The State of the Policy. Possible values are
Enabled
,Disabled
orNew
.- Storage
Account stringAccess Key Specifies the identifier key of the Threat Detection audit storage account. Required if
state
isEnabled
.- Storage
Endpoint 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
isEnabled
.
- disabled
Alerts List<String> Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly
,Sql_Injection
andSql_Injection_Vulnerability
.- email
Account StringAdmins Should the account administrators be emailed when this alert is triggered? Possible values are
Disabled
andEnabled
.- email
Addresses List<String> A list of email addresses which alerts should be sent to.
- retention
Days 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
orNew
.- storage
Account StringAccess Key Specifies the identifier key of the Threat Detection audit storage account. Required if
state
isEnabled
.- storage
Endpoint 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
isEnabled
.
- disabled
Alerts string[] Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly
,Sql_Injection
andSql_Injection_Vulnerability
.- email
Account stringAdmins Should the account administrators be emailed when this alert is triggered? Possible values are
Disabled
andEnabled
.- email
Addresses string[] A list of email addresses which alerts should be sent to.
- retention
Days 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
orNew
.- storage
Account stringAccess Key Specifies the identifier key of the Threat Detection audit storage account. Required if
state
isEnabled
.- storage
Endpoint 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
isEnabled
.
- disabled_
alerts Sequence[str] Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly
,Sql_Injection
andSql_Injection_Vulnerability
.- email_
account_ stradmins Should the account administrators be emailed when this alert is triggered? Possible values are
Disabled
andEnabled
.- 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
orNew
.- storage_
account_ straccess_ key Specifies the identifier key of the Threat Detection audit storage account. Required if
state
isEnabled
.- 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
isEnabled
.
- disabled
Alerts List<String> Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly
,Sql_Injection
andSql_Injection_Vulnerability
.- email
Account StringAdmins Should the account administrators be emailed when this alert is triggered? Possible values are
Disabled
andEnabled
.- email
Addresses List<String> A list of email addresses which alerts should be sent to.
- retention
Days 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
orNew
.- storage
Account StringAccess Key Specifies the identifier key of the Threat Detection audit storage account. Required if
state
isEnabled
.- storage
Endpoint 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
isEnabled
.
Import
SQL Database can be imported using the resource id
, e.g.
$ pulumi import azure:mssql/database:Database example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/example1
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.