Class: Aws::OpsWorks::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb

Overview

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

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

For details on configuring region and credentials see the developer guide.

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []]

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, :session_token, and :account_id options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentials or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :account_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :disable_request_compression (Boolean) — default: false

    When set to 'true' the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP)

    Normally you should not configure the :endpoint option directly. This is normally constructed from the :region option. Configuring :endpoint is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :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, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array)

    A list of regions that should be signed with SigV4a signing. When not passed, a default :sigv4a_signing_region_set is searched for in the following locations:

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disables response data type conversions. The request parameters hash must be formatted exactly as the API expects.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.

  • :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.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses NoOpTelemetryProvider which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the opentelemetry-sdk gem and then, pass in an instance of a Aws::Telemetry::OTelProvider for telemetry provider.
  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

    • Aws::SSOTokenProvider - Used for loading tokens from AWS SSO using an access token generated from aws login.

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::OpsWorks::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::OpsWorks::EndpointParameters.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_open_timeout (Float) — default: 15

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :on_chunk_received (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a content-length).

  • :on_chunk_sent (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate)

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.



451
452
453
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 451

def initialize(*args)
  super
end

Instance Method Details

#assign_instance(params = {}) ⇒ 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 OpsWorks Stacks.

Required Permissions: To use this action, an 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :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:



497
498
499
500
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 497

def assign_instance(params = {}, options = {})
  req = build_request(:assign_instance, params)
  req.send_request(options)
end

#assign_volume(params = {}) ⇒ 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",
})

Parameters:

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

    ({})

Options Hash (params):

  • :volume_id (required, String)

    The volume ID.

  • :instance_id (String)

    The instance ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



537
538
539
540
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 537

def assign_volume(params = {}, options = {})
  req = build_request(:assign_volume, params)
  req.send_request(options)
end

#associate_elastic_ip(params = {}) ⇒ 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",
})

Parameters:

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

    ({})

Options Hash (params):

  • :elastic_ip (required, String)

    The Elastic IP address.

  • :instance_id (String)

    The instance ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



576
577
578
579
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 576

def associate_elastic_ip(params = {}, options = {})
  req = build_request(:associate_elastic_ip, params)
  req.send_request(options)
end

#attach_elastic_load_balancer(params = {}) ⇒ Struct

Attaches an Elastic Load Balancing load balancer to a specified layer. OpsWorks Stacks does not support Application Load Balancer. You can only use Classic Load Balancer with 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 the 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :elastic_load_balancer_name (required, String)

    The Elastic Load Balancing instance's name.

  • :layer_id (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



623
624
625
626
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 623

def attach_elastic_load_balancer(params = {}, options = {})
  req = build_request(:attach_elastic_load_balancer, params)
  req.send_request(options)
end

#clone_stack(params = {}) ⇒ 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 about 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

Parameters:

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

    ({})

Options Hash (params):

  • :source_stack_id (required, String)

    The source stack ID.

  • :name (String)

    The cloned stack name. Stack names can be a maximum of 64 characters.

  • :region (String)

    The cloned stack Amazon Web Services Region, such as ap-northeast-2. For more information about Amazon Web Services 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, OpsWorks Stacks infers the value of the other parameter. If you specify neither parameter, 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 about how to use OpsWorks Stacks with a VPC, see Running a Stack in a VPC. For more information about 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 Identity and Access Management (IAM) role, which allows OpsWorks Stacks to work with Amazon Web Services 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 OpsWorkss 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 2, Amazon Linux 2018.03, Amazon Linux 2017.09, 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 18.04 LTS, 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 about how to use custom AMIs with OpsWorks, see Using Custom AMIs.

    The default option is the parent stack's operating system. Not all operating systems are supported with all versions of Chef. For more information about supported operating systems, see 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_and_Titans

    • 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 about 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 OpsWorks Stacks built-in security groups with the stack's layers.

    OpsWorks Stacks provides a standard set of 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 - 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 - OpsWorks Stacks does not associate built-in security groups with layers. You must create appropriate 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 Adding Apps or Cookbooks and Recipes.

  • :default_ssh_key_name (String)

    A default Amazon EC2 key pair name. The default value is none. If you specify a key pair name, 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 OpsWorks Stacks agent version. You have the following options:

    • Auto-update - Set this parameter to LATEST. 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. OpsWorks Stacks 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:



996
997
998
999
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 996

def clone_stack(params = {}, options = {})
  req = build_request(:clone_stack, params)
  req.send_request(options)
end

#create_app(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :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. 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 20 KB. 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 20KB)."

    If you have specified one or more environment variables, you cannot modify the stack's Chef version.

Returns:

See Also:



1130
1131
1132
1133
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 1130

def create_app(params = {}, options = {})
  req = build_request(:create_app, params)
  req.send_request(options)
end

#create_deployment(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :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. You can use this parameter to override some corresponding default stack configuration JSON values. The string should be in the following format:

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

    For more information about custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes and Overriding Attributes With Custom JSON.

Returns:

See Also:



1214
1215
1216
1217
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 1214

def create_deployment(params = {}, options = {})
  req = build_request(:create_deployment, params)
  req.send_request(options)
end

#create_instance(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :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. The following are character limits for instance host names.

    • Linux-based instances: 63 characters

    • Windows-based instances: 15 characters

  • :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 2, Amazon Linux 2018.03, Amazon Linux 2017.09, 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 18.04 LTS, 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.

    Not all operating systems are supported with all versions of Chef. For more information about the supported operating systems, see 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 about how to use custom AMIs with 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 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 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. OpsWorks Stacks 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:



1460
1461
1462
1463
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 1460

def create_instance(params = {}, options = {})
  req = build_request(:create_instance, params)
  req.send_request(options)
end

#create_layer(params = {}) ⇒ 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,
      encrypted: false,
    },
  ],
  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

Parameters:

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

    ({})

Options Hash (params):

  • :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. Layer names can be a maximum of 32 characters.

  • :shortname (required, String)

    For custom layers only, use this parameter to specify the layer's short name, which is used internally by 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 32 characters, which are limited to the alphanumeric characters, '-', '_', and '.'.

    Built-in layer short names are defined by 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 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:



1673
1674
1675
1676
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 1673

def create_layer(params = {}, options = {})
  req = build_request(:create_layer, params)
  req.send_request(options)
end

#create_stack(params = {}) ⇒ 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 about 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

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The stack name. Stack names can be a maximum of 64 characters.

  • :region (required, String)

    The stack's Amazon Web Services Region, such as ap-south-1. For more information about Amazon Web Services Regions, see Regions and Endpoints.

    In the CLI, this API maps to the --stack-region parameter. If the --stack-region parameter and the CLI common parameter --region are set to the same value, the stack uses a regional endpoint. If the --stack-region parameter is not set, but the CLI --region parameter is, this also results in a stack with a regional endpoint. However, if the --region parameter is set to us-east-1, and the --stack-region parameter is set to one of the following, then the stack uses a legacy or classic region: us-west-1, us-west-2, sa-east-1, eu-central-1, eu-west-1, ap-northeast-1, ap-southeast-1, ap-southeast-2. In this case, the actual API endpoint of the stack is in us-east-1. Only the preceding regions are supported as classic regions in the us-east-1 API endpoint. Because it is a best practice to choose the regional endpoint that is closest to where you manage Amazon Web Services, we recommend that you use regional endpoints for new stacks. The CLI common --region parameter always specifies a regional API endpoint; it cannot be used to specify a classic OpsWorks Stacks region.

  • :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, OpsWorks Stacks infers the value of the other parameter. If you specify neither parameter, 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 about how to use OpsWorks Stacks with a VPC, see Running a Stack in a VPC. For more information about 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 IAM role, which allows OpsWorks Stacks to work with Amazon Web Services 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 2, Amazon Linux 2018.03, Amazon Linux 2017.09, 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 18.04 LTS, 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. Not all operating systems are supported with all versions of Chef. For more information about supported operating systems, see 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_and_Titans

    • 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 about 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 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 the stack uses custom cookbooks.

  • :use_opsworks_security_groups (Boolean)

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

    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 - 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 - 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 Adding Apps or Cookbooks and Recipes.

  • :default_ssh_key_name (String)

    A default Amazon EC2 key pair name. The default value is none. If you specify a key pair name, 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 OpsWorks Stacks agent version. You have the following options:

    • Auto-update - Set this parameter to LATEST. 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. OpsWorks Stacks 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:



