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

Class: Aws::WorkSpaces::Client

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



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

def initialize(*args)
  super
end

Instance Method Details

#associate_ip_groups(params = {}) ⇒ Struct

Associates the specified IP access control group with the specified directory.

Examples:

Request syntax with placeholder values


resp = client.associate_ip_groups({
  directory_id: "DirectoryId", # required
  group_ids: ["IpGroupId"], # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The ID of the directory.

  • :group_ids (required, Array<String>)

    The IDs of one or more IP access control groups.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



191
192
193
194
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 191

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

#authorize_ip_rules(params = {}) ⇒ Struct

Adds one or more rules to the specified IP access control group.

This action gives users permission to access their WorkSpaces from the CIDR address ranges specified in the rules.

Examples:

Request syntax with placeholder values


resp = client.authorize_ip_rules({
  group_id: "IpGroupId", # required
  user_rules: [ # required
    {
      ip_rule: "IpRule",
      rule_desc: "IpRuleDesc",
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :group_id (required, String)

    The ID of the group.

  • :user_rules (required, Array<Types::IpRuleItem>)

    The rules to add to the group.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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

#create_ip_group(params = {}) ⇒ Types::CreateIpGroupResult

Creates an IP access control group.

An IP access control group provides you with the ability to control the IP addresses from which users are allowed to access their WorkSpaces. To specify the CIDR address ranges, add rules to your IP access control group and then associate the group with your directory. You can add rules when you create the group or at any time using AuthorizeIpRules.

There is a default IP access control group associated with your directory. If you don't associate an IP access control group with your directory, the default group is used. The default group includes a default rule that allows users to access their WorkSpaces from anywhere. You cannot modify the default IP access control group for your directory.

Examples:

Request syntax with placeholder values


resp = client.create_ip_group({
  group_name: "IpGroupName", # required
  group_desc: "IpGroupDesc",
  user_rules: [
    {
      ip_rule: "IpRule",
      rule_desc: "IpRuleDesc",
    },
  ],
})

Response structure


resp.group_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :group_name (required, String)

    The name of the group.

  • :group_desc (String)

    The description of the group.

  • :user_rules (Array<Types::IpRuleItem>)

    The rules to add to the group.

Returns:

See Also:



280
281
282
283
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 280

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

#create_tags(params = {}) ⇒ Struct

Creates the specified tags for the specified WorkSpace.

Examples:

Request syntax with placeholder values


resp = client.create_tags({
  resource_id: "NonEmptyString", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_id (required, String)

    The ID of the WorkSpace. To find this ID, use DescribeWorkspaces.

  • :tags (required, Array<Types::Tag>)

    The tags. Each WorkSpace can have a maximum of 50 tags.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



311
312
313
314
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 311

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

#create_workspaces(params = {}) ⇒ Types::CreateWorkspacesResult

Creates one or more WorkSpaces.

This operation is asynchronous and returns before the WorkSpaces are created.

Examples:

Request syntax with placeholder values


resp = client.create_workspaces({
  workspaces: [ # required
    {
      directory_id: "DirectoryId", # required
      user_name: "UserName", # required
      bundle_id: "BundleId", # required
      volume_encryption_key: "VolumeEncryptionKey",
      user_volume_encryption_enabled: false,
      root_volume_encryption_enabled: false,
      workspace_properties: {
        running_mode: "AUTO_STOP", # accepts AUTO_STOP, ALWAYS_ON
        running_mode_auto_stop_timeout_in_minutes: 1,
        root_volume_size_gib: 1,
        user_volume_size_gib: 1,
        compute_type_name: "VALUE", # accepts VALUE, STANDARD, PERFORMANCE, POWER, GRAPHICS
      },
      tags: [
        {
          key: "TagKey", # required
          value: "TagValue",
        },
      ],
    },
  ],
})

Response structure


resp.failed_requests #=> Array
resp.failed_requests[0].workspace_request.directory_id #=> String
resp.failed_requests[0].workspace_request.user_name #=> String
resp.failed_requests[0].workspace_request.bundle_id #=> String
resp.failed_requests[0].workspace_request.volume_encryption_key #=> String
resp.failed_requests[0].workspace_request.user_volume_encryption_enabled #=> Boolean
resp.failed_requests[0].workspace_request.root_volume_encryption_enabled #=> Boolean
resp.failed_requests[0].workspace_request.workspace_properties.running_mode #=> String, one of "AUTO_STOP", "ALWAYS_ON"
resp.failed_requests[0].workspace_request.workspace_properties.running_mode_auto_stop_timeout_in_minutes #=> Integer
resp.failed_requests[0].workspace_request.workspace_properties.root_volume_size_gib #=> Integer
resp.failed_requests[0].workspace_request.workspace_properties.user_volume_size_gib #=> Integer
resp.failed_requests[0].workspace_request.workspace_properties.compute_type_name #=> String, one of "VALUE", "STANDARD", "PERFORMANCE", "POWER", "GRAPHICS"
resp.failed_requests[0].workspace_request.tags #=> Array
resp.failed_requests[0].workspace_request.tags[0].key #=> String
resp.failed_requests[0].workspace_request.tags[0].value #=> String
resp.failed_requests[0].error_code #=> String
resp.failed_requests[0].error_message #=> String
resp.pending_requests #=> Array
resp.pending_requests[0].workspace_id #=> String
resp.pending_requests[0].directory_id #=> String
resp.pending_requests[0].user_name #=> String
resp.pending_requests[0].ip_address #=> String
resp.pending_requests[0].state #=> String, one of "PENDING", "AVAILABLE", "IMPAIRED", "UNHEALTHY", "REBOOTING", "STARTING", "REBUILDING", "MAINTENANCE", "ADMIN_MAINTENANCE", "TERMINATING", "TERMINATED", "SUSPENDED", "UPDATING", "STOPPING", "STOPPED", "ERROR"
resp.pending_requests[0].bundle_id #=> String
resp.pending_requests[0].subnet_id #=> String
resp.pending_requests[0].error_message #=> String
resp.pending_requests[0].error_code #=> String
resp.pending_requests[0].computer_name #=> String
resp.pending_requests[0].volume_encryption_key #=> String
resp.pending_requests[0].user_volume_encryption_enabled #=> Boolean
resp.pending_requests[0].root_volume_encryption_enabled #=> Boolean
resp.pending_requests[0].workspace_properties.running_mode #=> String, one of "AUTO_STOP", "ALWAYS_ON"
resp.pending_requests[0].workspace_properties.running_mode_auto_stop_timeout_in_minutes #=> Integer
resp.pending_requests[0].workspace_properties.root_volume_size_gib #=> Integer
resp.pending_requests[0].workspace_properties.user_volume_size_gib #=> Integer
resp.pending_requests[0].workspace_properties.compute_type_name #=> String, one of "VALUE", "STANDARD", "PERFORMANCE", "POWER", "GRAPHICS"
resp.pending_requests[0].modification_states #=> Array
resp.pending_requests[0].modification_states[0].resource #=> String, one of "ROOT_VOLUME", "USER_VOLUME", "COMPUTE_TYPE"
resp.pending_requests[0].modification_states[0].state #=> String, one of "UPDATE_INITIATED", "UPDATE_IN_PROGRESS"

Parameters:

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

    ({})

Options Hash (params):

  • :workspaces (required, Array<Types::WorkspaceRequest>)

    The WorkSpaces to create. You can specify up to 25 WorkSpaces.

Returns:

See Also:



403
404
405
406
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 403

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

#delete_ip_group(params = {}) ⇒ Struct

Deletes the specified IP access control group.

You cannot delete an IP access control group that is associated with a directory.

Examples:

Request syntax with placeholder values


resp = client.delete_ip_group({
  group_id: "IpGroupId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :group_id (required, String)

    The ID of the IP access control group.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



428
429
430
431
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 428

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

#delete_tags(params = {}) ⇒ Struct

Deletes the specified tags from the specified WorkSpace.

Examples:

Request syntax with placeholder values


resp = client.delete_tags({
  resource_id: "NonEmptyString", # required
  tag_keys: ["NonEmptyString"], # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_id (required, String)

    The ID of the WorkSpace. To find this ID, use DescribeWorkspaces.

  • :tag_keys (required, Array<String>)

    The tag keys.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



454
455
456
457
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 454

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

#describe_ip_groups(params = {}) ⇒ Types::DescribeIpGroupsResult

Describes one or more of your IP access control groups.

Examples:

Request syntax with placeholder values


resp = client.describe_ip_groups({
  group_ids: ["IpGroupId"],
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.result #=> Array
resp.result[0].group_id #=> String
resp.result[0].group_name #=> String
resp.result[0].group_desc #=> String
resp.result[0].user_rules #=> Array
resp.result[0].user_rules[0].ip_rule #=> String
resp.result[0].user_rules[0].rule_desc #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :group_ids (Array<String>)

    The IDs of one or more IP access control groups.

  • :next_token (String)

    The token for the next set of results. (You received this token from a previous call.)

  • :max_results (Integer)

    The maximum number of items to return.

Returns:

See Also:



499
500
501
502
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 499

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

#describe_tags(params = {}) ⇒ Types::DescribeTagsResult

Describes the specified tags for the specified WorkSpace.

Examples:

Request syntax with placeholder values


resp = client.describe_tags({
  resource_id: "NonEmptyString", # required
})

Response structure


resp.tag_list #=> Array
resp.tag_list[0].key #=> String
resp.tag_list[0].value #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_id (required, String)

    The ID of the WorkSpace. To find this ID, use DescribeWorkspaces.

Returns:

See Also:



529
530
531
532
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 529

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

#describe_workspace_bundles(params = {}) ⇒ Types::DescribeWorkspaceBundlesResult

Describes the available WorkSpace bundles.

You can filter the results using either bundle ID or owner, but not both.

Examples:

Request syntax with placeholder values


resp = client.describe_workspace_bundles({
  bundle_ids: ["BundleId"],
  owner: "BundleOwner",
  next_token: "PaginationToken",
})

Response structure


resp.bundles #=> Array
resp.bundles[0].bundle_id #=> String
resp.bundles[0].name #=> String
resp.bundles[0].owner #=> String
resp.bundles[0].description #=> String
resp.bundles[0].root_storage.capacity #=> String
resp.bundles[0].user_storage.capacity #=> String
resp.bundles[0].compute_type.name #=> String, one of "VALUE", "STANDARD", "PERFORMANCE", "POWER", "GRAPHICS"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :bundle_ids (Array<String>)

    The IDs of the bundles. This parameter cannot be combined with any other filter.

  • :owner (String)

    The owner of the bundles. This parameter cannot be combined with any other filter.

    Specify AMAZON to describe the bundles provided by AWS or null to describe the bundles that belong to your account.

  • :next_token (String)

    The token for the next set of results. (You received this token from a previous call.)

Returns:

See Also:



583
584
585
586
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 583

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

#describe_workspace_directories(params = {}) ⇒ Types::DescribeWorkspaceDirectoriesResult

Describes the available AWS Directory Service directories that are registered with Amazon WorkSpaces.

Examples:

Request syntax with placeholder values


resp = client.describe_workspace_directories({
  directory_ids: ["DirectoryId"],
  next_token: "PaginationToken",
})

Response structure


resp.directories #=> Array
resp.directories[0].directory_id #=> String
resp.directories[0].alias #=> String
resp.directories[0].directory_name #=> String
resp.directories[0].registration_code #=> String
resp.directories[0].subnet_ids #=> Array
resp.directories[0].subnet_ids[0] #=> String
resp.directories[0].dns_ip_addresses #=> Array
resp.directories[0].dns_ip_addresses[0] #=> String
resp.directories[0].customer_user_name #=> String
resp.directories[0].iam_role_id #=> String
resp.directories[0].directory_type #=> String, one of "SIMPLE_AD", "AD_CONNECTOR"
resp.directories[0].workspace_security_group_id #=> String
resp.directories[0].state #=> String, one of "REGISTERING", "REGISTERED", "DEREGISTERING", "DEREGISTERED", "ERROR"
resp.directories[0].workspace_creation_properties.enable_work_docs #=> Boolean
resp.directories[0].workspace_creation_properties.enable_internet_access #=> Boolean
resp.directories[0].workspace_creation_properties.default_ou #=> String
resp.directories[0].workspace_creation_properties.custom_security_group_id #=> String
resp.directories[0].workspace_creation_properties.user_enabled_as_local_administrator #=> Boolean
resp.directories[0].ip_group_ids #=> Array
resp.directories[0].ip_group_ids[0] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :directory_ids (Array<String>)

    The identifiers of the directories. If the value is null, all directories are retrieved.

  • :next_token (String)

    The token for the next set of results. (You received this token from a previous call.)

Returns:

See Also:



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

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

#describe_workspaces(params = {}) ⇒ Types::DescribeWorkspacesResult

Describes the specified WorkSpaces.

You can filter the results using bundle ID, directory ID, or owner, but you can specify only one filter at a time.

Examples:

Request syntax with placeholder values


resp = client.describe_workspaces({
  workspace_ids: ["WorkspaceId"],
  directory_id: "DirectoryId",
  user_name: "UserName",
  bundle_id: "BundleId",
  limit: 1,
  next_token: "PaginationToken",
})

Response structure


resp.workspaces #=> Array
resp.workspaces[0].workspace_id #=> String
resp.workspaces[0].directory_id #=> String
resp.workspaces[0].user_name #=> String
resp.workspaces[0].ip_address #=> String
resp.workspaces[0].state #=> String, one of "PENDING", "AVAILABLE", "IMPAIRED", "UNHEALTHY", "REBOOTING", "STARTING", "REBUILDING", "MAINTENANCE", "ADMIN_MAINTENANCE", "TERMINATING", "TERMINATED", "SUSPENDED", "UPDATING", "STOPPING", "STOPPED", "ERROR"
resp.workspaces[0].bundle_id #=> String
resp.workspaces[0].subnet_id #=> String
resp.workspaces[0].error_message #=> String
resp.workspaces[0].error_code #=> String
resp.workspaces[0].computer_name #=> String
resp.workspaces[0].volume_encryption_key #=> String
resp.workspaces[0].user_volume_encryption_enabled #=> Boolean
resp.workspaces[0].root_volume_encryption_enabled #=> Boolean
resp.workspaces[0].workspace_properties.running_mode #=> String, one of "AUTO_STOP", "ALWAYS_ON"
resp.workspaces[0].workspace_properties.running_mode_auto_stop_timeout_in_minutes #=> Integer
resp.workspaces[0].workspace_properties.root_volume_size_gib #=> Integer
resp.workspaces[0].workspace_properties.user_volume_size_gib #=> Integer
resp.workspaces[0].workspace_properties.compute_type_name #=> String, one of "VALUE", "STANDARD", "PERFORMANCE", "POWER", "GRAPHICS"
resp.workspaces[0].modification_states #=> Array
resp.workspaces[0].modification_states[0].resource #=> String, one of "ROOT_VOLUME", "USER_VOLUME", "COMPUTE_TYPE"
resp.workspaces[0].modification_states[0].state #=> String, one of "UPDATE_INITIATED", "UPDATE_IN_PROGRESS"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :workspace_ids (Array<String>)

    The IDs of the WorkSpaces. This parameter cannot be combined with any other filter.

    Because the CreateWorkspaces operation is asynchronous, the identifier it returns is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information is returned.

  • :directory_id (String)

    The ID of the directory. In addition, you can optionally specify a specific directory user (see UserName). This parameter cannot be combined with any other filter.

  • :user_name (String)

    The name of the directory user. You must specify this parameter with DirectoryId.

  • :bundle_id (String)

    The ID of the bundle. All WorkSpaces that are created from this bundle are retrieved. This parameter cannot be combined with any other filter.

  • :limit (Integer)

    The maximum number of items to return.

  • :next_token (String)

    The token for the next set of results. (You received this token from a previous call.)

Returns:

See Also:



725
726
727
728
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 725

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

#describe_workspaces_connection_status(params = {}) ⇒ Types::DescribeWorkspacesConnectionStatusResult

Describes the connection status of the specified WorkSpaces.

Examples:

Request syntax with placeholder values


resp = client.describe_workspaces_connection_status({
  workspace_ids: ["WorkspaceId"],
  next_token: "PaginationToken",
})

Response structure


resp.workspaces_connection_status #=> Array
resp.workspaces_connection_status[0].workspace_id #=> String
resp.workspaces_connection_status[0].connection_state #=> String, one of "CONNECTED", "DISCONNECTED", "UNKNOWN"
resp.workspaces_connection_status[0].connection_state_check_timestamp #=> Time
resp.workspaces_connection_status[0].last_known_user_connection_timestamp #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :workspace_ids (Array<String>)

    The identifiers of the WorkSpaces. You can specify up to 25 WorkSpaces.

  • :next_token (String)

    The token for the next set of results. (You received this token from a previous call.)

Returns:

See Also:



765
766
767
768
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 765

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

#disassociate_ip_groups(params = {}) ⇒ Struct

Disassociates the specified IP access control group from the specified directory.

Examples:

Request syntax with placeholder values


resp = client.disassociate_ip_groups({
  directory_id: "DirectoryId", # required
  group_ids: ["IpGroupId"], # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The ID of the directory.

  • :group_ids (required, Array<String>)

    The IDs of one or more IP access control groups.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



792
793
794
795
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 792

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

#modify_workspace_properties(params = {}) ⇒ Struct

Modifies the specified WorkSpace properties.

Examples:

Request syntax with placeholder values


resp = client.modify_workspace_properties({
  workspace_id: "WorkspaceId", # required
  workspace_properties: { # required
    running_mode: "AUTO_STOP", # accepts AUTO_STOP, ALWAYS_ON
    running_mode_auto_stop_timeout_in_minutes: 1,
    root_volume_size_gib: 1,
    user_volume_size_gib: 1,
    compute_type_name: "VALUE", # accepts VALUE, STANDARD, PERFORMANCE, POWER, GRAPHICS
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :workspace_id (required, String)

    The ID of the WorkSpace.

  • :workspace_properties (required, Types::WorkspaceProperties)

    The properties of the WorkSpace.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



824
825
826
827
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 824

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

#modify_workspace_state(params = {}) ⇒ Struct

Sets the state of the specified WorkSpace.

To maintain a WorkSpace without being interrupted, set the WorkSpace state to ADMIN_MAINTENANCE. WorkSpaces in this state do not respond to requests to reboot, stop, start, or rebuild. An AutoStop WorkSpace in this state is not stopped. Users can log into a WorkSpace in the ADMIN_MAINTENANCE state.

Examples:

Request syntax with placeholder values


resp = client.modify_workspace_state({
  workspace_id: "WorkspaceId", # required
  workspace_state: "AVAILABLE", # required, accepts AVAILABLE, ADMIN_MAINTENANCE
})

Parameters:

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

    ({})

Options Hash (params):

  • :workspace_id (required, String)

    The ID of the WorkSpace.

  • :workspace_state (required, String)

    The WorkSpace state.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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

#reboot_workspaces(params = {}) ⇒ Types::RebootWorkspacesResult

Reboots the specified WorkSpaces.

You cannot reboot a WorkSpace unless its state is AVAILABLE or UNHEALTHY.

This operation is asynchronous and returns before the WorkSpaces have rebooted.

Examples:

Request syntax with placeholder values


resp = client.reboot_workspaces({
  reboot_workspace_requests: [ # required
    {
      workspace_id: "WorkspaceId", # required
    },
  ],
})

Response structure


resp.failed_requests #=> Array
resp.failed_requests[0].workspace_id #=> String
resp.failed_requests[0].error_code #=> String
resp.failed_requests[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :reboot_workspace_requests (required, Array<Types::RebootRequest>)

    The WorkSpaces to reboot. You can specify up to 25 WorkSpaces.

Returns:

See Also:



897
898
899
900
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 897

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

#rebuild_workspaces(params = {}) ⇒ Types::RebuildWorkspacesResult

Rebuilds the specified WorkSpace.

You cannot rebuild a WorkSpace unless its state is AVAILABLE, ERROR, or UNHEALTHY.

Rebuilding a WorkSpace is a potentially destructive action that can result in the loss of data. For more information, see Rebuild a WorkSpace.

This operation is asynchronous and returns before the WorkSpaces have been completely rebuilt.

Examples:

Request syntax with placeholder values


resp = client.rebuild_workspaces({
  rebuild_workspace_requests: [ # required
    {
      workspace_id: "WorkspaceId", # required
    },
  ],
})

Response structure


resp.failed_requests #=> Array
resp.failed_requests[0].workspace_id #=> String
resp.failed_requests[0].error_code #=> String
resp.failed_requests[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :rebuild_workspace_requests (required, Array<Types::RebuildRequest>)

    The WorkSpace to rebuild. You can specify a single WorkSpace.

Returns:

See Also:



946
947
948
949
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 946

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

#revoke_ip_rules(params = {}) ⇒ Struct

Removes one or more rules from the specified IP access control group.

Examples:

Request syntax with placeholder values


resp = client.revoke_ip_rules({
  group_id: "IpGroupId", # required
  user_rules: ["IpRule"], # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :group_id (required, String)

    The ID of the group.

  • :user_rules (required, Array<String>)

    The rules to remove from the group.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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

#start_workspaces(params = {}) ⇒ Types::StartWorkspacesResult

Starts the specified WorkSpaces.

You cannot start a WorkSpace unless it has a running mode of AutoStop and a state of STOPPED.

Examples:

Request syntax with placeholder values


resp = client.start_workspaces({
  start_workspace_requests: [ # required
    {
      workspace_id: "WorkspaceId",
    },
  ],
})

Response structure


resp.failed_requests #=> Array
resp.failed_requests[0].workspace_id #=> String
resp.failed_requests[0].error_code #=> String
resp.failed_requests[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :start_workspace_requests (required, Array<Types::StartRequest>)

    The WorkSpaces to start. You can specify up to 25 WorkSpaces.

Returns:

See Also:



1010
1011
1012
1013
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 1010

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

#stop_workspaces(params = {}) ⇒ Types::StopWorkspacesResult

Stops the specified WorkSpaces.

You cannot stop a WorkSpace unless it has a running mode of AutoStop and a state of AVAILABLE, IMPAIRED, UNHEALTHY, or ERROR.

Examples:

Request syntax with placeholder values


resp = client.stop_workspaces({
  stop_workspace_requests: [ # required
    {
      workspace_id: "WorkspaceId",
    },
  ],
})

Response structure


resp.failed_requests #=> Array
resp.failed_requests[0].workspace_id #=> String
resp.failed_requests[0].error_code #=> String
resp.failed_requests[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :stop_workspace_requests (required, Array<Types::StopRequest>)

    The WorkSpaces to stop. You can specify up to 25 WorkSpaces.

Returns:

See Also:



1048
1049
1050
1051
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 1048

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

#terminate_workspaces(params = {}) ⇒ Types::TerminateWorkspacesResult

Terminates the specified WorkSpaces.

Terminating a WorkSpace is a permanent action and cannot be undone. The user's data is destroyed. If you need to archive any user data, contact Amazon Web Services before terminating the WorkSpace.

You can terminate a WorkSpace that is in any state except SUSPENDED.

This operation is asynchronous and returns before the WorkSpaces have been completely terminated.

Examples:

Request syntax with placeholder values


resp = client.terminate_workspaces({
  terminate_workspace_requests: [ # required
    {
      workspace_id: "WorkspaceId", # required
    },
  ],
})

Response structure


resp.failed_requests #=> Array
resp.failed_requests[0].workspace_id #=> String
resp.failed_requests[0].error_code #=> String
resp.failed_requests[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :terminate_workspace_requests (required, Array<Types::TerminateRequest>)

    The WorkSpaces to terminate. You can specify up to 25 WorkSpaces.

Returns:

See Also:



1092
1093
1094
1095
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 1092

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

#update_rules_of_ip_group(params = {}) ⇒ Struct

Replaces the current rules of the specified IP access control group with the specified rules.

Examples:

Request syntax with placeholder values


resp = client.update_rules_of_ip_group({
  group_id: "IpGroupId", # required
  user_rules: [ # required
    {
      ip_rule: "IpRule",
      rule_desc: "IpRuleDesc",
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :group_id (required, String)

    The ID of the group.

  • :user_rules (required, Array<Types::IpRuleItem>)

    One or more rules.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1124
1125
1126
1127
# File 'gems/aws-sdk-workspaces/lib/aws-sdk-workspaces/client.rb', line 1124

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