Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
    * 
    * Licensed under the Apache License, Version 2.0 (the "License").
    * You may not use this file except in compliance with the License.
    * A copy of the License is located at
    * 
    *  http://aws.amazon.com/apache2.0
    * 
   * or in the "license" file accompanying this file. This file is distributed
   * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
   * express or implied. See the License for the specific language governing
   * permissions and limitations under the License.
   */
  package com.amazonaws.services.opsworks.model;
  
  
Container for the parameters to the CreateLayer operation.

Creates a layer. For more information, see How to Create a Layer .

NOTE: You should use CreateLayer for noncustom layer types such as PHP App Server only if the stack does not have an existing layer of that type. A stack can have at most one instance of each noncustom layer; if you attempt to create a second instance, CreateLayer fails. A stack can have an arbitrary number of custom layers, so you can call CreateLayer as many times as you like for that layer type.

Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .

  
  public class CreateLayerRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The layer stack ID.
  
      private String stackId;

    
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.

Constraints:
Allowed Values: java-app, lb, web, php-app, rails-app, nodejs-app, memcached, db-master, monitoring-master, custom

  
      private String type;

    
The layer name, which is used by the console.
  
      private String name;

    
For custom layers only, use this parameter to specify the layer's short name, which is used internally by AWS OpsWorks 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 200 characters, which are limited to the alphanumeric characters, '-', '_', and '.'.

The built-in layers' short names are defined by AWS OpsWorks. For more information, see the Layer Reference

  
      private String shortname;

    
One or more user-defined key/value pairs to be added to the stack attributes.
  
      private java.util.Map<String,Stringattributes;

    
The ARN of an IAM profile that to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers.
  
      private String customInstanceProfileArn;

    
An array containing the layer custom security group IDs.
  
An array of Package objects that describe the layer packages.
 
A VolumeConfigurations object that describes the layer's Amazon EBS volumes.
 
Whether to disable auto healing for the layer.
 
     private Boolean enableAutoHealing;

    
Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer.
 
     private Boolean autoAssignElasticIps;

    
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.
 
     private Boolean autoAssignPublicIps;

    
A LayerCustomRecipes object that specifies the layer custom recipes.
 
     private Recipes customRecipes;

    
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 manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

 
     private Boolean installUpdatesOnBoot;

    
Whether to use Amazon EBS-optimized instances.
 
     private Boolean useEbsOptimizedInstances;

    
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.
 
The layer stack ID.

Returns:
The layer stack ID.
 
     public String getStackId() {
         return ;
     }
    
    
The layer stack ID.

Parameters:
stackId The layer stack ID.
 
     public void setStackId(String stackId) {
         this. = stackId;
     }
    
    
The layer stack ID.

Returns a reference to this object so that method calls can be chained together.

Parameters:
stackId The layer stack ID.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CreateLayerRequest withStackId(String stackId) {
         this. = stackId;
         return this;
     }

    
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.

Constraints:
Allowed Values: java-app, lb, web, php-app, rails-app, nodejs-app, memcached, db-master, monitoring-master, custom

Returns:
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.
See also:
LayerType
 
     public String getType() {
         return ;
     }
    
    
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.

Constraints:
Allowed Values: java-app, lb, web, php-app, rails-app, nodejs-app, memcached, db-master, monitoring-master, custom

