1. Packages
  2. Volcengine
  3. API Docs
  4. rds_mssql
  5. Backup
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine

volcengine.rds_mssql.Backup

Explore with Pulumi AI

Provides a resource to manage rds mssql backup

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";

const foo = new volcengine.rds_mssql.Backup("foo", {instanceId: "mssql-40914121fd22"});
Copy
import pulumi
import pulumi_volcengine as volcengine

foo = volcengine.rds_mssql.Backup("foo", instance_id="mssql-40914121fd22")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/rds_mssql"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := rds_mssql.NewBackup(ctx, "foo", &rds_mssql.BackupArgs{
			InstanceId: pulumi.String("mssql-40914121fd22"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;

return await Deployment.RunAsync(() => 
{
    var foo = new Volcengine.Rds_mssql.Backup("foo", new()
    {
        InstanceId = "mssql-40914121fd22",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.rds_mssql.Backup;
import com.pulumi.volcengine.rds_mssql.BackupArgs;
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 foo = new Backup("foo", BackupArgs.builder()        
            .instanceId("mssql-40914121fd22")
            .build());

    }
}
Copy
resources:
  foo:
    type: volcengine:rds_mssql:Backup
    properties:
      instanceId: mssql-40914121fd22
Copy

Create Backup Resource

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

Constructor syntax

new Backup(name: string, args: BackupArgs, opts?: CustomResourceOptions);
@overload
def Backup(resource_name: str,
           args: BackupArgs,
           opts: Optional[ResourceOptions] = None)

@overload
def Backup(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           instance_id: Optional[str] = None,
           backup_metas: Optional[Sequence[BackupBackupMetaArgs]] = None,
           backup_type: Optional[str] = None)
func NewBackup(ctx *Context, name string, args BackupArgs, opts ...ResourceOption) (*Backup, error)
public Backup(string name, BackupArgs args, CustomResourceOptions? opts = null)
public Backup(String name, BackupArgs args)
public Backup(String name, BackupArgs args, CustomResourceOptions options)
type: volcengine:rds_mssql:Backup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. BackupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. BackupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. BackupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. BackupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. BackupArgs
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 backupResource = new Volcengine.Rds_mssql.Backup("backupResource", new()
{
    InstanceId = "string",
    BackupMetas = new[]
    {
        new Volcengine.Rds_mssql.Inputs.BackupBackupMetaArgs
        {
            DbName = "string",
        },
    },
    BackupType = "string",
});
Copy
example, err := rds_mssql.NewBackup(ctx, "backupResource", &rds_mssql.BackupArgs{
	InstanceId: pulumi.String("string"),
	BackupMetas: rds_mssql.BackupBackupMetaArray{
		&rds_mssql.BackupBackupMetaArgs{
			DbName: pulumi.String("string"),
		},
	},
	BackupType: pulumi.String("string"),
})
Copy
var backupResource = new Backup("backupResource", BackupArgs.builder()
    .instanceId("string")
    .backupMetas(BackupBackupMetaArgs.builder()
        .dbName("string")
        .build())
    .backupType("string")
    .build());
Copy
backup_resource = volcengine.rds_mssql.Backup("backupResource",
    instance_id="string",
    backup_metas=[{
        "db_name": "string",
    }],
    backup_type="string")
Copy
const backupResource = new volcengine.rds_mssql.Backup("backupResource", {
    instanceId: "string",
    backupMetas: [{
        dbName: "string",
    }],
    backupType: "string",
});
Copy
type: volcengine:rds_mssql:Backup
properties:
    backupMetas:
        - dbName: string
    backupType: string
    instanceId: string
Copy

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

InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The id of the instance.
BackupMetas Changes to this property will trigger replacement. List<BackupBackupMeta>
Backup repository information. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
BackupType Changes to this property will trigger replacement. string
Backup type. Currently only supports full backup, with a value of Full (default).
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The id of the instance.
BackupMetas Changes to this property will trigger replacement. []BackupBackupMetaArgs
Backup repository information. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
BackupType Changes to this property will trigger replacement. string
Backup type. Currently only supports full backup, with a value of Full (default).
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The id of the instance.
backupMetas Changes to this property will trigger replacement. List<BackupBackupMeta>
Backup repository information. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
backupType Changes to this property will trigger replacement. String
Backup type. Currently only supports full backup, with a value of Full (default).
instanceId
This property is required.
Changes to this property will trigger replacement.
string
The id of the instance.
backupMetas Changes to this property will trigger replacement. BackupBackupMeta[]
Backup repository information. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
backupType Changes to this property will trigger replacement. string
Backup type. Currently only supports full backup, with a value of Full (default).
instance_id
This property is required.
Changes to this property will trigger replacement.
str
The id of the instance.
backup_metas Changes to this property will trigger replacement. Sequence[BackupBackupMetaArgs]
Backup repository information. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
backup_type Changes to this property will trigger replacement. str
Backup type. Currently only supports full backup, with a value of Full (default).
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The id of the instance.
backupMetas Changes to this property will trigger replacement. List<Property Map>
Backup repository information. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
backupType Changes to this property will trigger replacement. String
Backup type. Currently only supports full backup, with a value of Full (default).

Outputs

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

BackupId string
The ID of the backup.
Id string
The provider-assigned unique ID for this managed resource.
BackupId string
The ID of the backup.
Id string
The provider-assigned unique ID for this managed resource.
backupId String
The ID of the backup.
id String
The provider-assigned unique ID for this managed resource.
backupId string
The ID of the backup.
id string
The provider-assigned unique ID for this managed resource.
backup_id str
The ID of the backup.
id str
The provider-assigned unique ID for this managed resource.
backupId String
The ID of the backup.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Backup Resource

Get an existing Backup 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?: BackupState, opts?: CustomResourceOptions): Backup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backup_id: Optional[str] = None,
        backup_metas: Optional[Sequence[BackupBackupMetaArgs]] = None,
        backup_type: Optional[str] = None,
        instance_id: Optional[str] = None) -> Backup
func GetBackup(ctx *Context, name string, id IDInput, state *BackupState, opts ...ResourceOption) (*Backup, error)
public static Backup Get(string name, Input<string> id, BackupState? state, CustomResourceOptions? opts = null)
public static Backup get(String name, Output<String> id, BackupState state, CustomResourceOptions options)
resources:  _:    type: volcengine:rds_mssql:Backup    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
BackupId string
The ID of the backup.
BackupMetas Changes to this property will trigger replacement. List<BackupBackupMeta>
Backup repository information. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
BackupType Changes to this property will trigger replacement. string
Backup type. Currently only supports full backup, with a value of Full (default).
InstanceId Changes to this property will trigger replacement. string
The id of the instance.
BackupId string
The ID of the backup.
BackupMetas Changes to this property will trigger replacement. []BackupBackupMetaArgs
Backup repository information. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
BackupType Changes to this property will trigger replacement. string
Backup type. Currently only supports full backup, with a value of Full (default).
InstanceId Changes to this property will trigger replacement. string
The id of the instance.
backupId String
The ID of the backup.
backupMetas Changes to this property will trigger replacement. List<BackupBackupMeta>
Backup repository information. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
backupType Changes to this property will trigger replacement. String
Backup type. Currently only supports full backup, with a value of Full (default).
instanceId Changes to this property will trigger replacement. String
The id of the instance.
backupId string
The ID of the backup.
backupMetas Changes to this property will trigger replacement. BackupBackupMeta[]
Backup repository information. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
backupType Changes to this property will trigger replacement. string
Backup type. Currently only supports full backup, with a value of Full (default).
instanceId Changes to this property will trigger replacement. string
The id of the instance.
backup_id str
The ID of the backup.
backup_metas Changes to this property will trigger replacement. Sequence[BackupBackupMetaArgs]
Backup repository information. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
backup_type Changes to this property will trigger replacement. str
Backup type. Currently only supports full backup, with a value of Full (default).
instance_id Changes to this property will trigger replacement. str
The id of the instance.
backupId String
The ID of the backup.
backupMetas Changes to this property will trigger replacement. List<Property Map>
Backup repository information. When importing resources, this attribute will not be imported. If this attribute is set, please use lifecycle and ignore_changes ignore changes in fields.
backupType Changes to this property will trigger replacement. String
Backup type. Currently only supports full backup, with a value of Full (default).
instanceId Changes to this property will trigger replacement. String
The id of the instance.

Supporting Types

BackupBackupMeta
, BackupBackupMetaArgs

DbName
This property is required.
Changes to this property will trigger replacement.
string
The name of the database.
DbName
This property is required.
Changes to this property will trigger replacement.
string
The name of the database.
dbName
This property is required.
Changes to this property will trigger replacement.
String
The name of the database.
dbName
This property is required.
Changes to this property will trigger replacement.
string
The name of the database.
db_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the database.
dbName
This property is required.
Changes to this property will trigger replacement.
String
The name of the database.

Import

Rds Mssql Backup can be imported using the id, e.g.

$ pulumi import volcengine:rds_mssql/backup:Backup default instanceId:backupId
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
volcengine volcengine/pulumi-volcengine
License
Apache-2.0
Notes
This Pulumi package is based on the volcengine Terraform Provider.