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

Class: Aws::OpsWorks::Client

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#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(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



163
164
165
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 163

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 AWS OpsWorks Stacks.

Required Permissions: To use this action, an AWS Identity and Access Management (IAM) user must have a Manage permissions level for the stack or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.

Examples:

Request syntax with placeholder values


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

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:



209
210
211
212
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 209

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:



249
250
251
252
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 249

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:



288
289
290
291
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 288

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. AWS OpsWorks Stacks does not support Application Load Balancer. You can only use Classic Load Balancer with AWS OpsWorks Stacks. For more information, see Elastic Load Balancing.

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

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

Examples:

Request syntax with placeholder values


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

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:



335
336
337
338
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 335

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.

  • :region (String)

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

  • :vpc_id (String)

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

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

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

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

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

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

    • You must specify a value for DefaultSubnetId.

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

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

  • :default_instance_profile_arn (String)

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

  • :default_os (String)

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

    • A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2017.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 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. For more information about supported operating systems, see AWS OpsWorks Stacks Operating Systems.

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

  • :hostname_theme (String)

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

    • Baked_Goods

    • Clouds

    • Europe_Cities

    • Fruits

    • Greek_Deities

    • Legendary_creatures_from_Japan

    • Planets_and_Moons

    • Roman_Deities

    • Scottish_Islands

    • US_Cities

    • Wild_Cats

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

  • :default_availability_zone (String)

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

  • :default_subnet_id (String)

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

  • :custom_json (String)

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

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

    For more information 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 AWS OpsWorks Stacks built-in security groups with the stack's layers.

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

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

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

    For more information, see Create a New Stack.

  • :custom_cookbooks_source (Types::Source)

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

  • :default_ssh_key_name (String)

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

  • :clone_permissions (Boolean)

    Whether to clone the source stack's permissions.

  • :clone_app_ids (Array<String>)

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

  • :default_root_device_type (String)

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

  • :agent_version (String)

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

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

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

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

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

Returns:

See Also:



707
708
709
710
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 707

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. AWS OpsWorks Stacks deploys an application to those instances that are members of the corresponding layer. If your app isn't one of the standard types, or you prefer to implement your own Deploy recipes, specify other.

  • :app_source (Types::Source)

    A Source object that specifies the app repository.

  • :domains (Array<String>)

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

  • :enable_ssl (Boolean)

    Whether to enable SSL for the app.

  • :ssl_configuration (Types::SslConfiguration)

    An SslConfiguration object with the SSL configuration.

  • :attributes (Hash<String,String>)

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

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

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

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

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

Returns:

See Also:



842
843
844
845
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 842

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

Returns:

See Also:



924
925
926
927
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 924

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.

  • :os (String)

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

    • A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2017.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 16.04 LTS, Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS.

    • CentOS Linux 7

    • Red Hat Enterprise Linux 7

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

    • A custom AMI: Custom.

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

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

  • :ami_id (String)

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

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

  • :ssh_key_name (String)

    The instance's Amazon EC2 key-pair name.

  • :availability_zone (String)

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

  • :virtualization_type (String)

    The instance's virtualization type, paravirtual or hvm.

  • :subnet_id (String)

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

  • :architecture (String)

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

  • :root_device_type (String)

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

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

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

  • :install_updates_on_boot (Boolean)

    Whether to install operating system and package updates when the instance boots. The default value is true. To control when updates are installed, set this value to false. You must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

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

  • :ebs_optimized (Boolean)

    Whether to create an Amazon EBS-optimized instance.

  • :agent_version (String)

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

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

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

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

  • :tenancy (String)

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

Returns:

See Also:



