1. Registry
  2. Packages
  3. Ucloud Provider
  4. API Docs
  5. UmongodbBackup
Viewing docs for ucloud 1.49.0
published on Tuesday, Oct 27, 2026 by ucloud
ucloud
Viewing docs for ucloud 1.49.0
published on Tuesday, Oct 27, 2026 by ucloud

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ucloud from "@pulumi/ucloud";
    
    const example = new ucloud.UmongodbBackup("example", {
        availabilityZone: exampleUcloudUmongodbReplicaset.availabilityZone,
        clusterId: exampleUcloudUmongodbReplicaset.id,
        backupName: "tf-umongodb-backup",
    });
    
    import pulumi
    import pulumi_ucloud as ucloud
    
    example = ucloud.UmongodbBackup("example",
        availability_zone=example_ucloud_umongodb_replicaset["availabilityZone"],
        cluster_id=example_ucloud_umongodb_replicaset["id"],
        backup_name="tf-umongodb-backup")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ucloud/ucloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ucloud.NewUmongodbBackup(ctx, "example", &ucloud.UmongodbBackupArgs{
    			AvailabilityZone: pulumi.Any(exampleUcloudUmongodbReplicaset.AvailabilityZone),
    			ClusterId:        pulumi.Any(exampleUcloudUmongodbReplicaset.Id),
    			BackupName:       pulumi.String("tf-umongodb-backup"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ucloud = Pulumi.Ucloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Ucloud.UmongodbBackup("example", new()
        {
            AvailabilityZone = exampleUcloudUmongodbReplicaset.AvailabilityZone,
            ClusterId = exampleUcloudUmongodbReplicaset.Id,
            BackupName = "tf-umongodb-backup",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ucloud.UmongodbBackup;
    import com.pulumi.ucloud.UmongodbBackupArgs;
    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 example = new UmongodbBackup("example", UmongodbBackupArgs.builder()
                .availabilityZone(exampleUcloudUmongodbReplicaset.availabilityZone())
                .clusterId(exampleUcloudUmongodbReplicaset.id())
                .backupName("tf-umongodb-backup")
                .build());
    
        }
    }
    
    resources:
      example:
        type: ucloud:UmongodbBackup
        properties:
          availabilityZone: ${exampleUcloudUmongodbReplicaset.availabilityZone}
          clusterId: ${exampleUcloudUmongodbReplicaset.id}
          backupName: tf-umongodb-backup
    
    Example coming soon!
    

    Create UmongodbBackup Resource

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

    Constructor syntax

    new UmongodbBackup(name: string, args: UmongodbBackupArgs, opts?: CustomResourceOptions);
    @overload
    def UmongodbBackup(resource_name: str,
                       args: UmongodbBackupArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def UmongodbBackup(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       availability_zone: Optional[str] = None,
                       backup_name: Optional[str] = None,
                       cluster_id: Optional[str] = None,
                       timeouts: Optional[UmongodbBackupTimeoutsArgs] = None,
                       umongodb_backup_id: Optional[str] = None)
    func NewUmongodbBackup(ctx *Context, name string, args UmongodbBackupArgs, opts ...ResourceOption) (*UmongodbBackup, error)
    public UmongodbBackup(string name, UmongodbBackupArgs args, CustomResourceOptions? opts = null)
    public UmongodbBackup(String name, UmongodbBackupArgs args)
    public UmongodbBackup(String name, UmongodbBackupArgs args, CustomResourceOptions options)
    
    type: ucloud:UmongodbBackup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "ucloud_umongodb_backup" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args UmongodbBackupArgs
    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 UmongodbBackupArgs
    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 UmongodbBackupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UmongodbBackupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UmongodbBackupArgs
    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 umongodbBackupResource = new Ucloud.UmongodbBackup("umongodbBackupResource", new()
    {
        AvailabilityZone = "string",
        BackupName = "string",
        ClusterId = "string",
        Timeouts = new Ucloud.Inputs.UmongodbBackupTimeoutsArgs
        {
            Create = "string",
        },
        UmongodbBackupId = "string",
    });
    
    example, err := ucloud.NewUmongodbBackup(ctx, "umongodbBackupResource", &ucloud.UmongodbBackupArgs{
    	AvailabilityZone: pulumi.String("string"),
    	BackupName:       pulumi.String("string"),
    	ClusterId:        pulumi.String("string"),
    	Timeouts: &ucloud.UmongodbBackupTimeoutsArgs{
    		Create: pulumi.String("string"),
    	},
    	UmongodbBackupId: pulumi.String("string"),
    })
    
    resource "ucloud_umongodb_backup" "umongodbBackupResource" {
      lifecycle {
        create_before_destroy = true
      }
      availability_zone = "string"
      backup_name       = "string"
      cluster_id        = "string"
      _ {
        timeouts = {
          create = "string"
        }
      }
      umongodb_backup_id = "string"
    }
    
    var umongodbBackupResource = new UmongodbBackup("umongodbBackupResource", UmongodbBackupArgs.builder()
        .availabilityZone("string")
        .backupName("string")
        .clusterId("string")
        .timeouts(UmongodbBackupTimeoutsArgs.builder()
            .create("string")
            .build())
        .umongodbBackupId("string")
        .build());
    
    umongodb_backup_resource = ucloud.UmongodbBackup("umongodbBackupResource",
        availability_zone="string",
        backup_name="string",
        cluster_id="string",
        timeouts={
            "create": "string",
        },
        umongodb_backup_id="string")
    
    const umongodbBackupResource = new ucloud.UmongodbBackup("umongodbBackupResource", {
        availabilityZone: "string",
        backupName: "string",
        clusterId: "string",
        timeouts: {
            create: "string",
        },
        umongodbBackupId: "string",
    });
    
    type: ucloud:UmongodbBackup
    properties:
        availabilityZone: string
        backupName: string
        clusterId: string
        timeouts:
            create: string
        umongodbBackupId: string
    

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

    AvailabilityZone string
    Zone of the cluster. The backup list does not return this zone, so Read leaves the configured value in place.
    BackupName string
    Backup name.
    ClusterId string
    Cluster ID.
    Timeouts UmongodbBackupTimeouts
    UmongodbBackupId string
    Backup ID.
    AvailabilityZone string
    Zone of the cluster. The backup list does not return this zone, so Read leaves the configured value in place.
    BackupName string
    Backup name.
    ClusterId string
    Cluster ID.
    Timeouts UmongodbBackupTimeoutsArgs
    UmongodbBackupId string
    Backup ID.
    availability_zone string
    Zone of the cluster. The backup list does not return this zone, so Read leaves the configured value in place.
    backup_name string
    Backup name.
    cluster_id string
    Cluster ID.
    timeouts object
    umongodb_backup_id string
    Backup ID.
    availabilityZone String
    Zone of the cluster. The backup list does not return this zone, so Read leaves the configured value in place.
    backupName String
    Backup name.
    clusterId String
    Cluster ID.
    timeouts UmongodbBackupTimeouts
    umongodbBackupId String
    Backup ID.
    availabilityZone string
    Zone of the cluster. The backup list does not return this zone, so Read leaves the configured value in place.
    backupName string
    Backup name.
    clusterId string
    Cluster ID.
    timeouts UmongodbBackupTimeouts
    umongodbBackupId string
    Backup ID.
    availability_zone str
    Zone of the cluster. The backup list does not return this zone, so Read leaves the configured value in place.
    backup_name str
    Backup name.
    cluster_id str
    Cluster ID.
    timeouts UmongodbBackupTimeoutsArgs
    umongodb_backup_id str
    Backup ID.
    availabilityZone String
    Zone of the cluster. The backup list does not return this zone, so Read leaves the configured value in place.
    backupName String
    Backup name.
    clusterId String
    Cluster ID.
    timeouts Property Map
    umongodbBackupId String
    Backup ID.

    Outputs

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

    BackupSize double
    Backup size.
    BackupType string
    Backup type.
    EndTime double
    End time as a Unix timestamp.
    Id string
    The provider-assigned unique ID for this managed resource.
    StartTime double
    Start time as a Unix timestamp.
    State string
    Backup state, such as Backup_Success.
    BackupSize float64
    Backup size.
    BackupType string
    Backup type.
    EndTime float64
    End time as a Unix timestamp.
    Id string
    The provider-assigned unique ID for this managed resource.
    StartTime float64
    Start time as a Unix timestamp.
    State string
    Backup state, such as Backup_Success.
    backup_size number
    Backup size.
    backup_type string
    Backup type.
    end_time number
    End time as a Unix timestamp.
    id string
    The provider-assigned unique ID for this managed resource.
    start_time number
    Start time as a Unix timestamp.
    state string
    Backup state, such as Backup_Success.
    backupSize Double
    Backup size.
    backupType String
    Backup type.
    endTime Double
    End time as a Unix timestamp.
    id String
    The provider-assigned unique ID for this managed resource.
    startTime Double
    Start time as a Unix timestamp.
    state String
    Backup state, such as Backup_Success.
    backupSize number
    Backup size.
    backupType string
    Backup type.
    endTime number
    End time as a Unix timestamp.
    id string
    The provider-assigned unique ID for this managed resource.
    startTime number
    Start time as a Unix timestamp.
    state string
    Backup state, such as Backup_Success.
    backup_size float
    Backup size.
    backup_type str
    Backup type.
    end_time float
    End time as a Unix timestamp.
    id str
    The provider-assigned unique ID for this managed resource.
    start_time float
    Start time as a Unix timestamp.
    state str
    Backup state, such as Backup_Success.
    backupSize Number
    Backup size.
    backupType String
    Backup type.
    endTime Number
    End time as a Unix timestamp.
    id String
    The provider-assigned unique ID for this managed resource.
    startTime Number
    Start time as a Unix timestamp.
    state String
    Backup state, such as Backup_Success.

    Look up Existing UmongodbBackup Resource

    Get an existing UmongodbBackup 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?: UmongodbBackupState, opts?: CustomResourceOptions): UmongodbBackup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            availability_zone: Optional[str] = None,
            backup_name: Optional[str] = None,
            backup_size: Optional[float] = None,
            backup_type: Optional[str] = None,
            cluster_id: Optional[str] = None,
            end_time: Optional[float] = None,
            start_time: Optional[float] = None,
            state: Optional[str] = None,
            timeouts: Optional[UmongodbBackupTimeoutsArgs] = None,
            umongodb_backup_id: Optional[str] = None) -> UmongodbBackup
    func GetUmongodbBackup(ctx *Context, name string, id IDInput, state *UmongodbBackupState, opts ...ResourceOption) (*UmongodbBackup, error)
    public static UmongodbBackup Get(string name, Input<string> id, UmongodbBackupState? state, CustomResourceOptions? opts = null)
    public static UmongodbBackup get(String name, Output<String> id, UmongodbBackupState state, CustomResourceOptions options)
    resources:  _:    type: ucloud:UmongodbBackup    get:      id: ${id}
    import {
      to = ucloud_umongodb_backup.example
      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:
    AvailabilityZone string
    Zone of the cluster. The backup list does not return this zone, so Read leaves the configured value in place.
    BackupName string
    Backup name.
    BackupSize double
    Backup size.
    BackupType string
    Backup type.
    ClusterId string
    Cluster ID.
    EndTime double
    End time as a Unix timestamp.
    StartTime double
    Start time as a Unix timestamp.
    State string
    Backup state, such as Backup_Success.
    Timeouts UmongodbBackupTimeouts
    UmongodbBackupId string
    Backup ID.
    AvailabilityZone string
    Zone of the cluster. The backup list does not return this zone, so Read leaves the configured value in place.
    BackupName string
    Backup name.
    BackupSize float64
    Backup size.
    BackupType string
    Backup type.
    ClusterId string
    Cluster ID.
    EndTime float64
    End time as a Unix timestamp.
    StartTime float64
    Start time as a Unix timestamp.
    State string
    Backup state, such as Backup_Success.
    Timeouts UmongodbBackupTimeoutsArgs
    UmongodbBackupId string
    Backup ID.
    availability_zone string
    Zone of the cluster. The backup list does not return this zone, so Read leaves the configured value in place.
    backup_name string
    Backup name.
    backup_size number
    Backup size.
    backup_type string
    Backup type.
    cluster_id string
    Cluster ID.
    end_time number
    End time as a Unix timestamp.
    start_time number
    Start time as a Unix timestamp.
    state string
    Backup state, such as Backup_Success.
    timeouts object
    umongodb_backup_id string
    Backup ID.
    availabilityZone String
    Zone of the cluster. The backup list does not return this zone, so Read leaves the configured value in place.
    backupName String
    Backup name.
    backupSize Double
    Backup size.
    backupType String
    Backup type.
    clusterId String
    Cluster ID.
    endTime Double
    End time as a Unix timestamp.
    startTime Double
    Start time as a Unix timestamp.
    state String
    Backup state, such as Backup_Success.
    timeouts UmongodbBackupTimeouts
    umongodbBackupId String
    Backup ID.
    availabilityZone string
    Zone of the cluster. The backup list does not return this zone, so Read leaves the configured value in place.
    backupName string
    Backup name.
    backupSize number
    Backup size.
    backupType string
    Backup type.
    clusterId string
    Cluster ID.
    endTime number
    End time as a Unix timestamp.
    startTime number
    Start time as a Unix timestamp.
    state string
    Backup state, such as Backup_Success.
    timeouts UmongodbBackupTimeouts
    umongodbBackupId string
    Backup ID.
    availability_zone str
    Zone of the cluster. The backup list does not return this zone, so Read leaves the configured value in place.
    backup_name str
    Backup name.
    backup_size float
    Backup size.
    backup_type str
    Backup type.
    cluster_id str
    Cluster ID.
    end_time float
    End time as a Unix timestamp.
    start_time float
    Start time as a Unix timestamp.
    state str
    Backup state, such as Backup_Success.
    timeouts UmongodbBackupTimeoutsArgs
    umongodb_backup_id str
    Backup ID.
    availabilityZone String
    Zone of the cluster. The backup list does not return this zone, so Read leaves the configured value in place.
    backupName String
    Backup name.
    backupSize Number
    Backup size.
    backupType String
    Backup type.
    clusterId String
    Cluster ID.
    endTime Number
    End time as a Unix timestamp.
    startTime Number
    Start time as a Unix timestamp.
    state String
    Backup state, such as Backup_Success.
    timeouts Property Map
    umongodbBackupId String
    Backup ID.

    Supporting Types

    UmongodbBackupTimeouts, UmongodbBackupTimeoutsArgs

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

    Import

    List backup needs the cluster and zone, so the import ID is <availability_zone>/<cluster_id>/<backup_id>.

    $ pulumi import ucloud:index/umongodbBackup:UmongodbBackup example cn-bj2-05/umongodb-rs-abc/backup-id
    

    Backup_Stopped is a stopped backup, not a successful one. Create fails if the backup stops or fails. A sharded snapshot list collapses one batch onto a single backup ID, which can differ from the create response. The provider follows the listed ID with the same backup name. Sharded failed backups are omitted from that list, so a failed sharded backup waits until timeout.

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

    Package Details

    Repository
    ucloud ucloud/terraform-provider-ucloud
    License
    Notes
    This Pulumi package is based on the ucloud Terraform Provider.
    ucloud
    Viewing docs for ucloud 1.49.0
    published on Tuesday, Oct 27, 2026 by ucloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial