文档

GetAgent - 获取代理

更新时间:
一键部署

获取代理详情。

接口说明

  • 获取代理,您必须有 mgw:GetImportAgent 权限。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求语法

GET /agent/{agentName} HTTP/1.1 Host: userid.cn-hangzhou.mgw.aliyuncs.com

请求参数

名称类型必填描述示例值
agentNamestring

代理名称。

teast_agent_name

返回参数

名称类型描述示例值
object

获取代理响应体。

ImportAgentGetAgentResp

获取代理详情。

示例

正常返回示例

JSON格式

{
  "ImportAgent": {
    "Owner": "test_owner",
    "Name": "test_name",
    "CreateTime": "2024-05-01T12:00:00.000Z",
    "ModifyTime": "2024-05-01T12:00:00.000Z",
    "DeployMethod": "default",
    "AgentEndpoint": "vpc",
    "ActivationKey": "6af62558-970d-4f44-8663-4e297170fd6a",
    "Tags": "K1:V1,K2:V2",
    "Version": "test_agent_id",
    "TunnelId": "test_tunnel_id"
  }
}

XML格式

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ImportAgent>
  <Owner>test_owner</Owner>
  <Name>test_name</Name>
  <CreateTime>2024-05-01T12:00:00.000Z</CreateTime>
  <ModifyTime>2024-05-01T12:00:00.000Z</ModifyTime>
  <DeployMethod>default</DeployMethod>
  <AgentEndpoint>vpc</AgentEndpoint>
  <ActivationKey>6af62558-970d-4f44-8663-4e297170fd6a</ActivationKey>
  <Tags>K1:V1,K2:V2</Tags>
  <Version>test_agent_id</Version>
  <TunnelId>test_tunnel_id</TunnelId>
</ImportAgent>

错误码

访问错误中心查看更多错误码。