2040
2041
2042
2043
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2040

def create_stack(params = {}, options = {})
  req = build_request(:create_stack, params)
  req.send_request(options)
end

#create_user_profile(params = {}) ⇒ 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 about 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

Parameters:

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

    ({})

Options Hash (params):

  • :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, OpsWorks Stacks removes them. For example, my.name is changed to myname. If you do not specify an SSH user name, 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:



2099
2100
2101
2102
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2099

def (params = {}, options = {})
  req = build_request(:create_user_profile, params)
  req.send_request(options)
end

#delete_app(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :app_id (required, String)

    The app ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2130
2131
2132
2133
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2130

def delete_app(params = {}, options = {})
  req = build_request(:delete_app, params)
  req.send_request(options)
end

#delete_instance(params = {}) ⇒ 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,
})

Parameters:

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

    ({})

Options Hash (params):

  • :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:



2173
2174
2175
2176
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2173

def delete_instance(params = {}, options = {})
  req = build_request(:delete_instance, params)
  req.send_request(options)
end

#delete_layer(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :layer_id (required, String)

    The layer ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2207
2208
2209
2210
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2207

def delete_layer(params = {}, options = {})
  req = build_request(:delete_layer, params)
  req.send_request(options)
end

#delete_stack(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :stack_id (required, String)

    The stack ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2241
2242
2243
2244
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2241

def delete_stack(params = {}, options = {})
  req = build_request(:delete_stack, params)
  req.send_request(options)
end

#delete_user_profile(params = {}) ⇒ 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 about user permissions, see Managing User Permissions.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



2272
2273
2274
2275
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2272

def (params = {}, options = {})
  req = build_request(:delete_user_profile, params)
  req.send_request(options)
end

#deregister_ecs_cluster(params = {}) ⇒ 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 https://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
})

Parameters:

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

    ({})

Options Hash (params):

  • :ecs_cluster_arn (required, String)

    The cluster's Amazon Resource Number (ARN).

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2306
2307
2308
2309
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2306

def deregister_ecs_cluster(params = {}, options = {})
  req = build_request(:deregister_ecs_cluster, params)
  req.send_request(options)
end

#deregister_elastic_ip(params = {}) ⇒ Struct

Deregisters a specified Elastic IP address. The address can be registered by another stack after it is deregistered. 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :elastic_ip (required, String)

    The Elastic IP address.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2340
2341
2342
2343
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2340

def deregister_elastic_ip(params = {}, options = {})
  req = build_request(:deregister_elastic_ip, params)
  req.send_request(options)
end

#deregister_instance(params = {}) ⇒ Struct

Deregister an instance from OpsWorks Stacks. The instance can be a registered instance (Amazon EC2 or on-premises) or an instance created with OpsWorks. This action removes the instance from the stack and returns it to your control.

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
})

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The instance ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2374
2375
2376
2377
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2374

def deregister_instance(params = {}, options = {})
  req = build_request(:deregister_instance, params)
  req.send_request(options)
end

#deregister_rds_db_instance(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :rds_db_instance_arn (required, String)

    The Amazon RDS instance's ARN.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2405
2406
2407
2408
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2405

def deregister_rds_db_instance(params = {}, options = {})
  req = build_request(:deregister_rds_db_instance, params)
  req.send_request(options)
end

#deregister_volume(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :volume_id (required, String)

    The OpsWorks Stacks volume ID, which is the GUID that 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:



2440
2441
2442
2443
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2440

def deregister_volume(params = {}, options = {})
  req = build_request(:deregister_volume, params)
  req.send_request(options)
end

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

Describes the available 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

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



2481
2482
2483
2484
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2481

def describe_agent_versions(params = {}, options = {})
  req = build_request(:describe_agent_versions, params)
  req.send_request(options)
end

#describe_apps(params = {}) ⇒ 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 about user permissions, see Managing User Permissions.