1166
1167
1168
1169
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 1166

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.

  • :shortname (required, String)

    For custom layers only, use this parameter to specify the layer's short name, which is used internally by AWS OpsWorks Stacks and by Chef recipes. The short name is also used as the name for the directory where your app files are installed. It can have a maximum of 200 characters, which are limited to the alphanumeric characters, '-', '_', and '.'.

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

  • :attributes (Hash<String,String>)

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

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

  • :cloud_watch_logs_configuration (Types::CloudWatchLogsConfiguration)

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

  • :custom_instance_profile_arn (String)

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

  • :custom_json (String)

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

  • :custom_security_group_ids (Array<String>)

    An array containing the layer custom security group IDs.

  • :packages (Array<String>)

    An array of Package objects that describes the layer packages.

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

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

  • :enable_auto_healing (Boolean)

    Whether to disable auto healing for the layer.

  • :auto_assign_elastic_ips (Boolean)

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

  • :auto_assign_public_ips (Boolean)

    For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances. For more information, see How to Edit a Layer.

  • :custom_recipes (Types::Recipes)

    A LayerCustomRecipes object that specifies the layer custom recipes.

  • :install_updates_on_boot (Boolean)

    Whether to install operating system and package updates when the instance boots. The default value is true. To control when updates are installed, set this value to false. You must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

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

  • :use_ebs_optimized_instances (Boolean)

    Whether to use Amazon EBS-optimized instances.

  • :lifecycle_event_configuration (Types::LifecycleEventConfiguration)

    A LifeCycleEventConfiguration object that you can use to configure the Shutdown event to specify an execution timeout and enable or disable Elastic Load Balancer connection draining.

Returns:

See Also:



1378
1379
1380
1381
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 1378

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.

  • :region (required, String)

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

    In the AWS CLI, this API maps to the --stack-region parameter. If the --stack-region parameter and the AWS 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 AWS 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 AWS, we recommend that you use regional endpoints for new stacks. The AWS CLI common --region parameter always specifies a regional API endpoint; it cannot be used to specify a classic AWS 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, AWS OpsWorks Stacks infers the value of the other parameter. If you specify neither parameter, AWS OpsWorks Stacks sets these parameters to the first valid Availability Zone for the specified region and the corresponding default VPC subnet ID, respectively.

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

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

    • You must specify a value for DefaultSubnetId.

    For more information about how to use AWS 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 AWS Identity and Access Management (IAM) role, which allows AWS OpsWorks Stacks to work with AWS resources on your behalf. You must set this parameter to the Amazon Resource Name (ARN) for an existing IAM role. For more information about IAM ARNs, see Using Identifiers.

  • :default_instance_profile_arn (required, String)

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

  • :default_os (String)

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

    • A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2017.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 16.04 LTS, Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS.

    • CentOS Linux 7

    • Red Hat Enterprise Linux 7

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

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

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

  • :hostname_theme (String)

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

    • Baked_Goods

    • Clouds

    • Europe_Cities

    • Fruits

    • Greek_Deities

    • Legendary_creatures_from_Japan

    • Planets_and_Moons

    • Roman_Deities

    • Scottish_Islands

    • US_Cities

    • Wild_Cats

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

  • :default_availability_zone (String)

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

  • :default_subnet_id (String)

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

  • :custom_json (String)

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

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

    For more information 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 AWS OpsWorks Stacks built-in security groups with the stack's layers.

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

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

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

    For more information, see Create a New Stack.

  • :custom_cookbooks_source (Types::Source)

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

  • :default_ssh_key_name (String)

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

  • :default_root_device_type (String)

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

  • :agent_version (String)

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

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

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

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

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

Returns:

See Also:



1744
1745
1746
1747
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 1744

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, AWS OpsWorks Stacks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, AWS OpsWorks Stacks generates one from the IAM user name.

  • :ssh_public_key (String)

    The user's public SSH key.

  • :allow_self_management (Boolean)

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

Returns:

See Also:



1804
1805
1806
1807
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 1804

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:



1835
1836
1837
1838
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 1835

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:



1878
1879
1880
1881
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 1878

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:



1912
1913
1914
1915
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 1912

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:



1946
1947
1948
1949
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 1946

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:



1977
1978
1979
1980
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 1977

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

Examples:

Request syntax with placeholder values


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

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:



2011
2012
2013
2014
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2011

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 then be registered by another stack. For more information, see Resource Management.

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

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :elastic_ip (required, String)

    The Elastic IP address.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2045
