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;
  

Describes a layer.

  
  public class Layer implements SerializableCloneable {

    
The layer stack ID.
  
      private String stackId;

    
The layer ID.
  
      private String layerId;

    
The layer type.

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.
  
      private String name;

    
The layer short name.
  
      private String shortname;

    
The layer attributes. <note>For the HaproxyStatsPassword, MysqlRootPassword, and GangliaPassword attributes, AWS OpsWorks returns *****FILTERED***** instead of the actual value</note>
  
      private java.util.Map<String,Stringattributes;

    
The ARN of the default IAM profile 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's custom security group IDs.
  
An array containing the layer's security group names.
  
An array of Package objects that describe the layer's packages.
  
A VolumeConfigurations object that describes the layer's Amazon EBS volumes.
  
Whether auto healing is disabled 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;

    
AWS OpsWorks supports five lifecycle events, setup, configuration, deploy, undeploy, and shutdown. For each layer, AWS OpsWorks runs a set of standard recipes for each event. In addition, you can provide custom recipes for any or all layers and events. AWS OpsWorks runs custom event recipes after the standard recipes. LayerCustomRecipes specifies the custom recipes for a particular layer to be run in response to each of the five events.

To specify a recipe, use the cookbook's directory name in the repository followed by two colons and the recipe name, which is the recipe's file name without the .rb extension. For example: phpapp2::dbsetup specifies the dbsetup.rb recipe in the repository's phpapp2 folder.

 
     private Recipes defaultRecipes;

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

    
Date when the layer was created.
 
     private String createdAt;

    
Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set 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 the layer uses Amazon EBS-optimized instances.
 
     private Boolean useEbsOptimizedInstances;

    
A LifeCycleEventConfiguration object that specifies the Shutdown event configuration.
 
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 Layer withStackId(String stackId) {
         this. = stackId;
         return this;
     }

    
The layer ID.

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

Parameters:
layerId The layer ID.
 
     public void setLayerId(String layerId) {
         this. = layerId;
     }
    
    
The layer ID.

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

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

    
The layer type.

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

Returns:
The layer type.
See also:
LayerType
 
     public String getType() {
         return ;
     }
    
    
The layer type.

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

Parameters:
type The layer type.
See also:
LayerType
 
     public void setType(String type) {
         this. = type;
     }
    
    
The layer type.

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

    
The layer type.

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

Parameters:
type The layer type.
See also:
LayerType
 
     public void setType(LayerType type) {
         this. = type.toString();
     }
    
    
The layer type.

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

    
The layer name.

Returns:
The layer name.
 
     public String getName() {
         return ;
     }
    
    
The layer name.

Parameters:
name The layer name.
 
     public void setName(String name) {
         this. = name;
     }
    
    
The layer name.

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

Parameters:
name The layer name.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Layer withName(String name) {
         this. = name;
         return this;
     }

    
The layer short name.

Returns:
The layer short name.
 
     public String getShortname() {
         return ;
     }
    
    
The layer short name.

Parameters:
shortname The layer short name.
 
     public void setShortname(String shortname) {
         this. = shortname;
     }
    
    
The layer short name.

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

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

    
The layer attributes. <note>For the HaproxyStatsPassword, MysqlRootPassword, and GangliaPassword attributes, AWS OpsWorks returns *****FILTERED***** instead of the actual value</note>

Returns:
The layer attributes. <note>For the HaproxyStatsPassword, MysqlRootPassword, and GangliaPassword attributes, AWS OpsWorks returns *****FILTERED***** instead of the actual value</note>
 
     public java.util.Map<String,StringgetAttributes() {
         
         if ( == null) {
              = new java.util.HashMap<String,String>();
         }
         return ;
     }
    
    
The layer attributes. <note>For the HaproxyStatsPassword, MysqlRootPassword, and GangliaPassword attributes, AWS OpsWorks returns *****FILTERED***** instead of the actual value</note>

Parameters:
attributes The layer attributes. <note>For the HaproxyStatsPassword, MysqlRootPassword, and GangliaPassword attributes, AWS OpsWorks returns *****FILTERED***** instead of the actual value</note>
 
     public void setAttributes(java.util.Map<String,Stringattributes) {
         this. = attributes;
     }
    
    
The layer attributes. <note>For the HaproxyStatsPassword, MysqlRootPassword, and GangliaPassword attributes, AWS OpsWorks returns *****FILTERED***** instead of the actual value</note>

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

Parameters:
attributes The layer attributes. <note>For the HaproxyStatsPassword, MysqlRootPassword, and GangliaPassword attributes, AWS OpsWorks returns *****FILTERED***** instead of the actual value</note>
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Layer withAttributes(java.util.Map<String,Stringattributes) {
         setAttributes(attributes);
         return this;
     }

    
The layer attributes. <note>For the HaproxyStatsPassword, MysqlRootPassword, and GangliaPassword attributes, AWS OpsWorks returns *****FILTERED***** instead of the actual value</note>

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 Layer 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.

 
   public Layer clearAttributesEntries() {
     this. = null;
     return this;
   }
  
    
The ARN of the default IAM profile to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

Returns:
The ARN of the default IAM profile 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 the default 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 the default IAM profile 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 the default IAM profile 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 the default IAM profile 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 Layer withCustomInstanceProfileArn(String customInstanceProfileArn) {
         this. = customInstanceProfileArn;
         return this;
     }

    
An array containing the layer's custom security group IDs.

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

Parameters:
customSecurityGroupIds An array containing the layer's 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's 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's custom security group IDs.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Layer 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's 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's custom security group IDs.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Layer 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 containing the layer's security group names.

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

Parameters:
defaultSecurityGroupNames An array containing the layer's security group names.
 
     public void setDefaultSecurityGroupNames(java.util.Collection<StringdefaultSecurityGroupNames) {
         if (defaultSecurityGroupNames == null) {
             this. = null;
             return;
         }
         com.amazonaws.internal.ListWithAutoConstructFlag<StringdefaultSecurityGroupNamesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(defaultSecurityGroupNames.size());
         defaultSecurityGroupNamesCopy.addAll(defaultSecurityGroupNames);
         this. = defaultSecurityGroupNamesCopy;
     }
    
    
An array containing the layer's security group names.

NOTE: This method appends the values to the existing list (if any). Use setDefaultSecurityGroupNames(java.util.Collection) or withDefaultSecurityGroupNames(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:
defaultSecurityGroupNames An array containing the layer's security group names.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Layer withDefaultSecurityGroupNames(String... defaultSecurityGroupNames) {
         if (getDefaultSecurityGroupNames() == nullsetDefaultSecurityGroupNames(new java.util.ArrayList<String>(defaultSecurityGroupNames.length));
         for (String value : defaultSecurityGroupNames) {
             getDefaultSecurityGroupNames().add(value);
         }
         return this;
     }
    
    
An array containing the layer's security group names.

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

Parameters:
defaultSecurityGroupNames An array containing the layer's security group names.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Layer withDefaultSecurityGroupNames(java.util.Collection<StringdefaultSecurityGroupNames) {
         if (defaultSecurityGroupNames == null) {
             this. = null;
         } else {
             com.amazonaws.internal.ListWithAutoConstructFlag<StringdefaultSecurityGroupNamesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(defaultSecurityGroupNames.size());
             defaultSecurityGroupNamesCopy.addAll(defaultSecurityGroupNames);
             this. = defaultSecurityGroupNamesCopy;
         }
 
         return this;
     }

    
An array of Package objects that describe the layer's packages.

Returns:
An array of Package objects that describe the layer's 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's packages.

Parameters:
packages An array of Package objects that describe the layer's 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's 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's packages.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Layer 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's 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's packages.
Returns:
A reference to this updated object so that method calls can be chained together.
 
     public Layer 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 Layer 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.
 
     public Layer withVolumeConfigurations(java.util.Collection<VolumeConfigurationvolumeConfigurations) {
         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 auto healing is disabled for the layer.

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

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

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

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

    
Whether auto healing is disabled for the layer.

Returns:
Whether auto healing is disabled 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 Layer 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 Layer 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 ;
    }

    
AWS OpsWorks supports five lifecycle events, setup, configuration, deploy, undeploy, and shutdown. For each layer, AWS OpsWorks runs a set of standard recipes for each event. In addition, you can provide custom recipes for any or all layers and events. AWS OpsWorks runs custom event recipes after the standard recipes. LayerCustomRecipes specifies the custom recipes for a particular layer to be run in response to each of the five events.

To specify a recipe, use the cookbook's directory name in the repository followed by two colons and the recipe name, which is the recipe's file name without the .rb extension. For example: phpapp2::dbsetup specifies the dbsetup.rb recipe in the repository's phpapp2 folder.

Returns:
AWS OpsWorks supports five lifecycle events, setup, configuration, deploy, undeploy, and shutdown. For each layer, AWS OpsWorks runs a set of standard recipes for each event. In addition, you can provide custom recipes for any or all layers and events. AWS OpsWorks runs custom event recipes after the standard recipes. LayerCustomRecipes specifies the custom recipes for a particular layer to be run in response to each of the five events.

To specify a recipe, use the cookbook's directory name in the repository followed by two colons and the recipe name, which is the recipe's file name without the .rb extension. For example: phpapp2::dbsetup specifies the dbsetup.rb recipe in the repository's phpapp2 folder.

    public Recipes getDefaultRecipes() {
        return ;
    }
    
    
AWS OpsWorks supports five lifecycle events, setup, configuration, deploy, undeploy, and shutdown. For each layer, AWS OpsWorks runs a set of standard recipes for each event. In addition, you can provide custom recipes for any or all layers and events. AWS OpsWorks runs custom event recipes after the standard recipes. LayerCustomRecipes specifies the custom recipes for a particular layer to be run in response to each of the five events.

To specify a recipe, use the cookbook's directory name in the repository followed by two colons and the recipe name, which is the recipe's file name without the .rb extension. For example: phpapp2::dbsetup specifies the dbsetup.rb recipe in the repository's phpapp2 folder.

Parameters:
defaultRecipes AWS OpsWorks supports five lifecycle events, setup, configuration, deploy, undeploy, and shutdown. For each layer, AWS OpsWorks runs a set of standard recipes for each event. In addition, you can provide custom recipes for any or all layers and events. AWS OpsWorks runs custom event recipes after the standard recipes. LayerCustomRecipes specifies the custom recipes for a particular layer to be run in response to each of the five events.

To specify a recipe, use the cookbook's directory name in the repository followed by two colons and the recipe name, which is the recipe's file name without the .rb extension. For example: phpapp2::dbsetup specifies the dbsetup.rb recipe in the repository's phpapp2 folder.

    public void setDefaultRecipes(Recipes defaultRecipes) {
        this. = defaultRecipes;
    }
    
    
AWS OpsWorks supports five lifecycle events, setup, configuration, deploy, undeploy, and shutdown. For each layer, AWS OpsWorks runs a set of standard recipes for each event. In addition, you can provide custom recipes for any or all layers and events. AWS OpsWorks runs custom event recipes after the standard recipes. LayerCustomRecipes specifies the custom recipes for a particular layer to be run in response to each of the five events.

To specify a recipe, use the cookbook's directory name in the repository followed by two colons and the recipe name, which is the recipe's file name without the .rb extension. For example: phpapp2::dbsetup specifies the dbsetup.rb recipe in the repository's phpapp2 folder.

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

Parameters:
defaultRecipes AWS OpsWorks supports five lifecycle events, setup, configuration, deploy, undeploy, and shutdown. For each layer, AWS OpsWorks runs a set of standard recipes for each event. In addition, you can provide custom recipes for any or all layers and events. AWS OpsWorks runs custom event recipes after the standard recipes. LayerCustomRecipes specifies the custom recipes for a particular layer to be run in response to each of the five events.

To specify a recipe, use the cookbook's directory name in the repository followed by two colons and the recipe name, which is the recipe's file name without the .rb extension. For example: phpapp2::dbsetup specifies the dbsetup.rb recipe in the repository's phpapp2 folder.

Returns:
A reference to this updated object so that method calls can be chained together.
    public Layer withDefaultRecipes(Recipes defaultRecipes) {
        this. = defaultRecipes;
        return this;
    }

    
A LayerCustomRecipes object that specifies the layer's custom recipes.

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

Parameters:
customRecipes A LayerCustomRecipes object that specifies the layer's custom recipes.
    public void setCustomRecipes(Recipes customRecipes) {
        this. = customRecipes;
    }
    
    
A LayerCustomRecipes object that specifies the layer's 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's custom recipes.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Layer withCustomRecipes(Recipes customRecipes) {
        this. = customRecipes;
        return this;
    }

    
Date when the layer was created.

Returns:
Date when the layer was created.
    public String getCreatedAt() {
        return ;
    }
    
    
Date when the layer was created.

Parameters:
createdAt Date when the layer was created.
    public void setCreatedAt(String createdAt) {
        this. = createdAt;
    }
    
    
Date when the layer was created.

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

Parameters:
createdAt Date when the layer was created.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Layer withCreatedAt(String createdAt) {
        this. = createdAt;
        return this;
    }

    
Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set 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. If this value is set 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. If this value is set 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. If this value is set 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. If this value is set 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. If this value is set 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 Layer withInstallUpdatesOnBoot(Boolean installUpdatesOnBoot) {
        this. = installUpdatesOnBoot;
        return this;
    }

    
Whether to install operating system and package updates when the instance boots. The default value is true. If this value is set 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. If this value is set 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 the layer uses Amazon EBS-optimized instances.

Returns:
Whether the layer uses Amazon EBS-optimized instances.
        return ;
    }
    
    
