SubYikeUserCredit

Updated at:

Deducts user credits.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

YikeUserId

string

Yes

The ID of the RAM user.

id

Credit

integer

Yes

The number of credits to deduct. The value must be greater than 0 and cannot exceed the credit balance of the RAM user.

50

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

****63E8B7C7-4812-46AD-0FA56029AC86****

Result

boolean

Indicates whether the deduction is successful. Valid values:

  • true: Successful.

  • false: Failed.

true

ErrorCode

string

The error code returned when the deduction fails. Valid values:

  • NOT_ENOUGH_ALLOCATE_CREDIT_QUOTA: the credit balance of the RAM user is insufficient.

NOT_ENOUGH_ALLOCATE_CREDIT_QUOTA

Examples

Success response

JSON format

{
  "RequestId": "****63E8B7C7-4812-46AD-0FA56029AC86****",
  "Result": true,
  "ErrorCode": "NOT_ENOUGH_ALLOCATE_CREDIT_QUOTA"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.