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 Details

    • Builder

      public Builder()
  • Method Details

    • autoAssignElasticIps

      @Stability(Stable) public CfnLayerProps.Builder autoAssignElasticIps(Boolean autoAssignElasticIps)
      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)
      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 CfnLayerProps.Builder autoAssignPublicIps(Boolean autoAssignPublicIps)
      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)
      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

      @Stability(Stable) public CfnLayerProps.Builder enableAutoHealing(Boolean enableAutoHealing)
      Parameters:
      enableAutoHealing - Whether to disable auto healing for the layer. This parameter is required.
      Returns:
      this
    • enableAutoHealing

      @Stability(Stable) public CfnLayerProps.Builder enableAutoHealing(IResolvable enableAutoHealing)
      Parameters:
      enableAutoHealing - Whether to disable auto healing for the layer. This parameter is required.
      Returns:
      this
    • name

      @Stability(Stable) public CfnLayerProps.Builder name(String name)
      Sets the value of CfnLayerProps.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

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

      @Stability(Stable) public CfnLayerProps.Builder stackId(String stackId)
      Sets the value of CfnLayerProps.getStackId()
      Parameters:
      stackId - The layer stack ID. This parameter is required.
      Returns:
      this
    • type

      @Stability(Stable) public CfnLayerProps.Builder type(String type)
      Sets the value of CfnLayerProps.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

      @Stability(Stable) public CfnLayerProps.Builder attributes(IResolvable attributes)
      Parameters:
      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.
      Returns:
      this
    • attributes

      @Stability(Stable) public CfnLayerProps.Builder attributes(Map<String,String> attributes)
      Parameters:
      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.
      Returns:
      this
    • customInstanceProfileArn

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

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

      @Stability(Stable) public CfnLayerProps.Builder customRecipes(IResolvable customRecipes)
      Parameters:
      customRecipes - A LayerCustomRecipes object that specifies the layer custom recipes.
      Returns:
      this
    • customRecipes

      @Stability(Stable) public CfnLayerProps.Builder customRecipes(CfnLayer.RecipesProperty customRecipes)
      Parameters:
      customRecipes - A LayerCustomRecipes object that specifies the layer custom recipes.
      Returns:
      this
    • customSecurityGroupIds

      @Stability(Stable) public CfnLayerProps.Builder customSecurityGroupIds(List<String> customSecurityGroupIds)
      Parameters:
      customSecurityGroupIds - An array containing the layer custom security group IDs.
      Returns:
      this
    • installUpdatesOnBoot

      @Stability(Stable) public CfnLayerProps.Builder installUpdatesOnBoot(Boolean installUpdatesOnBoot)
      Parameters:
      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 .

      Returns:
      this
    • installUpdatesOnBoot

      @Stability(Stable) public CfnLayerProps.Builder installUpdatesOnBoot(IResolvable installUpdatesOnBoot)
      Parameters:
      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 .

      Returns:
      this
    • lifecycleEventConfiguration

      @Stability(Stable) public CfnLayerProps.Builder lifecycleEventConfiguration(IResolvable lifecycleEventConfiguration)
      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.
      Returns:
      this
    • lifecycleEventConfiguration

      @Stability(Stable) public CfnLayerProps.Builder lifecycleEventConfiguration(CfnLayer.LifecycleEventConfigurationProperty lifecycleEventConfiguration)
      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.
      Returns:
      this
    • loadBasedAutoScaling

      @Stability(Stable) public CfnLayerProps.Builder loadBasedAutoScaling(IResolvable loadBasedAutoScaling)
      Parameters:
      loadBasedAutoScaling - The load-based scaling configuration for the AWS OpsWorks layer.
      Returns:
      this
    • loadBasedAutoScaling

      @Stability(Stable) public CfnLayerProps.Builder loadBasedAutoScaling(CfnLayer.LoadBasedAutoScalingProperty loadBasedAutoScaling)
      Parameters:
      loadBasedAutoScaling - The load-based scaling configuration for the AWS OpsWorks layer.
      Returns:
      this
    • packages

      @Stability(Stable) public CfnLayerProps.Builder packages(List<String> packages)
      Sets the value of CfnLayerProps.getPackages()
      Parameters:
      packages - An array of Package objects that describes the layer packages.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnLayerProps.Builder tags(List<? extends CfnTag> tags)
      Sets the value of CfnLayerProps.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)
      Parameters:
      useEbsOptimizedInstances - Whether to use Amazon EBS-optimized instances.
      Returns:
      this
    • useEbsOptimizedInstances

      @Stability(Stable) public CfnLayerProps.Builder useEbsOptimizedInstances(IResolvable useEbsOptimizedInstances)
      Parameters:
      useEbsOptimizedInstances - Whether to use Amazon EBS-optimized instances.
      Returns:
      this
    • volumeConfigurations

      @Stability(Stable) public CfnLayerProps.Builder volumeConfigurations(IResolvable volumeConfigurations)
      Parameters:
      volumeConfigurations - A VolumeConfigurations object that describes the layer's Amazon EBS volumes.
      Returns:
      this
    • volumeConfigurations

      @Stability(Stable) public CfnLayerProps.Builder volumeConfigurations(List<? extends Object> volumeConfigurations)
      Parameters:
      volumeConfigurations - A VolumeConfigurations object that describes the layer's Amazon EBS volumes.
      Returns:
      this
    • build

      @Stability(Stable) public CfnLayerProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnLayerProps>
      Returns:
      a new instance of CfnLayerProps
      Throws:
      NullPointerException - if any required attribute was not provided