GetUserCommand
Retrieves a user-defined command.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paidsw:GetUserCommand |
get |
*All Resource
|
None | None |
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 get this ID by calling API operations such as GetInstance. |
1900 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
No |
The ID of the Data Science Workshop (DSW) instance. Specify this parameter to find the user command that is attached to the instance. This parameter overwrites the UserCommandId setting. |
dsw-dlsd0fskn193213xxx |
| Token |
string |
No |
The token used to access the user command. The token is issued by the GetToken API operation. |
eyJhbGci...... |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Response schema |
||
| UserCommandId |
string |
The ID of the user-defined command. |
1900 |
| OnStart |
object |
The custom startup command. This command is executed each time the instance starts. |
|
| Content |
string |
The content of the custom startup command. |
apt update |
| Message |
string |
A description of the result. |
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 |
Details about the access denial. This parameter is returned if access is denied because the user does not have the required RAM permissions. |
"AccessDeniedDetail": { "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": {
"test": "test",
"test2": 1
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.