Class: Aws::ConnectCases::Client

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

Overview

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

client = Aws::ConnectCases::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from Aws::ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    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.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :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, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :secret_access_key (String)
  • :session_token (String)
  • :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.

  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

    • Aws::SSOTokenProvider - Used for loading tokens from AWS SSO using an access token generated from aws login.

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::ConnectCases::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::ConnectCases::EndpointParameters

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :ssl_timeout (Float) — default: nil

    Sets the SSL timeout in seconds.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



365
366
367
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 365

def initialize(*args)
  super
end

Instance Method Details

#batch_get_field(params = {}) ⇒ Types::BatchGetFieldResponse

Returns the description for the list of fields in the request parameters.

Examples:

Request syntax with placeholder values


resp = client.batch_get_field({
  domain_id: "DomainId", # required
  fields: [ # required
    {
      id: "FieldId", # required
    },
  ],
})

Response structure


resp.errors #=> Array
resp.errors[0].error_code #=> String
resp.errors[0].id #=> String
resp.errors[0].message #=> String
resp.fields #=> Array
resp.fields[0].description #=> String
resp.fields[0].field_arn #=> String
resp.fields[0].field_id #=> String
resp.fields[0].name #=> String
resp.fields[0].namespace #=> String, one of "System", "Custom"
resp.fields[0].tags #=> Hash
resp.fields[0].tags["String"] #=> String
resp.fields[0].type #=> String, one of "Text", "Number", "Boolean", "DateTime", "SingleSelect"

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :fields (required, Array<Types::FieldIdentifier>)

    A list of unique field identifiers.

Returns:

See Also:



416
417
418
419
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 416

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

#batch_put_field_options(params = {}) ⇒ Types::BatchPutFieldOptionsResponse

Creates and updates a set of field options for a single select field in a Cases domain.

Examples:

Request syntax with placeholder values


resp = client.batch_put_field_options({
  domain_id: "DomainId", # required
  field_id: "FieldId", # required
  options: [ # required
    {
      active: false, # required
      name: "FieldOptionName", # required
      value: "FieldOptionValue", # required
    },
  ],
})

Response structure


resp.errors #=> Array
resp.errors[0].error_code #=> String
resp.errors[0].message #=> String
resp.errors[0].value #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :field_id (required, String)

    The unique identifier of a field.

  • :options (required, Array<Types::FieldOption>)

    A list of FieldOption objects.

Returns:

See Also:



462
463
464
465
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 462

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

#create_case(params = {}) ⇒ Types::CreateCaseResponse

Creates a case in the specified Cases domain. Case system and custom fields are taken as an array id/value pairs with a declared data types.

customer_id is a required field when creating a case.

Examples:

Request syntax with placeholder values


resp = client.create_case({
  client_token: "CreateCaseRequestClientTokenString",
  domain_id: "DomainId", # required
  fields: [ # required
    {
      id: "FieldId", # required
      value: { # required
        boolean_value: false,
        double_value: 1.0,
        string_value: "FieldValueUnionStringValueString",
      },
    },
  ],
  template_id: "TemplateId", # required
})

Response structure


resp.case_arn #=> String
resp.case_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :fields (required, Array<Types::FieldValue>)

    An array of objects with field ID (matching ListFields/DescribeField) and value union data.

  • :template_id (required, String)

    A unique identifier of a template.

Returns:

See Also:



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

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

#create_domain(params = {}) ⇒ Types::CreateDomainResponse

Creates a domain, which is a container for all case data, such as cases, fields, templates and layouts. Each Amazon Connect instance can be associated with only one Cases domain.

This will not associate your connect instance to Cases domain. Instead, use the Amazon Connect CreateIntegrationAssociation API.

Examples:

Request syntax with placeholder values


resp = client.create_domain({
  name: "DomainName", # required
})

Response structure


resp.domain_arn #=> String
resp.domain_id #=> String
resp.domain_status #=> String, one of "Active", "CreationInProgress", "CreationFailed"

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The name for your Cases domain. It must be unique for your Amazon Web Services account.

Returns:

See Also:



572
573
574
575
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 572

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

#create_field(params = {}) ⇒ Types::CreateFieldResponse

