@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)", date="2022-08-09T19:16:34.234Z") 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.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnApp(Construct scope,
java.lang.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 |
---|---|
java.lang.Object |
getAppSource()
A `Source` object that specifies the app repository.
|
java.lang.Object |
getAttributes()
One or more user-defined key/value pairs to be added to the stack attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getDataSources()
The app's data source.
|
java.lang.String |
getDescription()
A description of the app.
|
java.util.List<java.lang.String> |
getDomains()
The app virtual host settings, with multiple domains separated by commas.
|
java.lang.Object |
getEnableSsl()
Whether to enable SSL for the app.
|
java.lang.Object |
getEnvironment()
An array of `EnvironmentVariable` objects that specify environment variables to be associated with the app.
|
java.lang.String |
getName()
The app name.
|
java.lang.String |
getShortname()
The app's short name.
|
java.lang.Object |
getSslConfiguration()
An `SslConfiguration` object with the SSL configuration.
|
java.lang.String |
getStackId()
The stack ID.
|
java.lang.String |
getType()
The app type.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.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(java.util.Map<java.lang.String,java.lang.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(java.util.List<java.lang.Object> value)
The app's data source.
|
void |
setDescription(java.lang.String value)
A description of the app.
|
void |
setDomains(java.util.List<java.lang.String> value)
The app virtual host settings, with multiple domains separated by commas.
|
void |
setEnableSsl(java.lang.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(java.util.List<java.lang.Object> value)
An array of `EnvironmentVariable` objects that specify environment variables to be associated with the app.
|
void |
setName(java.lang.String value)
The app name.
|
void |
setShortname(java.lang.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(java.lang.String value)
The stack ID.
|
void |
setType(java.lang.String value)
The app type.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnApp(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnApp(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnApp(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getName()
public void setName(java.lang.String value)
public java.lang.String getStackId()
public void setStackId(java.lang.String value)
public java.lang.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
.
public void setType(java.lang.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
.
public java.lang.Object getAppSource()
public void setAppSource(CfnApp.SourceProperty value)
public void setAppSource(IResolvable value)
public java.lang.Object getAttributes()
public void setAttributes(IResolvable value)
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> value)
public java.lang.Object getDataSources()
public void setDataSources(IResolvable value)
public void setDataSources(java.util.List<java.lang.Object> value)
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.util.List<java.lang.String> getDomains()
For example: 'www.example.com, example.com'
public void setDomains(java.util.List<java.lang.String> value)
For example: 'www.example.com, example.com'
public java.lang.Object getEnableSsl()
public void setEnableSsl(java.lang.Boolean value)
public void setEnableSsl(IResolvable value)
public java.lang.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.
public void setEnvironment(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.
public void setEnvironment(java.util.List<java.lang.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.
public java.lang.String getShortname()
public void setShortname(java.lang.String value)
public java.lang.Object getSslConfiguration()
public void setSslConfiguration(IResolvable value)
public void setSslConfiguration(CfnApp.SslConfigurationProperty value)