Class CfnLayer.Builder

java.lang.Object
software.amazon.awscdk.services.opsworks.CfnLayer.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLayer>
Enclosing class:
CfnLayer

@Stability(Stable) public static final class CfnLayer.Builder extends Object implements software.amazon.jsii.Builder<CfnLayer>
A fluent builder for CfnLayer.
  • Method Details

    • create

      @Stability(Stable) public static CfnLayer.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnLayer.Builder.
    • autoAssignElasticIps

      @Stability(Stable) public CfnLayer.Builder autoAssignElasticIps(Boolean autoAssignElasticIps)
      Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer .

      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 CfnLayer.Builder autoAssignElasticIps(IResolvable autoAssignElasticIps)
      Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer .

      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

      @Stability(Stable) public CfnLayer.Builder autoAssignPublicIps(Boolean autoAssignPublicIps)
      For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances.

      For more information, see How to Edit a Layer .

      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.
      Returns:
      this
    • autoAssignPublicIps

      @Stability(Stable) public CfnLayer.Builder autoAssignPublicIps(IResolvable autoAssignPublicIps)
      For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances.

      For more information, see How to Edit a Layer .

      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.
      Returns:
      this
    • enableAutoHealing

      @Stability(Stable) public CfnLayer.Builder enableAutoHealing(Boolean enableAutoHealing)
      Whether to disable auto healing for the layer.

      Parameters:
      enableAutoHealing - Whether to disable auto healing for the layer. This parameter is required.
      Returns:
      this
    • enableAutoHealing

      @Stability(Stable) public CfnLayer.Builder enableAutoHealing(IResolvable enableAutoHealing)
      Whether to disable auto healing for the layer.

      Parameters:
      enableAutoHealing - Whether to disable auto healing for the layer. This parameter is required.
      Returns:
      this
    • name

      @Stability(Stable) public CfnLayer.Builder name(String name)
      The layer name, which is used by the console.

      Layer names can be a maximum of 32 characters.

      Parameters:
      name - The layer name, which is used by the console. This parameter is required.
      Returns:
      this
    • shortname

      @Stability(Stable) public CfnLayer.Builder shortname(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.

      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 .

      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.
      Returns:
      this
    • stackId

      @Stability(Stable) public CfnLayer.Builder stackId(String stackId)
      The layer stack ID.

      Parameters:
      stackId - The layer stack ID. This parameter is required.
      Returns:
      this
    • type

      @Stability(Stable) public CfnLayer.Builder type(String type)
      The layer type.

      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.

      Parameters:
      type - The layer type. This parameter is required.
      Returns:
      this
    • attributes

      @Stability(Stable) public CfnLayer.Builder attributes(IResolvable attributes)
      One or more user-defined key-value pairs to be added to the stack attributes.

      To create a cluster layer, set the EcsClusterArn attribute to the cluster's ARN.

      Parameters:
      attributes - One or more user-defined key-value pairs to be added to the stack attributes. This parameter is required.
      Returns:
      this
    • attributes

      @Stability(Stable) public CfnLayer.Builder attributes(Map<String,String> attributes)
      One or more user-defined key-value pairs to be added to the stack attributes.

      To create a cluster layer, set the EcsClusterArn attribute to the cluster's ARN.

      Parameters:
      attributes - One or more user-defined key-value pairs to be added to the stack attributes. This parameter is required.
      Returns:
      this
    • customInstanceProfileArn

      @Stability(Stable) public CfnLayer.Builder customInstanceProfileArn(String 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 .

      Parameters:
      customInstanceProfileArn - The ARN of an IAM profile to be used for the layer's EC2 instances. This parameter is required.
      Returns:
      this
    • customJson

      @Stability(Stable) public CfnLayer.Builder customJson(Object 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 .

      Parameters:
      customJson - A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances. This parameter is required.
      Returns:
      this
    • customRecipes

      @Stability(Stable) public CfnLayer.Builder customRecipes(IResolvable customRecipes)
      A LayerCustomRecipes object that specifies the layer custom recipes.

      Parameters:
      customRecipes - A LayerCustomRecipes object that specifies the layer custom recipes. This parameter is required.
      Returns:
      this
    • customRecipes

      @Stability(Stable) public CfnLayer.Builder customRecipes(CfnLayer.RecipesProperty customRecipes)
      A LayerCustomRecipes object that specifies the layer custom recipes.

      Parameters:
      customRecipes - A LayerCustomRecipes object that specifies the layer custom recipes. This parameter is required.
      Returns:
      this
    • customSecurityGroupIds

      @Stability(Stable) public CfnLayer.Builder customSecurityGroupIds(List<String> customSecurityGroupIds)
      An array containing the layer custom security group IDs.

      Parameters:
      customSecurityGroupIds - An array containing the layer custom security group IDs. This parameter is required.
      Returns:
      this
    • installUpdatesOnBoot

      @Stability(Stable) public CfnLayer.Builder installUpdatesOnBoot(Boolean installUpdatesOnBoot)
      Whether to install operating system and package updates when the instance boots.

      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 .

      Parameters:
      installUpdatesOnBoot - Whether to install operating system and package updates when the instance boots. This parameter is required.
      Returns:
      this
    • installUpdatesOnBoot

      @Stability(Stable) public CfnLayer.Builder installUpdatesOnBoot(IResolvable installUpdatesOnBoot)
      Whether to install operating system and package updates when the instance boots.

      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 .

      Parameters:
      installUpdatesOnBoot - Whether to install operating system and package updates when the instance boots. This parameter is required.
      Returns:
      this
    • lifecycleEventConfiguration

      @Stability(Stable) public CfnLayer.Builder lifecycleEventConfiguration(IResolvable 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.

      Parameters:
      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. This parameter is required.
      Returns:
      this
    • lifecycleEventConfiguration

      @Stability(Stable) public CfnLayer.Builder lifecycleEventConfiguration(CfnLayer.LifecycleEventConfigurationProperty 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.

      Parameters:
      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. This parameter is required.
      Returns:
      this
    • loadBasedAutoScaling

      @Stability(Stable) public CfnLayer.Builder loadBasedAutoScaling(IResolvable loadBasedAutoScaling)
      The load-based scaling configuration for the AWS OpsWorks layer.

      Parameters:
      loadBasedAutoScaling - The load-based scaling configuration for the AWS OpsWorks layer. This parameter is required.
      Returns:
      this
    • loadBasedAutoScaling

      @Stability(Stable) public CfnLayer.Builder loadBasedAutoScaling(CfnLayer.LoadBasedAutoScalingProperty loadBasedAutoScaling)
      The load-based scaling configuration for the AWS OpsWorks layer.

      Parameters:
      loadBasedAutoScaling - The load-based scaling configuration for the AWS OpsWorks layer. This parameter is required.
      Returns:
      this
    • packages

      @Stability(Stable) public CfnLayer.Builder packages(List<String> packages)
      An array of Package objects that describes the layer packages.

      Parameters:
      packages - An array of Package objects that describes the layer packages. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnLayer.Builder tags(List<? extends CfnTag> tags)
      Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer.

      Use tags to manage your resources.

      Parameters:
      tags - Specifies one or more sets of tags (key–value pairs) to associate with this AWS OpsWorks layer. This parameter is required.
      Returns:
      this
    • useEbsOptimizedInstances

      @Stability(Stable) public CfnLayer.Builder useEbsOptimizedInstances(Boolean useEbsOptimizedInstances)
      Whether to use Amazon EBS-optimized instances.

      Parameters:
      useEbsOptimizedInstances - Whether to use Amazon EBS-optimized instances. This parameter is required.
      Returns:
      this
    • useEbsOptimizedInstances

      @Stability(Stable) public CfnLayer.Builder useEbsOptimizedInstances(IResolvable useEbsOptimizedInstances)
      Whether to use Amazon EBS-optimized instances.

      Parameters:
      useEbsOptimizedInstances - Whether to use Amazon EBS-optimized instances. This parameter is required.
      Returns:
      this
    • volumeConfigurations

      @Stability(Stable) public CfnLayer.Builder volumeConfigurations(IResolvable volumeConfigurations)
      A VolumeConfigurations object that describes the layer's Amazon EBS volumes.

      Parameters:
      volumeConfigurations - A VolumeConfigurations object that describes the layer's Amazon EBS volumes. This parameter is required.
      Returns:
      this
    • volumeConfigurations

      @Stability(Stable) public CfnLayer.Builder volumeConfigurations(List<? extends Object> volumeConfigurations)
      A VolumeConfigurations object that describes the layer's Amazon EBS volumes.

      Parameters:
      volumeConfigurations - A VolumeConfigurations object that describes the layer's Amazon EBS volumes. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnLayer build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnLayer>
      Returns:
      a newly built instance of CfnLayer.