2046
2047
2048
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2045

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

#deregister_instance(params = {}) ⇒ Struct

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

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

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :instance_id (required, String)

    The instance ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2079
2080
2081
2082
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2079

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:



2110
2111
2112
2113
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2110

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 AWS OpsWorks Stacks volume ID, which is the GUID that AWS OpsWorks Stacks assigned to the instance when you registered the volume with the stack, not the Amazon EC2 volume ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2145
2146
2147
2148
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2145

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 AWS OpsWorks Stacks agent versions. You must specify a stack ID or a configuration manager. DescribeAgentVersions returns a list of available agent versions for the specified stack or configuration manager.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

Returns:

See Also:



2186
2187
2188
2189
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2186

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.

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:



2264
2265
2266
2267
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2264

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:



2330
2331
2332
2333
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2330

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.

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:



2400
2401
2402
2403
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2400

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, AWS OpsWorks Stacks currently supports only one cluster per layer, so the result set has a maximum of one element.

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

This call accepts only one resource-identifying parameter.

Examples:

Request syntax with placeholder values


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

Response structure


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

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:



2471
2472
2473
2474
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2471

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:



2534
2535
2536
2537
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2534

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:



2594
2595
2596
2597
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2594

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.

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:



2701
2702
2703
2704
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2701

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:



2814
2815
2816
2817
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2814

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:



2874
2875
2876
2877
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2874

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:



2905
2906
2907
2908
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2905

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



2934
2935
2936
2937
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2934

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:



2985
2986
2987
2988
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 2985

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:



3052
3053
3054
3055
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3052

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:



3106
3107
3108
3109
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3106

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 AWS OpsWorks Stacks service errors.

Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information 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:



3166
3167
3168
3169
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3166

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:



3206
3207
3208
3209
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3206

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:



3270
3271
3272
3273
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3270

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, DescribeStacks returns a description of every stack.

Returns:

See Also:



3340
3341
3342
3343
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3340

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:



3398
3399
3400
3401
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3398

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:



3441
3442
3443
3444
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3441

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:



3515
3516
3517
3518
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3515

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:



3551
3552
3553
3554
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3551

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:



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

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:



3625
3626
3627
3628
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3625

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 AWS OpsWorks Stacks ID.

  • :valid_for_in_minutes (Integer)

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

Returns:

See Also:



3667
3668
3669
3670
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3667

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:



3709
3710
3711
3712
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3709

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:



3742
3743
3744
3745
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3742

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:



3787
3788
3789
3790
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3787

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:



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

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 AWS OpsWorks Stacks with a specified stack.

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

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

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

Examples:

Request syntax with placeholder values


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

Response structure


resp.instance_id #=> String

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

  • :public_ip (String)

    The instance's public IP address.

  • :private_ip (String)

    The instance's private IP address.

  • :rsa_public_key (String)

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

  • :rsa_public_key_fingerprint (String)

    The instances public RSA key fingerprint.

  • :instance_identity (Types::InstanceIdentity)

    An InstanceIdentity object that contains the instance's identity.

Returns:

See Also:



3918
3919
3920
3921
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3918

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:



3961
3962
3963
3964
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 3961

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:



4006
4007
4008
4009
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4006

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, AWS OpsWorks Stacks starts a specified number of instances.

  • :down_scaling (Types::AutoScalingThresholds)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4081
4082
4083
4084
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4081

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:



4148
4149
4150
4151
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4148

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:



4208
4209
4210
4211
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4208

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:



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

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:



4272
4273
4274
4275
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4272

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.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4312
4313
4314
4315
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4312

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:



4343
4344
4345
4346
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4343

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 AWS OpsWorks Stacks. For more information about how tagging works, see Tags in the AWS OpsWorks User Guide.

Examples:

Request syntax with placeholder values


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

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:



4393
4394
4395
4396
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4393

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 AWS OpsWorks Stacks.

Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack or an attached policy that explicitly grants permissions. For more information 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:



4427
4428
4429
4430
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4427

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:



4460
4461
4462
4463
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4460

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:



