Interface ICfnLayerProps
Properties for defining a CfnLayer
.
Namespace: Amazon.CDK.AWS.OpsWorks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnLayerProps
Syntax (vb)
Public Interface 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
Properties
Attributes | One or more user-defined key-value pairs to be added to the stack attributes. |
Auto |
Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer . |
Auto |
For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances. |
Custom |
The ARN of an IAM profile to be used for the layer's EC2 instances. |
Custom |
A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances. |
Custom |
A |
Custom |
An array containing the layer custom security group IDs. |
Enable |
Whether to disable auto healing for the layer. |
Install |
Whether to install operating system and package updates when the instance boots. |
Lifecycle |
A |
Load |
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. |
Stack |
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. |
Use |
Whether to use Amazon EBS-optimized instances. |
Volume |
A |
Properties
Attributes
One or more user-defined key-value pairs to be added to the stack attributes.
virtual object Attributes { get; }
Property Value
System.
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 .
object AutoAssignElasticIps { get; }
Property Value
System.
Remarks
AutoAssignPublicIps
For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances.
object AutoAssignPublicIps { get; }
Property Value
System.
Remarks
CustomInstanceProfileArn
The ARN of an IAM profile to be used for the layer's EC2 instances.
virtual string CustomInstanceProfileArn { get; }
Property Value
System.
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.
virtual object CustomJson { get; }
Property Value
System.
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.
virtual object CustomRecipes { get; }
Property Value
System.
Remarks
CustomSecurityGroupIds
An array containing the layer custom security group IDs.
virtual string[] CustomSecurityGroupIds { get; }
Property Value
System.
Remarks
EnableAutoHealing
Whether to disable auto healing for the layer.
object EnableAutoHealing { get; }
Property Value
System.
Remarks
InstallUpdatesOnBoot
Whether to install operating system and package updates when the instance boots.
virtual object InstallUpdatesOnBoot { get; }
Property Value
System.
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.
virtual object LifecycleEventConfiguration { get; }
Property Value
System.
Remarks
LoadBasedAutoScaling
The load-based scaling configuration for the AWS OpsWorks layer.
virtual object LoadBasedAutoScaling { get; }
Property Value
System.
Remarks
Name
The layer name, which is used by the console.
string Name { get; }
Property Value
System.
Remarks
Layer names can be a maximum of 32 characters.
Packages
An array of Package
objects that describes the layer packages.
virtual string[] Packages { get; }
Property Value
System.
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.
string Shortname { get; }
Property Value
System.
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.
string StackId { get; }
Property Value
System.
Remarks
Tags
Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer.
virtual ICfnTag[] Tags { get; }
Property Value
ICfn
Remarks
Use tags to manage your resources.
Type
The layer type.
string Type { get; }
Property Value
System.
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.
virtual object UseEbsOptimizedInstances { get; }
Property Value
System.
Remarks
VolumeConfigurations
A VolumeConfigurations
object that describes the layer's Amazon EBS volumes.
virtual object VolumeConfigurations { get; }
Property Value
System.