Creating a Container Export Task
Function
This API is used to create a container export task.
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
POST /v5/{project_id}/container/export-task
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Definition Project ID, which is used to specify the project that an asset belongs to. After the project ID is configured, you can query assets in the project using the project ID. For details about how to obtain it, see Obtaining a Project ID. Constraints N/A Range The value can contain 1 to 256 characters. Default Value N/A |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
enterprise_project_id | No | String | Definition Enterprise project ID, which is used to filter assets in different enterprise projects. For details, see Obtaining an Enterprise Project ID. To query assets in all enterprise projects, set this parameter to all_granted_eps. Constraints You need to set this parameter only after the enterprise project function is enabled. Range The value can contain 1 to 256 characters. Default Value 0: default enterprise project. |
export_size | No | Integer | Definition Exported records Constraints N/A Range 1-100000 Default Value 100000 |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | Definition User token, which contains user identity and permissions. The token can be used for identity authentication when an API is called. For details about how to obtain the token, see Obtaining a User Token. Constraints N/A Range The value can contain 1 to 32,768 characters. Default Value N/A |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
cluster_container | No | Boolean | Definition Whether the container is managed by a cluster. Set this parameter to true if only containers in a cluster are exported. Set this parameter to false if only non-cluster containers are exported. Constraints N/A Range The value can be "true" or "false". Default Value N/A |
cluster_type | No | String | Definition Cluster type. Constraints N/A Range Default Value N/A |
cluster_name | No | String | Definition Name of the cluster to which the audited source belongs. Constraints N/A Range The value contains 1 to 255 characters. Default Value N/A |
container_name | No | String | Definition Container name Constraints N/A Range The value contains 1 to 255 characters. Default Value N/A |
pod_name | No | String | Definition Pod name Constraints N/A Range The value can contain 1 to 512 characters. Default Value N/A |
image_name | No | String | Definition Image name. Constraints N/A Range The value contains 1 to 255 characters. Default Value N/A |
status | No | String | Definition Container status. Constraints N/A Range Default Value N/A |
risky | No | Boolean | Definition Check whether there are security risks. If only containers with security risks are to be exported, set this parameter to true. If only containers without security risks are to be exported, set this parameter to false. Constraints N/A Range The value can be "true" or "false". Default Value N/A |
create_time | No | create_time object | Created |
cpu_limit | No | String | Definition CPU limit Constraints N/A Range You can enter 0 to 64 characters. The unit is MB, for example, 100 MB. Default Value N/A |
memory_limit | No | String | Definition Memory limit. Constraints N/A Range You can enter 0 to 64 characters. The unit is Mi or Gi, for example, 300 Mi. Default Value N/A |
export_headers | Yes | Array<Array<String>> | Definition Export the header information of the container list. Constraints N/A Range Valid key values and their corresponding header names. (The header names can be customized.) Default Value N/A |
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
task_id | String | Export task ID |
Example Requests
Create a container export task.
{
"export_headers" : [ [ "container_name", "Container Name" ], [ "image_name", "Image Name" ], [ "risky", "Security Risk" ] ]
} Example Responses
Status code: 200
Request succeeded.
{
"task_id" : "test"
} Status Codes
Status Code | Description |
|---|---|
200 | Request succeeded. |
Error Codes
See Error Codes.
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
