
# 查询共享应用模板详情 - ShowSharedApp
#### 功能介绍
查询共享应用模板详情
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/IEF/doc?api=ShowSharedApp)中调试该接口，支持自动认证鉴权。API Explorer可以自动生成SDK代码示例，并提供SDK代码示例调试功能。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-ief/ief_02_1003.html)。
#### URI
GET /v2/{project_id}/edgemgr/shared-apps/{app_id}
表1路径参数 
| 参数         | 是否必选 | 参数类型   | 描述   |
|:---|:---|:---|:---|
| project_id | 是    | String | 项目ID |
| app_id     | 是    | String | 应用ID |
#### 请求参数
无
#### 响应参数
**状态码：200**
表2响应Body参数 
| 参数  | 参数类型                                       | 描述  |
|:---|:---|:---|
| app | [App] object | app |
   
 表3App 
| 参数                     | 参数类型                                                               | 描述                     |
|:---|:---|:---|
| id                     | String                                                             | ID                     |
| name                   | String                                                             | 名称                     |
| description            | String                                                             | 描述                     |
| project_id             | String                                                             | 项目ID                   |
| from_ief_instance_id   | String                                                             | from_ief_instance_id   |
| from_ief_instance_name | String                                                             | from_ief_instance_name |
| created_at             | String                                                             | 创建时间                   |
| updated_at             | String                                                             | 更新时间                   |
| alias                  | String                                                             | 别名                     |
| svc_type               | String                                                             | 服务类型                   |
| visibility             | String                                                             | 可见性                    |
| icon_url               | String                                                             | 头像URL                  |
| provider_endpoint      | String                                                             | 提供商端点                  |
| app_versions           | Array of [AppVersion] objects | app版本                  |
| tags                   | Array of [Attribute] objects   | 标签                     |
   
 表4AppVersion 
| 参数              | 参数类型                                                       | 描述    |
|:---|:---|:---|
| id              | String                                                     | ID    |
| created_at      | String                                                     | 创建时间  |
| updated_at      | String                                                     | ID    |
| project_id      | String                                                     | 项目ID  |
| image_url       | String                                                     | 图片URL |
| envs            | Array of [Envs] objects     | 环境    |
| volumes         | Array of [Volume] objects | 卷     |
| configs         | [Config] object           | 配置    |
| resources       | [ResourceVal] object | 资源    |
| arch            | String                                                     | 架构    |
| command         | Array of strings                                           | 命令    |
| args            | Array of strings                                           | 参数    |
| version         | String                                                     | 版本    |
| liveness_probe  | [Probes] object           | 存活探针  |
| npu_type        | String                                                     | NPU类型 |
| readiness_probe | [Probes] object           |       |
   
 表5Envs 
| 参数         | 参数类型                                                   | 描述   |
|:---|:---|:---|
| name       | String                                                 | 名称   |
| value      | String                                                 | 值    |
| field_path | String                                                 | 路径字段 |
| value_from | [ValueFrom] object | 值表单  |
   
 表6ValueFrom 
| 参数        | 参数类型                                       | 描述     |
|:---|:---|:---|
| configmap | [Env] object | 配置项    |
| secret    | [Env] object | secret |
| field     | String                                     | 字段     |
   
 表7Env 
| 参数   | 参数类型   | 描述 |
|:---|:---|:---|
| name | String | 名字 |
| key  | String | 值  |
   
 表8Volume 
| 参数           | 参数类型    | 描述   |
|:---|:---|:---|
| name         | String  | 名称   |
| type         | String  | 类型   |
| read_only    | Boolean | 只读   |
| source       | String  | 源    |
| destination  | String  | 目标   |
| default_mode | Integer | 默认模式 |
   
 表9Config 
| 参数             | 参数类型                                                   | 描述        |
|:---|:---|:---|
| host_network   | Boolean                                                | 主机网络      |
| ports          | Array of [Port] objects | 端口        |
| restart_policy | String                                                 | 重启策略      |
| privileged     | Boolean                                                | 特权        |
| host_pid       | Boolean                                                | 主机PID     |
| run_as_user    | Integer                                                | 运行身份      |
| dns_policy     | String                                                 | DNSPolicy |
   
 表10Port 
| 参数              | 参数类型                                                   | 描述     |
|:---|:---|:---|
| container_port  | Integer                                                | 容器端口   |
| host_port       | Integer                                                | 主机端口   |
| host_ip         | String                                                 | 主机IP   |
| host_port_range | [PortRange] object | 主机端口范围 |
   
 表11PortRange 
| 参数       | 参数类型    | 描述   |
|:---|:---|:---|
| min_port | Integer | 最小端口 |
| max_port | Integer | 最大端口 |
   
 表12ResourceVal 
