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

Class: Aws::OpsWorks::Client

Inherits:
Seahorse::Client::Base show all
Defined in:
(unknown)

Overview

An API client for AWS OpsWorks. To construct a client, you need to configure a :region and :credentials.

opsworks = Aws::OpsWorks::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

See #initialize for a full list of supported configuration options.

Region

You can configure a default region in the following locations:

  • ENV['AWS_REGION']
  • Aws.config[:region]

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • Aws.config[:credentials]
  • The shared credentials ini file at ~/.aws/credentials (more information)
  • From an instance profile when running on EC2

You can also construct a credentials object from one of the following classes:

Alternatively, you configure credentials with :access_key_id and :secret_access_key:

# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))

Aws::OpsWorks::Client.new(
  access_key_id: creds['access_key_id'],
  secret_access_key: creds['secret_access_key']
)

Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options = {}) ⇒ Aws::OpsWorks::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types. See Plugins::ParamConverter for more details.

  • :credentials (required, Credentials)

    Your AWS credentials. The following locations will be searched in order for credentials:

    • :access_key_id, :secret_access_key, and :session_token options
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • HOME/.aws/credentials shared credentials file
    • EC2 instance profile credentials See Plugins::RequestSigner for more details.
  • :endpoint (String)

    A default endpoint is constructed from the :region. See Plugins::RegionalEndpoint for more details.

  • :http_continue_timeout (Float) — default: 1

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_idle_timeout (Integer) — default: 5

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_open_timeout (Integer) — default: 15

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_proxy (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_read_timeout (Integer) — default: 60

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_wire_trace (Boolean) — default: false

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the logger at. See Plugins::Logging for more details.

  • :log_formatter (Logging::LogFormatter)

    The log formatter. Defaults to Seahorse::Client::Logging::Formatter.default. See Plugins::Logging for more details.

  • :logger (Logger) — default: nil

    The Logger instance to send log messages to. If this option is not set, logging will be disabled. See Plugins::Logging for more details.

  • :profile (String)

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used. See Plugins::RequestSigner for more details.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised. See Seahorse::Client::Plugins::RaiseResponseErrors for more details.

  • :region (required, String)

    The AWS region to connect to. The region is used to construct the client endpoint. Defaults to ENV['AWS_REGION']. Also checks AMAZON_REGION and AWS_DEFAULT_REGION. See Plugins::RegionalEndpoint for more details.

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials. See Plugins::RetryErrors for more details.

  • :secret_access_key (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :session_token (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects. See Plugins::Protocols::JsonRpc for more details.

  • :ssl_ca_bundle (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_directory (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_store (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_verify_peer (Boolean) — default: true

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled. See Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request. See Plugins::ParamValidator for more details.

Instance Method Details

#assign_instance(options = {}) ⇒ Struct

Assign a registered instance to a layer.

  • You can assign registered on-premises instances to any layer type.

  • You can assign registered Amazon EC2 instances only to custom layers.

  • You cannot use this action with instances that were created with AWS OpsWorks Stacks.

Required Permissions: To use this action, an AWS Identity and Access Management (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 with placeholder values


resp = client.assign_instance({
  instance_id: "String", # required
  layer_ids: ["String"], # required
})

Options Hash (options):

  • :instance_id (required, String)

    The instance ID.

  • :layer_ids (required, Array<String>)

    The layer ID, which must correspond to a custom layer. You cannot assign a registered instance to a built-in layer.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#assign_volume(options = {}) ⇒ Struct

Assigns one of the stack's registered Amazon EBS volumes to a specified instance. The volume must first be registered with the stack by calling RegisterVolume. After you register the volume, you must call UpdateVolume to specify a mount point before calling AssignVolume. For more information, see Resource Management.

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 with placeholder values


resp = client.assign_volume({
  volume_id: "String", # required
  instance_id: "String",
})

Options Hash (options):

  • :volume_id (required, String)

    The volume ID.

  • :instance_id (String)

    The instance ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#associate_elastic_ip(options = {}) ⇒ Struct

Associates one of the stack's registered Elastic IP addresses with a specified instance. The address must first be registered with the stack by calling RegisterElasticIp. For more information, see Resource Management.

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 with placeholder values


resp = client.associate_elastic_ip({
  elastic_ip: "String", # required
  instance_id: "String",
})

Options Hash (options):

  • :elastic_ip (required, String)

    The Elastic IP address.

  • :instance_id (String)

    The instance ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#attach_elastic_load_balancer(options = {}) ⇒ Struct

Attaches an Elastic Load Balancing load balancer to a specified layer. AWS OpsWorks Stacks does not support Application Load Balancer. You can only use Classic Load Balancer with AWS OpsWorks Stacks. For more information, see Elastic Load Balancing.

You must create the Elastic Load Balancing instance separately, by using the Elastic Load Balancing console, API, or CLI. For more information, see Elastic Load Balancing Developer Guide.

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 with placeholder values


resp = client.attach_elastic_load_balancer({
  elastic_load_balancer_name: "String", # required
  layer_id: "String", # required
})

Options Hash (options):

  • :elastic_load_balancer_name (required, String)

    The Elastic Load Balancing instance\'s name.

  • :layer_id (required, String)

    The ID of the layer that the Elastic Load Balancing instance is to be attached to.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#clone_stack(options = {}) ⇒ Types::CloneStackResult

Creates a clone of a specified stack. For more information, see Clone a Stack. By default, all parameters are set to the values used by the parent stack.

Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

Examples:

Request syntax with placeholder values


resp = client.clone_stack({
  source_stack_id: "String", # required
  name: "String",
  region: "String",
  vpc_id: "String",
  attributes: {
    "Color" => "String",
  },
  service_role_arn: "String", # required
  default_instance_profile_arn: "String",
  default_os: "String",
  hostname_theme: "String",
  default_availability_zone: "String",
  default_subnet_id: "String",
  custom_json: "String",
  configuration_manager: {
    name: "String",
    version: "String",
  },
  chef_configuration: {
    manage_berkshelf: false,
    berkshelf_version: "String",
  },
  use_custom_cookbooks: false,
  use_opsworks_security_groups: false,
  custom_cookbooks_source: {
    type: "git", # accepts git, svn, archive, s3
    url: "String",
    username: "String",
    password: "String",
    ssh_key: "String",
    revision: "String",
  },
  default_ssh_key_name: "String",
  clone_permissions: false,
  clone_app_ids: ["String"],
  default_root_device_type: "ebs", # accepts ebs, instance-store
  agent_version: "String",
})

Response structure


resp.stack_id #=> String

Options Hash (options):

  • :source_stack_id (required, String)

    The source stack ID.

  • :name (String)

    The cloned stack name.

  • :region (String)

    The cloned stack AWS region, such as \"ap-northeast-2\". For more information about AWS regions, see Regions and Endpoints.

  • :vpc_id (String)

    The ID of the VPC that the cloned stack is to be launched into. It must be in the specified region. All instances are launched into this VPC, and you cannot change the ID later.

    • If your account supports EC2 Classic, the default value is no VPC.

    • If your account does not support EC2 Classic, the default value is the default VPC for the specified region.

    If the VPC ID corresponds to a default VPC and you have specified either the DefaultAvailabilityZone or the DefaultSubnetId parameter only, AWS OpsWorks Stacks infers the value of the other parameter. If you specify neither parameter, AWS OpsWorks Stacks sets these parameters to the first valid Availability Zone for the specified region and the corresponding default VPC subnet ID, respectively.

    If you specify a nondefault VPC ID, note the following:

    • It must belong to a VPC in your account that is in the specified region.

    • You must specify a value for DefaultSubnetId.

    For more information on how to use AWS OpsWorks Stacks with a VPC, see Running a Stack in a VPC. For more information on default VPC and EC2 Classic, see Supported Platforms.

  • :attributes (Hash<String,String>)

    A list of stack attributes and values as key/value pairs to be added to the cloned stack.

  • :service_role_arn (required, String)

    The stack AWS Identity and Access Management (IAM) role, which allows AWS OpsWorks Stacks to work with AWS resources on your behalf. You must set this parameter to the Amazon Resource Name (ARN) for an existing IAM role. If you create a stack by using the AWS OpsWorks Stacks console, it creates the role for you. You can obtain an existing stack\'s IAM ARN programmatically by calling DescribePermissions. For more information about IAM ARNs, see Using Identifiers.

    You must set this parameter to a valid service role ARN or the action will fail; there is no default value. You can specify the source stack\'s service role ARN, if you prefer, but you must do so explicitly.

  • :default_instance_profile_arn (String)

    The Amazon Resource Name (ARN) of an IAM profile that is the default profile for all of the stack\'s EC2 instances. For more information about IAM ARNs, see Using Identifiers.

  • :default_os (String)

    The stack\'s operating system, which must be set to one of the following.

    • A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03.

    • A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS.

    • CentOS Linux 7

    • Red Hat Enterprise Linux 7

    • Microsoft Windows Server 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft Windows Server 2012 R2 with SQL Server Web.

    • A custom AMI: Custom. You specify the custom AMI you want to use when you create instances. For more information on how to use custom AMIs with OpsWorks, see Using Custom AMIs.

    The default option is the parent stack\'s operating system. For more information on the supported operating systems, see AWS OpsWorks Stacks Operating Systems.

    You can specify a different Linux operating system for the cloned stack, but you cannot change from Linux to Windows or Windows to Linux.

  • :hostname_theme (String)

    The stack\'s host name theme, with spaces are replaced by underscores. The theme is used to generate host names for the stack\'s instances. By default, HostnameTheme is set to Layer_Dependent, which creates host names by appending integers to the layer\'s short name. The other themes are:

    • Baked_Goods

    • Clouds

    • Europe_Cities

    • Fruits

    • Greek_Deities

    • Legendary_creatures_from_Japan

    • Planets_and_Moons

    • Roman_Deities

    • Scottish_Islands

    • US_Cities

    • Wild_Cats

    To obtain a generated host name, call GetHostNameSuggestion, which returns a host name based on the current theme.

  • :default_availability_zone (String)

    The cloned stack\'s default Availability Zone, which must be in the specified region. For more information, see Regions and Endpoints. If you also specify a value for DefaultSubnetId, the subnet must be in the same zone. For more information, see the VpcId parameter description.

  • :default_subnet_id (String)

    The stack\'s default VPC subnet ID. This parameter is required if you specify a value for the VpcId parameter. All instances are launched into this subnet unless you specify otherwise when you create the instance. If you also specify a value for DefaultAvailabilityZone, the subnet must be in that zone. For information on default values and when this parameter is required, see the VpcId parameter description.

  • :custom_json (String)

    A string that contains user-defined, custom JSON. It is used to override the corresponding default stack configuration JSON values. The string should be in the following format:

    "{\"key1\": \"value1\", \"key2\": \"value2\",...}"

    For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes

  • :configuration_manager (Types::StackConfigurationManager)

    The configuration manager. When you clone a stack we recommend that you use the configuration manager to specify the Chef version: 12, 11.10, or 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for Linux stacks is currently 12.

  • :chef_configuration (Types::ChefConfiguration)

    A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version on Chef 11.10 stacks. For more information, see Create a New Stack.

  • :use_custom_cookbooks (Boolean)

    Whether to use custom cookbooks.

  • :use_opsworks_security_groups (Boolean)

    Whether to associate the AWS OpsWorks Stacks built-in security groups with the stack\'s layers.

    AWS OpsWorks Stacks provides a standard set of built-in security groups, one for each layer, which are associated with layers by default. With UseOpsworksSecurityGroups you can instead provide your own custom security groups. UseOpsworksSecurityGroups has the following settings:

    • True - AWS OpsWorks Stacks automatically associates the appropriate built-in security group with each layer (default setting). You can associate additional security groups with a layer after you create it but you cannot delete the built-in security group.

    • False - AWS OpsWorks Stacks does not associate built-in security groups with layers. You must create appropriate Amazon Elastic Compute Cloud (Amazon EC2) security groups and associate a security group with each layer that you create. However, you can still manually associate a built-in security group with a layer on creation; custom security groups are required only for those layers that need custom settings.

    For more information, see Create a New Stack.

  • :custom_cookbooks_source (Types::Source)

    Contains the information required to retrieve an app or cookbook from a repository. For more information, see Creating Apps or Custom Recipes and Cookbooks.

  • :default_ssh_key_name (String)

    A default Amazon EC2 key pair name. The default value is none. If you specify a key pair name, AWS OpsWorks installs the public key on the instance and you can use the private key with an SSH client to log in to the instance. For more information, see Using SSH to Communicate with an Instance and Managing SSH Access. You can override this setting by specifying a different key pair, or no key pair, when you create an instance.

  • :clone_permissions (Boolean)

    Whether to clone the source stack\'s permissions.

  • :clone_app_ids (Array<String>)

    A list of source stack app IDs to be included in the cloned stack.

  • :default_root_device_type (String)

    The default root device type. This value is used by default for all instances in the cloned stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.

  • :agent_version (String)

    The default AWS OpsWorks Stacks agent version. You have the following options:

    • Auto-update - Set this parameter to LATEST. AWS OpsWorks Stacks automatically installs new agent versions on the stack\'s instances as soon as they are available.

    • Fixed version - Set this parameter to your preferred agent version. To update the agent version, you must edit the stack configuration and specify a new version. AWS OpsWorks Stacks then automatically installs that version on the stack\'s instances.

    The default setting is LATEST. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2.

    You can also specify an agent version when you create or update an instance, which overrides the stack\'s default setting.

Returns:

See Also:

#create_app(options = {}) ⇒ Types::CreateAppResult

Creates an app for a specified stack. For more information, see Creating Apps.

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 with placeholder values


resp = client.create_app({
  stack_id: "String", # required
  shortname: "String",
  name: "String", # required
  description: "String",
  data_sources: [
    {
      type: "String",
      arn: "String",
      database_name: "String",
    },
  ],
  type: "aws-flow-ruby", # required, accepts aws-flow-ruby, java, rails, php, nodejs, static, other
  app_source: {
    type: "git", # accepts git, svn, archive, s3
    url: "String",
    username: "String",
    password: "String",
    ssh_key: "String",
    revision: "String",
  },
  domains: ["String"],
  enable_ssl: false,
  ssl_configuration: {
    certificate: "String", # required
    private_key: "String", # required
    chain: "String",
  },
  attributes: {
    "DocumentRoot" => "String",
  },
  environment: [
    {
      key: "String", # required
      value: "String", # required
      secure: false,
    },
  ],
})

Response structure


resp.app_id #=> String

Options Hash (options):

  • :stack_id (required, String)

    The stack ID.

  • :shortname (String)

    The app\'s short name.

  • :name (required, String)

    The app name.

  • :description (String)

    A description of the app.

  • :data_sources (Array<Types::DataSource>)

    The app\'s data source.

  • :type (required, String)

    The app type. Each supported type is associated with a particular layer. For example, PHP applications are associated with a PHP layer. AWS OpsWorks Stacks deploys an application to those instances that are members of the corresponding layer. If your app isn\'t one of the standard types, or you prefer to implement your own Deploy recipes, specify other.

  • :app_source (Types::Source)

    A Source object that specifies the app repository.

  • :domains (Array<String>)

    The app virtual host settings, with multiple domains separated by commas. For example: 'www.example.com, example.com'

  • :enable_ssl (Boolean)

    Whether to enable SSL for the app.

  • :ssl_configuration (Types::SslConfiguration)

    An SslConfiguration object with the SSL configuration.

  • :attributes (Hash<String,String>)

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

  • :environment (Array<Types::EnvironmentVariable>)

    An array of EnvironmentVariable objects that specify environment variables to be associated with the app. After you deploy the app, these variables are defined on the associated app server instance. For more information, see Environment Variables.

    There is no specific limit on the number of environment variables. However, the size of the associated data structure - which includes the variables\' names, values, and protected flag values - cannot exceed 10 KB (10240 Bytes). This limit should accommodate most if not all use cases. Exceeding it will cause an exception with the message, \"Environment: is too large (maximum is 10KB).\"

    This parameter is supported only by Chef 11.10 stacks. If you have specified one or more environment variables, you cannot modify the stack\'s Chef version.

Returns:

See Also:

#create_deployment(options = {}) ⇒ Types::CreateDeploymentResult

Runs deployment or stack commands. For more information, see Deploying Apps and Run Stack Commands.

Required Permissions: To use this action, an IAM user must have a Deploy or 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 with placeholder values


resp = client.create_deployment({
  stack_id: "String", # required
  app_id: "String",
  instance_ids: ["String"],
  layer_ids: ["String"],
  command: { # required
    name: "install_dependencies", # required, accepts install_dependencies, update_dependencies, update_custom_cookbooks, execute_recipes, configure, setup, deploy, rollback, start, stop, restart, undeploy
    args: {
      "String" => ["String"],
    },
  },
  comment: "String",
  custom_json: "String",
})

Response structure


resp.deployment_id #=> String

Options Hash (options):

  • :stack_id (required, String)

    The stack ID.

  • :app_id (String)

    The app ID. This parameter is required for app deployments, but not for other deployment commands.

  • :instance_ids (Array<String>)

    The instance IDs for the deployment targets.

  • :layer_ids (Array<String>)

    The layer IDs for the deployment targets.

  • :command (required, Types::DeploymentCommand)

    A DeploymentCommand object that specifies the deployment command and any associated arguments.

  • :comment (String)

    A user-defined comment.

  • :custom_json (String)

    A string that contains user-defined, custom JSON. It is used to override the corresponding default stack configuration JSON values. The string should be in the following format:

    "{\"key1\": \"value1\", \"key2\": \"value2\",...}"

    For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes.

Returns:

See Also:

#create_instance(options = {}) ⇒ Types::CreateInstanceResult

Creates an instance in a specified stack. For more information, see Adding an Instance to 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 with placeholder values


resp = client.create_instance({
  stack_id: "String", # required
  layer_ids: ["String"], # required
  instance_type: "String", # required
  auto_scaling_type: "load", # accepts load, timer
  hostname: "String",
  os: "String",
  ami_id: "String",
  ssh_key_name: "String",
  availability_zone: "String",
  virtualization_type: "String",
  subnet_id: "String",
  architecture: "x86_64", # accepts x86_64, i386
  root_device_type: "ebs", # accepts ebs, instance-store
  block_device_mappings: [
    {
      device_name: "String",
      no_device: "String",
      virtual_name: "String",
      ebs: {
        snapshot_id: "String",
        iops: 1,
        volume_size: 1,
        volume_type: "gp2", # accepts gp2, io1, standard
        delete_on_termination: false,
      },
    },
  ],
  install_updates_on_boot: false,
  ebs_optimized: false,
  agent_version: "String",
  tenancy: "String",
})

Response structure


resp.instance_id #=> String

Options Hash (options):

  • :stack_id (required, String)

    The stack ID.

  • :layer_ids (required, Array<String>)

    An array that contains the instance\'s layer IDs.

  • :instance_type (required, String)

    The instance type, such as t2.micro. For a list of supported instance types, open the stack in the console, choose Instances, and choose + Instance. The Size list contains the currently supported types. For more information, see Instance Families and Types. The parameter values that you use to specify the various types are in the API Name column of the Available Instance Types table.

  • :auto_scaling_type (String)

    For load-based or time-based instances, the type. Windows stacks can use only time-based instances.

  • :hostname (String)

    The instance host name.

  • :os (String)

    The instance\'s operating system, which must be set to one of the following.

    • A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03.

    • A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS.

    • CentOS Linux 7

    • Red Hat Enterprise Linux 7

    • A supported Windows operating system, such as Microsoft Windows Server 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft Windows Server 2012 R2 with SQL Server Web.

    • A custom AMI: Custom.

    For more information on the supported operating systems, see AWS OpsWorks Stacks Operating Systems.

    The default option is the current Amazon Linux version. If you set this parameter to Custom, you must use the CreateInstance action\'s AmiId parameter to specify the custom AMI that you want to use. Block device mappings are not supported if the value is Custom. For more information on the supported operating systems, see Operating SystemsFor more information on how to use custom AMIs with AWS OpsWorks Stacks, see Using Custom AMIs.

  • :ami_id (String)

    A custom AMI ID to be used to create the instance. The AMI should be based on one of the supported operating systems. For more information, see Using Custom AMIs.

    If you specify a custom AMI, you must set Os to Custom.

  • :ssh_key_name (String)

    The instance\'s Amazon EC2 key-pair name.

  • :availability_zone (String)

    The instance Availability Zone. For more information, see Regions and Endpoints.

  • :virtualization_type (String)

    The instance\'s virtualization type, paravirtual or hvm.

  • :subnet_id (String)

    The ID of the instance\'s subnet. If the stack is running in a VPC, you can use this parameter to override the stack\'s default subnet ID value and direct AWS OpsWorks Stacks to launch the instance in a different subnet.

  • :architecture (String)

    The instance architecture. The default option is x86_64. Instance types do not necessarily support both architectures. For a list of the architectures that are supported by the different instance types, see Instance Families and Types.

  • :root_device_type (String)

    The instance root device type. For more information, see Storage for the Root Device.

  • :block_device_mappings (Array<Types::BlockDeviceMapping>)

    An array of BlockDeviceMapping objects that specify the instance\'s block devices. For more information, see Block Device Mapping. Note that block device mappings are not supported for custom AMIs.

  • :install_updates_on_boot (Boolean)

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

  • :ebs_optimized (Boolean)

    Whether to create an Amazon EBS-optimized instance.

  • :agent_version (String)

    The default AWS OpsWorks Stacks agent version. You have the following options:

    • INHERIT - Use the stack\'s default agent version setting.

    • version_number - Use the specified agent version. This value overrides the stack\'s default setting. To update the agent version, edit the instance configuration and specify a new version. AWS OpsWorks Stacks then automatically installs that version on the instance.

    The default setting is INHERIT. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2.

  • :tenancy (String)

    The instance\'s tenancy option. The default option is no tenancy, or if the instance is running in a VPC, inherit tenancy settings from the VPC. The following are valid values for this parameter: dedicated, default, or host. Because there are costs associated with changes in tenancy options, we recommend that you research tenancy options before choosing them for your instances. For more information about dedicated hosts, see Dedicated Hosts Overview and Amazon EC2 Dedicated Hosts. For more information about dedicated instances, see Dedicated Instances and Amazon EC2 Dedicated Instances.

Returns:

See Also:

#create_layer(options = {}) ⇒ Types::CreateLayerResult

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

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.

Examples:

Request syntax with placeholder values


resp = client.create_layer({
  stack_id: "String", # required
  type: "aws-flow-ruby", # required, accepts aws-flow-ruby, ecs-cluster, java-app, lb, web, php-app, rails-app, nodejs-app, memcached, db-master, monitoring-master, custom
  name: "String", # required
  shortname: "String", # required
  attributes: {
    "EcsClusterArn" => "String",
  },
  cloud_watch_logs_configuration: {
    enabled: false,
    log_streams: [
      {
        log_group_name: "String",
        datetime_format: "String",
        time_zone: "LOCAL", # accepts LOCAL, UTC
        file: "String",
        file_fingerprint_lines: "String",
        multi_line_start_pattern: "String",
        initial_position: "start_of_file", # accepts start_of_file, end_of_file
        encoding: "ascii", # accepts ascii, big5, big5hkscs, cp037, cp424, cp437, cp500, cp720, cp737, cp775, cp850, cp852, cp855, cp856, cp857, cp858, cp860, cp861, cp862, cp863, cp864, cp865, cp866, cp869, cp874, cp875, cp932, cp949, cp950, cp1006, cp1026, cp1140, cp1250, cp1251, cp1252, cp1253, cp1254, cp1255, cp1256, cp1257, cp1258, euc_jp, euc_jis_2004, euc_jisx0213, euc_kr, gb2312, gbk, gb18030, hz, iso2022_jp, iso2022_jp_1, iso2022_jp_2, iso2022_jp_2004, iso2022_jp_3, iso2022_jp_ext, iso2022_kr, latin_1, iso8859_2, iso8859_3, iso8859_4, iso8859_5, iso8859_6, iso8859_7, iso8859_8, iso8859_9, iso8859_10, iso8859_13, iso8859_14, iso8859_15, iso8859_16, johab, koi8_r, koi8_u, mac_cyrillic, mac_greek, mac_iceland, mac_latin2, mac_roman, mac_turkish, ptcp154, shift_jis, shift_jis_2004, shift_jisx0213, utf_32, utf_32_be, utf_32_le, utf_16, utf_16_be, utf_16_le, utf_7, utf_8, utf_8_sig
        buffer_duration: 1,
        batch_count: 1,
        batch_size: 1,
      },
    ],
  },
  custom_instance_profile_arn: "String",
  custom_json: "String",
  custom_security_group_ids: ["String"],
  packages: ["String"],
  volume_configurations: [
    {
      mount_point: "String", # required
      raid_level: 1,
      number_of_disks: 1, # required
      size: 1, # required
      volume_type: "String",
      iops: 1,
    },
  ],
  enable_auto_healing: false,
  auto_assign_elastic_ips: false,
  auto_assign_public_ips: false,
  custom_recipes: {
    setup: ["String"],
    configure: ["String"],
    deploy: ["String"],
    undeploy: ["String"],
    shutdown: ["String"],
  },
  install_updates_on_boot: false,
  use_ebs_optimized_instances: false,
  lifecycle_event_configuration: {
    shutdown: {
      execution_timeout: 1,
      delay_until_elb_connections_drained: false,
    },
  },
})

Response structure


resp.layer_id #=> String

Options Hash (options):

  • :stack_id (required, String)

    The layer stack ID.

  • :type (required, String)

    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. Built-in layers are not available in Chef 12 stacks.

  • :name (required, String)

    The layer name, which is used by the console.

  • :shortname (required, String)

    For custom layers only, use this parameter to specify the layer\'s short name, which is used internally by AWS OpsWorks Stacks 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 Stacks. For more information, see the Layer Reference.

  • :attributes (Hash<String,String>)

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

    To create a cluster layer, set the EcsClusterArn attribute to the cluster\'s ARN.

  • :cloud_watch_logs_configuration (Types::CloudWatchLogsConfiguration)

    Specifies CloudWatch Logs configuration options for the layer. For more information, see CloudWatchLogsLogStream.

  • :custom_instance_profile_arn (String)

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

  • :custom_json (String)

    A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer\'s instances. For more information, see Using Custom JSON. This feature is supported as of version 1.7.42 of the AWS CLI.

  • :custom_security_group_ids (Array<String>)

    An array containing the layer custom security group IDs.

  • :packages (Array<String>)

    An array of Package objects that describes the layer packages.

  • :volume_configurations (Array<Types::VolumeConfiguration>)

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

  • :enable_auto_healing (Boolean)

    Whether to disable auto healing for the layer.

  • :auto_assign_elastic_ips (Boolean)

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

  • :auto_assign_public_ips (Boolean)

    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.

  • :custom_recipes (Types::Recipes)

    A LayerCustomRecipes object that specifies the layer custom recipes.

  • :install_updates_on_boot (Boolean)

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

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

  • :use_ebs_optimized_instances (Boolean)

    Whether to use Amazon EBS-optimized instances.

  • :lifecycle_event_configuration (Types::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:

See Also:

#create_stack(options = {}) ⇒ Types::CreateStackResult

Creates a new stack. For more information, see Create a New Stack.

Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

Examples:

Request syntax with placeholder values


resp = client.create_stack({
  name: "String", # required
  region: "String", # required
  vpc_id: "String",
  attributes: {
    "Color" => "String",
  },
  service_role_arn: "String", # required
  default_instance_profile_arn: "String", # required
  default_os: "String",
  hostname_theme: "String",
  default_availability_zone: "String",
  default_subnet_id: "String",
  custom_json: "String",
  configuration_manager: {
    name: "String",
    version: "String",
  },
  chef_configuration: {
    manage_berkshelf: false,
    berkshelf_version: "String",
  },
  use_custom_cookbooks: false,
  use_opsworks_security_groups: false,
  custom_cookbooks_source: {
    type: "git", # accepts git, svn, archive, s3
    url: "String",
    username: "String",
    password: "String",
    ssh_key: "String",
    revision: "String",
  },
  default_ssh_key_name: "String",
  default_root_device_type: "ebs", # accepts ebs, instance-store
  agent_version: "String",
})

Response structure


resp.stack_id #=> String

Options Hash (options):

  • :name (required, String)

    The stack name.

  • :region (required, String)

    The stack\'s AWS region, such as \"ap-south-1\". For more information about Amazon regions, see Regions and Endpoints.

  • :vpc_id (String)

    The ID of the VPC that the stack is to be launched into. The VPC must be in the stack\'s region. All instances are launched into this VPC. You cannot change the ID later.

    • If your account supports EC2-Classic, the default value is no VPC.

    • If your account does not support EC2-Classic, the default value is the default VPC for the specified region.

    If the VPC ID corresponds to a default VPC and you have specified either the DefaultAvailabilityZone or the DefaultSubnetId parameter only, AWS OpsWorks Stacks infers the value of the other parameter. If you specify neither parameter, AWS OpsWorks Stacks sets these parameters to the first valid Availability Zone for the specified region and the corresponding default VPC subnet ID, respectively.

    If you specify a nondefault VPC ID, note the following:

    • It must belong to a VPC in your account that is in the specified region.

    • You must specify a value for DefaultSubnetId.

    For more information on how to use AWS OpsWorks Stacks with a VPC, see Running a Stack in a VPC. For more information on default VPC and EC2-Classic, see Supported Platforms.

  • :attributes (Hash<String,String>)

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

  • :service_role_arn (required, String)

    The stack\'s AWS Identity and Access Management (IAM) role, which allows AWS OpsWorks Stacks to work with AWS resources on your behalf. You must set this parameter to the Amazon Resource Name (ARN) for an existing IAM role. For more information about IAM ARNs, see Using Identifiers.

  • :default_instance_profile_arn (required, String)

    The Amazon Resource Name (ARN) of an IAM profile that is the default profile for all of the stack\'s EC2 instances. For more information about IAM ARNs, see Using Identifiers.

  • :default_os (String)

    The stack\'s default operating system, which is installed on every instance unless you specify a different operating system when you create the instance. You can specify one of the following.

    • A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03.

    • A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS.

    • CentOS Linux 7

    • Red Hat Enterprise Linux 7

    • A supported Windows operating system, such as Microsoft Windows Server 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft Windows Server 2012 R2 with SQL Server Web.

    • A custom AMI: Custom. You specify the custom AMI you want to use when you create instances. For more information, see Using Custom AMIs.

    The default option is the current Amazon Linux version. For more information on the supported operating systems, see AWS OpsWorks Stacks Operating Systems.

  • :hostname_theme (String)

    The stack\'s host name theme, with spaces replaced by underscores. The theme is used to generate host names for the stack\'s instances. By default, HostnameTheme is set to Layer_Dependent, which creates host names by appending integers to the layer\'s short name. The other themes are:

    • Baked_Goods

    • Clouds

    • Europe_Cities

    • Fruits

    • Greek_Deities

    • Legendary_creatures_from_Japan

    • Planets_and_Moons

    • Roman_Deities

    • Scottish_Islands

    • US_Cities

    • Wild_Cats

    To obtain a generated host name, call GetHostNameSuggestion, which returns a host name based on the current theme.

  • :default_availability_zone (String)

    The stack\'s default Availability Zone, which must be in the specified region. For more information, see Regions and Endpoints. If you also specify a value for DefaultSubnetId, the subnet must be in the same zone. For more information, see the VpcId parameter description.

  • :default_subnet_id (String)

    The stack\'s default VPC subnet ID. This parameter is required if you specify a value for the VpcId parameter. All instances are launched into this subnet unless you specify otherwise when you create the instance. If you also specify a value for DefaultAvailabilityZone, the subnet must be in that zone. For information on default values and when this parameter is required, see the VpcId parameter description.

  • :custom_json (String)

    A string that contains user-defined, custom JSON. It can be used to override the corresponding default stack configuration attribute values or to pass data to recipes. The string should be in the following format:

    "{\"key1\": \"value1\", \"key2\": \"value2\",...}"

    For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes.

  • :configuration_manager (Types::StackConfigurationManager)

    The configuration manager. When you create a stack we recommend that you use the configuration manager to specify the Chef version: 12, 11.10, or 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for Linux stacks is currently 11.4.

  • :chef_configuration (Types::ChefConfiguration)

    A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version on Chef 11.10 stacks. For more information, see Create a New Stack.

  • :use_custom_cookbooks (Boolean)

    Whether the stack uses custom cookbooks.

  • :use_opsworks_security_groups (Boolean)

    Whether to associate the AWS OpsWorks Stacks built-in security groups with the stack\'s layers.

    AWS OpsWorks Stacks provides a standard set of built-in security groups, one for each layer, which are associated with layers by default. With UseOpsworksSecurityGroups you can instead provide your own custom security groups. UseOpsworksSecurityGroups has the following settings:

    • True - AWS OpsWorks Stacks automatically associates the appropriate built-in security group with each layer (default setting). You can associate additional security groups with a layer after you create it, but you cannot delete the built-in security group.

    • False - AWS OpsWorks Stacks does not associate built-in security groups with layers. You must create appropriate EC2 security groups and associate a security group with each layer that you create. However, you can still manually associate a built-in security group with a layer on creation; custom security groups are required only for those layers that need custom settings.

    For more information, see Create a New Stack.

  • :custom_cookbooks_source (Types::Source)

    Contains the information required to retrieve an app or cookbook from a repository. For more information, see Creating Apps or Custom Recipes and Cookbooks.

  • :default_ssh_key_name (String)

    A default Amazon EC2 key pair name. The default value is none. If you specify a key pair name, AWS OpsWorks installs the public key on the instance and you can use the private key with an SSH client to log in to the instance. For more information, see Using SSH to Communicate with an Instance and Managing SSH Access. You can override this setting by specifying a different key pair, or no key pair, when you create an instance.

  • :default_root_device_type (String)

    The default root device type. This value is the default for all instances in the stack, but you can override it when you create an instance. The default option is instance-store. For more information, see Storage for the Root Device.

  • :agent_version (String)

    The default AWS OpsWorks Stacks agent version. You have the following options:

    • Auto-update - Set this parameter to LATEST. AWS OpsWorks Stacks automatically installs new agent versions on the stack\'s instances as soon as they are available.

    • Fixed version - Set this parameter to your preferred agent version. To update the agent version, you must edit the stack configuration and specify a new version. AWS OpsWorks Stacks then automatically installs that version on the stack\'s instances.

    The default setting is the most recent release of the agent. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2.

    You can also specify an agent version when you create or update an instance, which overrides the stack\'s default setting.

Returns:

See Also:

#create_user_profile(options = {}) ⇒ Types::CreateUserProfileResult

Creates a new user profile.

Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

Examples:

Request syntax with placeholder values


resp = client.({
  iam_user_arn: "String", # required
  ssh_username: "String",
  ssh_public_key: "String",
  allow_self_management: false,
})

Response structure


resp.iam_user_arn #=> String

Options Hash (options):

  • :iam_user_arn (required, String)

    The user\'s IAM ARN; this can also be a federated user\'s ARN.

  • :ssh_username (String)

    The user\'s SSH user name. The allowable characters are [a-z], [A-Z], [0-9], \'-\', and \'_\'. If the specified name includes other punctuation marks, AWS OpsWorks Stacks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, AWS OpsWorks Stacks generates one from the IAM user name.

  • :ssh_public_key (String)

    The user\'s public SSH key.

  • :allow_self_management (Boolean)

    Whether users can specify their own SSH public key through the My Settings page. For more information, see Setting an IAM User\'s Public SSH Key.

Returns:

See Also:

#delete_app(options = {}) ⇒ Struct

Deletes a specified app.

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 with placeholder values


resp = client.delete_app({
  app_id: "String", # required
})

Options Hash (options):

  • :app_id (required, String)

    The app ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_instance(options = {}) ⇒ Struct

Deletes a specified instance, which terminates the associated Amazon EC2 instance. You must stop an instance before you can delete it.

For more information, see Deleting Instances.

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 with placeholder values


resp = client.delete_instance({
  instance_id: "String", # required
  delete_elastic_ip: false,
  delete_volumes: false,
})

Options Hash (options):

  • :instance_id (required, String)

    The instance ID.

  • :delete_elastic_ip (Boolean)

    Whether to delete the instance Elastic IP address.

  • :delete_volumes (Boolean)

    Whether to delete the instance\'s Amazon EBS volumes.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_layer(options = {}) ⇒ Struct

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 with placeholder values


resp = client.delete_layer({
  layer_id: "String", # required
})

Options Hash (options):

  • :layer_id (required, String)

    The layer ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_stack(options = {}) ⇒ Struct

Deletes a specified stack. You must first delete all instances, layers, and apps or deregister registered instances. For more information, see Shut Down a Stack.

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 with placeholder values


resp = client.delete_stack({
  stack_id: "String", # required
})

Options Hash (options):

  • :stack_id (required, String)

    The stack ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_user_profile(options = {}) ⇒ Struct

Deletes a user profile.

Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

Examples:

Request syntax with placeholder values


resp = client.({
  iam_user_arn: "String", # required
})

Options Hash (options):

  • :iam_user_arn (required, String)

    The user\'s IAM ARN. This can also be a federated user\'s ARN.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#deregister_ecs_cluster(options = {}) ⇒ Struct

Deregisters a specified Amazon ECS cluster from a stack. For more information, see Resource Management.

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 http://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html.

Examples:

Request syntax with placeholder values


resp = client.deregister_ecs_cluster({
  ecs_cluster_arn: "String", # required
})

Options Hash (options):

  • :ecs_cluster_arn (required, String)

    The cluster\'s ARN.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#deregister_elastic_ip(options = {}) ⇒ Struct

Deregisters a specified Elastic IP address. The address can then be registered by another stack. For more information, see Resource Management.

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 with placeholder values


resp = client.deregister_elastic_ip({
  elastic_ip: "String", # required
})

Options Hash (options):

  • :elastic_ip (required, String)

    The Elastic IP address.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#deregister_instance(options = {}) ⇒ Struct

Deregister a registered Amazon EC2 or on-premises instance. This action removes the instance from the stack and returns it to your control. This action can not be used with instances that were created with AWS OpsWorks Stacks.

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 with placeholder values


resp = client.deregister_instance({
  instance_id: "String", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The instance ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#deregister_rds_db_instance(options = {}) ⇒ Struct

Deregisters an Amazon RDS instance.

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 with placeholder values


resp = client.deregister_rds_db_instance({
  rds_db_instance_arn: "String", # required
})

Options Hash (options):

  • :rds_db_instance_arn (required, String)

    The Amazon RDS instance\'s ARN.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#deregister_volume(options = {}) ⇒ Struct

Deregisters an Amazon EBS volume. The volume can then be registered by another stack. For more information, see Resource Management.

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 with placeholder values


resp = client.deregister_volume({
  volume_id: "String", # required
})

Options Hash (options):

  • :volume_id (required, String)

    The AWS OpsWorks Stacks volume ID, which is the GUID that AWS OpsWorks Stacks assigned to the instance when you registered the volume with the stack, not the Amazon EC2 volume ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#describe_agent_versions(options = {}) ⇒ Types::DescribeAgentVersionsResult

Describes the available AWS OpsWorks Stacks agent versions. You must specify a stack ID or a configuration manager. DescribeAgentVersions returns a list of available agent versions for the specified stack or configuration manager.

Examples:

Request syntax with placeholder values


resp = client.describe_agent_versions({
  stack_id: "String",
  configuration_manager: {
    name: "String",
    version: "String",
  },
})

Response structure


resp.agent_versions #=> Array
resp.agent_versions[0].version #=> String
resp.agent_versions[0].configuration_manager.name #=> String
resp.agent_versions[0].configuration_manager.version #=> String

Options Hash (options):

Returns:

See Also:

#describe_apps(options = {}) ⇒ Types::DescribeAppsResult

Requests a description of a specified set of apps.

This call accepts only one resource-identifying parameter.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or 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 with placeholder values


resp = client.describe_apps({
  stack_id: "String",
  app_ids: ["String"],
})

Response structure


resp.apps #=> Array
resp.apps[0].app_id #=> String
resp.apps[0].stack_id #=> String
resp.apps[0].shortname #=> String
resp.apps[0].name #=> String
resp.apps[0].description #=> String
resp.apps[0].data_sources #=> Array
resp.apps[0].data_sources[0].type #=> String
resp.apps[0].data_sources[0].arn #=> String
resp.apps[0].data_sources[0].database_name #=> String
resp.apps[0].type #=> String, one of "aws-flow-ruby", "java", "rails", "php", "nodejs", "static", "other"
resp.apps[0].app_source.type #=> String, one of "git", "svn", "archive", "s3"
resp.apps[0].app_source.url #=> String
resp.apps[0].app_source.username #=> String
resp.apps[0].app_source.password #=> String
resp.apps[0].app_source.ssh_key #=> String
resp.apps[0].app_source.revision #=> String
resp.apps[0].domains #=> Array
resp.apps[0].domains[0] #=> String
resp.apps[0].enable_ssl #=> true/false
resp.apps[0].ssl_configuration.certificate #=> String
resp.apps[0].ssl_configuration.private_key #=> String
resp.apps[0].ssl_configuration.chain #=> String
resp.apps[0].attributes #=> Hash
resp.apps[0].attributes["AppAttributesKeys"] #=> String
resp.apps[0].created_at #=> String
resp.apps[0].environment #=> Array
resp.apps[0].environment[0].key #=> String
resp.apps[0].environment[0].value #=> String
resp.apps[0].environment[0].secure #=> true/false

Options Hash (options):

  • :stack_id (String)

    The app stack ID. If you use this parameter, DescribeApps returns a description of the apps in the specified stack.

  • :app_ids (Array<String>)

    An array of app IDs for the apps to be described. If you use this parameter, DescribeApps returns a description of the specified apps. Otherwise, it returns a description of every app.

Returns:

See Also:

#describe_commands(options = {}) ⇒ Types::DescribeCommandsResult

Describes the results of specified commands.

This call accepts only one resource-identifying parameter.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or 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 with placeholder values


resp = client.describe_commands({
  deployment_id: "String",
  instance_id: "String",
  command_ids: ["String"],
})

Response structure


resp.commands #=> Array
resp.commands[0].command_id #=> String
resp.commands[0].instance_id #=> String
resp.commands[0].deployment_id #=> String
resp.commands[0].created_at #=> String
resp.commands[0].acknowledged_at #=> String
resp.commands[0].completed_at #=> String
resp.commands[0].status #=> String
resp.commands[0].exit_code #=> Integer
resp.commands[0].log_url #=> String
resp.commands[0].type #=> String

Options Hash (options):

  • :deployment_id (String)

    The deployment ID. If you include this parameter, DescribeCommands returns a description of the commands associated with the specified deployment.

  • :instance_id (String)

    The instance ID. If you include this parameter, DescribeCommands returns a description of the commands associated with the specified instance.

  • :command_ids (Array<String>)

    An array of command IDs. If you include this parameter, DescribeCommands returns a description of the specified commands. Otherwise, it returns a description of every command.

Returns:

See Also:

#describe_deployments(options = {}) ⇒ Types::DescribeDeploymentsResult

Requests a description of a specified set of deployments.

This call accepts only one resource-identifying parameter.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or 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 with placeholder values


resp = client.describe_deployments({
  stack_id: "String",
  app_id: "String",
  deployment_ids: ["String"],
})

Response structure


resp.deployments #=> Array
resp.deployments[0].deployment_id #=> String
resp.deployments[0].stack_id #=> String
resp.deployments[0].app_id #=> String
resp.deployments[0].created_at #=> String
resp.deployments[0].completed_at #=> String
resp.deployments[0].duration #=> Integer
resp.deployments[0].iam_user_arn #=> String
resp.deployments[0].comment #=> String
resp.deployments[0].command.name #=> String, one of "install_dependencies", "update_dependencies", "update_custom_cookbooks", "execute_recipes", "configure", "setup", "deploy", "rollback", "start", "stop", "restart", "undeploy"
resp.deployments[0].command.args #=> Hash
resp.deployments[0].command.args["String"] #=> Array
resp.deployments[0].command.args["String"][0] #=> String
resp.deployments[0].status #=> String
resp.deployments[0].custom_json #=> String
resp.deployments[0].instance_ids #=> Array
resp.deployments[0].instance_ids[0] #=> String

Options Hash (options):

  • :stack_id (String)

    The stack ID. If you include this parameter, DescribeDeployments returns a description of the commands associated with the specified stack.

  • :app_id (String)

    The app ID. If you include this parameter, DescribeDeployments returns a description of the commands associated with the specified app.

  • :deployment_ids (Array<String>)

    An array of deployment IDs to be described. If you include this parameter, DescribeDeployments returns a description of the specified deployments. Otherwise, it returns a description of every deployment.

Returns:

See Also:

#describe_ecs_clusters(options = {}) ⇒ Types::DescribeEcsClustersResult

Describes Amazon ECS clusters that are registered with a stack. If you specify only a stack ID, you can use the MaxResults and NextToken parameters to paginate the response. However, AWS OpsWorks Stacks currently supports only one cluster per layer, so the result set has a maximum of one element.

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

This call accepts only one resource-identifying parameter.

Examples:

Request syntax with placeholder values


resp = client.describe_ecs_clusters({
  ecs_cluster_arns: ["String"],
  stack_id: "String",
  next_token: "String",
  max_results: 1,
})

Response structure


resp.ecs_clusters #=> Array
resp.ecs_clusters[0].ecs_cluster_arn #=> String
resp.ecs_clusters[0].ecs_cluster_name #=> String
resp.ecs_clusters[0].stack_id #=> String
resp.ecs_clusters[0].registered_at #=> String
resp.next_token #=> String

Options Hash (options):

  • :ecs_cluster_arns (Array<String>)

    A list of ARNs, one for each cluster to be described.

  • :stack_id (String)

    A stack ID. DescribeEcsClusters returns a description of the cluster that is registered with the stack.

  • :next_token (String)

    If the previous paginated request did not return all of the remaining results, the response object\'sNextToken parameter value is set to a token. To retrieve the next set of results, call DescribeEcsClusters again and assign that token to the request object\'s NextToken parameter. If there are no remaining results, the previous response object\'s NextToken parameter is set to null.

  • :max_results (Integer)

    To receive a paginated response, use this parameter to specify the maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results.

Returns:

See Also:

#describe_elastic_ips(options = {}) ⇒ Types::DescribeElasticIpsResult

Describes Elastic IP addresses.

This call accepts only one resource-identifying parameter.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or 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 with placeholder values


resp = client.describe_elastic_ips({
  instance_id: "String",
  stack_id: "String",
  ips: ["String"],
})

Response structure


resp.elastic_ips #=> Array
resp.elastic_ips[0].ip #=> String
resp.elastic_ips[0].name #=> String
resp.elastic_ips[0].domain #=> String
resp.elastic_ips[0].region #=> String
resp.elastic_ips[0].instance_id #=> String

Options Hash (options):

  • :instance_id (String)

    The instance ID. If you include this parameter, DescribeElasticIps returns a description of the Elastic IP addresses associated with the specified instance.

  • :stack_id (String)

    A stack ID. If you include this parameter, DescribeElasticIps returns a description of the Elastic IP addresses that are registered with the specified stack.

  • :ips (Array<String>)

    An array of Elastic IP addresses to be described. If you include this parameter, DescribeElasticIps returns a description of the specified Elastic IP addresses. Otherwise, it returns a description of every Elastic IP address.

Returns:

See Also:

#describe_elastic_load_balancers(options = {}) ⇒ Types::DescribeElasticLoadBalancersResult

Describes a stack's Elastic Load Balancing instances.

This call accepts only one resource-identifying parameter.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or 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 with placeholder values


resp = client.describe_elastic_load_balancers({
  stack_id: "String",
  layer_ids: ["String"],
})

Response structure


resp.elastic_load_balancers #=> Array
resp.elastic_load_balancers[0].elastic_load_balancer_name #=> String
resp.elastic_load_balancers[0].region #=> String
resp.elastic_load_balancers[0].dns_name #=> String
resp.elastic_load_balancers[0].stack_id #=> String
resp.elastic_load_balancers[0].layer_id #=> String
resp.elastic_load_balancers[0].vpc_id #=> String
resp.elastic_load_balancers[0].availability_zones #=> Array
resp.elastic_load_balancers[0].availability_zones[0] #=> String
resp.elastic_load_balancers[0].subnet_ids #=> Array
resp.elastic_load_balancers[0].subnet_ids[0] #=> String
resp.elastic_load_balancers[0].ec2_instance_ids #=> Array
resp.elastic_load_balancers[0].ec2_instance_ids[0] #=> String

Options Hash (options):

  • :stack_id (String)

    A stack ID. The action describes the stack\'s Elastic Load Balancing instances.

  • :layer_ids (Array<String>)

    A list of layer IDs. The action describes the Elastic Load Balancing instances for the specified layers.

Returns:

See Also:

#describe_instances(options = {}) ⇒ Types::DescribeInstancesResult

Requests a description of a set of instances.

This call accepts only one resource-identifying parameter.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or 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 with placeholder values


resp = client.describe_instances({
  stack_id: "String",
  layer_id: "String",
  instance_ids: ["String"],
})

Response structure


resp.instances #=> Array
resp.instances[0].agent_version #=> String
resp.instances[0].ami_id #=> String
resp.instances[0].architecture #=> String, one of "x86_64", "i386"
resp.instances[0].arn #=> String
resp.instances[0].auto_scaling_type #=> String, one of "load", "timer"
resp.instances[0].availability_zone #=> String
resp.instances[0].block_device_mappings #=> Array
resp.instances[0].block_device_mappings[0].device_name #=> String
resp.instances[0].block_device_mappings[0].no_device #=> String
resp.instances[0].block_device_mappings[0].virtual_name #=> String
resp.instances[0].block_device_mappings[0].ebs.snapshot_id #=> String
resp.instances[0].block_device_mappings[0].ebs.iops #=> Integer
resp.instances[0].block_device_mappings[0].ebs.volume_size #=> Integer
resp.instances[0].block_device_mappings[0].ebs.volume_type #=> String, one of "gp2", "io1", "standard"
resp.instances[0].block_device_mappings[0].ebs.delete_on_termination #=> true/false
resp.instances[0].created_at #=> String
resp.instances[0].ebs_optimized #=> true/false
resp.instances[0].ec2_instance_id #=> String
resp.instances[0].ecs_cluster_arn #=> String
resp.instances[0].ecs_container_instance_arn #=> String
resp.instances[0].elastic_ip #=> String
resp.instances[0].hostname #=> String
resp.instances[0].infrastructure_class #=> String
resp.instances[0].install_updates_on_boot #=> true/false
resp.instances[0].instance_id #=> String
resp.instances[0].instance_profile_arn #=> String
resp.instances[0].instance_type #=> String
resp.instances[0].last_service_error_id #=> String
resp.instances[0].layer_ids #=> Array
resp.instances[0].layer_ids[0] #=> String
resp.instances[0].os #=> String
resp.instances[0].platform #=> String
resp.instances[0].private_dns #=> String
resp.instances[0].private_ip #=> String
resp.instances[0].public_dns #=> String
resp.instances[0].public_ip #=> String
resp.instances[0].registered_by #=> String
resp.instances[0].reported_agent_version #=> String
resp.instances[0].reported_os.family #=> String
resp.instances[0].reported_os.name #=> String
resp.instances[0].reported_os.version #=> String
resp.instances[0].root_device_type #=> String, one of "ebs", "instance-store"
resp.instances[0].root_device_volume_id #=> String
resp.instances[0].security_group_ids #=> Array
resp.instances[0].security_group_ids[0] #=> String
resp.instances[0].ssh_host_dsa_key_fingerprint #=> String
resp.instances[0].ssh_host_rsa_key_fingerprint #=> String
resp.instances[0].ssh_key_name #=> String
resp.instances[0].stack_id #=> String
resp.instances[0].status #=> String
resp.instances[0].subnet_id #=> String
resp.instances[0].tenancy #=> String
resp.instances[0].virtualization_type #=> String, one of "paravirtual", "hvm"

Options Hash (options):

  • :stack_id (String)

    A stack ID. If you use this parameter, DescribeInstances returns descriptions of the instances associated with the specified stack.

  • :layer_id (String)

    A layer ID. If you use this parameter, DescribeInstances returns descriptions of the instances associated with the specified layer.

  • :instance_ids (Array<String>)

    An array of instance IDs to be described. If you use this parameter, DescribeInstances returns a description of the specified instances. Otherwise, it returns a description of every instance.

Returns:

See Also:

#describe_layers(options = {}) ⇒ Types::DescribeLayersResult

Requests a description of one or more layers in a specified stack.

This call accepts only one resource-identifying parameter.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or 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 with placeholder values


resp = client.describe_layers({
  stack_id: "String",
  layer_ids: ["String"],
})

Response structure


resp.layers #=> Array
resp.layers[0].arn #=> String
resp.layers[0].stack_id #=> String
resp.layers[0].layer_id #=> String
resp.layers[0].type #=> String, one of "aws-flow-ruby", "ecs-cluster", "java-app", "lb", "web", "php-app", "rails-app", "nodejs-app", "memcached", "db-master", "monitoring-master", "custom"
resp.layers[0].name #=> String
resp.layers[0].shortname #=> String
resp.layers[0].attributes #=> Hash
resp.layers[0].attributes["LayerAttributesKeys"] #=> String
resp.layers[0].cloud_watch_logs_configuration.enabled #=> true/false
resp.layers[0].cloud_watch_logs_configuration.log_streams #=> Array
resp.layers[0].cloud_watch_logs_configuration.log_streams[0].log_group_name #=> String
resp.layers[0].cloud_watch_logs_configuration.log_streams[0].datetime_format #=> String
resp.layers[0].cloud_watch_logs_configuration.log_streams[0].time_zone #=> String, one of "LOCAL", "UTC"
resp.layers[0].cloud_watch_logs_configuration.log_streams[0].file #=> String
resp.layers[0].cloud_watch_logs_configuration.log_streams[0].file_fingerprint_lines #=> String
resp.layers[0].cloud_watch_logs_configuration.log_streams[0].multi_line_start_pattern #=> String
resp.layers[0].cloud_watch_logs_configuration.log_streams[0].initial_position #=> String, one of "start_of_file", "end_of_file"
resp.layers[0].cloud_watch_logs_configuration.log_streams[0].encoding #=> String, one of "ascii", "big5", "big5hkscs", "cp037", "cp424", "cp437", "cp500", "cp720", "cp737", "cp775", "cp850", "cp852", "cp855", "cp856", "cp857", "cp858", "cp860", "cp861", "cp862", "cp863", "cp864", "cp865", "cp866", "cp869", "cp874", "cp875", "cp932", "cp949", "cp950", "cp1006", "cp1026", "cp1140", "cp1250", "cp1251", "cp1252", "cp1253", "cp1254", "cp1255", "cp1256", "cp1257", "cp1258", "euc_jp", "euc_jis_2004", "euc_jisx0213", "euc_kr", "gb2312", "gbk", "gb18030", "hz", "iso2022_jp", "iso2022_jp_1", "iso2022_jp_2", "iso2022_jp_2004", "iso2022_jp_3", "iso2022_jp_ext", "iso2022_kr", "latin_1", "iso8859_2", "iso8859_3", "iso8859_4", "iso8859_5", "iso8859_6", "iso8859_7", "iso8859_8", "iso8859_9", "iso8859_10", "iso8859_13", "iso8859_14", "iso8859_15", "iso8859_16", "johab", "koi8_r", "koi8_u", "mac_cyrillic", "mac_greek", "mac_iceland", "mac_latin2", "mac_roman", "mac_turkish", "ptcp154", "shift_jis", "shift_jis_2004", "shift_jisx0213", "utf_32", "utf_32_be", "utf_32_le", "utf_16", "utf_16_be", "utf_16_le", "utf_7", "utf_8", "utf_8_sig"
resp.layers[0].cloud_watch_logs_configuration.log_streams[0].buffer_duration #=> Integer
resp.layers[0].cloud_watch_logs_configuration.log_streams[0].batch_count #=> Integer
resp.layers[0].cloud_watch_logs_configuration.log_streams[0].batch_size #=> Integer
resp.layers[0].custom_instance_profile_arn #=> String
resp.layers[0].custom_json #=> String
resp.layers[0].custom_security_group_ids #=> Array
resp.layers[0].custom_security_group_ids[0] #=> String
resp.layers[0].default_security_group_names #=> Array
resp.layers[0].default_security_group_names[0] #=> String
resp.layers[0].packages #=> Array
resp.layers[0].packages[0] #=> String
resp.layers[0].volume_configurations #=> Array
resp.layers[0].volume_configurations[0].mount_point #=> String
resp.layers[0].volume_configurations[0].raid_level #=> Integer
resp.layers[0].volume_configurations[0].number_of_disks #=> Integer
resp.layers[0].volume_configurations[0].size #=> Integer
resp.layers[0].volume_configurations[0].volume_type #=> String
resp.layers[0].volume_configurations[0].iops #=> Integer
resp.layers[0].enable_auto_healing #=> true/false
resp.layers[0].auto_assign_elastic_ips #=> true/false
resp.layers[0].auto_assign_public_ips #=> true/false
resp.layers[0].default_recipes.setup #=> Array
resp.layers[0].default_recipes.setup[0] #=> String
resp.layers[0].default_recipes.configure #=> Array
resp.layers[0].default_recipes.configure[0] #=> String
resp.layers[0].default_recipes.deploy #=> Array
resp.layers[0].default_recipes.deploy[0] #=> String
resp.layers[0].default_recipes.undeploy #=> Array
resp.layers[0].default_recipes.undeploy[0] #=> String
resp.layers[0].default_recipes.shutdown #=> Array
resp.layers[0].default_recipes.shutdown[0] #=> String
resp.layers[0].custom_recipes.setup #=> Array
resp.layers[0].custom_recipes.setup[0] #=> String
resp.layers[0].custom_recipes.configure #=> Array
resp.layers[0].custom_recipes.configure[0] #=> String
resp.layers[0].custom_recipes.deploy #=> Array
resp.layers[0].custom_recipes.deploy[0] #=> String
resp.layers[0].custom_recipes.undeploy #=> Array
resp.layers[0].custom_recipes.undeploy[0] #=> String
resp.layers[0].custom_recipes.shutdown #=> Array
resp.layers[0].custom_recipes.shutdown[0] #=> String
resp.layers[0].created_at #=> String
resp.layers[0].install_updates_on_boot #=> true/false
resp.layers[0].use_ebs_optimized_instances #=> true/false
resp.layers[0].lifecycle_event_configuration.shutdown.execution_timeout #=> Integer
resp.layers[0].lifecycle_event_configuration.shutdown.delay_until_elb_connections_drained #=> true/false

Options Hash (options):

  • :stack_id (String)

    The stack ID.

  • :layer_ids (Array<String>)

    An array of layer IDs that specify the layers to be described. If you omit this parameter, DescribeLayers returns a description of every layer in the specified stack.

Returns:

See Also:

#describe_load_based_auto_scaling(options = {}) ⇒ Types::DescribeLoadBasedAutoScalingResult

Describes load-based auto scaling configurations for specified layers.

You must specify at least one of the parameters.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or 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 with placeholder values


resp = client.describe_load_based_auto_scaling({
  layer_ids: ["String"], # required
})

Response structure


resp.load_based_auto_scaling_configurations #=> Array
resp.load_based_auto_scaling_configurations[0].layer_id #=> String
resp.load_based_auto_scaling_configurations[0].enable #=> true/false
resp.load_based_auto_scaling_configurations[0].up_scaling.instance_count #=> Integer
resp.load_based_auto_scaling_configurations[0].up_scaling.thresholds_wait_time #=> Integer
resp.load_based_auto_scaling_configurations[0].up_scaling.ignore_metrics_time #=> Integer
resp.load_based_auto_scaling_configurations[0].up_scaling.cpu_threshold #=> Float
resp.load_based_auto_scaling_configurations[0].up_scaling.memory_threshold #=> Float
resp.load_based_auto_scaling_configurations[0].up_scaling.load_threshold #=> Float
resp.load_based_auto_scaling_configurations[0].up_scaling.alarms #=> Array
resp.load_based_auto_scaling_configurations[0].up_scaling.alarms[0] #=> String
resp.load_based_auto_scaling_configurations[0].down_scaling.instance_count #=> Integer
resp.load_based_auto_scaling_configurations[0].down_scaling.thresholds_wait_time #=> Integer
resp.load_based_auto_scaling_configurations[0].down_scaling.ignore_metrics_time #=> Integer
resp.load_based_auto_scaling_configurations[0].down_scaling.cpu_threshold #=> Float
resp.load_based_auto_scaling_configurations[0].down_scaling.memory_threshold #=> Float
resp.load_based_auto_scaling_configurations[0].down_scaling.load_threshold #=> Float
resp.load_based_auto_scaling_configurations[0].down_scaling.alarms #=> Array
resp.load_based_auto_scaling_configurations[0].down_scaling.alarms[0] #=> String

Options Hash (options):

  • :layer_ids (required, Array<String>)

    An array of layer IDs.

Returns:

See Also:

#describe_my_user_profile(options = {}) ⇒ Types::DescribeMyUserProfileResult

Describes a user's SSH information.

Required Permissions: To use this action, an IAM user must have self-management enabled or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

Examples:

Request syntax with placeholder values


resp = client.()

Response structure


resp..iam_user_arn #=> String
resp..name #=> String
resp..ssh_username #=> String
resp..ssh_public_key #=> String

Returns:

See Also:

#describe_permissions(options = {}) ⇒ Types::DescribePermissionsResult

Describes the permissions for a specified stack.

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 with placeholder values


resp = client.describe_permissions({
  iam_user_arn: "String",
  stack_id: "String",
})

Response structure


resp.permissions #=> Array
resp.permissions[0].stack_id #=> String
resp.permissions[0].iam_user_arn #=> String
resp.permissions[0].allow_ssh #=> true/false
resp.permissions[0].allow_sudo #=> true/false
resp.permissions[0].level #=> String

Options Hash (options):

  • :iam_user_arn (String)

    The user\'s IAM ARN. This can also be a federated user\'s ARN. For more information about IAM ARNs, see Using Identifiers.

  • :stack_id (String)

    The stack ID.

Returns:

See Also:

#describe_raid_arrays(options = {}) ⇒ Types::DescribeRaidArraysResult

Describe an instance's RAID arrays.

This call accepts only one resource-identifying parameter.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or 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 with placeholder values


resp = client.describe_raid_arrays({
  instance_id: "String",
  stack_id: "String",
  raid_array_ids: ["String"],
})

Response structure


resp.raid_arrays #=> Array
resp.raid_arrays[0].raid_array_id #=> String
resp.raid_arrays[0].instance_id #=> String
resp.raid_arrays[0].name #=> String
resp.raid_arrays[0].raid_level #=> Integer
resp.raid_arrays[0].number_of_disks #=> Integer
resp.raid_arrays[0].size #=> Integer
resp.raid_arrays[0].device #=> String
resp.raid_arrays[0].mount_point #=> String
resp.raid_arrays[0].availability_zone #=> String
resp.raid_arrays[0].created_at #=> String
resp.raid_arrays[0].stack_id #=> String
resp.raid_arrays[0].volume_type #=> String
resp.raid_arrays[0].iops #=> Integer

Options Hash (options):

  • :instance_id (String)

    The instance ID. If you use this parameter, DescribeRaidArrays returns descriptions of the RAID arrays associated with the specified instance.

  • :stack_id (String)

    The stack ID.

  • :raid_array_ids (Array<String>)

    An array of RAID array IDs. If you use this parameter, DescribeRaidArrays returns descriptions of the specified arrays. Otherwise, it returns a description of every array.

Returns:

See Also:

#describe_rds_db_instances(options = {}) ⇒ Types::DescribeRdsDbInstancesResult

Describes Amazon RDS instances.

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

This call accepts only one resource-identifying parameter.

Examples:

Request syntax with placeholder values


resp = client.describe_rds_db_instances({
  stack_id: "String", # required
  rds_db_instance_arns: ["String"],
})

Response structure


resp.rds_db_instances #=> Array
resp.rds_db_instances[0].rds_db_instance_arn #=> String
resp.rds_db_instances[0].db_instance_identifier #=> String
resp.rds_db_instances[0].db_user #=> String
resp.rds_db_instances[0].db_password #=> String
resp.rds_db_instances[0].region #=> String
resp.rds_db_instances[0].address #=> String
resp.rds_db_instances[0].engine #=> String
resp.rds_db_instances[0].stack_id #=> String
resp.rds_db_instances[0].missing_on_rds #=> true/false

Options Hash (options):

  • :stack_id (required, String)

    The stack ID that the instances are registered with. The operation returns descriptions of all registered Amazon RDS instances.

  • :rds_db_instance_arns (Array<String>)

    An array containing the ARNs of the instances to be described.

Returns:

See Also:

#describe_service_errors(options = {}) ⇒ Types::DescribeServiceErrorsResult

Describes AWS OpsWorks Stacks service errors.

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

This call accepts only one resource-identifying parameter.

Examples:

Request syntax with placeholder values


resp = client.describe_service_errors({
  stack_id: "String",
  instance_id: "String",
  service_error_ids: ["String"],
})

Response structure


resp.service_errors #=> Array
resp.service_errors[0].service_error_id #=> String
resp.service_errors[0].stack_id #=> String
resp.service_errors[0].instance_id #=> String
resp.service_errors[0].type #=> String
resp.service_errors[0].message #=> String
resp.service_errors[0].created_at #=> String

Options Hash (options):

  • :stack_id (String)

    The stack ID. If you use this parameter, DescribeServiceErrors returns descriptions of the errors associated with the specified stack.

  • :instance_id (String)

    The instance ID. If you use this parameter, DescribeServiceErrors returns descriptions of the errors associated with the specified instance.

  • :service_error_ids (Array<String>)

    An array of service error IDs. If you use this parameter, DescribeServiceErrors returns descriptions of the specified errors. Otherwise, it returns a description of every error.

Returns:

See Also:

#describe_stack_provisioning_parameters(options = {}) ⇒ Types::DescribeStackProvisioningParametersResult

Requests a description of a stack's provisioning parameters.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or 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 with placeholder values


resp = client.describe_stack_provisioning_parameters({
  stack_id: "String", # required
})

Response structure


resp.agent_installer_url #=> String
resp.parameters #=> Hash
resp.parameters["String"] #=> String

Options Hash (options):

  • :stack_id (required, String)

    The stack ID

Returns:

See Also:

#describe_stack_summary(options = {}) ⇒ Types::DescribeStackSummaryResult

Describes the number of layers and apps in a specified stack, and the number of instances in each state, such as running_setup or online.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or 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 with placeholder values


resp = client.describe_stack_summary({
  stack_id: "String", # required
})

Response structure


resp.stack_summary.stack_id #=> String
resp.stack_summary.name #=> String
resp.stack_summary.arn #=> String
resp.stack_summary.layers_count #=> Integer
resp.stack_summary.apps_count #=> Integer
resp.stack_summary.instances_count.assigning #=> Integer
resp.stack_summary.instances_count.booting #=> Integer
resp.stack_summary.instances_count.connection_lost #=> Integer
resp.stack_summary.instances_count.deregistering #=> Integer
resp.stack_summary.instances_count.online #=> Integer
resp.stack_summary.instances_count.pending #=> Integer
resp.stack_summary.instances_count.rebooting #=> Integer
resp.stack_summary.instances_count.registered #=> Integer
resp.stack_summary.instances_count.registering #=> Integer
resp.stack_summary.instances_count.requested #=> Integer
resp.stack_summary.instances_count.running_setup #=> Integer
resp.stack_summary.instances_count.setup_failed #=> Integer
resp.stack_summary.instances_count.shutting_down #=> Integer
resp.stack_summary.instances_count.start_failed #=> Integer
resp.stack_summary.instances_count.stopped #=> Integer
resp.stack_summary.instances_count.stopping #=> Integer
resp.stack_summary.instances_count.terminated #=> Integer
resp.stack_summary.instances_count.terminating #=> Integer
resp.stack_summary.instances_count.unassigning #=> Integer

Options Hash (options):

  • :stack_id (required, String)

    The stack ID.

Returns:

See Also:

#describe_stacks(options = {}) ⇒ Types::DescribeStacksResult

Requests a description of one or more stacks.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or 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 with placeholder values


resp = client.describe_stacks({
  stack_ids: ["String"],
})

Response structure


resp.stacks #=> Array
resp.stacks[0].stack_id #=> String
resp.stacks[0].name #=> String
resp.stacks[0].arn #=> String
resp.stacks[0].region #=> String
resp.stacks[0].vpc_id #=> String
resp.stacks[0].attributes #=> Hash
resp.stacks[0].attributes["StackAttributesKeys"] #=> String
resp.stacks[0].service_role_arn #=> String
resp.stacks[0].default_instance_profile_arn #=> String
resp.stacks[0].default_os #=> String
resp.stacks[0].hostname_theme #=> String
resp.stacks[0].default_availability_zone #=> String
resp.stacks[0].default_subnet_id #=> String
resp.stacks[0].custom_json #=> String
resp.stacks[0].configuration_manager.name #=> String
resp.stacks[0].configuration_manager.version #=> String
resp.stacks[0].chef_configuration.manage_berkshelf #=> true/false
resp.stacks[0].chef_configuration.berkshelf_version #=> String
resp.stacks[0].use_custom_cookbooks #=> true/false
resp.stacks[0].use_opsworks_security_groups #=> true/false
resp.stacks[0].custom_cookbooks_source.type #=> String, one of "git", "svn", "archive", "s3"
resp.stacks[0].custom_cookbooks_source.url #=> String
resp.stacks[0].custom_cookbooks_source.username #=> String
resp.stacks[0].custom_cookbooks_source.password #=> String
resp.stacks[0].custom_cookbooks_source.ssh_key #=> String
resp.stacks[0].custom_cookbooks_source.revision #=> String
resp.stacks[0].default_ssh_key_name #=> String
resp.stacks[0].created_at #=> String
resp.stacks[0].default_root_device_type #=> String, one of "ebs", "instance-store"
resp.stacks[0].agent_version #=> String

Options Hash (options):

  • :stack_ids (Array<String>)

    An array of stack IDs that specify the stacks to be described. If you omit this parameter, DescribeStacks returns a description of every stack.

Returns:

See Also:

#describe_time_based_auto_scaling(options = {}) ⇒ Types::DescribeTimeBasedAutoScalingResult

Describes time-based auto scaling configurations for specified instances.

You must specify at least one of the parameters.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or 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 with placeholder values


resp = client.describe_time_based_auto_scaling({
  instance_ids: ["String"], # required
})

Response structure


resp.time_based_auto_scaling_configurations #=> Array
resp.time_based_auto_scaling_configurations[0].instance_id #=> String
resp.time_based_auto_scaling_configurations[0].auto_scaling_schedule.monday #=> Hash
resp.time_based_auto_scaling_configurations[0].auto_scaling_schedule.monday["Hour"] #=> String
resp.time_based_auto_scaling_configurations[0].auto_scaling_schedule.tuesday #=> Hash
resp.time_based_auto_scaling_configurations[0].auto_scaling_schedule.tuesday["Hour"] #=> String
resp.time_based_auto_scaling_configurations[0].auto_scaling_schedule.wednesday #=> Hash
resp.time_based_auto_scaling_configurations[0].auto_scaling_schedule.wednesday["Hour"] #=> String
resp.time_based_auto_scaling_configurations[0].auto_scaling_schedule.thursday #=> Hash
resp.time_based_auto_scaling_configurations[0].auto_scaling_schedule.thursday["Hour"] #=> String
resp.time_based_auto_scaling_configurations[0].auto_scaling_schedule.friday #=> Hash
resp.time_based_auto_scaling_configurations[0].auto_scaling_schedule.friday["Hour"] #=> String
resp.time_based_auto_scaling_configurations[0].auto_scaling_schedule.saturday #=> Hash
resp.time_based_auto_scaling_configurations[0].auto_scaling_schedule.saturday["Hour"] #=> String
resp.time_based_auto_scaling_configurations[0].auto_scaling_schedule.sunday #=> Hash
resp.time_based_auto_scaling_configurations[0].auto_scaling_schedule.sunday["Hour"] #=> String

Options Hash (options):

  • :instance_ids (required, Array<String>)

    An array of instance IDs.

Returns:

See Also:

#describe_user_profiles(options = {}) ⇒ Types::DescribeUserProfilesResult

Describe specified users.

Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

Examples:

Request syntax with placeholder values


resp = client.describe_user_profiles({
  iam_user_arns: ["String"],
})

Response structure


resp.user_profiles #=> Array
resp.user_profiles[0].iam_user_arn #=> String
resp.user_profiles[0].name #=> String
resp.user_profiles[0].ssh_username #=> String
resp.user_profiles[0].ssh_public_key #=> String
resp.user_profiles[0].allow_self_management #=> true/false

Options Hash (options):

  • :iam_user_arns (Array<String>)

    An array of IAM or federated user ARNs that identify the users to be described.

Returns:

See Also:

#describe_volumes(options = {}) ⇒ Types::DescribeVolumesResult

Describes an instance's Amazon EBS volumes.

This call accepts only one resource-identifying parameter.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or 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 with placeholder values


resp = client.describe_volumes({
  instance_id: "String",
  stack_id: "String",
  raid_array_id: "String",
  volume_ids: ["String"],
})

Response structure


resp.volumes #=> Array
resp.volumes[0].volume_id #=> String
resp.volumes[0].ec2_volume_id #=> String
resp.volumes[0].name #=> String
resp.volumes[0].raid_array_id #=> String
resp.volumes[0].instance_id #=> String
resp.volumes[0].status #=> String
resp.volumes[0].size #=> Integer
resp.volumes[0].device #=> String
resp.volumes[0].mount_point #=> String
resp.volumes[0].region #=> String
resp.volumes[0].availability_zone #=> String
resp.volumes[0].volume_type #=> String
resp.volumes[0].iops #=> Integer

Options Hash (options):

  • :instance_id (String)

    The instance ID. If you use this parameter, DescribeVolumes returns descriptions of the volumes associated with the specified instance.

  • :stack_id (String)

    A stack ID. The action describes the stack\'s registered Amazon EBS volumes.

  • :raid_array_id (String)

    The RAID array ID. If you use this parameter, DescribeVolumes returns descriptions of the volumes associated with the specified RAID array.

  • :volume_ids (Array<String>)

    Am array of volume IDs. If you use this parameter, DescribeVolumes returns descriptions of the specified volumes. Otherwise, it returns a description of every volume.

Returns:

See Also:

#detach_elastic_load_balancer(options = {}) ⇒ Struct

Detaches a specified Elastic Load Balancing instance from its 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 with placeholder values


resp = client.detach_elastic_load_balancer({
  elastic_load_balancer_name: "String", # required
  layer_id: "String", # required
})

Options Hash (options):

  • :elastic_load_balancer_name (required, String)

    The Elastic Load Balancing instance\'s name.

  • :layer_id (required, String)

    The ID of the layer that the Elastic Load Balancing instance is attached to.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#disassociate_elastic_ip(options = {}) ⇒ Struct

Disassociates an Elastic IP address from its instance. The address remains registered with the stack. For more information, see Resource Management.

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 with placeholder values


resp = client.disassociate_elastic_ip({
  elastic_ip: "String", # required
})

Options Hash (options):

  • :elastic_ip (required, String)

    The Elastic IP address.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#get_hostname_suggestion(options = {}) ⇒ Types::GetHostnameSuggestionResult

Gets a generated host name for the specified layer, based on the current host name theme.

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 with placeholder values


resp = client.get_hostname_suggestion({
  layer_id: "String", # required
})

Response structure


resp.layer_id #=> String
resp.hostname #=> String

Options Hash (options):

  • :layer_id (required, String)

    The layer ID.

Returns:

See Also:

#grant_access(options = {}) ⇒ Types::GrantAccessResult

This action can be used only with Windows stacks.

Grants RDP access to a Windows instance for a specified time period.

Examples:

Request syntax with placeholder values


resp = client.grant_access({
  instance_id: "String", # required
  valid_for_in_minutes: 1,
})

Response structure


resp.temporary_credential.username #=> String
resp.temporary_credential.password #=> String
resp.temporary_credential.valid_for_in_minutes #=> Integer
resp.temporary_credential.instance_id #=> String

Options Hash (options):

  • :instance_id (required, String)

    The instance\'s AWS OpsWorks Stacks ID.

  • :valid_for_in_minutes (Integer)

    The length of time (in minutes) that the grant is valid. When the grant expires at the end of this period, the user will no longer be able to use the credentials to log in. If the user is logged in at the time, he or she automatically will be logged out.

Returns:

See Also:

#list_tags(options = {}) ⇒ Types::ListTagsResult

Returns a list of tags that are applied to the specified stack or layer.

Examples:

Request syntax with placeholder values


resp = client.list_tags({
  resource_arn: "ResourceArn", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String
resp.next_token #=> String

Options Hash (options):

  • :resource_arn (required, String)

    The stack or layer\'s Amazon Resource Number (ARN).

  • :max_results (Integer)

    Do not use. A validation exception occurs if you add a MaxResults parameter to a ListTagsRequest call.

  • :next_token (String)

    Do not use. A validation exception occurs if you add a NextToken parameter to a ListTagsRequest call.

Returns:

See Also:

#reboot_instance(options = {}) ⇒ Struct

Reboots a specified instance. For more information, see Starting, Stopping, and Rebooting Instances.

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 with placeholder values


resp = client.reboot_instance({
  instance_id: "String", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The instance ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#register_ecs_cluster(options = {}) ⇒ Types::RegisterEcsClusterResult

Registers a specified Amazon ECS cluster with a stack. You can register only one cluster with a stack. A cluster can be registered with only one stack. For more information, see Resource Management.

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 with placeholder values


resp = client.register_ecs_cluster({
  ecs_cluster_arn: "String", # required
  stack_id: "String", # required
})

Response structure


resp.ecs_cluster_arn #=> String

Options Hash (options):

  • :ecs_cluster_arn (required, String)

    The cluster\'s ARN.

  • :stack_id (required, String)

    The stack ID.

Returns:

See Also:

#register_elastic_ip(options = {}) ⇒ Types::RegisterElasticIpResult

Registers an Elastic IP address with a specified stack. An address can be registered with only one stack at a time. If the address is already registered, you must first deregister it by calling DeregisterElasticIp. For more information, see Resource Management.

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 with placeholder values


resp = client.register_elastic_ip({
  elastic_ip: "String", # required
  stack_id: "String", # required
})

Response structure


resp.elastic_ip #=> String

Options Hash (options):

  • :elastic_ip (required, String)

    The Elastic IP address.

  • :stack_id (required, String)

    The stack ID.

Returns:

See Also:

#register_instance(options = {}) ⇒ Types::RegisterInstanceResult

Registers instances that were created outside of AWS OpsWorks Stacks with a specified stack.

We do not recommend using this action to register instances. The complete registration operation includes two tasks: installing the AWS OpsWorks Stacks agent on the instance, and registering the instance with the stack. RegisterInstance handles only the second step. You should instead use the AWS CLI register command, which performs the entire registration operation. For more information, see Registering an Instance with an AWS OpsWorks Stacks Stack.

Registered instances have the same requirements as instances that are created by using the CreateInstance API. For example, registered instances must be running a supported Linux-based operating system, and they must have a supported instance type. For more information about requirements for instances that you want to register, see Preparing the Instance.

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 with placeholder values


resp = client.register_instance({
  stack_id: "String", # required
  hostname: "String",
  public_ip: "String",
  private_ip: "String",
  rsa_public_key: "String",
  rsa_public_key_fingerprint: "String",
  instance_identity: {
    document: "String",
    signature: "String",
  },
})

Response structure


resp.instance_id #=> String

Options Hash (options):

  • :stack_id (required, String)

    The ID of the stack that the instance is to be registered with.

  • :hostname (String)

    The instance\'s hostname.

  • :public_ip (String)

    The instance\'s public IP address.

  • :private_ip (String)

    The instance\'s private IP address.

  • :rsa_public_key (String)

    The instances public RSA key. This key is used to encrypt communication between the instance and the service.

  • :rsa_public_key_fingerprint (String)

    The instances public RSA key fingerprint.

  • :instance_identity (Types::InstanceIdentity)

    An InstanceIdentity object that contains the instance\'s identity.

Returns:

See Also:

#register_rds_db_instance(options = {}) ⇒ Struct

Registers an Amazon RDS instance with a stack.

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 with placeholder values


resp = client.register_rds_db_instance({
  stack_id: "String", # required
  rds_db_instance_arn: "String", # required
  db_user: "String", # required
  db_password: "String", # required
})

Options Hash (options):

  • :stack_id (required, String)

    The stack ID.

  • :rds_db_instance_arn (required, String)

    The Amazon RDS instance\'s ARN.

  • :db_user (required, String)

    The database\'s master user name.

  • :db_password (required, String)

    The database password.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#register_volume(options = {}) ⇒ Types::RegisterVolumeResult

Registers an Amazon EBS volume with a specified stack. A volume can be registered with only one stack at a time. If the volume is already registered, you must first deregister it by calling DeregisterVolume. For more information, see Resource Management.

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 with placeholder values


resp = client.register_volume({
  ec2_volume_id: "String",
  stack_id: "String", # required
})

Response structure


resp.volume_id #=> String

Options Hash (options):

  • :ec2_volume_id (String)

    The Amazon EBS volume ID.

  • :stack_id (required, String)

    The stack ID.

Returns:

See Also:

#set_load_based_auto_scaling(options = {}) ⇒ Struct

Specify the load-based auto scaling configuration for a specified layer. For more information, see Managing Load with Time-based and Load-based Instances.

To use load-based auto scaling, you must create a set of load-based auto scaling instances. Load-based auto scaling operates only on the instances from that set, so you must ensure that you have created enough instances to handle the maximum anticipated load.

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 with placeholder values


resp = client.set_load_based_auto_scaling({
  layer_id: "String", # required
  enable: false,
  up_scaling: {
    instance_count: 1,
    thresholds_wait_time: 1,
    ignore_metrics_time: 1,
    cpu_threshold: 1.0,
    memory_threshold: 1.0,
    load_threshold: 1.0,
    alarms: ["String"],
  },
  down_scaling: {
    instance_count: 1,
    thresholds_wait_time: 1,
    ignore_metrics_time: 1,
    cpu_threshold: 1.0,
    memory_threshold: 1.0,
    load_threshold: 1.0,
    alarms: ["String"],
  },
})

Options Hash (options):

  • :layer_id (required, String)

    The layer ID.

  • :enable (Boolean)

    Enables load-based auto scaling for the layer.

  • :up_scaling (Types::AutoScalingThresholds)

    An AutoScalingThresholds object with the upscaling threshold configuration. If the load exceeds these thresholds for a specified amount of time, AWS OpsWorks Stacks starts a specified number of instances.

  • :down_scaling (Types::AutoScalingThresholds)

    An AutoScalingThresholds object with the downscaling threshold configuration. If the load falls below these thresholds for a specified amount of time, AWS OpsWorks Stacks stops a specified number of instances.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#set_permission(options = {}) ⇒ Struct

Specifies a user's permissions. For more information, see Security and Permissions.

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 with placeholder values


resp = client.set_permission({
  stack_id: "String", # required
  iam_user_arn: "String", # required
  allow_ssh: false,
  allow_sudo: false,
  level: "String",
})

Options Hash (options):

  • :stack_id (required, String)

    The stack ID.

  • :iam_user_arn (required, String)

    The user\'s IAM ARN. This can also be a federated user\'s ARN.

  • :allow_ssh (Boolean)

    The user is allowed to use SSH to communicate with the instance.

  • :allow_sudo (Boolean)

    The user is allowed to use sudo to elevate privileges.

  • :level (String)

    The user\'s permission level, which must be set to one of the following strings. You cannot set your own permissions level.

    • deny

    • show

    • deploy

    • manage

    • iam_only

    For more information on the permissions associated with these levels, see Managing User Permissions.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#set_time_based_auto_scaling(options = {}) ⇒ Struct

Specify the time-based auto scaling configuration for a specified instance. For more information, see Managing Load with Time-based and Load-based Instances.

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 with placeholder values


resp = client.set_time_based_auto_scaling({
  instance_id: "String", # required
  auto_scaling_schedule: {
    monday: {
      "Hour" => "Switch",
    },
    tuesday: {
      "Hour" => "Switch",
    },
    wednesday: {
      "Hour" => "Switch",
    },
    thursday: {
      "Hour" => "Switch",
    },
    friday: {
      "Hour" => "Switch",
    },
    saturday: {
      "Hour" => "Switch",
    },
    sunday: {
      "Hour" => "Switch",
    },
  },
})

Options Hash (options):

  • :instance_id (required, String)

    The instance ID.

  • :auto_scaling_schedule (Types::WeeklyAutoScalingSchedule)

    An AutoScalingSchedule with the instance schedule.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#start_instance(options = {}) ⇒ Struct

Starts a specified instance. For more information, see Starting, Stopping, and Rebooting Instances.

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 with placeholder values


resp = client.start_instance({
  instance_id: "String", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The instance ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#start_stack(options = {}) ⇒ Struct

Starts a stack's instances.

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 with placeholder values


resp = client.start_stack({
  stack_id: "String", # required
})

Options Hash (options):

  • :stack_id (required, String)

    The stack ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#stop_instance(options = {}) ⇒ Struct

Stops a specified instance. When you stop a standard instance, the data disappears and must be reinstalled when you restart the instance. You can stop an Amazon EBS-backed instance without losing data. For more information, see Starting, Stopping, and Rebooting Instances.

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 with placeholder values


resp = client.stop_instance({
  instance_id: "String", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The instance ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#stop_stack(options = {}) ⇒ Struct

Stops a specified stack.

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 with placeholder values


resp = client.stop_stack({
  stack_id: "String", # required
})

Options Hash (options):

  • :stack_id (required, String)

    The stack ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#tag_resource(options = {}) ⇒ Struct

Apply cost-allocation tags to a specified stack or layer in AWS OpsWorks Stacks. For more information about how tagging works, see Tags in the AWS OpsWorks User Guide.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "ResourceArn", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Options Hash (options):

  • :resource_arn (required, String)

    The stack or layer\'s Amazon Resource Number (ARN).

  • :tags (required, Hash<String,String>)

    A map that contains tag keys and tag values that are attached to a stack or layer.

    • The key cannot be empty.

    • The key can be a maximum of 127 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

    • The value can be a maximum 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

    • Leading and trailing white spaces are trimmed from both the key and value.

    • A maximum of 40 tags is allowed for any resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#unassign_instance(options = {}) ⇒ Struct

Unassigns a registered instance from all of it's layers. The instance remains in the stack as an unassigned instance and can be assigned to another layer, as needed. You cannot use this action with instances that were created with AWS OpsWorks Stacks.

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 with placeholder values


resp = client.unassign_instance({
  instance_id: "String", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The instance ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#unassign_volume(options = {}) ⇒ Struct

Unassigns an assigned Amazon EBS volume. The volume remains registered with the stack. For more information, see Resource Management.

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 with placeholder values


resp = client.unassign_volume({
  volume_id: "String", # required
})

Options Hash (options):

  • :volume_id (required, String)

    The volume ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#untag_resource(options = {}) ⇒ Struct

Removes tags from a specified stack or layer.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "ResourceArn", # required
  tag_keys: ["TagKey"], # required
})

Options Hash (options):

  • :resource_arn (required, String)

    The stack or layer\'s Amazon Resource Number (ARN).

  • :tag_keys (required, Array<String>)

    A list of the keys of tags to be removed from a stack or layer.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_app(options = {}) ⇒ Struct

Updates a specified app.

Required Permissions: To use this action, an IAM user must have a Deploy or 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 with placeholder values


resp = client.update_app({
  app_id: "String", # required
  name: "String",
  description: "String",
  data_sources: [
    {
      type: "String",
      arn: "String",
      database_name: "String",
    },
  ],
  type: "aws-flow-ruby", # accepts aws-flow-ruby, java, rails, php, nodejs, static, other
  app_source: {
    type: "git", # accepts git, svn, archive, s3
    url: "String",
    username: "String",
    password: "String",
    ssh_key: "String",
    revision: "String",
  },
  domains: ["String"],
  enable_ssl: false,
  ssl_configuration: {
    certificate: "String", # required
    private_key: "String", # required
    chain: "String",
  },
  attributes: {
    "DocumentRoot" => "String",
  },
  environment: [
    {
      key: "String", # required
      value: "String", # required
      secure: false,
    },
  ],
})

Options Hash (options):

  • :app_id (required, String)

    The app ID.

  • :name (String)

    The app name.

  • :description (String)

    A description of the app.

  • :data_sources (Array<Types::DataSource>)

    The app\'s data sources.

  • :type (String)

    The app type.

  • :app_source (Types::Source)

    A Source object that specifies the app repository.

  • :domains (Array<String>)

    The app\'s virtual host settings, with multiple domains separated by commas. For example: 'www.example.com, example.com'

  • :enable_ssl (Boolean)

    Whether SSL is enabled for the app.

  • :ssl_configuration (Types::SslConfiguration)

    An SslConfiguration object with the SSL configuration.

  • :attributes (Hash<String,String>)

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

  • :environment (Array<Types::EnvironmentVariable>)

    An array of EnvironmentVariable objects that specify environment variables to be associated with the app. After you deploy the app, these variables are defined on the associated app server instances.For more information, see Environment Variables.

    There is no specific limit on the number of environment variables. However, the size of the associated data structure - which includes the variables\' names, values, and protected flag values - cannot exceed 10 KB (10240 Bytes). This limit should accommodate most if not all use cases. Exceeding it will cause an exception with the message, \"Environment: is too large (maximum is 10KB).\"

    This parameter is supported only by Chef 11.10 stacks. If you have specified one or more environment variables, you cannot modify the stack\'s Chef version.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_elastic_ip(options = {}) ⇒ Struct

Updates a registered Elastic IP address's name. For more information, see Resource Management.

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 with placeholder values


resp = client.update_elastic_ip({
  elastic_ip: "String", # required
  name: "String",
})

Options Hash (options):

  • :elastic_ip (required, String)

    The address.

  • :name (String)

    The new name.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_instance(options = {}) ⇒ Struct

Updates a specified instance.

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 with placeholder values


resp = client.update_instance({
  instance_id: "String", # required
  layer_ids: ["String"],
  instance_type: "String",
  auto_scaling_type: "load", # accepts load, timer
  hostname: "String",
  os: "String",
  ami_id: "String",
  ssh_key_name: "String",
  architecture: "x86_64", # accepts x86_64, i386
  install_updates_on_boot: false,
  ebs_optimized: false,
  agent_version: "String",
})

Options Hash (options):

  • :instance_id (required, String)

    The instance ID.

  • :layer_ids (Array<String>)

    The instance\'s layer IDs.

  • :instance_type (String)

    The instance type, such as t2.micro. For a list of supported instance types, open the stack in the console, choose Instances, and choose + Instance. The Size list contains the currently supported types. For more information, see Instance Families and Types. The parameter values that you use to specify the various types are in the API Name column of the Available Instance Types table.

  • :auto_scaling_type (String)

    For load-based or time-based instances, the type. Windows stacks can use only time-based instances.

  • :hostname (String)

    The instance host name.

  • :os (String)

    The instance\'s operating system, which must be set to one of the following. You cannot update an instance that is using a custom AMI.

    • A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03.

    • A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS.

    • CentOS Linux 7

    • Red Hat Enterprise Linux 7

    • A supported Windows operating system, such as Microsoft Windows Server 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft Windows Server 2012 R2 with SQL Server Web.

    For more information on the supported operating systems, see AWS OpsWorks Stacks Operating Systems.

    The default option is the current Amazon Linux version. If you set this parameter to Custom, you must use the AmiId parameter to specify the custom AMI that you want to use. For more information on the supported operating systems, see Operating Systems. For more information on how to use custom AMIs with OpsWorks, see Using Custom AMIs.

    You can specify a different Linux operating system for the updated stack, but you cannot change from Linux to Windows or Windows to Linux.

  • :ami_id (String)

    The ID of the AMI that was used to create the instance. The value of this parameter must be the same AMI ID that the instance is already using. You cannot apply a new AMI to an instance by running UpdateInstance. UpdateInstance does not work on instances that are using custom AMIs.

  • :ssh_key_name (String)

    The instance\'s Amazon EC2 key name.

  • :architecture (String)

    The instance architecture. Instance types do not necessarily support both architectures. For a list of the architectures that are supported by the different instance types, see Instance Families and Types.

  • :install_updates_on_boot (Boolean)

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

  • :ebs_optimized (Boolean)

    This property cannot be updated.

  • :agent_version (String)

    The default AWS OpsWorks Stacks agent version. You have the following options:

    • INHERIT - Use the stack\'s default agent version setting.

    • version_number - Use the specified agent version. This value overrides the stack\'s default setting. To update the agent version, you must edit the instance configuration and specify a new version. AWS OpsWorks Stacks then automatically installs that version on the instance.

    The default setting is INHERIT. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call DescribeAgentVersions.

    AgentVersion cannot be set to Chef 12.2.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_layer(options = {}) ⇒ Struct

Updates a specified 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 with placeholder values


resp = client.update_layer({
  layer_id: "String", # required
  name: "String",
  shortname: "String",
  attributes: {
    "EcsClusterArn" => "String",
  },
  cloud_watch_logs_configuration: {
    enabled: false,
    log_streams: [
      {
        log_group_name: "String",
        datetime_format: "String",
        time_zone: "LOCAL", # accepts LOCAL, UTC
        file: "String",
        file_fingerprint_lines: "String",
        multi_line_start_pattern: "String",
        initial_position: "start_of_file", # accepts start_of_file, end_of_file
        encoding: "ascii", # accepts ascii, big5, big5hkscs, cp037, cp424, cp437, cp500, cp720, cp737, cp775, cp850, cp852, cp855, cp856, cp857, cp858, cp860, cp861, cp862, cp863, cp864, cp865, cp866, cp869, cp874, cp875, cp932, cp949, cp950, cp1006, cp1026, cp1140, cp1250, cp1251, cp1252, cp1253, cp1254, cp1255, cp1256, cp1257, cp1258, euc_jp, euc_jis_2004, euc_jisx0213, euc_kr, gb2312, gbk, gb18030, hz, iso2022_jp, iso2022_jp_1, iso2022_jp_2, iso2022_jp_2004, iso2022_jp_3, iso2022_jp_ext, iso2022_kr, latin_1, iso8859_2, iso8859_3, iso8859_4, iso8859_5, iso8859_6, iso8859_7, iso8859_8, iso8859_9, iso8859_10, iso8859_13, iso8859_14, iso8859_15, iso8859_16, johab, koi8_r, koi8_u, mac_cyrillic, mac_greek, mac_iceland, mac_latin2, mac_roman, mac_turkish, ptcp154, shift_jis, shift_jis_2004, shift_jisx0213, utf_32, utf_32_be, utf_32_le, utf_16, utf_16_be, utf_16_le, utf_7, utf_8, utf_8_sig
        buffer_duration: 1,
        batch_count: 1,
        batch_size: 1,
      },
    ],
  },
  custom_instance_profile_arn: "String",
  custom_json: "String",
  custom_security_group_ids: ["String"],
  packages: ["String"],
  volume_configurations: [
    {
      mount_point: "String", # required
      raid_level: 1,
      number_of_disks: 1, # required
      size: 1, # required
      volume_type: "String",
      iops: 1,
    },
  ],
  enable_auto_healing: false,
  auto_assign_elastic_ips: false,
  auto_assign_public_ips: false,
  custom_recipes: {
    setup: ["String"],
    configure: ["String"],
    deploy: ["String"],
    undeploy: ["String"],
    shutdown: ["String"],
  },
  install_updates_on_boot: false,
  use_ebs_optimized_instances: false,
  lifecycle_event_configuration: {
    shutdown: {
      execution_timeout: 1,
      delay_until_elb_connections_drained: false,
    },
  },
})

Options Hash (options):

  • :layer_id (required, String)

    The layer ID.

  • :name (String)

    The layer name, which is used by the console.

  • :shortname (String)

    For custom layers only, use this parameter to specify the layer\'s short name, which is used internally by AWS OpsWorks Stacks and by Chef. 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 and must be in the following format: /\A[a-z0-9\-\_\.]+\Z/.

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

  • :attributes (Hash<String,String>)

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

  • :cloud_watch_logs_configuration (Types::CloudWatchLogsConfiguration)

    Specifies CloudWatch Logs configuration options for the layer. For more information, see CloudWatchLogsLogStream.

  • :custom_instance_profile_arn (String)

    The ARN of an IAM profile to be used for all of the layer\'s EC2 instances. For more information about IAM ARNs, see Using Identifiers.

  • :custom_json (String)

    A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer\'s instances. For more information, see Using Custom JSON.

  • :custom_security_group_ids (Array<String>)

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

  • :packages (Array<String>)

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

  • :volume_configurations (Array<Types::VolumeConfiguration>)

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

  • :enable_auto_healing (Boolean)

    Whether to disable auto healing for the layer.

  • :auto_assign_elastic_ips (Boolean)

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

  • :auto_assign_public_ips (Boolean)

    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.

  • :custom_recipes (Types::Recipes)

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

  • :install_updates_on_boot (Boolean)

    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.

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

  • :use_ebs_optimized_instances (Boolean)

    Whether to use Amazon EBS-optimized instances.

  • :lifecycle_event_configuration (Types::LifecycleEventConfiguration)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_my_user_profile(options = {}) ⇒ Struct

Updates a user's SSH public key.

Required Permissions: To use this action, an IAM user must have self-management enabled or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

Examples:

Request syntax with placeholder values


resp = client.({
  ssh_public_key: "String",
})

Options Hash (options):

  • :ssh_public_key (String)

    The user\'s SSH public key.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_rds_db_instance(options = {}) ⇒ Struct

Updates an Amazon RDS instance.

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 with placeholder values


resp = client.update_rds_db_instance({
  rds_db_instance_arn: "String", # required
  db_user: "String",
  db_password: "String",
})

Options Hash (options):

  • :rds_db_instance_arn (required, String)

    The Amazon RDS instance\'s ARN.

  • :db_user (String)

    The master user name.

  • :db_password (String)

    The database password.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_stack(options = {}) ⇒ Struct

Updates a specified stack.

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 with placeholder values


resp = client.update_stack({
  stack_id: "String", # required
  name: "String",
  attributes: {
    "Color" => "String",
  },
  service_role_arn: "String",
  default_instance_profile_arn: "String",
  default_os: "String",
  hostname_theme: "String",
  default_availability_zone: "String",
  default_subnet_id: "String",
  custom_json: "String",
  configuration_manager: {
    name: "String",
    version: "String",
  },
  chef_configuration: {
    manage_berkshelf: false,
    berkshelf_version: "String",
  },
  use_custom_cookbooks: false,
  custom_cookbooks_source: {
    type: "git", # accepts git, svn, archive, s3
    url: "String",
    username: "String",
    password: "String",
    ssh_key: "String",
    revision: "String",
  },
  default_ssh_key_name: "String",
  default_root_device_type: "ebs", # accepts ebs, instance-store
  use_opsworks_security_groups: false,
  agent_version: "String",
})

Options Hash (options):

  • :stack_id (required, String)

    The stack ID.

  • :name (String)

    The stack\'s new name.

  • :attributes (Hash<String,String>)

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

  • :service_role_arn (String)

    Do not use this parameter. You cannot update a stack\'s service role.

  • :default_instance_profile_arn (String)

    The ARN of an IAM profile that is the default profile for all of the stack\'s EC2 instances. For more information about IAM ARNs, see Using Identifiers.

  • :default_os (String)

    The stack\'s operating system, which must be set to one of the following:

    • A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2017.03, Amazon Linux 2016.09, Amazon Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03.

    • A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS.

    • CentOS Linux 7

    • Red Hat Enterprise Linux 7

    • A supported Windows operating system, such as Microsoft Windows Server 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft Windows Server 2012 R2 with SQL Server Web.

    • A custom AMI: Custom. You specify the custom AMI you want to use when you create instances. For more information on how to use custom AMIs with OpsWorks, see Using Custom AMIs.

    The default option is the stack\'s current operating system. For more information on the supported operating systems, see AWS OpsWorks Stacks Operating Systems.

  • :hostname_theme (String)

    The stack\'s new host name theme, with spaces replaced by underscores. The theme is used to generate host names for the stack\'s instances. By default, HostnameTheme is set to Layer_Dependent, which creates host names by appending integers to the layer\'s short name. The other themes are:

    • Baked_Goods

    • Clouds

    • Europe_Cities

    • Fruits

    • Greek_Deities

    • Legendary_creatures_from_Japan

    • Planets_and_Moons

    • Roman_Deities

    • Scottish_Islands

    • US_Cities

    • Wild_Cats

    To obtain a generated host name, call GetHostNameSuggestion, which returns a host name based on the current theme.

  • :default_availability_zone (String)

    The stack\'s default Availability Zone, which must be in the stack\'s region. For more information, see Regions and Endpoints. If you also specify a value for DefaultSubnetId, the subnet must be in the same zone. For more information, see CreateStack.

  • :default_subnet_id (String)

    The stack\'s default VPC subnet ID. This parameter is required if you specify a value for the VpcId parameter. All instances are launched into this subnet unless you specify otherwise when you create the instance. If you also specify a value for DefaultAvailabilityZone, the subnet must be in that zone. For information on default values and when this parameter is required, see the VpcId parameter description.

  • :custom_json (String)

    A string that contains user-defined, custom JSON. It can be used to override the corresponding default stack configuration JSON values or to pass data to recipes. The string should be in the following format:

    "{\"key1\": \"value1\", \"key2\": \"value2\",...}"

    For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes.

  • :configuration_manager (Types::StackConfigurationManager)

    The configuration manager. When you update a stack, we recommend that you use the configuration manager to specify the Chef version: 12, 11.10, or 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for Linux stacks is currently 11.4.

  • :chef_configuration (Types::ChefConfiguration)

    A ChefConfiguration object that specifies whether to enable Berkshelf and the Berkshelf version on Chef 11.10 stacks. For more information, see Create a New Stack.

  • :use_custom_cookbooks (Boolean)

    Whether the stack uses custom cookbooks.

  • :custom_cookbooks_source (Types::Source)

    Contains the information required to retrieve an app or cookbook from a repository. For more information, see Creating Apps or Custom Recipes and Cookbooks.

  • :default_ssh_key_name (String)

    A default Amazon EC2 key-pair name. The default value is none. If you specify a key-pair name, AWS OpsWorks Stacks installs the public key on the instance and you can use the private key with an SSH client to log in to the instance. For more information, see Using SSH to Communicate with an Instance and Managing SSH Access. You can override this setting by specifying a different key pair, or no key pair, when you create an instance.

  • :default_root_device_type (String)

    The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.

  • :use_opsworks_security_groups (Boolean)

    Whether to associate the AWS OpsWorks Stacks built-in security groups with the stack\'s layers.

    AWS OpsWorks Stacks provides a standard set of built-in security groups, one for each layer, which are associated with layers by default. UseOpsworksSecurityGroups allows you to provide your own custom security groups instead of using the built-in groups. UseOpsworksSecurityGroups has the following settings:

    • True - AWS OpsWorks Stacks automatically associates the appropriate built-in security group with each layer (default setting). You can associate additional security groups with a layer after you create it, but you cannot delete the built-in security group.

    • False - AWS OpsWorks Stacks does not associate built-in security groups with layers. You must create appropriate EC2 security groups and associate a security group with each layer that you create. However, you can still manually associate a built-in security group with a layer on. Custom security groups are required only for those layers that need custom settings.

    For more information, see Create a New Stack.

  • :agent_version (String)

    The default AWS OpsWorks Stacks agent version. You have the following options:

    • Auto-update - Set this parameter to LATEST. AWS OpsWorks Stacks automatically installs new agent versions on the stack\'s instances as soon as they are available.

    • Fixed version - Set this parameter to your preferred agent version. To update the agent version, you must edit the stack configuration and specify a new version. AWS OpsWorks Stacks then automatically installs that version on the stack\'s instances.

    The default setting is LATEST. To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2.

    You can also specify an agent version when you create or update an instance, which overrides the stack\'s default setting.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_user_profile(options = {}) ⇒ Struct

Updates a specified user profile.

Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

Examples:

Request syntax with placeholder values


resp = client.({
  iam_user_arn: "String", # required
  ssh_username: "String",
  ssh_public_key: "String",
  allow_self_management: false,
})

Options Hash (options):

  • :iam_user_arn (required, String)

    The user IAM ARN. This can also be a federated user\'s ARN.

  • :ssh_username (String)

    The user\'s SSH user name. The allowable characters are [a-z], [A-Z], [0-9], \'-\', and \'_\'. If the specified name includes other punctuation marks, AWS OpsWorks Stacks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, AWS OpsWorks Stacks generates one from the IAM user name.

  • :ssh_public_key (String)

    The user\'s new SSH public key.

  • :allow_self_management (Boolean)

    Whether users can specify their own SSH public key through the My Settings page. For more information, see Managing User Permissions.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_volume(options = {}) ⇒ Struct

Updates an Amazon EBS volume's name or mount point. For more information, see Resource Management.

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 with placeholder values


resp = client.update_volume({
  volume_id: "String", # required
  name: "String",
  mount_point: "String",
})

Options Hash (options):

  • :volume_id (required, String)

    The volume ID.

  • :name (String)

    The new name.

  • :mount_point (String)

    The new mount point.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean

Waiters polls an API operation until a resource enters a desired state.

Basic Usage

Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.

# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:

# poll for ~25 seconds
client.wait_until(...) do |w|
  w.max_attempts = 5
  w.delay = 5
end

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(...) do |w|

  # disable max attempts
  w.max_attempts = nil

  # poll for 1 hour, instead of a number of attempts
  w.before_wait do |attempts, response|
    throw :failure if Time.now - started_at > 3600
  end

end

Handling Errors

When a waiter is successful, it returns true. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Parameters:

  • waiter_name (Symbol)

    The name of the waiter. See #waiter_names for a full list of supported waiters.

  • params (Hash) (defaults to: {})

    Additional request parameters. See the #waiter_names for a list of supported waiters and what request they call. The called request determines the list of accepted parameters.

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:

Waiter NameClient MethodDefault Delay:Default Max Attempts:
:app_exists#describe_apps140
:deployment_successful#describe_deployments1540
:instance_online#describe_instances1540
:instance_registered#describe_instances1540
:instance_stopped#describe_instances1540
:instance_terminated#describe_instances1540

Returns:

  • (Array<Symbol>)

    the list of supported waiters.