1. Packages
  2. Azure Native
  3. API Docs
  4. sql
  5. DisasterRecoveryConfiguration
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.33.0 published on Friday, Mar 22, 2024 by Pulumi

azure-native.sql.DisasterRecoveryConfiguration

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.33.0 published on Friday, Mar 22, 2024 by Pulumi

    Represents a disaster recovery configuration. Azure REST API version: 2014-04-01. Prior API version in Azure Native 1.x: 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 (
    	"github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
    	"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

    new DisasterRecoveryConfiguration(name: string, args: DisasterRecoveryConfigurationArgs, opts?: CustomResourceOptions);
    @overload
    def DisasterRecoveryConfiguration(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      disaster_recovery_configuration_name: Optional[str] = None,
                                      resource_group_name: Optional[str] = None,
                                      server_name: Optional[str] = None)
    @overload
    def DisasterRecoveryConfiguration(resource_name: str,
                                      args: DisasterRecoveryConfigurationArgs,
                                      opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    The DisasterRecoveryConfiguration resource accepts the following input properties:

    ResourceGroupName string
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    ServerName string
    The name of the server.
    DisasterRecoveryConfigurationName string
    The name of the disaster recovery configuration to be created/updated.
    ResourceGroupName string
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    ServerName string
    The name of the server.
    DisasterRecoveryConfigurationName string
    The name of the disaster recovery configuration to be created/updated.
    resourceGroupName String
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    serverName String
    The name of the server.
    disasterRecoveryConfigurationName String
    The name of the disaster recovery configuration to be created/updated.
    resourceGroupName string
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    serverName string
    The name of the server.
    disasterRecoveryConfigurationName string
    The name of the disaster recovery configuration to be created/updated.
    resource_group_name str
    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_configuration_name str
    The name of the disaster recovery configuration to be created/updated.
    resourceGroupName String
    The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
    serverName String
    The name of the server.
    disasterRecoveryConfigurationName String
    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:

    AutoFailover string
    Whether or not failover can be done automatically.
    FailoverPolicy 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.
    LogicalServerName string
    Logical name of the server.
    Name string
    Resource name.
    PartnerLogicalServerName string
    Logical name of the partner server.
    PartnerServerId string
    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.
    AutoFailover string
    Whether or not failover can be done automatically.
    FailoverPolicy 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.
    LogicalServerName string
    Logical name of the server.
    Name string
    Resource name.
    PartnerLogicalServerName string
    Logical name of the partner server.
    PartnerServerId string
    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.
    autoFailover String
    Whether or not failover can be done automatically.
    failoverPolicy 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.
    logicalServerName String
    Logical name of the server.
    name String
    Resource name.
    partnerLogicalServerName String
    Logical name of the partner server.
    partnerServerId String
    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.
    autoFailover string
    Whether or not failover can be done automatically.
    failoverPolicy 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.
    logicalServerName string
    Logical name of the server.
    name string
    Resource name.
    partnerLogicalServerName string
    Logical name of the partner server.
    partnerServerId string
    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_name str
    Logical name of the server.
    name str
    Resource name.
    partner_logical_server_name str
    Logical name of the partner server.
    partner_server_id str
    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.
    autoFailover String
    Whether or not failover can be done automatically.
    failoverPolicy 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.
    logicalServerName String
    Logical name of the server.
    name String
    Resource name.
    partnerLogicalServerName String
    Logical name of the partner server.
    partnerServerId String
    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/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/disasterRecoveryConfiguration/{disasterRecoveryConfigurationName} 
    

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.33.0 published on Friday, Mar 22, 2024 by Pulumi