The following waiters are defined for this operation (see #wait_until for detailed usage):

  • app_exists

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 #=> Boolean
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 #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :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:



2564
2565
2566
2567
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2564

def describe_apps(params = {}, options = {})
  req = build_request(:describe_apps, params)
  req.send_request(options)
end

#describe_commands(params = {}) ⇒ 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 about 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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



2630
2631
2632
2633
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2630

def describe_commands(params = {}, options = {})
  req = build_request(:describe_commands, params)
  req.send_request(options)
end

#describe_deployments(params = {}) ⇒ 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 about user permissions, see Managing User Permissions.

The following waiters are defined for this operation (see #wait_until for detailed usage):

  • deployment_successful

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

Parameters:

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

    ({})

Options Hash (params):

  • :stack_id (String)

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

  • :app_id (String)

    The app ID. If you include this parameter, the command 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, the command returns a description of the specified deployments. Otherwise, it returns a description of every deployment.

Returns:

See Also:



2705
2706
2707
2708
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2705

def describe_deployments(params = {}, options = {})
  req = build_request(:describe_deployments, params)
  req.send_request(options)
end

#describe_ecs_clusters(params = {}) ⇒ 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, 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 about user permissions, see Managing User Permissions.

This call accepts only one resource-identifying parameter.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



2778
2779
2780
2781
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2778

def describe_ecs_clusters(params = {}, options = {})
  req = build_request(:describe_ecs_clusters, params)
  req.send_request(options)
end

#describe_elastic_ips(params = {}) ⇒ 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 about 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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



2841
2842
2843
2844
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2841

def describe_elastic_ips(params = {}, options = {})
  req = build_request(:describe_elastic_ips, params)
  req.send_request(options)
end

#describe_elastic_load_balancers(params = {}) ⇒ 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 about 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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



2901
2902
2903
2904
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2901

def describe_elastic_load_balancers(params = {}, options = {})
  req = build_request(:describe_elastic_load_balancers, params)
  req.send_request(options)
end

#describe_instances(params = {}) ⇒ 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 about user permissions, see Managing User Permissions.

The following waiters are defined for this operation (see #wait_until for detailed usage):

  • instance_online
  • instance_registered
  • instance_stopped
  • instance_terminated

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 #=> Boolean
resp.instances[0].created_at #=> String
resp.instances[0].ebs_optimized #=> Boolean
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 #=> Boolean
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"

Parameters:

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

    ({})

Options Hash (params):

  • :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:



3016
3017
3018
3019
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3016

def describe_instances(params = {}, options = {})
  req = build_request(:describe_instances, params)
  req.send_request(options)
end

#describe_layers(params = {}) ⇒ 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 about 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 #=> Boolean
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].volume_configurations[0].encrypted #=> Boolean
resp.layers[0].enable_auto_healing #=> Boolean
resp.layers[0].auto_assign_elastic_ips #=> Boolean
resp.layers[0].auto_assign_public_ips #=> Boolean
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 #=> Boolean
resp.layers[0].use_ebs_optimized_instances #=> Boolean
resp.layers[0].lifecycle_event_configuration.shutdown.execution_timeout #=> Integer
resp.layers[0].lifecycle_event_configuration.shutdown.delay_until_elb_connections_drained #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :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:



3129
3130
3131
3132
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3129

def describe_layers(params = {}, options = {})
  req = build_request(:describe_layers, params)
  req.send_request(options)
end

#describe_load_based_auto_scaling(params = {}) ⇒ 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 about 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 #=> Boolean
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

Parameters:

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

    ({})

Options Hash (params):

  • :layer_ids (required, Array<String>)

    An array of layer IDs.

Returns:

See Also:



3189
3190
3191
3192
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3189

def describe_load_based_auto_scaling(params = {}, options = {})
  req = build_request(:describe_load_based_auto_scaling, params)
  req.send_request(options)
end

#describe_my_user_profile(params = {}) ⇒ 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 about user permissions, see Managing User Permissions.

Examples:

Response structure


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

Parameters:

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

    ({})

Returns:

See Also:



3220
3221
3222
3223
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3220

def (params = {}, options = {})
  req = build_request(:describe_my_user_profile, params)
  req.send_request(options)
end

#describe_operating_systems(params = {}) ⇒ Types::DescribeOperatingSystemsResponse

Describes the operating systems that are supported by OpsWorks Stacks.

Examples:

Response structure


resp.operating_systems #=> Array
resp.operating_systems[0].name #=> String
resp.operating_systems[0].id #=> String
resp.operating_systems[0].type #=> String
resp.operating_systems[0].configuration_managers #=> Array
resp.operating_systems[0].configuration_managers[0].name #=> String
resp.operating_systems[0].configuration_managers[0].version #=> String
resp.operating_systems[0].reported_name #=> String
resp.operating_systems[0].reported_version #=> String
resp.operating_systems[0].supported #=> Boolean

Parameters:

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

    ({})

Returns:

See Also:



3248
3249
3250
3251
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3248

def describe_operating_systems(params = {}, options = {})
  req = build_request(:describe_operating_systems, params)
  req.send_request(options)
end

#describe_permissions(params = {}) ⇒ 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 #=> Boolean
resp.permissions[0].allow_sudo #=> Boolean
resp.permissions[0].level #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :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:



3299
3300
3301
3302
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3299

def describe_permissions(params = {}, options = {})
  req = build_request(:describe_permissions, params)
  req.send_request(options)
end

#describe_raid_arrays(params = {}) ⇒ 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 about 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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



3366
3367
3368
3369
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3366

def describe_raid_arrays(params = {}, options = {})
  req = build_request(:describe_raid_arrays, params)
  req.send_request(options)
end

#describe_rds_db_instances(params = {}) ⇒ 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 about 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 #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :stack_id (required, String)

    The ID of the stack with which the instances are registered. 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:



3420
3421
3422
3423
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3420

def describe_rds_db_instances(params = {}, options = {})
  req = build_request(:describe_rds_db_instances, params)
  req.send_request(options)
end

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

Describes 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 about 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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



3480
3481
3482
3483
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3480

def describe_service_errors(params = {}, options = {})
  req = build_request(:describe_service_errors, params)
  req.send_request(options)
end

#describe_stack_provisioning_parameters(params = {}) ⇒ 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 about 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

Parameters:

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

    ({})

Options Hash (params):

  • :stack_id (required, String)

    The stack ID.

Returns:

See Also:



3520
3521
3522
3523
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3520

def describe_stack_provisioning_parameters(params = {}, options = {})
  req = build_request(:describe_stack_provisioning_parameters, params)
  req.send_request(options)
end

#describe_stack_summary(params = {}) ⇒ 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 about 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.stop_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

Parameters:

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

    ({})

Options Hash (params):

  • :stack_id (required, String)

    The stack ID.

Returns:

See Also:



3584
3585
3586
3587
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3584

def describe_stack_summary(params = {}, options = {})
  req = build_request(:describe_stack_summary, params)
  req.send_request(options)
end

#describe_stacks(params = {}) ⇒ 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 about 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 #=> Boolean
resp.stacks[0].chef_configuration.berkshelf_version #=> String
resp.stacks[0].use_custom_cookbooks #=> Boolean
resp.stacks[0].use_opsworks_security_groups #=> Boolean
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

Parameters:

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

    ({})

Options Hash (params):

  • :stack_ids (Array<String>)

    An array of stack IDs that specify the stacks to be described. If you omit this parameter, and have permissions to get information about all stacks, DescribeStacks returns a description of every stack. If the IAM policy that is attached to an IAM user limits the DescribeStacks action to specific stack ARNs, this parameter is required, and the user must specify a stack ARN that is allowed by the policy. Otherwise, DescribeStacks returns an AccessDenied error.

Returns:

See Also:



3658
3659
3660
3661
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3658

def describe_stacks(params = {}, options = {})
  req = build_request(:describe_stacks, params)
  req.send_request(options)
end

#describe_time_based_auto_scaling(params = {}) ⇒ 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 about 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

Parameters:

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

    ({})

Options Hash (params):

  • :instance_ids (required, Array<String>)

    An array of instance IDs.

Returns:

See Also:



3716
3717
3718
3719
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3716

def describe_time_based_auto_scaling(params = {}, options = {})
  req = build_request(:describe_time_based_auto_scaling, params)
  req.send_request(options)
end

#describe_user_profiles(params = {}) ⇒ 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 about 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 #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :iam_user_arns (Array<String>)

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

Returns:

See Also:



3759
3760
3761
3762
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3759

def describe_user_profiles(params = {}, options = {})
  req = build_request(:describe_user_profiles, params)
  req.send_request(options)
end

#describe_volumes(params = {}) ⇒ 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 about 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
resp.volumes[0].encrypted #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :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:



3833
3834
3835
3836
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3833

def describe_volumes(params = {}, options = {})
  req = build_request(:describe_volumes, params)
  req.send_request(options)
end

#detach_elastic_load_balancer(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :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:



3869
3870
3871
3872
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3869

def detach_elastic_load_balancer(params = {}, options = {})
  req = build_request(:detach_elastic_load_balancer, params)
  req.send_request(options)
end

#disassociate_elastic_ip(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :elastic_ip (required, String)

    The Elastic IP address.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3903
3904
3905
3906
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3903

def disassociate_elastic_ip(params = {}, options = {})
  req = build_request(:disassociate_elastic_ip, params)
  req.send_request(options)
end

#get_hostname_suggestion(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :layer_id (required, String)

    The layer ID.

Returns:

See Also:



3943
3944
3945
3946
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3943

def get_hostname_suggestion(params = {}, options = {})
  req = build_request(:get_hostname_suggestion, params)
  req.send_request(options)
end

#grant_access(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The instance's 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, they are logged out.

Returns:

See Also:



3985
3986
3987
3988
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3985

def grant_access(params = {}, options = {})
  req = build_request(:grant_access, params)
  req.send_request(options)
end

#list_tags(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



4027
4028
4029
4030
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4027

def list_tags(params = {}, options = {})
  req = build_request(:list_tags, params)
  req.send_request(options)
end

#reboot_instance(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The instance ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4060
4061
4062
4063
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4060

def reboot_instance(params = {}, options = {})
  req = build_request(:reboot_instance, params)
  req.send_request(options)
end

#register_ecs_cluster(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :ecs_cluster_arn (required, String)

    The cluster's ARN.

  • :stack_id (required, String)

    The stack ID.

Returns:

See Also:



4105
4106
4107
4108
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4105

def register_ecs_cluster(params = {}, options = {})
  req = build_request(:register_ecs_cluster, params)
  req.send_request(options)
end

#register_elastic_ip(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :elastic_ip (required, String)

    The Elastic IP address.

  • :stack_id (required, String)

    The stack ID.

Returns:

See Also:



4151
4152
4153
4154
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4151

def register_elastic_ip(params = {}, options = {})
  req = build_request(:register_elastic_ip, params)
  req.send_request(options)
end

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

Registers instances that were created outside of 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 OpsWorks Stacks agent on the instance, and registering the instance with the stack. RegisterInstance handles only the second step. You should instead use the CLI register command, which performs the entire registration operation. For more information, see Registering an Instance with an 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

Parameters:

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

    ({})

Options Hash (params):

  • :stack_id (required, String)

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

  • :hostname (String)

    The instance's host name. The following are character limits for instance host names.

    • Linux-based instances: 63 characters

    • Windows-based instances: 15 characters

  • :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:



4241
4242
4243
4244
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4241

def register_instance(params = {}, options = {})
  req = build_request(:register_instance, params)
  req.send_request(options)
end

#register_rds_db_instance(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :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:



4284
4285
4286
4287
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4284

def register_rds_db_instance(params = {}, options = {})
  req = build_request(:register_rds_db_instance, params)
  req.send_request(options)
end

#register_volume(params = {}) ⇒ 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

Parameters:

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

    ({})

Options Hash (params):

  • :ec2_volume_id (String)

    The Amazon EBS volume ID.

  • :stack_id (required, String)

    The stack ID.

Returns:

See Also:



4329
4330
4331
4332
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4329

def register_volume(params = {}, options = {})
  req = build_request(:register_volume, params)
  req.send_request(options)
end

#set_load_based_auto_scaling(params = {}) ⇒ 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"],
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :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, 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, OpsWorks Stacks stops a specified number of instances.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4404
4405
4406
4407
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4404

def set_load_based_auto_scaling(params = {}, options = {})
  req = build_request(:set_load_based_auto_scaling, params)
  req.send_request(options)
end

#set_permission(params = {}) ⇒ 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",
})

Parameters:

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

    ({})

Options Hash (params):

  • :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 about the permissions associated with these levels, see Managing User Permissions.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4471
4472
4473
4474
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4471

def set_permission(params = {}, options = {})
  req = build_request(:set_permission, params)
  req.send_request(options)
end

#set_time_based_auto_scaling(params = {}) ⇒ 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",
    },
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :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:



4531
4532
4533
4534
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4531

def set_time_based_auto_scaling(params = {}, options = {})
  req = build_request(:set_time_based_auto_scaling, params)
  req.send_request(options)
end

#start_instance(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The instance ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4564
4565
4566
4567
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4564

def start_instance(params = {}, options = {})
  req = build_request(:start_instance, params)
  req.send_request(options)
end

#start_stack(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :stack_id (required, String)

    The stack ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4595
4596
4597
4598
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4595

def start_stack(params = {}, options = {})
  req = build_request(:start_stack, params)
  req.send_request(options)
end

#stop_instance(params = {}) ⇒ 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
  force: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The instance ID.

  • :force (Boolean)

    Specifies whether to force an instance to stop. If the instance's root device type is ebs, or EBS-backed, adding the Force parameter to the StopInstances API call disassociates the OpsWorks Stacks instance from EC2, and forces deletion of only the OpsWorks Stacks instance. You must also delete the formerly-associated instance in EC2 after troubleshooting and replacing the OpsWorks Stacks instance with a new one.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4641
4642
4643
4644
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4641

def stop_instance(params = {}, options = {})
  req = build_request(:stop_instance, params)
  req.send_request(options)
end

#stop_stack(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :stack_id (required, String)

    The stack ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4672
4673
4674
4675
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4672

def stop_stack(params = {}, options = {})
  req = build_request(:stop_stack, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :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:



4722
4723
4724
4725
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4722

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#unassign_instance(params = {}) ⇒ Struct

Unassigns a registered instance from all layers that are using the instance. 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 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 about user permissions, see Managing User Permissions.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The instance ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4756
4757
4758
4759
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4756

def unassign_instance(params = {}, options = {})
  req = build_request(:unassign_instance, params)
  req.send_request(options)
end

#unassign_volume(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :volume_id (required, String)

    The volume ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4789
4790
4791
4792
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4789

def unassign_volume(params = {}, options = {})
  req = build_request(:unassign_volume, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ 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
})

Parameters:

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

    ({})

Options Hash (params):

  • :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:



4815
4816
4817
4818
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4815

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

#update_app(params = {}) ⇒ 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,
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :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 20 KB. 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 20 KB)."

    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:



4932
4933
4934
4935
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4932

def update_app(params = {}, options = {})
  req = build_request(:update_app, params)
  req.send_request(options)
