You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::OpsWorks::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::OpsWorks::Client
- Defined in:
- (unknown)
Overview
An API client for AWS OpsWorks. To construct a client, you need to configure a :region
and :credentials
.
opsworks = Aws::OpsWorks::Client.new(
region: region_name,
credentials: credentials,
# ...
)
See #initialize for a full list of supported configuration options.
Region
You can configure a default region in the following locations:
ENV['AWS_REGION']
Aws.config[:region]
Go here for a list of supported regions.
Credentials
Default credentials are loaded automatically from the following locations:
ENV['AWS_ACCESS_KEY_ID']
andENV['AWS_SECRET_ACCESS_KEY']
Aws.config[:credentials]
- The shared credentials ini file at
~/.aws/credentials
(more information) - From an instance profile when running on EC2
You can also construct a credentials object from one of the following classes:
Alternatively, you configure credentials with :access_key_id
and
:secret_access_key
:
# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))
Aws::OpsWorks::Client.new(
access_key_id: creds['access_key_id'],
secret_access_key: creds['secret_access_key']
)
Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
Constructor collapse
-
#initialize(options = {}) ⇒ Aws::OpsWorks::Client
constructor
Constructs an API client.
API Operations collapse
-
#assign_instance(options = {}) ⇒ Struct
Assign a registered instance to a layer.
-
You can assign registered on-premises instances to any layer type.
-
You can assign registered Amazon EC2 instances only to custom layers.
-
You cannot use this action with instances that were created with AWS OpsWorks Stacks.
Required Permissions: To use this action, an AWS Identity and Access Management (IAM) user must have a Manage permissions level for the stack or an attached policy that explicitly grants permissions.
-
-
#assign_volume(options = {}) ⇒ Struct
Assigns one of the stack's registered Amazon EBS volumes to a specified instance.
-
#associate_elastic_ip(options = {}) ⇒ Struct
Associates one of the stack's registered Elastic IP addresses with a specified instance.
-
#attach_elastic_load_balancer(options = {}) ⇒ Struct
Attaches an Elastic Load Balancing load balancer to a specified layer.
-
#clone_stack(options = {}) ⇒ Types::CloneStackResult
Creates a clone of a specified stack.
-
#create_app(options = {}) ⇒ Types::CreateAppResult
Creates an app for a specified stack.
-
#create_deployment(options = {}) ⇒ Types::CreateDeploymentResult
Runs deployment or stack commands.
-
#create_instance(options = {}) ⇒ Types::CreateInstanceResult
Creates an instance in a specified stack.
-
#create_layer(options = {}) ⇒ Types::CreateLayerResult
Creates a layer.
-
#create_stack(options = {}) ⇒ Types::CreateStackResult
Creates a new stack.
-
#create_user_profile(options = {}) ⇒ Types::CreateUserProfileResult
Creates a new user profile.
Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions.
-
#delete_app(options = {}) ⇒ Struct
Deletes a specified app.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#delete_instance(options = {}) ⇒ Struct
Deletes a specified instance, which terminates the associated Amazon EC2 instance.
-
#delete_layer(options = {}) ⇒ Struct
Deletes a specified layer.
-
#delete_stack(options = {}) ⇒ Struct
Deletes a specified stack.
-
#delete_user_profile(options = {}) ⇒ Struct
Deletes a user profile.
Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions.
-
#deregister_ecs_cluster(options = {}) ⇒ Struct
Deregisters a specified Amazon ECS cluster from a stack.
-
#deregister_elastic_ip(options = {}) ⇒ Struct
Deregisters a specified Elastic IP address.
-
#deregister_instance(options = {}) ⇒ Struct
Deregister a registered Amazon EC2 or on-premises instance.
-
#deregister_rds_db_instance(options = {}) ⇒ Struct
Deregisters an Amazon RDS instance.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#deregister_volume(options = {}) ⇒ Struct
Deregisters an Amazon EBS volume.
-
#describe_agent_versions(options = {}) ⇒ Types::DescribeAgentVersionsResult
Describes the available AWS OpsWorks Stacks agent versions.
-
#describe_apps(options = {}) ⇒ Types::DescribeAppsResult
Requests a description of a specified set of apps.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#describe_commands(options = {}) ⇒ Types::DescribeCommandsResult
Describes the results of specified commands.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#describe_deployments(options = {}) ⇒ Types::DescribeDeploymentsResult
Requests a description of a specified set of deployments.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#describe_ecs_clusters(options = {}) ⇒ Types::DescribeEcsClustersResult
Describes Amazon ECS clusters that are registered with a stack.
-
#describe_elastic_ips(options = {}) ⇒ Types::DescribeElasticIpsResult
Describes Elastic IP addresses.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#describe_elastic_load_balancers(options = {}) ⇒ Types::DescribeElasticLoadBalancersResult
Describes a stack's Elastic Load Balancing instances.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#describe_instances(options = {}) ⇒ Types::DescribeInstancesResult
Requests a description of a set of instances.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#describe_layers(options = {}) ⇒ Types::DescribeLayersResult
Requests a description of one or more layers in a specified stack.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#describe_load_based_auto_scaling(options = {}) ⇒ Types::DescribeLoadBasedAutoScalingResult
Describes load-based auto scaling configurations for specified layers.
You must specify at least one of the parameters.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#describe_my_user_profile(options = {}) ⇒ Types::DescribeMyUserProfileResult
Describes a user's SSH information.
Required Permissions: To use this action, an IAM user must have self-management enabled or an attached policy that explicitly grants permissions.
-
#describe_operating_systems(options = {}) ⇒ Types::DescribeOperatingSystemsResponse
Describes the operating systems that are supported by AWS OpsWorks Stacks.
.
-
#describe_permissions(options = {}) ⇒ Types::DescribePermissionsResult
Describes the permissions for a specified stack.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#describe_raid_arrays(options = {}) ⇒ Types::DescribeRaidArraysResult
Describe an instance's RAID arrays.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#describe_rds_db_instances(options = {}) ⇒ Types::DescribeRdsDbInstancesResult
Describes Amazon RDS instances.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#describe_service_errors(options = {}) ⇒ Types::DescribeServiceErrorsResult
Describes AWS OpsWorks Stacks service errors.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#describe_stack_provisioning_parameters(options = {}) ⇒ Types::DescribeStackProvisioningParametersResult
Requests a description of a stack's provisioning parameters.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack or an attached policy that explicitly grants permissions.
-
#describe_stack_summary(options = {}) ⇒ Types::DescribeStackSummaryResult
Describes the number of layers and apps in a specified stack, and the number of instances in each state, such as
running_setup
oronline
.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.
-
#describe_stacks(options = {}) ⇒ Types::DescribeStacksResult
Requests a description of one or more stacks.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#describe_time_based_auto_scaling(options = {}) ⇒ Types::DescribeTimeBasedAutoScalingResult
Describes time-based auto scaling configurations for specified instances.
You must specify at least one of the parameters.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#describe_user_profiles(options = {}) ⇒ Types::DescribeUserProfilesResult
Describe specified users.
Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions.
-
#describe_volumes(options = {}) ⇒ Types::DescribeVolumesResult
Describes an instance's Amazon EBS volumes.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#detach_elastic_load_balancer(options = {}) ⇒ Struct
Detaches a specified Elastic Load Balancing instance from its layer.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#disassociate_elastic_ip(options = {}) ⇒ Struct
Disassociates an Elastic IP address from its instance.
-
#get_hostname_suggestion(options = {}) ⇒ Types::GetHostnameSuggestionResult
Gets a generated host name for the specified layer, based on the current host name theme.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#grant_access(options = {}) ⇒ Types::GrantAccessResult
This action can be used only with Windows stacks.
Grants RDP access to a Windows instance for a specified time period.
. -
#list_tags(options = {}) ⇒ Types::ListTagsResult
Returns a list of tags that are applied to the specified stack or layer.
.
-
#reboot_instance(options = {}) ⇒ Struct
Reboots a specified instance.
-
#register_ecs_cluster(options = {}) ⇒ Types::RegisterEcsClusterResult
Registers a specified Amazon ECS cluster with a stack.
-
#register_elastic_ip(options = {}) ⇒ Types::RegisterElasticIpResult
Registers an Elastic IP address with a specified stack.
-
#register_instance(options = {}) ⇒ Types::RegisterInstanceResult
Registers instances that were created outside of AWS OpsWorks Stacks with a specified stack.
We do not recommend using this action to register instances.
-
#register_rds_db_instance(options = {}) ⇒ Struct
Registers an Amazon RDS instance with a stack.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#register_volume(options = {}) ⇒ Types::RegisterVolumeResult
Registers an Amazon EBS volume with a specified stack.
-
#set_load_based_auto_scaling(options = {}) ⇒ Struct
Specify the load-based auto scaling configuration for a specified layer.
-
#set_permission(options = {}) ⇒ Struct
Specifies a user's permissions.
-
#set_time_based_auto_scaling(options = {}) ⇒ Struct
Specify the time-based auto scaling configuration for a specified instance.
-
#start_instance(options = {}) ⇒ Struct
Starts a specified instance.
-
#start_stack(options = {}) ⇒ Struct
Starts a stack's instances.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#stop_instance(options = {}) ⇒ Struct
Stops a specified instance.
-
#stop_stack(options = {}) ⇒ Struct
Stops a specified stack.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#tag_resource(options = {}) ⇒ Struct
Apply cost-allocation tags to a specified stack or layer in AWS OpsWorks Stacks.
-
#unassign_instance(options = {}) ⇒ Struct
Unassigns a registered instance from all layers that are using the instance.
-
#unassign_volume(options = {}) ⇒ Struct
Unassigns an assigned Amazon EBS volume.
-
#untag_resource(options = {}) ⇒ Struct
Removes tags from a specified stack or layer.
.
-
#update_app(options = {}) ⇒ Struct
Updates a specified app.
Required Permissions: To use this action, an IAM user must have a Deploy or Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#update_elastic_ip(options = {}) ⇒ Struct
Updates a registered Elastic IP address's name.
-
#update_instance(options = {}) ⇒ Struct
Updates a specified instance.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#update_layer(options = {}) ⇒ Struct
Updates a specified layer.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#update_my_user_profile(options = {}) ⇒ Struct
Updates a user's SSH public key.
Required Permissions: To use this action, an IAM user must have self-management enabled or an attached policy that explicitly grants permissions.
-
#update_rds_db_instance(options = {}) ⇒ Struct
Updates an Amazon RDS instance.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#update_stack(options = {}) ⇒ Struct
Updates a specified stack.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions.
-
#update_user_profile(options = {}) ⇒ Struct
Updates a specified user profile.
Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions.
-
#update_volume(options = {}) ⇒ Struct
Updates an Amazon EBS volume's name or mount point.
Instance Method Summary collapse
-
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean
Waiters polls an API operation until a resource enters a desired state.
-
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters.
Methods inherited from Seahorse::Client::Base
add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options = {}) ⇒ Aws::OpsWorks::Client
Constructs an API client.
Instance Method Details
#assign_instance(options = {}) ⇒ Struct
Assign a registered instance to a layer.
-
You can assign registered on-premises instances to any layer type.
-
You can assign registered Amazon EC2 instances only to custom layers.
-
You cannot use this action with instances that were created with AWS OpsWorks Stacks.
Required Permissions: To use this action, an AWS Identity and Access Management (IAM) user must have a Manage permissions level for the stack or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#assign_volume(options = {}) ⇒ Struct
Assigns one of the stack's registered Amazon EBS volumes to a specified instance. The volume must first be registered with the stack by calling RegisterVolume. After you register the volume, you must call UpdateVolume to specify a mount point before calling AssignVolume
. For more information, see Resource Management.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#associate_elastic_ip(options = {}) ⇒ Struct
Associates one of the stack's registered Elastic IP addresses with a specified instance. The address must first be registered with the stack by calling RegisterElasticIp. For more information, see Resource Management.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#attach_elastic_load_balancer(options = {}) ⇒ Struct
Attaches an Elastic Load Balancing load balancer to a specified layer. AWS OpsWorks Stacks does not support Application Load Balancer. You can only use Classic Load Balancer with AWS OpsWorks Stacks. For more information, see Elastic Load Balancing.
You must create the Elastic Load Balancing instance separately, by using the Elastic Load Balancing console, API, or CLI. For more information, see Elastic Load Balancing Developer Guide.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#clone_stack(options = {}) ⇒ Types::CloneStackResult
Creates a clone of a specified stack. For more information, see Clone a Stack. By default, all parameters are set to the values used by the parent stack.
Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#create_app(options = {}) ⇒ Types::CreateAppResult
Creates an app for a specified stack. For more information, see Creating Apps.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#create_deployment(options = {}) ⇒ Types::CreateDeploymentResult
Runs deployment or stack commands. For more information, see Deploying Apps and Run Stack Commands.
Required Permissions: To use this action, an IAM user must have a Deploy or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#create_instance(options = {}) ⇒ Types::CreateInstanceResult
Creates an instance in a specified stack. For more information, see Adding an Instance to a Layer.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#create_layer(options = {}) ⇒ Types::CreateLayerResult
Creates a layer. For more information, see How to Create a Layer.
You should use CreateLayer for noncustom layer types such as PHP App Server only if the stack does not have an existing layer of that type. A stack can have at most one instance of each noncustom layer; if you attempt to create a second instance, CreateLayer fails. A stack can have an arbitrary number of custom layers, so you can call CreateLayer as many times as you like for that layer type.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#create_stack(options = {}) ⇒ Types::CreateStackResult
Creates a new stack. For more information, see Create a New Stack.
Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#create_user_profile(options = {}) ⇒ Types::CreateUserProfileResult
Creates a new user profile.
Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#delete_app(options = {}) ⇒ Struct
Deletes a specified app.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#delete_instance(options = {}) ⇒ Struct
Deletes a specified instance, which terminates the associated Amazon EC2 instance. You must stop an instance before you can delete it.
For more information, see Deleting Instances.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#delete_layer(options = {}) ⇒ Struct
Deletes a specified layer. You must first stop and then delete all associated instances or unassign registered instances. For more information, see How to Delete a Layer.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#delete_stack(options = {}) ⇒ Struct
Deletes a specified stack. You must first delete all instances, layers, and apps or deregister registered instances. For more information, see Shut Down a Stack.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#delete_user_profile(options = {}) ⇒ Struct
Deletes a user profile.
Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#deregister_ecs_cluster(options = {}) ⇒ Struct
Deregisters a specified Amazon ECS cluster from a stack. For more information, see Resource Management.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack or an attached policy that explicitly grants permissions. For more information on user permissions, see https://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html.
#deregister_elastic_ip(options = {}) ⇒ Struct
Deregisters a specified Elastic IP address. The address can then be registered by another stack. For more information, see Resource Management.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#deregister_instance(options = {}) ⇒ Struct
Deregister a registered Amazon EC2 or on-premises instance. This action removes the instance from the stack and returns it to your control. This action 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.
#deregister_rds_db_instance(options = {}) ⇒ Struct
Deregisters an Amazon RDS instance.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#deregister_volume(options = {}) ⇒ Struct
Deregisters an Amazon EBS volume. The volume can then be registered by another stack. For more information, see Resource Management.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#describe_agent_versions(options = {}) ⇒ Types::DescribeAgentVersionsResult
Describes the available AWS OpsWorks Stacks agent versions. You must specify a stack ID or a configuration manager. DescribeAgentVersions
returns a list of available agent versions for the specified stack or configuration manager.
#describe_apps(options = {}) ⇒ Types::DescribeAppsResult
Requests a description of a specified set of apps.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#describe_commands(options = {}) ⇒ Types::DescribeCommandsResult
Describes the results of specified commands.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#describe_deployments(options = {}) ⇒ Types::DescribeDeploymentsResult
Requests a description of a specified set of deployments.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#describe_ecs_clusters(options = {}) ⇒ Types::DescribeEcsClustersResult
Describes Amazon ECS clusters that are registered with a stack. If you specify only a stack ID, you can use the MaxResults
and NextToken
parameters to paginate the response. However, AWS OpsWorks Stacks currently supports only one cluster per layer, so the result set has a maximum of one element.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack or an attached policy that explicitly grants permission. For more information about user permissions, see Managing User Permissions.
This call accepts only one resource-identifying parameter.
#describe_elastic_ips(options = {}) ⇒ Types::DescribeElasticIpsResult
Describes Elastic IP addresses.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#describe_elastic_load_balancers(options = {}) ⇒ Types::DescribeElasticLoadBalancersResult
Describes a stack's Elastic Load Balancing instances.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#describe_instances(options = {}) ⇒ Types::DescribeInstancesResult
Requests a description of a set of instances.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#describe_layers(options = {}) ⇒ Types::DescribeLayersResult
Requests a description of one or more layers in a specified stack.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#describe_load_based_auto_scaling(options = {}) ⇒ Types::DescribeLoadBasedAutoScalingResult
Describes load-based auto scaling configurations for specified layers.
You must specify at least one of the parameters.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#describe_my_user_profile(options = {}) ⇒ Types::DescribeMyUserProfileResult
Describes a user's SSH information.
Required Permissions: To use this action, an IAM user must have self-management enabled or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#describe_operating_systems(options = {}) ⇒ Types::DescribeOperatingSystemsResponse
Describes the operating systems that are supported by AWS OpsWorks Stacks.
#describe_permissions(options = {}) ⇒ Types::DescribePermissionsResult
Describes the permissions for a specified stack.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#describe_raid_arrays(options = {}) ⇒ Types::DescribeRaidArraysResult
Describe an instance's RAID arrays.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#describe_rds_db_instances(options = {}) ⇒ Types::DescribeRdsDbInstancesResult
Describes Amazon RDS instances.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
This call accepts only one resource-identifying parameter.
#describe_service_errors(options = {}) ⇒ Types::DescribeServiceErrorsResult
Describes AWS OpsWorks Stacks service errors.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
This call accepts only one resource-identifying parameter.
#describe_stack_provisioning_parameters(options = {}) ⇒ Types::DescribeStackProvisioningParametersResult
Requests a description of a stack's provisioning parameters.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#describe_stack_summary(options = {}) ⇒ Types::DescribeStackSummaryResult
Describes the number of layers and apps in a specified stack, and the number of instances in each state, such as running_setup
or online
.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#describe_stacks(options = {}) ⇒ Types::DescribeStacksResult
Requests a description of one or more stacks.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#describe_time_based_auto_scaling(options = {}) ⇒ Types::DescribeTimeBasedAutoScalingResult
Describes time-based auto scaling configurations for specified instances.
You must specify at least one of the parameters.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#describe_user_profiles(options = {}) ⇒ Types::DescribeUserProfilesResult
Describe specified users.
Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#describe_volumes(options = {}) ⇒ Types::DescribeVolumesResult
Describes an instance's Amazon EBS volumes.
This call accepts only one resource-identifying parameter.
Required Permissions: To use this action, an IAM user must have a Show, Deploy, or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#detach_elastic_load_balancer(options = {}) ⇒ Struct
Detaches a specified Elastic Load Balancing instance from its layer.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#disassociate_elastic_ip(options = {}) ⇒ Struct
Disassociates an Elastic IP address from its instance. The address remains registered with the stack. For more information, see Resource Management.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#get_hostname_suggestion(options = {}) ⇒ Types::GetHostnameSuggestionResult
Gets a generated host name for the specified layer, based on the current host name theme.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#grant_access(options = {}) ⇒ Types::GrantAccessResult
This action can be used only with Windows stacks.
Grants RDP access to a Windows instance for a specified time period.
#list_tags(options = {}) ⇒ Types::ListTagsResult
Returns a list of tags that are applied to the specified stack or layer.
#reboot_instance(options = {}) ⇒ Struct
Reboots a specified instance. For more information, see Starting, Stopping, and Rebooting Instances.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#register_ecs_cluster(options = {}) ⇒ Types::RegisterEcsClusterResult
Registers a specified Amazon ECS cluster with a stack. You can register only one cluster with a stack. A cluster can be registered with only one stack. For more information, see Resource Management.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#register_elastic_ip(options = {}) ⇒ Types::RegisterElasticIpResult
Registers an Elastic IP address with a specified stack. An address can be registered with only one stack at a time. If the address is already registered, you must first deregister it by calling DeregisterElasticIp. For more information, see Resource Management.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#register_instance(options = {}) ⇒ Types::RegisterInstanceResult
Registers instances that were created outside of AWS OpsWorks Stacks with a specified stack.
We do not recommend using this action to register instances. The complete registration operation includes two tasks: installing the AWS OpsWorks Stacks agent on the instance, and registering the instance with the stack. RegisterInstance
handles only the second step. You should instead use the AWS CLI register
command, which performs the entire registration operation. For more information, see Registering an Instance with an AWS OpsWorks Stacks Stack.
Registered instances have the same requirements as instances that are created by using the CreateInstance API. For example, registered instances must be running a supported Linux-based operating system, and they must have a supported instance type. For more information about requirements for instances that you want to register, see Preparing the Instance.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#register_rds_db_instance(options = {}) ⇒ Struct
Registers an Amazon RDS instance with a stack.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#register_volume(options = {}) ⇒ Types::RegisterVolumeResult
Registers an Amazon EBS volume with a specified stack. A volume can be registered with only one stack at a time. If the volume is already registered, you must first deregister it by calling DeregisterVolume. For more information, see Resource Management.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#set_load_based_auto_scaling(options = {}) ⇒ Struct
Specify the load-based auto scaling configuration for a specified layer. For more information, see Managing Load with Time-based and Load-based Instances.
To use load-based auto scaling, you must create a set of load-based auto scaling instances. Load-based auto scaling operates only on the instances from that set, so you must ensure that you have created enough instances to handle the maximum anticipated load.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#set_permission(options = {}) ⇒ Struct
Specifies a user's permissions. For more information, see Security and Permissions.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#set_time_based_auto_scaling(options = {}) ⇒ Struct
Specify the time-based auto scaling configuration for a specified instance. For more information, see Managing Load with Time-based and Load-based Instances.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#start_instance(options = {}) ⇒ Struct
Starts a specified instance. For more information, see Starting, Stopping, and Rebooting Instances.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#start_stack(options = {}) ⇒ Struct
Starts a stack's instances.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#stop_instance(options = {}) ⇒ Struct
Stops a specified instance. When you stop a standard instance, the data disappears and must be reinstalled when you restart the instance. You can stop an Amazon EBS-backed instance without losing data. For more information, see Starting, Stopping, and Rebooting Instances.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#stop_stack(options = {}) ⇒ Struct
Stops a specified stack.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#tag_resource(options = {}) ⇒ Struct
Apply cost-allocation tags to a specified stack or layer in AWS OpsWorks Stacks. For more information about how tagging works, see Tags in the AWS OpsWorks User Guide.
#unassign_instance(options = {}) ⇒ 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.
#unassign_volume(options = {}) ⇒ Struct
Unassigns an assigned Amazon EBS volume. The volume remains registered with the stack. For more information, see Resource Management.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#untag_resource(options = {}) ⇒ Struct
Removes tags from a specified stack or layer.
#update_app(options = {}) ⇒ Struct
Updates a specified app.
Required Permissions: To use this action, an IAM user must have a Deploy or Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#update_elastic_ip(options = {}) ⇒ Struct
Updates a registered Elastic IP address's name. For more information, see Resource Management.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#update_instance(options = {}) ⇒ Struct
Updates a specified instance.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#update_layer(options = {}) ⇒ Struct
Updates a specified layer.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#update_my_user_profile(options = {}) ⇒ Struct
Updates a user's SSH public key.
Required Permissions: To use this action, an IAM user must have self-management enabled or an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#update_rds_db_instance(options = {}) ⇒ Struct
Updates an Amazon RDS instance.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#update_stack(options = {}) ⇒ Struct
Updates a specified stack.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#update_user_profile(options = {}) ⇒ Struct
Updates a specified user profile.
Required Permissions: To use this action, an IAM user must have an attached policy that explicitly grants permissions. For more information about user permissions, see Managing User Permissions.
#update_volume(options = {}) ⇒ Struct
Updates an Amazon EBS volume's name or mount point. For more information, see Resource Management.
Required Permissions: To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions.
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean
Waiters polls an API operation until a resource enters a desired state.
Basic Usage
Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.
# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)
Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:
# poll for ~25 seconds
client.wait_until(...) do |w|
w.max_attempts = 5
w.delay = 5
end
Callbacks
You can be notified before each polling attempt and before each
delay. If you throw :success
or :failure
from these callbacks,
it will terminate the waiter.
started_at = Time.now
client.wait_until(...) do |w|
# disable max attempts
w.max_attempts = nil
# poll for 1 hour, instead of a number of attempts
w.before_wait do |attempts, response|
throw :failure if Time.now - started_at > 3600
end
end
Handling Errors
When a waiter is successful, it returns true
. When a waiter
fails, it raises an error. All errors raised extend from
Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:
Waiter Name | Client Method | Default Delay: | Default 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 |