选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

AWS::OpsWorks::App

聚焦模式

本页内容

AWS::OpsWorks::App - AWS CloudFormation
此页面尚未翻译为您的语言。 请求翻译
筛选器视图

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::OpsWorks::App", "Properties" : { "AppSource" : Source, "Attributes" : {Key: Value, ...}, "DataSources" : [ DataSource, ... ], "Description" : String, "Domains" : [ String, ... ], "EnableSsl" : Boolean, "Environment" : [ EnvironmentVariable, ... ], "Name" : String, "Shortname" : String, "SslConfiguration" : SslConfiguration, "StackId" : String, "Type" : String } }

YAML

Type: AWS::OpsWorks::App Properties: AppSource: Source Attributes: Key: Value DataSources: - DataSource Description: String Domains: - String EnableSsl: Boolean Environment: - EnvironmentVariable Name: String Shortname: String SslConfiguration: SslConfiguration StackId: String Type: String

Properties

AppSource

A Source object that specifies the app repository.

Required: No

Type: Source

Update requires: No interruption

Attributes

One or more user-defined key/value pairs to be added to the stack attributes.

Required: No

Type: Object of String

Pattern: [a-zA-Z0-9]+

Update requires: No interruption

DataSources

The app's data source.

Required: No

Type: Array of DataSource

Update requires: No interruption

Description

A description of the app.

Required: No

Type: String

Update requires: No interruption

Domains

The app virtual host settings, with multiple domains separated by commas. For example: 'www.example.com, example.com'

Required: No

Type: Array of String

Update requires: No interruption

EnableSsl

Whether to enable SSL for the app.

Required: No

Type: Boolean

Update requires: No interruption

Environment

An array of EnvironmentVariable objects that specify environment variables to be associated with the app. After you deploy the app, these variables are defined on the associated app server instance. For more information, see Environment Variables.

There is no specific limit on the number of environment variables. However, the size of the associated data structure - which includes the variables' names, values, and protected flag values - cannot exceed 20 KB. This limit should accommodate most if not all use cases. Exceeding it will cause an exception with the message, "Environment: is too large (maximum is 20KB)."

Note

If you have specified one or more environment variables, you cannot modify the stack's Chef version.

Required: No

Type: Array of EnvironmentVariable

Update requires: No interruption

Name

The app name.

Required: Yes

Type: String

Update requires: No interruption

Shortname

The app's short name.

Required: No

Type: String

Update requires: Replacement

SslConfiguration

An SslConfiguration object with the SSL configuration.

Required: No

Type: SslConfiguration

Update requires: No interruption

StackId

The stack ID.

Required: Yes

Type: String

Update requires: Replacement

Type

The app type. Each supported type is associated with a particular layer. For example, PHP applications are associated with a PHP layer. AWS OpsWorks Stacks deploys an application to those instances that are members of the corresponding layer. If your app isn't one of the standard types, or you prefer to implement your own Deploy recipes, specify other.

Required: Yes

Type: String

Allowed values: aws-flow-ruby | java | rails | php | nodejs | static | other

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the resource name. For example:

{ "Ref": "myApp" }

For the AWS OpsWorks stack myApp, Ref returns the ID of the AWS OpsWorks app.

For more information about using the Ref function, see Ref.

Fn::GetAtt

Examples

Template Snippet

The following snippet creates an AWS OpsWorks app that uses a PHP application in a Git repository:

JSON

"myApp" : { "Type" : "AWS::OpsWorks::App", "Properties" : { "StackId" : {"Ref":"myStack"}, "Type" : "php", "Name" : "myPHPapp", "AppSource" : { "Type" : "git", "Url" : "git://github.com/amazonwebservices/opsworks-demo-php-simple-app.git", "Revision" : "version1" } } }

YAML

myApp: Type: "AWS::OpsWorks::App" Properties: StackId: Ref: "myStack" Type: "php" Name: "myPHPapp" AppSource: Type: "git" Url: "git://github.com/amazonwebservices/opsworks-demo-php-simple-app.git" Revision: "version1"

See also

下一主题:

DataSource

上一主题:

AWS OpsWorks
隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。