All Products
Search
Document Center

Container Service for Kubernetes:DescribeTemplateAttribute

Last Updated:Aug 28, 2026

An orchestration template defines and describes a group of Kubernetes resources. It declaratively describes the configuration of an application or how an application runs. You can call the DescribeTemplates API operation to query orchestration templates and their detailed information, including access permissions, YAML content, and labels.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cs:DescribeTemplateAttribute

get

*All Resource

*

None None

Request syntax

GET /templates/{TemplateId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

TemplateId

string

Yes

The ID of the template.

874ec485-e7e6-4373-8a3b-47bde8a****

Request parameters

Parameter

Type

Required

Description

Example

template_type

string

No

The type of template. The value can be a custom value.

  • If the parameter is set to kubernetes, the template is displayed on the Templates page in the console.

  • If the parameter is set to compose, the template is displayed on the Container Service - Swarm page in the console. Container Service for Swarm is deprecated.

  • If the value of the parameter is not kubernetes, the template is not displayed on the Templates page in the console. We recommend that you set the parameter to kubernetes.

Default value: kubernetes.

kubernetes

Response elements

Element

Type

Description

Example

array

The details of the queried template.

object

id

string

The ID of the template. When you update a template, a new template ID is generated.

72d20cf8-a533-4ea9-a10d-e7630d3d****

acl

string

The access control policy of the template.

private

name

string

The name of the template.

web

template

string

The template content in the YAML format.

apiVersion: V1\n***

template_type

string

The type of template. The value can be a custom value.

  • If the parameter is set to kubernetes, the template is displayed on the Templates page in the console.

  • If the parameter is set to compose, the template is displayed on the Container Service - Swarm page in the console. Container Service for Swarm is deprecated.

  • If the value of the parameter is not kubernetes, the template is not displayed on the Templates page in the console. We recommend that you set the parameter to kubernetes.

Default value: kubernetes.

kubernetes

description

string

The description of the template.

test template

tags

string

The label of the template.

sa

template_with_hist_id

string

The unique ID of the template. The value remains unchanged after the template is updated.

874ec485-e7e6-4373-8a3b-47bde8ae****

created

string

The time when the template was created.

2025-04-25T16:56:33+08:00

updated

string

The time when the template was updated.

2025-04-25T16:56:33+08:00

Examples

Success response

JSON format

[
  {
    "id": "72d20cf8-a533-4ea9-a10d-e7630d3d****",
    "acl": "private",
    "name": "web",
    "template": "apiVersion: V1\\n***",
    "template_type": "kubernetes",
    "description": "test template",
    "tags": "sa",
    "template_with_hist_id": "874ec485-e7e6-4373-8a3b-47bde8ae****",
    "created": "2025-04-25T16:56:33+08:00",
    "updated": "2025-04-25T16:56:33+08:00"
  }
]

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.