Database
Allows you to manage an Azure SQL Database
Create a Database Resource
new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);def Database(resource_name, opts=None, collation=None, create_mode=None, edition=None, elastic_pool_name=None, extended_auditing_policy=None, import_=None, location=None, max_size_bytes=None, max_size_gb=None, name=None, read_scale=None, requested_service_objective_id=None, requested_service_objective_name=None, resource_group_name=None, restore_point_in_time=None, server_name=None, source_database_deletion_date=None, source_database_id=None, tags=None, threat_detection_policy=None, zone_redundant=None, __props__=None);func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
Database Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Database resource accepts the following input properties:
- Resource
Group stringName The name of the resource group in which to create the database. This must be the same as Database Server resource group currently.
- Server
Name string The name of the SQL Server on which to create the database.
- Collation string
The name of the collation. Applies only if
create_modeisDefault. Azure default isSQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.- Create
Mode string Specifies how to create the database. Valid values are:
Default,Copy,OnlineSecondary,NonReadableSecondary,PointInTimeRestore,Recovery,RestoreorRestoreLongTermRetentionBackup. Must beDefaultto create a new database. Defaults toDefault. Please see Azure SQL Database REST API- Edition string
The edition of the database to be created. Applies only if
create_modeisDefault. Valid values are:Basic,Standard,Premium,DataWarehouse,Business,BusinessCritical,Free,GeneralPurpose,Hyperscale,Premium,PremiumRS,Standard,Stretch,System,System2, orWeb. Please see Azure SQL Database Service Tiers.- Elastic
Pool stringName The name of the elastic database pool.
- Extended
Auditing DatabasePolicy Extended Auditing Policy Args A
extended_auditing_policyblock as defined below.- Import
Database
Import Args A Database Import block as documented below.
create_modemust be set toDefault.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Max
Size stringBytes The maximum size that the database can grow to. Applies only if
create_modeisDefault. Please see Azure SQL Database Service Tiers.- Max
Size stringGb - Name string
The name of the database.
- Read
Scale bool Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.
- Requested
Service stringObjective Id A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .
- Requested
Service stringObjective Name The service objective name for the database. Valid values depend on edition and location and may include
S0,S1,S2,S3,P1,P2,P4,P6,P11andElasticPool. You can list the available names with the cli:shell az sql db list-editions -l westus --edition Standard -o table. For further information please see Azure CLI - az sql db.- Restore
Point stringIn Time The point in time for the restore. Only applies if
create_modeisPointInTimeRestoree.g. 2013-11-08T22:00:40Z- Source
Database stringDeletion Date The deletion date time of the source database. Only applies to deleted databases where
create_modeisPointInTimeRestore.- Source
Database stringId The URI of the source database if
create_modevalue is notDefault.- 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_policyblock supports fields documented below.- Zone
Redundant bool Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
- Resource
Group stringName The name of the resource group in which to create the database. This must be the same as Database Server resource group currently.
- Server
Name string The name of the SQL Server on which to create the database.
- Collation string
The name of the collation. Applies only if
create_modeisDefault. Azure default isSQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.- Create
Mode string Specifies how to create the database. Valid values are:
Default,Copy,OnlineSecondary,NonReadableSecondary,PointInTimeRestore,Recovery,RestoreorRestoreLongTermRetentionBackup. Must beDefaultto create a new database. Defaults toDefault. Please see Azure SQL Database REST API- Edition string
The edition of the database to be created. Applies only if
create_modeisDefault. Valid values are:Basic,Standard,Premium,DataWarehouse,Business,BusinessCritical,Free,GeneralPurpose,Hyperscale,Premium,PremiumRS,Standard,Stretch,System,System2, orWeb. Please see Azure SQL Database Service Tiers.- Elastic
Pool stringName The name of the elastic database pool.
- Extended
Auditing DatabasePolicy Extended Auditing Policy A
extended_auditing_policyblock as defined below.- Import
Database
Import A Database Import block as documented below.
create_modemust be set toDefault.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Max
Size stringBytes The maximum size that the database can grow to. Applies only if
create_modeisDefault. Please see Azure SQL Database Service Tiers.- Max
Size stringGb - Name string
The name of the database.
- Read
Scale bool Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.
- Requested
Service stringObjective Id A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .
- Requested
Service stringObjective Name The service objective name for the database. Valid values depend on edition and location and may include
S0,S1,S2,S3,P1,P2,P4,P6,P11andElasticPool. You can list the available names with the cli:shell az sql db list-editions -l westus --edition Standard -o table. For further information please see Azure CLI - az sql db.- Restore
Point stringIn Time The point in time for the restore. Only applies if
create_modeisPointInTimeRestoree.g. 2013-11-08T22:00:40Z- Source
Database stringDeletion Date The deletion date time of the source database. Only applies to deleted databases where
create_modeisPointInTimeRestore.- Source
Database stringId The URI of the source database if
create_modevalue is notDefault.- map[string]string
A mapping of tags to assign to the resource.
- Threat
Detection DatabasePolicy Threat Detection Policy Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below.- Zone
Redundant bool Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
- resource
Group stringName The name of the resource group in which to create the database. This must be the same as Database Server resource group currently.
- server
Name string The name of the SQL Server on which to create the database.
- collation string
The name of the collation. Applies only if
create_modeisDefault. Azure default isSQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.- create
Mode string Specifies how to create the database. Valid values are:
Default,Copy,OnlineSecondary,NonReadableSecondary,PointInTimeRestore,Recovery,RestoreorRestoreLongTermRetentionBackup. Must beDefaultto create a new database. Defaults toDefault. Please see Azure SQL Database REST API- edition string
The edition of the database to be created. Applies only if
create_modeisDefault. Valid values are:Basic,Standard,Premium,DataWarehouse,Business,BusinessCritical,Free,GeneralPurpose,Hyperscale,Premium,PremiumRS,Standard,Stretch,System,System2, orWeb. Please see Azure SQL Database Service Tiers.- elastic
Pool stringName The name of the elastic database pool.
- extended
Auditing DatabasePolicy Extended Auditing Policy A
extended_auditing_policyblock as defined below.- import
Database
Import A Database Import block as documented below.
create_modemust be set toDefault.- location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- max
Size stringBytes The maximum size that the database can grow to. Applies only if
create_modeisDefault. Please see Azure SQL Database Service Tiers.- max
Size stringGb - name string
The name of the database.
- read
Scale boolean Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.
- requested
Service stringObjective Id A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .
- requested
Service stringObjective Name The service objective name for the database. Valid values depend on edition and location and may include
S0,S1,S2,S3,P1,P2,P4,P6,P11andElasticPool. You can list the available names with the cli:shell az sql db list-editions -l westus --edition Standard -o table. For further information please see Azure CLI - az sql db.- restore
Point stringIn Time The point in time for the restore. Only applies if
create_modeisPointInTimeRestoree.g. 2013-11-08T22:00:40Z- source
Database stringDeletion Date The deletion date time of the source database. Only applies to deleted databases where
create_modeisPointInTimeRestore.- source
Database stringId The URI of the source database if
create_modevalue is notDefault.- {[key: string]: string}
A mapping of tags to assign to the resource.
- threat
Detection DatabasePolicy Threat Detection Policy Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below.- 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.
- resource_
group_ strname The name of the resource group in which to create the database. This must be the same as Database Server resource group currently.
- server_
name str The name of the SQL Server on which to create the database.
- collation str
The name of the collation. Applies only if
create_modeisDefault. Azure default isSQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.- create_
mode str Specifies how to create the database. Valid values are:
Default,Copy,OnlineSecondary,NonReadableSecondary,PointInTimeRestore,Recovery,RestoreorRestoreLongTermRetentionBackup. Must beDefaultto create a new database. Defaults toDefault. Please see Azure SQL Database REST API- edition str
The edition of the database to be created. Applies only if
create_modeisDefault. Valid values are:Basic,Standard,Premium,DataWarehouse,Business,BusinessCritical,Free,GeneralPurpose,Hyperscale,Premium,PremiumRS,Standard,Stretch,System,System2, orWeb. Please see Azure SQL Database Service Tiers.- elastic_
pool_ strname The name of the elastic database pool.
- extended_
auditing_ Dict[Databasepolicy Extended Auditing Policy] A
extended_auditing_policyblock as defined below.- import_
Dict[Database
Import] A Database Import block as documented below.
create_modemust be set toDefault.- location str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- max_
size_ strbytes The maximum size that the database can grow to. Applies only if
create_modeisDefault. Please see Azure SQL Database Service Tiers.- max_
size_ strgb - name str
The name of the database.
- read_
scale bool Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.
- requested_
service_ strobjective_ id A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .
- requested_
service_ strobjective_ name The service objective name for the database. Valid values depend on edition and location and may include
S0,S1,S2,S3,P1,P2,P4,P6,P11andElasticPool. You can list the available names with the cli:shell az sql db list-editions -l westus --edition Standard -o table. For further information please see Azure CLI - az sql db.- restore_
point_ strin_ time The point in time for the restore. Only applies if
create_modeisPointInTimeRestoree.g. 2013-11-08T22:00:40Z- source_
database_ strdeletion_ date The deletion date time of the source database. Only applies to deleted databases where
create_modeisPointInTimeRestore.- source_
database_ strid The URI of the source database if
create_modevalue is notDefault.- Dict[str, str]
A mapping of tags to assign to the resource.
- threat_
detection_ Dict[Databasepolicy Threat Detection Policy] Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below.- zone_
redundant bool Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
Outputs
All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:
- Creation
Date string The creation date of the SQL Database.
- Default
Secondary stringLocation The default secondary location of the SQL Database.
- Encryption string
- Id string
- The provider-assigned unique ID for this managed resource.
- Creation
Date string The creation date of the SQL Database.
- Default
Secondary stringLocation The default secondary location of the SQL Database.
- Encryption string
- Id string
- The provider-assigned unique ID for this managed resource.
- creation
Date string The creation date of the SQL Database.
- default
Secondary stringLocation The default secondary location of the SQL Database.
- encryption string
- id string
- The provider-assigned unique ID for this managed resource.
- creation_
date str The creation date of the SQL Database.
- default_
secondary_ strlocation The default secondary location of the SQL Database.
- encryption str
- id str
- The provider-assigned unique ID for this managed resource.
Look up an 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): Databasestatic get(resource_name, id, opts=None, collation=None, create_mode=None, creation_date=None, default_secondary_location=None, edition=None, elastic_pool_name=None, encryption=None, extended_auditing_policy=None, import_=None, location=None, max_size_bytes=None, max_size_gb=None, name=None, read_scale=None, requested_service_objective_id=None, requested_service_objective_name=None, resource_group_name=None, restore_point_in_time=None, server_name=None, source_database_deletion_date=None, source_database_id=None, tags=None, threat_detection_policy=None, zone_redundant=None, __props__=None);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)- 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.
The following state arguments are supported:
- Collation string
The name of the collation. Applies only if
create_modeisDefault. Azure default isSQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.- Create
Mode string Specifies how to create the database. Valid values are:
Default,Copy,OnlineSecondary,NonReadableSecondary,PointInTimeRestore,Recovery,RestoreorRestoreLongTermRetentionBackup. Must beDefaultto create a new database. Defaults toDefault. Please see Azure SQL Database REST API- Creation
Date string The creation date of the SQL Database.
- Default
Secondary stringLocation The default secondary location of the SQL Database.
- Edition string
The edition of the database to be created. Applies only if
create_modeisDefault. Valid values are:Basic,Standard,Premium,DataWarehouse,Business,BusinessCritical,Free,GeneralPurpose,Hyperscale,Premium,PremiumRS,Standard,Stretch,System,System2, orWeb. Please see Azure SQL Database Service Tiers.- Elastic
Pool stringName The name of the elastic database pool.
- Encryption string
- Extended
Auditing DatabasePolicy Extended Auditing Policy Args A
extended_auditing_policyblock as defined below.- Import
Database
Import Args A Database Import block as documented below.
create_modemust be set toDefault.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Max
Size stringBytes The maximum size that the database can grow to. Applies only if
create_modeisDefault. Please see Azure SQL Database Service Tiers.- Max
Size stringGb - Name string
The name of the database.
- Read
Scale bool Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.
- Requested
Service stringObjective Id A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .
- Requested
Service stringObjective Name The service objective name for the database. Valid values depend on edition and location and may include
S0,S1,S2,S3,P1,P2,P4,P6,P11andElasticPool. You can list the available names with the cli:shell az sql db list-editions -l westus --edition Standard -o table. For further information please see Azure CLI - az sql db.- Resource
Group stringName The name of the resource group in which to create the database. This must be the same as Database Server resource group currently.
- Restore
Point stringIn Time The point in time for the restore. Only applies if
create_modeisPointInTimeRestoree.g. 2013-11-08T22:00:40Z- Server
Name string The name of the SQL Server on which to create the database.
- Source
Database stringDeletion Date The deletion date time of the source database. Only applies to deleted databases where
create_modeisPointInTimeRestore.- Source
Database stringId The URI of the source database if
create_modevalue is notDefault.- 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_policyblock supports fields documented below.- Zone
Redundant bool Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
- Collation string
The name of the collation. Applies only if
create_modeisDefault. Azure default isSQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.- Create
Mode string Specifies how to create the database. Valid values are:
Default,Copy,OnlineSecondary,NonReadableSecondary,PointInTimeRestore,Recovery,RestoreorRestoreLongTermRetentionBackup. Must beDefaultto create a new database. Defaults toDefault. Please see Azure SQL Database REST API- Creation
Date string The creation date of the SQL Database.
- Default
Secondary stringLocation The default secondary location of the SQL Database.
- Edition string
The edition of the database to be created. Applies only if
create_modeisDefault. Valid values are:Basic,Standard,Premium,DataWarehouse,Business,BusinessCritical,Free,GeneralPurpose,Hyperscale,Premium,PremiumRS,Standard,Stretch,System,System2, orWeb. Please see Azure SQL Database Service Tiers.- Elastic
Pool stringName The name of the elastic database pool.
- Encryption string
- Extended
Auditing DatabasePolicy Extended Auditing Policy A
extended_auditing_policyblock as defined below.- Import
Database
Import A Database Import block as documented below.
create_modemust be set toDefault.- Location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Max
Size stringBytes The maximum size that the database can grow to. Applies only if
create_modeisDefault. Please see Azure SQL Database Service Tiers.- Max
Size stringGb - Name string
The name of the database.
- Read
Scale bool Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.
- Requested
Service stringObjective Id A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .
- Requested
Service stringObjective Name The service objective name for the database. Valid values depend on edition and location and may include
S0,S1,S2,S3,P1,P2,P4,P6,P11andElasticPool. You can list the available names with the cli:shell az sql db list-editions -l westus --edition Standard -o table. For further information please see Azure CLI - az sql db.- Resource
Group stringName The name of the resource group in which to create the database. This must be the same as Database Server resource group currently.
- Restore
Point stringIn Time The point in time for the restore. Only applies if
create_modeisPointInTimeRestoree.g. 2013-11-08T22:00:40Z- Server
Name string The name of the SQL Server on which to create the database.
- Source
Database stringDeletion Date The deletion date time of the source database. Only applies to deleted databases where
create_modeisPointInTimeRestore.- Source
Database stringId The URI of the source database if
create_modevalue is notDefault.- map[string]string
A mapping of tags to assign to the resource.
- Threat
Detection DatabasePolicy Threat Detection Policy Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below.- Zone
Redundant bool Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
- collation string
The name of the collation. Applies only if
create_modeisDefault. Azure default isSQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.- create
Mode string Specifies how to create the database. Valid values are:
Default,Copy,OnlineSecondary,NonReadableSecondary,PointInTimeRestore,Recovery,RestoreorRestoreLongTermRetentionBackup. Must beDefaultto create a new database. Defaults toDefault. Please see Azure SQL Database REST API- creation
Date string The creation date of the SQL Database.
- default
Secondary stringLocation The default secondary location of the SQL Database.
- edition string
The edition of the database to be created. Applies only if
create_modeisDefault. Valid values are:Basic,Standard,Premium,DataWarehouse,Business,BusinessCritical,Free,GeneralPurpose,Hyperscale,Premium,PremiumRS,Standard,Stretch,System,System2, orWeb. Please see Azure SQL Database Service Tiers.- elastic
Pool stringName The name of the elastic database pool.
- encryption string
- extended
Auditing DatabasePolicy Extended Auditing Policy A
extended_auditing_policyblock as defined below.- import
Database
Import A Database Import block as documented below.
create_modemust be set toDefault.- location string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- max
Size stringBytes The maximum size that the database can grow to. Applies only if
create_modeisDefault. Please see Azure SQL Database Service Tiers.- max
Size stringGb - name string
The name of the database.
- read
Scale boolean Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.
- requested
Service stringObjective Id A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .
- requested
Service stringObjective Name The service objective name for the database. Valid values depend on edition and location and may include
S0,S1,S2,S3,P1,P2,P4,P6,P11andElasticPool. You can list the available names with the cli:shell az sql db list-editions -l westus --edition Standard -o table. For further information please see Azure CLI - az sql db.- resource
Group stringName The name of the resource group in which to create the database. This must be the same as Database Server resource group currently.
- restore
Point stringIn Time The point in time for the restore. Only applies if
create_modeisPointInTimeRestoree.g. 2013-11-08T22:00:40Z- server
Name string The name of the SQL Server on which to create the database.
- source
Database stringDeletion Date The deletion date time of the source database. Only applies to deleted databases where
create_modeisPointInTimeRestore.- source
Database stringId The URI of the source database if
create_modevalue is notDefault.- {[key: string]: string}
A mapping of tags to assign to the resource.
- threat
Detection DatabasePolicy Threat Detection Policy Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below.- 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.
- collation str
The name of the collation. Applies only if
create_modeisDefault. Azure default isSQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.- create_
mode str Specifies how to create the database. Valid values are:
Default,Copy,OnlineSecondary,NonReadableSecondary,PointInTimeRestore,Recovery,RestoreorRestoreLongTermRetentionBackup. Must beDefaultto create a new database. Defaults toDefault. Please see Azure SQL Database REST API- creation_
date str The creation date of the SQL Database.
- default_
secondary_ strlocation The default secondary location of the SQL Database.
- edition str
The edition of the database to be created. Applies only if
create_modeisDefault. Valid values are:Basic,Standard,Premium,DataWarehouse,Business,BusinessCritical,Free,GeneralPurpose,Hyperscale,Premium,PremiumRS,Standard,Stretch,System,System2, orWeb. Please see Azure SQL Database Service Tiers.- elastic_
pool_ strname The name of the elastic database pool.
- encryption str
- extended_
auditing_ Dict[Databasepolicy Extended Auditing Policy] A
extended_auditing_policyblock as defined below.- import_
Dict[Database
Import] A Database Import block as documented below.
create_modemust be set toDefault.- location str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- max_
size_ strbytes The maximum size that the database can grow to. Applies only if
create_modeisDefault. Please see Azure SQL Database Service Tiers.- max_
size_ strgb - name str
The name of the database.
- read_
scale bool Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.
- requested_
service_ strobjective_ id A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .
- requested_
service_ strobjective_ name The service objective name for the database. Valid values depend on edition and location and may include
S0,S1,S2,S3,P1,P2,P4,P6,P11andElasticPool. You can list the available names with the cli:shell az sql db list-editions -l westus --edition Standard -o table. For further information please see Azure CLI - az sql db.- resource_
group_ strname The name of the resource group in which to create the database. This must be the same as Database Server resource group currently.
- restore_
point_ strin_ time The point in time for the restore. Only applies if
create_modeisPointInTimeRestoree.g. 2013-11-08T22:00:40Z- server_
name str The name of the SQL Server on which to create the database.
- source_
database_ strdeletion_ date The deletion date time of the source database. Only applies to deleted databases where
create_modeisPointInTimeRestore.- source_
database_ strid The URI of the source database if
create_modevalue is notDefault.- Dict[str, str]
A mapping of tags to assign to the resource.
- threat_
detection_ Dict[Databasepolicy Threat Detection Policy] Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below.- zone_
redundant bool Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
Supporting Types
DatabaseExtendedAuditingPolicy
- Storage
Account stringAccess Key Specifies the access key to use for the auditing storage account.
- Storage
Endpoint string Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net).
- Retention
In intDays Specifies the number of days to retain logs for in the storage account.
- Storage
Account boolAccess Key Is Secondary Specifies whether
storage_account_access_keyvalue is the storage’s secondary key.
- Storage
Account stringAccess Key Specifies the access key to use for the auditing storage account.
- Storage
Endpoint string Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net).
- Retention
In intDays Specifies the number of days to retain logs for in the storage account.
- Storage
Account boolAccess Key Is Secondary Specifies whether
storage_account_access_keyvalue is the storage’s secondary key.
- storage
Account stringAccess Key Specifies the access key to use for the auditing storage account.
- storage
Endpoint string Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net).
- retention
In numberDays Specifies the number of days to retain logs for in the storage account.
- storage
Account booleanAccess Key Is Secondary Specifies whether
storage_account_access_keyvalue is the storage’s secondary key.
- storage_
account_ straccess_ key Specifies the access key to use for the auditing storage account.
- storage_
endpoint str Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net).
- retention_
in_ floatdays Specifies the number of days to retain logs for in the storage account.
- storage
Account boolAccess Key Is Secondary Specifies whether
storage_account_access_keyvalue is the storage’s secondary key.
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
SQLorADPassword.- 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
StorageAccessKeyorSharedAccessKey.- Storage
Uri string Specifies the blob URI of the .bacpac file.
- Operation
Mode string Specifies the type of import operation being performed. The only allowable value is
Import.
- 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
SQLorADPassword.- 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
StorageAccessKeyorSharedAccessKey.- Storage
Uri string Specifies the blob URI of the .bacpac file.
- Operation
Mode string Specifies the type of import operation being performed. The only allowable value is
Import.
- 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
SQLorADPassword.- 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
StorageAccessKeyorSharedAccessKey.- storage
Uri string Specifies the blob URI of the .bacpac file.
- operation
Mode string Specifies the type of import operation being performed. The only allowable value is
Import.
- administrator_
login str Specifies the name of the SQL administrator.
- administrator_
login_ strpassword Specifies the password of the SQL administrator.
- authentication
Type str Specifies the type of authentication used to access the server. Valid values are
SQLorADPassword.- 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
StorageAccessKeyorSharedAccessKey.- storage
Uri str Specifies the blob URI of the .bacpac file.
- operation
Mode str Specifies the type of import operation being performed. The only allowable value is
Import.
DatabaseThreatDetectionPolicy
- Disabled
Alerts List<string> Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly,Sql_InjectionandSql_Injection_Vulnerability.- Email
Account stringAdmins Should the account administrators be emailed when this alert is triggered?
- 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,DisabledorNew.- Storage
Account stringAccess Key Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled.- Storage
Endpoint string Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if
stateisEnabled.- Use
Server stringDefault Should the default server policy be used? Defaults to
Disabled.
- Disabled
Alerts []string Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly,Sql_InjectionandSql_Injection_Vulnerability.- Email
Account stringAdmins Should the account administrators be emailed when this alert is triggered?
- 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,DisabledorNew.- Storage
Account stringAccess Key Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled.- Storage
Endpoint string Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if
stateisEnabled.- Use
Server stringDefault Should the default server policy be used? Defaults to
Disabled.
- disabled
Alerts string[] Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly,Sql_InjectionandSql_Injection_Vulnerability.- email
Account stringAdmins Should the account administrators be emailed when this alert is triggered?
- 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,DisabledorNew.- storage
Account stringAccess Key Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled.- storage
Endpoint string Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if
stateisEnabled.- use
Server stringDefault Should the default server policy be used? Defaults to
Disabled.
- disabled_
alerts List[str] Specifies a list of alerts which should be disabled. Possible values include
Access_Anomaly,Sql_InjectionandSql_Injection_Vulnerability.- email_
account_ stradmins Should the account administrators be emailed when this alert is triggered?
- email_
addresses List[str] A list of email addresses which alerts should be sent to.
- retention_
days float Specifies the number of days to keep in the Threat Detection audit logs.
- state str
The State of the Policy. Possible values are
Enabled,DisabledorNew.- storage_
account_ straccess_ key Specifies the identifier key of the Threat Detection audit storage account. Required if
stateisEnabled.- storage_
endpoint str Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if
stateisEnabled.- use
Server strDefault Should the default server policy be used? Defaults to
Disabled.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.