Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.opsworks.model
Class CreateLayerRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.opsworks.model.CreateLayerRequest
All Implemented Interfaces:
java.io.Serializable

public class CreateLayerRequest
extends AmazonWebServiceRequest
implements java.io.Serializable

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 non-custom 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 non-custom 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.

See Also:
AWSOpsWorks.createLayer(CreateLayerRequest), Serialized Form

Constructor Summary
CreateLayerRequest()
           
 
Method Summary
 CreateLayerRequest addAttributesEntry(java.lang.String key, java.lang.String value)
          One or more user-defined key/value pairs to be added to the stack attributes bag.
 CreateLayerRequest clearAttributesEntries()
          Removes all the entries added into Attributes.
 boolean equals(java.lang.Object obj)
           
 java.util.Map<java.lang.String,java.lang.String> getAttributes()
          One or more user-defined key/value pairs to be added to the stack attributes bag.
 java.lang.Boolean getAutoAssignElasticIps()
          Whether to automatically assign an Elastic IP address to the layer.
 java.lang.String getCustomInstanceProfileArn()
          The ARN of an IAM profile that to be used for the layer's EC2 instances.
 Recipes getCustomRecipes()
          A LayerCustomRecipes object that specifies the layer custom recipes.
 java.util.List<java.lang.String> getCustomSecurityGroupIds()
          An array containing the layer custom security group IDs.
 java.lang.Boolean getEnableAutoHealing()
          Whether to disable auto healing for the layer.
 java.lang.String getName()
          The layer name, which is used by the console.
 java.util.List<java.lang.String> getPackages()
          An array of Package objects that describe the layer packages.
 java.lang.String getShortname()
          The layer short name, which is used internally by OpsWorks and by Chef recipes.
 java.lang.String getStackId()
          The layer stack ID.
 java.lang.String getType()
          The layer type.
 java.util.List<VolumeConfiguration> getVolumeConfigurations()
          A VolumeConfigurations object that describes the layer Amazon EBS volumes.
 int hashCode()
           
 java.lang.Boolean isAutoAssignElasticIps()
          Whether to automatically assign an Elastic IP address to the layer.
 java.lang.Boolean isEnableAutoHealing()
          Whether to disable auto healing for the layer.
 void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
          One or more user-defined key/value pairs to be added to the stack attributes bag.
 void setAutoAssignElasticIps(java.lang.Boolean autoAssignElasticIps)
          Whether to automatically assign an Elastic IP address to the layer.
 void setCustomInstanceProfileArn(java.lang.String customInstanceProfileArn)
          The ARN of an IAM profile that to be used for the layer's EC2 instances.
 void setCustomRecipes(Recipes customRecipes)
          A LayerCustomRecipes object that specifies the layer custom recipes.
 void setCustomSecurityGroupIds(java.util.Collection<java.lang.String> customSecurityGroupIds)
          An array containing the layer custom security group IDs.
 void setEnableAutoHealing(java.lang.Boolean enableAutoHealing)
          Whether to disable auto healing for the layer.
 void setName(java.lang.String name)
          The layer name, which is used by the console.
 void setPackages(java.util.Collection<java.lang.String> packages)
          An array of Package objects that describe the layer packages.
 void setShortname(java.lang.String shortname)
          The layer short name, which is used internally by OpsWorks and by Chef recipes.
 void setStackId(java.lang.String stackId)
          The layer stack ID.
 void setType(LayerType type)
          The layer type.
 void setType(java.lang.String type)
          The layer type.
 void setVolumeConfigurations(java.util.Collection<VolumeConfiguration> volumeConfigurations)
          A VolumeConfigurations object that describes the layer Amazon EBS volumes.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreateLayerRequest withAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
          One or more user-defined key/value pairs to be added to the stack attributes bag.
 CreateLayerRequest withAutoAssignElasticIps(java.lang.Boolean autoAssignElasticIps)
          Whether to automatically assign an Elastic IP address to the layer.
 CreateLayerRequest withCustomInstanceProfileArn(java.lang.String customInstanceProfileArn)
          The ARN of an IAM profile that to be used for the layer's EC2 instances.
 CreateLayerRequest withCustomRecipes(Recipes customRecipes)
          A LayerCustomRecipes object that specifies the layer custom recipes.
 CreateLayerRequest withCustomSecurityGroupIds(java.util.Collection<java.lang.String> customSecurityGroupIds)
          An array containing the layer custom security group IDs.
 CreateLayerRequest withCustomSecurityGroupIds(java.lang.String... customSecurityGroupIds)
          An array containing the layer custom security group IDs.
 CreateLayerRequest withEnableAutoHealing(java.lang.Boolean enableAutoHealing)
          Whether to disable auto healing for the layer.
 CreateLayerRequest withName(java.lang.String name)
          The layer name, which is used by the console.
 CreateLayerRequest withPackages(java.util.Collection<java.lang.String> packages)
          An array of Package objects that describe the layer packages.
 CreateLayerRequest withPackages(java.lang.String... packages)
          An array of Package objects that describe the layer packages.
 CreateLayerRequest withShortname(java.lang.String shortname)
          The layer short name, which is used internally by OpsWorks and by Chef recipes.
 CreateLayerRequest withStackId(java.lang.String stackId)
          The layer stack ID.
 CreateLayerRequest withType(LayerType type)
          The layer type.
 CreateLayerRequest withType(java.lang.String type)
          The layer type.
 CreateLayerRequest withVolumeConfigurations(java.util.Collection<VolumeConfiguration> volumeConfigurations)
          A VolumeConfigurations object that describes the layer Amazon EBS volumes.
 CreateLayerRequest withVolumeConfigurations(VolumeConfiguration... volumeConfigurations)
          A VolumeConfigurations object that describes the layer Amazon EBS volumes.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreateLayerRequest

