1. Packages
  2. Volcengine
  3. API Docs
  4. rds_mssql
  5. Backup
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

volcengine.rds_mssql.Backup

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

    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=[volcengine.rds_mssql.BackupBackupMetaArgs(
            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

    The Backup resource accepts the following input properties:

    InstanceId string
    The id of the instance.
    BackupMetas 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 string
    Backup type. Currently only supports full backup, with a value of Full (default).
    InstanceId string
    The id of the instance.
    BackupMetas []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 string
    Backup type. Currently only supports full backup, with a value of Full (default).
    instanceId String
    The id of the instance.
    backupMetas 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 String
    Backup type. Currently only supports full backup, with a value of Full (default).
    instanceId string
    The id of the instance.
    backupMetas 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 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[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 str
    Backup type. Currently only supports full backup, with a value of Full (default).
    instanceId String
    The id of the instance.
    backupMetas 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 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)
    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.
    The following state arguments are supported:
    BackupId string
    The ID of the backup.
    BackupMetas 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 string
    Backup type. Currently only supports full backup, with a value of Full (default).
    InstanceId string
    The id of the instance.
    BackupId string
    The ID of the backup.
    BackupMetas []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 string
    Backup type. Currently only supports full backup, with a value of Full (default).
    InstanceId string
    The id of the instance.
    backupId String
    The ID of the backup.
    backupMetas 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 String
    Backup type. Currently only supports full backup, with a value of Full (default).
    instanceId String
    The id of the instance.
    backupId string
    The ID of the backup.
    backupMetas 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 string
    Backup type. Currently only supports full backup, with a value of Full (default).
    instanceId string
    The id of the instance.
    backup_id str
    The ID of the backup.
    backup_metas 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 str
    Backup type. Currently only supports full backup, with a value of Full (default).
    instance_id str
    The id of the instance.
    backupId String
    The ID of the backup.
    backupMetas 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 String
    Backup type. Currently only supports full backup, with a value of Full (default).
    instanceId String
    The id of the instance.

    Supporting Types

    BackupBackupMeta, BackupBackupMetaArgs

    DbName string
    The name of the database.
    DbName string
    The name of the database.
    dbName String
    The name of the database.
    dbName string
    The name of the database.
    db_name str
    The name of the database.
    dbName 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.
    volcengine logo
    Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine