Running Commands in a Container (GET)
Function
This API is used to run commands in a container of a pod in a namespace.
This API cannot be debugged using curl or Postman. You are advised to use ccictl for debugging.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
GET /apis/cci/v2/namespaces/{namespace}/pods/{name}/exec
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
name |
Yes |
String |
name of the PodExecOptions |
|
namespace |
Yes |
String |
object name and auth scope, such as for teams and projects |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
command |
No |
String |
Command to be run in the container. The first element is the command, and the subsequent elements are the arguments. |
|
container |
No |
String |
Name of the container in which to execute the command. If the Pod has only one container, this can be omitted. |
|
stderr |
No |
Boolean |
Whether to pass the standard error stream from the container to the client. |
|
stdin |
No |
Boolean |
Whether to pass the standard input stream from the client to the container. |
|
stdout |
No |
Boolean |
Whether to pass the standard output stream from the container to the client. |
|
tty |
No |
Boolean |
Whether to allocate a pseudo-TTY. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Requests for calling an API can be authenticated using either a token or an AK/SK pair. If token authentication is used, this parameter is mandatory and must be set to a user token. For details, see Authentication. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
Example Requests
None
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
BadRequest |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
NotFound |
|
405 |
MethodNotAllowed |
|
406 |
NotAcceptable |
|
409 |
Conflict |
|
415 |
UnsupportedMediaType |
|
422 |
Invalid |
|
429 |
TooManyRequests |
|
500 |
InternalError |
|
503 |
ServiceUnavailable |
|
504 |
ServerTimeout |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot