Class Database
Manages a MS SQL Database.
Inherited Members
Namespace: Pulumi.Azure.MSSql
Assembly: Pulumi.Azure.dll
Syntax
public class Database : CustomResource
Constructors
View SourceDatabase(String, DatabaseArgs, CustomResourceOptions)
Create a Database resource with the given unique name, arguments, and options.
Declaration
public Database(string name, DatabaseArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DatabaseArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAutoPauseDelayInMinutes
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.
Declaration
public Output<int> AutoPauseDelayInMinutes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Collation
Specifies the collation of the database. Changing this forces a new resource to be created.
Declaration
public Output<string> Collation { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CreateMode
The create mode of the database. Possible values are Copy, Default, OnlineSecondary, PointInTimeRestore, Restore, RestoreExternalBackup, RestoreExternalBackupSecondary, RestoreLongTermRetentionBackup and Secondary.
Declaration
public Output<string> CreateMode { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CreationSourceDatabaseId
The id of the source database to be referred 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.
Declaration
public Output<string> CreationSourceDatabaseId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ElasticPoolId
Specifies the ID of the elastic pool containing this database. Changing this forces a new resource to be created.
Declaration
public Output<string> ElasticPoolId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ExtendedAuditingPolicy
A extended_auditing_policy block as defined below.
Declaration
public Output<DatabaseExtendedAuditingPolicy> ExtendedAuditingPolicy { get; }
Property Value
| Type | Description |
|---|---|
| Output<DatabaseExtendedAuditingPolicy> |
LicenseType
Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice.
Declaration
public Output<string> LicenseType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MaxSizeGb
The max size of the database in gigabytes.
Declaration
public Output<int> MaxSizeGb { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
MinCapacity
Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
Declaration
public Output<double> MinCapacity { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Double> |
Name
The name of the Ms SQL Database. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ReadReplicaCount
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.
Declaration
public Output<int> ReadReplicaCount { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
ReadScale
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.
Declaration
public Output<bool> ReadScale { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
RestorePointInTime
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.
Declaration
public Output<string> RestorePointInTime { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SampleName
Specifies the name of the sample schema to apply when creating this database. Possible value is AdventureWorksLT.
Declaration
public Output<string> SampleName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ServerId
The id of the Ms SQL Server on which to create the database. Changing this forces a new resource to be created.
Declaration
public Output<string> ServerId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SkuName
Specifies the name of the sku used by the database. Changing this forces a new resource to be created. For example, GP_S_Gen5_2,HS_Gen4_1,BC_Gen5_2, ElasticPool, Basic,S0, P2 ,DW100c, DS100.
Declaration
public Output<string> SkuName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A mapping of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
ThreatDetectionPolicy
Threat detection policy configuration. The threat_detection_policy block supports fields documented below.
Declaration
public Output<DatabaseThreatDetectionPolicy> ThreatDetectionPolicy { get; }
Property Value
| Type | Description |
|---|---|
| Output<DatabaseThreatDetectionPolicy> |
ZoneRedundant
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.
Declaration
public Output<bool> ZoneRedundant { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Methods
View SourceGet(String, Input<String>, DatabaseState, CustomResourceOptions)
Get an existing Database resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Database Get(string name, Input<string> id, DatabaseState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DatabaseState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Database |