Class CfnLayer
Inherited Members
Namespace: Amazon.CDK.AWS.OpsWorks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnLayer : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnLayer
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html
CloudformationResource: AWS::OpsWorks::Layer
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 cfnLayer = new CfnLayer(this, "MyCfnLayer", 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
CfnLayer(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnLayer(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnLayer(Construct, String, ICfnLayerProps) |
Properties
Attributes | One or more user-defined key-value pairs to be added to the stack attributes. |
AttrId | |
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. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
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 | Tag Manager which manages the tags for this resource. |
TagsRaw | 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 |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnLayer(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnLayer(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnLayer(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnLayer(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnLayer(Construct, String, ICfnLayerProps)
public CfnLayer(Construct scope, string id, ICfnLayerProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnLayerProps
Resource properties.
Properties
Attributes
One or more user-defined key-value pairs to be added to the stack attributes.
public virtual object Attributes { get; set; }
Property Value
System.Object
AttrId
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
AutoAssignElasticIps
Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer .
public virtual object AutoAssignElasticIps { get; set; }
Property Value
System.Object
AutoAssignPublicIps
For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances.
public virtual object AutoAssignPublicIps { get; set; }
Property Value
System.Object
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
CustomInstanceProfileArn
The ARN of an IAM profile to be used for the layer's EC2 instances.
public virtual string CustomInstanceProfileArn { get; set; }
Property Value
System.String
CustomJson
A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances.
public virtual object CustomJson { get; set; }
Property Value
System.Object
CustomRecipes
A LayerCustomRecipes
object that specifies the layer custom recipes.
public virtual object CustomRecipes { get; set; }
Property Value
System.Object
CustomSecurityGroupIds
An array containing the layer custom security group IDs.
public virtual string[] CustomSecurityGroupIds { get; set; }
Property Value
System.String[]
EnableAutoHealing
Whether to disable auto healing for the layer.
public virtual object EnableAutoHealing { get; set; }
Property Value
System.Object
InstallUpdatesOnBoot
Whether to install operating system and package updates when the instance boots.
public virtual object InstallUpdatesOnBoot { get; set; }
Property Value
System.Object
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 virtual object LifecycleEventConfiguration { get; set; }
Property Value
System.Object
LoadBasedAutoScaling
The load-based scaling configuration for the AWS OpsWorks layer.
public virtual object LoadBasedAutoScaling { get; set; }
Property Value
System.Object
Name
The layer name, which is used by the console.
public virtual string Name { get; set; }
Property Value
System.String
Packages
An array of Package
objects that describes the layer packages.
public virtual string[] Packages { get; set; }
Property Value
System.String[]
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 virtual string Shortname { get; set; }
Property Value
System.String
StackId
The layer stack ID.
public virtual string StackId { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
Type
The layer type.
public virtual string Type { get; set; }
Property Value
System.String
UseEbsOptimizedInstances
Whether to use Amazon EBS-optimized instances.
public virtual object UseEbsOptimizedInstances { get; set; }
Property Value
System.Object
VolumeConfigurations
A VolumeConfigurations
object that describes the layer's Amazon EBS volumes.
public virtual object VolumeConfigurations { get; set; }
Property Value
System.Object
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>