Help Center> Relational Database Service> API Reference> API v3 (Recommended)> Backup and Restoration> Querying Information About a Cross-Region Backup Policy

Querying Information About a Cross-Region Backup Policy

Function

This API is used to query information about a cross-region backup policy in the source backup region.

Constraints

Only MySQL supports cross-region backup policy queries.

URI

  • URI format

    GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/backups/offsite-policy

  • Example

    https://rds.cn-north-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/backups/offsite-policy

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

    instance_id

    Yes

    Specifies the DB instance ID.

Request

None

Response

  • Normal response
    Table 2 Parameter description

    Name

    Type

    Description

    policy_para

    Object

    Indicates the backup policy object, including the backup type, backup retention days, target region ID, and target project ID.

    For details, see Table 3.

    Table 3 policy_para field data structure description

    Name

    Type

    Description

    backup_type

    String

    Indicates the backup type. Its value can be any of the following:

    • auto: automated full backup
    • incremental: automated incremental backup
    • all: automated full backup and automated incremental backup

    keep_days

    Integer

    Indicates the number of days to retain the backup files.

    destination_region

    String

    Indicates the target region ID for the cross-region backup policy.

    destination_project_id

    String

    Indicates the target project ID for the cross-region backup policy.

  • Example normal response

    When both the automated backup policy and incremental backup policy are disabled:

    {
    	"backup_policy": {
    		"keep_days": 0
    	}
    }
    When both the automated backup policy and incremental backup policy are enabled:
    {
    	"policy_para": [
                {
    		"keep_days": 7,
    		"backup_type": "auto",
    		"destination_region": "cn-guangzhou-1",
                    "destination_project_id": "0503fd7f7580d3262fc5c001170fbab9"
                },
                {
                    "keep_days": 7,
    		"backup_type": "incremental",
    		"destination_region": "cn-guangzhou-1",
                    "destination_project_id": "0503fd7f7580d3262fc5c001170fbab9"
                 }
    	]
    }
  • Abnormal Response

    For details, see Abnormal Request Results.

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.