Help Center/ Relational Database Service/ API Reference (Ankara Region)/ API v3 (Recommended)/ Backup and Restoration/ Querying Details About DB Instances for Which Cross-Region Backups Are Created
Updated on 2024-04-11 GMT+08:00

Querying Details About DB Instances for Which Cross-Region Backups Are Created

Function

This API is used to query details about DB instances for which cross-region backups are created in the target backup region.

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

URI

  • URI format

    GET /v3/backups/offsite-backup-instance?offset={offset}&limit={limit}

  • Example
    • Querying all DB instance lists

      https://{Endpoint}/v3/backups/offsite-backup-instance

    • Querying DB instance lists based on search criteria

      https://{Endpoint}/v3/backups/offsite-backup-instance?offset=0&limit=10

  • Parameter description
    Table 1 Parameter description

    Name

    Type

    Mandatory

    Description

    offset

    Integer

    No

    Specifies the index position. If offset is set to N, the resource query starts from the N+1 piece of data. The value is 0 by default, indicating that the query starts from the first piece of data. The value cannot be a negative number.

    limit

    Integer

    No

    Specifies the number of records to be queried. The default value is 100. The value cannot be a negative number. The minimum value is 1 and the maximum value is 100.

Request

None

Response

  • Normal response
    Table 2 Parameter description

    Name

    Type

    Description

    offsite_backup_instances

    Array of objects

    Indicates information about DB instances for which cross-region backups are created.

    For details, see Table 3.

    total_count

    Integer

    Indicates the total number of records.

    Table 3 offsite_backup_instances field data structure description

    Name

    Type

    Description

    id

    String

    Indicates the DB instance ID.

    name

    String

    Indicates the name of the DB instance for which cross-region backups are created.

    source_region

    String

    Indicates the source backup region.

    source_project_id

    String

    Indicates the project ID in the source backup region.

    datastore

    Object

    Indicates the database information.

    For details, see Table 4.

    destination_region

    String

    Indicates the region where the cross-region backup is located.

    destination_project_id

    String

    Indicates the project ID in the target backup region.

    Table 4 datastore field data structure description

    Name

    Type

    Description

    type

    String

    Indicates the DB engine.

    version

    String

    Indicates the database version.

  • Example normal response

    Querying DB instance lists based on search criteria:

    {
            "total_count": 1,
    	"offsite_backup_instances": [{
    		"id": "ed7cc6166ec24360a5ed5c5c9c2ed726in01",
                    "name": "rds-instance-rep2",
                    "source_region": "aaa",
                    "source_project_id": "ba1f7fc8-3307-42a7-aa6f-42c8b9b8f85c",
                    "datastore": {
    			"type": "MySQL",
    			"version": "5.7"
    		},
    		"destination_region": "bbb",
    		"destination_project_id": "0503fd7f7580d3262fc5c001170fbab9",
    		"keep_days": 7
    		}
        	     ]
    }
  • Querying all DB instance lists:

    {
            "total_count": 1,
    	"offsite_backup_instances": [{
    		"id": "ed7cc6166ec24360a5ed5c5c9c2ed726in01",
                    "name": "rds-instance-rep2",
                    "source_region": "aaa",
                    "source_project_id": "ba1f7fc8-3307-42a7-aa6f-42c8b9b8f85c",
                    "datastore": {
    			"type": "MySQL",
    			"version": "5.7"
    		},
    		"destination_region": "bbb",
    		"destination_project_id": "0503fd7f7580d3262fc5c001170fbab9",
    		"keep_days": 7
    		}
        	     ]
    }
  • Abnormal Response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.