1. Packages
  2. Azure Native v1
  3. API Docs
  4. sql
  5. GeoBackupPolicy
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.sql.GeoBackupPolicy

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    A database geo backup policy. API Version: 2014-04-01.

    Example Usage

    Update geo backup policy

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var geoBackupPolicy = new AzureNative.Sql.GeoBackupPolicy("geoBackupPolicy", new()
        {
            DatabaseName = "testdw",
            GeoBackupPolicyName = "Default",
            ResourceGroupName = "sqlcrudtest-4799",
            ServerName = "sqlcrudtest-5961",
            State = AzureNative.Sql.GeoBackupPolicyState.Enabled,
        });
    
    });
    
    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.NewGeoBackupPolicy(ctx, "geoBackupPolicy", &sql.GeoBackupPolicyArgs{
    			DatabaseName:        pulumi.String("testdw"),
    			GeoBackupPolicyName: pulumi.String("Default"),
    			ResourceGroupName:   pulumi.String("sqlcrudtest-4799"),
    			ServerName:          pulumi.String("sqlcrudtest-5961"),
    			State:               sql.GeoBackupPolicyStateEnabled,
    		})
    		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.GeoBackupPolicy;
    import com.pulumi.azurenative.sql.GeoBackupPolicyArgs;
    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 geoBackupPolicy = new GeoBackupPolicy("geoBackupPolicy", GeoBackupPolicyArgs.builder()        
                .databaseName("testdw")
                .geoBackupPolicyName("Default")
                .resourceGroupName("sqlcrudtest-4799")
                .serverName("sqlcrudtest-5961")
                .state("Enabled")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    geo_backup_policy = azure_native.sql.GeoBackupPolicy("geoBackupPolicy",
        database_name="testdw",
        geo_backup_policy_name="Default",
        resource_group_name="sqlcrudtest-4799",
        server_name="sqlcrudtest-5961",
        state=azure_native.sql.GeoBackupPolicyState.ENABLED)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const geoBackupPolicy = new azure_native.sql.GeoBackupPolicy("geoBackupPolicy", {
        databaseName: "testdw",
        geoBackupPolicyName: "Default",
        resourceGroupName: "sqlcrudtest-4799",
        serverName: "sqlcrudtest-5961",
        state: azure_native.sql.GeoBackupPolicyState.Enabled,
    });
    
    resources:
      geoBackupPolicy:
        type: azure-native:sql:GeoBackupPolicy
        properties:
          databaseName: testdw
          geoBackupPolicyName: Default
          resourceGroupName: sqlcrudtest-4799
          serverName: sqlcrudtest-5961
          state: Enabled
    

    Create GeoBackupPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new GeoBackupPolicy(name: string, args: GeoBackupPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def GeoBackupPolicy(resource_name: str,
                        args: GeoBackupPolicyArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def GeoBackupPolicy(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        database_name: Optional[str] = None,
                        resource_group_name: Optional[str] = None,
                        server_name: Optional[str] = None,
                        state: Optional[GeoBackupPolicyState] = None,
                        geo_backup_policy_name: Optional[str] = None)
    func NewGeoBackupPolicy(ctx *Context, name string, args GeoBackupPolicyArgs, opts ...ResourceOption) (*GeoBackupPolicy, error)
    public GeoBackupPolicy(string name, GeoBackupPolicyArgs args, CustomResourceOptions? opts = null)
    public GeoBackupPolicy(String name, GeoBackupPolicyArgs args)
    public GeoBackupPolicy(String name, GeoBackupPolicyArgs args, CustomResourceOptions options)
    
    type: azure-native:sql:GeoBackupPolicy
    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 GeoBackupPolicyArgs
    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 GeoBackupPolicyArgs
    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 GeoBackupPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GeoBackupPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GeoBackupPolicyArgs
    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 geoBackupPolicyResource = new AzureNative.Sql.GeoBackupPolicy("geoBackupPolicyResource", new()
    {
        DatabaseName = "string",
        ResourceGroupName = "string",
        ServerName = "string",
        State = "Disabled",
        GeoBackupPolicyName = "string",
    });
    
    example, err := sql.NewGeoBackupPolicy(ctx, "geoBackupPolicyResource", &sql.GeoBackupPolicyArgs{
    	DatabaseName:        "string",
    	ResourceGroupName:   "string",
    	ServerName:          "string",
    	State:               "Disabled",
    	GeoBackupPolicyName: "string",
    })
    
    var geoBackupPolicyResource = new GeoBackupPolicy("geoBackupPolicyResource", GeoBackupPolicyArgs.builder()
        .databaseName("string")
        .resourceGroupName("string")
        .serverName("string")
        .state("Disabled")
        .geoBackupPolicyName("string")
        .build());
    
    geo_backup_policy_resource = azure_native.sql.GeoBackupPolicy("geoBackupPolicyResource",
        database_name=string,
        resource_group_name=string,
        server_name=string,
        state=Disabled,
        geo_backup_policy_name=string)
    
    const geoBackupPolicyResource = new azure_native.sql.GeoBackupPolicy("geoBackupPolicyResource", {
        databaseName: "string",
        resourceGroupName: "string",
        serverName: "string",
        state: "Disabled",
        geoBackupPolicyName: "string",
    });
    
    type: azure-native:sql:GeoBackupPolicy
    properties:
        databaseName: string
        geoBackupPolicyName: string
        resourceGroupName: string
        serverName: string
        state: Disabled
    

    GeoBackupPolicy 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 GeoBackupPolicy resource accepts the following input properties:

    DatabaseName string
    The name of the database.
    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.
    State Pulumi.AzureNative.Sql.GeoBackupPolicyState
    The state of the geo backup policy.
    GeoBackupPolicyName string
    The name of the geo backup policy.
    DatabaseName string
    The name of the database.
    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.
    State GeoBackupPolicyStateEnum
    The state of the geo backup policy.
    GeoBackupPolicyName string
    The name of the geo backup policy.
    databaseName String
    The name of the database.
    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.
    state GeoBackupPolicyState
    The state of the geo backup policy.
    geoBackupPolicyName String
    The name of the geo backup policy.
    databaseName string
    The name of the database.
    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.
    state GeoBackupPolicyState
    The state of the geo backup policy.
    geoBackupPolicyName string
    The name of the geo backup policy.
    database_name str
    The name of the database.
    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.
    state GeoBackupPolicyState
    The state of the geo backup policy.
    geo_backup_policy_name str
    The name of the geo backup policy.
    databaseName String
    The name of the database.
    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.
    state "Disabled" | "Enabled"
    The state of the geo backup policy.
    geoBackupPolicyName String
    The name of the geo backup policy.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the GeoBackupPolicy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    Kind of geo backup policy. This is metadata used for the Azure portal experience.
    Location string
    Backup policy location.
    Name string
    Resource name.
    StorageType string
    The storage type of the geo backup policy.
    Type string
    Resource type.
    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    Kind of geo backup policy. This is metadata used for the Azure portal experience.
    Location string
    Backup policy location.
    Name string
    Resource name.
    StorageType string
    The storage type of the geo backup policy.
    Type string
    Resource type.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    Kind of geo backup policy. This is metadata used for the Azure portal experience.
    location String
    Backup policy location.
    name String
    Resource name.
    storageType String
    The storage type of the geo backup policy.
    type String
    Resource type.
    id string
    The provider-assigned unique ID for this managed resource.
    kind string
    Kind of geo backup policy. This is metadata used for the Azure portal experience.
    location string
    Backup policy location.
    name string
    Resource name.
    storageType string
    The storage type of the geo backup policy.
    type string
    Resource type.
    id str
    The provider-assigned unique ID for this managed resource.
    kind str
    Kind of geo backup policy. This is metadata used for the Azure portal experience.
    location str
    Backup policy location.
    name str
    Resource name.
    storage_type str
    The storage type of the geo backup policy.
    type str
    Resource type.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    Kind of geo backup policy. This is metadata used for the Azure portal experience.
    location String
    Backup policy location.
    name String
    Resource name.
    storageType String
    The storage type of the geo backup policy.
    type String
    Resource type.

    Supporting Types

    GeoBackupPolicyState, GeoBackupPolicyStateArgs

    Disabled
    Disabled
    Enabled
    Enabled
    GeoBackupPolicyStateDisabled
    Disabled
    GeoBackupPolicyStateEnabled
    Enabled
    Disabled
    Disabled
    Enabled
    Enabled
    Disabled
    Disabled
    Enabled
    Enabled
    DISABLED
    Disabled
    ENABLED
    Enabled
    "Disabled"
    Disabled
    "Enabled"
    Enabled

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:sql:GeoBackupPolicy 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
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi