# 获取作业原子能力详细 - ShowDocumentAtomicInfo
#### 功能介绍
获取原子能力详细。
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/COC/doc?api=ShowDocumentAtomicInfo)中调试该接口，支持自动认证鉴权。API Explorer可以自动生成SDK代码示例，并提供SDK代码示例调试功能。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-coc/coc_api_06.html)。
- 如果使用身份策略授权，需具备如下身份策略权限。
  
  | 授权项                    | 访问级别 | 资源类型（\*为必须） | 条件键 | 别名 | 依赖的授权项 |
  |:---|:---|:---|:---|:---|:---|
  | coc:documentAtomic:get | Read | -           | -   | -  | -      |
     
#### URI
GET /v1/atomics/{atomic_unique_key}
表1路径参数 
| 参数                | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                    |
|:---|:---|:---|:---|
| atomic_unique_key | 是    | String | **参数解释：** 原子能力的key。 **约束限制：** 不涉及。 **取值范围：** - coc_step_pause：暂停。 - coc_step_loop：循环。 - coc_step_branch：分支。 - execute_api：执行API。 - coc_step_sleep：睡眠。 - custom_script_execute：自定义脚本执行。 **默认取值：** 不涉及。 |
#### 请求参数
无
#### 响应参数
**状态码：200**
表2响应Body参数 
| 参数         | 参数类型                                                                               | 描述                                                                                           |
|:---|:---|:---|
| error_code | String                                                                             | **参数解释：** 错误码。 **取值范围：** 参见[错误码](https://support.huaweicloud.com/api-coc/ErrorCode.html)章节。  |
| error_msg  | String                                                                             | **参数解释：** 错误信息。 **取值范围：** 参见[错误码](https://support.huaweicloud.com/api-coc/ErrorCode.html)章节。 |
| data       | [data] object | 返回数据。                                                                                        |
   
 表3data 
| 参数                | 参数类型                                                                                                                 | 描述                                            |
|:---|:---|:---|
| atomic_unique_key | String                                                                                                               | **参数解释：** 原子能力唯一标识。 **取值范围：** 只允许字母+下划线，字母开头。 |
| atomic_name_zh    | String                                                                                                               | **参数解释：** 中文名。 **取值范围：** 不涉及。                 |
| atomic_name_en    | String                                                                                                               | **参数解释：** 英文名。 **取值范围：** 不涉及。                 |
| tags              | Array of strings                                                                                                     | **参数解释：** 标签信息。 **取值范围：** 不涉及。                |
| inputs            | Array of [AtomicInputModel] objects | **参数解释：** 原子能力入参。 **取值范围：** 不涉及。              |
| outputs           | [AtomicOutputModel] object         | **参数解释：** 原子能力出参。 **取值范围：** 不涉及。              |
   
 表4AtomicInputModel 
| 参数            | 参数类型    | 描述                                                           |
|:---|:---|:---|
| param_key     | String  | **参数解释：** 参数变量名，执行时原子能力内引用。 **取值范围：** 不涉及。                   |
| param_name_zh | String  | **参数解释：** 参数中文名，下拉展示时使用。 **取值范围：** 不涉及。                      |
| param_name_en | String  | **参数解释：** 参数英文名，下拉展示时使用。 **取值范围：** 不涉及。                      |
| required      | Boolean | **参数解释：** 是否必填。 **取值范围：** 不涉及。                               |
| param_type    | String  | **参数解释：** 参数类型：常量/字典。 **取值范围：** - CONSTANT：常量。 - COMPLEX：字典。 |
| min           | Integer | **参数解释：** 最小值。 **取值范围：** 不涉及。                                |
| max           | Integer | **参数解释：** 最大值。 **取值范围：** 不涉及。                                |
| min_len       | Integer | **参数解释：** 长度最小值。 **取值范围：** 不涉及。                              |
| max_len       | Integer | **参数解释：** 长度最大值。 **取值范围：** 不涉及。                              |
| pattern       | String  | **参数解释：** 正则限制表达式。 **取值范围：** 不涉及。                            |
   
 表5AtomicOutputModel 
| 参数        | 参数类型    | 描述                                      |
|:---|:---|:---|
| supported | Boolean | **参数解释：** 是否支持输出。 **取值范围：** 不涉及。        |
| type      | String  | **参数解释：** 输出类型。 **取值范围：** - CUSTOM：自定义。 |
   
#### 请求示例
获取指定原子能力详细。
```
GET https://{Endpoint}/v1/atomics/{atomic_unique_key}
```
#### 响应示例
**状态码：200**
请求成功。
```
{
  "data" : {
    "atomic_unique_key" : "custom_script_execute",
    "atomic_name_zh" : "自定义脚本执行",
    "atomic_name_en" : "Execute script",
    "tags" : [ "CUSTOM" ],
    "inputs" : [ {
      "param_key" : "wait_uniagent_time",
      "param_type" : "CONSTANT",
      "param_name_zh" : "最大等待Uniagent启动时间（秒）",
      "param_name_en" : "Maximum Waiting Time for UniAgent Startup (second)",
      "required" : false,
      "max" : 1200,
      "min" : 0,
      "max_len" : null,
      "min_len" : null,
      "pattern" : null
    }, {
      "param_key" : "script_uuid",
      "param_type" : "CONSTANT",
      "param_name_zh" : "脚本uuid",
      "param_name_en" : "Script uuid",
      "required" : true,
      "max" : null,
      "min" : null,
      "max_len" : null,
      "min_len" : null,
      "pattern" : null
    }, {
      "param_key" : "execute_user",
      "param_type" : "CONSTANT",
      "param_name_zh" : "脚本执行用户",
      "param_name_en" : "Script execute os user",
      "required" : true,
      "max" : null,
      "min" : null,
      "max_len" : 32,
      "min_len" : null,
      "pattern" : null
    }, {
      "param_key" : "timeout",
      "param_type" : "CONSTANT",
      "param_name_zh" : "脚本执行超时时长（秒）",
      "param_name_en" : "Script execute timeout (second)",
      "required" : true,
      "max" : 1800,
      "min" : 6,
      "max_len" : null,
      "min_len" : null,
      "pattern" : null
    }, {
      "param_key" : "success_rate",
      "param_type" : "CONSTANT",
      "param_name_zh" : "成功率阈值（%）",
      "param_name_en" : "Success rate (%)",
      "required" : false,
      "max" : 100,
      "min" : 0,
      "max_len" : null,
      "min_len" : null,
      "pattern" : null
    }, {
      "param_key" : "script_params",
      "param_type" : "DICTIONARY",
      "param_name_zh" : "脚本入参",
      "param_name_en" : "Script execute inputs",
      "required" : false,
      "max" : null,
      "min" : null,
      "max_len" : null,
      "min_len" : null,
      "pattern" : null
    } ],
    "outputs" : {
      "supported" : false,
      "type" : null
    }
  }
}
```
#### 状态码
| 状态码 | 描述    |
|:---|:---|
| 200 | 请求成功。 |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-coc/ErrorCode.html)。
