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

Class: Aws::AppStream::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-appstream/lib/aws-sdk-appstream/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



152
153
154
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 152

def initialize(*args)
  super
end

Instance Method Details

#associate_fleet(params = {}) ⇒ Struct

Associate a fleet to a stack.

Examples:

Request syntax with placeholder values


resp = client.associate_fleet({
  fleet_name: "String", # required
  stack_name: "String", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :fleet_name (required, String)

    The name of the fleet to associate.

  • :stack_name (required, String)

    The name of the stack to which the fleet is associated.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



179
180
181
182
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 179

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

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

Creates a directory configuration with the given parameters.

Examples:

Request syntax with placeholder values


resp = client.create_directory_config({
  directory_name: "DirectoryName", # required
  organizational_unit_distinguished_names: ["OrganizationalUnitDistinguishedName"], # required
  service_account_credentials: { # required
    account_name: "AccountName", # required
    account_password: "AccountPassword", # required
  },
})

Response structure


resp.directory_config.directory_name #=> String
resp.directory_config.organizational_unit_distinguished_names #=> Array
resp.directory_config.organizational_unit_distinguished_names[0] #=> String
resp.directory_config.. #=> String
resp.directory_config.. #=> String
resp.directory_config.created_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :directory_name (required, String)

    The fully qualified name of the directory, such as corp.example.com

  • :organizational_unit_distinguished_names (required, Array<String>)

    The list of the distinguished names of organizational units to place computer accounts in.

  • :service_account_credentials (required, Types::ServiceAccountCredentials)

    The AccountName and AccountPassword values for the service account, which are used by the streaming instance to connect to the directory.

Returns:

See Also:



226
227
228
229
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 226

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

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

Creates a new fleet.

Examples:

Request syntax with placeholder values


resp = client.create_fleet({
  name: "Name", # required
  image_name: "String", # required
  instance_type: "String", # required
  compute_capacity: { # required
    desired_instances: 1, # required
  },
  vpc_config: {
    subnet_ids: ["String"],
    security_group_ids: ["String"],
  },
  max_user_duration_in_seconds: 1,
  disconnect_timeout_in_seconds: 1,
  description: "Description",
  display_name: "DisplayName",
  enable_default_internet_access: false,
  domain_join_info: {
    directory_name: "DirectoryName",
    organizational_unit_distinguished_name: "OrganizationalUnitDistinguishedName",
  },
})

Response structure


resp.fleet.arn #=> String
resp.fleet.name #=> String
resp.fleet.display_name #=> String
resp.fleet.description #=> String
resp.fleet.image_name #=> String
resp.fleet.instance_type #=> String
resp.fleet.compute_capacity_status.desired #=> Integer
resp.fleet.compute_capacity_status.running #=> Integer
resp.fleet.compute_capacity_status.in_use #=> Integer
resp.fleet.compute_capacity_status.available #=> Integer
resp.fleet.max_user_duration_in_seconds #=> Integer
resp.fleet.disconnect_timeout_in_seconds #=> Integer
resp.fleet.state #=> String, one of "STARTING", "RUNNING", "STOPPING", "STOPPED"
resp.fleet.vpc_config.subnet_ids #=> Array
resp.fleet.vpc_config.subnet_ids[0] #=> String
resp.fleet.vpc_config.security_group_ids #=> Array
resp.fleet.vpc_config.security_group_ids[0] #=> String
resp.fleet.created_time #=> Time
resp.fleet.fleet_errors #=> Array
resp.fleet.fleet_errors[0].error_code #=> String, one of "IAM_SERVICE_ROLE_MISSING_ENI_DESCRIBE_ACTION", "IAM_SERVICE_ROLE_MISSING_ENI_CREATE_ACTION", "IAM_SERVICE_ROLE_MISSING_ENI_DELETE_ACTION", "NETWORK_INTERFACE_LIMIT_EXCEEDED", "INTERNAL_SERVICE_ERROR", "IAM_SERVICE_ROLE_IS_MISSING", "SUBNET_HAS_INSUFFICIENT_IP_ADDRESSES", "IAM_SERVICE_ROLE_MISSING_DESCRIBE_SUBNET_ACTION", "SUBNET_NOT_FOUND", "IMAGE_NOT_FOUND", "INVALID_SUBNET_CONFIGURATION", "SECURITY_GROUPS_NOT_FOUND", "IAM_SERVICE_ROLE_MISSING_DESCRIBE_SECURITY_GROUPS_ACTION", "DOMAIN_JOIN_ERROR_FILE_NOT_FOUND", "DOMAIN_JOIN_ERROR_ACCESS_DENIED", "DOMAIN_JOIN_ERROR_LOGON_FAILURE", "DOMAIN_JOIN_ERROR_INVALID_PARAMETER", "DOMAIN_JOIN_ERROR_MORE_DATA", "DOMAIN_JOIN_ERROR_NO_SUCH_DOMAIN", "DOMAIN_JOIN_ERROR_NOT_SUPPORTED", "DOMAIN_JOIN_NERR_INVALID_WORKGROUP_NAME", "DOMAIN_JOIN_NERR_WORKSTATION_NOT_STARTED", "DOMAIN_JOIN_ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED", "DOMAIN_JOIN_NERR_PASSWORD_EXPIRED", "DOMAIN_JOIN_INTERNAL_SERVICE_ERROR"
resp.fleet.fleet_errors[0].error_message #=> String
resp.fleet.enable_default_internet_access #=> Boolean
resp.fleet.domain_join_info.directory_name #=> String
resp.fleet.domain_join_info.organizational_unit_distinguished_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    A unique identifier for the fleet.

  • :image_name (required, String)

    Unique name of the image used by the fleet.

  • :instance_type (required, String)

    The instance type of compute resources for the fleet. Fleet instances are launched from this instance type. Available instance types are:

    • stream.standard.medium

    • stream.standard.large

    • stream.compute.large

    • stream.compute.xlarge

    • stream.compute.2xlarge

    • stream.compute.4xlarge

    • stream.compute.8xlarge

    • stream.memory.large

    • stream.memory.xlarge

    • stream.memory.2xlarge

    • stream.memory.4xlarge

    • stream.memory.8xlarge

  • :compute_capacity (required, Types::ComputeCapacity)

    The parameters for the capacity allocated to the fleet.

  • :vpc_config (Types::VpcConfig)

    The VPC configuration for the fleet.

  • :max_user_duration_in_seconds (Integer)

    The maximum time for which a streaming session can run. The input can be any numeric value in seconds between 600 and 57600.

  • :disconnect_timeout_in_seconds (Integer)

    The time after disconnection when a session is considered to have ended. If a user who got disconnected reconnects within this timeout interval, the user is connected back to their previous session. The input can be any numeric value in seconds between 60 and 57600.

  • :description (String)

    The description of the fleet.

  • :display_name (String)

    The display name of the fleet.

  • :enable_default_internet_access (Boolean)

    Enables or disables default internet access for the fleet.

  • :domain_join_info (Types::DomainJoinInfo)

    The DirectoryName and OrganizationalUnitDistinguishedName values, which are used to join domains for the AppStream 2.0 streaming instances.

Returns:

See Also:



356
357
358
359
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 356

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

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

Create a new stack.

Examples:

Request syntax with placeholder values


resp = client.create_stack({
  name: "String", # required
  description: "Description",
  display_name: "DisplayName",
  storage_connectors: [
    {
      connector_type: "HOMEFOLDERS", # required, accepts HOMEFOLDERS
      resource_identifier: "ResourceIdentifier",
    },
  ],
})

Response structure


resp.stack.arn #=> String
resp.stack.name #=> String
resp.stack.description #=> String
resp.stack.display_name #=> String
resp.stack.created_time #=> Time
resp.stack.storage_connectors #=> Array
resp.stack.storage_connectors[0].connector_type #=> String, one of "HOMEFOLDERS"
resp.stack.storage_connectors[0].resource_identifier #=> String
resp.stack.stack_errors #=> Array
resp.stack.stack_errors[0].error_code #=> String, one of "STORAGE_CONNECTOR_ERROR", "INTERNAL_SERVICE_ERROR"
resp.stack.stack_errors[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The unique identifier for this stack.

  • :description (String)

    The description displayed to end users on the AppStream 2.0 portal.

  • :display_name (String)

    The name displayed to end users on the AppStream 2.0 portal.

  • :storage_connectors (Array<Types::StorageConnector>)

    The storage connectors to be enabled for the stack.

Returns:

See Also:



411
412
413
414
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 411

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

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

Creates a URL to start an AppStream 2.0 streaming session for a user. By default, the URL is valid only for 1 minute from the time that it is generated.

Examples:

Request syntax with placeholder values


resp = client.create_streaming_url({
  stack_name: "String", # required
  fleet_name: "String", # required
  user_id: "StreamingUrlUserId", # required
  application_id: "String",
  validity: 1,
  session_context: "String",
})

Response structure


resp.streaming_url #=> String
resp.expires #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :stack_name (required, String)

    The stack for which the URL is generated.

  • :fleet_name (required, String)

    The fleet for which the URL is generated.

  • :user_id (required, String)

    A unique user ID for whom the URL is generated.

  • :application_id (String)

    The ID of the application that must be launched after the session starts.

  • :validity (Integer)

    The duration up to which the URL returned by this action is valid. The input can be any numeric value in seconds between 1 and 604800 seconds.

  • :session_context (String)

    The sessionContext of the streaming URL.

Returns:

See Also:



466
467
468
469
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 466

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

#delete_directory_config(params = {}) ⇒ Struct

Deletes the directory configuration with the given parameters.

Examples:

Request syntax with placeholder values


resp = client.delete_directory_config({
  directory_name: "DirectoryName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :directory_name (required, String)

    The name of the directory configuration to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



488
489
490
491
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 488

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

#delete_fleet(params = {}) ⇒ Struct

Deletes a fleet.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the fleet to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



510
511
512
513
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 510

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

#delete_stack(params = {}) ⇒ Struct

Deletes the stack. After this operation completes, the environment can no longer be activated, and any reservations made for the stack are released.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the stack to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



534
535
536
537
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 534

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

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

Returns a list describing the specified directory configurations.

Examples:

Request syntax with placeholder values


resp = client.describe_directory_configs({
  directory_names: ["DirectoryName"],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.directory_configs #=> Array
resp.directory_configs[0].directory_name #=> String
resp.directory_configs[0].organizational_unit_distinguished_names #=> Array
resp.directory_configs[0].organizational_unit_distinguished_names[0] #=> String
resp.directory_configs[0].. #=> String
resp.directory_configs[0].. #=> String
resp.directory_configs[0].created_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :directory_names (Array<String>)

    A specific list of directory names.

  • :max_results (Integer)

    The size of each page of results.

  • :next_token (String)

    The DescribeDirectoryConfigsResult.NextToken from a previous call to DescribeDirectoryConfigs. If this is the first call, pass null.

Returns:

See Also:



579
580
581
582
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 579

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

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

If fleet names are provided, this operation describes the specified fleets; otherwise, all the fleets in the account are described.

Examples:

Request syntax with placeholder values


resp = client.describe_fleets({
  names: ["String"],
  next_token: "String",
})

Response structure


resp.fleets #=> Array
resp.fleets[0].arn #=> String
resp.fleets[0].name #=> String
resp.fleets[0].display_name #=> String
resp.fleets[0].description #=> String
resp.fleets[0].image_name #=> String
resp.fleets[0].instance_type #=> String
resp.fleets[0].compute_capacity_status.desired #=> Integer
resp.fleets[0].compute_capacity_status.running #=> Integer
resp.fleets[0].compute_capacity_status.in_use #=> Integer
resp.fleets[0].compute_capacity_status.available #=> Integer
resp.fleets[0].max_user_duration_in_seconds #=> Integer
resp.fleets[0].disconnect_timeout_in_seconds #=> Integer
resp.fleets[0].state #=> String, one of "STARTING", "RUNNING", "STOPPING", "STOPPED"
resp.fleets[0].vpc_config.subnet_ids #=> Array
resp.fleets[0].vpc_config.subnet_ids[0] #=> String
resp.fleets[0].vpc_config.security_group_ids #=> Array
resp.fleets[0].vpc_config.security_group_ids[0] #=> String
resp.fleets[0].created_time #=> Time
resp.fleets[0].fleet_errors #=> Array
resp.fleets[0].fleet_errors[0].error_code #=> String, one of "IAM_SERVICE_ROLE_MISSING_ENI_DESCRIBE_ACTION", "IAM_SERVICE_ROLE_MISSING_ENI_CREATE_ACTION", "IAM_SERVICE_ROLE_MISSING_ENI_DELETE_ACTION", "NETWORK_INTERFACE_LIMIT_EXCEEDED", "INTERNAL_SERVICE_ERROR", "IAM_SERVICE_ROLE_IS_MISSING", "SUBNET_HAS_INSUFFICIENT_IP_ADDRESSES", "IAM_SERVICE_ROLE_MISSING_DESCRIBE_SUBNET_ACTION", "SUBNET_NOT_FOUND", "IMAGE_NOT_FOUND", "INVALID_SUBNET_CONFIGURATION", "SECURITY_GROUPS_NOT_FOUND", "IAM_SERVICE_ROLE_MISSING_DESCRIBE_SECURITY_GROUPS_ACTION", "DOMAIN_JOIN_ERROR_FILE_NOT_FOUND", "DOMAIN_JOIN_ERROR_ACCESS_DENIED", "DOMAIN_JOIN_ERROR_LOGON_FAILURE", "DOMAIN_JOIN_ERROR_INVALID_PARAMETER", "DOMAIN_JOIN_ERROR_MORE_DATA", "DOMAIN_JOIN_ERROR_NO_SUCH_DOMAIN", "DOMAIN_JOIN_ERROR_NOT_SUPPORTED", "DOMAIN_JOIN_NERR_INVALID_WORKGROUP_NAME", "DOMAIN_JOIN_NERR_WORKSTATION_NOT_STARTED", "DOMAIN_JOIN_ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED", "DOMAIN_JOIN_NERR_PASSWORD_EXPIRED", "DOMAIN_JOIN_INTERNAL_SERVICE_ERROR"
resp.fleets[0].fleet_errors[0].error_message #=> String
resp.fleets[0].enable_default_internet_access #=> Boolean
resp.fleets[0].domain_join_info.directory_name #=> String
resp.fleets[0].domain_join_info.organizational_unit_distinguished_name #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :names (Array<String>)

    The fleet names to describe. Use null to describe all the fleets for the AWS account.

  • :next_token (String)

    The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

Returns:

See Also:



640
641
642
643
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 640

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

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

Describes the images. If a list of names is not provided, all images in your account are returned. This operation does not return a paginated result.

Examples:

Request syntax with placeholder values


resp = client.describe_images({
  names: ["String"],
})

Response structure


resp.images #=> Array
resp.images[0].name #=> String
resp.images[0].arn #=> String
resp.images[0].base_image_arn #=> String
resp.images[0].display_name #=> String
resp.images[0].state #=> String, one of "PENDING", "AVAILABLE", "FAILED", "DELETING"
resp.images[0].visibility #=> String, one of "PUBLIC", "PRIVATE"
resp.images[0].image_builder_supported #=> Boolean
resp.images[0].platform #=> String, one of "WINDOWS"
resp.images[0].description #=> String
resp.images[0].state_change_reason.code #=> String, one of "INTERNAL_ERROR", "IMAGE_BUILDER_NOT_AVAILABLE"
resp.images[0].state_change_reason.message #=> String
resp.images[0].applications #=> Array
resp.images[0].applications[0].name #=> String
resp.images[0].applications[0].display_name #=> String
resp.images[0].applications[0].icon_url #=> String
resp.images[0].applications[0].launch_path #=> String
resp.images[0].applications[0].launch_parameters #=> String
resp.images[0].applications[0].enabled #=> Boolean
resp.images[0].applications[0]. #=> Hash
resp.images[0].applications[0].["String"] #=> String
resp.images[0].created_time #=> Time
resp.images[0].public_base_image_released_date #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :names (Array<String>)

    A specific list of images to describe.

Returns:

See Also:



692
693
694
695
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 692

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

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

Describes the streaming sessions for a stack and a fleet. If a user ID is provided, this operation returns streaming sessions for only that user. To retrieve the next set of items, pass this value for the nextToken parameter in a subsequent call to this operation. If an authentication type is not provided, the operation defaults to users authenticated using a streaming URL.

Examples:

Request syntax with placeholder values


resp = client.describe_sessions({
  stack_name: "String", # required
  fleet_name: "String", # required
  user_id: "UserId",
  next_token: "String",
  limit: 1,
  authentication_type: "API", # accepts API, SAML, USERPOOL
})

Response structure


resp.sessions #=> Array
resp.sessions[0].id #=> String
resp.sessions[0].user_id #=> String
resp.sessions[0].stack_name #=> String
resp.sessions[0].fleet_name #=> String
resp.sessions[0].state #=> String, one of "ACTIVE", "PENDING", "EXPIRED"
resp.sessions[0].authentication_type #=> String, one of "API", "SAML", "USERPOOL"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :stack_name (required, String)

    The name of the stack for which to list sessions.

  • :fleet_name (required, String)

    The name of the fleet for which to list sessions.

  • :user_id (String)

    The user for whom to list sessions. Use null to describe all the sessions for the stack and fleet.

  • :next_token (String)

    The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

  • :limit (Integer)

    The size of each page of results. The default value is 20 and the maximum supported value is 50.

  • :authentication_type (String)

    The authentication method of the user. It can be API for a user authenticated using a streaming URL, or SAML for a SAML federated user. If an authentication type is not provided, the operation defaults to users authenticated using a streaming URL.

Returns:

See Also:



759
760
761
762
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 759

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

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

If stack names are not provided, this operation describes the specified stacks; otherwise, all stacks in the account are described. To retrieve the next set of items, pass the nextToken value in a subsequent call to this operation.

Examples:

Request syntax with placeholder values


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

Response structure


resp.stacks #=> Array
resp.stacks[0].arn #=> String
resp.stacks[0].name #=> String
resp.stacks[0].description #=> String
resp.stacks[0].display_name #=> String
resp.stacks[0].created_time #=> Time
resp.stacks[0].storage_connectors #=> Array
resp.stacks[0].storage_connectors[0].connector_type #=> String, one of "HOMEFOLDERS"
resp.stacks[0].storage_connectors[0].resource_identifier #=> String
resp.stacks[0].stack_errors #=> Array
resp.stacks[0].stack_errors[0].error_code #=> String, one of "STORAGE_CONNECTOR_ERROR", "INTERNAL_SERVICE_ERROR"
resp.stacks[0].stack_errors[0].error_message #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :names (Array<String>)

    The stack names to describe. Use null to describe all the stacks for the AWS account.

  • :next_token (String)

    The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

Returns:

See Also:



809
810
811
812
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 809

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

#disassociate_fleet(params = {}) ⇒ Struct

Disassociates a fleet from a stack.

Examples:

Request syntax with placeholder values


resp = client.disassociate_fleet({
  fleet_name: "String", # required
  stack_name: "String", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :fleet_name (required, String)

    The name of the fleet to disassociate.

  • :stack_name (required, String)

    The name of the stack with which the fleet is associated.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



835
836
837
838
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 835

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

#expire_session(params = {}) ⇒ Struct

This operation immediately stops a streaming session.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :session_id (required, String)

    The unique identifier of the streaming session to be stopped.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



857
858
859
860
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 857

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

#list_associated_fleets(params = {}) ⇒ Types::ListAssociatedFleetsResult

Lists all fleets associated with the stack.

Examples:

Request syntax with placeholder values


resp = client.list_associated_fleets({
  stack_name: "String", # required
  next_token: "String",
})

Response structure


resp.names #=> Array
resp.names[0] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :stack_name (required, String)

    The name of the stack whose associated fleets are listed.

  • :next_token (String)

    The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

Returns:

See Also:



893
894
895
896
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 893

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

#list_associated_stacks(params = {}) ⇒ Types::ListAssociatedStacksResult

Lists all stacks to which the specified fleet is associated.

Examples:

Request syntax with placeholder values


resp = client.list_associated_stacks({
  fleet_name: "String", # required
  next_token: "String",
})

Response structure


resp.names #=> Array
resp.names[0] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :fleet_name (required, String)

    The name of the fleet whose associated stacks are listed.

  • :next_token (String)

    The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

Returns:

See Also:



929
930
931
932
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 929

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

#start_fleet(params = {}) ⇒ Struct

Starts a fleet.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the fleet to start.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



951
952
953
954
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 951

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

#stop_fleet(params = {}) ⇒ Struct

Stops a fleet.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the fleet to stop.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



973
974
975
976
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 973

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

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

Updates the directory configuration with the given parameters.

Examples:

Request syntax with placeholder values


resp = client.update_directory_config({
  directory_name: "DirectoryName", # required
  organizational_unit_distinguished_names: ["OrganizationalUnitDistinguishedName"],
  service_account_credentials: {
    account_name: "AccountName", # required
    account_password: "AccountPassword", # required
  },
})

Response structure


resp.directory_config.directory_name #=> String
resp.directory_config.organizational_unit_distinguished_names #=> Array
resp.directory_config.organizational_unit_distinguished_names[0] #=> String
resp.directory_config.. #=> String
resp.directory_config.. #=> String
resp.directory_config.created_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :directory_name (required, String)

    The name of the existing directory configuration to be updated.

  • :organizational_unit_distinguished_names (Array<String>)

    The list of the distinguished names of organizational units to place computer accounts in.

  • :service_account_credentials (Types::ServiceAccountCredentials)

    The AccountName and AccountPassword values for the service account, which are used by the streaming instance to connect to the directory

Returns:

See Also:



1020
1021
1022
1023
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 1020

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

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

Updates an existing fleet. All the attributes except the fleet name can be updated in the STOPPED state. When a fleet is in the RUNNING state, only DisplayName and ComputeCapacity can be updated. A fleet cannot be updated in a status of STARTING or STOPPING.

Examples:

Request syntax with placeholder values


resp = client.update_fleet({
  image_name: "String",
  name: "String", # required
  instance_type: "String",
  compute_capacity: {
    desired_instances: 1, # required
  },
  vpc_config: {
    subnet_ids: ["String"],
    security_group_ids: ["String"],
  },
  max_user_duration_in_seconds: 1,
  disconnect_timeout_in_seconds: 1,
  delete_vpc_config: false,
  description: "Description",
  display_name: "DisplayName",
  enable_default_internet_access: false,
  domain_join_info: {
    directory_name: "DirectoryName",
    organizational_unit_distinguished_name: "OrganizationalUnitDistinguishedName",
  },
  attributes_to_delete: ["VPC_CONFIGURATION"], # accepts VPC_CONFIGURATION, VPC_CONFIGURATION_SECURITY_GROUP_IDS, DOMAIN_JOIN_INFO
})

Response structure


resp.fleet.arn #=> String
resp.fleet.name #=> String
resp.fleet.display_name #=> String
resp.fleet.description #=> String
resp.fleet.image_name #=> String
resp.fleet.instance_type #=> String
resp.fleet.compute_capacity_status.desired #=> Integer
resp.fleet.compute_capacity_status.running #=> Integer
resp.fleet.compute_capacity_status.in_use #=> Integer
resp.fleet.compute_capacity_status.available #=> Integer
resp.fleet.max_user_duration_in_seconds #=> Integer
resp.fleet.disconnect_timeout_in_seconds #=> Integer
resp.fleet.state #=> String, one of "STARTING", "RUNNING", "STOPPING", "STOPPED"
resp.fleet.vpc_config.subnet_ids #=> Array
resp.fleet.vpc_config.subnet_ids[0] #=> String
resp.fleet.vpc_config.security_group_ids #=> Array
resp.fleet.vpc_config.security_group_ids[0] #=> String
resp.fleet.created_time #=> Time
resp.fleet.fleet_errors #=> Array
resp.fleet.fleet_errors[0].error_code #=> String, one of "IAM_SERVICE_ROLE_MISSING_ENI_DESCRIBE_ACTION", "IAM_SERVICE_ROLE_MISSING_ENI_CREATE_ACTION", "IAM_SERVICE_ROLE_MISSING_ENI_DELETE_ACTION", "NETWORK_INTERFACE_LIMIT_EXCEEDED", "INTERNAL_SERVICE_ERROR", "IAM_SERVICE_ROLE_IS_MISSING", "SUBNET_HAS_INSUFFICIENT_IP_ADDRESSES", "IAM_SERVICE_ROLE_MISSING_DESCRIBE_SUBNET_ACTION", "SUBNET_NOT_FOUND", "IMAGE_NOT_FOUND", "INVALID_SUBNET_CONFIGURATION", "SECURITY_GROUPS_NOT_FOUND", "IAM_SERVICE_ROLE_MISSING_DESCRIBE_SECURITY_GROUPS_ACTION", "DOMAIN_JOIN_ERROR_FILE_NOT_FOUND", "DOMAIN_JOIN_ERROR_ACCESS_DENIED", "DOMAIN_JOIN_ERROR_LOGON_FAILURE", "DOMAIN_JOIN_ERROR_INVALID_PARAMETER", "DOMAIN_JOIN_ERROR_MORE_DATA", "DOMAIN_JOIN_ERROR_NO_SUCH_DOMAIN", "DOMAIN_JOIN_ERROR_NOT_SUPPORTED", "DOMAIN_JOIN_NERR_INVALID_WORKGROUP_NAME", "DOMAIN_JOIN_NERR_WORKSTATION_NOT_STARTED", "DOMAIN_JOIN_ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED", "DOMAIN_JOIN_NERR_PASSWORD_EXPIRED", "DOMAIN_JOIN_INTERNAL_SERVICE_ERROR"
resp.fleet.fleet_errors[0].error_message #=> String
resp.fleet.enable_default_internet_access #=> Boolean
resp.fleet.domain_join_info.directory_name #=> String
resp.fleet.domain_join_info.organizational_unit_distinguished_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :image_name (String)

    The image name from which a fleet is created.

  • :name (required, String)

    The name of the fleet.

  • :instance_type (String)

    The instance type of compute resources for the fleet. Fleet instances are launched from this instance type. Available instance types are:

    • stream.standard.medium

    • stream.standard.large

    • stream.compute.large

    • stream.compute.xlarge

    • stream.compute.2xlarge

    • stream.compute.4xlarge

    • stream.compute.8xlarge

    • stream.memory.large

    • stream.memory.xlarge

    • stream.memory.2xlarge

    • stream.memory.4xlarge

    • stream.memory.8xlarge

  • :compute_capacity (Types::ComputeCapacity)

    The parameters for the capacity allocated to the fleet.

  • :vpc_config (Types::VpcConfig)

    The VPC configuration for the fleet.

  • :max_user_duration_in_seconds (Integer)

    The maximum time for which a streaming session can run. The input can be any numeric value in seconds between 600 and 57600.

  • :disconnect_timeout_in_seconds (Integer)

    The time after disconnection when a session is considered to have ended. If a user who got disconnected reconnects within this timeout interval, the user is connected back to their previous session. The input can be any numeric value in seconds between 60 and 57600.

  • :delete_vpc_config (Boolean)

    Delete the VPC association for the specified fleet.

  • :description (String)

    The description displayed to end users on the AppStream 2.0 portal.

  • :display_name (String)

    The name displayed to end users on the AppStream 2.0 portal.

  • :enable_default_internet_access (Boolean)

    Enables or disables default internet access for the fleet.

  • :domain_join_info (Types::DomainJoinInfo)

    The DirectoryName and OrganizationalUnitDistinguishedName values, which are used to join domains for the AppStream 2.0 streaming instances.

  • :attributes_to_delete (Array<String>)

    Fleet attributes to be deleted.

Returns:

See Also:



1162
1163
1164
1165
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 1162

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

#update_stack(params = {}) ⇒ Types::UpdateStackResult

Updates the specified fields in the stack with the specified name.

Examples:

Request syntax with placeholder values


resp = client.update_stack({
  display_name: "DisplayName",
  description: "Description",
  name: "String", # required
  storage_connectors: [
    {
      connector_type: "HOMEFOLDERS", # required, accepts HOMEFOLDERS
      resource_identifier: "ResourceIdentifier",
    },
  ],
  delete_storage_connectors: false,
})

Response structure


resp.stack.arn #=> String
resp.stack.name #=> String
resp.stack.description #=> String
resp.stack.display_name #=> String
resp.stack.created_time #=> Time
resp.stack.storage_connectors #=> Array
resp.stack.storage_connectors[0].connector_type #=> String, one of "HOMEFOLDERS"
resp.stack.storage_connectors[0].resource_identifier #=> String
resp.stack.stack_errors #=> Array
resp.stack.stack_errors[0].error_code #=> String, one of "STORAGE_CONNECTOR_ERROR", "INTERNAL_SERVICE_ERROR"
resp.stack.stack_errors[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :display_name (String)

    The name displayed to end users on the AppStream 2.0 portal.

  • :description (String)

    The description displayed to end users on the AppStream 2.0 portal.

  • :name (required, String)

    The name of the stack to update.

  • :storage_connectors (Array<Types::StorageConnector>)

    The storage connectors to be enabled for the stack.

  • :delete_storage_connectors (Boolean)

    Remove all the storage connectors currently enabled for the stack.

Returns:

See Also:



1221
1222
1223
1224
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 1221

def update_stack(params = {}, options = {})
  req = build_request(:update_stack, 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
fleet_started #describe_fleets 30 40
fleet_stopped #describe_fleets 30 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.



1332
1333
1334
1335
1336
# File 'gems/aws-sdk-appstream/lib/aws-sdk-appstream/client.rb', line 1332

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