1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. MongodbInstanceBackup
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.MongodbInstanceBackup

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a mongodb instance_backup

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const instanceBackup = new tencentcloud.MongodbInstanceBackup("instanceBackup", {
        backupMethod: 0,
        backupRemark: "my backup",
        instanceId: "cmgo-9d0p6umb",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    instance_backup = tencentcloud.MongodbInstanceBackup("instanceBackup",
        backup_method=0,
        backup_remark="my backup",
        instance_id="cmgo-9d0p6umb")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewMongodbInstanceBackup(ctx, "instanceBackup", &tencentcloud.MongodbInstanceBackupArgs{
    			BackupMethod: pulumi.Float64(0),
    			BackupRemark: pulumi.String("my backup"),
    			InstanceId:   pulumi.String("cmgo-9d0p6umb"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var instanceBackup = new Tencentcloud.MongodbInstanceBackup("instanceBackup", new()
        {
            BackupMethod = 0,
            BackupRemark = "my backup",
            InstanceId = "cmgo-9d0p6umb",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.MongodbInstanceBackup;
    import com.pulumi.tencentcloud.MongodbInstanceBackupArgs;
    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 instanceBackup = new MongodbInstanceBackup("instanceBackup", MongodbInstanceBackupArgs.builder()
                .backupMethod(0)
                .backupRemark("my backup")
                .instanceId("cmgo-9d0p6umb")
                .build());
    
        }
    }
    
    resources:
      instanceBackup:
        type: tencentcloud:MongodbInstanceBackup
        properties:
          backupMethod: 0
          backupRemark: my backup
          instanceId: cmgo-9d0p6umb
    

    Create MongodbInstanceBackup Resource

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

    Constructor syntax

    new MongodbInstanceBackup(name: string, args: MongodbInstanceBackupArgs, opts?: CustomResourceOptions);
    @overload
    def MongodbInstanceBackup(resource_name: str,
                              args: MongodbInstanceBackupArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def MongodbInstanceBackup(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              backup_method: Optional[float] = None,
                              instance_id: Optional[str] = None,
                              backup_remark: Optional[str] = None,
                              mongodb_instance_backup_id: Optional[str] = None,
                              timeouts: Optional[MongodbInstanceBackupTimeoutsArgs] = None)
    func NewMongodbInstanceBackup(ctx *Context, name string, args MongodbInstanceBackupArgs, opts ...ResourceOption) (*MongodbInstanceBackup, error)
    public MongodbInstanceBackup(string name, MongodbInstanceBackupArgs args, CustomResourceOptions? opts = null)
    public MongodbInstanceBackup(String name, MongodbInstanceBackupArgs args)
    public MongodbInstanceBackup(String name, MongodbInstanceBackupArgs args, CustomResourceOptions options)
    
    type: tencentcloud:MongodbInstanceBackup
    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 MongodbInstanceBackupArgs
    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 MongodbInstanceBackupArgs
    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 MongodbInstanceBackupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MongodbInstanceBackupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MongodbInstanceBackupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    BackupMethod double
    0:logical backup, 1:physical backup.
    InstanceId string
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    BackupRemark string
    backup notes.
    MongodbInstanceBackupId string
    ID of the resource.
    Timeouts MongodbInstanceBackupTimeouts
    BackupMethod float64
    0:logical backup, 1:physical backup.
    InstanceId string
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    BackupRemark string
    backup notes.
    MongodbInstanceBackupId string
    ID of the resource.
    Timeouts MongodbInstanceBackupTimeoutsArgs
    backupMethod Double
    0:logical backup, 1:physical backup.
    instanceId String
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    backupRemark String
    backup notes.
    mongodbInstanceBackupId String
    ID of the resource.
    timeouts MongodbInstanceBackupTimeouts
    backupMethod number
    0:logical backup, 1:physical backup.
    instanceId string
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    backupRemark string
    backup notes.
    mongodbInstanceBackupId string
    ID of the resource.
    timeouts MongodbInstanceBackupTimeouts
    backup_method float
    0:logical backup, 1:physical backup.
    instance_id str
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    backup_remark str
    backup notes.
    mongodb_instance_backup_id str
    ID of the resource.
    timeouts MongodbInstanceBackupTimeoutsArgs
    backupMethod Number
    0:logical backup, 1:physical backup.
    instanceId String
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    backupRemark String
    backup notes.
    mongodbInstanceBackupId String
    ID of the resource.
    timeouts Property Map

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing MongodbInstanceBackup Resource

    Get an existing MongodbInstanceBackup 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?: MongodbInstanceBackupState, opts?: CustomResourceOptions): MongodbInstanceBackup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_method: Optional[float] = None,
            backup_remark: Optional[str] = None,
            instance_id: Optional[str] = None,
            mongodb_instance_backup_id: Optional[str] = None,
            timeouts: Optional[MongodbInstanceBackupTimeoutsArgs] = None) -> MongodbInstanceBackup
    func GetMongodbInstanceBackup(ctx *Context, name string, id IDInput, state *MongodbInstanceBackupState, opts ...ResourceOption) (*MongodbInstanceBackup, error)
    public static MongodbInstanceBackup Get(string name, Input<string> id, MongodbInstanceBackupState? state, CustomResourceOptions? opts = null)
    public static MongodbInstanceBackup get(String name, Output<String> id, MongodbInstanceBackupState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:MongodbInstanceBackup    get:      id: ${id}
    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:
    BackupMethod double
    0:logical backup, 1:physical backup.
    BackupRemark string
    backup notes.
    InstanceId string
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    MongodbInstanceBackupId string
    ID of the resource.
    Timeouts MongodbInstanceBackupTimeouts
    BackupMethod float64
    0:logical backup, 1:physical backup.
    BackupRemark string
    backup notes.
    InstanceId string
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    MongodbInstanceBackupId string
    ID of the resource.
    Timeouts MongodbInstanceBackupTimeoutsArgs
    backupMethod Double
    0:logical backup, 1:physical backup.
    backupRemark String
    backup notes.
    instanceId String
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    mongodbInstanceBackupId String
    ID of the resource.
    timeouts MongodbInstanceBackupTimeouts
    backupMethod number
    0:logical backup, 1:physical backup.
    backupRemark string
    backup notes.
    instanceId string
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    mongodbInstanceBackupId string
    ID of the resource.
    timeouts MongodbInstanceBackupTimeouts
    backup_method float
    0:logical backup, 1:physical backup.
    backup_remark str
    backup notes.
    instance_id str
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    mongodb_instance_backup_id str
    ID of the resource.
    timeouts MongodbInstanceBackupTimeoutsArgs
    backupMethod Number
    0:logical backup, 1:physical backup.
    backupRemark String
    backup notes.
    instanceId String
    Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
    mongodbInstanceBackupId String
    ID of the resource.
    timeouts Property Map

    Supporting Types

    MongodbInstanceBackupTimeouts, MongodbInstanceBackupTimeoutsArgs

    Create string
    Create string
    create String
    create string
    create str
    create String

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack