创建模板 - CreateTemplate
功能介绍
创建RFS模板。
授权信息
账号根用户具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备如下身份策略权限,更多的权限说明请参见权限和授权项。
授权项 | 访问级别 | 资源类型(*为必须) | 条件键 | 别名 | 依赖的授权项 |
|---|---|---|---|---|---|
rgc:template:create | Write | - | - | - | - |
URI
POST /v1/rgc/templates
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
template_name | 是 | String | 模板名称。 |
template_type | 是 | String | 模板类型。predefined:预置;customized:自定义。 |
template_description | 否 | String | 模板描述。 |
template_body | 否 | String | 模板内容。 |
响应参数
状态码:201
参数 | 参数类型 | 描述 |
|---|---|---|
template_id | String | 模板ID。 |
template_version | String | 模板版本。 |
template_name | String | 模板名称。 |
状态码:403
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码 |
error_msg | String | 错误信息 |
request_id | String | 请求唯一标识 |
encoded_authorization_message | String | 加密的错误信息 |
details | Array of ForbiddenErrorDetail objects | 跨服务调用无权限错误信息 |
请求示例
创建RFS模板。
POST https://{endpoint}/v1/rgc/templates
{
"template_name" : "string",
"template_type" : "string",
"template_description" : "string",
"template_body" : "string"
} 响应示例
状态码:201
创建成功。
{
"template_id" : "string",
"template_version" : "string",
"template_name" : "string"
} 状态码
状态码 | 描述 |
|---|---|
201 | 创建成功。 |
403 | 请求无权限。 |
错误码
请参见错误码。