Creates a field in the Cases domain. This field is used to define the case object model (that is, defines what data can be captured on cases) in a Cases domain.

Examples:

Request syntax with placeholder values


resp = client.create_field({
  description: "FieldDescription",
  domain_id: "DomainId", # required
  name: "FieldName", # required
  type: "Text", # required, accepts Text, Number, Boolean, DateTime, SingleSelect
})

Response structure


resp.field_arn #=> String
resp.field_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :description (String)

    The description of the field.

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :name (required, String)

    The name of the field.

  • :type (required, String)

    Defines the data type, some system constraints, and default display of the field.

Returns:

See Also:



617
618
619
620
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 617

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

#create_layout(params = {}) ⇒ Types::CreateLayoutResponse

Creates a layout in the Cases domain. Layouts define the following configuration in the top section and More Info tab of the Cases user interface:

  • Fields to display to the users

  • Field ordering

Title and Status fields cannot be part of layouts since they are not configurable.

Examples:

Request syntax with placeholder values


resp = client.create_layout({
  content: { # required
    basic: {
      more_info: {
        sections: [
          {
            field_group: {
              fields: [ # required
                {
                  id: "FieldId", # required
                },
              ],
              name: "FieldGroupNameString",
            },
          },
        ],
      },
      top_panel: {
        sections: [
          {
            field_group: {
              fields: [ # required
                {
                  id: "FieldId", # required
                },
              ],
              name: "FieldGroupNameString",
            },
          },
        ],
      },
    },
  },
  domain_id: "DomainId", # required
  name: "LayoutName", # required
})

Response structure


resp.layout_arn #=> String
resp.layout_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :content (required, Types::LayoutContent)

    Information about which fields will be present in the layout, and information about the order of the fields.

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :name (required, String)

    The name of the layout. It must be unique for the Cases domain.

Returns:

See Also:



698
699
700
701
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 698

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

Creates a related item (comments, tasks, and contacts) and associates it with a case.

A Related Item is a resource that is associated with a case. It may or may not have an external identifier linking it to an external resource (for example, a contactArn). All Related Items have their own internal identifier, the relatedItemArn. Examples of related items include comments and contacts.

Examples:

Request syntax with placeholder values


resp = client.create_related_item({
  case_id: "CaseId", # required
  content: { # required
    comment: {
      body: "CommentBody", # required
      content_type: "Text/Plain", # required, accepts Text/Plain
    },
    contact: {
      contact_arn: "ContactArn", # required
    },
  },
  domain_id: "DomainId", # required
  type: "Contact", # required, accepts Contact, Comment
})

Response structure


resp.related_item_arn #=> String
resp.related_item_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :case_id (required, String)

    A unique identifier of the case.

  • :content (required, Types::RelatedItemInputContent)

    The content of a related item to be created.

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :type (required, String)

    The type of a related item.

Returns:

See Also:



757
758
759
760
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 757

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

#create_template(params = {}) ⇒ Types::CreateTemplateResponse

Creates a template in the Cases domain. This template is used to define the case object model (that is, to define what data can be captured on cases) in a Cases domain. A template must have a unique name within a domain, and it must reference existing field IDs and layout IDs. Additionally, multiple fields with same IDs are not allowed within the same Template. A template can be either Active or Inactive, as indicated by its status. Inactive templates cannot be used to create cases.

Examples:

Request syntax with placeholder values


resp = client.create_template({
  description: "TemplateDescription",
  domain_id: "DomainId", # required
  layout_configuration: {
    default_layout: "LayoutId",
  },
  name: "TemplateName", # required
  required_fields: [
    {
      field_id: "FieldId", # required
    },
  ],
  status: "Active", # accepts Active, Inactive
})

Response structure


resp.template_arn #=> String
resp.template_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :description (String)

    A brief description of the template.

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :layout_configuration (Types::LayoutConfiguration)

    Configuration of layouts associated to the template.

  • :name (required, String)

    A name for the template. It must be unique per domain.

  • :required_fields (Array<Types::RequiredField>)

    A list of fields that must contain a value for a case to be successfully created with this template.

  • :status (String)

    The status of the template.

Returns:

