A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.aws.amazon.com/sdkforruby/api/Aws/AppStream/Client.html below:

Client — AWS SDK for Ruby V2

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

Class: Aws::AppStream::Client Overview

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

appstream = Aws::AppStream::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:

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

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:

creds = YAML.load(File.read('/path/to/secrets'))

Aws::AppStream::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.

Attribute Summary collapse Instance Attribute Summary Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse API Operations collapse Instance Method Summary collapse Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Instance Method Details #associate_fleet(options = {}) ⇒ Struct

Associates the specified fleet with the specified stack.

#batch_associate_user_stack(options = {}) ⇒ Types::BatchAssociateUserStackResult

Associates the specified users with the specified stacks. Users in a user pool cannot be assigned to stacks with fleets that are joined to an Active Directory domain.

#copy_image(options = {}) ⇒ Types::CopyImageResponse

Copies the image within the same region or to a new region within the same AWS account. Note that any tags you added to the image will not be copied.

#create_directory_config(options = {}) ⇒ Types::CreateDirectoryConfigResult

Creates a Directory Config object in AppStream 2.0. This object includes the configuration information required to join fleets and image builders to Microsoft Active Directory domains.

#create_fleet(options = {}) ⇒ Types::CreateFleetResult

Creates a fleet. A fleet consists of streaming instances that run a specified image.

#create_image_builder(options = {}) ⇒ Types::CreateImageBuilderResult

Creates an image builder. An image builder is a virtual machine that is used to create an image.

The initial state of the builder is PENDING. When it is ready, the state is RUNNING.

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

Creates a stack to start streaming applications to users. A stack consists of an associated fleet, user access policies, and storage configurations.

#create_streaming_url(options = {}) ⇒ Types::CreateStreamingURLResult

Creates a temporary URL to start an AppStream 2.0 streaming session for the specified user. A streaming URL enables application streaming to be tested without user setup.

#create_user(options = {}) ⇒ Struct

Creates a new user in the user pool.

#delete_directory_config(options = {}) ⇒ Struct

Deletes the specified Directory Config object from AppStream 2.0. This object includes the information required to join streaming instances to an Active Directory domain.

#delete_fleet(options = {}) ⇒ Struct

Deletes the specified fleet.

#delete_image(options = {}) ⇒ Types::DeleteImageResult

Deletes the specified image. You cannot delete an image when it is in use. After you delete an image, you cannot provision new capacity using the image.

#delete_image_permissions(options = {}) ⇒ Struct

Deletes permissions for the specified private image. After you delete permissions for an image, AWS accounts to which you previously granted these permissions can no longer use the image.

#delete_stack(options = {}) ⇒ Struct

Deletes the specified stack. After the stack is deleted, the application streaming environment provided by the stack is no longer available to users. Also, any reservations made for application streaming sessions for the stack are released.

#delete_usage_report_subscription(options = {}) ⇒ Struct

Disables usage report generation.

#delete_user(options = {}) ⇒ Struct

Deletes a user from the user pool.

#describe_directory_configs(options = {}) ⇒ Types::DescribeDirectoryConfigsResult

Retrieves a list that describes one or more specified Directory Config objects for AppStream 2.0, if the names for these objects are provided. Otherwise, all Directory Config objects in the account are described. These objects include the configuration information required to join fleets and image builders to Microsoft Active Directory domains.

Although the response syntax in this topic includes the account password, this password is not returned in the actual response.

#describe_fleets(options = {}) ⇒ Types::DescribeFleetsResult

Retrieves a list that describes one or more specified fleets, if the fleet names are provided. Otherwise, all fleets in the account are described.

#describe_image_builders(options = {}) ⇒ Types::DescribeImageBuildersResult

Retrieves a list that describes one or more specified image builders, if the image builder names are provided. Otherwise, all image builders in the account are described.

#describe_image_permissions(options = {}) ⇒ Types::DescribeImagePermissionsResult

Retrieves a list that describes the permissions for shared AWS account IDs on a private image that you own.

#describe_images(options = {}) ⇒ Types::DescribeImagesResult

Retrieves a list that describes one or more specified images, if the image names or image ARNs are provided. Otherwise, all images in the account are described.

#describe_sessions(options = {}) ⇒ Types::DescribeSessionsResult

Retrieves a list that describes the streaming sessions for a specified stack and fleet. If a UserId is provided for the stack and fleet, only streaming sessions for that user are described. If an authentication type is not provided, the default is to authenticate users using a streaming URL.

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

Retrieves a list that describes one or more specified stacks, if the stack names are provided. Otherwise, all stacks in the account are described.

#describe_user_stack_associations(options = {}) ⇒ Types::DescribeUserStackAssociationsResult

Retrieves a list that describes the UserStackAssociation objects. You must specify either or both of the following:

#describe_users(options = {}) ⇒ Types::DescribeUsersResult

Retrieves a list that describes one or more specified users in the user pool.

#disable_user(options = {}) ⇒ Struct

Disables the specified user in the user pool. Users can't sign in to AppStream 2.0 until they are re-enabled. This action does not delete the user.

#disassociate_fleet(options = {}) ⇒ Struct

Disassociates the specified fleet from the specified stack.

#enable_user(options = {}) ⇒ Struct

Enables a user in the user pool. After being enabled, users can sign in to AppStream 2.0 and open applications from the stacks to which they are assigned.

#expire_session(options = {}) ⇒ Struct

Immediately stops the specified streaming session.

#list_tags_for_resource(options = {}) ⇒ Types::ListTagsForResourceResponse

Retrieves a list of all tags for the specified AppStream 2.0 resource. You can tag AppStream 2.0 image builders, images, fleets, and stacks.

For more information about tags, see Tagging Your Resources in the Amazon AppStream 2.0 Administration Guide.

#start_fleet(options = {}) ⇒ Struct

Starts the specified fleet.

#stop_fleet(options = {}) ⇒ Struct

Stops the specified fleet.

#tag_resource(options = {}) ⇒ Struct

Adds or overwrites one or more tags for the specified AppStream 2.0 resource. You can tag AppStream 2.0 image builders, images, fleets, and stacks.

Each tag consists of a key and an optional value. If a resource already has a tag with the same key, this operation updates its value.

To list the current tags for your resources, use ListTagsForResource. To disassociate tags from your resources, use UntagResource.

For more information about tags, see Tagging Your Resources in the Amazon AppStream 2.0 Administration Guide.

#untag_resource(options = {}) ⇒ Struct

Disassociates one or more specified tags from the specified AppStream 2.0 resource.

To list the current tags for your resources, use ListTagsForResource.

For more information about tags, see Tagging Your Resources in the Amazon AppStream 2.0 Administration Guide.

#update_directory_config(options = {}) ⇒ Types::UpdateDirectoryConfigResult

Updates the specified Directory Config object in AppStream 2.0. This object includes the configuration information required to join fleets and image builders to Microsoft Active Directory domains.

#update_fleet(options = {}) ⇒ Types::UpdateFleetResult

Updates the specified fleet.

If the fleet is in the STOPPED state, you can update any attribute except the fleet name. If the fleet is in the RUNNING state, you can update the DisplayName, ComputeCapacity, ImageARN, ImageName, IdleDisconnectTimeoutInSeconds, and DisconnectTimeoutInSeconds attributes. If the fleet is in the STARTING or STOPPING state, you can't update it.

#update_image_permissions(options = {}) ⇒ Struct

Adds or updates permissions for the specified private image.

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4