Parameters:
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.
See also:
LayerType
 
     public void setType(String type) {
         this. = 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.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: java-app, lb, web, php-app, rails-app, nodejs-app, memcached, db-master, monitoring-master, custom

Parameters:
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.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
LayerType
 
     public CreateLayerRequest withType(String type) {
         this. = type;
         return this;
     }

    
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.

Constraints:
Allowed Values: java-app, lb, web, php-app, rails-app, nodejs-app, memcached, db-master, monitoring-master, custom

Parameters:
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.
See also:
LayerType
 
     public void setType(LayerType type) {
         this. = type.toString();
     }
    
    
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.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: java-app, lb, web, php-app, rails-app, nodejs-app, memcached, db-master, monitoring-master, custom

Parameters:
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.
Returns:
A reference to this updated object so that method calls can be chained together.
See also:
LayerType
 
     public CreateLayerRequest withType(LayerType type) {
         this. = type.toString();
         return this;
     }

    
The layer name, which is used by the console.

Returns:
The layer name, which is used by the console.
 
     public String getName() {
         return ;
     }
    
    
The layer name, which is used by the console.

Parameters:
name The layer name, which is used by the console.
 
     public void setName(String name) {
         this. = name;
     }
    
    
The layer name, which is used by the console.

Returns a reference to this object so that method calls can be chained together.

Parameters:
name The layer name, which is used by the console.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CreateLayerRequest withName(String name) {
         this. = name;
         return this;
     }

    
For custom layers only, use this parameter to specify the layer's short name, which is used internally by AWS OpsWorks 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 200 characters, which are limited to the alphanumeric characters, '-', '_', and '.'.

The built-in layers' short names are defined by AWS OpsWorks. For more information, see the Layer Reference

Returns:
For custom layers only, use this parameter to specify the layer's short name, which is used internally by AWS OpsWorks 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 200 characters, which are limited to the alphanumeric characters, '-', '_', and '.'.

The built-in layers' short names are defined by AWS OpsWorks. For more information, see the Layer Reference

 
     public String getShortname() {
         return ;
     }
    
    
For custom layers only, use this parameter to specify the layer's short name, which is used internally by AWS OpsWorks 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 200 characters, which are limited to the alphanumeric characters, '-', '_', and '.'.

The built-in layers' short names are defined by AWS OpsWorks. 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 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 200 characters, which are limited to the alphanumeric characters, '-', '_', and '.'.

The built-in layers' short names are defined by AWS OpsWorks. For more information, see the Layer Reference

 
     public void setShortname(String shortname) {
         this. = shortname;
     }
    
    
For custom layers only, use this parameter to specify the layer's short name, which is used internally by AWS OpsWorks 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 200 characters, which are limited to the alphanumeric characters, '-', '_', and '.'.

The built-in layers' short names are defined by AWS OpsWorks. For more information, see the Layer Reference

Returns a reference to this object so that method calls can be chained together.

Parameters:
shortname For custom layers only, use this parameter to specify the layer's short name, which is used internally by AWS OpsWorks 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 200 characters, which are limited to the alphanumeric characters, '-', '_', and '.'.

The built-in layers' short names are defined by AWS OpsWorks. For more information, see the Layer Reference

Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CreateLayerRequest withShortname(String shortname) {
         this. = shortname;
         return this;
     }

    
One or more user-defined key/value pairs to be added to the stack attributes.

Returns:
One or more user-defined key/value pairs to be added to the stack attributes.
 
     public java.util.Map<String,StringgetAttributes() {
         
         if ( == null) {
              = new java.util.HashMap<String,String>();
         }
         return ;
     }
    
    
One or more user-defined key/value pairs to be added to the stack attributes.

Parameters:
attributes One or more user-defined key/value pairs to be added to the stack attributes.
 
     public void setAttributes(java.util.Map<String,Stringattributes) {
         this. = attributes;
     }
    
    
One or more user-defined key/value pairs to be added to the stack attributes.

Returns a reference to this object so that method calls can be chained together.

Parameters:
attributes One or more user-defined key/value pairs to be added to the stack attributes.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CreateLayerRequest withAttributes(java.util.Map<String,Stringattributes) {
         setAttributes(attributes);
         return this;
     }

    
One or more user-defined key/value pairs to be added to the stack attributes.

The method adds a new key-value pair into Attributes parameter, and returns a reference to this object so that method calls can be chained together.

Parameters:
key The key of the entry to be added into Attributes.
value The corresponding value of the entry to be added into Attributes.
 
   public CreateLayerRequest addAttributesEntry(String keyString value) {
     if (null == this.) {
       this. = new java.util.HashMap<String,String>();
     }
     if (this..containsKey(key))
       throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
     this..put(keyvalue);
     return this;
   }

  
Removes all the entries added into Attributes.

Returns a reference to this object so that method calls can be chained together.

 
     this. = null;
     return this;
   }
  
    
The ARN of an IAM profile that to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

Returns:
The ARN of an IAM profile that to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers.
 
     public String getCustomInstanceProfileArn() {
         return ;
     }
    
    
The ARN of an IAM profile that 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 that to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers.
 
     public void setCustomInstanceProfileArn(String customInstanceProfileArn) {
         this. = customInstanceProfileArn;
     }
    
    
The ARN of an IAM profile that to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

Returns a reference to this object so that method calls can be chained together.

Parameters:
customInstanceProfileArn The ARN of an IAM profile that to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CreateLayerRequest withCustomInstanceProfileArn(String customInstanceProfileArn) {
         this. = customInstanceProfileArn;
         return this;
     }

    
An array containing the layer custom security group IDs.

