更改类型架构 - AMS 高级用户指南

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

更改类型架构

所有变更类型都提供一个 JSON 架构,供您在创建、修改或访问资源时输入内容。架构提供参数及其描述,供您创建更改请求 (RFC)。

成功执行 RFC 会产生执行输出。为了进行配置 RFCs,执行输出包括一个 “stack_id”,它表示中的堆栈 CloudFormation,可以在控制台中搜索。 CloudFormation 执行输出有时包括创建的实例 ID 的输出,该 ID 可用于在相应的 AWS 控制台中搜索该实例。例如,创建 ELB CT 执行输出包括一个可在中搜索的 “stack_id”, CloudFormation 并输出一个可在亚马逊控制台中搜索 Elastic Load Balancing <stack-xxxx>的 key=elb value=。 EC2

让我们来看看 CT 架构。这是 CodeDeploy 应用程序创建的架构,这是一个相当小的架构。有些架构的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。

 

 

在 “参数” 部分中,您可以为正在创建的资源或您请求的操作指定设置。

 

 

 

 

“其他属性” 部分让您知道哪些参数是必需的,哪些是可选的。

注意

此架构最多允许 7 个标签;但是,EFS EC2、RDS 和多层创建架构最多允许 50 个标签。