See Also:



821
822
823
824
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 821

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

#get_case(params = {}) ⇒ Types::GetCaseResponse

Returns information about a specific case if it exists.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.get_case({
  case_id: "CaseId", # required
  domain_id: "DomainId", # required
  fields: [ # required
    {
      id: "FieldId", # required
    },
  ],
  next_token: "NextToken",
})

Response structure


resp.fields #=> Array
resp.fields[0].id #=> String
resp.fields[0].value.boolean_value #=> Boolean
resp.fields[0].value.double_value #=> Float
resp.fields[0].value.string_value #=> String
resp.next_token #=> String
resp.tags #=> Hash
resp.tags["String"] #=> String
resp.template_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :case_id (required, String)

    A unique identifier of the case.

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :fields (required, Array<Types::FieldIdentifier>)

    A list of unique field identifiers.

  • :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.

Returns:

See Also:



880
881
882
883
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 880

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

#get_case_event_configuration(params = {}) ⇒ Types::GetCaseEventConfigurationResponse

Returns the case event publishing configuration.

Examples:

Request syntax with placeholder values


resp = client.get_case_event_configuration({
  domain_id: "DomainId", # required
})

Response structure


resp.event_bridge.enabled #=> Boolean
resp.event_bridge.included_data.case_data.fields #=> Array
resp.event_bridge.included_data.case_data.fields[0].id #=> String
resp.event_bridge.included_data.related_item_data.include_content #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

Returns:

See Also:



911
912
913
914
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 911

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

#get_domain(params = {}) ⇒ Types::GetDomainResponse

Returns information about a specific domain if it exists.

Examples:

Request syntax with placeholder values


resp = client.get_domain({
  domain_id: "DomainId", # required
})

Response structure


