變更類型結構描述 - AMS 進階使用者指南

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

變更類型結構描述

所有變更類型都會為資源的建立、修改或存取中的輸入提供 JSON 結構描述。結構描述提供參數及其描述,供您建立變更請求 (RFC)。

成功執行 RFC 會產生執行輸出。對於佈建 RFCs,執行輸出包含代表 CloudFormation 中堆疊的 "stack_id",並且可以在 CloudFormation 主控台中搜尋。執行輸出有時包含所建立執行個體 ID 的輸出,該 ID 可用於在對應的 AWS 主控台中搜尋執行個體。例如,建立 ELB CT 執行輸出包含可在 CloudFormation 中搜尋的 "stack_id",並輸出可在 Elastic Load Balancing Amazon EC2 主控台中搜尋的 key=ELB value=<stack-xxxx>。

讓我們檢查 CT 結構描述。這是 CodeDeploy Application Create 的結構描述,這是一個相當小的結構描述。有些結構描述的區域非常大Parameter

{ "$schema": "http://json-schema.org/draft-04/schema#", "name": "Create CodeDeploy application", "description": "Use to create an AWS CodeDeploy application resource with the specified name.", "type": "object", "properties": { "Description": { "description": "The reason for the request.", "type": "string", "minLength": 1, "maxLength": 500 }, "VpcId": { "description": "ID of the vpc to use, in the form vpc-0123abcd or vpc-01234567890abcdef.", "type": "string", "pattern": "^vpc-[a-z0-9]{8}$" }, "StackTemplateId": { "description": "Must be stm-sft6rv00000000000", "type": "string", "enum": ["stm-sft6rv00000000000"] }, "Name":{ "description": "A name for the stack or stack component; this becomes the Stack Name.", "type": "string", "minLength": 1, "maxLength": 255 }, "Tags": { "description": "Up to seven tags (key/value pairs) to categorize the resource.", "type": "array", "items": { "type": "object", "properties": { "Key": { "type": "string", "minLength": 1, "maxLength": 127 }, "Value": { "type": "string", "minLength": 1, "maxLength": 255 } }, "additionalProperties": false, "required": [ "Key", "Value" ] }, "minItems": 1, "maxItems": 7 }, "TimeoutInMinutes": { "description": "The maximum amount of time, in minutes, to allow for execution of the change. This will not prolong execution, but the RFC fails if the change is not completed in the specified time. Valid values are 60 up to 360, for long-running UserData.", "type": "number", "minimum": 0, "maximum": 60 }, "Parameters": { "description": "Specifications for the stack.", "type": "object", "properties": { "CodeDeployApplicationName": { "description": "The name of an AWS CodeDeploy application.", "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^[a-zA-Z0-9._+=,@-]{1,100}$" } }, "additionalProperties": false, "required": [ "CodeDeployApplicationName" ] } }, "additionalProperties": false, "required": [ "Description", "VpcId", "StackTemplateId", "Name", "TimeoutInMinutes", "Parameters" ] }

結構描述的第一部分提供 AMS 所請求變更類型的相關資訊。

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TimeoutInMinutes 參數可讓您指出執行變更類型的界限時間。對於長時間執行的 UserData,有效值為 60 到 360。

 

 

參數區段可讓您為要建立的資源或您要請求的動作指定設定。

 

 

 

 

「其他屬性」區段可讓您知道需要哪些參數,以及哪些參數是選用的。

注意

此結構描述最多允許七個標籤;不過,EC2、EFS、RDS 和多層建立結構描述最多允許 50 個標籤。