public CreateLayerRequest()
Method Detail

getStackId

public java.lang.String getStackId()
The layer stack ID.

Returns:
The layer stack ID.

setStackId

public void setStackId(java.lang.String stackId)
The layer stack ID.

Parameters:
stackId - The layer stack ID.

withStackId

public CreateLayerRequest withStackId(java.lang.String 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.

getType

public java.lang.String getType()
The layer type. A stack cannot have more than one layer of the same type. This parameter must be set to one of the following:

Constraints:
Allowed Values: 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 layer of the same type. This parameter must be set to one of the following:
  • lb: An HAProxy layer
  • web: A Static Web Server layer
  • rails-app: A Rails App Server layer
  • php-app: A PHP App Server layer
  • nodejs-app: A Node.js App Server layer
  • memcached: A Memcached layer
  • db-master: A MySQL layer
  • monitoring-master: A Ganglia layer
  • custom: A custom layer
See Also:
LayerType

setType

public void setType(java.lang.String type)
The layer type. A stack cannot have more than one layer of the same type. This parameter must be set to one of the following:

Constraints:
Allowed Values: 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 layer of the same type. This parameter must be set to one of the following:
  • lb: An HAProxy layer
  • web: A Static Web Server layer
  • rails-app: A Rails App Server layer
  • php-app: A PHP App Server layer
  • nodejs-app: A Node.js App Server layer
  • memcached: A Memcached layer
  • db-master: A MySQL layer
  • monitoring-master: A Ganglia layer
  • custom: A custom layer
See Also:
LayerType

withType

public CreateLayerRequest withType(java.lang.String type)
The layer type. A stack cannot have more than one layer of the same type. This parameter must be set to one of the following:

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

Constraints:
Allowed Values: 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 layer of the same type. This parameter must be set to one of the following:
  • lb: An HAProxy layer
  • web: A Static Web Server layer
  • rails-app: A Rails App Server layer
  • php-app: A PHP App Server layer
  • nodejs-app: A Node.js App Server layer
  • memcached: A Memcached layer
  • db-master: A MySQL layer
  • monitoring-master: A Ganglia layer
  • custom: A custom layer
See Also:
LayerType

setType

public void setType(LayerType type)
The layer type. A stack cannot have more than one layer of the same type. This parameter must be set to one of the following:

Constraints:
Allowed Values: 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 layer of the same type. This parameter must be set to one of the following:
  • lb: An HAProxy layer
  • web: A Static Web Server layer
  • rails-app: A Rails App Server layer
  • php-app: A PHP App Server layer
  • nodejs-app: A Node.js App Server layer
  • memcached: A Memcached layer
  • db-master: A MySQL layer
  • monitoring-master: A Ganglia layer
  • custom: A custom layer
See Also:
LayerType

withType

public CreateLayerRequest withType(LayerType type)
The layer type. A stack cannot have more than one layer of the same type. This parameter must be set to one of the following:

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

Constraints:
Allowed Values: 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 layer of the same type. This parameter must be set to one of the following:
  • lb: An HAProxy layer
  • web: A Static Web Server layer
  • rails-app: A Rails App Server layer
  • php-app: A PHP App Server layer
  • nodejs-app: A Node.js App Server layer
  • memcached: A Memcached layer
  • db-master: A MySQL layer
  • monitoring-master: A Ganglia layer
  • custom: A custom layer
See Also:
LayerType

getName

public java.lang.String getName()
The layer name, which is used by the console.

Returns:
The layer name, which is used by the console.

setName

public void setName(java.lang.String name)
The layer name, which is used by the console.

Parameters:
name - The layer name, which is used by the console.

withName

public CreateLayerRequest withName(java.lang.String 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.

getShortname

public java.lang.String getShortname()
The layer short name, which is used internally by OpsWorks and by Chef recipes. The shortname 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 '.'.

Returns:
The layer short name, which is used internally by OpsWorks and by Chef recipes. The shortname 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 '.'.

setShortname

public void setShortname(java.lang.String shortname)
The layer short name, which is used internally by OpsWorks and by Chef recipes. The shortname 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 '.'.

Parameters:
shortname - The layer short name, which is used internally by OpsWorks and by Chef recipes. The shortname 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 '.'.

withShortname

public CreateLayerRequest withShortname(java.lang.String shortname)
The layer short name, which is used internally by OpsWorks and by Chef recipes. The shortname 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 '.'.

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

Parameters:
shortname - The layer short name, which is used internally by OpsWorks and by Chef recipes. The shortname 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 '.'.

getAttributes

public java.util.Map<java.lang.String,java.lang.String> getAttributes()
One or more user-defined key/value pairs to be added to the stack attributes bag.

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

setAttributes

public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
One or more user-defined key/value pairs to be added to the stack attributes bag.

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

withAttributes

public CreateLayerRequest withAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
One or more user-defined key/value pairs to be added to the stack attributes bag.

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

addAttributesEntry

public CreateLayerRequest addAttributesEntry(java.lang.String key,
                                             java.lang.String value)
One or more user-defined key/value pairs to be added to the stack attributes bag.

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.

clearAttributesEntries

public CreateLayerRequest clearAttributesEntries()
Removes all the entries added into Attributes.

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


getCustomInstanceProfileArn

public java.lang.String getCustomInstanceProfileArn()
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.

setCustomInstanceProfileArn

public void setCustomInstanceProfileArn(java.lang.String 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.

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.

withCustomInstanceProfileArn

public CreateLayerRequest withCustomInstanceProfileArn(java.lang.String 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.

getCustomSecurityGroupIds

public java.util.List<java.lang.String> getCustomSecurityGroupIds()
An array containing the layer custom security group IDs.

Returns:
An array containing the layer custom security group IDs.

setCustomSecurityGroupIds

public void setCustomSecurityGroupIds(java.util.Collection<java.lang.String> customSecurityGroupIds)
An array containing the layer custom security group IDs.

Parameters:
customSecurityGroupIds - An array containing the layer custom security group IDs.

withCustomSecurityGroupIds

public CreateLayerRequest withCustomSecurityGroupIds(java.lang.String... customSecurityGroupIds)
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.

withCustomSecurityGroupIds

public CreateLayerRequest withCustomSecurityGroupIds(java.util.Collection<java.lang.String> customSecurityGroupIds)
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.

getPackages

public java.util.List<java.lang.String> getPackages()
An array of Package objects that describe the layer packages.

Returns:
An array of Package objects that describe the layer packages.

setPackages

public void setPackages(java.util.Collection<java.lang.String> packages)
An array of Package objects that describe the layer packages.

Parameters:
packages - An array of Package objects that describe the layer packages.

withPackages

public CreateLayerRequest withPackages(java.lang.String... packages)
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.

withPackages

public CreateLayerRequest withPackages(java.util.Collection<java.lang.String> packages)
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.

getVolumeConfigurations

public java.util.List<VolumeConfiguration> getVolumeConfigurations()
A VolumeConfigurations object that describes the layer Amazon EBS volumes.

Returns:
A VolumeConfigurations object that describes the layer Amazon EBS volumes.

setVolumeConfigurations

public void setVolumeConfigurations(java.util.Collection<VolumeConfiguration> volumeConfigurations)
A VolumeConfigurations object that describes the layer Amazon EBS volumes.

Parameters:
volumeConfigurations - A VolumeConfigurations object that describes the layer Amazon EBS volumes.

withVolumeConfigurations

public CreateLayerRequest withVolumeConfigurations(VolumeConfiguration... volumeConfigurations)
A VolumeConfigurations object that describes the layer 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 Amazon EBS volumes.

withVolumeConfigurations

public CreateLayerRequest withVolumeConfigurations(java.util.Collection<VolumeConfiguration> volumeConfigurations)
A VolumeConfigurations object that describes the layer 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 Amazon EBS volumes.

isEnableAutoHealing

public java.lang.Boolean isEnableAutoHealing()
Whether to disable auto healing for the layer.

Returns:
Whether to disable auto healing for the layer.

setEnableAutoHealing

public void setEnableAutoHealing(java.lang.Boolean enableAutoHealing)
Whether to disable auto healing for the layer.

Parameters:
enableAutoHealing - Whether to disable auto healing for the layer.

withEnableAutoHealing

public CreateLayerRequest withEnableAutoHealing(java.lang.Boolean 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.

getEnableAutoHealing

public java.lang.Boolean getEnableAutoHealing()
Whether to disable auto healing for the layer.

Returns:
Whether to disable auto healing for the layer.

isAutoAssignElasticIps

public java.lang.Boolean isAutoAssignElasticIps()
Whether to automatically assign an Elastic IP address to the layer.

Returns:
Whether to automatically assign an Elastic IP address to the layer.

setAutoAssignElasticIps

public void setAutoAssignElasticIps(java.lang.Boolean autoAssignElasticIps)
Whether to automatically assign an Elastic IP address to the layer.

Parameters:
autoAssignElasticIps - Whether to automatically assign an Elastic IP address to the layer.

withAutoAssignElasticIps

public CreateLayerRequest withAutoAssignElasticIps(java.lang.Boolean autoAssignElasticIps)
Whether to automatically assign an Elastic IP address to the 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.

getAutoAssignElasticIps

public java.lang.Boolean getAutoAssignElasticIps()
Whether to automatically assign an Elastic IP address to the layer.

Returns:
Whether to automatically assign an Elastic IP address to the layer.

getCustomRecipes

public Recipes getCustomRecipes()
A LayerCustomRecipes object that specifies the layer custom recipes.

Returns:
A LayerCustomRecipes object that specifies the layer custom recipes.

setCustomRecipes

public void setCustomRecipes(Recipes customRecipes)
A LayerCustomRecipes object that specifies the layer custom recipes.

Parameters:
customRecipes - A LayerCustomRecipes object that specifies the layer custom recipes.

withCustomRecipes

public CreateLayerRequest withCustomRecipes(Recipes 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.

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.