Class CfnApp
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::OpsWorks::App
.
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();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A fluent builder forCfnApp
.static interface
Describes an app's data source.static interface
Represents an app's environment variable.static interface
Contains the information required to retrieve an app or cookbook from a repository.static interface
Describes an app's SSL configuration.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionASource
object that specifies the app repository.One or more user-defined key/value pairs to be added to the stack attributes.The app's data source.A description of the app.The app virtual host settings, with multiple domains separated by commas.Whether to enable SSL for the app.An array ofEnvironmentVariable
objects that specify environment variables to be associated with the app.getName()
The app name.The app's short name.AnSslConfiguration
object with the SSL configuration.The stack ID.getType()
The app type.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAppSource
(IResolvable value) ASource
object that specifies the app repository.void
ASource
object that specifies the app repository.void
setAttributes
(Map<String, String> value) One or more user-defined key/value pairs to be added to the stack attributes.void
setAttributes
(IResolvable value) One or more user-defined key/value pairs to be added to the stack attributes.void
setDataSources
(List<Object> value) The app's data source.void
setDataSources
(IResolvable 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
(List<Object> value) An array ofEnvironmentVariable
objects that specify environment variables to be associated with the app.void
setEnvironment
(IResolvable value) An array ofEnvironmentVariable
objects that specify environment variables to be associated with the app.void
The app name.void
setShortname
(String value) The app's short name.void
setSslConfiguration
(IResolvable value) AnSslConfiguration
object with the SSL configuration.void
AnSslConfiguration
object with the SSL configuration.void
setStackId
(String value) The stack ID.void
The app type.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnApp
protected CfnApp(software.amazon.jsii.JsiiObjectRef objRef) -
CfnApp
protected CfnApp(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnApp
@Stability(Stable) public CfnApp(@NotNull Construct scope, @NotNull String id, @NotNull CfnAppProps props) Create a newAWS::OpsWorks::App
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getName
The app name. -
setName
The app name. -
getStackId
The stack ID. -
setStackId
The stack ID. -
getType
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
. -
setType
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
. -
getAppSource
ASource
object that specifies the app repository. -
setAppSource
ASource
object that specifies the app repository. -
setAppSource
ASource
object that specifies the app repository. -
getAttributes
One or more user-defined key/value pairs to be added to the stack attributes. -
setAttributes
One or more user-defined key/value pairs to be added to the stack attributes. -
setAttributes
One or more user-defined key/value pairs to be added to the stack attributes. -
getDataSources
The app's data source. -
setDataSources
The app's data source. -
setDataSources
The app's data source. -
getDescription
A description of the app. -
setDescription
A description of the app. -
getDomains
The app virtual host settings, with multiple domains separated by commas.For example:
'www.example.com, example.com'
-
setDomains
The app virtual host settings, with multiple domains separated by commas.For example:
'www.example.com, example.com'
-
getEnableSsl
Whether to enable SSL for the app. -
setEnableSsl
Whether to enable SSL for the app. -
setEnableSsl
Whether to enable SSL for the app. -
getEnvironment
An array ofEnvironmentVariable
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)."
If you have specified one or more environment variables, you cannot modify the stack's Chef version.
-
setEnvironment
An array ofEnvironmentVariable
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)."
If you have specified one or more environment variables, you cannot modify the stack's Chef version.
-
setEnvironment
An array ofEnvironmentVariable
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)."
If you have specified one or more environment variables, you cannot modify the stack's Chef version.
-
getShortname
The app's short name. -
setShortname
The app's short name. -
getSslConfiguration
AnSslConfiguration
object with the SSL configuration. -
setSslConfiguration
AnSslConfiguration
object with the SSL configuration. -
setSslConfiguration
AnSslConfiguration
object with the SSL configuration.
-