volcengine.rds_mysql.Backup
Explore with Pulumi AI
Provides a resource to manage rds mysql backup
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.rds_mysql.Backup("foo", {
backupMetas: [{
dbName: "order",
}],
backupMethod: "Logical",
instanceId: "mysql-c8c3f45c4b07",
});
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.rds_mysql.Backup("foo",
backup_metas=[volcengine.rds_mysql.BackupBackupMetaArgs(
db_name="order",
)],
backup_method="Logical",
instance_id="mysql-c8c3f45c4b07")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/rds_mysql"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rds_mysql.NewBackup(ctx, "foo", &rds_mysql.BackupArgs{
BackupMetas: rds_mysql.BackupBackupMetaArray{
&rds_mysql.BackupBackupMetaArgs{
DbName: pulumi.String("order"),
},
},
BackupMethod: pulumi.String("Logical"),
InstanceId: pulumi.String("mysql-c8c3f45c4b07"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Rds_mysql.Backup("foo", new()
{
BackupMetas = new[]
{
new Volcengine.Rds_mysql.Inputs.BackupBackupMetaArgs
{
DbName = "order",
},
},
BackupMethod = "Logical",
InstanceId = "mysql-c8c3f45c4b07",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.rds_mysql.Backup;
import com.pulumi.volcengine.rds_mysql.BackupArgs;
import com.pulumi.volcengine.rds_mysql.inputs.BackupBackupMetaArgs;
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()
.backupMetas(BackupBackupMetaArgs.builder()
.dbName("order")
.build())
.backupMethod("Logical")
.instanceId("mysql-c8c3f45c4b07")
.build());
}
}
resources:
foo:
type: volcengine:rds_mysql:Backup
properties:
backupMetas:
- dbName: order
# backup_type = "Full"
backupMethod: Logical
instanceId: mysql-c8c3f45c4b07
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_method: Optional[str] = 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_mysql: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 examplebackupResourceResourceFromRds_mysqlbackup = new Volcengine.Rds_mysql.Backup("examplebackupResourceResourceFromRds_mysqlbackup", new()
{
InstanceId = "string",
BackupMetas = new[]
{
new Volcengine.Rds_mysql.Inputs.BackupBackupMetaArgs
{
DbName = "string",
TableNames = new[]
{
"string",
},
},
},
BackupMethod = "string",
BackupType = "string",
});
example, err := rds_mysql.NewBackup(ctx, "examplebackupResourceResourceFromRds_mysqlbackup", &rds_mysql.BackupArgs{
InstanceId: pulumi.String("string"),
BackupMetas: rds_mysql.BackupBackupMetaArray{
&rds_mysql.BackupBackupMetaArgs{
DbName: pulumi.String("string"),
TableNames: pulumi.StringArray{
pulumi.String("string"),
},
},
},
BackupMethod: pulumi.String("string"),
BackupType: pulumi.String("string"),
})
var examplebackupResourceResourceFromRds_mysqlbackup = new com.pulumi.volcengine.rds_mysql.Backup("examplebackupResourceResourceFromRds_mysqlbackup", com.pulumi.volcengine.rds_mysql.BackupArgs.builder()
.instanceId("string")
.backupMetas(BackupBackupMetaArgs.builder()
.dbName("string")
.tableNames("string")
.build())
.backupMethod("string")
.backupType("string")
.build());
examplebackup_resource_resource_from_rds_mysqlbackup = volcengine.rds_mysql.Backup("examplebackupResourceResourceFromRds_mysqlbackup",
instance_id="string",
backup_metas=[{
"db_name": "string",
"table_names": ["string"],
}],
backup_method="string",
backup_type="string")
const examplebackupResourceResourceFromRds_mysqlbackup = new volcengine.rds_mysql.Backup("examplebackupResourceResourceFromRds_mysqlbackup", {
instanceId: "string",
backupMetas: [{
dbName: "string",
tableNames: ["string"],
}],
backupMethod: "string",
backupType: "string",
});
type: volcengine:rds_mysql:Backup
properties:
backupMetas:
- dbName: string
tableNames:
- string
backupMethod: 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Backup resource accepts the following input properties:
- Instance
Id string - The id of the instance.
- Backup
Metas List<BackupBackup Meta> - When creating a library table backup of logical backup type, it is used to specify the library table information to be backed up. Prerequisite: When the value of BackupMethod is Logical, and the BackupType field is not passed. Mutual exclusion situation: When the value of the BackupType field is DumpAll, this field is not effective. Quantity limit: When creating a specified library table backup, the upper limit of the number of libraries is 5000, and the upper limit of the number of tables in each library is 5000.
- Backup
Method string - Backup method. Value range: Full, full backup under physical backup type. Default value. DumpAll: full database backup under logical backup type. Prerequisite: If you need to create a full database backup of logical backup type, that is, when the value of BackupType is DumpAll, the backup type should be set to logical backup, that is, the value of BackupMethod should be Logical. If you need to create a database table backup of logical backup type, you do not need to pass in this field. You only need to specify the database and table to be backed up in the BackupMeta field.
- Backup
Type string - Backup type. Currently, only full backup is supported. The value is Full.
- Instance
Id string - The id of the instance.
- Backup
Metas []BackupBackup Meta Args - When creating a library table backup of logical backup type, it is used to specify the library table information to be backed up. Prerequisite: When the value of BackupMethod is Logical, and the BackupType field is not passed. Mutual exclusion situation: When the value of the BackupType field is DumpAll, this field is not effective. Quantity limit: When creating a specified library table backup, the upper limit of the number of libraries is 5000, and the upper limit of the number of tables in each library is 5000.
- Backup
Method string - Backup method. Value range: Full, full backup under physical backup type. Default value. DumpAll: full database backup under logical backup type. Prerequisite: If you need to create a full database backup of logical backup type, that is, when the value of BackupType is DumpAll, the backup type should be set to logical backup, that is, the value of BackupMethod should be Logical. If you need to create a database table backup of logical backup type, you do not need to pass in this field. You only need to specify the database and table to be backed up in the BackupMeta field.
- Backup
Type string - Backup type. Currently, only full backup is supported. The value is Full.
- instance
Id String - The id of the instance.
- backup
Metas List<BackupBackup Meta> - When creating a library table backup of logical backup type, it is used to specify the library table information to be backed up. Prerequisite: When the value of BackupMethod is Logical, and the BackupType field is not passed. Mutual exclusion situation: When the value of the BackupType field is DumpAll, this field is not effective. Quantity limit: When creating a specified library table backup, the upper limit of the number of libraries is 5000, and the upper limit of the number of tables in each library is 5000.
- backup
Method String - Backup method. Value range: Full, full backup under physical backup type. Default value. DumpAll: full database backup under logical backup type. Prerequisite: If you need to create a full database backup of logical backup type, that is, when the value of BackupType is DumpAll, the backup type should be set to logical backup, that is, the value of BackupMethod should be Logical. If you need to create a database table backup of logical backup type, you do not need to pass in this field. You only need to specify the database and table to be backed up in the BackupMeta field.
- backup
Type String - Backup type. Currently, only full backup is supported. The value is Full.
- instance
Id string - The id of the instance.
- backup
Metas BackupBackup Meta[] - When creating a library table backup of logical backup type, it is used to specify the library table information to be backed up. Prerequisite: When the value of BackupMethod is Logical, and the BackupType field is not passed. Mutual exclusion situation: When the value of the BackupType field is DumpAll, this field is not effective. Quantity limit: When creating a specified library table backup, the upper limit of the number of libraries is 5000, and the upper limit of the number of tables in each library is 5000.
- backup
Method string - Backup method. Value range: Full, full backup under physical backup type. Default value. DumpAll: full database backup under logical backup type. Prerequisite: If you need to create a full database backup of logical backup type, that is, when the value of BackupType is DumpAll, the backup type should be set to logical backup, that is, the value of BackupMethod should be Logical. If you need to create a database table backup of logical backup type, you do not need to pass in this field. You only need to specify the database and table to be backed up in the BackupMeta field.
- backup
Type string - Backup type. Currently, only full backup is supported. The value is Full.
- instance_
id str - The id of the instance.
- backup_
metas Sequence[BackupBackup Meta Args] - When creating a library table backup of logical backup type, it is used to specify the library table information to be backed up. Prerequisite: When the value of BackupMethod is Logical, and the BackupType field is not passed. Mutual exclusion situation: When the value of the BackupType field is DumpAll, this field is not effective. Quantity limit: When creating a specified library table backup, the upper limit of the number of libraries is 5000, and the upper limit of the number of tables in each library is 5000.
- backup_
method str - Backup method. Value range: Full, full backup under physical backup type. Default value. DumpAll: full database backup under logical backup type. Prerequisite: If you need to create a full database backup of logical backup type, that is, when the value of BackupType is DumpAll, the backup type should be set to logical backup, that is, the value of BackupMethod should be Logical. If you need to create a database table backup of logical backup type, you do not need to pass in this field. You only need to specify the database and table to be backed up in the BackupMeta field.
- backup_
type str - Backup type. Currently, only full backup is supported. The value is Full.
- instance
Id String - The id of the instance.
- backup
Metas List<Property Map> - When creating a library table backup of logical backup type, it is used to specify the library table information to be backed up. Prerequisite: When the value of BackupMethod is Logical, and the BackupType field is not passed. Mutual exclusion situation: When the value of the BackupType field is DumpAll, this field is not effective. Quantity limit: When creating a specified library table backup, the upper limit of the number of libraries is 5000, and the upper limit of the number of tables in each library is 5000.
- backup
Method String - Backup method. Value range: Full, full backup under physical backup type. Default value. DumpAll: full database backup under logical backup type. Prerequisite: If you need to create a full database backup of logical backup type, that is, when the value of BackupType is DumpAll, the backup type should be set to logical backup, that is, the value of BackupMethod should be Logical. If you need to create a database table backup of logical backup type, you do not need to pass in this field. You only need to specify the database and table to be backed up in the BackupMeta field.
- backup
Type String - Backup type. Currently, only full backup is supported. The value is Full.
Outputs
All input properties are implicitly available as output properties. Additionally, the Backup resource produces the following output properties:
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_method: Optional[str] = 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)
resources: _: type: volcengine:rds_mysql:Backup 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
Id string - The id of the backup.
- Backup
Metas List<BackupBackup Meta> - When creating a library table backup of logical backup type, it is used to specify the library table information to be backed up. Prerequisite: When the value of BackupMethod is Logical, and the BackupType field is not passed. Mutual exclusion situation: When the value of the BackupType field is DumpAll, this field is not effective. Quantity limit: When creating a specified library table backup, the upper limit of the number of libraries is 5000, and the upper limit of the number of tables in each library is 5000.
- Backup
Method string - Backup method. Value range: Full, full backup under physical backup type. Default value. DumpAll: full database backup under logical backup type. Prerequisite: If you need to create a full database backup of logical backup type, that is, when the value of BackupType is DumpAll, the backup type should be set to logical backup, that is, the value of BackupMethod should be Logical. If you need to create a database table backup of logical backup type, you do not need to pass in this field. You only need to specify the database and table to be backed up in the BackupMeta field.
- Backup
Type string - Backup type. Currently, only full backup is supported. The value is Full.
- Instance
Id string - The id of the instance.
- Backup
Id string - The id of the backup.
- Backup
Metas []BackupBackup Meta Args - When creating a library table backup of logical backup type, it is used to specify the library table information to be backed up. Prerequisite: When the value of BackupMethod is Logical, and the BackupType field is not passed. Mutual exclusion situation: When the value of the BackupType field is DumpAll, this field is not effective. Quantity limit: When creating a specified library table backup, the upper limit of the number of libraries is 5000, and the upper limit of the number of tables in each library is 5000.
- Backup
Method string - Backup method. Value range: Full, full backup under physical backup type. Default value. DumpAll: full database backup under logical backup type. Prerequisite: If you need to create a full database backup of logical backup type, that is, when the value of BackupType is DumpAll, the backup type should be set to logical backup, that is, the value of BackupMethod should be Logical. If you need to create a database table backup of logical backup type, you do not need to pass in this field. You only need to specify the database and table to be backed up in the BackupMeta field.
- Backup
Type string - Backup type. Currently, only full backup is supported. The value is Full.
- Instance
Id string - The id of the instance.
- backup
Id String - The id of the backup.
- backup
Metas List<BackupBackup Meta> - When creating a library table backup of logical backup type, it is used to specify the library table information to be backed up. Prerequisite: When the value of BackupMethod is Logical, and the BackupType field is not passed. Mutual exclusion situation: When the value of the BackupType field is DumpAll, this field is not effective. Quantity limit: When creating a specified library table backup, the upper limit of the number of libraries is 5000, and the upper limit of the number of tables in each library is 5000.
- backup
Method String - Backup method. Value range: Full, full backup under physical backup type. Default value. DumpAll: full database backup under logical backup type. Prerequisite: If you need to create a full database backup of logical backup type, that is, when the value of BackupType is DumpAll, the backup type should be set to logical backup, that is, the value of BackupMethod should be Logical. If you need to create a database table backup of logical backup type, you do not need to pass in this field. You only need to specify the database and table to be backed up in the BackupMeta field.
- backup
Type String - Backup type. Currently, only full backup is supported. The value is Full.
- instance
Id String - The id of the instance.
- backup
Id string - The id of the backup.
- backup
Metas BackupBackup Meta[] - When creating a library table backup of logical backup type, it is used to specify the library table information to be backed up. Prerequisite: When the value of BackupMethod is Logical, and the BackupType field is not passed. Mutual exclusion situation: When the value of the BackupType field is DumpAll, this field is not effective. Quantity limit: When creating a specified library table backup, the upper limit of the number of libraries is 5000, and the upper limit of the number of tables in each library is 5000.
- backup
Method string - Backup method. Value range: Full, full backup under physical backup type. Default value. DumpAll: full database backup under logical backup type. Prerequisite: If you need to create a full database backup of logical backup type, that is, when the value of BackupType is DumpAll, the backup type should be set to logical backup, that is, the value of BackupMethod should be Logical. If you need to create a database table backup of logical backup type, you do not need to pass in this field. You only need to specify the database and table to be backed up in the BackupMeta field.
- backup
Type string - Backup type. Currently, only full backup is supported. The value is Full.
- instance
Id string - The id of the instance.
- backup_
id str - The id of the backup.
- backup_
metas Sequence[BackupBackup Meta Args] - When creating a library table backup of logical backup type, it is used to specify the library table information to be backed up. Prerequisite: When the value of BackupMethod is Logical, and the BackupType field is not passed. Mutual exclusion situation: When the value of the BackupType field is DumpAll, this field is not effective. Quantity limit: When creating a specified library table backup, the upper limit of the number of libraries is 5000, and the upper limit of the number of tables in each library is 5000.
- backup_
method str - Backup method. Value range: Full, full backup under physical backup type. Default value. DumpAll: full database backup under logical backup type. Prerequisite: If you need to create a full database backup of logical backup type, that is, when the value of BackupType is DumpAll, the backup type should be set to logical backup, that is, the value of BackupMethod should be Logical. If you need to create a database table backup of logical backup type, you do not need to pass in this field. You only need to specify the database and table to be backed up in the BackupMeta field.
- backup_
type str - Backup type. Currently, only full backup is supported. The value is Full.
- instance_
id str - The id of the instance.
- backup
Id String - The id of the backup.
- backup
Metas List<Property Map> - When creating a library table backup of logical backup type, it is used to specify the library table information to be backed up. Prerequisite: When the value of BackupMethod is Logical, and the BackupType field is not passed. Mutual exclusion situation: When the value of the BackupType field is DumpAll, this field is not effective. Quantity limit: When creating a specified library table backup, the upper limit of the number of libraries is 5000, and the upper limit of the number of tables in each library is 5000.
- backup
Method String - Backup method. Value range: Full, full backup under physical backup type. Default value. DumpAll: full database backup under logical backup type. Prerequisite: If you need to create a full database backup of logical backup type, that is, when the value of BackupType is DumpAll, the backup type should be set to logical backup, that is, the value of BackupMethod should be Logical. If you need to create a database table backup of logical backup type, you do not need to pass in this field. You only need to specify the database and table to be backed up in the BackupMeta field.
- backup
Type String - Backup type. Currently, only full backup is supported. The value is Full.
- instance
Id String - The id of the instance.
Supporting Types
BackupBackupMeta, BackupBackupMetaArgs
- Db
Name string - Specify the database that needs to be backed up.
- Table
Names List<string> - Specify the tables to be backed up in the specified database. When this field is empty, it defaults to full database backup.
- Db
Name string - Specify the database that needs to be backed up.
- Table
Names []string - Specify the tables to be backed up in the specified database. When this field is empty, it defaults to full database backup.
- db
Name String - Specify the database that needs to be backed up.
- table
Names List<String> - Specify the tables to be backed up in the specified database. When this field is empty, it defaults to full database backup.
- db
Name string - Specify the database that needs to be backed up.
- table
Names string[] - Specify the tables to be backed up in the specified database. When this field is empty, it defaults to full database backup.
- db_
name str - Specify the database that needs to be backed up.
- table_
names Sequence[str] - Specify the tables to be backed up in the specified database. When this field is empty, it defaults to full database backup.
- db
Name String - Specify the database that needs to be backed up.
- table
Names List<String> - Specify the tables to be backed up in the specified database. When this field is empty, it defaults to full database backup.
Import
RdsMysqlBackup can be imported using the id, e.g.
$ pulumi import volcengine:rds_mysql/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.