Class CfnLayerProps.Builder
java.lang.Object
software.amazon.awscdk.services.opsworks.CfnLayerProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLayerProps>
- Enclosing interface:
CfnLayerProps
@Stability(Stable)
public static final class CfnLayerProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLayerProps>
A builder for
CfnLayerProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionattributes
(Map<String, String> attributes) Sets the value ofCfnLayerProps.getAttributes()
attributes
(IResolvable attributes) Sets the value ofCfnLayerProps.getAttributes()
autoAssignElasticIps
(Boolean autoAssignElasticIps) Sets the value ofCfnLayerProps.getAutoAssignElasticIps()
autoAssignElasticIps
(IResolvable autoAssignElasticIps) Sets the value ofCfnLayerProps.getAutoAssignElasticIps()
autoAssignPublicIps
(Boolean autoAssignPublicIps) Sets the value ofCfnLayerProps.getAutoAssignPublicIps()
autoAssignPublicIps
(IResolvable autoAssignPublicIps) Sets the value ofCfnLayerProps.getAutoAssignPublicIps()
build()
Builds the configured instance.customInstanceProfileArn
(String customInstanceProfileArn) Sets the value ofCfnLayerProps.getCustomInstanceProfileArn()
customJson
(Object customJson) Sets the value ofCfnLayerProps.getCustomJson()
customRecipes
(IResolvable customRecipes) Sets the value ofCfnLayerProps.getCustomRecipes()
customRecipes
(CfnLayer.RecipesProperty customRecipes) Sets the value ofCfnLayerProps.getCustomRecipes()
customSecurityGroupIds
(List<String> customSecurityGroupIds) Sets the value ofCfnLayerProps.getCustomSecurityGroupIds()
enableAutoHealing
(Boolean enableAutoHealing) Sets the value ofCfnLayerProps.getEnableAutoHealing()
enableAutoHealing
(IResolvable enableAutoHealing) Sets the value ofCfnLayerProps.getEnableAutoHealing()
installUpdatesOnBoot
(Boolean installUpdatesOnBoot) Sets the value ofCfnLayerProps.getInstallUpdatesOnBoot()
installUpdatesOnBoot
(IResolvable installUpdatesOnBoot) Sets the value ofCfnLayerProps.getInstallUpdatesOnBoot()
lifecycleEventConfiguration
(IResolvable lifecycleEventConfiguration) Sets the value ofCfnLayerProps.getLifecycleEventConfiguration()
lifecycleEventConfiguration
(CfnLayer.LifecycleEventConfigurationProperty lifecycleEventConfiguration) Sets the value ofCfnLayerProps.getLifecycleEventConfiguration()
loadBasedAutoScaling
(IResolvable loadBasedAutoScaling) Sets the value ofCfnLayerProps.getLoadBasedAutoScaling()
loadBasedAutoScaling
(CfnLayer.LoadBasedAutoScalingProperty loadBasedAutoScaling) Sets the value ofCfnLayerProps.getLoadBasedAutoScaling()
Sets the value ofCfnLayerProps.getName()
Sets the value ofCfnLayerProps.getPackages()
Sets the value ofCfnLayerProps.getShortname()
Sets the value ofCfnLayerProps.getStackId()
Sets the value ofCfnLayerProps.getTags()
Sets the value ofCfnLayerProps.getType()
useEbsOptimizedInstances
(Boolean useEbsOptimizedInstances) Sets the value ofCfnLayerProps.getUseEbsOptimizedInstances()
useEbsOptimizedInstances
(IResolvable useEbsOptimizedInstances) Sets the value ofCfnLayerProps.getUseEbsOptimizedInstances()
volumeConfigurations
(List<? extends Object> volumeConfigurations) Sets the value ofCfnLayerProps.getVolumeConfigurations()
volumeConfigurations
(IResolvable volumeConfigurations) Sets the value ofCfnLayerProps.getVolumeConfigurations()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
autoAssignElasticIps
Sets the value ofCfnLayerProps.getAutoAssignElasticIps()
- Parameters:
autoAssignElasticIps
- Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer . This parameter is required.- Returns:
this
-
autoAssignElasticIps
@Stability(Stable) public CfnLayerProps.Builder autoAssignElasticIps(IResolvable autoAssignElasticIps) Sets the value ofCfnLayerProps.getAutoAssignElasticIps()
- Parameters:
autoAssignElasticIps
- Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer . This parameter is required.- Returns:
this
-
autoAssignPublicIps
Sets the value ofCfnLayerProps.getAutoAssignPublicIps()
- Parameters:
autoAssignPublicIps
- For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances. This parameter is required. For more information, see How to Edit a Layer .- Returns:
this
-
autoAssignPublicIps
@Stability(Stable) public CfnLayerProps.Builder autoAssignPublicIps(IResolvable autoAssignPublicIps) Sets the value ofCfnLayerProps.getAutoAssignPublicIps()
- Parameters:
autoAssignPublicIps
- For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances. This parameter is required. For more information, see How to Edit a Layer .- Returns:
this
-
enableAutoHealing
Sets the value ofCfnLayerProps.getEnableAutoHealing()
- Parameters:
enableAutoHealing
- Whether to disable auto healing for the layer. This parameter is required.- Returns:
this
-
enableAutoHealing
Sets the value ofCfnLayerProps.getEnableAutoHealing()
- Parameters:
enableAutoHealing
- Whether to disable auto healing for the layer. This parameter is required.- Returns:
this
-
name
Sets the value ofCfnLayerProps.getName()
- Parameters:
name
- The layer name, which is used by the console. This parameter is required. Layer names can be a maximum of 32 characters.- Returns:
this
-
shortname
Sets the value ofCfnLayerProps.getShortname()
- Parameters:
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. This parameter is required. 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 .
- Returns:
this
-
stackId
Sets the value ofCfnLayerProps.getStackId()
- Parameters:
stackId
- The layer stack ID. This parameter is required.- Returns:
this
-
type
Sets the value ofCfnLayerProps.getType()
- Parameters:
type
- The layer type. This parameter is required. 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.- Returns:
this
-
attributes
Sets the value ofCfnLayerProps.getAttributes()
- Parameters:
attributes
- One or more user-defined key-value pairs to be added to the stack attributes. To create a cluster layer, set theEcsClusterArn
attribute to the cluster's ARN.- Returns:
this
-
attributes
Sets the value ofCfnLayerProps.getAttributes()
- Parameters:
attributes
- One or more user-defined key-value pairs to be added to the stack attributes. To create a cluster layer, set theEcsClusterArn
attribute to the cluster's ARN.- Returns:
this
-
customInstanceProfileArn
@Stability(Stable) public CfnLayerProps.Builder customInstanceProfileArn(String customInstanceProfileArn) Sets the value ofCfnLayerProps.getCustomInstanceProfileArn()
- Parameters:
customInstanceProfileArn
- The ARN of an IAM profile to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers .- Returns:
this
-
customJson
Sets the value ofCfnLayerProps.getCustomJson()
- Parameters:
customJson
- 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 .- Returns:
this
-
customRecipes
Sets the value ofCfnLayerProps.getCustomRecipes()
- Parameters:
customRecipes
- ALayerCustomRecipes
object that specifies the layer custom recipes.- Returns:
this
-
customRecipes
@Stability(Stable) public CfnLayerProps.Builder customRecipes(CfnLayer.RecipesProperty customRecipes) Sets the value ofCfnLayerProps.getCustomRecipes()
- Parameters:
customRecipes
- ALayerCustomRecipes
object that specifies the layer custom recipes.- Returns:
this
-
customSecurityGroupIds
@Stability(Stable) public CfnLayerProps.Builder customSecurityGroupIds(List<String> customSecurityGroupIds) Sets the value ofCfnLayerProps.getCustomSecurityGroupIds()
- Parameters:
customSecurityGroupIds
- An array containing the layer custom security group IDs.- Returns:
this
-
installUpdatesOnBoot
Sets the value ofCfnLayerProps.getInstallUpdatesOnBoot()
- Parameters:
installUpdatesOnBoot
- Whether to install operating system and package updates when the instance boots. The default value istrue
. To control when updates are installed, set this value tofalse
. You must then update your instances manually by usingCreateDeployment
to run theupdate_dependencies
stack command or by manually runningyum
(Amazon Linux) orapt-get
(Ubuntu) on the instances.To ensure that your instances have the latest security updates, we strongly recommend using the default value of
true
.- Returns:
this
-
installUpdatesOnBoot
@Stability(Stable) public CfnLayerProps.Builder installUpdatesOnBoot(IResolvable installUpdatesOnBoot) Sets the value ofCfnLayerProps.getInstallUpdatesOnBoot()
- Parameters:
installUpdatesOnBoot
- Whether to install operating system and package updates when the instance boots. The default value istrue
. To control when updates are installed, set this value tofalse
. You must then update your instances manually by usingCreateDeployment
to run theupdate_dependencies
stack command or by manually runningyum
(Amazon Linux) orapt-get
(Ubuntu) on the instances.To ensure that your instances have the latest security updates, we strongly recommend using the default value of
true
.- Returns:
this
-
lifecycleEventConfiguration
@Stability(Stable) public CfnLayerProps.Builder lifecycleEventConfiguration(IResolvable lifecycleEventConfiguration) Sets the value ofCfnLayerProps.getLifecycleEventConfiguration()
- Parameters:
lifecycleEventConfiguration
- 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.- Returns:
this
-
lifecycleEventConfiguration
@Stability(Stable) public CfnLayerProps.Builder lifecycleEventConfiguration(CfnLayer.LifecycleEventConfigurationProperty lifecycleEventConfiguration) Sets the value ofCfnLayerProps.getLifecycleEventConfiguration()
- Parameters:
lifecycleEventConfiguration
- 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.- Returns:
this
-
loadBasedAutoScaling
@Stability(Stable) public CfnLayerProps.Builder loadBasedAutoScaling(IResolvable loadBasedAutoScaling) Sets the value ofCfnLayerProps.getLoadBasedAutoScaling()
- Parameters:
loadBasedAutoScaling
- The load-based scaling configuration for the AWS OpsWorks layer.- Returns:
this
-
loadBasedAutoScaling
@Stability(Stable) public CfnLayerProps.Builder loadBasedAutoScaling(CfnLayer.LoadBasedAutoScalingProperty loadBasedAutoScaling) Sets the value ofCfnLayerProps.getLoadBasedAutoScaling()
- Parameters:
loadBasedAutoScaling
- The load-based scaling configuration for the AWS OpsWorks layer.- Returns:
this
-
packages
Sets the value ofCfnLayerProps.getPackages()
- Parameters:
packages
- An array ofPackage
objects that describes the layer packages.- Returns:
this
-
tags
Sets the value ofCfnLayerProps.getTags()
- Parameters:
tags
- Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer. Use tags to manage your resources.- Returns:
this
-
useEbsOptimizedInstances
@Stability(Stable) public CfnLayerProps.Builder useEbsOptimizedInstances(Boolean useEbsOptimizedInstances) Sets the value ofCfnLayerProps.getUseEbsOptimizedInstances()
- Parameters:
useEbsOptimizedInstances
- Whether to use Amazon EBS-optimized instances.- Returns:
this
-
useEbsOptimizedInstances
@Stability(Stable) public CfnLayerProps.Builder useEbsOptimizedInstances(IResolvable useEbsOptimizedInstances) Sets the value ofCfnLayerProps.getUseEbsOptimizedInstances()
- Parameters:
useEbsOptimizedInstances
- Whether to use Amazon EBS-optimized instances.- Returns:
this
-
volumeConfigurations
@Stability(Stable) public CfnLayerProps.Builder volumeConfigurations(IResolvable volumeConfigurations) Sets the value ofCfnLayerProps.getVolumeConfigurations()
- Parameters:
volumeConfigurations
- AVolumeConfigurations
object that describes the layer's Amazon EBS volumes.- Returns:
this
-
volumeConfigurations
@Stability(Stable) public CfnLayerProps.Builder volumeConfigurations(List<? extends Object> volumeConfigurations) Sets the value ofCfnLayerProps.getVolumeConfigurations()
- Parameters:
volumeConfigurations
- AVolumeConfigurations
object that describes the layer's Amazon EBS volumes.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLayerProps>
- Returns:
- a new instance of
CfnLayerProps
- Throws:
NullPointerException
- if any required attribute was not provided
-