All Products
Search
Document Center

AnalyticDB:DescribeDBInstancePlans

Last Updated:Oct 10, 2024

Queries the information about plans for an AnalyticDB for PostgreSQL instance.

Operation description

You can call this operation to query the details of plans for an AnalyticDB for PostgreSQL instance in Serverless mode.

Limits

You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
gpdb:DescribeDBInstancePlansget
  • DBInstance
    acs:gpdb:*:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The instance ID.

Note You can call the DescribeDBInstances operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.
gp-bp12ga6v69h86****
PlanDescstringNo

The description of the plan.

this is a test plan
PlanTypestringNo

The type of the plan. Valid values:

  • PauseResume: pauses and resumes an instance.
  • Resize: scales an instance.
  • ModifySpec: changes compute node specifications.
PauseResume
PlanScheduleTypestringNo

The execution mode of the plan. Valid values:

  • Postpone: The plan is executed later.
  • Regular: The plan is executed periodically.
Regular
PlanIdstringNo

The plan ID.

Note You can call the DescribeDBInstancePlans operation to query the information about plans, including plan IDs.
1234
PlanCreateDatestringNo

The time that is used to filter plans. If you specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format, the plans that are created before this time are returned. The time must be in UTC. If you do not specify this parameter, all plans are returned.

2022-04-17T23:00Z

Response parameters

ParameterTypeDescriptionExample
object
Statusstring

Indicates whether the request was successful.

If the request was successful, success is returned. If the request failed, this parameter is not returned.

success
ErrorMessagestring

The error message.

This parameter is returned only if the request fails.

****
RequestIdstring

The request ID.

34b32a0a-08ef-4a87-b6be-cdd988888888
TotalRecordCountinteger

The total number of entries returned.

1
PageRecordCountinteger

The number of entries per page.

1
PageNumberinteger

The page number.

1
Itemsarray<object>

The queried plans.

PlanListobject
PlanNamestring

The name of the plan.

test-plan
PlanDescstring

The description of the plan.

this is a test plan
PlanIdstring

The plan ID.

1234
PlanStatusstring

The status of the plan. Valid values:

  • active
  • cancel
  • deleted
  • finished
active
PlanTypestring

The type of the plan. Valid values:

  • PauseResume: pauses and resumes an instance.
  • Resize: scales an instance.
PauseResume
PlanScheduleTypestring

The execution mode of the plan. Valid values:

  • Postpone: The plan is executed later.
  • Regular: The plan is executed periodically.
Regular
PlanStartDatestring

The start time of the plan. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

Note
  • This parameter is returned only for the plans that are periodically executed.

  • If you did not specify the start time when you created the plan, the current time is returned.

2022-04-17T23:00Z
PlanEndDatestring

The end time of the plan. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

Note
  • This parameter is returned only for the plans that are periodically executed.

  • If you did not specify the end time when you created the plan, this parameter is not returned.

2023-04-17T23:00Z
PlanConfigstring

The execution information of the plan.

{"pause":{"planCronTime":"0 22 * * 5"},"resume":{"planCronTime":"0 23 * * 5"}}
DBInstanceIdstring

The instance ID.

gp-bp12ga6v69h86****

Examples

Sample success responses

JSONformat

{
  "Status": "success",
  "ErrorMessage": "****",
  "RequestId": "34b32a0a-08ef-4a87-b6be-cdd988888888",
  "TotalRecordCount": 1,
  "PageRecordCount": 1,
  "PageNumber": 1,
  "Items": {
    "PlanList": [
      {
        "PlanName": "test-plan",
        "PlanDesc": "this is a test plan",
        "PlanId": "1234",
        "PlanStatus": "active",
        "PlanType": "PauseResume",
        "PlanScheduleType": "Regular",
        "PlanStartDate": "2022-04-17T23:00Z",
        "PlanEndDate": "2023-04-17T23:00Z",
        "PlanConfig": "{\"pause\":{\"planCronTime\":\"0 22 * * 5\"},\"resume\":{\"planCronTime\":\"0 23 * * 5\"}}",
        "DBInstanceId": "gp-bp12ga6v69h86****"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-08-25Add OperationView Change Details