Check if URedis resources are sufficient - CheckURedisAllowance
Overview
Check whether the master and standby Redis resources are sufficient to create a new instance, and the pre-check of the expansion resources of the master and standby Redis.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is CheckURedisAllowance . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
Zone | string | Availability Zone. See Availability Zone List | Yes |
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | No |
Size | int | The size of the instance to be created, unit: GB. Currently, only six specifications of 1/2/4/8/16/32 are supported; during scaling, it represents the target resource size of the instance. | Yes |
Count | int | The number of instances to be created, [1-10] | Yes |
Protocol | string | No | |
RegionFlag | boolean | Is it a cross-IDC URedis (default is false) | No |
GroupId | string | Resource ID, a required parameter when expanding instance resources. | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
Count | int | When creating instance resources, it indicates the number that can be created; when expanding resources, returning 1 means expansion is possible, 0 means the resources in the available zone are insufficient and cannot be expanded. | Yes |
Example
Request Example
https://api.surfercloud.com/?Action=CheckURedisGroupAllowance
&Region=cn-north-02
&Size=4
&Count=5
&Protocol=abZKbHGn
&ProjectId=FGVllQOD
&GroupId=ulMxTJes
&GroupId=PdvxcmWj
&GroupId=zwUdMzBb
Response Example
{
"Action": "CheckURedisAllowanceResponse",
"Count": 4,
"NeedMigrate": false,
"RetCode": 0
}