全部产品
存储与CDN 数据库 安全 应用服务 数加·人工智能 数加·大数据基础服务 互联网中间件 视频服务 开发者工具 解决方案 物联网 钉钉智能硬件
资源编排

查询资源类型模板信息

更新时间:2017-06-07 13:26:11

查询资源类型模板信息

描述:查询单个资源类型对应的模板信息

请求参数

名称 位置 类型 是否必须 描述
TypeName URI String 资源类型名称

返回参数

名称 参数类型 描述
ROSTemplateFormatVersion String 模板版本号
Parameters Json 输入参数:输入参数中定义了通过此模板创建堆栈时需要指定的参数,这些参数用来订制每次堆栈创建的细节,比如用户名、密码,环境相关的ECS规格等。
Outputs Json 输出参数:输出参数定义了堆栈创建后需要返回给用户的信息
Resources Json 资源:资源给出了ROS通过模板部署的云资源的具体的定义。每个资源在一个独立的resource块中定义。

错误码

错误代码 描述 Http状态码 语义
InternalError Server error 500 服务器端出现未知异常
ResourceTypeNotFound The Resource Type (%(type_name)s) could not be found. 404 资源类型无法找到

示例

请求示例

GET http://ros.aliyuncs.com/resource_types/ALIYUN::SLB::LoadBalancer/template HTTP/1.1
x-acs-signature-method: HMAC-SHA1
Authorization: acs ACSTQDkNtSMrZtwL:niea/6wW/HHwwiafneHX+oM3ALU=
Date: Fri, 11 Sep 2015 05:30:54 GMT
x-acs-signature-version: 1.0
x-sdk-client: Java/2.0.0
Accept: application/octet-stream
x-acs-version: 2015-09-01
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.6.0_27
Host: ros.aliyuncs.com
Connection: keep-alive

返回示例

HTTP/1.1 200 OK
Date: Fri, 11 Sep 2015 05:30:12 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 1694
Connection: close
Vary: Accept-Encoding
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, GET, OPTIONS
Access-Control-Allow-Headers: X-Requested-With, X-Sequence, _aop_secret, _aop_signature
Access-Control-Max-Age: 172800
X-Acs-Request-Id: A21A4B12-CCD7-42F0-9A62-DE8347D88385
Server: Jetty(7.2.2.v20101205)



{
  "ROSTemplateFormatVersion" : "2015-09-01",
  "Parameters" : {
    "InternetChargeType" : {
      "AllowedValues" : [
        "paybybandwidth",
        "paybytraffic"
      ],
      "Type" : "String",
      "Description" : "The charging type of network billing."
    },
    "AddressType" : {
      "AllowedValues" : [
        "internet",
        "intranet"
      ],
      "Type" : "String",
      "Description" : "The type of address."
    },
    "Bandwidth" : {
      "Description" : "The bandwidth in Mbps of network.",
      "Type" : "Number",
      "MinValue" : 1,
      "MaxValue" : 1000
    },
    "VpcId" : {
      "Type" : "String",
      "Description" : "The id of virtual private cloud."
    },
    "VSwitchId" : {
      "Type" : "String",
      "Description" : "The id of software-based network switch."
    },
    "LoadBalancerName" : {
      "Type" : "String",
      "Description" : "The display name of load balance."
    }
  },
  "Outputs" : {
    "LoadBalancerId" : {
      "Value" : "{\"Fn::GetAtt\": [\"LoadBalance\", \"LoadBalancerId\"]}",
      "Description" : "The id of load balance generated"
    }
  },
  "Resources" : {
    "LoadBalance" : {
      "Type" : "ALIYUN::SLB::LoadBalancer",
      "Properties" : {
        "InternetChargeType" : {
          "Ref" : "InternetChargeType"
        },
        "AddressType" : {
          "Ref" : "AddressType"
        },
        "Bandwidth" : {
          "Ref" : "Bandwidth"
        },
        "VpcId" : {
          "Ref" : "VpcId"
        },
        "VSwitchId" : {
          "Ref" : "VSwitchId"
        },
        "LoadBalancerName" : {
          "Ref" : "LoadBalancerName"
        }
      }
    }
  }
}
本文导读目录