Returns:
An array containing the layer custom security group IDs.
 
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
An array containing the layer custom security group IDs.

Parameters:
customSecurityGroupIds An array containing the layer custom security group IDs.
 
     public void setCustomSecurityGroupIds(java.util.Collection<StringcustomSecurityGroupIds) {
         if (customSecurityGroupIds == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringcustomSecurityGroupIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(customSecurityGroupIds.size());
         customSecurityGroupIdsCopy.addAll(customSecurityGroupIds);
         this. = customSecurityGroupIdsCopy;
     }
    
    
An array containing the layer custom security group IDs.

NOTE: This method appends the values to the existing list (if any). Use setCustomSecurityGroupIds(java.util.Collection) or withCustomSecurityGroupIds(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
customSecurityGroupIds An array containing the layer custom security group IDs.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CreateLayerRequest withCustomSecurityGroupIds(String... customSecurityGroupIds) {
         if (getCustomSecurityGroupIds() == nullsetCustomSecurityGroupIds(new java.util.ArrayList<String>(customSecurityGroupIds.length));
         for (String value : customSecurityGroupIds) {
             getCustomSecurityGroupIds().add(value);
         }
         return this;
     }
    
    
An array containing the layer custom security group IDs.

Returns a reference to this object so that method calls can be chained together.

Parameters:
customSecurityGroupIds An array containing the layer custom security group IDs.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CreateLayerRequest withCustomSecurityGroupIds(java.util.Collection<StringcustomSecurityGroupIds) {
         if (customSecurityGroupIds == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<StringcustomSecurityGroupIdsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(customSecurityGroupIds.size());
             customSecurityGroupIdsCopy.addAll(customSecurityGroupIds);
             this. = customSecurityGroupIdsCopy;
         }
 
         return this;
     }

    
An array of Package objects that describe the layer packages.

Returns:
An array of Package objects that describe the layer packages.
 
     public java.util.List<StringgetPackages() {
         if ( == null) {
                = new com.amazonaws.internal.ListWithAutoConstructFlag<String>();
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
An array of Package objects that describe the layer packages.

Parameters:
packages An array of Package objects that describe the layer packages.
 
     public void setPackages(java.util.Collection<Stringpackages) {
         if (packages == null) {
             this. = null;
             return;
         }
         packagesCopy.addAll(packages);
         this. = packagesCopy;
     }
    
    
An array of Package objects that describe the layer packages.

NOTE: This method appends the values to the existing list (if any). Use setPackages(java.util.Collection) or withPackages(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
packages An array of Package objects that describe the layer packages.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CreateLayerRequest withPackages(String... packages) {
         if (getPackages() == nullsetPackages(new java.util.ArrayList<String>(packages.length));
         for (String value : packages) {
             getPackages().add(value);
         }
         return this;
     }
    
    
An array of Package objects that describe the layer packages.

Returns a reference to this object so that method calls can be chained together.

Parameters:
packages An array of Package objects that describe the layer packages.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CreateLayerRequest withPackages(java.util.Collection<Stringpackages) {
         if (packages == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<StringpackagesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(packages.size());
             packagesCopy.addAll(packages);
             this. = packagesCopy;
         }
 
         return this;
     }

    
A VolumeConfigurations object that describes the layer's Amazon EBS volumes.

Returns:
A VolumeConfigurations object that describes the layer's Amazon EBS volumes.
 
         if ( == null) {
               .setAutoConstruct(true);
         }
         return ;
     }
    
    
A VolumeConfigurations object that describes the layer's Amazon EBS volumes.

Parameters:
volumeConfigurations A VolumeConfigurations object that describes the layer's Amazon EBS volumes.
 
     public void setVolumeConfigurations(java.util.Collection<VolumeConfigurationvolumeConfigurations) {
         if (volumeConfigurations == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<VolumeConfigurationvolumeConfigurationsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<VolumeConfiguration>(volumeConfigurations.size());
         volumeConfigurationsCopy.addAll(volumeConfigurations);
         this. = volumeConfigurationsCopy;
     }
    
    
A VolumeConfigurations object that describes the layer's Amazon EBS volumes.

NOTE: This method appends the values to the existing list (if any). Use setVolumeConfigurations(java.util.Collection) or withVolumeConfigurations(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
volumeConfigurations A VolumeConfigurations object that describes the layer's Amazon EBS volumes.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CreateLayerRequest withVolumeConfigurations(VolumeConfiguration... volumeConfigurations) {
         if (getVolumeConfigurations() == nullsetVolumeConfigurations(new java.util.ArrayList<VolumeConfiguration>(volumeConfigurations.length));
         for (VolumeConfiguration value : volumeConfigurations) {
             getVolumeConfigurations().add(value);
         }
         return this;
     }
    
    
A VolumeConfigurations object that describes the layer's Amazon EBS volumes.

Returns a reference to this object so that method calls can be chained together.

Parameters:
volumeConfigurations A VolumeConfigurations object that describes the layer's Amazon EBS volumes.
Returns:
A reference to this updated object so that method calls can be chained together.
 
         if (volumeConfigurations == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<VolumeConfigurationvolumeConfigurationsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<VolumeConfiguration>(volumeConfigurations.size());
             volumeConfigurationsCopy.addAll(volumeConfigurations);
             this. = volumeConfigurationsCopy;
         }
 
         return this;
     }

    
Whether to disable auto healing for the layer.

Returns:
Whether to disable auto healing for the layer.
 
     public Boolean isEnableAutoHealing() {
         return ;
     }
    
    
Whether to disable auto healing for the layer.

Parameters:
enableAutoHealing Whether to disable auto healing for the layer.
 
     public void setEnableAutoHealing(Boolean enableAutoHealing) {
         this. = enableAutoHealing;
     }
    
    
Whether to disable auto healing for the layer.

Returns a reference to this object so that method calls can be chained together.

Parameters:
enableAutoHealing Whether to disable auto healing for the layer.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CreateLayerRequest withEnableAutoHealing(Boolean enableAutoHealing) {
         this. = enableAutoHealing;
         return this;
     }

    
Whether to disable auto healing for the layer.

Returns:
Whether to disable auto healing for the layer.
 
     public Boolean getEnableAutoHealing() {
         return ;
     }

    
Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer.

Returns:
Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer.
 
     public Boolean isAutoAssignElasticIps() {
         return ;
     }
    
    
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.
 
     public void setAutoAssignElasticIps(Boolean autoAssignElasticIps) {
         this. = autoAssignElasticIps;
     }
    
    
Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer.

Returns a reference to this object so that method calls can be chained together.

Parameters:
autoAssignElasticIps Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CreateLayerRequest withAutoAssignElasticIps(Boolean autoAssignElasticIps) {
         this. = autoAssignElasticIps;
         return this;
     }

    
Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer.

Returns:
Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer.
 
     public Boolean getAutoAssignElasticIps() {
         return ;
     }

    
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.

Returns:
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.
 
     public Boolean isAutoAssignPublicIps() {
         return ;
     }
    
    
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. For more information, see How to Edit a Layer.
 
     public void setAutoAssignPublicIps(Boolean autoAssignPublicIps) {
         this. = 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.

Returns a reference to this object so that method calls can be chained together.

Parameters:
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.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CreateLayerRequest withAutoAssignPublicIps(Boolean autoAssignPublicIps) {
         this. = autoAssignPublicIps;
         return this;
     }

    
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.

Returns:
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.
 
     public Boolean getAutoAssignPublicIps() {
         return ;
     }

    
A LayerCustomRecipes object that specifies the layer custom recipes.

Returns:
A LayerCustomRecipes object that specifies the layer custom recipes.
 
     public Recipes getCustomRecipes() {
         return ;
     }
    
    
A LayerCustomRecipes object that specifies the layer custom recipes.

Parameters:
customRecipes A LayerCustomRecipes object that specifies the layer custom recipes.
 
     public void setCustomRecipes(Recipes customRecipes) {
         this. = customRecipes;
     }
    
    
A LayerCustomRecipes object that specifies the layer custom recipes.

Returns a reference to this object so that method calls can be chained together.

Parameters:
customRecipes A LayerCustomRecipes object that specifies the layer custom recipes.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public CreateLayerRequest withCustomRecipes(Recipes customRecipes) {
         this. = customRecipes;
         return this;
     }

    
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 manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

Returns:
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 manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

    public Boolean isInstallUpdatesOnBoot() {
        return ;
    }
    
    
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 manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

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 manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

    public void setInstallUpdatesOnBoot(Boolean installUpdatesOnBoot) {
        this. = 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 manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

Returns a reference to this object so that method calls can be chained together.

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 manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateLayerRequest withInstallUpdatesOnBoot(Boolean installUpdatesOnBoot) {
        this. = installUpdatesOnBoot;
        return this;
    }

    
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 manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

Returns:
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 manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances. <note>

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates. </note>

    public Boolean getInstallUpdatesOnBoot() {
        return ;
    }

    
Whether to use Amazon EBS-optimized instances.

Returns:
Whether to use Amazon EBS-optimized instances.
        return ;
    }
    
    
Whether to use Amazon EBS-optimized instances.

Parameters:
useEbsOptimizedInstances Whether to use Amazon EBS-optimized instances.
    public void setUseEbsOptimizedInstances(Boolean useEbsOptimizedInstances) {
        this. = useEbsOptimizedInstances;
    }
    
    
Whether to use Amazon EBS-optimized instances.

Returns a reference to this object so that method calls can be chained together.

Parameters:
useEbsOptimizedInstances Whether to use Amazon EBS-optimized instances.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreateLayerRequest withUseEbsOptimizedInstances(Boolean useEbsOptimizedInstances) {
        this. = useEbsOptimizedInstances;
        return this;
    }

    
Whether to use Amazon EBS-optimized instances.

Returns:
Whether to use Amazon EBS-optimized instances.
        return ;
    }

    
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:
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.
        return ;
    }
    
    
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.
    public void setLifecycleEventConfiguration(LifecycleEventConfiguration lifecycleEventConfiguration) {
        this. = 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 a reference to this object so that method calls can be chained together.

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:
A reference to this updated object so that method calls can be chained together.
        this. = lifecycleEventConfiguration;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getStackId() != nullsb.append("StackId: " + getStackId() + ",");
        if (getType() != nullsb.append("Type: " + getType() + ",");
        if (getName() != nullsb.append("Name: " + getName() + ",");
        if (getShortname() != nullsb.append("Shortname: " + getShortname() + ",");
        if (getAttributes() != nullsb.append("Attributes: " + getAttributes() + ",");
        if (getCustomInstanceProfileArn() != nullsb.append("CustomInstanceProfileArn: " + getCustomInstanceProfileArn() + ",");
        if (getCustomSecurityGroupIds() != nullsb.append("CustomSecurityGroupIds: " + getCustomSecurityGroupIds() + ",");
        if (getPackages() != nullsb.append("Packages: " + getPackages() + ",");
        if (getVolumeConfigurations() != nullsb.append("VolumeConfigurations: " + getVolumeConfigurations() + ",");
        if (isEnableAutoHealing() != nullsb.append("EnableAutoHealing: " + isEnableAutoHealing() + ",");
        if (isAutoAssignElasticIps() != nullsb.append("AutoAssignElasticIps: " + isAutoAssignElasticIps() + ",");
        if (isAutoAssignPublicIps() != nullsb.append("AutoAssignPublicIps: " + isAutoAssignPublicIps() + ",");
        if (getCustomRecipes() != nullsb.append("CustomRecipes: " + getCustomRecipes() + ",");
        if (isInstallUpdatesOnBoot() != nullsb.append("InstallUpdatesOnBoot: " + isInstallUpdatesOnBoot() + ",");
        if (isUseEbsOptimizedInstances() != nullsb.append("UseEbsOptimizedInstances: " + isUseEbsOptimizedInstances() + ",");
        if (getLifecycleEventConfiguration() != nullsb.append("LifecycleEventConfiguration: " + getLifecycleEventConfiguration() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); 
        hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); 
        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); 
        hashCode = prime * hashCode + ((getShortname() == null) ? 0 : getShortname().hashCode()); 
        hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); 
        hashCode = prime * hashCode + ((getCustomInstanceProfileArn() == null) ? 0 : getCustomInstanceProfileArn().hashCode()); 
        hashCode = prime * hashCode + ((getCustomSecurityGroupIds() == null) ? 0 : getCustomSecurityGroupIds().hashCode()); 
        hashCode = prime * hashCode + ((getPackages() == null) ? 0 : getPackages().hashCode()); 
        hashCode = prime * hashCode + ((getVolumeConfigurations() == null) ? 0 : getVolumeConfigurations().hashCode()); 
        hashCode = prime * hashCode + ((isEnableAutoHealing() == null) ? 0 : isEnableAutoHealing().hashCode()); 
        hashCode = prime * hashCode + ((isAutoAssignElasticIps() == null) ? 0 : isAutoAssignElasticIps().hashCode()); 
        hashCode = prime * hashCode + ((isAutoAssignPublicIps() == null) ? 0 : isAutoAssignPublicIps().hashCode()); 
        hashCode = prime * hashCode + ((getCustomRecipes() == null) ? 0 : getCustomRecipes().hashCode()); 
        hashCode = prime * hashCode + ((isInstallUpdatesOnBoot() == null) ? 0 : isInstallUpdatesOnBoot().hashCode()); 
        hashCode = prime * hashCode + ((isUseEbsOptimizedInstances() == null) ? 0 : isUseEbsOptimizedInstances().hashCode()); 
        hashCode = prime * hashCode + ((getLifecycleEventConfiguration() == null) ? 0 : getLifecycleEventConfiguration().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CreateLayerRequest == falsereturn false;
        CreateLayerRequest other = (CreateLayerRequest)obj;
        
        if (other.getStackId() == null ^ this.getStackId() == nullreturn false;
        if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == falsereturn false
        if (other.getType() == null ^ this.getType() == nullreturn false;
        if (other.getType() != null && other.getType().equals(this.getType()) == falsereturn false
        if (other.getName() == null ^ this.getName() == nullreturn false;
        if (other.getName() != null && other.getName().equals(this.getName()) == falsereturn false
        if (other.getShortname() == null ^ this.getShortname() == nullreturn false;
        if (other.getShortname() != null && other.getShortname().equals(this.getShortname()) == falsereturn false
        if (other.getAttributes() == null ^ this.getAttributes() == nullreturn false;
        if (other.getAttributes() != null && other.getAttributes().equals(this.getAttributes()) == falsereturn false
        if (other.getCustomInstanceProfileArn() == null ^ this.getCustomInstanceProfileArn() == nullreturn false;
        if (other.getCustomInstanceProfileArn() != null && other.getCustomInstanceProfileArn().equals(this.getCustomInstanceProfileArn()) == falsereturn false
        if (other.getCustomSecurityGroupIds() == null ^ this.getCustomSecurityGroupIds() == nullreturn false;
        if (other.getCustomSecurityGroupIds() != null && other.getCustomSecurityGroupIds().equals(this.getCustomSecurityGroupIds()) == falsereturn false
        if (other.getPackages() == null ^ this.getPackages() == nullreturn false;
        if (other.getPackages() != null && other.getPackages().equals(this.getPackages()) == falsereturn false
        if (other.getVolumeConfigurations() == null ^ this.getVolumeConfigurations() == nullreturn false;
        if (other.getVolumeConfigurations() != null && other.getVolumeConfigurations().equals(this.getVolumeConfigurations()) == falsereturn false
        if (other.isEnableAutoHealing() == null ^ this.isEnableAutoHealing() == nullreturn false;
        if (other.isEnableAutoHealing() != null && other.isEnableAutoHealing().equals(this.isEnableAutoHealing()) == falsereturn false
        if (other.isAutoAssignElasticIps() == null ^ this.isAutoAssignElasticIps() == nullreturn false;
        if (other.isAutoAssignElasticIps() != null && other.isAutoAssignElasticIps().equals(this.isAutoAssignElasticIps()) == falsereturn false
        if (other.isAutoAssignPublicIps() == null ^ this.isAutoAssignPublicIps() == nullreturn false;
        if (other.isAutoAssignPublicIps() != null && other.isAutoAssignPublicIps().equals(this.isAutoAssignPublicIps()) == falsereturn false
        if (other.getCustomRecipes() == null ^ this.getCustomRecipes() == nullreturn false;
        if (other.getCustomRecipes() != null && other.getCustomRecipes().equals(this.getCustomRecipes()) == falsereturn false
        if (other.isInstallUpdatesOnBoot() == null ^ this.isInstallUpdatesOnBoot() == nullreturn false;
        if (other.isInstallUpdatesOnBoot() != null && other.isInstallUpdatesOnBoot().equals(this.isInstallUpdatesOnBoot()) == falsereturn false
        if (other.isUseEbsOptimizedInstances() == null ^ this.isUseEbsOptimizedInstances() == nullreturn false;
        if (other.isUseEbsOptimizedInstances() != null && other.isUseEbsOptimizedInstances().equals(this.isUseEbsOptimizedInstances()) == falsereturn false
        if (other.getLifecycleEventConfiguration() == null ^ this.getLifecycleEventConfiguration() == nullreturn false;
        if (other.getLifecycleEventConfiguration() != null && other.getLifecycleEventConfiguration().equals(this.getLifecycleEventConfiguration()) == falsereturn false
        return true;
    }
    
    @Override
    public CreateLayerRequest clone() {
        
            return (CreateLayerRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X