Class CfnLayer
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.opsworks.CfnLayer
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-05T03:43:46.743Z")
@Stability(Stable)
public class CfnLayer
extends CfnResource
implements IInspectable, ITaggable
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-layer.html.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.opsworks.*; Object customJson; CfnLayer cfnLayer = CfnLayer.Builder.create(this, "MyCfnLayer") .autoAssignElasticIps(false) .autoAssignPublicIps(false) .enableAutoHealing(false) .name("name") .shortname("shortname") .stackId("stackId") .type("type") // the properties below are optional .attributes(Map.of( "attributesKey", "attributes")) .customInstanceProfileArn("customInstanceProfileArn") .customJson(customJson) .customRecipes(RecipesProperty.builder() .configure(List.of("configure")) .deploy(List.of("deploy")) .setup(List.of("setup")) .shutdown(List.of("shutdown")) .undeploy(List.of("undeploy")) .build()) .customSecurityGroupIds(List.of("customSecurityGroupIds")) .installUpdatesOnBoot(false) .lifecycleEventConfiguration(LifecycleEventConfigurationProperty.builder() .shutdownEventConfiguration(ShutdownEventConfigurationProperty.builder() .delayUntilElbConnectionsDrained(false) .executionTimeout(123) .build()) .build()) .loadBasedAutoScaling(LoadBasedAutoScalingProperty.builder() .downScaling(AutoScalingThresholdsProperty.builder() .cpuThreshold(123) .ignoreMetricsTime(123) .instanceCount(123) .loadThreshold(123) .memoryThreshold(123) .thresholdsWaitTime(123) .build()) .enable(false) .upScaling(AutoScalingThresholdsProperty.builder() .cpuThreshold(123) .ignoreMetricsTime(123) .instanceCount(123) .loadThreshold(123) .memoryThreshold(123) .thresholdsWaitTime(123) .build()) .build()) .packages(List.of("packages")) .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .useEbsOptimizedInstances(false) .volumeConfigurations(List.of(VolumeConfigurationProperty.builder() .encrypted(false) .iops(123) .mountPoint("mountPoint") .numberOfDisks(123) .raidLevel(123) .size(123) .volumeType("volumeType") .build())) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Example:static final class
A fluent builder forCfnLayer
.static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnLayer
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnLayer
(software.amazon.jsii.JsiiObjectRef objRef) CfnLayer
(software.constructs.Construct scope, String id, CfnLayerProps props) -
Method Summary
Modifier and TypeMethodDescriptionOne or more user-defined key-value pairs to be added to the stack attributes.Whether to automatically assign an Elastic IP address to the layer's instances.For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances.The ARN of an IAM profile to be used for the layer's EC2 instances.A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances.ALayerCustomRecipes
object that specifies the layer custom recipes.An array containing the layer custom security group IDs.Whether to disable auto healing for the layer.Whether to install operating system and package updates when the instance boots.ALifeCycleEventConfiguration
object that you can use to configure the Shutdown event to specify an execution timeout and enable or disable Elastic Load Balancer connection draining.The load-based scaling configuration for the AWS OpsWorks layer.getName()
The layer name, which is used by the console.An array ofPackage
objects that describes the layer packages.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 layer stack ID.getTags()
Tag Manager which manages the tags for this resource.Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer.getType()
The layer type.Whether to use Amazon EBS-optimized instances.AVolumeConfigurations
object that describes the layer's Amazon EBS volumes.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAttributes
(Map<String, String> value) One or more user-defined key-value pairs to be added to the stack attributes.void
setAttributes
(IResolvable value) One or more user-defined key-value pairs to be added to the stack attributes.void
setAutoAssignElasticIps
(Boolean value) Whether to automatically assign an Elastic IP address to the layer's instances.void
Whether to automatically assign an Elastic IP address to the layer's instances.void
setAutoAssignPublicIps
(Boolean value) For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances.void
For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances.void
The ARN of an IAM profile to be used for the layer's EC2 instances.void
setCustomJson
(Object value) A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances.void
setCustomRecipes
(IResolvable value) ALayerCustomRecipes
object that specifies the layer custom recipes.void
ALayerCustomRecipes
object that specifies the layer custom recipes.void
setCustomSecurityGroupIds
(List<String> value) An array containing the layer custom security group IDs.void
setEnableAutoHealing
(Boolean value) Whether to disable auto healing for the layer.void
setEnableAutoHealing
(IResolvable value) Whether to disable auto healing for the layer.void
setInstallUpdatesOnBoot
(Boolean value) Whether to install operating system and package updates when the instance boots.void
Whether to install operating system and package updates when the instance boots.void
ALifeCycleEventConfiguration
object that you can use to configure the Shutdown event to specify an execution timeout and enable or disable Elastic Load Balancer connection draining.void
ALifeCycleEventConfiguration
object that you can use to configure the Shutdown event to specify an execution timeout and enable or disable Elastic Load Balancer connection draining.void
The load-based scaling configuration for the AWS OpsWorks layer.void
The load-based scaling configuration for the AWS OpsWorks layer.void
The layer name, which is used by the console.void
setPackages
(List<String> value) An array ofPackage
objects that describes the layer packages.void
setShortname
(String value) 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.void
setStackId
(String value) The layer stack ID.void
setTagsRaw
(List<CfnTag> value) Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer.void
The layer type.void
Whether to use Amazon EBS-optimized instances.void
Whether to use Amazon EBS-optimized instances.void
setVolumeConfigurations
(List<Object> value) AVolumeConfigurations
object that describes the layer's Amazon EBS volumes.void
AVolumeConfigurations
object that describes the layer's Amazon EBS volumes.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnLayer
protected CfnLayer(software.amazon.jsii.JsiiObjectRef objRef) -
CfnLayer
protected CfnLayer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnLayer
@Stability(Stable) public CfnLayer(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnLayerProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getAutoAssignElasticIps
Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer . -
setAutoAssignElasticIps
Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer . -
setAutoAssignElasticIps
Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer . -
getAutoAssignPublicIps
For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances. -
setAutoAssignPublicIps
For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances. -
setAutoAssignPublicIps
For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances. -
getEnableAutoHealing
Whether to disable auto healing for the layer. -
setEnableAutoHealing
Whether to disable auto healing for the layer. -
setEnableAutoHealing
Whether to disable auto healing for the layer. -
getName
The layer name, which is used by the console. -
setName
The layer name, which is used by the console. -
getShortname
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. -
setShortname
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. -
getStackId
The layer stack ID. -
setStackId
The layer stack ID. -
getType
The layer type. -
setType
The layer type. -
getAttributes
One or more user-defined key-value pairs to be added to the stack attributes. -
setAttributes
One or more user-defined key-value pairs to be added to the stack attributes. -
setAttributes
One or more user-defined key-value pairs to be added to the stack attributes. -
getCustomInstanceProfileArn
The ARN of an IAM profile to be used for the layer's EC2 instances. -
setCustomInstanceProfileArn
The ARN of an IAM profile to be used for the layer's EC2 instances. -
getCustomJson
A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances. -
setCustomJson
A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances. -
getCustomRecipes
ALayerCustomRecipes
object that specifies the layer custom recipes. -
setCustomRecipes
ALayerCustomRecipes
object that specifies the layer custom recipes. -
setCustomRecipes
ALayerCustomRecipes
object that specifies the layer custom recipes. -
getCustomSecurityGroupIds
An array containing the layer custom security group IDs. -
setCustomSecurityGroupIds
An array containing the layer custom security group IDs. -
getInstallUpdatesOnBoot
Whether to install operating system and package updates when the instance boots. -
setInstallUpdatesOnBoot
Whether to install operating system and package updates when the instance boots. -
setInstallUpdatesOnBoot
Whether to install operating system and package updates when the instance boots. -
getLifecycleEventConfiguration
ALifeCycleEventConfiguration
object that you can use to configure the Shutdown event to specify an execution timeout and enable or disable Elastic Load Balancer connection draining. -
setLifecycleEventConfiguration
ALifeCycleEventConfiguration
object that you can use to configure the Shutdown event to specify an execution timeout and enable or disable Elastic Load Balancer connection draining. -
setLifecycleEventConfiguration
@Stability(Stable) public void setLifecycleEventConfiguration(@Nullable CfnLayer.LifecycleEventConfigurationProperty value) ALifeCycleEventConfiguration
object that you can use to configure the Shutdown event to specify an execution timeout and enable or disable Elastic Load Balancer connection draining. -
getLoadBasedAutoScaling
The load-based scaling configuration for the AWS OpsWorks layer. -
setLoadBasedAutoScaling
The load-based scaling configuration for the AWS OpsWorks layer. -
setLoadBasedAutoScaling
@Stability(Stable) public void setLoadBasedAutoScaling(@Nullable CfnLayer.LoadBasedAutoScalingProperty value) The load-based scaling configuration for the AWS OpsWorks layer. -
getPackages
An array ofPackage
objects that describes the layer packages. -
setPackages
An array ofPackage
objects that describes the layer packages. -
getTagsRaw
Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer. -
setTagsRaw
Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer. -
getUseEbsOptimizedInstances
Whether to use Amazon EBS-optimized instances. -
setUseEbsOptimizedInstances
Whether to use Amazon EBS-optimized instances. -
setUseEbsOptimizedInstances
Whether to use Amazon EBS-optimized instances. -
getVolumeConfigurations
AVolumeConfigurations
object that describes the layer's Amazon EBS volumes. -
setVolumeConfigurations
AVolumeConfigurations
object that describes the layer's Amazon EBS volumes. -
setVolumeConfigurations
AVolumeConfigurations
object that describes the layer's Amazon EBS volumes.
-