4486
4487
4488
4489
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4486

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 10 KB (10240 Bytes). This limit should accommodate most if not all use cases. Exceeding it will cause an exception with the message, "Environment: is too large (maximum is 10KB)."

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4604
4605
4606
4607
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4604

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.

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

  • :os (String)

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

    • A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2017.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 16.04 LTS, Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS.

    • CentOS Linux 7

    • Red Hat Enterprise Linux 7

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

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

    The default option is the current Amazon Linux version. If you set this parameter to Custom, you must use the AmiId parameter to specify the custom AMI that you want to use. For more information about supported operating systems, see Operating Systems. 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 AWS OpsWorks Stacks agent version. You have the following options:

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

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

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

    AgentVersion cannot be set to Chef 12.2.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4803
4804
4805
4806
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4803

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.

  • :shortname (String)

    For custom layers only, use this parameter to specify the layer's short name, which is used internally by AWS OpsWorks Stacks and by Chef. The short name is also used as the name for the directory where your app files are installed. It can have a maximum of 200 characters and must be in the following format: /\A[a-z0-9\-\_\.]+\Z/.

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

  • :attributes (Hash<String,String>)

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

  • :cloud_watch_logs_configuration (Types::CloudWatchLogsConfiguration)

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

  • :custom_instance_profile_arn (String)

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

  • :custom_json (String)

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

  • :custom_security_group_ids (Array<String>)

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

  • :packages (Array<String>)

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

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

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

  • :enable_auto_healing (Boolean)

    Whether to disable auto healing for the layer.

  • :auto_assign_elastic_ips (Boolean)

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

  • :auto_assign_public_ips (Boolean)

    For stacks that are running in a VPC, whether to automatically assign a public IP address to the layer's instances. For more information, see How to Edit a Layer.

  • :custom_recipes (Types::Recipes)

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

  • :install_updates_on_boot (Boolean)

    Whether to install operating system and package updates when the instance boots. The default value is true. To control when updates are installed, set this value to false. You must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

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

  • :use_ebs_optimized_instances (Boolean)

    Whether to use Amazon EBS-optimized instances.

  • :lifecycle_event_configuration (Types::LifecycleEventConfiguration)

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4987
4988
4989
4990
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 4987

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:



5018
5019
5020
5021
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 5018

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:



5057
5058
5059
5060
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 5057

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.

  • :attributes (Hash<String,String>)

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

  • :service_role_arn (String)

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

  • :default_instance_profile_arn (String)

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

  • :default_os (String)

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

    • A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2017.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 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. For more information about supported operating systems, see AWS OpsWorks Stacks Operating Systems.

  • :hostname_theme (String)

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

    • Baked_Goods

    • Clouds

    • Europe_Cities

    • Fruits

    • Greek_Deities

    • Legendary_creatures_from_Japan

    • Planets_and_Moons

    • Roman_Deities

    • Scottish_Islands

    • US_Cities

    • Wild_Cats

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

  • :default_availability_zone (String)

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

  • :default_subnet_id (String)

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

  • :custom_json (String)

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

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

    For more information 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 Creating Apps or Custom Recipes and Cookbooks.

  • :default_ssh_key_name (String)

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

  • :default_root_device_type (String)

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

  • :use_opsworks_security_groups (Boolean)

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

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

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

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

    For more information, see Create a New Stack.

  • :agent_version (String)

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

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

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

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

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



5342
5343
5344
5345
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 5342

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, AWS OpsWorks Stacks removes them. For example, my.name will be changed to myname. If you do not specify an SSH user name, AWS OpsWorks Stacks generates one from the IAM user name.

  • :ssh_public_key (String)

    The user's new SSH public key.

  • :allow_self_management (Boolean)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



5396
5397
5398
5399
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 5396

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.

  • :mount_point (String)

    The new mount point.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



5437
5438
5439
5440
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 5437

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.waiter_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You 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.



5552
5553
5554
5555
5556
# File 'gems/aws-sdk-opsworks/lib/aws-sdk-opsworks/client.rb', line 5552

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