tencentcloud.MongodbInstanceBackup
Explore with Pulumi AI
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:
- Backup
Method double - 0:logical backup, 1:physical backup.
- Instance
Id string - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- Backup
Remark string - backup notes.
- Mongodb
Instance stringBackup Id - ID of the resource.
- Timeouts
Mongodb
Instance Backup Timeouts
- Backup
Method float64 - 0:logical backup, 1:physical backup.
- Instance
Id string - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- Backup
Remark string - backup notes.
- Mongodb
Instance stringBackup Id - ID of the resource.
- Timeouts
Mongodb
Instance Backup Timeouts Args
- backup
Method Double - 0:logical backup, 1:physical backup.
- instance
Id String - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- backup
Remark String - backup notes.
- mongodb
Instance StringBackup Id - ID of the resource.
- timeouts
Mongodb
Instance Backup Timeouts
- backup
Method number - 0:logical backup, 1:physical backup.
- instance
Id string - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- backup
Remark string - backup notes.
- mongodb
Instance stringBackup Id - ID of the resource.
- timeouts
Mongodb
Instance Backup Timeouts
- 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_ strbackup_ id - ID of the resource.
- timeouts
Mongodb
Instance Backup Timeouts Args
- backup
Method Number - 0:logical backup, 1:physical backup.
- instance
Id String - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- backup
Remark String - backup notes.
- mongodb
Instance StringBackup Id - 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.
- Backup
Method double - 0:logical backup, 1:physical backup.
- Backup
Remark string - backup notes.
- Instance
Id string - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- Mongodb
Instance stringBackup Id - ID of the resource.
- Timeouts
Mongodb
Instance Backup Timeouts
- Backup
Method float64 - 0:logical backup, 1:physical backup.
- Backup
Remark string - backup notes.
- Instance
Id string - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- Mongodb
Instance stringBackup Id - ID of the resource.
- Timeouts
Mongodb
Instance Backup Timeouts Args
- backup
Method Double - 0:logical backup, 1:physical backup.
- backup
Remark String - backup notes.
- instance
Id String - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- mongodb
Instance StringBackup Id - ID of the resource.
- timeouts
Mongodb
Instance Backup Timeouts
- backup
Method number - 0:logical backup, 1:physical backup.
- backup
Remark string - backup notes.
- instance
Id string - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- mongodb
Instance stringBackup Id - ID of the resource.
- timeouts
Mongodb
Instance Backup Timeouts
- 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_ strbackup_ id - ID of the resource.
- timeouts
Mongodb
Instance Backup Timeouts Args
- backup
Method Number - 0:logical backup, 1:physical backup.
- backup
Remark String - backup notes.
- instance
Id String - Instance ID, the format is: cmgo-9d0p6umb.Same as the instance ID displayed in the cloud database console page.
- mongodb
Instance StringBackup Id - 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.