• Relational Database Service

rds
  1. Help Center
  2. Relational Database Service
  3. API Reference
  4. API v1
  5. Backup and Restoration
  6. Obtaining an Automated Backup Policy

Obtaining an Automated Backup Policy

Function

This API is used to obtain an automated backup policy information.

URI

  • URI format

    PATH: /rds/{versionId}/{project_id}/instances/{instanceId}/backups/policy

    Method: GET

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    versionId

    Yes

    Specifies the API version. It is case-sensitive and the value is v1.

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    instanceId

    Yes

    Specifies the primary DB instance ID.

Request

N/A

Normal Response

  • Parameter description
    Table 2 Parameter description

    Name

    Type

    Description

    policy

    Dictionary data structure. For details, see Table 3.

    Indicates the backup policy objects, including the backup retention period (days) and backup start time.

    Table 3 policy field data structure description

    Name

    Type

    Description

    keepday

    Int

    Indicates the number of days to retain the generated backup files.

    The value range is from 0 to 732. If this parameter is 0, the automated backup policy is not set.

    starttime

    String

    Indicates the backup start time that has been set. The backup task will be triggered within one hour after the backup start time.

    Valid value:

    The value cannot be empty. The format can be hh:mm:ss or hh:mm and must be valid. The time is in the UTC format.

  • Response example
    {
      "policy": {
      "keepday": 7,
      "starttime": "00:00:00"
     }
    }

Abnormal Response

For details, see Abnormal Request Results.