Help Center/ Relational Database Service/ API Reference/ API v3 (Recommended)/ Backup and Restoration/ Configuring an Automatic Transfer Policy (RDS for MySQL)
Updated on 2025-12-09 GMT+08:00

Configuring an Automatic Transfer Policy (RDS for MySQL)

Function

This API is used to configure an automatic backup transfer policy for a DB instance.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
  • If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

rds:instance:modifyBackupPolicy

readwrite

-

-

-

-

URI

  • URI format

    PUT /v3/{project_id}/instances/{instance_id}/backups/transfer/policy

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Definition

    Project ID of a tenant in a region.

    To obtain the value, see Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    instance_id

    Yes

    String

    Definition

    Instance ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

policy

Yes

Array of Object

Definition

Automatic transfer policy. For details, see Table 3.

Constraints

N/A

Table 3 policy field description

Parameter

Mandatory

Type

Description

prefix

No

String

Definition

Prefix of the storage location in the destination OBS bucket.

Constraints

N/A

Range

The value can contain 0 to 128 characters and must end with a slash (/).

Default Value

N/A

destination

Yes

String

Definition

Destination bucket.

Constraints

N/A

Range

0 to 128 characters

Default Value

N/A

period

Yes

String

Definition

Automatic transfer period.

Constraints

N/A

Range

The value is a list of digits separated by commas (,). Each digit indicates a day of the week.

For example, the value 1,2,3,4 indicates that the transfer period is every Monday, Tuesday, Wednesday, and Thursday. If you set this parameter to 1 (Monday), the backups generated on Monday will be automatically transferred to the destination OBS bucket on Tuesday.

Default Value

N/A

backup_type

Yes

String

Definition

Type of backups to be transferred.

Constraints

N/A

Range

  • db: automated backup
  • log: incremental backup
  • snapshot: manual backup

Default Value

N/A

Example Request

Configure an automatic backup transfer policy for a DB instance.

PUT https://{Endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/e38d120bb5a640519fb2a1613140afd9in01/backups/transfer/policy

{
	"policy": [{
			"prefix": "aaa/",
			"destination": "xxxbucket",
			"period": "* * 1,2,3,4,5,6,7",
			"backup_type": "db"
		},
		{
			"prefix": "aaa/",
			"destination": "xxxbucket",
			"period": "* * 1,2,3,4,5,6,7",
			"backup_type": "log"
		}
	]
}

Response

  • Normal response

    None

Status Code

Error Code

For details, see Error Codes.