All Products
Search
Document Center

Operation Orchestration Service:UpdateTemplate

Last Updated:Oct 13, 2022

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All resources is used in the Resource type column of the operation.
  • Condition keyword: refers to the condition keyword defined by the cloud product itself.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operateaccess levelResource typeconditional keywordAssociation operation
oos:UpdateTemplateWRITE
  • OOS
    acs:oos:{#regionId}:{#accountId}:template/{#templateName}
  • oos:tag
without

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

地域ID

cn-hangzhou
TemplateNamestringYes

The name of the template. The template name can be up to 200 characters in length. The name can contain letters, digits, hyphens (-), and underscores (_). It cannot start with ALIYUN, ACS, ALIBABA, or ALICLOUD.

MyTemplate
ContentstringYes

The content of the template. The content must be in JSON or YAML format. Length constraint: Maximum length of 64 KB.

{"FormatVersion": "OOS-2019-06-01", "Description": "Describe instances of given status", "Parameters": {"Status": {"Type": "String", "Description": "(Required) The status of the Ecs instance."}}, "Tasks": [{"Properties": {"Parameters": {"Status": "{{ Status }}"}, "API": "DescribeInstances", "Service": "Ecs"}, "Name": "foo", "Action": "ACS::ExecuteApi"}]
TagsobjectNo

标签键及值,键值对数量限制为1至20。

VersionNamestringNo

模版版本名称。

v2
ResourceGroupIdstringNo

资源组ID。

rg-acfmxsn4m4******

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

2075899A-585D-4A41-A9B2-28DF4F534F
Templateobject

The metadata of the template.

Hashstring

The SHA256 hash of the template content.

4bc7d7a21b3e003434b9c223f6e6d2578b5ebfeb5be28c1fcf8a8a1b11907bb4
UpdatedDatestring

The time when the template is updated.

2019-05-16T10:26:14Z
UpdatedBystring

The user who updates the template.

root(1309000)
Tagsobject

标签键及值,键值对数量限制为1至20。

TemplateNamestring

The name of the template.

MyTemplate
TemplateVersionstring

The version of the template. The format is the letter v and a number. The number starts from 1.

v2
TemplateFormatstring

The format of the template. The format can be JSON or YAML. The system automatically identifies the format.

JSON
Descriptionstring

The description of the template.

Describe instances of given status
ResourceGroupIdstring

资源组ID。

rg-acfmxsn4m4******
CreatedBystring

The creator of the template.

root(130920000)
CreatedDatestring

The time when the template is created.

2019-05-16T10:26:14Z
TemplateIdstring

The ID of the template.

t-94753deed38
HasTriggerboolean

是否成功触发

true
ShareTypestring

The sharing type of the template. The sharing type of templates created by users is set to Private.

Private

Example

Request example

http(s)://[Endpoint]/?Action=UpdateTemplate
&RegionId=cn-hangzhou
&TemplateName=MyTemplate
&Content={"FormatVersion": "OOS-2019-06-01", "Description": "Describe instances of given status", "Parameters": {"Status": {"Type": "String", "Description": "(Required) The status of the Ecs instance."}}, "Tasks": [{"Properties": {"Parameters": {"Status": "{{ Status }}"}, "API": "DescribeInstances", "Service": "Ecs"}, "Name": "foo", "Action": "ACS::ExecuteApi"}]
&VersionName=v2
&ResourceGroupId=rg-acfmxsn4m4******
&Common request parameters

Normal return example

JSONFormat

{
    "RequestId": "2075899A-585D-4A41-A9B2-28DF4F534F",
    "Template": {
        "Hash": "4bc7d7a21b3e003434b9c223f6e6d2578b5ebfeb5be28c1fcf8a8a1b11907bb4",
        "UpdatedDate": "2019-05-16T10:26:14Z",
        "UpdatedBy": "root(1309000)",
        "TemplateName": "MyTemplate",
        "TemplateVersion": "v2",
        "TemplateFormat": "JSON",
        "Description": "Describe instances of given status",
        "ResourceGroupId": "rg-acfmxsn4m4******",
        "CreatedBy": "root(130920000)",
        "CreatedDate": "2019-05-16T10:26:14Z",
        "TemplateId": "t-94753deed38",
        "HasTrigger": true,
        "Tags": {
            "k1": "v1",
            "k2": "v2"
        },
        "ShareType": "Private"
    }
}

XMLFormat

<UpdateTemplateResponse>
    <RequestId>2075899A-585D-4A41-A9B2-28DF4F534F</RequestId>
    <Template>
        <Hash>4bc7d7a21b3e003434b9c223f6e6d2578b5ebfeb5be28c1fcf8a8a1b11907bb4</Hash>
        <UpdatedDate>2019-05-16T10:26:14Z</UpdatedDate>
        <UpdatedBy>root(1309000)</UpdatedBy>
        <TemplateName>MyTemplate</TemplateName>
        <TemplateVersion>v2</TemplateVersion>
        <TemplateFormat>JSON</TemplateFormat>
        <Description>Describe instances of given status</Description>
        <ResourceGroupId>rg-acfmxsn4m4******</ResourceGroupId>
        <CreatedBy>root(130920000)</CreatedBy>
        <CreatedDate>2019-05-16T10:26:14Z</CreatedDate>
        <TemplateId>t-94753deed38</TemplateId>
        <HasTrigger>true</HasTrigger>
        <Tags>
            <k1>v1</k1>
            <k2>v2</k2>
        </Tags>
        <ShareType>Private</ShareType>
    </Template>
</UpdateTemplateResponse>

Error codes

For a list of error codes, visit the API error center.