Skip to Content
RMQ Message Queue(URocketMQ)CreateURocketMQToken

CreateURocketMQToken - CreateURocketMQToken

Overview

Create token

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is CreateURocketMQToken.Yes
PublicKeystringThe user’s public key can be obtained from Console Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See Region and Availability Zone List Yes
ProjectIdstringProject ID. Leave blank for the default project, sub-accounts must fill in. Please refer to GetProjectList API Yes
ServiceIdstringService IDYes
NamestringToken NameYes
TopicProducePermstringTopic Production PermissionsYes
TopicConsumePermstringTopic Consumption PermissionYes
AllowProduceTopicListstringArray of Topic Names Allowed for ProductionNo
AllowConsumeTopicListstringArray of Topic Names Allowed for ConsumptionNo

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
TokenIdstringToken IdYes

Example

Request Example

https://api.ucloud-global.com/?Action=CreateURocketMQToken &Region=cn-zj &ProjectId=OkSaRBWo &ServiceID=lrhmSNtc &Name=CTROcxdk &TopicProducePerm=HKSJFxpg &TopicConsumePerm=cYidEWKB &AllowProduceTopicList=UaGTSuQp &AllowConsumeTopicList=BjvQusIq

Response Example

{ "Action": "CreateURocketMQTokenResponse", "Message": "skteXFBb", "RetCode": 0, "TokenId": "cuPbENAI" }