Updated on 2026-04-16 GMT+08:00

Obtaining an Add-on Template

Function

This API is used to obtain an add-on template.

URI

GET /v1/addontemplates/{id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

id

Yes

String

Add-on template ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

Identity authentication information. Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

kind

String

API type

apiVersion

String

API version

metadata

AddonObjectMeta object

Resource metadata

spec

AddonTemplateSpec object

Desired status of the add-on template

Table 4 AddonObjectMeta

Parameter

Type

Description

uid

String

UID

name

String

Object name

labels

Map<String,String>

Object label

annotations

Map<String,String>

Object annotation

creationTimestamp

String

Creation time

updateTimestamp

String

Update time

Table 5 AddonTemplateSpec

Parameter

Type

Description

type

String

Add-on installation type. The value can be helm or static.

require

Boolean

Whether the add-on is mandatory

labels

Array of strings

Add-on label list

logoURL

String

Logo URL

readmeURL

String

README URL

description

String

Description

versions

Array of AddonVersion objects

Add-on version list

Table 6 AddonVersion

Parameter

Type

Description

id

String

Add-on package version ID

version

String

Add-on version

input

Map<String,Object>

Input

stable

Boolean

Whether the add-on version is a stable release

translate

Map<String,Object>

Translation information used by the GUI

supportVersions

Array of SupportVersion objects

Supported cluster types and versions

creationTimestamp

String

Record creation time

updateTimestamp

String

Record update time

Table 7 SupportVersion

Parameter

Type

Description

category

String

Supported cluster category

clusterType

String

Supported cluster types (such as BareMetal, VirtualMachine, and Windows)

clusterVersion

Array of strings

Supported cluster versions (regular expressions are supported, for example, .* matches all cluster versions)

Status code: 400

Table 8 Response body parameters

Parameter

Type

Description

-

String

-

Status code: 404

Table 9 Response body parameters

Parameter

Type

Description

-

String

-

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

-

String

-

Example Requests

None

Example Responses

Status code: 200

Add-on template obtained.

{
  "kind" : "Addon",
  "apiVersion" : "v3",
  "metadata" : {
    "uid" : "swr-kritis",
    "name" : "swr-kritis",
    "creationTimestamp" : "2021-06-07T03:08:19Z",
    "updateTimestamp" : "2021-07-22T06:12:30Z"
  },
  "spec" : {
    "type" : "helm",
    "labels" : [ "Maintenance" ],
    "description" : "A component",
    "versions" : [ {
      "version" : "1.0.1",
      "input" : {
        "basic" : {
          "image_version" : "1.0.1",
          "platform" : "linux-amd64",
          "swr_addr" : "100.79.1.215:20202",
          "swr_user" : "hwofficial"
        },
        "parameters" : {
          "custom" : {
            "kms" : {
              "key_id" : "291bb3b7-c57f-45fb-8690-66f68a06de58,291bb3b7-c57f-45fb-8690-66f68a06de58"
            },
            "verify_images" : "niuwz2-asm4a4-cer.swr.myhuaweicloud.com/test/*:*,niuwz2-asm4a4-cer.swr.myhuaweicloud.com/test2/*:*"
          },
          "flavor1" : {
            "description" : "Has only one instance",
            "name" : "Single",
            "replicas" : 1,
            "resources" : [ {
              "limitsCpu" : "2000m",
              "limitsMem" : "256Mi",
              "name" : "swr-kritis",
              "requestsCpu" : "200m",
              "requestsMem" : "64Mi"
            } ]
          }
        }
      },
      "stable" : true,
      "translate" : {
        "en_US" : {
          "addon" : {
            "changeLog" : "add kritis",
            "description" : "kritis plugin, signature"
          },
          "description" : {
            "Parameters.custom.kms.keyid" : "kms of key id, 291bb3b7-c57f-45fb-8690-66f68a06de58,391aa321-az72-3fab-4680-12f58c1645g6",
            "Parameters.custom.verifyimages" : "verify signature of the blacklist, test-asm4a4-cer.swr.myhuaweicloud.com/test/*:*,test-asm4a4-cer.swr.myhuaweicloud.com/test2/*:*"
          }
        },
        "zh_CN" : {
          "addon" : {
            "changeLog" : "Added kritis",
            "description" : "kritis add-on for signature verification"
          },
          "description" : {
            "Parameters.custom.kms.keyid.d" : "Key ID of the KMS signature. The format is 291bb3b7-c57f-45fb-8690-66f68a06de58,391aa321-az72-3fab-4680-12f58c1645g6.",
            "Parameters.custom.verifyimages" : "Blocklist that requires signature verification. The format is test-asm4a4-cer.swr.myhuaweicloud.com/test/*:*,test-asm4a4-cer.swr.myhuaweicloud.com/test2/*:*."
          }
        }
      },
      "supportVersions" : [ {
        "clusterType" : "VirtualMachine",
        "clusterVersion" : [ "v1.(15|17|19).*" ]
      }, {
        "clusterType" : "ARM64",
        "clusterVersion" : [ "v1.(15).*" ]
      } ],
      "creationTimestamp" : "2021-06-08T14:02:02Z",
      "updateTimestamp" : "2021-06-09T12:29:07Z"
    } ]
  }
}

Status Codes

Status Code

Description

200

Add-on template obtained.

400

Client request error. The server could not execute the request.

404

Resource not found.

500

Internal server error.

Error Codes

See Error Codes.