| 参数       | 参数类型                                                   | 描述   |
|:---|:---|:---|
| limits   | [ResourceV] object | 限制配额 |
| requests | [ResourceV] object | 请求配额 |
   
 表13ResourceV 
| 参数     | 参数类型  | 描述  |
|:---|:---|:---|
| cpu    | Float | CPU |
| memory | Float | 内存  |
| gpu    | Float | GPU |
| npu    | Float | NPU |
   
 表14Probes 
| 参数                    | 参数类型                                                               | 描述      |
|:---|:---|:---|
| initial_delay_seconds | Integer                                                            | 初始化时间延迟 |
| timeout_seconds       | Integer                                                            | 超时      |
| exec_command          | String                                                             | 执行命令    |
| http_get              | [HTTPGetAction] object     | http请求  |
| tcp_socket            | [TCPSocketAction] object | tcp套接字  |
   
 表15HTTPGetAction 
| 参数     | 参数类型    | 描述        |
|:---|:---|:---|
| path   | String  | 路径        |
| port   | Integer | 端口        |
| host   | String  | 主机        |
| scheme | String  | URIScheme |
   
 表16TCPSocketAction 
| 参数   | 参数类型    | 描述 |
|:---|:---|:---|
| port | Integer | 端口 |
| host | String  | 主机 |
   
 表17Attribute 
| 参数    | 参数类型   | 描述  |
|:---|:---|:---|
| key   | String | 属性名 |
| value | String | 属性值 |
   
#### 请求示例
```
/v2/{project_id}/edgemgr/shared-apps/{app_id}
{ }
```
#### 响应示例
**状态码：200**
查询共享应用模板详情响应体
```
{
  "app" : {
    "id" : "string",
    "name" : "string",
    "description" : "string",
    "project_id" : "string",
    "from_ief_instance_id" : "string",
    "from_ief_instance_name" : "string",
    "created_at" : "string",
    "updated_at" : "string",
    "alias" : "string",
    "svc_type" : "string",
    "visibility" : "string",
    "icon_url" : "string",
    "provider_endpoint" : "string",
    "app_versions" : [ {
      "id" : "string",
      "created_at" : "string",
      "updated_at" : "string",
      "project_id" : "string",
      "image_url" : "string",
      "envs" : [ {
        "name" : "string",
        "value" : "string",
        "field_path" : "string",
        "value_from" : {
          "configmap" : {
            "name" : "string",
            "key" : "string"
          },
          "secret" : {
            "name" : "string",
            "key" : "string"
          },
          "field" : "string"
        }
      } ],
      "volumes" : [ {
        "name" : "string",
        "type" : "string",
        "read_only" : true,
        "source" : "string",
        "destination" : "string",
        "default_mode" : 0
      } ],
      "configs" : {
        "host_network" : true,
        "ports" : [ {
          "container_port" : 0,
          "host_port" : 0,
          "host_ip" : "string",
          "host_port_range" : {
            "min_port" : 0,
            "max_port" : 0
          }
        } ],
        "restart_policy" : "string",
        "privileged" : true,
        "host_pid" : true,
        "run_as_user" : 0,
        "dns_policy" : "string"
      },
      "resources" : {
        "limits" : {
          "cpu" : 0,
          "memory" : 0,
          "gpu" : 0,
          "npu" : 0
        },
        "requests" : {
          "cpu" : 0,
          "memory" : 0,
          "gpu" : 0,
          "npu" : 0
        }
      },
      "arch" : "string",
      "command" : [ "string" ],
      "args" : [ "string" ],
      "version" : "string",
      "liveness_probe" : {
        "initial_delay_seconds" : 0,
        "timeout_seconds" : 0,
        "exec_command" : "string",
        "http_get" : {
          "path" : "string",
          "port" : 0,
          "host" : "string",
          "scheme" : "string"
        },
        "tcp_socket" : {
          "port" : 0,
          "host" : "string"
        }
      },
      "npu_type" : "string",
      "readiness_probe" : {
        "initial_delay_seconds" : 0,
        "timeout_seconds" : 0,
        "exec_command" : "string",
        "http_get" : {
          "path" : "string",
          "port" : 0,
          "host" : "string",
          "scheme" : "string"
        },
        "tcp_socket" : {
          "port" : 0,
          "host" : "string"
        }
      }
    } ],
    "tags" : [ {
      "key" : "string",
      "value" : "string"
    } ]
  }
}
```
#### 状态码
| 状态码 | 描述            |
|:---|:---|
| 200 | 查询共享应用模板详情响应体 |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-ief/ErrorCode.html)。
