You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::OpsWorks::Layer

Inherits:
Resources::Resource show all
Defined in:
(unknown)

Instance Attribute Summary collapse

Attributes inherited from Resources::Resource

#client, #identifiers

Instance Method Summary collapse

Methods inherited from Resources::Resource

add_data_attribute, add_identifier, #data, data_attributes, #data_loaded?, identifiers, #load, #wait_until

Methods included from Resources::OperationMethods

#add_batch_operation, #add_operation, #batch_operation, #batch_operation_names, #batch_operations, #operation, #operation_names, #operations

Constructor Details

#initialize(id, options = {}) ⇒ Object #initialize(options = {}) ⇒ Object

Overloads:

  • #initialize(id, options = {}) ⇒ Object

    Parameters:

    • id (String)

    Options Hash (options):

    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

  • #initialize(options = {}) ⇒ Object

    Options Hash (options):

    • :id (required, String)
    • :client (Client)

      When `:client is not given, the options hash is used to construct a new Client object.

Instance Attribute Details

#arnString (readonly)

Returns:

  • (String)

#attributesHash<String,String> (readonly)

The layer attributes.

For the HaproxyStatsPassword, MysqlRootPassword, and GangliaPassword attributes, AWS OpsWorks Stacks returns *****FILTERED***** instead of the actual value

For an ECS Cluster layer, AWS OpsWorks Stacks the EcsClusterArn attribute is set to the cluster\'s ARN.

Returns:

  • (Hash<String,String>)

    The layer attributes.

#auto_assign_elastic_ipsBoolean (readonly)

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

Returns:

  • (Boolean)

    Whether to automatically assign an [Elastic IP address][1] to the layer\'s instances.

#auto_assign_public_ipsBoolean (readonly)

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:

  • (Boolean)

    For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer\'s instances.

#cloud_watch_logs_configurationTypes::CloudWatchLogsConfiguration (readonly)

The Amazon CloudWatch Logs configuration settings for the layer.

Returns:

#created_atString (readonly)

Date when the layer was created.

Returns:

  • (String)

    Date when the layer was created.

#custom_instance_profile_arnString (readonly)

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:

  • (String)

    The ARN of the default IAM profile to be used for the layer\'s EC2 instances.

#custom_jsonString (readonly)

A JSON formatted string containing the layer\'s custom stack configuration and deployment attributes.

Returns:

  • (String)

    A JSON formatted string containing the layer\'s custom stack configuration and deployment attributes.

#custom_recipesTypes::Recipes (readonly)

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

Returns:

  • (Types::Recipes)

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

#custom_security_group_idsArray<String> (readonly)

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

Returns:

  • (Array<String>)

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

#default_recipesTypes::Recipes (readonly)

AWS OpsWorks Stacks supports five lifecycle events: setup, configuration, deploy, undeploy, and shutdown. For each layer, AWS OpsWorks Stacks 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 Stacks 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:

  • (Types::Recipes)

    AWS OpsWorks Stacks supports five lifecycle events: setup, configuration, deploy, undeploy, and shutdown.

#default_security_group_namesArray<String> (readonly)

An array containing the layer\'s security group names.

Returns:

  • (Array<String>)

    An array containing the layer\'s security group names.

#enable_auto_healingBoolean (readonly)

Whether auto healing is disabled for the layer.

Returns:

  • (Boolean)

    Whether auto healing is disabled for the layer.

#idString (readonly)

Returns:

  • (String)

#install_updates_on_bootBoolean (readonly)

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.

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

Returns:

  • (Boolean)

    Whether to install operating system and package updates when the instance boots.

#layer_idString (readonly)

The layer ID.

Returns:

  • (String)

    The layer ID.

#lifecycle_event_configurationTypes::LifecycleEventConfiguration (readonly)

A LifeCycleEventConfiguration object that specifies the Shutdown event configuration.

Returns:

#nameString (readonly)

The layer name.

Returns:

  • (String)

    The layer name.

#packagesArray<String> (readonly)

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

Returns:

  • (Array<String>)

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

#shortnameString (readonly)

The layer short name.

Returns:

  • (String)

    The layer short name.

#stack_idString (readonly)

The layer stack ID.

Returns:

  • (String)

    The layer stack ID.

#typeString (readonly)

The layer type.

Possible values:

  • aws-flow-ruby
  • ecs-cluster
  • java-app
  • lb
  • web
  • php-app
  • rails-app
  • nodejs-app
  • memcached
  • db-master
  • monitoring-master
  • custom

Returns:

  • (String)

    The layer type.

#use_ebs_optimized_instancesBoolean (readonly)

Whether the layer uses Amazon EBS-optimized instances.

Returns:

  • (Boolean)

    Whether the layer uses Amazon EBS-optimized instances.

#volume_configurationsArray<Types::VolumeConfiguration> (readonly)

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

Returns:

Instance Method Details

#deleteStruct

Deletes a specified layer. You must first stop and then delete all associated instances or unassign registered instances. For more information, see How to Delete a Layer.

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.

Examples:

Request syntax example with placeholder values


layer.delete()

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#stackStack?

Returns: