All Products
Search
Document Center

Service Catalog:GetTemplate

Last Updated:Mar 03, 2024

Queries the details of a template.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ProductIdstringYes

The ID of the product.

prod-bp18r7q127****
ProductVersionIdstringYes

The ID of the product version.

pv-bp15e79d26****

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

0FEEF92D-4052-5202-87D0-3D8EC16F81BF
TemplateBodystring

The content of the template.

For more information about the template syntax, see Structure of Terraform templates.

{ "ROSTemplateFormatVersion": "2015-09-01", "Transform": "Aliyun::Terraform-v1.1", "Workspace": { "main.tf": "variable \"name\" { default = \"auto_provisioning_group\"}" }, "Outputs": {} }

Examples

Sample success responses

JSONformat

{
  "RequestId": "0FEEF92D-4052-5202-87D0-3D8EC16F81BF",
  "TemplateBody": "{\n  \"ROSTemplateFormatVersion\": \"2015-09-01\",\n  \"Transform\": \"Aliyun::Terraform-v1.1\",\n  \"Workspace\": {\n    \"main.tf\": \"variable  \\\"name\\\" {  default = \\\"auto_provisioning_group\\\"}\"\n  },\n  \"Outputs\": {}\n}"
}

Error codes

HTTP status codeError codeError message
500InternalErrorA system error occurred.

For a list of error codes, visit the Service error codes.