end

#update_elastic_ip(params = {}) ⇒ 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",
})

Parameters:

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

    ({})

Options Hash (params):

  • :elastic_ip (required, String)

    The IP address for which you want to update the name.

  • :name (String)

    The new name, which can be a maximum of 32 characters.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4969
4970
4971
4972
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4969

def update_elastic_ip(params = {}, options = {})
  req = build_request(:update_elastic_ip, params)
  req.send_request(options)
end

#update_instance(params = {}) ⇒ 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",
})

Parameters:

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

    ({})

Options Hash (params):

  • :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. The following are character limits for instance host names.

    • Linux-based instances: 63 characters

    • Windows-based instances: 15 characters

  • :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 2, Amazon Linux 2018.03, Amazon Linux 2017.09, 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 18.04 LTS, 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.

    Not all operating systems are supported with all versions of Chef. For more information about supported operating systems, see 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 about 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 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. OpsWorks Stacks 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:



5135
5136
5137
5138
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 5135

def update_instance(params = {}, options = {})
  req = build_request(:update_instance, params)
  req.send_request(options)
end

#update_layer(params = {}) ⇒ 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,
      encrypted: false,
    },
  ],
  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,
    },
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :layer_id (required, String)

    The layer ID.

  • :name (String)

    The layer name, which is used by the console. Layer names can be a maximum of 32 characters.

  • :shortname (String)

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

    Built-in layer short names are defined by OpsWorks Stacks. For more information, see the Layer reference in the OpsWorks User Guide.

  • :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:



5320
5321
5322
5323
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 5320

def update_layer(params = {}, options = {})
  req = build_request(:update_layer, params)
  req.send_request(options)
end

#update_my_user_profile(params = {}) ⇒ 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 about user permissions, see Managing User Permissions.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :ssh_public_key (String)

    The user's SSH public key.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



5351
5352
5353
5354
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 5351

def (params = {}, options = {})
  req = build_request(:update_my_user_profile, params)
  req.send_request(options)
end

#update_rds_db_instance(params = {}) ⇒ 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",
})

Parameters:

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

    ({})

Options Hash (params):

  • :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:



5390
5391
5392
5393
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 5390

def update_rds_db_instance(params = {}, options = {})
  req = build_request(:update_rds_db_instance, params)
  req.send_request(options)
end

#update_stack(params = {}) ⇒ 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",
})

Parameters:

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

    ({})

Options Hash (params):

  • :stack_id (required, String)

    The stack ID.

  • :name (String)

    The stack's new name. Stack names can be a maximum of 64 characters.

  • :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 2, Amazon Linux 2018.03, Amazon Linux 2017.09, 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 18.04 LTS, 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 about how to use custom AMIs with OpsWorks, see Using Custom AMIs.

    The default option is the stack's current operating system. Not all operating systems are supported with all versions of Chef. For more information about supported operating systems, see 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_and_Titans

    • 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 about 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 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 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 Adding Apps or Cookbooks and Recipes.

  • :default_ssh_key_name (String)

    A default Amazon EC2 key-pair name. The default value is none. If you specify a key-pair name, 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 OpsWorks Stacks built-in security groups with the stack's layers.

    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 - 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 - 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 OpsWorks Stacks agent version. You have the following options:

    • Auto-update - Set this parameter to LATEST. 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. OpsWorks Stacks 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:



5676
5677
5678
5679
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 5676

def update_stack(params = {}, options = {})
  req = build_request(:update_stack, params)
  req.send_request(options)
end

#update_user_profile(params = {}) ⇒ 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 about 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,
})

Parameters:

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

    ({})

Options Hash (params):

  • :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, OpsWorks Stacks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, 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:



5729
5730
5731
5732
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 5729

def (params = {}, options = {})
  req = build_request(:update_user_profile, params)
  req.send_request(options)
end

#update_volume(params = {}) ⇒ 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",
})

Parameters:

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

    ({})

Options Hash (params):

  • :volume_id (required, String)

    The volume ID.

  • :name (String)

    The new name. Volume names can be a maximum of 128 characters.

  • :mount_point (String)

    The new mount point.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



5770
5771
5772
5773
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 5770

def update_volume(params = {}, options = {})
  req = build_request(:update_volume, params)
  req.send_request(options)
end

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

Polls an API operation until a resource enters a desired state.

Basic Usage

A waiter will call an API operation until:

  • It is successful
  • It enters a terminal state
  • It makes the maximum number of attempts

In between attempts, the waiter will sleep.

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

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.

# poll for ~25 seconds
client.wait_until(waiter_name, params, {
  max_attempts: 5,
  delay: 5,
})

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(waiter_name, params, {

  # disable max attempts
  max_attempts: nil,

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

Handling Errors

When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.

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

Valid Waiters

The following table lists the valid waiter names, the operations they call, and the default :delay and :max_attempts values.

waiter_name params :delay :max_attempts
app_exists #describe_apps 1 40
deployment_successful #describe_deployments 15 40
instance_online #describe_instances 15 40
instance_registered #describe_instances 15 40
instance_stopped #describe_instances 15 40
instance_terminated #describe_instances 15 40

Parameters:

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

    ({})

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

    ({})

Options Hash (options):

  • :max_attempts (Integer)
  • :delay (Integer)
  • :before_attempt (Proc)
  • :before_wait (Proc)

Yields:

  • (w.waiter)

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.



5890
5891
5892
5893
5894
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 5890

def wait_until(waiter_name, params = {}, options = {})
  w = waiter(waiter_name, options)
  yield(w.waiter) if block_given? # deprecated
  w.wait(params)
end