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

Class: Aws::AlexaForBusiness::Client

Inherits:
Seahorse::Client::Base show all
Defined in:
(unknown)

Overview

An API client for Alexa For Business. To construct a client, you need to configure a :region and :credentials.

alexaforbusiness = Aws::AlexaForBusiness::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'] and ENV['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::AlexaForBusiness::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

#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

Constructor Details

#initialize(options = {}) ⇒ Aws::AlexaForBusiness::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types. See Plugins::ParamConverter for more details.

  • :credentials (required, Credentials)

    Your AWS credentials. The following locations will be searched in order for credentials:

    • :access_key_id, :secret_access_key, and :session_token options
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • HOME/.aws/credentials shared credentials file
    • EC2 instance profile credentials See Plugins::RequestSigner for more details.
  • :endpoint (String)

    A default endpoint is constructed from the :region. See Plugins::RegionalEndpoint for more details.

  • :http_continue_timeout (Float) — default: 1

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_idle_timeout (Integer) — default: 5

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_open_timeout (Integer) — default: 15

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_proxy (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_read_timeout (Integer) — default: 60

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_wire_trace (Boolean) — default: false

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the logger at. See Plugins::Logging for more details.

  • :log_formatter (Logging::LogFormatter)

    The log formatter. Defaults to Seahorse::Client::Logging::Formatter.default. See Plugins::Logging for more details.

  • :logger (Logger) — default: nil

    The Logger instance to send log messages to. If this option is not set, logging will be disabled. See Plugins::Logging for more details.

  • :profile (String)

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used. See Plugins::RequestSigner for more details.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised. See Seahorse::Client::Plugins::RaiseResponseErrors for more details.

  • :region (required, String)

    The AWS region to connect to. The region is used to construct the client endpoint. Defaults to ENV['AWS_REGION']. Also checks AMAZON_REGION and AWS_DEFAULT_REGION. See Plugins::RegionalEndpoint for more details.

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials. See Plugins::RetryErrors for more details.

  • :secret_access_key (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :session_token (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects. See Plugins::Protocols::JsonRpc for more details.

  • :ssl_ca_bundle (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_directory (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_store (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_verify_peer (Boolean) — default: true

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled. See Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request. See Plugins::ParamValidator for more details.

Instance Method Details

#associate_contact_with_address_book(options = {}) ⇒ Struct

Associates a contact with a given address book.

Examples:

Request syntax with placeholder values


resp = client.associate_contact_with_address_book({
  contact_arn: "Arn", # required
  address_book_arn: "Arn", # required
})

Options Hash (options):

  • :contact_arn (required, String)

    The ARN of the contact to associate with an address book.

  • :address_book_arn (required, String)

    The ARN of the address book with which to associate the contact.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#associate_device_with_room(options = {}) ⇒ Struct

Associates a device with a given room. This applies all the settings from the room profile to the device, and all the skills in any skill groups added to that room. This operation requires the device to be online, or else a manual sync is required.

Examples:

Request syntax with placeholder values


resp = client.associate_device_with_room({
  device_arn: "Arn",
  room_arn: "Arn",
})

Options Hash (options):

  • :device_arn (String)

    The ARN of the device to associate to a room. Required.

  • :room_arn (String)

    The ARN of the room with which to associate the device. Required.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#associate_skill_group_with_room(options = {}) ⇒ Struct

Associates a skill group with a given room. This enables all skills in the associated skill group on all devices in the room.

Examples:

Request syntax with placeholder values


resp = client.associate_skill_group_with_room({
  skill_group_arn: "Arn",
  room_arn: "Arn",
})

Options Hash (options):

  • :skill_group_arn (String)

    The ARN of the skill group to associate with a room. Required.

  • :room_arn (String)

    The ARN of the room with which to associate the skill group. Required.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#create_address_book(options = {}) ⇒ Types::CreateAddressBookResponse

Creates an address book with the specified details.

Examples:

Request syntax with placeholder values


resp = client.create_address_book({
  name: "AddressBookName", # required
  description: "AddressBookDescription",
  client_request_token: "ClientRequestToken",
})

Response structure


resp.address_book_arn #=> String

Options Hash (options):

  • :name (required, String)

    The name of the address book.

  • :description (String)

    The description of the address book.

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. A unique, user-specified identifier for the request that ensures idempotency.

Returns:

See Also:

#create_contact(options = {}) ⇒ Types::CreateContactResponse

Creates a contact with the specified details.

Examples:

Request syntax with placeholder values


resp = client.create_contact({
  display_name: "ContactName",
  first_name: "ContactName", # required
  last_name: "ContactName",
  phone_number: "E164PhoneNumber", # required
  client_request_token: "ClientRequestToken",
})

Response structure


resp.contact_arn #=> String

Options Hash (options):

  • :display_name (String)

    The name of the contact to display on the console.

  • :first_name (required, String)

    The first name of the contact that is used to call the contact on the device.

  • :last_name (String)

    The last name of the contact that is used to call the contact on the device.

  • :phone_number (required, String)

    The phone number of the contact in E.164 format.

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. A unique, user-specified identifier for this request that ensures idempotency.

Returns:

See Also:

#create_profile(options = {}) ⇒ Types::CreateProfileResponse

Creates a new room profile with the specified details.

Examples:

Request syntax with placeholder values


resp = client.create_profile({
  profile_name: "ProfileName", # required
  timezone: "Timezone", # required
  address: "Address", # required
  distance_unit: "METRIC", # required, accepts METRIC, IMPERIAL
  temperature_unit: "FAHRENHEIT", # required, accepts FAHRENHEIT, CELSIUS
  wake_word: "ALEXA", # required, accepts ALEXA, AMAZON, ECHO, COMPUTER
  client_request_token: "ClientRequestToken",
  setup_mode_disabled: false,
  max_volume_limit: 1,
  pstn_enabled: false,
})

Response structure


resp.profile_arn #=> String

Options Hash (options):

  • :profile_name (required, String)

    The name of a room profile.

  • :timezone (required, String)

    The time zone used by a room profile.

  • :address (required, String)

    The valid address for the room.

  • :distance_unit (required, String)

    The distance unit to be used by devices in the profile.

  • :temperature_unit (required, String)

    The temperature unit to be used by devices in the profile.

  • :wake_word (required, String)

    A wake word for Alexa, Echo, Amazon, or a computer.

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. The user-specified token that is used during the creation of a profile.

  • :setup_mode_disabled (Boolean)

    Whether room profile setup is enabled.

  • :max_volume_limit (Integer)

    The maximum volume limit for a room profile.

  • :pstn_enabled (Boolean)

    Whether PSTN calling is enabled.

Returns:

See Also:

#create_room(options = {}) ⇒ Types::CreateRoomResponse

Creates a room with the specified details.

Examples:

Request syntax with placeholder values


resp = client.create_room({
  room_name: "RoomName", # required
  description: "RoomDescription",
  profile_arn: "Arn",
  provider_calendar_id: "ProviderCalendarId",
  client_request_token: "ClientRequestToken",
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.room_arn #=> String

Options Hash (options):

  • :room_name (required, String)

    The name for the room.

  • :description (String)

    The description for the room.

  • :profile_arn (String)

    The profile ARN for the room.

  • :provider_calendar_id (String)

    The calendar ARN for the room.

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. A unique, user-specified identifier for this request that ensures idempotency.

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

    The tags for the room.

Returns:

See Also:

#create_skill_group(options = {}) ⇒ Types::CreateSkillGroupResponse

Creates a skill group with a specified name and description.

Examples:

Request syntax with placeholder values


resp = client.create_skill_group({
  skill_group_name: "SkillGroupName", # required
  description: "SkillGroupDescription",
  client_request_token: "ClientRequestToken",
})

Response structure


resp.skill_group_arn #=> String

Options Hash (options):

  • :skill_group_name (required, String)

    The name for the skill group.

  • :description (String)

    The description for the skill group.

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. A unique, user-specified identifier for this request that ensures idempotency.

Returns:

See Also:

#create_user(options = {}) ⇒ Types::CreateUserResponse

Creates a user.

Examples:

Request syntax with placeholder values


resp = client.create_user({
  user_id: "user_UserId", # required
  first_name: "user_FirstName",
  last_name: "user_LastName",
  email: "Email",
  client_request_token: "ClientRequestToken",
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.user_arn #=> String

Options Hash (options):

  • :user_id (required, String)

    The ARN for the user.

  • :first_name (String)

    The first name for the user.

  • :last_name (String)

    The last name for the user.

  • :email (String)

    The email address for the user.

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. A unique, user-specified identifier for this request that ensures idempotency.

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

    The tags for the user.

Returns:

See Also:

#delete_address_book(options = {}) ⇒ Struct

Deletes an address book by the address book ARN.

Examples:

Request syntax with placeholder values


resp = client.delete_address_book({
  address_book_arn: "Arn", # required
})

Options Hash (options):

  • :address_book_arn (required, String)

    The ARN of the address book to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_contact(options = {}) ⇒ Struct

Deletes a contact by the contact ARN.

Examples:

Request syntax with placeholder values


resp = client.delete_contact({
  contact_arn: "Arn", # required
})

Options Hash (options):

  • :contact_arn (required, String)

    The ARN of the contact to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_profile(options = {}) ⇒ Struct

Deletes a room profile by the profile ARN.

Examples:

Request syntax with placeholder values


resp = client.delete_profile({
  profile_arn: "Arn",
})

Options Hash (options):

  • :profile_arn (String)

    The ARN of the room profile to delete. Required.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_room(options = {}) ⇒ Struct

Deletes a room by the room ARN.

Examples:

Request syntax with placeholder values


resp = client.delete_room({
  room_arn: "Arn",
})

Options Hash (options):

  • :room_arn (String)

    The ARN of the room to delete. Required.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_room_skill_parameter(options = {}) ⇒ Struct

Deletes room skill parameter details by room, skill, and parameter key ID.

Examples:

Request syntax with placeholder values


resp = client.delete_room_skill_parameter({
  room_arn: "Arn",
  skill_id: "SkillId", # required
  parameter_key: "RoomSkillParameterKey", # required
})

Options Hash (options):

  • :room_arn (String)

    The ARN of the room from which to remove the room skill parameter details.

  • :skill_id (required, String)

    The ID of the skill from which to remove the room skill parameter details.

  • :parameter_key (required, String)

    The room skill parameter key for which to remove details.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_skill_group(options = {}) ⇒ Struct

Deletes a skill group by skill group ARN.

Examples:

Request syntax with placeholder values


resp = client.delete_skill_group({
  skill_group_arn: "Arn",
})

Options Hash (options):

  • :skill_group_arn (String)

    The ARN of the skill group to delete. Required.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_user(options = {}) ⇒ Struct

Deletes a specified user by user ARN and enrollment ARN.

Examples:

Request syntax with placeholder values


resp = client.delete_user({
  user_arn: "Arn",
  enrollment_id: "EnrollmentId", # required
})

Options Hash (options):

  • :user_arn (String)

    The ARN of the user to delete in the organization. Required.

  • :enrollment_id (required, String)

    The ARN of the user\'s enrollment in the organization. Required.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#disassociate_contact_from_address_book(options = {}) ⇒ Struct

Disassociates a contact from a given address book.

Examples:

Request syntax with placeholder values


resp = client.disassociate_contact_from_address_book({
  contact_arn: "Arn", # required
  address_book_arn: "Arn", # required
})

Options Hash (options):

  • :contact_arn (required, String)

    The ARN of the contact to disassociate from an address book.

  • :address_book_arn (required, String)

    The ARN of the address from which to disassociate the contact.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#disassociate_device_from_room(options = {}) ⇒ Struct

Disassociates a device from its current room. The device continues to be connected to the Wi-Fi network and is still registered to the account. The device settings and skills are removed from the room.

Examples:

Request syntax with placeholder values


resp = client.disassociate_device_from_room({
  device_arn: "Arn",
})

Options Hash (options):

  • :device_arn (String)

    The ARN of the device to disassociate from a room. Required.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#disassociate_skill_group_from_room(options = {}) ⇒ Struct

Disassociates a skill group from a specified room. This disables all skills in the skill group on all devices in the room.

Examples:

Request syntax with placeholder values


resp = client.disassociate_skill_group_from_room({
  skill_group_arn: "Arn",
  room_arn: "Arn",
})

Options Hash (options):

  • :skill_group_arn (String)

    The ARN of the skill group to disassociate from a room. Required.

  • :room_arn (String)

    The ARN of the room from which the skill group is to be disassociated. Required.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#get_address_book(options = {}) ⇒ Types::GetAddressBookResponse

Gets address the book details by the address book ARN.

Examples:

Request syntax with placeholder values


resp = client.get_address_book({
  address_book_arn: "Arn", # required
})

Response structure


resp.address_book.address_book_arn #=> String
resp.address_book.name #=> String
resp.address_book.description #=> String

Options Hash (options):

  • :address_book_arn (required, String)

    The ARN of the address book for which to request details.

Returns:

See Also:

#get_contact(options = {}) ⇒ Types::GetContactResponse

Gets the contact details by the contact ARN.

Examples:

Request syntax with placeholder values


resp = client.get_contact({
  contact_arn: "Arn", # required
})

Response structure


resp.contact.contact_arn #=> String
resp.contact.display_name #=> String
resp.contact.first_name #=> String
resp.contact.last_name #=> String
resp.contact.phone_number #=> String

Options Hash (options):

  • :contact_arn (required, String)

    The ARN of the contact for which to request details.

Returns:

See Also:

#get_device(options = {}) ⇒ Types::GetDeviceResponse

Gets the details of a device by device ARN.

Examples:

Request syntax with placeholder values


resp = client.get_device({
  device_arn: "Arn",
})

Response structure


resp.device.device_arn #=> String
resp.device.device_serial_number #=> String
resp.device.device_type #=> String
resp.device.device_name #=> String
resp.device.software_version #=> String
resp.device.mac_address #=> String
resp.device.room_arn #=> String
resp.device.device_status #=> String, one of "READY", "PENDING", "WAS_OFFLINE", "DEREGISTERED"
resp.device.device_status_info.device_status_details #=> Array
resp.device.device_status_info.device_status_details[0].code #=> String, one of "DEVICE_SOFTWARE_UPDATE_NEEDED", "DEVICE_WAS_OFFLINE"
resp.device.device_status_info.connection_status #=> String, one of "ONLINE", "OFFLINE"

Options Hash (options):

  • :device_arn (String)

    The ARN of the device for which to request details. Required.

Returns:

See Also:

#get_profile(options = {}) ⇒ Types::GetProfileResponse

Gets the details of a room profile by profile ARN.

Examples:

Request syntax with placeholder values


resp = client.get_profile({
  profile_arn: "Arn",
})

Response structure


resp.profile.profile_arn #=> String
resp.profile.profile_name #=> String
resp.profile.address #=> String
resp.profile.timezone #=> String
resp.profile.distance_unit #=> String, one of "METRIC", "IMPERIAL"
resp.profile.temperature_unit #=> String, one of "FAHRENHEIT", "CELSIUS"
resp.profile.wake_word #=> String, one of "ALEXA", "AMAZON", "ECHO", "COMPUTER"
resp.profile.setup_mode_disabled #=> true/false
resp.profile.max_volume_limit #=> Integer
resp.profile.pstn_enabled #=> true/false

Options Hash (options):

  • :profile_arn (String)

    The ARN of the room profile for which to request details. Required.

Returns:

See Also:

#get_room(options = {}) ⇒ Types::GetRoomResponse

Gets room details by room ARN.

Examples:

Request syntax with placeholder values


resp = client.get_room({
  room_arn: "Arn",
})

Response structure


resp.room.room_arn #=> String
resp.room.room_name #=> String
resp.room.description #=> String
resp.room.provider_calendar_id #=> String
resp.room.profile_arn #=> String

Options Hash (options):

  • :room_arn (String)

    The ARN of the room for which to request details. Required.

Returns:

See Also:

#get_room_skill_parameter(options = {}) ⇒ Types::GetRoomSkillParameterResponse

Gets room skill parameter details by room, skill, and parameter key ARN.

Examples:

Request syntax with placeholder values


resp = client.get_room_skill_parameter({
  room_arn: "Arn",
  skill_id: "SkillId", # required
  parameter_key: "RoomSkillParameterKey", # required
})

Response structure


resp.room_skill_parameter.parameter_key #=> String
resp.room_skill_parameter.parameter_value #=> String

Options Hash (options):

  • :room_arn (String)

    The ARN of the room from which to get the room skill parameter details.

  • :skill_id (required, String)

    The ARN of the skill from which to get the room skill parameter details. Required.

  • :parameter_key (required, String)

    The room skill parameter key for which to get details. Required.

Returns:

See Also:

#get_skill_group(options = {}) ⇒ Types::GetSkillGroupResponse

Gets skill group details by skill group ARN.

Examples:

Request syntax with placeholder values


resp = client.get_skill_group({
  skill_group_arn: "Arn",
})

Response structure


resp.skill_group.skill_group_arn #=> String
resp.skill_group.skill_group_name #=> String
resp.skill_group.description #=> String

Options Hash (options):

  • :skill_group_arn (String)

    The ARN of the skill group for which to get details. Required.

Returns:

See Also:

#list_device_events(options = {}) ⇒ Types::ListDeviceEventsResponse

Lists the device event history, including device connection status, for up to 30 days.

Examples:

Request syntax with placeholder values


resp = client.list_device_events({
  device_arn: "Arn", # required
  event_type: "CONNECTION_STATUS", # accepts CONNECTION_STATUS, DEVICE_STATUS
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.device_events #=> Array
resp.device_events[0].type #=> String, one of "CONNECTION_STATUS", "DEVICE_STATUS"
resp.device_events[0].value #=> String
resp.device_events[0].timestamp #=> Time
resp.next_token #=> String

Options Hash (options):

  • :device_arn (required, String)

    The ARN of a device.

  • :event_type (String)

    The event type to filter device events. If EventType isn\'t specified, this returns a list of all device events in reverse chronological order. If EventType is specified, this returns a list of device events for that EventType in reverse chronological order.

  • :next_token (String)

    An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response only includes results beyond the token, up to the value specified by MaxResults. When the end of results is reached, the response has a value of null.

  • :max_results (Integer)

    The maximum number of results to include in the response. The default value is 50. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

Returns:

See Also:

#list_skills(options = {}) ⇒ Types::ListSkillsResponse

Lists all enabled skills in a specific skill group.

Examples:

Request syntax with placeholder values


resp = client.list_skills({
  skill_group_arn: "Arn",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.skill_summaries #=> Array
resp.skill_summaries[0].skill_id #=> String
resp.skill_summaries[0].skill_name #=> String
resp.skill_summaries[0].supports_linking #=> true/false
resp.next_token #=> String

Options Hash (options):

  • :skill_group_arn (String)

    The ARN of the skill group for which to list enabled skills. Required.

  • :next_token (String)

    An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults. Required.

  • :max_results (Integer)

    The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved. Required.

Returns:

See Also:

#list_tags(options = {}) ⇒ Types::ListTagsResponse

Lists all tags for the specified resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags({
  arn: "Arn", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


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

Options Hash (options):

  • :arn (required, String)

    The ARN of the specified resource for which to list tags.

  • :next_token (String)

    An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.

  • :max_results (Integer)

    The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

Returns:

See Also:

#put_room_skill_parameter(options = {}) ⇒ Struct

Updates room skill parameter details by room, skill, and parameter key ID. Not all skills have a room skill parameter.

Examples:

Request syntax with placeholder values


resp = client.put_room_skill_parameter({
  room_arn: "Arn",
  skill_id: "SkillId", # required
  room_skill_parameter: { # required
    parameter_key: "RoomSkillParameterKey", # required
    parameter_value: "RoomSkillParameterValue", # required
  },
})

Options Hash (options):

  • :room_arn (String)

    The ARN of the room associated with the room skill parameter. Required.

  • :skill_id (required, String)

    The ARN of the skill associated with the room skill parameter. Required.

  • :room_skill_parameter (required, Types::RoomSkillParameter)

    The updated room skill parameter. Required.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#resolve_room(options = {}) ⇒ Types::ResolveRoomResponse

Determines the details for the room from which a skill request was invoked. This operation is used by skill developers.

Examples:

Request syntax with placeholder values


resp = client.resolve_room({
  user_id: "UserId", # required
  skill_id: "SkillId", # required
})

Response structure


resp.room_arn #=> String
resp.room_name #=> String
resp.room_skill_parameters #=> Array
resp.room_skill_parameters[0].parameter_key #=> String
resp.room_skill_parameters[0].parameter_value #=> String

Options Hash (options):

  • :user_id (required, String)

    The ARN of the user. Required.

  • :skill_id (required, String)

    The ARN of the skill that was requested. Required.

Returns:

See Also:

#revoke_invitation(options = {}) ⇒ Struct

Revokes an invitation and invalidates the enrollment URL.

Examples:

Request syntax with placeholder values


resp = client.revoke_invitation({
  user_arn: "Arn",
  enrollment_id: "EnrollmentId",
})

Options Hash (options):

  • :user_arn (String)

    The ARN of the user for whom to revoke an enrollment invitation. Required.

  • :enrollment_id (String)

    The ARN of the enrollment invitation to revoke. Required.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#search_address_books(options = {}) ⇒ Types::SearchAddressBooksResponse

Searches address books and lists the ones that meet a set of filter and sort criteria.

Examples:

Request syntax with placeholder values


resp = client.search_address_books({
  filters: [
    {
      key: "FilterKey", # required
      values: ["FilterValue"], # required
    },
  ],
  sort_criteria: [
    {
      key: "SortKey", # required
      value: "ASC", # required, accepts ASC, DESC
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.address_books #=> Array
resp.address_books[0].address_book_arn #=> String
resp.address_books[0].name #=> String
resp.address_books[0].description #=> String
resp.next_token #=> String
resp.total_count #=> Integer

Options Hash (options):

  • :filters (Array<Types::Filter>)

    The filters to use to list a specified set of address books. The supported filter key is AddressBookName.

  • :sort_criteria (Array<Types::Sort>)

    The sort order to use in listing the specified set of address books. The supported sort key is AddressBookName.

  • :next_token (String)

    An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response only includes results beyond the token, up to the value specified by MaxResults.

  • :max_results (Integer)

    The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

Returns:

See Also:

#search_contacts(options = {}) ⇒ Types::SearchContactsResponse

Searches contacts and lists the ones that meet a set of filter and sort criteria.

Examples:

Request syntax with placeholder values


resp = client.search_contacts({
  filters: [
    {
      key: "FilterKey", # required
      values: ["FilterValue"], # required
    },
  ],
  sort_criteria: [
    {
      key: "SortKey", # required
      value: "ASC", # required, accepts ASC, DESC
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.contacts #=> Array
resp.contacts[0].contact_arn #=> String
resp.contacts[0].display_name #=> String
resp.contacts[0].first_name #=> String
resp.contacts[0].last_name #=> String
resp.contacts[0].phone_number #=> String
resp.next_token #=> String
resp.total_count #=> Integer

Options Hash (options):

  • :filters (Array<Types::Filter>)

    The filters to use to list a specified set of address books. The supported filter keys are DisplayName, FirstName, LastName, and AddressBookArns.

  • :sort_criteria (Array<Types::Sort>)

    The sort order to use in listing the specified set of contacts. The supported sort keys are DisplayName, FirstName, and LastName.

  • :next_token (String)

    An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response only includes results beyond the token, up to the value specified by MaxResults.

  • :max_results (Integer)

    The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

Returns:

See Also:

#search_devices(options = {}) ⇒ Types::SearchDevicesResponse

Searches devices and lists the ones that meet a set of filter criteria.

Examples:

Request syntax with placeholder values


resp = client.search_devices({
  next_token: "NextToken",
  max_results: 1,
  filters: [
    {
      key: "FilterKey", # required
      values: ["FilterValue"], # required
    },
  ],
  sort_criteria: [
    {
      key: "SortKey", # required
      value: "ASC", # required, accepts ASC, DESC
    },
  ],
})

Response structure


resp.devices #=> Array
resp.devices[0].device_arn #=> String
resp.devices[0].device_serial_number #=> String
resp.devices[0].device_type #=> String
resp.devices[0].device_name #=> String
resp.devices[0].software_version #=> String
resp.devices[0].mac_address #=> String
resp.devices[0].device_status #=> String, one of "READY", "PENDING", "WAS_OFFLINE", "DEREGISTERED"
resp.devices[0].room_arn #=> String
resp.devices[0].room_name #=> String
resp.devices[0].device_status_info.device_status_details #=> Array
resp.devices[0].device_status_info.device_status_details[0].code #=> String, one of "DEVICE_SOFTWARE_UPDATE_NEEDED", "DEVICE_WAS_OFFLINE"
resp.devices[0].device_status_info.connection_status #=> String, one of "ONLINE", "OFFLINE"
resp.next_token #=> String
resp.total_count #=> Integer

Options Hash (options):

  • :next_token (String)

    An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.

  • :max_results (Integer)

    The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

  • :filters (Array<Types::Filter>)

    The filters to use to list a specified set of devices. Supported filter keys are DeviceName, DeviceStatus, DeviceStatusDetailCode, RoomName, DeviceType, DeviceSerialNumber, UnassociatedOnly, and ConnectionStatus (ONLINE and OFFLINE).

  • :sort_criteria (Array<Types::Sort>)

    The sort order to use in listing the specified set of devices. Supported sort keys are DeviceName, DeviceStatus, RoomName, DeviceType, DeviceSerialNumber, and ConnectionStatus.

Returns:

See Also:

#search_profiles(options = {}) ⇒ Types::SearchProfilesResponse

Searches room profiles and lists the ones that meet a set of filter criteria.

Examples:

Request syntax with placeholder values


resp = client.search_profiles({
  next_token: "NextToken",
  max_results: 1,
  filters: [
    {
      key: "FilterKey", # required
      values: ["FilterValue"], # required
    },
  ],
  sort_criteria: [
    {
      key: "SortKey", # required
      value: "ASC", # required, accepts ASC, DESC
    },
  ],
})

Response structure


resp.profiles #=> Array
resp.profiles[0].profile_arn #=> String
resp.profiles[0].profile_name #=> String
resp.profiles[0].address #=> String
resp.profiles[0].timezone #=> String
resp.profiles[0].distance_unit #=> String, one of "METRIC", "IMPERIAL"
resp.profiles[0].temperature_unit #=> String, one of "FAHRENHEIT", "CELSIUS"
resp.profiles[0].wake_word #=> String, one of "ALEXA", "AMAZON", "ECHO", "COMPUTER"
resp.next_token #=> String
resp.total_count #=> Integer

Options Hash (options):

  • :next_token (String)

    An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.

  • :max_results (Integer)

    The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

  • :filters (Array<Types::Filter>)

    The filters to use to list a specified set of room profiles. Supported filter keys are ProfileName and Address. Required.

  • :sort_criteria (Array<Types::Sort>)

    The sort order to use in listing the specified set of room profiles. Supported sort keys are ProfileName and Address.

Returns:

See Also:

#search_rooms(options = {}) ⇒ Types::SearchRoomsResponse

Searches rooms and lists the ones that meet a set of filter and sort criteria.

Examples:

Request syntax with placeholder values


resp = client.search_rooms({
  next_token: "NextToken",
  max_results: 1,
  filters: [
    {
      key: "FilterKey", # required
      values: ["FilterValue"], # required
    },
  ],
  sort_criteria: [
    {
      key: "SortKey", # required
      value: "ASC", # required, accepts ASC, DESC
    },
  ],
})

Response structure


resp.rooms #=> Array
resp.rooms[0].room_arn #=> String
resp.rooms[0].room_name #=> String
resp.rooms[0].description #=> String
resp.rooms[0].provider_calendar_id #=> String
resp.rooms[0].profile_arn #=> String
resp.rooms[0].profile_name #=> String
resp.next_token #=> String
resp.total_count #=> Integer

Options Hash (options):

  • :next_token (String)

    An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults.

  • :max_results (Integer)

    The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

  • :filters (Array<Types::Filter>)

    The filters to use to list a specified set of rooms. The supported filter keys are RoomName and ProfileName.

  • :sort_criteria (Array<Types::Sort>)

    The sort order to use in listing the specified set of rooms. The supported sort keys are RoomName and ProfileName.

Returns:

See Also:

#search_skill_groups(options = {}) ⇒ Types::SearchSkillGroupsResponse

Searches skill groups and lists the ones that meet a set of filter and sort criteria.

Examples:

Request syntax with placeholder values


resp = client.search_skill_groups({
  next_token: "NextToken",
  max_results: 1,
  filters: [
    {
      key: "FilterKey", # required
      values: ["FilterValue"], # required
    },
  ],
  sort_criteria: [
    {
      key: "SortKey", # required
      value: "ASC", # required, accepts ASC, DESC
    },
  ],
})

Response structure


resp.skill_groups #=> Array
resp.skill_groups[0].skill_group_arn #=> String
resp.skill_groups[0].skill_group_name #=> String
resp.skill_groups[0].description #=> String
resp.next_token #=> String
resp.total_count #=> Integer

Options Hash (options):

  • :next_token (String)

    An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults. Required.

  • :max_results (Integer)

    The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

  • :filters (Array<Types::Filter>)

    The filters to use to list a specified set of skill groups. The supported filter key is SkillGroupName.

  • :sort_criteria (Array<Types::Sort>)

    The sort order to use in listing the specified set of skill groups. The supported sort key is SkillGroupName.

Returns:

See Also:

#search_users(options = {}) ⇒ Types::SearchUsersResponse

Searches users and lists the ones that meet a set of filter and sort criteria.

Examples:

Request syntax with placeholder values


resp = client.search_users({
  next_token: "NextToken",
  max_results: 1,
  filters: [
    {
      key: "FilterKey", # required
      values: ["FilterValue"], # required
    },
  ],
  sort_criteria: [
    {
      key: "SortKey", # required
      value: "ASC", # required, accepts ASC, DESC
    },
  ],
})

Response structure


resp.users #=> Array
resp.users[0].user_arn #=> String
resp.users[0].first_name #=> String
resp.users[0].last_name #=> String
resp.users[0].email #=> String
resp.users[0].enrollment_status #=> String, one of "INITIALIZED", "PENDING", "REGISTERED", "DISASSOCIATING", "DEREGISTERING"
resp.users[0].enrollment_id #=> String
resp.next_token #=> String
resp.total_count #=> Integer

Options Hash (options):

  • :next_token (String)

    An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults. Required.

  • :max_results (Integer)

    The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved. Required.

  • :filters (Array<Types::Filter>)

    The filters to use for listing a specific set of users. Required. Supported filter keys are UserId, FirstName, LastName, Email, and EnrollmentStatus.

  • :sort_criteria (Array<Types::Sort>)

    The sort order to use in listing the filtered set of users. Required. Supported sort keys are UserId, FirstName, LastName, Email, and EnrollmentStatus.

Returns:

See Also:

#send_invitation(options = {}) ⇒ Struct

Sends an enrollment invitation email with a URL to a user. The URL is valid for 72 hours or until you call this operation again, whichever comes first.

Examples:

Request syntax with placeholder values


resp = client.send_invitation({
  user_arn: "Arn",
})

Options Hash (options):

  • :user_arn (String)

    The ARN of the user to whom to send an invitation. Required.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#start_device_sync(options = {}) ⇒ Struct

Resets a device and its account to the known default settings, by clearing all information and settings set by previous users.

Examples:

Request syntax with placeholder values


resp = client.start_device_sync({
  room_arn: "Arn",
  device_arn: "Arn",
  features: ["BLUETOOTH"], # required, accepts BLUETOOTH, VOLUME, NOTIFICATIONS, LISTS, SKILLS, ALL
})

Options Hash (options):

  • :room_arn (String)

    The ARN of the room with which the device to sync is associated. Required.

  • :device_arn (String)

    The ARN of the device to sync. Required.

  • :features (required, Array<String>)

    Request structure to start the device sync. Required.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#tag_resource(options = {}) ⇒ Struct

Adds metadata tags to a specified resource.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  arn: "Arn", # required
  tags: [ # required
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Options Hash (options):

  • :arn (required, String)

    The ARN of the resource to which to add metadata tags. Required.

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

    The tags to be added to the specified resource. Do not provide system tags. Required.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#untag_resource(options = {}) ⇒ Struct

Removes metadata tags from a specified resource.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  arn: "Arn", # required
  tag_keys: ["TagKey"], # required
})

Options Hash (options):

  • :arn (required, String)

    The ARN of the resource from which to remove metadata tags. Required.

  • :tag_keys (required, Array<String>)

    The tags to be removed from the specified resource. Do not provide system tags. Required.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_address_book(options = {}) ⇒ Struct

Updates address book details by the address book ARN.

Examples:

Request syntax with placeholder values


resp = client.update_address_book({
  address_book_arn: "Arn", # required
  name: "AddressBookName",
  description: "AddressBookDescription",
})

Options Hash (options):

  • :address_book_arn (required, String)

    The ARN of the room to update.

  • :name (String)

    The updated name of the room.

  • :description (String)

    The updated description of the room.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_contact(options = {}) ⇒ Struct

Updates the contact details by the contact ARN.

Examples:

Request syntax with placeholder values


resp = client.update_contact({
  contact_arn: "Arn", # required
  display_name: "ContactName",
  first_name: "ContactName",
  last_name: "ContactName",
  phone_number: "E164PhoneNumber",
})

Options Hash (options):

  • :contact_arn (required, String)

    The ARN of the contact to update.

  • :display_name (String)

    The updated display name of the contact.

  • :first_name (String)

    The updated first name of the contact.

  • :last_name (String)

    The updated last name of the contact.

  • :phone_number (String)

    The updated phone number of the contact.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_device(options = {}) ⇒ Struct

Updates the device name by device ARN.

Examples:

Request syntax with placeholder values


resp = client.update_device({
  device_arn: "Arn",
  device_name: "DeviceName",
})

Options Hash (options):

  • :device_arn (String)

    The ARN of the device to update. Required.

  • :device_name (String)

    The updated device name. Required.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_profile(options = {}) ⇒ Struct

Updates an existing room profile by room profile ARN.

Examples:

Request syntax with placeholder values


resp = client.update_profile({
  profile_arn: "Arn",
  profile_name: "ProfileName",
  timezone: "Timezone",
  address: "Address",
  distance_unit: "METRIC", # accepts METRIC, IMPERIAL
  temperature_unit: "FAHRENHEIT", # accepts FAHRENHEIT, CELSIUS
  wake_word: "ALEXA", # accepts ALEXA, AMAZON, ECHO, COMPUTER
  setup_mode_disabled: false,
  max_volume_limit: 1,
  pstn_enabled: false,
})

Options Hash (options):

  • :profile_arn (String)

    The ARN of the room profile to update. Required.

  • :profile_name (String)

    The updated name for the room profile.

  • :timezone (String)

    The updated timezone for the room profile.

  • :address (String)

    The updated address for the room profile.

  • :distance_unit (String)

    The updated distance unit for the room profile.

  • :temperature_unit (String)

    The updated temperature unit for the room profile.

  • :wake_word (String)

    The updated wake word for the room profile.

  • :setup_mode_disabled (Boolean)

    Whether the setup mode of the profile is enabled.

  • :max_volume_limit (Integer)

    The updated maximum volume limit for the room profile.

  • :pstn_enabled (Boolean)

    Whether the PSTN setting of the room profile is enabled.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_room(options = {}) ⇒ Struct

Updates room details by room ARN.

Examples:

Request syntax with placeholder values


resp = client.update_room({
  room_arn: "Arn",
  room_name: "RoomName",
  description: "RoomDescription",
  provider_calendar_id: "ProviderCalendarId",
  profile_arn: "Arn",
})

Options Hash (options):

  • :room_arn (String)

    The ARN of the room to update.

  • :room_name (String)

    The updated name for the room.

  • :description (String)

    The updated description for the room.

  • :provider_calendar_id (String)

    The updated provider calendar ARN for the room.

  • :profile_arn (String)

    The updated profile ARN for the room.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_skill_group(options = {}) ⇒ Struct

Updates skill group details by skill group ARN.

Examples:

Request syntax with placeholder values


resp = client.update_skill_group({
  skill_group_arn: "Arn",
  skill_group_name: "SkillGroupName",
  description: "SkillGroupDescription",
})

Options Hash (options):

  • :skill_group_arn (String)

    The ARN of the skill group to update.

  • :skill_group_name (String)

    The updated name for the skill group.

  • :description (String)

    The updated description for the skill group.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#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

Parameters:

  • waiter_name (Symbol)

    The name of the waiter. See #waiter_names for a full list of supported waiters.

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

    Additional request parameters. See the #waiter_names for a list of supported waiters and what request they call. The called request determines the list of accepted parameters.

Yield Parameters:

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.

#waiter_namesArray<Symbol>

Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:

Waiter NameClient MethodDefault Delay:Default Max Attempts:

Returns:

  • (Array<Symbol>)

    the list of supported waiters.