volcengine.rds_mssql.Backup
Explore with Pulumi AI
Provides a resource to manage rds mssql backup
Example Usage
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",
});
});
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
})
}
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());
}
}
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.rds_mssql.Backup("foo", instance_id="mssql-40914121fd22")
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.rds_mssql.Backup("foo", {instanceId: "mssql-40914121fd22"});
resources:
foo:
type: volcengine:rds_mssql:Backup
properties:
instanceId: mssql-40914121fd22
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 string
- The unique name of the resource.
- args BackupArgs
- 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 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 string
- The unique name of the resource.
- args BackupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BackupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var backupResource = new Backup("backupResource", BackupArgs.builder()
.instanceId("string")
.backupMetas(BackupBackupMetaArgs.builder()
.dbName("string")
.build())
.backupType("string")
.build());
backup_resource = volcengine.rds_mssql.Backup("backupResource",
instance_id="string",
backup_metas=[{
"db_name": "string",
}],
backup_type="string")
const backupResource = new volcengine.rds_mssql.Backup("backupResource", {
instanceId: "string",
backupMetas: [{
dbName: "string",
}],
backupType: "string",
});
type: volcengine:rds_mssql:Backup
properties:
backupMetas:
- dbName: string
backupType: string
instanceId: string
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:
- Instance
Id string - The id of the instance.
- Backup
Metas List<BackupBackup Meta> - 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 string - Backup type. Currently only supports full backup, with a value of Full (default).
- Instance
Id string - The id of the instance.
- Backup
Metas []BackupBackup Meta Args - 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 string - Backup type. Currently only supports full backup, with a value of Full (default).
- instance
Id String - The id of the instance.
- backup
Metas List<BackupBackup Meta> - 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 String - Backup type. Currently only supports full backup, with a value of Full (default).
- instance
Id string - The id of the instance.
- backup
Metas BackupBackup Meta[] - 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 string - Backup type. Currently only supports full backup, with a value of Full (default).
- instance_
id str - The id of the instance.
- backup_
metas Sequence[BackupBackup Meta Args] - 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 str - Backup type. Currently only supports full backup, with a value of Full (default).
- instance
Id String - The id of the instance.
- backup
Metas 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.
- backup
Type 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:
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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Backup
Id string - The ID of the backup.
- Backup
Metas List<BackupBackup Meta> - 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 string - Backup type. Currently only supports full backup, with a value of Full (default).
- Instance
Id string - The id of the instance.
- Backup
Id string - The ID of the backup.
- Backup
Metas []BackupBackup Meta Args - 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 string - Backup type. Currently only supports full backup, with a value of Full (default).
- Instance
Id string - The id of the instance.
- backup
Id String - The ID of the backup.
- backup
Metas List<BackupBackup Meta> - 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 String - Backup type. Currently only supports full backup, with a value of Full (default).
- instance
Id String - The id of the instance.
- backup
Id string - The ID of the backup.
- backup
Metas BackupBackup Meta[] - 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 string - Backup type. Currently only supports full backup, with a value of Full (default).
- instance
Id string - The id of the instance.
- backup_
id str - The ID of the backup.
- backup_
metas Sequence[BackupBackup Meta Args] - 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 str - Backup type. Currently only supports full backup, with a value of Full (default).
- instance_
id str - The id of the instance.
- backup
Id String - The ID of the backup.
- backup
Metas 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.
- backup
Type String - Backup type. Currently only supports full backup, with a value of Full (default).
- instance
Id String - The id of the instance.
Supporting Types
BackupBackupMeta, BackupBackupMetaArgs
- Db
Name string - The name of the database.
- Db
Name string - The name of the database.
- db
Name String - The name of the database.
- db
Name string - The name of the database.
- db_
name str - The name of the database.
- db
Name 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
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.