既存のテンプレートの情報を更新します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
oos:UpdateTemplate |
update |
*template
|
|
|
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| RegionId |
string |
任意 |
リージョン ID。 |
cn-hangzhou |
| TemplateName |
string |
必須 |
テンプレートの名前。名前の長さは最大 200 文字で、英字、数字、ハイフン (-)、アンダースコア (_) を使用できます。名前の先頭に ALIYUN、ACS、ALIBABA、または ALICLOUD を使用することはできません。 |
MyTemplate |
| Content |
string |
必須 |
テンプレートのコンテンツ。コンテンツは JSON または YAML フォーマットである必要があり、最大サイズは 64 KB です。 |
{ "FormatVersion": "OOS-2019-06-01", "Description": { "en": "Bulky starts the ECS instances", "zh-cn": "批量启动ECS实例", "name-en": "Bulky Start Instances", "name-zh-cn": "批量启动实例" }, "Parameters": { "regionId": { "Type": "String", "Label": { "en": "RegionId", "zh-cn": "地域ID" }, "AssociationProperty": "RegionId", "Default": "{{ ACS::RegionId }}" }, "targets": { "Type": "Json", "Label": { "en": "TargetInstance", "zh-cn": "目标实例" }, "AssociationProperty": "Targets", "AssociationPropertyMetadata": { "ResourceType": "ALIYUN::ECS::Instance", "RegionId": "regionId" } }, "rateControl": { "Label": { "en": "RateControl", "zh-cn": "任务执行的并发比率" }, "Type": "Json", "AssociationProperty": "RateControl", "Default": { "Mode": "Concurrency", "MaxErrors": 0, "Concurrency": 10 } }, "OOSAssumeRole": { "Label": { "en": "OOSAssumeRole", "zh-cn": "OOS扮演的RAM角色" }, "Type": "String", "Default": "OOSServiceRole" } }, "RamRole": "{{ OOSAssumeRole }}", "Tasks": [ { "Name": "getInstance", "Description": { "en": "Views the ECS instances", "zh-cn": "获取ECS实例" }, "Action": "ACS::SelectTargets", "Properties": { "ResourceType": "ALIYUN::ECS::Instance", "RegionId": "{{ regionId }}", "Filters": [ "{{ targets }}" ] }, "Outputs": { "instanceIds": { "Type": "List", "ValueSelector": "Instances.Instance[].InstanceId" } } }, { "Name": "startInstance", "Action": "ACS::ECS::StartInstance", "Description": { "en": "Starts the ECS instances", "zh-cn": "启动实例" }, "Properties": { "regionId": "{{ regionId }}", "instanceId": "{{ ACS::TaskLoopItem }}" }, "Loop": { "RateControl": "{{ rateControl }}", "Items": "{{ getInstance.instanceIds }}" } } ], "Outputs": { "instanceIds": { "Type": "List", "Value": "{{ getInstance.instanceIds }}" } } } |
| Tags |
object |
任意 |
タグのキーと値。キーと値のペアの数は 1 から 20 の範囲です。 |
{"k1":"k2","k2":"v2"} |
| VersionName |
string |
任意 |
テンプレートバージョンの名前。 |
v2 |
| ResourceGroupId |
string |
任意 |
リソースグループの ID。 |
rg-acfmxsn4m4****** |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| RequestId |
string |
リクエスト ID。 |
2075899A-585D-4A41-A9B2-28DF4F534F |
| Template |
object |
テンプレートのメタデータ。 |
|
| Hash |
string |
テンプレートコンテンツの SHA-256 値。 |
4bc7d7a21b3e003434b9c223f6e6d2578b5ebfeb5be28c1fcf8a8a1b11907bb4 |
| UpdatedDate |
string |
テンプレート情報が最後に変更された時刻。 |
2019-05-16T10:26:14Z |
| UpdatedBy |
string |
テンプレート情報を最後に変更したユーザー。 |
root(1309000) |
| Tags |
object |
タグのキーと値。キーと値のペアの数は 1 から 20 の範囲です。 |
{"k1":"k2","k2":"v2"} |
| TemplateName |
string |
テンプレートの名前。 |
MyTemplate |
| TemplateVersion |
string |
テンプレートのバージョン。バージョンの名前は、文字 v と数字で構成されます。数字は 1 から始まります。 |
v2 |
| TemplateFormat |
string |
テンプレートのフォーマット。システムは、フォーマットが JSON か YAML かを自動的に判断します。 |
JSON |
| Description |
string |
テンプレートの説明。 |
Describe instances of given status |
| ResourceGroupId |
string |
リソースグループの ID。 |
rg-acfmxsn4m4****** |
| CreatedBy |
string |
テンプレートを作成したユーザー。 |
root(130920000) |
| CreatedDate |
string |
テンプレートが作成された時刻。 |
2019-05-16T10:26:14Z |
| TemplateId |
string |
テンプレートの ID。 |
t-94753deed38 |
| HasTrigger |
boolean |
テンプレートにトリガーが設定されているかどうかを示します。 |
true |
| ShareType |
string |
テンプレートの共有タイプ。ユーザーが作成したテンプレートの共有タイプは Private です。 |
Private |
例
成功レスポンス
JSONJSON
{
"RequestId": "2075899A-585D-4A41-A9B2-28DF4F534F",
"Template": {
"Hash": "4bc7d7a21b3e003434b9c223f6e6d2578b5ebfeb5be28c1fcf8a8a1b11907bb4",
"UpdatedDate": "2019-05-16T10:26:14Z",
"UpdatedBy": "root(1309000)",
"Tags": {
"k1": "k2",
"k2": "v2"
},
"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,
"ShareType": "Private"
}
}
エラーコード
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。