Azure Native

Pulumi Official
Package maintained by Pulumi
v1.67.0 published on Tuesday, Jul 12, 2022 by Pulumi

GeoBackupPolicy

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

Example Usage

Update geo backup policy

using Pulumi;
using AzureNative = Pulumi.AzureNative;

class MyStack : Stack
{
    public MyStack()
    {
        var geoBackupPolicy = new AzureNative.Sql.GeoBackupPolicy("geoBackupPolicy", new AzureNative.Sql.GeoBackupPolicyArgs
        {
            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/go/azure/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 java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

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 a GeoBackupPolicy Resource

new GeoBackupPolicy(name: string, args: GeoBackupPolicyArgs, opts?: CustomResourceOptions);
@overload
def GeoBackupPolicy(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    database_name: Optional[str] = None,
                    geo_backup_policy_name: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    server_name: Optional[str] = None,
                    state: Optional[GeoBackupPolicyState] = None)
@overload
def GeoBackupPolicy(resource_name: str,
                    args: GeoBackupPolicyArgs,
                    opts: Optional[ResourceOptions] = 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.

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.

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

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 

Package Details

Repository
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0