interface CfnLayerProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.OpsWorks.CfnLayerProps |
Java | software.amazon.awscdk.services.opsworks.CfnLayerProps |
Python | aws_cdk.aws_opsworks.CfnLayerProps |
TypeScript | @aws-cdk/aws-opsworks » CfnLayerProps |
Properties for defining a CfnLayer
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as opsworks from '@aws-cdk/aws-opsworks';
declare const customJson: any;
const cfnLayerProps: opsworks.CfnLayerProps = {
autoAssignElasticIps: false,
autoAssignPublicIps: false,
enableAutoHealing: false,
name: 'name',
shortname: 'shortname',
stackId: 'stackId',
type: 'type',
// the properties below are optional
attributes: {
attributesKey: 'attributes',
},
customInstanceProfileArn: 'customInstanceProfileArn',
customJson: customJson,
customRecipes: {
configure: ['configure'],
deploy: ['deploy'],
setup: ['setup'],
shutdown: ['shutdown'],
undeploy: ['undeploy'],
},
customSecurityGroupIds: ['customSecurityGroupIds'],
installUpdatesOnBoot: false,
lifecycleEventConfiguration: {
shutdownEventConfiguration: {
delayUntilElbConnectionsDrained: false,
executionTimeout: 123,
},
},
loadBasedAutoScaling: {
downScaling: {
cpuThreshold: 123,
ignoreMetricsTime: 123,
instanceCount: 123,
loadThreshold: 123,
memoryThreshold: 123,
thresholdsWaitTime: 123,
},
enable: false,
upScaling: {
cpuThreshold: 123,
ignoreMetricsTime: 123,
instanceCount: 123,
loadThreshold: 123,
memoryThreshold: 123,
thresholdsWaitTime: 123,
},
},
packages: ['packages'],
tags: [{
key: 'key',
value: 'value',
}],
useEbsOptimizedInstances: false,
volumeConfigurations: [{
encrypted: false,
iops: 123,
mountPoint: 'mountPoint',
numberOfDisks: 123,
raidLevel: 123,
size: 123,
volumeType: 'volumeType',
}],
};
Properties
Name | Type | Description |
---|---|---|
auto | boolean | IResolvable | Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer . |
auto | boolean | IResolvable | For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances. |
enable | boolean | IResolvable | Whether to disable auto healing for the layer. |
name | string | The layer name, which is used by the console. |
shortname | string | For custom layers only, use this parameter to specify the layer's short name, which is used internally by AWS OpsWorks Stacks and by Chef recipes. |
stack | string | The layer stack ID. |
type | string | The layer type. |
attributes? | IResolvable | { [string]: string } | One or more user-defined key-value pairs to be added to the stack attributes. |
custom | string | The ARN of an IAM profile to be used for the layer's EC2 instances. |
custom | any | A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances. |
custom | IResolvable | Recipes | A LayerCustomRecipes object that specifies the layer custom recipes. |
custom | string[] | An array containing the layer custom security group IDs. |
install | boolean | IResolvable | Whether to install operating system and package updates when the instance boots. |
lifecycle | IResolvable | Lifecycle | A LifeCycleEventConfiguration object that you can use to configure the Shutdown event to specify an execution timeout and enable or disable Elastic Load Balancer connection draining. |
load | IResolvable | Load | The load-based scaling configuration for the AWS OpsWorks layer. |
packages? | string[] | An array of Package objects that describes the layer packages. |
tags? | Cfn [] | Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer. |
use | boolean | IResolvable | Whether to use Amazon EBS-optimized instances. |
volume | IResolvable | IResolvable | Volume [] | A VolumeConfigurations object that describes the layer's Amazon EBS volumes. |
autoAssignElasticIps
Type:
boolean |
IResolvable
Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer .
autoAssignPublicIps
Type:
boolean |
IResolvable
For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances.
For more information, see How to Edit a Layer .
enableAutoHealing
Type:
boolean |
IResolvable
Whether to disable auto healing for the layer.
name
Type:
string
The layer name, which is used by the console.
Layer names can be a maximum of 32 characters.
shortname
Type:
string
For custom layers only, use this parameter to specify the layer's short name, which is used internally by AWS OpsWorks Stacks and by Chef recipes.
The short name is also used as the name for the directory where your app files are installed. It can have a maximum of 32 characters, which are limited to the alphanumeric characters, '-', '_', and '.'.
Built-in layer short names are defined by AWS OpsWorks Stacks. For more information, see the Layer Reference .
stackId
Type:
string
The layer stack ID.
type
Type:
string
The layer type.
A stack cannot have more than one built-in layer of the same type. It can have any number of custom layers. Built-in layers are not available in Chef 12 stacks.
attributes?
Type:
IResolvable
| { [string]: string }
(optional)
One or more user-defined key-value pairs to be added to the stack attributes.
To create a cluster layer, set the EcsClusterArn
attribute to the cluster's ARN.
customInstanceProfileArn?
Type:
string
(optional)
The ARN of an IAM profile to be used for the layer's EC2 instances.
For more information about IAM ARNs, see Using Identifiers .
customJson?
Type:
any
(optional)
A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances.
For more information, see Using Custom JSON . This feature is supported as of version 1.7.42 of the AWS CLI .
customRecipes?
Type:
IResolvable
|
Recipes
(optional)
A LayerCustomRecipes
object that specifies the layer custom recipes.
customSecurityGroupIds?
Type:
string[]
(optional)
An array containing the layer custom security group IDs.
installUpdatesOnBoot?
Type:
boolean |
IResolvable
(optional)
Whether to install operating system and package updates when the instance boots.
The default value is true
. To control when updates are installed, set this value to false
. You must then update your instances manually by using CreateDeployment to run the update_dependencies
stack command or by manually running yum
(Amazon Linux) or apt-get
(Ubuntu) on the instances.
To ensure that your instances have the latest security updates, we strongly recommend using the default value of
true
.
lifecycleEventConfiguration?
Type:
IResolvable
|
Lifecycle
(optional)
A LifeCycleEventConfiguration
object that you can use to configure the Shutdown event to specify an execution timeout and enable or disable Elastic Load Balancer connection draining.
loadBasedAutoScaling?
Type:
IResolvable
|
Load
(optional)
The load-based scaling configuration for the AWS OpsWorks layer.
packages?
Type:
string[]
(optional)
An array of Package
objects that describes the layer packages.
tags?
Type:
Cfn
[]
(optional)
Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer.
Use tags to manage your resources.
useEbsOptimizedInstances?
Type:
boolean |
IResolvable
(optional)
Whether to use Amazon EBS-optimized instances.
volumeConfigurations?
Type:
IResolvable
|
IResolvable
|
Volume
[]
(optional)
A VolumeConfigurations
object that describes the layer's Amazon EBS volumes.