Updated on 2024-04-11 GMT+08:00

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.

  • Before calling an API, you need to understand the API in Authentication.

URI

  • URI format

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

  • Example

    https://{Endpoint}/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

    Array of objects

    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

    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 the backup policy is disabled:

    {
    	"policy_para": {
    		"keep_days": 0
    	}
    }
    When both the automated backup policy and incremental backup policy are enabled for RDS for MySQL and RDS for PostgreSQL DB instances:
    {
    	"policy_para": [
                {
    		"keep_days": 7,
    		"backup_type": "auto",
    		"destination_region": "aaa",
                    "destination_project_id": "0503fd7f7580d3262fc5c001170fbab9"
                },
                {
                    "keep_days": 7,
    		"backup_type": "incremental",
    		"destination_region": "aaa",
                    "destination_project_id": "0503fd7f7580d3262fc5c001170fbab9"
                 }
    	]
    }
  • Abnormal Response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.