aws-cdk-lib.aws_opsworks.CfnLayerProps

interface CfnLayerProps

LanguageType name
.NETAmazon.CDK.AWS.OpsWorks.CfnLayerProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsopsworks#CfnLayerProps
Javasoftware.amazon.awscdk.services.opsworks.CfnLayerProps
Pythonaws_cdk.aws_opsworks.CfnLayerProps
TypeScript aws-cdk-lib » 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 { aws_opsworks as opsworks } from 'aws-cdk-lib';

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

NameTypeDescription
autoAssignElasticIpsboolean | IResolvableWhether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer .
autoAssignPublicIpsboolean | IResolvableFor stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances.
enableAutoHealingboolean | IResolvableWhether to disable auto healing for the layer.
namestringThe layer name, which is used by the console.
shortnamestringFor 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.
stackIdstringThe layer stack ID.
typestringThe layer type.
attributes?IResolvable | { [string]: string }One or more user-defined key-value pairs to be added to the stack attributes.
customInstanceProfileArn?stringThe ARN of an IAM profile to be used for the layer's EC2 instances.
customJson?anyA JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances.
customRecipes?IResolvable | RecipesPropertyA LayerCustomRecipes object that specifies the layer custom recipes.
customSecurityGroupIds?string[]An array containing the layer custom security group IDs.
installUpdatesOnBoot?boolean | IResolvableWhether to install operating system and package updates when the instance boots.
lifecycleEventConfiguration?IResolvable | LifecycleEventConfigurationPropertyA 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?IResolvable | LoadBasedAutoScalingPropertyThe load-based scaling configuration for the AWS OpsWorks layer.
packages?string[]An array of Package objects that describes the layer packages.
tags?CfnTag[]Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer.
useEbsOptimizedInstances?boolean | IResolvableWhether to use Amazon EBS-optimized instances.
volumeConfigurations?IResolvable | IResolvable | VolumeConfigurationProperty[]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 | RecipesProperty (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 | LifecycleEventConfigurationProperty (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 | LoadBasedAutoScalingProperty (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: CfnTag[] (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 | VolumeConfigurationProperty[] (optional)

A VolumeConfigurations object that describes the layer's Amazon EBS volumes.