Class Recipes

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class Recipes
    extends Object
    implements Serializable, Cloneable

    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.

    See Also:
    Serialized Form
    • Constructor Detail

      • Recipes

        public Recipes()
    • Method Detail

      • getSetup

        public List<String> getSetup()

        An array of custom recipe names to be run following a setup event.

        Returns:
        An array of custom recipe names to be run following a setup event.
      • setSetup

        public void setSetup​(Collection<String> setup)

        An array of custom recipe names to be run following a setup event.

        Parameters:
        setup - An array of custom recipe names to be run following a setup event.
      • withSetup

        public Recipes withSetup​(String... setup)

        An array of custom recipe names to be run following a setup event.

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

        Parameters:
        setup - An array of custom recipe names to be run following a setup event.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withSetup

        public Recipes withSetup​(Collection<String> setup)

        An array of custom recipe names to be run following a setup event.

        Parameters:
        setup - An array of custom recipe names to be run following a setup event.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getConfigure

        public List<String> getConfigure()

        An array of custom recipe names to be run following a configure event.

        Returns:
        An array of custom recipe names to be run following a configure event.
      • setConfigure

        public void setConfigure​(Collection<String> configure)

        An array of custom recipe names to be run following a configure event.

        Parameters:
        configure - An array of custom recipe names to be run following a configure event.
      • withConfigure

        public Recipes withConfigure​(String... configure)

        An array of custom recipe names to be run following a configure event.

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

        Parameters:
        configure - An array of custom recipe names to be run following a configure event.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withConfigure

        public Recipes withConfigure​(Collection<String> configure)

        An array of custom recipe names to be run following a configure event.

        Parameters:
        configure - An array of custom recipe names to be run following a configure event.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getDeploy

        public List<String> getDeploy()

        An array of custom recipe names to be run following a deploy event.

        Returns:
        An array of custom recipe names to be run following a deploy event.
      • setDeploy

        public void setDeploy​(Collection<String> deploy)

        An array of custom recipe names to be run following a deploy event.

        Parameters:
        deploy - An array of custom recipe names to be run following a deploy event.
      • withDeploy

        public Recipes withDeploy​(String... deploy)

        An array of custom recipe names to be run following a deploy event.

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

        Parameters:
        deploy - An array of custom recipe names to be run following a deploy event.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withDeploy

        public Recipes withDeploy​(Collection<String> deploy)

        An array of custom recipe names to be run following a deploy event.

        Parameters:
        deploy - An array of custom recipe names to be run following a deploy event.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getUndeploy

        public List<String> getUndeploy()

        An array of custom recipe names to be run following a undeploy event.

        Returns:
        An array of custom recipe names to be run following a undeploy event.
      • setUndeploy

        public void setUndeploy​(Collection<String> undeploy)

        An array of custom recipe names to be run following a undeploy event.

        Parameters:
        undeploy - An array of custom recipe names to be run following a undeploy event.
      • withUndeploy

        public Recipes withUndeploy​(String... undeploy)

        An array of custom recipe names to be run following a undeploy event.

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

        Parameters:
        undeploy - An array of custom recipe names to be run following a undeploy event.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withUndeploy

        public Recipes withUndeploy​(Collection<String> undeploy)

        An array of custom recipe names to be run following a undeploy event.

        Parameters:
        undeploy - An array of custom recipe names to be run following a undeploy event.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getShutdown

        public List<String> getShutdown()

        An array of custom recipe names to be run following a shutdown event.

        Returns:
        An array of custom recipe names to be run following a shutdown event.
      • setShutdown

        public void setShutdown​(Collection<String> shutdown)

        An array of custom recipe names to be run following a shutdown event.

        Parameters:
        shutdown - An array of custom recipe names to be run following a shutdown event.
      • withShutdown

        public Recipes withShutdown​(String... shutdown)

        An array of custom recipe names to be run following a shutdown event.

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

        Parameters:
        shutdown - An array of custom recipe names to be run following a shutdown event.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • withShutdown

        public Recipes withShutdown​(Collection<String> shutdown)

        An array of custom recipe names to be run following a shutdown event.

        Parameters:
        shutdown - An array of custom recipe names to be run following a shutdown event.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • toString

        public String toString()
        Returns a string representation of this object; useful for testing and debugging.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this object.
        See Also:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object