azure-native.sql.DisasterRecoveryConfiguration
Explore with Pulumi AI
Represents a disaster recovery configuration. API Version: 2014-04-01.
Example Usage
Update a disaster recovery configuration
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var disasterRecoveryConfiguration = new AzureNative.Sql.DisasterRecoveryConfiguration("disasterRecoveryConfiguration", new()
{
DisasterRecoveryConfigurationName = "Default",
ResourceGroupName = "sqlcrudtest-4799",
ServerName = "sqlcrudtest-5961",
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewDisasterRecoveryConfiguration(ctx, "disasterRecoveryConfiguration", &sql.DisasterRecoveryConfigurationArgs{
DisasterRecoveryConfigurationName: pulumi.String("Default"),
ResourceGroupName: pulumi.String("sqlcrudtest-4799"),
ServerName: pulumi.String("sqlcrudtest-5961"),
})
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.azurenative.sql.DisasterRecoveryConfiguration;
import com.pulumi.azurenative.sql.DisasterRecoveryConfigurationArgs;
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 disasterRecoveryConfiguration = new DisasterRecoveryConfiguration("disasterRecoveryConfiguration", DisasterRecoveryConfigurationArgs.builder()
.disasterRecoveryConfigurationName("Default")
.resourceGroupName("sqlcrudtest-4799")
.serverName("sqlcrudtest-5961")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
disaster_recovery_configuration = azure_native.sql.DisasterRecoveryConfiguration("disasterRecoveryConfiguration",
disaster_recovery_configuration_name="Default",
resource_group_name="sqlcrudtest-4799",
server_name="sqlcrudtest-5961")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const disasterRecoveryConfiguration = new azure_native.sql.DisasterRecoveryConfiguration("disasterRecoveryConfiguration", {
disasterRecoveryConfigurationName: "Default",
resourceGroupName: "sqlcrudtest-4799",
serverName: "sqlcrudtest-5961",
});
resources:
disasterRecoveryConfiguration:
type: azure-native:sql:DisasterRecoveryConfiguration
properties:
disasterRecoveryConfigurationName: Default
resourceGroupName: sqlcrudtest-4799
serverName: sqlcrudtest-5961
Create DisasterRecoveryConfiguration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DisasterRecoveryConfiguration(name: string, args: DisasterRecoveryConfigurationArgs, opts?: CustomResourceOptions);
@overload
def DisasterRecoveryConfiguration(resource_name: str,
args: DisasterRecoveryConfigurationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DisasterRecoveryConfiguration(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
server_name: Optional[str] = None,
disaster_recovery_configuration_name: Optional[str] = None)
func NewDisasterRecoveryConfiguration(ctx *Context, name string, args DisasterRecoveryConfigurationArgs, opts ...ResourceOption) (*DisasterRecoveryConfiguration, error)
public DisasterRecoveryConfiguration(string name, DisasterRecoveryConfigurationArgs args, CustomResourceOptions? opts = null)
public DisasterRecoveryConfiguration(String name, DisasterRecoveryConfigurationArgs args)
public DisasterRecoveryConfiguration(String name, DisasterRecoveryConfigurationArgs args, CustomResourceOptions options)
type: azure-native:sql:DisasterRecoveryConfiguration
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 DisasterRecoveryConfigurationArgs
- 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 DisasterRecoveryConfigurationArgs
- 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 DisasterRecoveryConfigurationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DisasterRecoveryConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DisasterRecoveryConfigurationArgs
- 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 disasterRecoveryConfigurationResource = new AzureNative.Sql.DisasterRecoveryConfiguration("disasterRecoveryConfigurationResource", new()
{
ResourceGroupName = "string",
ServerName = "string",
DisasterRecoveryConfigurationName = "string",
});
example, err := sql.NewDisasterRecoveryConfiguration(ctx, "disasterRecoveryConfigurationResource", &sql.DisasterRecoveryConfigurationArgs{
ResourceGroupName: "string",
ServerName: "string",
DisasterRecoveryConfigurationName: "string",
})
var disasterRecoveryConfigurationResource = new DisasterRecoveryConfiguration("disasterRecoveryConfigurationResource", DisasterRecoveryConfigurationArgs.builder()
.resourceGroupName("string")
.serverName("string")
.disasterRecoveryConfigurationName("string")
.build());
disaster_recovery_configuration_resource = azure_native.sql.DisasterRecoveryConfiguration("disasterRecoveryConfigurationResource",
resource_group_name=string,
server_name=string,
disaster_recovery_configuration_name=string)
const disasterRecoveryConfigurationResource = new azure_native.sql.DisasterRecoveryConfiguration("disasterRecoveryConfigurationResource", {
resourceGroupName: "string",
serverName: "string",
disasterRecoveryConfigurationName: "string",
});
type: azure-native:sql:DisasterRecoveryConfiguration
properties:
disasterRecoveryConfigurationName: string
resourceGroupName: string
serverName: string
DisasterRecoveryConfiguration Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DisasterRecoveryConfiguration resource accepts the following input properties:
- Resource
Group stringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- Server
Name string - The name of the server.
- Disaster
Recovery stringConfiguration Name - The name of the disaster recovery configuration to be created/updated.
- Resource
Group stringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- Server
Name string - The name of the server.
- Disaster
Recovery stringConfiguration Name - The name of the disaster recovery configuration to be created/updated.
- resource
Group StringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server
Name String - The name of the server.
- disaster
Recovery StringConfiguration Name - The name of the disaster recovery configuration to be created/updated.
- resource
Group stringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server
Name string - The name of the server.
- disaster
Recovery stringConfiguration Name - The name of the disaster recovery configuration to be created/updated.
- resource_
group_ strname - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server_
name str - The name of the server.
- disaster_
recovery_ strconfiguration_ name - The name of the disaster recovery configuration to be created/updated.
- resource
Group StringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- server
Name String - The name of the server.
- disaster
Recovery StringConfiguration Name - The name of the disaster recovery configuration to be created/updated.
Outputs
All input properties are implicitly available as output properties. Additionally, the DisasterRecoveryConfiguration resource produces the following output properties:
- Auto
Failover string - Whether or not failover can be done automatically.
- Failover
Policy string - How aggressive the automatic failover should be.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- Location of the server that contains this disaster recovery configuration.
- Logical
Server stringName - Logical name of the server.
- Name string
- Resource name.
- Partner
Logical stringServer Name - Logical name of the partner server.
- Partner
Server stringId - Id of the partner server.
- Role string
- The role of the current server in the disaster recovery configuration.
- Status string
- The status of the disaster recovery configuration.
- Type string
- Resource type.
- Auto
Failover string - Whether or not failover can be done automatically.
- Failover
Policy string - How aggressive the automatic failover should be.
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- Location of the server that contains this disaster recovery configuration.
- Logical
Server stringName - Logical name of the server.
- Name string
- Resource name.
- Partner
Logical stringServer Name - Logical name of the partner server.
- Partner
Server stringId - Id of the partner server.
- Role string
- The role of the current server in the disaster recovery configuration.
- Status string
- The status of the disaster recovery configuration.
- Type string
- Resource type.
- auto
Failover String - Whether or not failover can be done automatically.
- failover
Policy String - How aggressive the automatic failover should be.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- Location of the server that contains this disaster recovery configuration.
- logical
Server StringName - Logical name of the server.
- name String
- Resource name.
- partner
Logical StringServer Name - Logical name of the partner server.
- partner
Server StringId - Id of the partner server.
- role String
- The role of the current server in the disaster recovery configuration.
- status String
- The status of the disaster recovery configuration.
- type String
- Resource type.
- auto
Failover string - Whether or not failover can be done automatically.
- failover
Policy string - How aggressive the automatic failover should be.
- id string
- The provider-assigned unique ID for this managed resource.
- location string
- Location of the server that contains this disaster recovery configuration.
- logical
Server stringName - Logical name of the server.
- name string
- Resource name.
- partner
Logical stringServer Name - Logical name of the partner server.
- partner
Server stringId - Id of the partner server.
- role string
- The role of the current server in the disaster recovery configuration.
- status string
- The status of the disaster recovery configuration.
- type string
- Resource type.
- auto_
failover str - Whether or not failover can be done automatically.
- failover_
policy str - How aggressive the automatic failover should be.
- id str
- The provider-assigned unique ID for this managed resource.
- location str
- Location of the server that contains this disaster recovery configuration.
- logical_
server_ strname - Logical name of the server.
- name str
- Resource name.
- partner_
logical_ strserver_ name - Logical name of the partner server.
- partner_
server_ strid - Id of the partner server.
- role str
- The role of the current server in the disaster recovery configuration.
- status str
- The status of the disaster recovery configuration.
- type str
- Resource type.
- auto
Failover String - Whether or not failover can be done automatically.
- failover
Policy String - How aggressive the automatic failover should be.
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- Location of the server that contains this disaster recovery configuration.
- logical
Server StringName - Logical name of the server.
- name String
- Resource name.
- partner
Logical StringServer Name - Logical name of the partner server.
- partner
Server StringId - Id of the partner server.
- role String
- The role of the current server in the disaster recovery configuration.
- status String
- The status of the disaster recovery configuration.
- type String
- Resource type.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:sql:DisasterRecoveryConfiguration Default /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-4799/providers/Microsoft.Sql/servers/sqlcrudtest-5961/databases/testdw/geoBackupPolicies/Default
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0