Whether the layer uses Amazon EBS-optimized instances.

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

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

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

    
Whether the layer uses Amazon EBS-optimized instances.

Returns:
Whether the layer uses Amazon EBS-optimized instances.
        return ;
    }

    
A LifeCycleEventConfiguration object that specifies the Shutdown event configuration.

Returns:
A LifeCycleEventConfiguration object that specifies the Shutdown event configuration.
        return ;
    }
    
    
A LifeCycleEventConfiguration object that specifies the Shutdown event configuration.

Parameters:
lifecycleEventConfiguration A LifeCycleEventConfiguration object that specifies the Shutdown event configuration.
    public void setLifecycleEventConfiguration(LifecycleEventConfiguration lifecycleEventConfiguration) {
        this. = lifecycleEventConfiguration;
    }
    
    
A LifeCycleEventConfiguration object that specifies the Shutdown event configuration.

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

Parameters:
lifecycleEventConfiguration A LifeCycleEventConfiguration object that specifies the Shutdown event configuration.
Returns:
A reference to this updated object so that method calls can be chained together.
    public Layer withLifecycleEventConfiguration(LifecycleEventConfiguration lifecycleEventConfiguration) {
        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 (getLayerId() != nullsb.append("LayerId: " + getLayerId() + ",");
        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 (getDefaultSecurityGroupNames() != nullsb.append("DefaultSecurityGroupNames: " + getDefaultSecurityGroupNames() + ",");
        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 (getDefaultRecipes() != nullsb.append("DefaultRecipes: " + getDefaultRecipes() + ",");
        if (getCustomRecipes() != nullsb.append("CustomRecipes: " + getCustomRecipes() + ",");
        if (getCreatedAt() != nullsb.append("CreatedAt: " + getCreatedAt() + ",");
        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 + ((getLayerId() == null) ? 0 : getLayerId().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 + ((getDefaultSecurityGroupNames() == null) ? 0 : getDefaultSecurityGroupNames().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 + ((getDefaultRecipes() == null) ? 0 : getDefaultRecipes().hashCode()); 
        hashCode = prime * hashCode + ((getCustomRecipes() == null) ? 0 : getCustomRecipes().hashCode()); 
        hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().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 Layer == falsereturn false;
        Layer other = (Layer)obj;
        
        if (other.getStackId() == null ^ this.getStackId() == nullreturn false;
        if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == falsereturn false
        if (other.getLayerId() == null ^ this.getLayerId() == nullreturn false;
        if (other.getLayerId() != null && other.getLayerId().equals(this.getLayerId()) == 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.getDefaultSecurityGroupNames() == null ^ this.getDefaultSecurityGroupNames() == nullreturn false;
        if (other.getDefaultSecurityGroupNames() != null && other.getDefaultSecurityGroupNames().equals(this.getDefaultSecurityGroupNames()) == 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.getDefaultRecipes() == null ^ this.getDefaultRecipes() == nullreturn false;
        if (other.getDefaultRecipes() != null && other.getDefaultRecipes().equals(this.getDefaultRecipes()) == falsereturn false
        if (other.getCustomRecipes() == null ^ this.getCustomRecipes() == nullreturn false;
        if (other.getCustomRecipes() != null && other.getCustomRecipes().equals(this.getCustomRecipes()) == falsereturn false
        if (other.getCreatedAt() == null ^ this.getCreatedAt() == nullreturn false;
        if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == 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 Layer clone() {
        try {
            return (Layersuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X