@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.112Z") @Stability(value=Stable) public class CfnApp extends CfnResource implements IInspectable
Creates an app for a specified stack. For more information, see Creating Apps .
Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.opsworks.*;
CfnApp cfnApp = CfnApp.Builder.create(this, "MyCfnApp")
.name("name")
.stackId("stackId")
.type("type")
// the properties below are optional
.appSource(SourceProperty.builder()
.password("password")
.revision("revision")
.sshKey("sshKey")
.type("type")
.url("url")
.username("username")
.build())
.attributes(Map.of(
"attributesKey", "attributes"))
.dataSources(List.of(DataSourceProperty.builder()
.arn("arn")
.databaseName("databaseName")
.type("type")
.build()))
.description("description")
.domains(List.of("domains"))
.enableSsl(false)
.environment(List.of(EnvironmentVariableProperty.builder()
.key("key")
.value("value")
// the properties below are optional
.secure(false)
.build()))
.shortname("shortname")
.sslConfiguration(SslConfigurationProperty.builder()
.certificate("certificate")
.chain("chain")
.privateKey("privateKey")
.build())
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnApp.Builder
A fluent builder for
CfnApp. |
static interface |
CfnApp.DataSourceProperty
Describes an app's data source.
|
static interface |
CfnApp.EnvironmentVariableProperty
Represents an app's environment variable.
|
static interface |
CfnApp.SourceProperty
Contains the information required to retrieve an app or cookbook from a repository.
|
static interface |
CfnApp.SslConfigurationProperty
Describes an app's SSL configuration.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnApp(software.constructs.Construct scope,
String id,
CfnAppProps props)
Create a new `AWS::OpsWorks::App`.
|
protected |
CfnApp(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnApp(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAppSource()
A `Source` object that specifies the app repository.
|
Object |
getAttributes()
One or more user-defined key/value pairs to be added to the stack attributes.
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getDataSources()
The app's data source.
|
String |
getDescription()
A description of the app.
|
List<String> |
getDomains()
The app virtual host settings, with multiple domains separated by commas.
|
Object |
getEnableSsl()
Whether to enable SSL for the app.
|
Object |
getEnvironment()
An array of `EnvironmentVariable` objects that specify environment variables to be associated with the app.
|
String |
getName()
The app name.
|
String |
getShortname()
The app's short name.
|
Object |
getSslConfiguration()
An `SslConfiguration` object with the SSL configuration.
|
String |
getStackId()
The stack ID.
|
String |
getType()
The app type.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAppSource(CfnApp.SourceProperty value)
A `Source` object that specifies the app repository.
|
void |
setAppSource(IResolvable value)
A `Source` object that specifies the app repository.
|
void |
setAttributes(IResolvable value)
One or more user-defined key/value pairs to be added to the stack attributes.
|
void |
setAttributes(Map<String,String> value)
One or more user-defined key/value pairs to be added to the stack attributes.
|
void |
setDataSources(IResolvable value)
The app's data source.
|
void |
setDataSources(List<Object> value)
The app's data source.
|
void |
setDescription(String value)
A description of the app.
|
void |
setDomains(List<String> value)
The app virtual host settings, with multiple domains separated by commas.
|
void |
setEnableSsl(Boolean value)
Whether to enable SSL for the app.
|
void |
setEnableSsl(IResolvable value)
Whether to enable SSL for the app.
|
void |
setEnvironment(IResolvable value)
An array of `EnvironmentVariable` objects that specify environment variables to be associated with the app.
|
void |
setEnvironment(List<Object> value)
An array of `EnvironmentVariable` objects that specify environment variables to be associated with the app.
|
void |
setName(String value)
The app name.
|
void |
setShortname(String value)
The app's short name.
|
void |
setSslConfiguration(CfnApp.SslConfigurationProperty value)
An `SslConfiguration` object with the SSL configuration.
|
void |
setSslConfiguration(IResolvable value)
An `SslConfiguration` object with the SSL configuration.
|
void |
setStackId(String value)
The stack ID.
|
void |
setType(String value)
The app type.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnApp(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnApp(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnApp(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnAppProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getName()
@Stability(value=Stable)
public void setName(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getStackId()
@Stability(value=Stable)
public void setStackId(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getType()
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 .
@Stability(value=Stable)
public void setType(@NotNull
String value)
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 .
@Stability(value=Stable) @Nullable public Object getAppSource()
@Stability(value=Stable)
public void setAppSource(@Nullable
CfnApp.SourceProperty value)
@Stability(value=Stable)
public void setAppSource(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Object getAttributes()
@Stability(value=Stable)
public void setAttributes(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setAttributes(@Nullable
Map<String,String> value)
@Stability(value=Stable) @Nullable public Object getDataSources()
@Stability(value=Stable)
public void setDataSources(@Nullable
IResolvable value)
@Stability(value=Stable)
public void setDataSources(@Nullable
List<Object> value)
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public List<String> getDomains()
For example: 'www.example.com, example.com'
@Stability(value=Stable)
public void setDomains(@Nullable
List<String> value)
For example: 'www.example.com, example.com'
@Stability(value=Stable) @Nullable public Object getEnableSsl()
@Stability(value=Stable)
public void setEnableSsl(@Nullable
Boolean value)
@Stability(value=Stable)
public void setEnableSsl(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Object getEnvironment()
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)."
If you have specified one or more environment variables, you cannot modify the stack's Chef version.
@Stability(value=Stable)
public void setEnvironment(@Nullable
IResolvable value)
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)."
If you have specified one or more environment variables, you cannot modify the stack's Chef version.
@Stability(value=Stable)
public void setEnvironment(@Nullable
List<Object> value)
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)."
If you have specified one or more environment variables, you cannot modify the stack's Chef version.
@Stability(value=Stable) @Nullable public String getShortname()
@Stability(value=Stable)
public void setShortname(@Nullable
String value)
@Stability(value=Stable) @Nullable public Object getSslConfiguration()
@Stability(value=Stable)
public void setSslConfiguration(@Nullable
CfnApp.SslConfigurationProperty value)
@Stability(value=Stable)
public void setSslConfiguration(@Nullable
IResolvable value)
Copyright © 2022. All rights reserved.