Creates a token for a Livy Gateway.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
emr-serverless-spark:CreateLivyComputeToken |
create |
*All Resource
|
None | None |
Request syntax
PUT /api/interactive/v1/workspace/{workspaceBizId}/livycompute/{livyComputeId}/token HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| workspaceBizId |
string |
No |
The workspace ID. |
w-8adde60aa809701f |
| livyComputeId |
string |
No |
The ID of the Livy Gateway. |
lc-zm4dzdiubu73w2yx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| name |
string |
No |
The token name. |
mytoken |
| token |
string |
No |
The token content. The length must be 16 or more characters. |
gs3fy75w4o7hqe5s |
| autoExpireConfiguration |
object |
No |
The token expiration information struct. |
|
| enable |
boolean |
No |
Specifies whether the token automatically expires.
|
false |
| expireDays |
integer |
No |
The expiration period in days. |
7 |
| regionId |
string |
No |
The region ID. |
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| requestId |
string |
The request ID. |
DD6B1B2A-5837-5237-ABE4-FF0C8944**** |
| code |
string |
The response code. A value of 1000000 indicates that the request was successful. Other values indicate that the request failed. See the message parameter for error details. |
1000000 |
| message |
string |
The error details. |
ok |
| data |
object |
The returned data. |
|
| tokenId |
string |
The token ID. |
lctk-xxxxxxxx |
Examples
Success response
JSON format
{
"requestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944****",
"code": "1000000",
"message": "ok",
"data": {
"tokenId": "lctk-xxxxxxxx"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.