Show / Hide Table of Contents

Class Database

Manages a MS SQL Database.

Inheritance
System.Object
Resource
CustomResource
Database
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Azure.MSSql
Assembly: Pulumi.Azure.dll
Syntax
public class Database : CustomResource

Constructors

View Source

Database(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 Source

AutoPauseDelayInMinutes

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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>
View Source

ExtendedAuditingPolicy

A extended_auditing_policy block as defined below.

Declaration
public Output<DatabaseExtendedAuditingPolicy> ExtendedAuditingPolicy { get; }
Property Value
Type Description
Output<DatabaseExtendedAuditingPolicy>
View Source

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>
View Source

MaxSizeGb

The max size of the database in gigabytes.

Declaration
public Output<int> MaxSizeGb { get; }
Property Value
Type Description
Output<System.Int32>
View Source

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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>
View Source

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>>
View Source

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>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.