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

tencentcloud.MongodbInstanceBackupRule

Explore with Pulumi AI

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

    Provides a resource to create mongodb instance backup rule

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    resources:
      backupRule:
        type: tencentcloud:MongodbInstanceBackup
        properties:
          backupMethod: 0
          backupTime: 10
          instanceId: cmgo-xxxxxx
    

    Create MongodbInstanceBackupRule Resource

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

    Constructor syntax

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

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

    BackupMethod double
    Set automatic backup method. Valid values:

    • 0: Logical backup;
    • 1: Physical backup;
    • 3: Snapshot backup (supported only in cloud disk version).
    BackupTime double
    Set the start time for automatic backup. The value range is: [0,23]. For example, setting this parameter to 2 means that backup starts at 02:00.
    InstanceId string
    Instance id.
    BackupRetentionPeriod double
    Specify the number of days to save backup data. The default is 7 days, and the support settings are 7, 30, 90, 180, 365.
    MongodbInstanceBackupRuleId string
    ID of the resource.
    BackupMethod float64
    Set automatic backup method. Valid values:

    • 0: Logical backup;
    • 1: Physical backup;
    • 3: Snapshot backup (supported only in cloud disk version).
    BackupTime float64
    Set the start time for automatic backup. The value range is: [0,23]. For example, setting this parameter to 2 means that backup starts at 02:00.
    InstanceId string
    Instance id.
    BackupRetentionPeriod float64
    Specify the number of days to save backup data. The default is 7 days, and the support settings are 7, 30, 90, 180, 365.
    MongodbInstanceBackupRuleId string
    ID of the resource.
    backupMethod Double
    Set automatic backup method. Valid values:

    • 0: Logical backup;
    • 1: Physical backup;
    • 3: Snapshot backup (supported only in cloud disk version).
    backupTime Double
    Set the start time for automatic backup. The value range is: [0,23]. For example, setting this parameter to 2 means that backup starts at 02:00.
    instanceId String
    Instance id.
    backupRetentionPeriod Double
    Specify the number of days to save backup data. The default is 7 days, and the support settings are 7, 30, 90, 180, 365.
    mongodbInstanceBackupRuleId String
    ID of the resource.
    backupMethod number
    Set automatic backup method. Valid values:

    • 0: Logical backup;
    • 1: Physical backup;
    • 3: Snapshot backup (supported only in cloud disk version).
    backupTime number
    Set the start time for automatic backup. The value range is: [0,23]. For example, setting this parameter to 2 means that backup starts at 02:00.
    instanceId string
    Instance id.
    backupRetentionPeriod number
    Specify the number of days to save backup data. The default is 7 days, and the support settings are 7, 30, 90, 180, 365.
    mongodbInstanceBackupRuleId string
    ID of the resource.
    backup_method float
    Set automatic backup method. Valid values:

    • 0: Logical backup;
    • 1: Physical backup;
    • 3: Snapshot backup (supported only in cloud disk version).
    backup_time float
    Set the start time for automatic backup. The value range is: [0,23]. For example, setting this parameter to 2 means that backup starts at 02:00.
    instance_id str
    Instance id.
    backup_retention_period float
    Specify the number of days to save backup data. The default is 7 days, and the support settings are 7, 30, 90, 180, 365.
    mongodb_instance_backup_rule_id str
    ID of the resource.
    backupMethod Number
    Set automatic backup method. Valid values:

    • 0: Logical backup;
    • 1: Physical backup;
    • 3: Snapshot backup (supported only in cloud disk version).
    backupTime Number
    Set the start time for automatic backup. The value range is: [0,23]. For example, setting this parameter to 2 means that backup starts at 02:00.
    instanceId String
    Instance id.
    backupRetentionPeriod Number
    Specify the number of days to save backup data. The default is 7 days, and the support settings are 7, 30, 90, 180, 365.
    mongodbInstanceBackupRuleId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MongodbInstanceBackupRule 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 MongodbInstanceBackupRule Resource

    Get an existing MongodbInstanceBackupRule 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?: MongodbInstanceBackupRuleState, opts?: CustomResourceOptions): MongodbInstanceBackupRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_method: Optional[float] = None,
            backup_retention_period: Optional[float] = None,
            backup_time: Optional[float] = None,
            instance_id: Optional[str] = None,
            mongodb_instance_backup_rule_id: Optional[str] = None) -> MongodbInstanceBackupRule
    func GetMongodbInstanceBackupRule(ctx *Context, name string, id IDInput, state *MongodbInstanceBackupRuleState, opts ...ResourceOption) (*MongodbInstanceBackupRule, error)
    public static MongodbInstanceBackupRule Get(string name, Input<string> id, MongodbInstanceBackupRuleState? state, CustomResourceOptions? opts = null)
    public static MongodbInstanceBackupRule get(String name, Output<String> id, MongodbInstanceBackupRuleState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:MongodbInstanceBackupRule    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
    Set automatic backup method. Valid values:

    • 0: Logical backup;
    • 1: Physical backup;
    • 3: Snapshot backup (supported only in cloud disk version).
    BackupRetentionPeriod double
    Specify the number of days to save backup data. The default is 7 days, and the support settings are 7, 30, 90, 180, 365.
    BackupTime double
    Set the start time for automatic backup. The value range is: [0,23]. For example, setting this parameter to 2 means that backup starts at 02:00.
    InstanceId string
    Instance id.
    MongodbInstanceBackupRuleId string
    ID of the resource.
    BackupMethod float64
    Set automatic backup method. Valid values:

    • 0: Logical backup;
    • 1: Physical backup;
    • 3: Snapshot backup (supported only in cloud disk version).
    BackupRetentionPeriod float64
    Specify the number of days to save backup data. The default is 7 days, and the support settings are 7, 30, 90, 180, 365.
    BackupTime float64
    Set the start time for automatic backup. The value range is: [0,23]. For example, setting this parameter to 2 means that backup starts at 02:00.
    InstanceId string
    Instance id.
    MongodbInstanceBackupRuleId string
    ID of the resource.
    backupMethod Double
    Set automatic backup method. Valid values:

    • 0: Logical backup;
    • 1: Physical backup;
    • 3: Snapshot backup (supported only in cloud disk version).
    backupRetentionPeriod Double
    Specify the number of days to save backup data. The default is 7 days, and the support settings are 7, 30, 90, 180, 365.
    backupTime Double
    Set the start time for automatic backup. The value range is: [0,23]. For example, setting this parameter to 2 means that backup starts at 02:00.
    instanceId String
    Instance id.
    mongodbInstanceBackupRuleId String
    ID of the resource.
    backupMethod number
    Set automatic backup method. Valid values:

    • 0: Logical backup;
    • 1: Physical backup;
    • 3: Snapshot backup (supported only in cloud disk version).
    backupRetentionPeriod number
    Specify the number of days to save backup data. The default is 7 days, and the support settings are 7, 30, 90, 180, 365.
    backupTime number
    Set the start time for automatic backup. The value range is: [0,23]. For example, setting this parameter to 2 means that backup starts at 02:00.
    instanceId string
    Instance id.
    mongodbInstanceBackupRuleId string
    ID of the resource.
    backup_method float
    Set automatic backup method. Valid values:

    • 0: Logical backup;
    • 1: Physical backup;
    • 3: Snapshot backup (supported only in cloud disk version).
    backup_retention_period float
    Specify the number of days to save backup data. The default is 7 days, and the support settings are 7, 30, 90, 180, 365.
    backup_time float
    Set the start time for automatic backup. The value range is: [0,23]. For example, setting this parameter to 2 means that backup starts at 02:00.
    instance_id str
    Instance id.
    mongodb_instance_backup_rule_id str
    ID of the resource.
    backupMethod Number
    Set automatic backup method. Valid values:

    • 0: Logical backup;
    • 1: Physical backup;
    • 3: Snapshot backup (supported only in cloud disk version).
    backupRetentionPeriod Number
    Specify the number of days to save backup data. The default is 7 days, and the support settings are 7, 30, 90, 180, 365.
    backupTime Number
    Set the start time for automatic backup. The value range is: [0,23]. For example, setting this parameter to 2 means that backup starts at 02:00.
    instanceId String
    Instance id.
    mongodbInstanceBackupRuleId String
    ID of the resource.

    Import

    mongodb instance backup rule can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/mongodbInstanceBackupRule:MongodbInstanceBackupRule backup_rule ${instanceId}
    

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

    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