GetUserCommand
Retrieves user-defined commands.
Try it now
Test
RAM authorization
Request syntax
GET /api/v2/usercommands/{UserCommandId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| UserCommandId |
string |
No |
The ID of the user-defined command. You can obtain it by calling operations such as GetInstance. |
1900 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
No |
The DSW instance ID. Specify this parameter to query the user-defined command attached to the instance. Specifying the options overwrites the Settings of UserCommandId. |
dsw-dlsd0fskn193213xxx |
| Token |
string |
No |
The token issued by calling the GetToken operation to access the user-defined command. |
eyJhbGci...... |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| UserCommandId |
string |
The ID of the user-defined command. |
1900 |
| OnStart |
object |
The custom startup command, which is executed each time the instance starts. |
|
| Content |
string |
The content of the custom startup command. |
apt update |
| Message |
string |
The response message. |
null |
| Code |
string |
The status code. Valid values:
|
ValidationError |
| RequestId |
string |
The request ID. |
BEBDF2EE-642E-5992-8907-D2011A7ACEFE |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| accessDeniedDetail |
object |
The details of the access denial. This parameter is returned when access is denied due to lack of RAM permissions. |
{"PolicyType":"AccountLevelIdentityBasedPolicy","AuthPrincipalOwnerId":"xxx","EncodedDiagnosticMessage":"AQIBIAAAA....bwhg==","AuthPrincipalType":"SubUser","AuthPrincipalDisplayName":"xxx","NoPermissionType":"ImplicitDeny","AuthAction":"ram:GetUserCommand"} |
Examples
Success response
JSON format
{
"UserCommandId": "1900",
"OnStart": {
"Content": "apt update"
},
"Message": "null",
"Code": "ValidationError",
"RequestId": "BEBDF2EE-642E-5992-8907-D2011A7ACEFE",
"Success": true,
"accessDeniedDetail": {
"PolicyType": "AccountLevelIdentityBasedPolicy",
"AuthPrincipalOwnerId": "xxx",
"EncodedDiagnosticMessage": "AQIBIAAAA....bwhg==",
"AuthPrincipalType": "SubUser",
"AuthPrincipalDisplayName": "xxx",
"NoPermissionType": "ImplicitDeny",
"AuthAction": "ram:GetUserCommand"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.