Class CfnLayerProps
Properties for defining a CfnLayer
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.OpsWorks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnLayerProps : Object, ICfnLayerProps
Syntax (vb)
Public Class CfnLayerProps
Inherits Object
Implements ICfnLayerProps
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.OpsWorks;
var customJson;
var cfnLayerProps = new CfnLayerProps {
AutoAssignElasticIps = false,
AutoAssignPublicIps = false,
EnableAutoHealing = false,
Name = "name",
Shortname = "shortname",
StackId = "stackId",
Type = "type",
// the properties below are optional
Attributes = new Dictionary<string, string> {
{ "attributesKey", "attributes" }
},
CustomInstanceProfileArn = "customInstanceProfileArn",
CustomJson = customJson,
CustomRecipes = new RecipesProperty {
Configure = new [] { "configure" },
Deploy = new [] { "deploy" },
Setup = new [] { "setup" },
Shutdown = new [] { "shutdown" },
Undeploy = new [] { "undeploy" }
},
CustomSecurityGroupIds = new [] { "customSecurityGroupIds" },
InstallUpdatesOnBoot = false,
LifecycleEventConfiguration = new LifecycleEventConfigurationProperty {
ShutdownEventConfiguration = new ShutdownEventConfigurationProperty {
DelayUntilElbConnectionsDrained = false,
ExecutionTimeout = 123
}
},
LoadBasedAutoScaling = new LoadBasedAutoScalingProperty {
DownScaling = new AutoScalingThresholdsProperty {
CpuThreshold = 123,
IgnoreMetricsTime = 123,
InstanceCount = 123,
LoadThreshold = 123,
MemoryThreshold = 123,
ThresholdsWaitTime = 123
},
Enable = false,
UpScaling = new AutoScalingThresholdsProperty {
CpuThreshold = 123,
IgnoreMetricsTime = 123,
InstanceCount = 123,
LoadThreshold = 123,
MemoryThreshold = 123,
ThresholdsWaitTime = 123
}
},
Packages = new [] { "packages" },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
UseEbsOptimizedInstances = false,
VolumeConfigurations = new [] { new VolumeConfigurationProperty {
Encrypted = false,
Iops = 123,
MountPoint = "mountPoint",
NumberOfDisks = 123,
RaidLevel = 123,
Size = 123,
VolumeType = "volumeType"
} }
};
Synopsis
Constructors
CfnLayerProps() |
Properties
Attributes | One or more user-defined key-value pairs to be added to the stack attributes. |
AutoAssignElasticIps | Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer . |
AutoAssignPublicIps | For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances. |
CustomInstanceProfileArn | The ARN of an IAM profile to be used for the layer's EC2 instances. |
CustomJson | A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances. |
CustomRecipes | A |
CustomSecurityGroupIds | An array containing the layer custom security group IDs. |
EnableAutoHealing | Whether to disable auto healing for the layer. |
InstallUpdatesOnBoot | Whether to install operating system and package updates when the instance boots. |
LifecycleEventConfiguration | A |
LoadBasedAutoScaling | The load-based scaling configuration for the AWS OpsWorks layer. |
Name | The layer name, which is used by the console. |
Packages | An array of |
Shortname | 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. |
StackId | The layer stack ID. |
Tags | Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer. |
Type | The layer type. |
UseEbsOptimizedInstances | Whether to use Amazon EBS-optimized instances. |
VolumeConfigurations | A |
Constructors
CfnLayerProps()
public CfnLayerProps()
Properties
Attributes
One or more user-defined key-value pairs to be added to the stack attributes.
public object Attributes { get; set; }
Property Value
System.Object
Remarks
To create a cluster layer, set the EcsClusterArn
attribute to the cluster's ARN.
AutoAssignElasticIps
Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer .
public object AutoAssignElasticIps { get; set; }
Property Value
System.Object
Remarks
AutoAssignPublicIps
For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances.
public object AutoAssignPublicIps { get; set; }
Property Value
System.Object
Remarks
CustomInstanceProfileArn
The ARN of an IAM profile to be used for the layer's EC2 instances.
public string CustomInstanceProfileArn { get; set; }
Property Value
System.String
Remarks
For more information about IAM ARNs, see Using Identifiers .
CustomJson
A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances.
public object CustomJson { get; set; }
Property Value
System.Object
Remarks
For more information, see Using Custom JSON . This feature is supported as of version 1.7.42 of the AWS CLI .
CustomRecipes
A LayerCustomRecipes
object that specifies the layer custom recipes.
public object CustomRecipes { get; set; }
Property Value
System.Object
Remarks
CustomSecurityGroupIds
An array containing the layer custom security group IDs.
public string[] CustomSecurityGroupIds { get; set; }
Property Value
System.String[]
Remarks
EnableAutoHealing
Whether to disable auto healing for the layer.
public object EnableAutoHealing { get; set; }
Property Value
System.Object
Remarks
InstallUpdatesOnBoot
Whether to install operating system and package updates when the instance boots.
public object InstallUpdatesOnBoot { get; set; }
Property Value
System.Object
Remarks
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
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.
public object LifecycleEventConfiguration { get; set; }
Property Value
System.Object
Remarks
LoadBasedAutoScaling
The load-based scaling configuration for the AWS OpsWorks layer.
public object LoadBasedAutoScaling { get; set; }
Property Value
System.Object
Remarks
Name
The layer name, which is used by the console.
public string Name { get; set; }
Property Value
System.String
Remarks
Layer names can be a maximum of 32 characters.
Packages
An array of Package
objects that describes the layer packages.
public string[] Packages { get; set; }
Property Value
System.String[]
Remarks
Shortname
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.
public string Shortname { get; set; }
Property Value
System.String
Remarks
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
The layer stack ID.
public string StackId { get; set; }
Property Value
System.String
Remarks
Tags
Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer.
public ICfnTag[] Tags { get; set; }
Property Value
ICfnTag[]
Remarks
Use tags to manage your resources.
Type
The layer type.
public string Type { get; set; }
Property Value
System.String
Remarks
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.
UseEbsOptimizedInstances
Whether to use Amazon EBS-optimized instances.
public object UseEbsOptimizedInstances { get; set; }
Property Value
System.Object
Remarks
VolumeConfigurations
A VolumeConfigurations
object that describes the layer's Amazon EBS volumes.
public object VolumeConfigurations { get; set; }
Property Value
System.Object