All Products
Search
Document Center

Security Center:QueryPreCheckDatabase

Last Updated:Nov 25, 2024

Queries the result of a database precheck task.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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
yundun-sas:QueryPreCheckDatabaseget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TaskIdstringNo

The ID of the database precheck task.

Note You can call the StartPreCheckDatabase operation to query the ID of the database precheck task.
t-000bc9nqwxsbyvod****
InstanceUuidstringNo

The UUID of the agent that is used to back up the data of the database.

Note You can call the DescribeUniBackupDatabase operation to query the UUID.
ebc895506c6911ed800000163e0e****
UniRegionIdstringYes

The region ID of the server that hosts the database.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

The data returned.

RequestIdstring

The ID of the request, which is used to locate and troubleshoot issues.

CE500770-42D3-442E-9DDD-156E0F9F****
Progressinteger

The precheck progress in percentage. Valid values: 0 to 100.

100
Resultstring

The result of the precheck task. The value is a JSON string that contains the following fields:

  • instanceId: the ID of the server that hosts the database

  • checkTime: the precheck time

  • sourceType: the database type

  • results: the precheck item and result

    • item: the precheck item
    • result: the precheck result
Note The following section describes the precheck items:
  • MSSQL

    • OSS_INTERNAL_ENDPOINT_CONNECTIVITY: OSS connectivity check
    • SERVICE_CONNECTIVITY: control network connectivity check
    • SQL_SERVER_DB_IN_SIMPLE_RECOVERY_MODE: recovery mode check
    • SQL_SERVER_DB_NOT_ONLINE: SQL Server database status check
  • ORACLE

    • OSS_INTERNAL_ENDPOINT_CONNECTIVITY: OSS connectivity check
    • SERVICE_CONNECTIVITY: control network connectivity check
    • ORACLE_INSTANCE_STATUS: Oracle instance status check
    • ORACLE_DB_STATUS: Oracle database status check
    • ARCHIVELOG: archive mode check
  • MYSQL

    • OSS_INTERNAL_ENDPOINT_CONNECTIVITY: OSS connectivity check
    • SERVICE_CONNECTIVITY: control network connectivity check
    • MYSQL_VERSION: Supports full backup version checking
    • MYSQL_BINLOG: BINLOG check
[ { "instanceId": "i-wz91if83t97xgtn2****", "checkTime": 1671245753, "sourceType": "MSSQL", "results": [ { "item": "OSS_INTERNAL_ENDPOINT_CONNECTIVITY", "result": "PASSED" }, { "item": "SERVICE_CONNECTIVITY", "result": "PASSED" }, { "item": "SQL_SERVER_DB_IN_SIMPLE_RECOVERY_MODE", "result": "WARNING" }, { "item": "SQL_SERVER_DB_NOT_ONLINE", "result": "PASSED" } ] } ]
CompletedTimelong

The time when the precheck task was complete.

1657524396
Descriptionstring

The status of the precheck task. Valid values:

  • completed: complete
  • created: started
  • error: failed
completed
UpdatedTimelong

The time when the precheck task was last updated.

1671084106
CreatedTimelong

The time when the precheck task was started.

1660448660

Examples

Sample success responses

JSONformat

{
  "RequestId": "CE500770-42D3-442E-9DDD-156E0F9F****",
  "Progress": 100,
  "Result": "[\n    {\n        \"instanceId\": \"i-wz91if83t97xgtn2****\",\n        \"checkTime\": 1671245753,\n        \"sourceType\": \"MSSQL\",\n        \"results\":\n        [\n            {\n                \"item\": \"OSS_INTERNAL_ENDPOINT_CONNECTIVITY\",\n                \"result\": \"PASSED\"\n            },\n            {\n                \"item\": \"SERVICE_CONNECTIVITY\",\n                \"result\": \"PASSED\"\n            },\n            {\n                \"item\": \"SQL_SERVER_DB_IN_SIMPLE_RECOVERY_MODE\",\n                \"result\": \"WARNING\"\n            },\n            {\n                \"item\": \"SQL_SERVER_DB_NOT_ONLINE\",\n                \"result\": \"PASSED\"\n            }\n        ]\n    }\n]",
  "CompletedTime": 1657524396,
  "Description": "completed",
  "UpdatedTime": 1671084106,
  "CreatedTime": 1660448660
}

Error codes

HTTP status codeError codeError messageDescription
403NoPermissioncaller has no permissionYou are not authorized to do this operation.
500ServerErrorServerError-

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