We recommend using Azure Native.
azure.mssql.ManagedDatabase
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example",
location: "West Europe",
});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
name: "example",
location: example.location,
resourceGroupName: example.name,
addressSpaces: ["10.0.0.0/16"],
});
const exampleSubnet = new azure.network.Subnet("example", {
name: "example",
resourceGroupName: example.name,
virtualNetworkName: exampleVirtualNetwork.name,
addressPrefixes: ["10.0.2.0/24"],
});
const exampleManagedInstance = new azure.mssql.ManagedInstance("example", {
name: "managedsqlinstance",
resourceGroupName: example.name,
location: example.location,
licenseType: "BasePrice",
skuName: "GP_Gen5",
storageSizeInGb: 32,
subnetId: exampleSubnet.id,
vcores: 4,
administratorLogin: "msadministrator",
administratorLoginPassword: "thisIsDog11",
});
const exampleManagedDatabase = new azure.mssql.ManagedDatabase("example", {
name: "example",
managedInstanceId: exampleManagedInstance.id,
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example",
location="West Europe")
example_virtual_network = azure.network.VirtualNetwork("example",
name="example",
location=example.location,
resource_group_name=example.name,
address_spaces=["10.0.0.0/16"])
example_subnet = azure.network.Subnet("example",
name="example",
resource_group_name=example.name,
virtual_network_name=example_virtual_network.name,
address_prefixes=["10.0.2.0/24"])
example_managed_instance = azure.mssql.ManagedInstance("example",
name="managedsqlinstance",
resource_group_name=example.name,
location=example.location,
license_type="BasePrice",
sku_name="GP_Gen5",
storage_size_in_gb=32,
subnet_id=example_subnet.id,
vcores=4,
administrator_login="msadministrator",
administrator_login_password="thisIsDog11")
example_managed_database = azure.mssql.ManagedDatabase("example",
name="example",
managed_instance_id=example_managed_instance.id)
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/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
Name: pulumi.String("example"),
Location: example.Location,
ResourceGroupName: example.Name,
AddressSpaces: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
})
if err != nil {
return err
}
exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
Name: pulumi.String("example"),
ResourceGroupName: example.Name,
VirtualNetworkName: exampleVirtualNetwork.Name,
AddressPrefixes: pulumi.StringArray{
pulumi.String("10.0.2.0/24"),
},
})
if err != nil {
return err
}
exampleManagedInstance, err := mssql.NewManagedInstance(ctx, "example", &mssql.ManagedInstanceArgs{
Name: pulumi.String("managedsqlinstance"),
ResourceGroupName: example.Name,
Location: example.Location,
LicenseType: pulumi.String("BasePrice"),
SkuName: pulumi.String("GP_Gen5"),
StorageSizeInGb: pulumi.Int(32),
SubnetId: exampleSubnet.ID(),
Vcores: pulumi.Int(4),
AdministratorLogin: pulumi.String("msadministrator"),
AdministratorLoginPassword: pulumi.String("thisIsDog11"),
})
if err != nil {
return err
}
_, err = mssql.NewManagedDatabase(ctx, "example", &mssql.ManagedDatabaseArgs{
Name: pulumi.String("example"),
ManagedInstanceId: exampleManagedInstance.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example",
Location = "West Europe",
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
{
Name = "example",
Location = example.Location,
ResourceGroupName = example.Name,
AddressSpaces = new[]
{
"10.0.0.0/16",
},
});
var exampleSubnet = new Azure.Network.Subnet("example", new()
{
Name = "example",
ResourceGroupName = example.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefixes = new[]
{
"10.0.2.0/24",
},
});
var exampleManagedInstance = new Azure.MSSql.ManagedInstance("example", new()
{
Name = "managedsqlinstance",
ResourceGroupName = example.Name,
Location = example.Location,
LicenseType = "BasePrice",
SkuName = "GP_Gen5",
StorageSizeInGb = 32,
SubnetId = exampleSubnet.Id,
Vcores = 4,
AdministratorLogin = "msadministrator",
AdministratorLoginPassword = "thisIsDog11",
});
var exampleManagedDatabase = new Azure.MSSql.ManagedDatabase("example", new()
{
Name = "example",
ManagedInstanceId = exampleManagedInstance.Id,
});
});
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.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.mssql.ManagedInstance;
import com.pulumi.azure.mssql.ManagedInstanceArgs;
import com.pulumi.azure.mssql.ManagedDatabase;
import com.pulumi.azure.mssql.ManagedDatabaseArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example")
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.name("example")
.location(example.location())
.resourceGroupName(example.name())
.addressSpaces("10.0.0.0/16")
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.name("example")
.resourceGroupName(example.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.2.0/24")
.build());
var exampleManagedInstance = new ManagedInstance("exampleManagedInstance", ManagedInstanceArgs.builder()
.name("managedsqlinstance")
.resourceGroupName(example.name())
.location(example.location())
.licenseType("BasePrice")
.skuName("GP_Gen5")
.storageSizeInGb(32)
.subnetId(exampleSubnet.id())
.vcores(4)
.administratorLogin("msadministrator")
.administratorLoginPassword("thisIsDog11")
.build());
var exampleManagedDatabase = new ManagedDatabase("exampleManagedDatabase", ManagedDatabaseArgs.builder()
.name("example")
.managedInstanceId(exampleManagedInstance.id())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example
location: West Europe
exampleVirtualNetwork:
type: azure:network:VirtualNetwork
name: example
properties:
name: example
location: ${example.location}
resourceGroupName: ${example.name}
addressSpaces:
- 10.0.0.0/16
exampleSubnet:
type: azure:network:Subnet
name: example
properties:
name: example
resourceGroupName: ${example.name}
virtualNetworkName: ${exampleVirtualNetwork.name}
addressPrefixes:
- 10.0.2.0/24
exampleManagedInstance:
type: azure:mssql:ManagedInstance
name: example
properties:
name: managedsqlinstance
resourceGroupName: ${example.name}
location: ${example.location}
licenseType: BasePrice
skuName: GP_Gen5
storageSizeInGb: 32
subnetId: ${exampleSubnet.id}
vcores: 4
administratorLogin: msadministrator
administratorLoginPassword: thisIsDog11
exampleManagedDatabase:
type: azure:mssql:ManagedDatabase
name: example
properties:
name: example
managedInstanceId: ${exampleManagedInstance.id}
Create ManagedDatabase Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ManagedDatabase(name: string, args: ManagedDatabaseArgs, opts?: CustomResourceOptions);
@overload
def ManagedDatabase(resource_name: str,
args: ManagedDatabaseArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ManagedDatabase(resource_name: str,
opts: Optional[ResourceOptions] = None,
managed_instance_id: Optional[str] = None,
long_term_retention_policy: Optional[ManagedDatabaseLongTermRetentionPolicyArgs] = None,
name: Optional[str] = None,
point_in_time_restore: Optional[ManagedDatabasePointInTimeRestoreArgs] = None,
short_term_retention_days: Optional[int] = None)
func NewManagedDatabase(ctx *Context, name string, args ManagedDatabaseArgs, opts ...ResourceOption) (*ManagedDatabase, error)
public ManagedDatabase(string name, ManagedDatabaseArgs args, CustomResourceOptions? opts = null)
public ManagedDatabase(String name, ManagedDatabaseArgs args)
public ManagedDatabase(String name, ManagedDatabaseArgs args, CustomResourceOptions options)
type: azure:mssql:ManagedDatabase
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ManagedDatabaseArgs
- 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 ManagedDatabaseArgs
- 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 ManagedDatabaseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ManagedDatabaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ManagedDatabaseArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var managedDatabaseResource = new Azure.MSSql.ManagedDatabase("managedDatabaseResource", new()
{
ManagedInstanceId = "string",
LongTermRetentionPolicy = new Azure.MSSql.Inputs.ManagedDatabaseLongTermRetentionPolicyArgs
{
ImmutableBackupsEnabled = false,
MonthlyRetention = "string",
WeekOfYear = 0,
WeeklyRetention = "string",
YearlyRetention = "string",
},
Name = "string",
PointInTimeRestore = new Azure.MSSql.Inputs.ManagedDatabasePointInTimeRestoreArgs
{
RestorePointInTime = "string",
SourceDatabaseId = "string",
},
ShortTermRetentionDays = 0,
});
example, err := mssql.NewManagedDatabase(ctx, "managedDatabaseResource", &mssql.ManagedDatabaseArgs{
ManagedInstanceId: pulumi.String("string"),
LongTermRetentionPolicy: &mssql.ManagedDatabaseLongTermRetentionPolicyArgs{
ImmutableBackupsEnabled: pulumi.Bool(false),
MonthlyRetention: pulumi.String("string"),
WeekOfYear: pulumi.Int(0),
WeeklyRetention: pulumi.String("string"),
YearlyRetention: pulumi.String("string"),
},
Name: pulumi.String("string"),
PointInTimeRestore: &mssql.ManagedDatabasePointInTimeRestoreArgs{
RestorePointInTime: pulumi.String("string"),
SourceDatabaseId: pulumi.String("string"),
},
ShortTermRetentionDays: pulumi.Int(0),
})
var managedDatabaseResource = new ManagedDatabase("managedDatabaseResource", ManagedDatabaseArgs.builder()
.managedInstanceId("string")
.longTermRetentionPolicy(ManagedDatabaseLongTermRetentionPolicyArgs.builder()
.immutableBackupsEnabled(false)
.monthlyRetention("string")
.weekOfYear(0)
.weeklyRetention("string")
.yearlyRetention("string")
.build())
.name("string")
.pointInTimeRestore(ManagedDatabasePointInTimeRestoreArgs.builder()
.restorePointInTime("string")
.sourceDatabaseId("string")
.build())
.shortTermRetentionDays(0)
.build());
managed_database_resource = azure.mssql.ManagedDatabase("managedDatabaseResource",
managed_instance_id="string",
long_term_retention_policy=azure.mssql.ManagedDatabaseLongTermRetentionPolicyArgs(
immutable_backups_enabled=False,
monthly_retention="string",
week_of_year=0,
weekly_retention="string",
yearly_retention="string",
),
name="string",
point_in_time_restore=azure.mssql.ManagedDatabasePointInTimeRestoreArgs(
restore_point_in_time="string",
source_database_id="string",
),
short_term_retention_days=0)
const managedDatabaseResource = new azure.mssql.ManagedDatabase("managedDatabaseResource", {
managedInstanceId: "string",
longTermRetentionPolicy: {
immutableBackupsEnabled: false,
monthlyRetention: "string",
weekOfYear: 0,
weeklyRetention: "string",
yearlyRetention: "string",
},
name: "string",
pointInTimeRestore: {
restorePointInTime: "string",
sourceDatabaseId: "string",
},
shortTermRetentionDays: 0,
});
type: azure:mssql:ManagedDatabase
properties:
longTermRetentionPolicy:
immutableBackupsEnabled: false
monthlyRetention: string
weekOfYear: 0
weeklyRetention: string
yearlyRetention: string
managedInstanceId: string
name: string
pointInTimeRestore:
restorePointInTime: string
sourceDatabaseId: string
shortTermRetentionDays: 0
ManagedDatabase 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 ManagedDatabase resource accepts the following input properties:
- Managed
Instance stringId - The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
- Long
Term ManagedRetention Policy Database Long Term Retention Policy - A
long_term_retention_policy
block as defined below. - Name string
- The name of the Managed Database to create. Changing this forces a new resource to be created.
- Point
In ManagedTime Restore Database Point In Time Restore - A
point_in_time_restore
block as defined below. Changing this forces a new resource to be created. - Short
Term intRetention Days - The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- Managed
Instance stringId - The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
- Long
Term ManagedRetention Policy Database Long Term Retention Policy Args - A
long_term_retention_policy
block as defined below. - Name string
- The name of the Managed Database to create. Changing this forces a new resource to be created.
- Point
In ManagedTime Restore Database Point In Time Restore Args - A
point_in_time_restore
block as defined below. Changing this forces a new resource to be created. - Short
Term intRetention Days - The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- managed
Instance StringId - The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
- long
Term ManagedRetention Policy Database Long Term Retention Policy - A
long_term_retention_policy
block as defined below. - name String
- The name of the Managed Database to create. Changing this forces a new resource to be created.
- point
In ManagedTime Restore Database Point In Time Restore - A
point_in_time_restore
block as defined below. Changing this forces a new resource to be created. - short
Term IntegerRetention Days - The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- managed
Instance stringId - The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
- long
Term ManagedRetention Policy Database Long Term Retention Policy - A
long_term_retention_policy
block as defined below. - name string
- The name of the Managed Database to create. Changing this forces a new resource to be created.
- point
In ManagedTime Restore Database Point In Time Restore - A
point_in_time_restore
block as defined below. Changing this forces a new resource to be created. - short
Term numberRetention Days - The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- managed_
instance_ strid - The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
- long_
term_ Managedretention_ policy Database Long Term Retention Policy Args - A
long_term_retention_policy
block as defined below. - name str
- The name of the Managed Database to create. Changing this forces a new resource to be created.
- point_
in_ Managedtime_ restore Database Point In Time Restore Args - A
point_in_time_restore
block as defined below. Changing this forces a new resource to be created. - short_
term_ intretention_ days - The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- managed
Instance StringId - The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
- long
Term Property MapRetention Policy - A
long_term_retention_policy
block as defined below. - name String
- The name of the Managed Database to create. Changing this forces a new resource to be created.
- point
In Property MapTime Restore - A
point_in_time_restore
block as defined below. Changing this forces a new resource to be created. - short
Term NumberRetention Days - The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
Outputs
All input properties are implicitly available as output properties. Additionally, the ManagedDatabase 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 ManagedDatabase Resource
Get an existing ManagedDatabase 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?: ManagedDatabaseState, opts?: CustomResourceOptions): ManagedDatabase
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
long_term_retention_policy: Optional[ManagedDatabaseLongTermRetentionPolicyArgs] = None,
managed_instance_id: Optional[str] = None,
name: Optional[str] = None,
point_in_time_restore: Optional[ManagedDatabasePointInTimeRestoreArgs] = None,
short_term_retention_days: Optional[int] = None) -> ManagedDatabase
func GetManagedDatabase(ctx *Context, name string, id IDInput, state *ManagedDatabaseState, opts ...ResourceOption) (*ManagedDatabase, error)
public static ManagedDatabase Get(string name, Input<string> id, ManagedDatabaseState? state, CustomResourceOptions? opts = null)
public static ManagedDatabase get(String name, Output<String> id, ManagedDatabaseState 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.
- Long
Term ManagedRetention Policy Database Long Term Retention Policy - A
long_term_retention_policy
block as defined below. - Managed
Instance stringId - The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
- Name string
- The name of the Managed Database to create. Changing this forces a new resource to be created.
- Point
In ManagedTime Restore Database Point In Time Restore - A
point_in_time_restore
block as defined below. Changing this forces a new resource to be created. - Short
Term intRetention Days - The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- Long
Term ManagedRetention Policy Database Long Term Retention Policy Args - A
long_term_retention_policy
block as defined below. - Managed
Instance stringId - The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
- Name string
- The name of the Managed Database to create. Changing this forces a new resource to be created.
- Point
In ManagedTime Restore Database Point In Time Restore Args - A
point_in_time_restore
block as defined below. Changing this forces a new resource to be created. - Short
Term intRetention Days - The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- long
Term ManagedRetention Policy Database Long Term Retention Policy - A
long_term_retention_policy
block as defined below. - managed
Instance StringId - The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
- name String
- The name of the Managed Database to create. Changing this forces a new resource to be created.
- point
In ManagedTime Restore Database Point In Time Restore - A
point_in_time_restore
block as defined below. Changing this forces a new resource to be created. - short
Term IntegerRetention Days - The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- long
Term ManagedRetention Policy Database Long Term Retention Policy - A
long_term_retention_policy
block as defined below. - managed
Instance stringId - The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
- name string
- The name of the Managed Database to create. Changing this forces a new resource to be created.
- point
In ManagedTime Restore Database Point In Time Restore - A
point_in_time_restore
block as defined below. Changing this forces a new resource to be created. - short
Term numberRetention Days - The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- long_
term_ Managedretention_ policy Database Long Term Retention Policy Args - A
long_term_retention_policy
block as defined below. - managed_
instance_ strid - The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
- name str
- The name of the Managed Database to create. Changing this forces a new resource to be created.
- point_
in_ Managedtime_ restore Database Point In Time Restore Args - A
point_in_time_restore
block as defined below. Changing this forces a new resource to be created. - short_
term_ intretention_ days - The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
- long
Term Property MapRetention Policy - A
long_term_retention_policy
block as defined below. - managed
Instance StringId - The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created.
- name String
- The name of the Managed Database to create. Changing this forces a new resource to be created.
- point
In Property MapTime Restore - A
point_in_time_restore
block as defined below. Changing this forces a new resource to be created. - short
Term NumberRetention Days - The backup retention period in days. This is how many days Point-in-Time Restore will be supported.
Supporting Types
ManagedDatabaseLongTermRetentionPolicy, ManagedDatabaseLongTermRetentionPolicyArgs
- Immutable
Backups boolEnabled - Specifies if the backups are immutable. Defaults to
false
. - 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
.
- Immutable
Backups boolEnabled - Specifies if the backups are immutable. Defaults to
false
. - 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
.
- immutable
Backups BooleanEnabled - Specifies if the backups are immutable. Defaults to
false
. - 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
.
- immutable
Backups booleanEnabled - Specifies if the backups are immutable. Defaults to
false
. - 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
.
- immutable_
backups_ boolenabled - Specifies if the backups are immutable. Defaults to
false
. - 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
.
- immutable
Backups BooleanEnabled - Specifies if the backups are immutable. Defaults to
false
. - 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
.
ManagedDatabasePointInTimeRestore, ManagedDatabasePointInTimeRestoreArgs
- Restore
Point stringIn Time - The point in time for the restore from
source_database_id
. Changing this forces a new resource to be created. - Source
Database stringId - The source database id that will be used to restore from. Changing this forces a new resource to be created.
- Restore
Point stringIn Time - The point in time for the restore from
source_database_id
. Changing this forces a new resource to be created. - Source
Database stringId - The source database id that will be used to restore from. Changing this forces a new resource to be created.
- restore
Point StringIn Time - The point in time for the restore from
source_database_id
. Changing this forces a new resource to be created. - source
Database StringId - The source database id that will be used to restore from. Changing this forces a new resource to be created.
- restore
Point stringIn Time - The point in time for the restore from
source_database_id
. Changing this forces a new resource to be created. - source
Database stringId - The source database id that will be used to restore from. Changing this forces a new resource to be created.
- restore_
point_ strin_ time - The point in time for the restore from
source_database_id
. Changing this forces a new resource to be created. - source_
database_ strid - The source database id that will be used to restore from. Changing this forces a new resource to be created.
- restore
Point StringIn Time - The point in time for the restore from
source_database_id
. Changing this forces a new resource to be created. - source
Database StringId - The source database id that will be used to restore from. Changing this forces a new resource to be created.
Import
SQL Managed Databases can be imported using the resource id
, e.g.
$ pulumi import azure:mssql/managedDatabase:ManagedDatabase example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Sql/managedInstances/myserver/databases/mydatabase
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.