resp.created_time #=> Time
resp.domain_arn #=> String
resp.domain_id #=> String
resp.domain_status #=> String, one of "Active", "CreationInProgress", "CreationFailed"
resp.name #=> String
resp.tags #=> Hash
resp.tags["String"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

Returns:

See Also:



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

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

#get_layout(params = {}) ⇒ Types::GetLayoutResponse

Returns the details for the requested layout.

Examples:

Request syntax with placeholder values


resp = client.get_layout({
  domain_id: "DomainId", # required
  layout_id: "LayoutId", # required
})

Response structure


resp.content.basic.more_info.sections #=> Array
resp.content.basic.more_info.sections[0].field_group.fields #=> Array
resp.content.basic.more_info.sections[0].field_group.fields[0].id #=> String
resp.content.basic.more_info.sections[0].field_group.name #=> String
resp.content.basic.top_panel.sections #=> Array
resp.content.basic.top_panel.sections[0].field_group.fields #=> Array
resp.content.basic.top_panel.sections[0].field_group.fields[0].id #=> String
resp.content.basic.top_panel.sections[0].field_group.name #=> String
resp.layout_arn #=> String
resp.layout_id #=> String
resp.name #=> String
resp.tags #=> Hash
resp.tags["String"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :layout_id (required, String)

    The unique identifier of the layout.

Returns:

See Also:



998
999
1000
1001
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 998

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

#get_template(params = {}) ⇒ Types::GetTemplateResponse

Returns the details for the requested template.

Examples:

Request syntax with placeholder values


resp = client.get_template({
  domain_id: "DomainId", # required
  template_id: "TemplateId", # required
})

Response structure


resp.description #=> String
resp.layout_configuration.default_layout #=> String
resp.name #=> String
resp.required_fields #=> Array
resp.required_fields[0].field_id #=> String
resp.status #=> String, one of "Active", "Inactive"
resp.tags #=> Hash
resp.tags["String"] #=> String
resp.template_arn #=> String
resp.template_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :template_id (required, String)

    A unique identifier of a template.

Returns:

See Also:



1046
1047
1048
1049
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1046

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

#list_cases_for_contact(params = {}) ⇒ Types::ListCasesForContactResponse

Lists cases for a given contact.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_cases_for_contact({
  contact_arn: "ContactArn", # required
  domain_id: "DomainId", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.cases #=> Array
resp.cases[0].case_id #=> String
resp.cases[0].template_id #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :contact_arn (required, String)

    A unique identifier of a contact in Amazon Connect.

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :max_results (Integer)

    The maximum number of results to return per page.

  • :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.

Returns:

See Also:



1094
1095
1096
1097
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1094

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

#list_domains(params = {}) ⇒ Types::ListDomainsResponse

Lists all cases domains in the Amazon Web Services account. Each list item is a condensed summary object of the domain.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


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

Response structure


resp.domains #=> Array
resp.domains[0].domain_arn #=> String
resp.domains[0].domain_id #=> String
resp.domains[0].name #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return per page.

  • :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.

Returns:

See Also:



1136
1137
1138
1139
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1136

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

#list_field_options(params = {}) ⇒ Types::ListFieldOptionsResponse

Lists all of the field options for a field identifier in the domain.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_field_options({
  domain_id: "DomainId", # required
  field_id: "FieldId", # required
  max_results: 1,
  next_token: "NextToken",
  values: ["Value"],
})

Response structure


resp.next_token #=> String
resp.options #=> Array
resp.options[0].active #=> Boolean
resp.options[0].name #=> String
resp.options[0].value #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :field_id (required, String)

    The unique identifier of a field.

  • :max_results (Integer)

    The maximum number of results to return per page.

  • :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.

  • :values (Array<String>)

    A list of FieldOption values to filter on for ListFieldOptions.

Returns:

See Also:



1189
1190
1191
1192
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1189

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

#list_fields(params = {}) ⇒ Types::ListFieldsResponse

Lists all fields in a Cases domain.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_fields({
  domain_id: "DomainId", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.fields #=> Array
resp.fields[0].field_arn #=> String
resp.fields[0].field_id #=> String
resp.fields[0].name #=> String
resp.fields[0].namespace #=> String, one of "System", "Custom"
resp.fields[0].type #=> String, one of "Text", "Number", "Boolean", "DateTime", "SingleSelect"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :max_results (Integer)

    The maximum number of results to return per page.

  • :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.

Returns:

See Also:



1236
1237
1238
1239
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1236

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

#list_layouts(params = {}) ⇒ Types::ListLayoutsResponse

Lists all layouts in the given cases domain. Each list item is a condensed summary object of the layout.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_layouts({
  domain_id: "DomainId", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.layouts #=> Array
resp.layouts[0].layout_arn #=> String
resp.layouts[0].layout_id #=> String
resp.layouts[0].name #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :max_results (Integer)

    The maximum number of results to return per page.

  • :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.

Returns:

See Also:



1282
1283
1284
1285
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1282

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

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

Lists tags for a resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  arn: "Arn", # required
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN)

Returns:

See Also:



1311
1312
1313
1314
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1311

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

#list_templates(params = {}) ⇒ Types::ListTemplatesResponse

Lists all of the templates in a Cases domain. Each list item is a condensed summary object of the template.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_templates({
  domain_id: "DomainId", # required
  max_results: 1,
  next_token: "NextToken",
  status: ["Active"], # accepts Active, Inactive
})

Response structure


resp.next_token #=> String
resp.templates #=> Array
resp.templates[0].name #=> String
resp.templates[0].status #=> String, one of "Active", "Inactive"
resp.templates[0].template_arn #=> String
resp.templates[0].template_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :max_results (Integer)

    The maximum number of results to return per page.

  • :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.

  • :status (Array<String>)

    A list of status values to filter on.

Returns:

See Also:



1362
1363
1364
1365
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1362

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

#put_case_event_configuration(params = {}) ⇒ Struct

API for adding case event publishing configuration

Examples:

Request syntax with placeholder values


resp = client.put_case_event_configuration({
  domain_id: "DomainId", # required
  event_bridge: { # required
    enabled: false, # required
    included_data: {
      case_data: {
        fields: [ # required
          {
            id: "FieldId", # required
          },
        ],
      },
      related_item_data: {
        include_content: false, # required
      },
    },
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :event_bridge (required, Types::EventBridgeConfiguration)

    Configuration to enable EventBridge case event delivery and determine what data is delivered.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1403
1404
1405
1406
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1403

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

#search_cases(params = {}) ⇒ Types::SearchCasesResponse

Searches for cases within their associated Cases domain. Search results are returned as a paginated list of abridged case documents.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.search_cases({
  domain_id: "DomainId", # required
  fields: [
    {
      id: "FieldId", # required
    },
  ],
  filter: {
    and_all: [
      {
        # recursive CaseFilter
      },
    ],
    field: {
      contains: {
        id: "FieldId", # required
        value: { # required
          boolean_value: false,
          double_value: 1.0,
          string_value: "FieldValueUnionStringValueString",
        },
      },
      equal_to: {
        id: "FieldId", # required
        value: { # required
          boolean_value: false,
          double_value: 1.0,
          string_value: "FieldValueUnionStringValueString",
        },
      },
      greater_than: {
        id: "FieldId", # required
        value: { # required
          boolean_value: false,
          double_value: 1.0,
          string_value: "FieldValueUnionStringValueString",
        },
      },
      greater_than_or_equal_to: {
        id: "FieldId", # required
        value: { # required
          boolean_value: false,
          double_value: 1.0,
          string_value: "FieldValueUnionStringValueString",
        },
      },
      less_than: {
        id: "FieldId", # required
        value: { # required
          boolean_value: false,
          double_value: 1.0,
          string_value: "FieldValueUnionStringValueString",
        },
      },
      less_than_or_equal_to: {
        id: "FieldId", # required
        value: { # required
          boolean_value: false,
          double_value: 1.0,
          string_value: "FieldValueUnionStringValueString",
        },
      },
    },
    not: {
      # recursive CaseFilter
    },
  },
  max_results: 1,
  next_token: "NextToken",
  search_term: "SearchCasesRequestSearchTermString",
  sorts: [
    {
      field_id: "FieldId", # required
      sort_order: "Asc", # required, accepts Asc, Desc
    },
  ],
})

Response structure


resp.cases #=> Array
resp.cases[0].case_id #=> String
resp.cases[0].fields #=> Array
resp.cases[0].fields[0].id #=> String
resp.cases[0].fields[0].value.boolean_value #=> Boolean
resp.cases[0].fields[0].value.double_value #=> Float
resp.cases[0].fields[0].value.string_value #=> String
resp.cases[0].tags #=> Hash
resp.cases[0].tags["String"] #=> String
resp.cases[0].template_id #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :fields (Array<Types::FieldIdentifier>)

    The list of field identifiers to be returned as part of the response.

  • :filter (Types::CaseFilter)

    A list of filter objects.

  • :max_results (Integer)

    The maximum number of cases to return. The current maximum supported value is 25. This is also the default value when no other value is provided.

  • :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.

  • :search_term (String)

    A word or phrase used to perform a quick search.

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

    A list of sorts where each sort specifies a field and their sort order to be applied to the results.

Returns:

See Also:



1542
1543
1544
1545
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1542

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

Searches for related items that are associated with a case.

If no filters are provided, this returns all related items associated with a case.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.search_related_items({
  case_id: "CaseId", # required
  domain_id: "DomainId", # required
  filters: [
    {
      comment: {
      },
      contact: {
        channel: ["Channel"],
        contact_arn: "ContactArn",
      },
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.next_token #=> String
resp.related_items #=> Array
resp.related_items[0].association_time #=> Time
resp.related_items[0].content.comment.body #=> String
resp.related_items[0].content.comment.content_type #=> String, one of "Text/Plain"
resp.related_items[0].content.contact.channel #=> String
resp.related_items[0].content.contact.connected_to_system_time #=> Time
resp.related_items[0].content.contact.contact_arn #=> String
resp.related_items[0].related_item_id #=> String
resp.related_items[0].tags #=> Hash
resp.related_items[0].tags["String"] #=> String
resp.related_items[0].type #=> String, one of "Contact", "Comment"

Parameters:

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

    ({})

Options Hash (params):

  • :case_id (required, String)

    A unique identifier of the case.

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

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

    The list of types of related items and their parameters to use for filtering.

  • :max_results (Integer)

    The maximum number of results to return per page.

  • :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.

Returns:

See Also:



1617
1618
1619
1620
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1617

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

#tag_resource(params = {}) ⇒ Struct

Adds tags to a resource.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  arn: "Arn", # required
  tags: { # required
    "String" => "String",
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN)

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

    A map of of key-value pairs that represent tags on a resource. Tags are used to organize, track, or control access for this resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1646
1647
1648
1649
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1646

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

#untag_resource(params = {}) ⇒ Struct

Untags a resource.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    The Amazon Resource Name (ARN)

  • :tag_keys (required, Array<String>)

    List of tag keys.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1672
1673
1674
1675
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1672

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

#update_case(params = {}) ⇒ Struct

Updates the values of fields on a case. Fields to be updated are received as an array of id/value pairs identical to the CreateCase input .

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Examples:

Request syntax with placeholder values


resp = client.update_case({
  case_id: "CaseId", # required
  domain_id: "DomainId", # required
  fields: [ # required
    {
      id: "FieldId", # required
      value: { # required
        boolean_value: false,
        double_value: 1.0,
        string_value: "FieldValueUnionStringValueString",
      },
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :case_id (required, String)

    A unique identifier of the case.

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :fields (required, Array<Types::FieldValue>)

    An array of objects with fieldId (matching ListFields/DescribeField) and value union data, structured identical to CreateCase.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1717
1718
1719
1720
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1717

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

#update_field(params = {}) ⇒ Struct

Updates the properties of an existing field.

Examples:

Request syntax with placeholder values


resp = client.update_field({
  description: "FieldDescription",
  domain_id: "DomainId", # required
  field_id: "FieldId", # required
  name: "FieldName",
})

Parameters:

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

    ({})

Options Hash (params):

  • :description (String)

    The description of a field.

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :field_id (required, String)

    The unique identifier of a field.

  • :name (String)

    The name of the field.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1751
1752
1753
1754
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1751

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

#update_layout(params = {}) ⇒ Struct

Updates the attributes of an existing layout.

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

A ValidationException is returned when you add non-existent fieldIds to a layout.

Title and Status fields cannot be part of layouts because they are not configurable.

Examples:

Request syntax with placeholder values


resp = client.update_layout({
  content: {
    basic: {
      more_info: {
        sections: [
          {
            field_group: {
              fields: [ # required
                {
                  id: "FieldId", # required
                },
              ],
              name: "FieldGroupNameString",
            },
          },
        ],
      },
      top_panel: {
        sections: [
          {
            field_group: {
              fields: [ # required
                {
                  id: "FieldId", # required
                },
              ],
              name: "FieldGroupNameString",
            },
          },
        ],
      },
    },
  },
  domain_id: "DomainId", # required
  layout_id: "LayoutId", # required
  name: "LayoutName",
})

Parameters:

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

    ({})

Options Hash (params):

  • :content (Types::LayoutContent)

    Information about which fields will be present in the layout, the order of the fields, and a read-only attribute of the field.

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :layout_id (required, String)

    The unique identifier of the layout.

  • :name (String)

    The name of the layout. It must be unique per domain.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1828
1829
1830
1831
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1828

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

#update_template(params = {}) ⇒ Struct

Updates the attributes of an existing template. The template attributes that can be modified include name, description, layoutConfiguration, requiredFields, and status. At least one of these attributes must not be null. If a null value is provided for a given attribute, that attribute is ignored and its current value is preserved.

Examples:

Request syntax with placeholder values


resp = client.update_template({
  description: "TemplateDescription",
  domain_id: "DomainId", # required
  layout_configuration: {
    default_layout: "LayoutId",
  },
  name: "TemplateName",
  required_fields: [
    {
      field_id: "FieldId", # required
    },
  ],
  status: "Active", # accepts Active, Inactive
  template_id: "TemplateId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :description (String)

    A brief description of the template.

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :layout_configuration (Types::LayoutConfiguration)

    Configuration of layouts associated to the template.

  • :name (String)

    The name of the template. It must be unique per domain.

  • :required_fields (Array<Types::RequiredField>)

    A list of fields that must contain a value for a case to be successfully created with this template.

  • :status (String)

    The status of the template.

  • :template_id (required, String)

    A unique identifier for the template.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1886
1887
1888
1889
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1886

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