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

Class: Aws::Connect::Client

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

Overview

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

connect = Aws::Connect::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::Connect::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::Connect::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

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

  • :active_endpoint_cache (Boolean)

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false. See Plugins::EndpointDiscovery 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.
  • :disable_host_prefix_injection (Boolean)

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available. See Plugins::EndpointPattern for more details.

  • :endpoint (String)

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

  • :endpoint_cache_max_entries (Integer)

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_max_threads (Integer)

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_poll_interval (Integer)

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec. See Plugins::EndpointDiscovery for more details.

  • :endpoint_discovery (Boolean)

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false. See Plugins::EndpointDiscovery 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.

  • :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 Aws::ClientStubs#stub_responses. See Aws::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_approved_origin(options = {}) ⇒ Struct

Associates an approved origin to an Amazon Connect instance.

Examples:

Request syntax with placeholder values


resp = client.associate_approved_origin({
  instance_id: "InstanceId", # required
  origin: "Origin", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :origin (required, String)

    The domain to add to your allow list.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#associate_instance_storage_config(options = {}) ⇒ Types::AssociateInstanceStorageConfigResponse

Associates a storage resource type for the first time. You can only associate one type of storage configuration in a single call. This means, for example, that you can't define an instance with multiple S3 buckets for storing chat transcripts.

This API does not create a resource that doesn't exist. It only associates it to the instance. Ensure that the resource being specified in the storage configuration, like an Amazon S3 bucket, exists when being used for association.

Examples:

Request syntax with placeholder values


resp = client.associate_instance_storage_config({
  instance_id: "InstanceId", # required
  resource_type: "CHAT_TRANSCRIPTS", # required, accepts CHAT_TRANSCRIPTS, CALL_RECORDINGS, SCHEDULED_REPORTS, MEDIA_STREAMS, CONTACT_TRACE_RECORDS, AGENT_EVENTS
  storage_config: { # required
    association_id: "AssociationId",
    storage_type: "S3", # required, accepts S3, KINESIS_VIDEO_STREAM, KINESIS_STREAM, KINESIS_FIREHOSE
    s3_config: {
      bucket_name: "BucketName", # required
      bucket_prefix: "Prefix", # required
      encryption_config: {
        encryption_type: "KMS", # required, accepts KMS
        key_id: "KeyId", # required
      },
    },
    kinesis_video_stream_config: {
      prefix: "Prefix", # required
      retention_period_hours: 1, # required
      encryption_config: { # required
        encryption_type: "KMS", # required, accepts KMS
        key_id: "KeyId", # required
      },
    },
    kinesis_stream_config: {
      stream_arn: "ARN", # required
    },
    kinesis_firehose_config: {
      firehose_arn: "ARN", # required
    },
  },
})

Response structure


resp.association_id #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :resource_type (required, String)

    A valid resource type.

  • :storage_config (required, Types::InstanceStorageConfig)

    A valid storage type.

Returns:

See Also:

#associate_lambda_function(options = {}) ⇒ Struct

Allows the specified Amazon Connect instance to access the specified Lambda function.

Examples:

Request syntax with placeholder values


resp = client.associate_lambda_function({
  instance_id: "InstanceId", # required
  function_arn: "FunctionArn", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :function_arn (required, String)

    The Amazon Resource Name (ARN) for the Lambda function being associated. Maximum number of characters allowed is 140.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#associate_lex_bot(options = {}) ⇒ Struct

Allows the specified Amazon Connect instance to access the specified Amazon Lex bot.

Examples:

Request syntax with placeholder values


resp = client.associate_lex_bot({
  instance_id: "InstanceId", # required
  lex_bot: { # required
    name: "BotName",
    lex_region: "LexRegion",
  },
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :lex_bot (required, Types::LexBot)

    The Amazon Lex box to associate with the instance.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#associate_routing_profile_queues(options = {}) ⇒ Struct

Associates a set of queues with a routing profile.

Examples:

Request syntax with placeholder values


resp = client.associate_routing_profile_queues({
  instance_id: "InstanceId", # required
  routing_profile_id: "RoutingProfileId", # required
  queue_configs: [ # required
    {
      queue_reference: { # required
        queue_id: "QueueId", # required
        channel: "VOICE", # required, accepts VOICE, CHAT
      },
      priority: 1, # required
      delay: 1, # required
    },
  ],
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :routing_profile_id (required, String)

    The identifier of the routing profile.

  • :queue_configs (required, Array<Types::RoutingProfileQueueConfig>)

    The queues to associate with this routing profile.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#associate_security_key(options = {}) ⇒ Types::AssociateSecurityKeyResponse

Associates a security key to the instance.

Examples:

Request syntax with placeholder values


resp = client.associate_security_key({
  instance_id: "InstanceId", # required
  key: "PEM", # required
})

Response structure


resp.association_id #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :key (required, String)

    A valid security key in PEM format.

Returns:

See Also:

#create_contact_flow(options = {}) ⇒ Types::CreateContactFlowResponse

Creates a contact flow for the specified Amazon Connect instance.

You can also create and update contact flows using the Amazon Connect Flow language.

Examples:

Request syntax with placeholder values


resp = client.create_contact_flow({
  instance_id: "InstanceId", # required
  name: "ContactFlowName", # required
  type: "CONTACT_FLOW", # required, accepts CONTACT_FLOW, CUSTOMER_QUEUE, CUSTOMER_HOLD, CUSTOMER_WHISPER, AGENT_HOLD, AGENT_WHISPER, OUTBOUND_WHISPER, AGENT_TRANSFER, QUEUE_TRANSFER
  description: "ContactFlowDescription",
  content: "ContactFlowContent", # required
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.contact_flow_id #=> String
resp.contact_flow_arn #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :name (required, String)

    The name of the contact flow.

  • :type (required, String)

    The type of the contact flow. For descriptions of the available types, see Choose a Contact Flow Type in the Amazon Connect Administrator Guide.

  • :description (String)

    The description of the contact flow.

  • :content (required, String)

    The content of the contact flow.

  • :tags (Hash<String,String>)

    One or more tags.

Returns:

See Also:

#create_instance(options = {}) ⇒ Types::CreateInstanceResponse

Initiates an Amazon Connect instance with all the supported channels enabled. It does not attach any storage (such as Amazon S3, or Kinesis) or allow for any configurations on features such as Contact Lens for Amazon Connect.

Examples:

Request syntax with placeholder values


resp = client.create_instance({
  client_token: "ClientToken",
  identity_management_type: "SAML", # required, accepts SAML, CONNECT_MANAGED, EXISTING_DIRECTORY
  instance_alias: "DirectoryAlias",
  directory_id: "DirectoryId",
  inbound_calls_enabled: false, # required
  outbound_calls_enabled: false, # required
})

Response structure


resp.id #=> String
resp.arn #=> String

Options Hash (options):

  • :client_token (String)

    The idempotency token.

  • :identity_management_type (required, String)

    The type of identity management for your Amazon Connect users.

  • :instance_alias (String)

    The name for your instance.

  • :directory_id (String)

    The identifier for the directory.

  • :inbound_calls_enabled (required, Boolean)

    Whether your contact center handles incoming contacts.

  • :outbound_calls_enabled (required, Boolean)

    Whether your contact center allows outbound calls.

Returns:

See Also:

#create_routing_profile(options = {}) ⇒ Types::CreateRoutingProfileResponse

Creates a new routing profile.

Examples:

Request syntax with placeholder values


resp = client.create_routing_profile({
  instance_id: "InstanceId", # required
  name: "RoutingProfileName", # required
  description: "RoutingProfileDescription", # required
  default_outbound_queue_id: "QueueId", # required
  queue_configs: [
    {
      queue_reference: { # required
        queue_id: "QueueId", # required
        channel: "VOICE", # required, accepts VOICE, CHAT
      },
      priority: 1, # required
      delay: 1, # required
    },
  ],
  media_concurrencies: [ # required
    {
      channel: "VOICE", # required, accepts VOICE, CHAT
      concurrency: 1, # required
    },
  ],
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.routing_profile_arn #=> String
resp.routing_profile_id #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :name (required, String)

    The name of the routing profile. Must not be more than 127 characters.

  • :description (required, String)

    Description of the routing profile. Must not be more than 250 characters.

  • :default_outbound_queue_id (required, String)

    The default outbound queue for the routing profile.

  • :queue_configs (Array<Types::RoutingProfileQueueConfig>)

    The inbound queues associated with the routing profile. If no queue is added, the agent can only make outbound calls.

  • :media_concurrencies (required, Array<Types::MediaConcurrency>)

    The channels agents can handle in the Contact Control Panel (CCP) for this routing profile.

  • :tags (Hash<String,String>)

    One or more tags.

Returns:

See Also:

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

Creates a user account for the specified Amazon Connect instance.

For information about how to create user accounts using the Amazon Connect console, see Add Users in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.create_user({
  username: "AgentUsername", # required
  password: "Password",
  identity_info: {
    first_name: "AgentFirstName",
    last_name: "AgentLastName",
    email: "Email",
  },
  phone_config: { # required
    phone_type: "SOFT_PHONE", # required, accepts SOFT_PHONE, DESK_PHONE
    auto_accept: false,
    after_contact_work_time_limit: 1,
    desk_phone_number: "PhoneNumber",
  },
  directory_user_id: "DirectoryUserId",
  security_profile_ids: ["SecurityProfileId"], # required
  routing_profile_id: "RoutingProfileId", # required
  hierarchy_group_id: "HierarchyGroupId",
  instance_id: "InstanceId", # required
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.user_id #=> String
resp.user_arn #=> String

Options Hash (options):

  • :username (required, String)

    The user name for the account. For instances not using SAML for identity management, the user name can include up to 20 characters. If you are using SAML for identity management, the user name can include up to 64 characters from [a-zA-Z0-9_-.\@]+.

  • :password (String)

    The password for the user account. A password is required if you are using Amazon Connect for identity management. Otherwise, it is an error to include a password.

  • :identity_info (Types::UserIdentityInfo)

    The information about the identity of the user.

  • :phone_config (required, Types::UserPhoneConfig)

    The phone settings for the user.

  • :directory_user_id (String)

    The identifier of the user account in the directory used for identity management. If Amazon Connect cannot access the directory, you can specify this identifier to authenticate users. If you include the identifier, we assume that Amazon Connect cannot access the directory. Otherwise, the identity information is used to authenticate users from your directory.

    This parameter is required if you are using an existing directory for identity management in Amazon Connect when Amazon Connect cannot access your directory to authenticate users. If you are using SAML for identity management and include this parameter, an error is returned.

  • :security_profile_ids (required, Array<String>)

    The identifier of the security profile for the user.

  • :routing_profile_id (required, String)

    The identifier of the routing profile for the user.

  • :hierarchy_group_id (String)

    The identifier of the hierarchy group for the user.

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :tags (Hash<String,String>)

    One or more tags.

Returns:

See Also:

#create_user_hierarchy_group(options = {}) ⇒ Types::CreateUserHierarchyGroupResponse

Creates a new user hierarchy group.

Examples:

Request syntax with placeholder values


resp = client.create_user_hierarchy_group({
  name: "HierarchyGroupName", # required
  parent_group_id: "HierarchyGroupId",
  instance_id: "InstanceId", # required
})

Response structure


resp.hierarchy_group_id #=> String
resp.hierarchy_group_arn #=> String

Options Hash (options):

  • :name (required, String)

    The name of the user hierarchy group. Must not be more than 100 characters.

  • :parent_group_id (String)

    The identifier for the parent hierarchy group. The user hierarchy is created at level one if the parent group ID is null.

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

Returns:

See Also:

#delete_instance(options = {}) ⇒ Struct

Deletes the Amazon Connect instance.

Examples:

Request syntax with placeholder values


resp = client.delete_instance({
  instance_id: "InstanceId", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_user(options = {}) ⇒ Struct

Deletes a user account from the specified Amazon Connect instance.

For information about what happens to a user's data when their account is deleted, see Delete Users from Your Amazon Connect Instance in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_user({
  instance_id: "InstanceId", # required
  user_id: "UserId", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :user_id (required, String)

    The identifier of the user.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_user_hierarchy_group(options = {}) ⇒ Struct

Deletes an existing user hierarchy group. It must not be associated with any agents or have any active child groups.

Examples:

Request syntax with placeholder values


resp = client.delete_user_hierarchy_group({
  hierarchy_group_id: "HierarchyGroupId", # required
  instance_id: "InstanceId", # required
})

Options Hash (options):

  • :hierarchy_group_id (required, String)

    The identifier of the hierarchy group.

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#describe_contact_flow(options = {}) ⇒ Types::DescribeContactFlowResponse

Describes the specified contact flow.

You can also create and update contact flows using the Amazon Connect Flow language.

Examples:

Request syntax with placeholder values


resp = client.describe_contact_flow({
  instance_id: "InstanceId", # required
  contact_flow_id: "ContactFlowId", # required
})

Response structure


resp.contact_flow.arn #=> String
resp.contact_flow.id #=> String
resp.contact_flow.name #=> String
resp.contact_flow.type #=> String, one of "CONTACT_FLOW", "CUSTOMER_QUEUE", "CUSTOMER_HOLD", "CUSTOMER_WHISPER", "AGENT_HOLD", "AGENT_WHISPER", "OUTBOUND_WHISPER", "AGENT_TRANSFER", "QUEUE_TRANSFER"
resp.contact_flow.description #=> String
resp.contact_flow.content #=> String
resp.contact_flow.tags #=> Hash
resp.contact_flow.tags["TagKey"] #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :contact_flow_id (required, String)

    The identifier of the contact flow.

Returns:

See Also:

#describe_instance(options = {}) ⇒ Types::DescribeInstanceResponse

Returns the current state of the specified instance identifier. It tracks the instance while it is being created and returns an error status if applicable.

If an instance is not created successfully, the instance status reason field returns details relevant to the reason. The instance in a failed state is returned only for 24 hours after the CreateInstance API was invoked.

Examples:

Request syntax with placeholder values


resp = client.describe_instance({
  instance_id: "InstanceId", # required
})

Response structure


resp.instance.id #=> String
resp.instance.arn #=> String
resp.instance.identity_management_type #=> String, one of "SAML", "CONNECT_MANAGED", "EXISTING_DIRECTORY"
resp.instance.instance_alias #=> String
resp.instance.created_time #=> Time
resp.instance.service_role #=> String
resp.instance.instance_status #=> String, one of "CREATION_IN_PROGRESS", "ACTIVE", "CREATION_FAILED"
resp.instance.status_reason.message #=> String
resp.instance.inbound_calls_enabled #=> true/false
resp.instance.outbound_calls_enabled #=> true/false

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

Returns:

See Also:

#describe_instance_attribute(options = {}) ⇒ Types::DescribeInstanceAttributeResponse

Describes the specified instance attribute.

Examples:

Request syntax with placeholder values


resp = client.describe_instance_attribute({
  instance_id: "InstanceId", # required
  attribute_type: "INBOUND_CALLS", # required, accepts INBOUND_CALLS, OUTBOUND_CALLS, CONTACTFLOW_LOGS, CONTACT_LENS, AUTO_RESOLVE_BEST_VOICES, USE_CUSTOM_TTS_VOICES, EARLY_MEDIA
})

Response structure


resp.attribute.attribute_type #=> String, one of "INBOUND_CALLS", "OUTBOUND_CALLS", "CONTACTFLOW_LOGS", "CONTACT_LENS", "AUTO_RESOLVE_BEST_VOICES", "USE_CUSTOM_TTS_VOICES", "EARLY_MEDIA"
resp.attribute.value #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :attribute_type (required, String)

    The type of attribute.

Returns:

See Also:

#describe_instance_storage_config(options = {}) ⇒ Types::DescribeInstanceStorageConfigResponse

Retrieves the current storage configurations for the specified resource type, association ID, and instance ID.

Examples:

Request syntax with placeholder values


resp = client.describe_instance_storage_config({
  instance_id: "InstanceId", # required
  association_id: "AssociationId", # required
  resource_type: "CHAT_TRANSCRIPTS", # required, accepts CHAT_TRANSCRIPTS, CALL_RECORDINGS, SCHEDULED_REPORTS, MEDIA_STREAMS, CONTACT_TRACE_RECORDS, AGENT_EVENTS
})

Response structure


resp.storage_config.association_id #=> String
resp.storage_config.storage_type #=> String, one of "S3", "KINESIS_VIDEO_STREAM", "KINESIS_STREAM", "KINESIS_FIREHOSE"
resp.storage_config.s3_config.bucket_name #=> String
resp.storage_config.s3_config.bucket_prefix #=> String
resp.storage_config.s3_config.encryption_config.encryption_type #=> String, one of "KMS"
resp.storage_config.s3_config.encryption_config.key_id #=> String
resp.storage_config.kinesis_video_stream_config.prefix #=> String
resp.storage_config.kinesis_video_stream_config.retention_period_hours #=> Integer
resp.storage_config.kinesis_video_stream_config.encryption_config.encryption_type #=> String, one of "KMS"
resp.storage_config.kinesis_video_stream_config.encryption_config.key_id #=> String
resp.storage_config.kinesis_stream_config.stream_arn #=> String
resp.storage_config.kinesis_firehose_config.firehose_arn #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :association_id (required, String)

    The existing association identifier that uniquely identifies the resource type and storage config for the given instance ID.

  • :resource_type (required, String)

    A valid resource type.

Returns:

See Also:

#describe_routing_profile(options = {}) ⇒ Types::DescribeRoutingProfileResponse

Describes the specified routing profile.

Examples:

Request syntax with placeholder values


resp = client.describe_routing_profile({
  instance_id: "InstanceId", # required
  routing_profile_id: "RoutingProfileId", # required
})

Response structure


resp.routing_profile.instance_id #=> String
resp.routing_profile.name #=> String
resp.routing_profile.routing_profile_arn #=> String
resp.routing_profile.routing_profile_id #=> String
resp.routing_profile.description #=> String
resp.routing_profile.media_concurrencies #=> Array
resp.routing_profile.media_concurrencies[0].channel #=> String, one of "VOICE", "CHAT"
resp.routing_profile.media_concurrencies[0].concurrency #=> Integer
resp.routing_profile.default_outbound_queue_id #=> String
resp.routing_profile.tags #=> Hash
resp.routing_profile.tags["TagKey"] #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :routing_profile_id (required, String)

    The identifier of the routing profile.

Returns:

See Also:

#describe_user(options = {}) ⇒ Types::DescribeUserResponse

Describes the specified user account. You can find the instance ID in the console (it’s the final part of the ARN). The console does not display the user IDs. Instead, list the users and note the IDs provided in the output.

Examples:

Request syntax with placeholder values


resp = client.describe_user({
  user_id: "UserId", # required
  instance_id: "InstanceId", # required
})

Response structure


resp.user.id #=> String
resp.user.arn #=> String
resp.user.username #=> String
resp.user.identity_info.first_name #=> String
resp.user.identity_info.last_name #=> String
resp.user.identity_info.email #=> String
resp.user.phone_config.phone_type #=> String, one of "SOFT_PHONE", "DESK_PHONE"
resp.user.phone_config.auto_accept #=> true/false
resp.user.phone_config.after_contact_work_time_limit #=> Integer
resp.user.phone_config.desk_phone_number #=> String
resp.user.directory_user_id #=> String
resp.user.security_profile_ids #=> Array
resp.user.security_profile_ids[0] #=> String
resp.user.routing_profile_id #=> String
resp.user.hierarchy_group_id #=> String
resp.user.tags #=> Hash
resp.user.tags["TagKey"] #=> String

Options Hash (options):

  • :user_id (required, String)

    The identifier of the user account.

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

Returns:

See Also:

#describe_user_hierarchy_group(options = {}) ⇒ Types::DescribeUserHierarchyGroupResponse

Describes the specified hierarchy group.

Examples:

Request syntax with placeholder values


resp = client.describe_user_hierarchy_group({
  hierarchy_group_id: "HierarchyGroupId", # required
  instance_id: "InstanceId", # required
})

Response structure


resp.hierarchy_group.id #=> String
resp.hierarchy_group.arn #=> String
resp.hierarchy_group.name #=> String
resp.hierarchy_group.level_id #=> String
resp.hierarchy_group.hierarchy_path.level_one.id #=> String
resp.hierarchy_group.hierarchy_path.level_one.arn #=> String
resp.hierarchy_group.hierarchy_path.level_one.name #=> String
resp.hierarchy_group.hierarchy_path.level_two.id #=> String
resp.hierarchy_group.hierarchy_path.level_two.arn #=> String
resp.hierarchy_group.hierarchy_path.level_two.name #=> String
resp.hierarchy_group.hierarchy_path.level_three.id #=> String
resp.hierarchy_group.hierarchy_path.level_three.arn #=> String
resp.hierarchy_group.hierarchy_path.level_three.name #=> String
resp.hierarchy_group.hierarchy_path.level_four.id #=> String
resp.hierarchy_group.hierarchy_path.level_four.arn #=> String
resp.hierarchy_group.hierarchy_path.level_four.name #=> String
resp.hierarchy_group.hierarchy_path.level_five.id #=> String
resp.hierarchy_group.hierarchy_path.level_five.arn #=> String
resp.hierarchy_group.hierarchy_path.level_five.name #=> String

Options Hash (options):

  • :hierarchy_group_id (required, String)

    The identifier of the hierarchy group.

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

Returns:

See Also:

#describe_user_hierarchy_structure(options = {}) ⇒ Types::DescribeUserHierarchyStructureResponse

Describes the hierarchy structure of the specified Amazon Connect instance.

Examples:

Request syntax with placeholder values


resp = client.describe_user_hierarchy_structure({
  instance_id: "InstanceId", # required
})

Response structure


resp.hierarchy_structure.level_one.id #=> String
resp.hierarchy_structure.level_one.arn #=> String
resp.hierarchy_structure.level_one.name #=> String
resp.hierarchy_structure.level_two.id #=> String
resp.hierarchy_structure.level_two.arn #=> String
resp.hierarchy_structure.level_two.name #=> String
resp.hierarchy_structure.level_three.id #=> String
resp.hierarchy_structure.level_three.arn #=> String
resp.hierarchy_structure.level_three.name #=> String
resp.hierarchy_structure.level_four.id #=> String
resp.hierarchy_structure.level_four.arn #=> String
resp.hierarchy_structure.level_four.name #=> String
resp.hierarchy_structure.level_five.id #=> String
resp.hierarchy_structure.level_five.arn #=> String
resp.hierarchy_structure.level_five.name #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

Returns:

See Also:

#disassociate_approved_origin(options = {}) ⇒ Struct

Revokes access to integrated applications from Amazon Connect.

Examples:

Request syntax with placeholder values


resp = client.disassociate_approved_origin({
  instance_id: "InstanceId", # required
  origin: "Origin", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :origin (required, String)

    The domain URL of the integrated application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#disassociate_instance_storage_config(options = {}) ⇒ Struct

Removes the storage type configurations for the specified resource type and association ID.

Examples:

Request syntax with placeholder values


resp = client.disassociate_instance_storage_config({
  instance_id: "InstanceId", # required
  association_id: "AssociationId", # required
  resource_type: "CHAT_TRANSCRIPTS", # required, accepts CHAT_TRANSCRIPTS, CALL_RECORDINGS, SCHEDULED_REPORTS, MEDIA_STREAMS, CONTACT_TRACE_RECORDS, AGENT_EVENTS
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :association_id (required, String)

    The existing association identifier that uniquely identifies the resource type and storage config for the given instance ID.

  • :resource_type (required, String)

    A valid resource type.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#disassociate_lambda_function(options = {}) ⇒ Struct

Remove the Lambda function from the drop-down options available in the relevant contact flow blocks.

Examples:

Request syntax with placeholder values


resp = client.disassociate_lambda_function({
  instance_id: "InstanceId", # required
  function_arn: "FunctionArn", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance..

  • :function_arn (required, String)

    The Amazon Resource Name (ARN) of the Lambda function being disassociated.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#disassociate_lex_bot(options = {}) ⇒ Struct

Revokes authorization from the specified instance to access the specified Amazon Lex bot.

Examples:

Request syntax with placeholder values


resp = client.disassociate_lex_bot({
  instance_id: "InstanceId", # required
  bot_name: "BotName", # required
  lex_region: "LexRegion", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :bot_name (required, String)

    The name of the Amazon Lex bot. Maximum character limit of 50.

  • :lex_region (required, String)

    The Region in which the Amazon Lex bot has been created.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#disassociate_routing_profile_queues(options = {}) ⇒ Struct

Disassociates a set of queues from a routing profile.

Examples:

Request syntax with placeholder values


resp = client.disassociate_routing_profile_queues({
  instance_id: "InstanceId", # required
  routing_profile_id: "RoutingProfileId", # required
  queue_references: [ # required
    {
      queue_id: "QueueId", # required
      channel: "VOICE", # required, accepts VOICE, CHAT
    },
  ],
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :routing_profile_id (required, String)

    The identifier of the routing profile.

  • :queue_references (required, Array<Types::RoutingProfileQueueReference>)

    The queues to disassociate from this routing profile.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#disassociate_security_key(options = {}) ⇒ Struct

Deletes the specified security key.

Examples:

Request syntax with placeholder values


resp = client.disassociate_security_key({
  instance_id: "InstanceId", # required
  association_id: "AssociationId", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :association_id (required, String)

    The existing association identifier that uniquely identifies the resource type and storage config for the given instance ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#get_contact_attributes(options = {}) ⇒ Types::GetContactAttributesResponse

Retrieves the contact attributes for the specified contact.

Examples:

Request syntax with placeholder values


resp = client.get_contact_attributes({
  instance_id: "InstanceId", # required
  initial_contact_id: "ContactId", # required
})

Response structure


resp.attributes #=> Hash
resp.attributes["AttributeName"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :initial_contact_id (required, String)

    The identifier of the initial contact.

Returns:

See Also:

#get_current_metric_data(options = {}) ⇒ Types::GetCurrentMetricDataResponse

Gets the real-time metric data from the specified Amazon Connect instance.

For a description of each metric, see Real-time Metrics Definitions in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.get_current_metric_data({
  instance_id: "InstanceId", # required
  filters: { # required
    queues: ["QueueId"],
    channels: ["VOICE"], # accepts VOICE, CHAT
  },
  groupings: ["QUEUE"], # accepts QUEUE, CHANNEL
  current_metrics: [ # required
    {
      name: "AGENTS_ONLINE", # accepts AGENTS_ONLINE, AGENTS_AVAILABLE, AGENTS_ON_CALL, AGENTS_NON_PRODUCTIVE, AGENTS_AFTER_CONTACT_WORK, AGENTS_ERROR, AGENTS_STAFFED, CONTACTS_IN_QUEUE, OLDEST_CONTACT_AGE, CONTACTS_SCHEDULED, AGENTS_ON_CONTACT, SLOTS_ACTIVE, SLOTS_AVAILABLE
      unit: "SECONDS", # accepts SECONDS, COUNT, PERCENT
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.next_token #=> String
resp.metric_results #=> Array
resp.metric_results[0].dimensions.queue.id #=> String
resp.metric_results[0].dimensions.queue.arn #=> String
resp.metric_results[0].dimensions.channel #=> String, one of "VOICE", "CHAT"
resp.metric_results[0].collections #=> Array
resp.metric_results[0].collections[0].metric.name #=> String, one of "AGENTS_ONLINE", "AGENTS_AVAILABLE", "AGENTS_ON_CALL", "AGENTS_NON_PRODUCTIVE", "AGENTS_AFTER_CONTACT_WORK", "AGENTS_ERROR", "AGENTS_STAFFED", "CONTACTS_IN_QUEUE", "OLDEST_CONTACT_AGE", "CONTACTS_SCHEDULED", "AGENTS_ON_CONTACT", "SLOTS_ACTIVE", "SLOTS_AVAILABLE"
resp.metric_results[0].collections[0].metric.unit #=> String, one of "SECONDS", "COUNT", "PERCENT"
resp.metric_results[0].collections[0].value #=> Float
resp.data_snapshot_time #=> Time

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :filters (required, Types::Filters)

    The queues, up to 100, or channels, to use to filter the metrics returned. Metric data is retrieved only for the resources associated with the queues or channels included in the filter. You can include both queue IDs and queue ARNs in the same request. Both VOICE and CHAT channels are supported.

  • :groupings (Array<String>)

    The grouping applied to the metrics returned. For example, when grouped by QUEUE, the metrics returned apply to each queue rather than aggregated for all queues. If you group by CHANNEL, you should include a Channels filter. Both VOICE and CHAT channels are supported.

    If no Grouping is included in the request, a summary of metrics is returned.

  • :current_metrics (required, Array<Types::CurrentMetric>)

    The metrics to retrieve. Specify the name and unit for each metric. The following metrics are available. For a description of all the metrics, see Real-time Metrics Definitions in the Amazon Connect Administrator Guide.

    AGENTS_AFTER_CONTACT_WORK

    Unit: COUNT

    Name in real-time metrics report: ACW

    AGENTS_AVAILABLE

    Unit: COUNT

    Name in real-time metrics report: Available

    AGENTS_ERROR

    Unit: COUNT

    Name in real-time metrics report: Error

    AGENTS_NON_PRODUCTIVE

    Unit: COUNT

    Name in real-time metrics report: NPT (Non-Productive Time)

    AGENTS_ON_CALL

    Unit: COUNT

    Name in real-time metrics report: On contact

    AGENTS_ON_CONTACT

    Unit: COUNT

    Name in real-time metrics report: On contact

    AGENTS_ONLINE

    Unit: COUNT

    Name in real-time metrics report: Online

    AGENTS_STAFFED

    Unit: COUNT

    Name in real-time metrics report: Staffed

    CONTACTS_IN_QUEUE

    Unit: COUNT

    Name in real-time metrics report: In queue

    CONTACTS_SCHEDULED

    Unit: COUNT

    Name in real-time metrics report: Scheduled

    OLDEST_CONTACT_AGE

    Unit: SECONDS

    When you use groupings, Unit says SECONDS but the Value is returned in MILLISECONDS. For example, if you get a response like this:

    { "Metric": { "Name": "OLDEST_CONTACT_AGE", "Unit": "SECONDS" }, "Value": 24113.0}

    The actual OLDEST_CONTACT_AGE is 24 seconds.

    Name in real-time metrics report: Oldest

    SLOTS_ACTIVE

    Unit: COUNT

    Name in real-time metrics report: Active

    SLOTS_AVAILABLE

    Unit: COUNT

    Name in real-time metrics report: Availability

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

    The token expires after 5 minutes from the time it is created. Subsequent requests that use the token must use the same request parameters as the request that generated the token.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#get_federation_token(options = {}) ⇒ Types::GetFederationTokenResponse

Retrieves a token for federation.

Examples:

Request syntax with placeholder values


resp = client.get_federation_token({
  instance_id: "InstanceId", # required
})

Response structure


resp.credentials.access_token #=> String
resp.credentials.access_token_expiration #=> Time
resp.credentials.refresh_token #=> String
resp.credentials.refresh_token_expiration #=> Time

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

Returns:

See Also:

#get_metric_data(options = {}) ⇒ Types::GetMetricDataResponse

Gets historical metric data from the specified Amazon Connect instance.

For a description of each historical metric, see Historical Metrics Definitions in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.get_metric_data({
  instance_id: "InstanceId", # required
  start_time: Time.now, # required
  end_time: Time.now, # required
  filters: { # required
    queues: ["QueueId"],
    channels: ["VOICE"], # accepts VOICE, CHAT
  },
  groupings: ["QUEUE"], # accepts QUEUE, CHANNEL
  historical_metrics: [ # required
    {
      name: "CONTACTS_QUEUED", # accepts CONTACTS_QUEUED, CONTACTS_HANDLED, CONTACTS_ABANDONED, CONTACTS_CONSULTED, CONTACTS_AGENT_HUNG_UP_FIRST, CONTACTS_HANDLED_INCOMING, CONTACTS_HANDLED_OUTBOUND, CONTACTS_HOLD_ABANDONS, CONTACTS_TRANSFERRED_IN, CONTACTS_TRANSFERRED_OUT, CONTACTS_TRANSFERRED_IN_FROM_QUEUE, CONTACTS_TRANSFERRED_OUT_FROM_QUEUE, CONTACTS_MISSED, CALLBACK_CONTACTS_HANDLED, API_CONTACTS_HANDLED, OCCUPANCY, HANDLE_TIME, AFTER_CONTACT_WORK_TIME, QUEUED_TIME, ABANDON_TIME, QUEUE_ANSWER_TIME, HOLD_TIME, INTERACTION_TIME, INTERACTION_AND_HOLD_TIME, SERVICE_LEVEL
      threshold: {
        comparison: "LT", # accepts LT
        threshold_value: 1.0,
      },
      statistic: "SUM", # accepts SUM, MAX, AVG
      unit: "SECONDS", # accepts SECONDS, COUNT, PERCENT
    },
  ],
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.next_token #=> String
resp.metric_results #=> Array
resp.metric_results[0].dimensions.queue.id #=> String
resp.metric_results[0].dimensions.queue.arn #=> String
resp.metric_results[0].dimensions.channel #=> String, one of "VOICE", "CHAT"
resp.metric_results[0].collections #=> Array
resp.metric_results[0].collections[0].metric.name #=> String, one of "CONTACTS_QUEUED", "CONTACTS_HANDLED", "CONTACTS_ABANDONED", "CONTACTS_CONSULTED", "CONTACTS_AGENT_HUNG_UP_FIRST", "CONTACTS_HANDLED_INCOMING", "CONTACTS_HANDLED_OUTBOUND", "CONTACTS_HOLD_ABANDONS", "CONTACTS_TRANSFERRED_IN", "CONTACTS_TRANSFERRED_OUT", "CONTACTS_TRANSFERRED_IN_FROM_QUEUE", "CONTACTS_TRANSFERRED_OUT_FROM_QUEUE", "CONTACTS_MISSED", "CALLBACK_CONTACTS_HANDLED", "API_CONTACTS_HANDLED", "OCCUPANCY", "HANDLE_TIME", "AFTER_CONTACT_WORK_TIME", "QUEUED_TIME", "ABANDON_TIME", "QUEUE_ANSWER_TIME", "HOLD_TIME", "INTERACTION_TIME", "INTERACTION_AND_HOLD_TIME", "SERVICE_LEVEL"
resp.metric_results[0].collections[0].metric.threshold.comparison #=> String, one of "LT"
resp.metric_results[0].collections[0].metric.threshold.threshold_value #=> Float
resp.metric_results[0].collections[0].metric.statistic #=> String, one of "SUM", "MAX", "AVG"
resp.metric_results[0].collections[0].metric.unit #=> String, one of "SECONDS", "COUNT", "PERCENT"
resp.metric_results[0].collections[0].value #=> Float

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :start_time (required, Time)

    The timestamp, in UNIX Epoch time format, at which to start the reporting interval for the retrieval of historical metrics data. The time must be specified using a multiple of 5 minutes, such as 10:05, 10:10, 10:15.

    The start time cannot be earlier than 24 hours before the time of the request. Historical metrics are available only for 24 hours.

  • :end_time (required, Time)

    The timestamp, in UNIX Epoch time format, at which to end the reporting interval for the retrieval of historical metrics data. The time must be specified using an interval of 5 minutes, such as 11:00, 11:05, 11:10, and must be later than the start time timestamp.

    The time range between the start and end time must be less than 24 hours.

  • :filters (required, Types::Filters)

    The queues, up to 100, or channels, to use to filter the metrics returned. Metric data is retrieved only for the resources associated with the queues or channels included in the filter. You can include both queue IDs and queue ARNs in the same request. Both VOICE and CHAT channels are supported.

  • :groupings (Array<String>)

    The grouping applied to the metrics returned. For example, when results are grouped by queue, the metrics returned are grouped by queue. The values returned apply to the metrics for each queue rather than aggregated for all queues.

    The only supported grouping is QUEUE.

    If no grouping is specified, a summary of metrics for all queues is returned.

  • :historical_metrics (required, Array<Types::HistoricalMetric>)

    The metrics to retrieve. Specify the name, unit, and statistic for each metric. The following historical metrics are available. For a description of each metric, see Historical Metrics Definitions in the Amazon Connect Administrator Guide.

    ABANDON_TIME

    Unit: SECONDS

    Statistic: AVG

    AFTER_CONTACT_WORK_TIME

    Unit: SECONDS

    Statistic: AVG

    API_CONTACTS_HANDLED

    Unit: COUNT

    Statistic: SUM

    CALLBACK_CONTACTS_HANDLED

    Unit: COUNT

    Statistic: SUM

    CONTACTS_ABANDONED

    Unit: COUNT

    Statistic: SUM

    CONTACTS_AGENT_HUNG_UP_FIRST

    Unit: COUNT

    Statistic: SUM

    CONTACTS_CONSULTED

    Unit: COUNT

    Statistic: SUM

    CONTACTS_HANDLED

    Unit: COUNT

    Statistic: SUM

    CONTACTS_HANDLED_INCOMING

    Unit: COUNT

    Statistic: SUM

    CONTACTS_HANDLED_OUTBOUND

    Unit: COUNT

    Statistic: SUM

    CONTACTS_HOLD_ABANDONS

    Unit: COUNT

    Statistic: SUM

    CONTACTS_MISSED

    Unit: COUNT

    Statistic: SUM

    CONTACTS_QUEUED

    Unit: COUNT

    Statistic: SUM

    CONTACTS_TRANSFERRED_IN

    Unit: COUNT

    Statistic: SUM

    CONTACTS_TRANSFERRED_IN_FROM_QUEUE

    Unit: COUNT

    Statistic: SUM

    CONTACTS_TRANSFERRED_OUT

    Unit: COUNT

    Statistic: SUM

    CONTACTS_TRANSFERRED_OUT_FROM_QUEUE

    Unit: COUNT

    Statistic: SUM

    HANDLE_TIME

    Unit: SECONDS

    Statistic: AVG

    HOLD_TIME

    Unit: SECONDS

    Statistic: AVG

    INTERACTION_AND_HOLD_TIME

    Unit: SECONDS

    Statistic: AVG

    INTERACTION_TIME

    Unit: SECONDS

    Statistic: AVG

    OCCUPANCY

    Unit: PERCENT

    Statistic: AVG

    QUEUE_ANSWER_TIME

    Unit: SECONDS

    Statistic: AVG

    QUEUED_TIME

    Unit: SECONDS

    Statistic: MAX

    SERVICE_LEVEL

    Unit: PERCENT

    Statistic: AVG

    Threshold: Only \"Less than\" comparisons are supported, with the following service level thresholds: 15, 20, 25, 30, 45, 60, 90, 120, 180, 240, 300, 600

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#list_approved_origins(options = {}) ⇒ Types::ListApprovedOriginsResponse

Returns a paginated list of all approved origins associated with the instance.

Examples:

Request syntax with placeholder values


resp = client.list_approved_origins({
  instance_id: "InstanceId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


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

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#list_contact_flows(options = {}) ⇒ Types::ListContactFlowsResponse

Provides information about the contact flows for the specified Amazon Connect instance.

You can also create and update contact flows using the Amazon Connect Flow language.

For more information about contact flows, see Contact Flows in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.list_contact_flows({
  instance_id: "InstanceId", # required
  contact_flow_types: ["CONTACT_FLOW"], # accepts CONTACT_FLOW, CUSTOMER_QUEUE, CUSTOMER_HOLD, CUSTOMER_WHISPER, AGENT_HOLD, AGENT_WHISPER, OUTBOUND_WHISPER, AGENT_TRANSFER, QUEUE_TRANSFER
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.contact_flow_summary_list #=> Array
resp.contact_flow_summary_list[0].id #=> String
resp.contact_flow_summary_list[0].arn #=> String
resp.contact_flow_summary_list[0].name #=> String
resp.contact_flow_summary_list[0].contact_flow_type #=> String, one of "CONTACT_FLOW", "CUSTOMER_QUEUE", "CUSTOMER_HOLD", "CUSTOMER_WHISPER", "AGENT_HOLD", "AGENT_WHISPER", "OUTBOUND_WHISPER", "AGENT_TRANSFER", "QUEUE_TRANSFER"
resp.next_token #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :contact_flow_types (Array<String>)

    The type of contact flow.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#list_hours_of_operations(options = {}) ⇒ Types::ListHoursOfOperationsResponse

Provides information about the hours of operation for the specified Amazon Connect instance.

For more information about hours of operation, see Set the Hours of Operation for a Queue in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.list_hours_of_operations({
  instance_id: "InstanceId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.hours_of_operation_summary_list #=> Array
resp.hours_of_operation_summary_list[0].id #=> String
resp.hours_of_operation_summary_list[0].arn #=> String
resp.hours_of_operation_summary_list[0].name #=> String
resp.next_token #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#list_instance_attributes(options = {}) ⇒ Types::ListInstanceAttributesResponse

Returns a paginated list of all attribute types for the given instance.

Examples:

Request syntax with placeholder values


resp = client.list_instance_attributes({
  instance_id: "InstanceId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.attributes #=> Array
resp.attributes[0].attribute_type #=> String, one of "INBOUND_CALLS", "OUTBOUND_CALLS", "CONTACTFLOW_LOGS", "CONTACT_LENS", "AUTO_RESOLVE_BEST_VOICES", "USE_CUSTOM_TTS_VOICES", "EARLY_MEDIA"
resp.attributes[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#list_instance_storage_configs(options = {}) ⇒ Types::ListInstanceStorageConfigsResponse

Returns a paginated list of storage configs for the identified instance and resource type.

Examples:

Request syntax with placeholder values


resp = client.list_instance_storage_configs({
  instance_id: "InstanceId", # required
  resource_type: "CHAT_TRANSCRIPTS", # required, accepts CHAT_TRANSCRIPTS, CALL_RECORDINGS, SCHEDULED_REPORTS, MEDIA_STREAMS, CONTACT_TRACE_RECORDS, AGENT_EVENTS
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.storage_configs #=> Array
resp.storage_configs[0].association_id #=> String
resp.storage_configs[0].storage_type #=> String, one of "S3", "KINESIS_VIDEO_STREAM", "KINESIS_STREAM", "KINESIS_FIREHOSE"
resp.storage_configs[0].s3_config.bucket_name #=> String
resp.storage_configs[0].s3_config.bucket_prefix #=> String
resp.storage_configs[0].s3_config.encryption_config.encryption_type #=> String, one of "KMS"
resp.storage_configs[0].s3_config.encryption_config.key_id #=> String
resp.storage_configs[0].kinesis_video_stream_config.prefix #=> String
resp.storage_configs[0].kinesis_video_stream_config.retention_period_hours #=> Integer
resp.storage_configs[0].kinesis_video_stream_config.encryption_config.encryption_type #=> String, one of "KMS"
resp.storage_configs[0].kinesis_video_stream_config.encryption_config.key_id #=> String
resp.storage_configs[0].kinesis_stream_config.stream_arn #=> String
resp.storage_configs[0].kinesis_firehose_config.firehose_arn #=> String
resp.next_token #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :resource_type (required, String)

    A valid resource type.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#list_instances(options = {}) ⇒ Types::ListInstancesResponse

Return a list of instances which are in active state, creation-in-progress state, and failed state. Instances that aren't successfully created (they are in a failed state) are returned only for 24 hours after the CreateInstance API was invoked.

Examples:

Request syntax with placeholder values


resp = client.list_instances({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.instance_summary_list #=> Array
resp.instance_summary_list[0].id #=> String
resp.instance_summary_list[0].arn #=> String
resp.instance_summary_list[0].identity_management_type #=> String, one of "SAML", "CONNECT_MANAGED", "EXISTING_DIRECTORY"
resp.instance_summary_list[0].instance_alias #=> String
resp.instance_summary_list[0].created_time #=> Time
resp.instance_summary_list[0].service_role #=> String
resp.instance_summary_list[0].instance_status #=> String, one of "CREATION_IN_PROGRESS", "ACTIVE", "CREATION_FAILED"
resp.instance_summary_list[0].inbound_calls_enabled #=> true/false
resp.instance_summary_list[0].outbound_calls_enabled #=> true/false
resp.next_token #=> String

Options Hash (options):

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#list_lambda_functions(options = {}) ⇒ Types::ListLambdaFunctionsResponse

Returns a paginated list of all the Lambda functions that show up in the drop-down options in the relevant contact flow blocks.

Examples:

Request syntax with placeholder values


resp = client.list_lambda_functions({
  instance_id: "InstanceId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


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

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#list_lex_bots(options = {}) ⇒ Types::ListLexBotsResponse

Returns a paginated list of all the Amazon Lex bots currently associated with the instance.

Examples:

Request syntax with placeholder values


resp = client.list_lex_bots({
  instance_id: "InstanceId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.lex_bots #=> Array
resp.lex_bots[0].name #=> String
resp.lex_bots[0].lex_region #=> String
resp.next_token #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#list_phone_numbers(options = {}) ⇒ Types::ListPhoneNumbersResponse

Provides information about the phone numbers for the specified Amazon Connect instance.

For more information about phone numbers, see Set Up Phone Numbers for Your Contact Center in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.list_phone_numbers({
  instance_id: "InstanceId", # required
  phone_number_types: ["TOLL_FREE"], # accepts TOLL_FREE, DID
  phone_number_country_codes: ["AF"], # accepts AF, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BA, BW, BR, IO, VG, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CK, CR, HR, CU, CW, CY, CZ, CD, DK, DJ, DM, DO, TL, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, PF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GU, GT, GG, GN, GW, GY, HT, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IM, IL, IT, CI, JM, JP, JE, JO, KZ, KE, KI, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MK, MG, MW, MY, MV, ML, MT, MH, MR, MU, YT, MX, FM, MD, MC, MN, ME, MS, MA, MZ, MM, NA, NR, NP, NL, AN, NC, NZ, NI, NE, NG, NU, KP, MP, NO, OM, PK, PW, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, CG, RE, RO, RU, RW, BL, SH, KN, LC, MF, PM, VC, WS, SM, ST, SA, SN, RS, SC, SL, SG, SX, SK, SI, SB, SO, ZA, KR, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TG, TK, TO, TT, TN, TR, TM, TC, TV, VI, UG, UA, AE, GB, US, UY, UZ, VU, VA, VE, VN, WF, EH, YE, ZM, ZW
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.phone_number_summary_list #=> Array
resp.phone_number_summary_list[0].id #=> String
resp.phone_number_summary_list[0].arn #=> String
resp.phone_number_summary_list[0].phone_number #=> String
resp.phone_number_summary_list[0].phone_number_type #=> String, one of "TOLL_FREE", "DID"
resp.phone_number_summary_list[0].phone_number_country_code #=> String, one of "AF", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BA", "BW", "BR", "IO", "VG", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CK", "CR", "HR", "CU", "CW", "CY", "CZ", "CD", "DK", "DJ", "DM", "DO", "TL", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "PF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "CI", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "KP", "MP", "NO", "OM", "PK", "PW", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "CG", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "KR", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "VI", "UG", "UA", "AE", "GB", "US", "UY", "UZ", "VU", "VA", "VE", "VN", "WF", "EH", "YE", "ZM", "ZW"
resp.next_token #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :phone_number_types (Array<String>)

    The type of phone number.

  • :phone_number_country_codes (Array<String>)

    The ISO country code.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#list_prompts(options = {}) ⇒ Types::ListPromptsResponse

Provides information about the prompts for the specified Amazon Connect instance.

Examples:

Request syntax with placeholder values


resp = client.list_prompts({
  instance_id: "InstanceId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.prompt_summary_list #=> Array
resp.prompt_summary_list[0].id #=> String
resp.prompt_summary_list[0].arn #=> String
resp.prompt_summary_list[0].name #=> String
resp.next_token #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximum number of results to return per page.

Returns:

See Also:

#list_queues(options = {}) ⇒ Types::ListQueuesResponse

Provides information about the queues for the specified Amazon Connect instance.

For more information about queues, see Queues: Standard and Agent in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.list_queues({
  instance_id: "InstanceId", # required
  queue_types: ["STANDARD"], # accepts STANDARD, AGENT
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.queue_summary_list #=> Array
resp.queue_summary_list[0].id #=> String
resp.queue_summary_list[0].arn #=> String
resp.queue_summary_list[0].name #=> String
resp.queue_summary_list[0].queue_type #=> String, one of "STANDARD", "AGENT"
resp.next_token #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :queue_types (Array<String>)

    The type of queue.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#list_routing_profile_queues(options = {}) ⇒ Types::ListRoutingProfileQueuesResponse

List the queues associated with a routing profile.

Examples:

Request syntax with placeholder values


resp = client.list_routing_profile_queues({
  instance_id: "InstanceId", # required
  routing_profile_id: "RoutingProfileId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.next_token #=> String
resp.routing_profile_queue_config_summary_list #=> Array
resp.routing_profile_queue_config_summary_list[0].queue_id #=> String
resp.routing_profile_queue_config_summary_list[0].queue_arn #=> String
resp.routing_profile_queue_config_summary_list[0].queue_name #=> String
resp.routing_profile_queue_config_summary_list[0].priority #=> Integer
resp.routing_profile_queue_config_summary_list[0].delay #=> Integer
resp.routing_profile_queue_config_summary_list[0].channel #=> String, one of "VOICE", "CHAT"

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :routing_profile_id (required, String)

    The identifier of the routing profile.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#list_routing_profiles(options = {}) ⇒ Types::ListRoutingProfilesResponse

Provides summary information about the routing profiles for the specified Amazon Connect instance.

For more information about routing profiles, see Routing Profiles and Create a Routing Profile in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.list_routing_profiles({
  instance_id: "InstanceId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.routing_profile_summary_list #=> Array
resp.routing_profile_summary_list[0].id #=> String
resp.routing_profile_summary_list[0].arn #=> String
resp.routing_profile_summary_list[0].name #=> String
resp.next_token #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#list_security_keys(options = {}) ⇒ Types::ListSecurityKeysResponse

Returns a paginated list of all security keys associated with the instance.

Examples:

Request syntax with placeholder values


resp = client.list_security_keys({
  instance_id: "InstanceId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.security_keys #=> Array
resp.security_keys[0].association_id #=> String
resp.security_keys[0].key #=> String
resp.security_keys[0].creation_time #=> Time
resp.next_token #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#list_security_profiles(options = {}) ⇒ Types::ListSecurityProfilesResponse

Provides summary information about the security profiles for the specified Amazon Connect instance.

For more information about security profiles, see Security Profiles in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.list_security_profiles({
  instance_id: "InstanceId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.security_profile_summary_list #=> Array
resp.security_profile_summary_list[0].id #=> String
resp.security_profile_summary_list[0].arn #=> String
resp.security_profile_summary_list[0].name #=> String
resp.next_token #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

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

Lists the tags for the specified resource.

For sample policies that use tags, see Amazon Connect Identity-Based Policy Examples in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "ARN", # required
})

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource.

Returns:

See Also:

#list_user_hierarchy_groups(options = {}) ⇒ Types::ListUserHierarchyGroupsResponse

Provides summary information about the hierarchy groups for the specified Amazon Connect instance.

For more information about agent hierarchies, see Set Up Agent Hierarchies in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.list_user_hierarchy_groups({
  instance_id: "InstanceId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.user_hierarchy_group_summary_list #=> Array
resp.user_hierarchy_group_summary_list[0].id #=> String
resp.user_hierarchy_group_summary_list[0].arn #=> String
resp.user_hierarchy_group_summary_list[0].name #=> String
resp.next_token #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#list_users(options = {}) ⇒ Types::ListUsersResponse

Provides summary information about the users for the specified Amazon Connect instance.

Examples:

Request syntax with placeholder values


resp = client.list_users({
  instance_id: "InstanceId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.user_summary_list #=> Array
resp.user_summary_list[0].id #=> String
resp.user_summary_list[0].arn #=> String
resp.user_summary_list[0].username #=> String
resp.next_token #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :next_token (String)

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • :max_results (Integer)

    The maximimum number of results to return per page.

Returns:

See Also:

#resume_contact_recording(options = {}) ⇒ Struct

When a contact is being recorded, and the recording has been suspended using SuspendContactRecording, this API resumes recording the call.

Only voice recordings are supported at this time.

Examples:

Request syntax with placeholder values


resp = client.resume_contact_recording({
  instance_id: "InstanceId", # required
  contact_id: "ContactId", # required
  initial_contact_id: "ContactId", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :contact_id (required, String)

    The identifier of the contact.

  • :initial_contact_id (required, String)

    The identifier of the contact. This is the identifier of the contact associated with the first interaction with the contact center.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#start_chat_contact(options = {}) ⇒ Types::StartChatContactResponse

Initiates a contact flow to start a new chat for the customer. Response of this API provides a token required to obtain credentials from the CreateParticipantConnection API in the Amazon Connect Participant Service.

When a new chat contact is successfully created, clients need to subscribe to the participant’s connection for the created chat within 5 minutes. This is achieved by invoking CreateParticipantConnection with WEBSOCKET and CONNECTION_CREDENTIALS.

A 429 error occurs in two situations:

  • API rate limit is exceeded. API TPS throttling returns a TooManyRequests exception from the API Gateway.

  • The quota for concurrent active chats is exceeded. Active chat throttling returns a LimitExceededException.

For more information about how chat works, see Chat in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.start_chat_contact({
  instance_id: "InstanceId", # required
  contact_flow_id: "ContactFlowId", # required
  attributes: {
    "AttributeName" => "AttributeValue",
  },
  participant_details: { # required
    display_name: "DisplayName", # required
  },
  initial_message: {
    content_type: "ChatContentType", # required
    content: "ChatContent", # required
  },
  client_token: "ClientToken",
})

Response structure


resp.contact_id #=> String
resp.participant_id #=> String
resp.participant_token #=> String

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :contact_flow_id (required, String)

    The identifier of the contact flow for initiating the chat. To see the ContactFlowId in the Amazon Connect console user interface, on the navigation menu go to Routing, Contact Flows. Choose the contact flow. On the contact flow page, under the name of the contact flow, choose Show additional flow information. The ContactFlowId is the last part of the ARN, shown here in bold:

    arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx

  • :attributes (Hash<String,String>)

    A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes.

    There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, dash, and underscore characters.

  • :participant_details (required, Types::ParticipantDetails)

    Information identifying the participant.

  • :initial_message (Types::ChatMessage)

    The initial message to be sent to the newly created chat.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Returns:

See Also:

#start_contact_recording(options = {}) ⇒ Struct

This API starts recording the contact when the agent joins the call. StartContactRecording is a one-time action. For example, if you use StopContactRecording to stop recording an ongoing call, you can't use StartContactRecording to restart it. For scenarios where the recording has started and you want to suspend and resume it, such as when collecting sensitive information (for example, a credit card number), use SuspendContactRecording and ResumeContactRecording.

You can use this API to override the recording behavior configured in the Set recording behavior block.

Only voice recordings are supported at this time.

Examples:

Request syntax with placeholder values


resp = client.start_contact_recording({
  instance_id: "InstanceId", # required
  contact_id: "ContactId", # required
  initial_contact_id: "ContactId", # required
  voice_recording_configuration: { # required
    voice_recording_track: "FROM_AGENT", # accepts FROM_AGENT, TO_AGENT, ALL
  },
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :contact_id (required, String)

    The identifier of the contact.

  • :initial_contact_id (required, String)

    The identifier of the contact. This is the identifier of the contact associated with the first interaction with the contact center.

  • :voice_recording_configuration (required, Types::VoiceRecordingConfiguration)

    Who is being recorded.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#start_outbound_voice_contact(options = {}) ⇒ Types::StartOutboundVoiceContactResponse

This API places an outbound call to a contact, and then initiates the contact flow. It performs the actions in the contact flow that's specified (in ContactFlowId).

Agents are not involved in initiating the outbound API (that is, dialing the contact). If the contact flow places an outbound call to a contact, and then puts the contact in queue, that's when the call is routed to the agent, like any other inbound case.

There is a 60 second dialing timeout for this operation. If the call is not connected after 60 seconds, it fails.

UK numbers with a 447 prefix are not allowed by default. Before you can dial these UK mobile numbers, you must submit a service quota increase request. For more information, see Amazon Connect Service Quotas in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.start_outbound_voice_contact({
  destination_phone_number: "PhoneNumber", # required
  contact_flow_id: "ContactFlowId", # required
  instance_id: "InstanceId", # required
  client_token: "ClientToken",
  source_phone_number: "PhoneNumber",
  queue_id: "QueueId",
  attributes: {
    "AttributeName" => "AttributeValue",
  },
})

Response structure


resp.contact_id #=> String

Options Hash (options):

  • :destination_phone_number (required, String)

    The phone number of the customer, in E.164 format.

  • :contact_flow_id (required, String)

    The identifier of the contact flow for the outbound call. To see the ContactFlowId in the Amazon Connect console user interface, on the navigation menu go to Routing, Contact Flows. Choose the contact flow. On the contact flow page, under the name of the contact flow, choose Show additional flow information. The ContactFlowId is the last part of the ARN, shown here in bold:

    arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :client_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. The token is valid for 7 days after creation. If a contact is already started, the contact ID is returned. If the contact is disconnected, a new contact is started.

  • :source_phone_number (String)

    The phone number associated with the Amazon Connect instance, in E.164 format. If you do not specify a source phone number, you must specify a queue.

  • :queue_id (String)

    The queue for the call. If you specify a queue, the phone displayed for caller ID is the phone number specified in the queue. If you do not specify a queue, the queue defined in the contact flow is used. If you do not specify a queue, you must specify a source phone number.

  • :attributes (Hash<String,String>)

    A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes.

    There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, dash, and underscore characters.

Returns:

See Also:

#stop_contact(options = {}) ⇒ Struct

Ends the specified contact.

Examples:

Request syntax with placeholder values


resp = client.stop_contact({
  contact_id: "ContactId", # required
  instance_id: "InstanceId", # required
})

Options Hash (options):

  • :contact_id (required, String)

    The ID of the contact.

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#stop_contact_recording(options = {}) ⇒ Struct

When a contact is being recorded, this API stops recording the call. StopContactRecording is a one-time action. If you use StopContactRecording to stop recording an ongoing call, you can't use StartContactRecording to restart it. For scenarios where the recording has started and you want to suspend it for sensitive information (for example, to collect a credit card number), and then restart it, use SuspendContactRecording and ResumeContactRecording.

Only voice recordings are supported at this time.

Examples:

Request syntax with placeholder values


resp = client.stop_contact_recording({
  instance_id: "InstanceId", # required
  contact_id: "ContactId", # required
  initial_contact_id: "ContactId", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :contact_id (required, String)

    The identifier of the contact.

  • :initial_contact_id (required, String)

    The identifier of the contact. This is the identifier of the contact associated with the first interaction with the contact center.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#suspend_contact_recording(options = {}) ⇒ Struct

When a contact is being recorded, this API suspends recording the call. For example, you might suspend the call recording while collecting sensitive information, such as a credit card number. Then use ResumeContactRecording to restart recording.

The period of time that the recording is suspended is filled with silence in the final recording.

Only voice recordings are supported at this time.

Examples:

Request syntax with placeholder values


resp = client.suspend_contact_recording({
  instance_id: "InstanceId", # required
  contact_id: "ContactId", # required
  initial_contact_id: "ContactId", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :contact_id (required, String)

    The identifier of the contact.

  • :initial_contact_id (required, String)

    The identifier of the contact. This is the identifier of the contact associated with the first interaction with the contact center.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#tag_resource(options = {}) ⇒ Struct

Adds the specified tags to the specified resource.

The supported resource types are users, routing profiles, and contact flows.

For sample policies that use tags, see Amazon Connect Identity-Based Policy Examples in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "ARN", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource.

  • :tags (required, Hash<String,String>)

    One or more tags. For example, { \"tags\": \"key2\":\"value2\" }.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#untag_resource(options = {}) ⇒ Struct

Removes the specified tags from the specified resource.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource.

  • :tag_keys (required, Array<String>)

    The tag keys.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_contact_attributes(options = {}) ⇒ Struct

Creates or updates the contact attributes associated with the specified contact.

You can add or update attributes for both ongoing and completed contacts. For example, you can update the customer's name or the reason the customer called while the call is active, or add notes about steps that the agent took during the call that are displayed to the next agent that takes the call. You can also update attributes for a contact using data from your CRM application and save the data with the contact in Amazon Connect. You could also flag calls for additional analysis, such as legal review or identifying abusive callers.

Contact attributes are available in Amazon Connect for 24 months, and are then deleted.

Important: You cannot use the operation to update attributes for contacts that occurred prior to the release of the API, September 12, 2018. You can update attributes only for contacts that started after the release of the API. If you attempt to update attributes for a contact that occurred prior to the release of the API, a 400 error is returned. This applies also to queued callbacks that were initiated prior to the release of the API but are still active in your instance.

Examples:

Request syntax with placeholder values


resp = client.update_contact_attributes({
  initial_contact_id: "ContactId", # required
  instance_id: "InstanceId", # required
  attributes: { # required
    "AttributeName" => "AttributeValue",
  },
})

Options Hash (options):

  • :initial_contact_id (required, String)

    The identifier of the contact. This is the identifier of the contact associated with the first interaction with the contact center.

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :attributes (required, Hash<String,String>)

    The Amazon Connect attributes. These attributes can be accessed in contact flows just like any other contact attributes.

    You can have up to 32,768 UTF-8 bytes across all attributes for a contact. Attribute keys can include only alphanumeric, dash, and underscore characters.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_contact_flow_content(options = {}) ⇒ Struct

Updates the specified contact flow.

You can also create and update contact flows using the Amazon Connect Flow language.

Examples:

Request syntax with placeholder values


resp = client.update_contact_flow_content({
  instance_id: "InstanceId", # required
  contact_flow_id: "ContactFlowId", # required
  content: "ContactFlowContent", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :contact_flow_id (required, String)

    The identifier of the contact flow.

  • :content (required, String)

    The JSON string that represents contact flow’s content. For an example, see Example contact flow in Amazon Connect Flow language in the Amazon Connect Administrator Guide.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_contact_flow_name(options = {}) ⇒ Struct

The name of the contact flow.

You can also create and update contact flows using the Amazon Connect Flow language.

Examples:

Request syntax with placeholder values


resp = client.update_contact_flow_name({
  instance_id: "InstanceId", # required
  contact_flow_id: "ContactFlowId", # required
  name: "ContactFlowName",
  description: "ContactFlowDescription",
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :contact_flow_id (required, String)

    The identifier of the contact flow.

  • :name (String)

    The name of the contact flow.

  • :description (String)

    The description of the contact flow.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_instance_attribute(options = {}) ⇒ Struct

Updates the value for the specified attribute type.

Examples:

Request syntax with placeholder values


resp = client.update_instance_attribute({
  instance_id: "InstanceId", # required
  attribute_type: "INBOUND_CALLS", # required, accepts INBOUND_CALLS, OUTBOUND_CALLS, CONTACTFLOW_LOGS, CONTACT_LENS, AUTO_RESOLVE_BEST_VOICES, USE_CUSTOM_TTS_VOICES, EARLY_MEDIA
  value: "InstanceAttributeValue", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :attribute_type (required, String)

    The type of attribute.

  • :value (required, String)

    The value for the attribute. Maximum character limit is 100.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_instance_storage_config(options = {}) ⇒ Struct

Updates an existing configuration for a resource type. This API is idempotent.

Examples:

Request syntax with placeholder values


resp = client.update_instance_storage_config({
  instance_id: "InstanceId", # required
  association_id: "AssociationId", # required
  resource_type: "CHAT_TRANSCRIPTS", # required, accepts CHAT_TRANSCRIPTS, CALL_RECORDINGS, SCHEDULED_REPORTS, MEDIA_STREAMS, CONTACT_TRACE_RECORDS, AGENT_EVENTS
  storage_config: { # required
    association_id: "AssociationId",
    storage_type: "S3", # required, accepts S3, KINESIS_VIDEO_STREAM, KINESIS_STREAM, KINESIS_FIREHOSE
    s3_config: {
      bucket_name: "BucketName", # required
      bucket_prefix: "Prefix", # required
      encryption_config: {
        encryption_type: "KMS", # required, accepts KMS
        key_id: "KeyId", # required
      },
    },
    kinesis_video_stream_config: {
      prefix: "Prefix", # required
      retention_period_hours: 1, # required
      encryption_config: { # required
        encryption_type: "KMS", # required, accepts KMS
        key_id: "KeyId", # required
      },
    },
    kinesis_stream_config: {
      stream_arn: "ARN", # required
    },
    kinesis_firehose_config: {
      firehose_arn: "ARN", # required
    },
  },
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :association_id (required, String)

    The existing association identifier that uniquely identifies the resource type and storage config for the given instance ID.

  • :resource_type (required, String)

    A valid resource type.

  • :storage_config (required, Types::InstanceStorageConfig)

    The storage configuration for the instance.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_routing_profile_concurrency(options = {}) ⇒ Struct

Updates the channels that agents can handle in the Contact Control Panel (CCP) for a routing profile.

Examples:

Request syntax with placeholder values


resp = client.update_routing_profile_concurrency({
  instance_id: "InstanceId", # required
  routing_profile_id: "RoutingProfileId", # required
  media_concurrencies: [ # required
    {
      channel: "VOICE", # required, accepts VOICE, CHAT
      concurrency: 1, # required
    },
  ],
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :routing_profile_id (required, String)

    The identifier of the routing profile.

  • :media_concurrencies (required, Array<Types::MediaConcurrency>)

    The channels agents can handle in the Contact Control Panel (CCP).

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_routing_profile_default_outbound_queue(options = {}) ⇒ Struct

Updates the default outbound queue of a routing profile.

Examples:

Request syntax with placeholder values


resp = client.update_routing_profile_default_outbound_queue({
  instance_id: "InstanceId", # required
  routing_profile_id: "RoutingProfileId", # required
  default_outbound_queue_id: "QueueId", # required
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :routing_profile_id (required, String)

    The identifier of the routing profile.

  • :default_outbound_queue_id (required, String)

    The identifier for the default outbound queue.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_routing_profile_name(options = {}) ⇒ Struct

Updates the name and description of a routing profile. The request accepts the following data in JSON format. At least Name or Description must be provided.

Examples:

Request syntax with placeholder values


resp = client.update_routing_profile_name({
  instance_id: "InstanceId", # required
  routing_profile_id: "RoutingProfileId", # required
  name: "RoutingProfileName",
  description: "RoutingProfileDescription",
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :routing_profile_id (required, String)

    The identifier of the routing profile.

  • :name (String)

    The name of the routing profile. Must not be more than 127 characters.

  • :description (String)

    The description of the routing profile. Must not be more than 250 characters.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_routing_profile_queues(options = {}) ⇒ Struct

Updates the properties associated with a set of queues for a routing profile.

Examples:

Request syntax with placeholder values


resp = client.update_routing_profile_queues({
  instance_id: "InstanceId", # required
  routing_profile_id: "RoutingProfileId", # required
  queue_configs: [ # required
    {
      queue_reference: { # required
        queue_id: "QueueId", # required
        channel: "VOICE", # required, accepts VOICE, CHAT
      },
      priority: 1, # required
      delay: 1, # required
    },
  ],
})

Options Hash (options):

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

  • :routing_profile_id (required, String)

    The identifier of the routing profile.

  • :queue_configs (required, Array<Types::RoutingProfileQueueConfig>)

    The queues to be updated for this routing profile.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_user_hierarchy(options = {}) ⇒ Struct

Assigns the specified hierarchy group to the specified user.

Examples:

Request syntax with placeholder values


resp = client.update_user_hierarchy({
  hierarchy_group_id: "HierarchyGroupId",
  user_id: "UserId", # required
  instance_id: "InstanceId", # required
})

Options Hash (options):

  • :hierarchy_group_id (String)

    The identifier of the hierarchy group.

  • :user_id (required, String)

    The identifier of the user account.

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_user_hierarchy_group_name(options = {}) ⇒ Struct

Updates the name of the user hierarchy group.

Examples:

Request syntax with placeholder values


resp = client.update_user_hierarchy_group_name({
  name: "HierarchyGroupName", # required
  hierarchy_group_id: "HierarchyGroupId", # required
  instance_id: "InstanceId", # required
})

Options Hash (options):

  • :name (required, String)

    The name of the hierarchy group. Must not be more than 100 characters.

  • :hierarchy_group_id (required, String)

    The identifier of the hierarchy group.

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_user_hierarchy_structure(options = {}) ⇒ Struct

Updates the user hierarchy structure: add, remove, and rename user hierarchy levels.

Examples:

Request syntax with placeholder values


resp = client.update_user_hierarchy_structure({
  hierarchy_structure: { # required
    level_one: {
      name: "HierarchyLevelName", # required
    },
    level_two: {
      name: "HierarchyLevelName", # required
    },
    level_three: {
      name: "HierarchyLevelName", # required
    },
    level_four: {
      name: "HierarchyLevelName", # required
    },
    level_five: {
      name: "HierarchyLevelName", # required
    },
  },
  instance_id: "InstanceId", # required
})

Options Hash (options):

  • :hierarchy_structure (required, Types::HierarchyStructureUpdate)

    The hierarchy levels to update.

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_user_identity_info(options = {}) ⇒ Struct

Updates the identity information for the specified user.

Someone with the ability to invoke UpdateUserIndentityInfo can change the login credentials of other users by changing their email address. This poses a security risk to your organization. They can change the email address of a user to the attacker's email address, and then reset the password through email. We strongly recommend limiting who has the ability to invoke UpdateUserIndentityInfo. For more information, see Best Practices for Security Profiles in the Amazon Connect Administrator Guide.

Examples:

Request syntax with placeholder values


resp = client.update_user_identity_info({
  identity_info: { # required
    first_name: "AgentFirstName",
    last_name: "AgentLastName",
    email: "Email",
  },
  user_id: "UserId", # required
  instance_id: "InstanceId", # required
})

Options Hash (options):

  • :identity_info (required, Types::UserIdentityInfo)

    The identity information for the user.

  • :user_id (required, String)

    The identifier of the user account.

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_user_phone_config(options = {}) ⇒ Struct

Updates the phone configuration settings for the specified user.

Examples:

Request syntax with placeholder values


resp = client.update_user_phone_config({
  phone_config: { # required
    phone_type: "SOFT_PHONE", # required, accepts SOFT_PHONE, DESK_PHONE
    auto_accept: false,
    after_contact_work_time_limit: 1,
    desk_phone_number: "PhoneNumber",
  },
  user_id: "UserId", # required
  instance_id: "InstanceId", # required
})

Options Hash (options):

  • :phone_config (required, Types::UserPhoneConfig)

    Information about phone configuration settings for the user.

  • :user_id (required, String)

    The identifier of the user account.

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_user_routing_profile(options = {}) ⇒ Struct

Assigns the specified routing profile to the specified user.

Examples:

Request syntax with placeholder values


resp = client.update_user_routing_profile({
  routing_profile_id: "RoutingProfileId", # required
  user_id: "UserId", # required
  instance_id: "InstanceId", # required
})

Options Hash (options):

  • :routing_profile_id (required, String)

    The identifier of the routing profile for the user.

  • :user_id (required, String)

    The identifier of the user account.

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_user_security_profiles(options = {}) ⇒ Struct

Assigns the specified security profiles to the specified user.

Examples:

Request syntax with placeholder values


resp = client.update_user_security_profiles({
  security_profile_ids: ["SecurityProfileId"], # required
  user_id: "UserId", # required
  instance_id: "InstanceId", # required
})

Options Hash (options):

  • :security_profile_ids (required, Array<String>)

    The identifiers of the security profiles for the user.

  • :user_id (required, String)

    The identifier of the user account.

  • :instance_id (required, String)

    The identifier of the Amazon Connect instance.

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.