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):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []]

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :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, :session_token, and :account_id options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
    • ~/.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::InstanceProfileCredentials 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)
  • :account_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.

  • :disable_request_compression (Boolean) — default: false

    When set to 'true' the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP)

    Normally you should not configure the :endpoint option directly. This is normally constructed from the :region option. Configuring :endpoint is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :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.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

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

  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

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

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array)

    A list of regions that should be signed with SigV4a signing. When not passed, a default :sigv4a_signing_region_set is searched for in the following locations:

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :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.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses NoOpTelemetryProvider which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the opentelemetry-sdk gem and then, pass in an instance of a Aws::Telemetry::OTelProvider for telemetry provider.
  • :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_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.

  • :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_open_timeout (Float) — default: 15

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

  • :http_proxy (URI::HTTP, String)

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

  • :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_wire_trace (Boolean) — default: false

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

  • :on_chunk_received (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a content-length).

  • :on_chunk_sent (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised.

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

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate)

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

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



444
445
446
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 444

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].created_time #=> Time
resp.fields[0].deleted #=> Boolean
resp.fields[0].description #=> String
resp.fields[0].field_arn #=> String
resp.fields[0].field_id #=> String
resp.fields[0].last_modified_time #=> Time
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", "Url", "User"

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:



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

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:



544
545
546
547
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 544

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

If you provide a value for PerformedBy.UserArn you must also have connect:DescribeUser permission on the User ARN resource that you provide

 <p>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.</p> <p>The following fields are required when creating a case:</p> <ul> <li> <p> <code>customer_id</code> - You must provide the full customer profile ARN in this format: <code>arn:aws:profile:your_AWS_Region:your_AWS_account ID:domains/your_profiles_domain_name/profiles/profile_ID</code> </p> </li> <li> <p> <code>title</code> </p> </li> </ul>

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,
        empty_value: {
        },
        string_value: "FieldValueUnionStringValueString",
        user_arn_value: "String",
      },
    },
  ],
  performed_by: {
    user_arn: "UserArn",
  },
  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.

  • :performed_by (Types::UserUnion)

    Represents the identity of the person who performed the action.

  • :template_id (required, String)

    A unique identifier of a template.

Returns:

See Also:



625
626
627
628
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 625

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. You need specific IAM permissions to successfully associate the Cases domain. For more information, see Onboard to Cases.

  </important>

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:



674
675
676
677
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 674

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, Url, User
})

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:



719
720
721
722
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 719

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:



800
801
802
803
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 800

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.

  • If you provide a value for performedBy.userArn you must also have DescribeUser permission on the ARN of the user that you provide.

    </note>
    

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
    },
    file: {
      file_arn: "FileArn", # required
    },
  },
  domain_id: "DomainId", # required
  performed_by: {
    user_arn: "UserArn",
  },
  type: "Contact", # required, accepts Contact, Comment, File
})

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.

  • :performed_by (Types::UserUnion)

    Represents the creator of the related item.

  • :type (required, String)

    The type of a related item.

Returns:

See Also:



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

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:



942
943
944
945
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 942

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

#delete_domain(params = {}) ⇒ Struct

Deletes a Cases domain.

 <note> <p>After deleting your domain you must disassociate the deleted domain from your Amazon Connect instance with another API call before being able to use Cases again with this Amazon Connect instance. See <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_DeleteIntegrationAssociation.html">DeleteIntegrationAssociation</a>.</p> </note>

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



966
967
968
969
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 966

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

#delete_field(params = {}) ⇒ Struct

Deletes a field from a cases template. You can delete up to 100 fields per domain.

After a field is deleted:

  • You can still retrieve the field by calling BatchGetField.

  • You cannot update a deleted field by calling UpdateField; it throws a ValidationException.

  • Deleted fields are not included in the ListFields response.

  • Calling CreateCase with a deleted field throws a ValidationException denoting which field IDs in the request have been deleted.

  • Calling GetCase with a deleted field ID returns the deleted field's value if one exists.

  • Calling UpdateCase with a deleted field ID throws a ValidationException if the case does not already contain a value for the deleted field. Otherwise it succeeds, allowing you to update or remove (using emptyValue: {}) the field's value from the case.

  • GetTemplate does not return field IDs for deleted fields.

  • GetLayout does not return field IDs for deleted fields.

  • Calling SearchCases with the deleted field ID as a filter returns any cases that have a value for the deleted field that matches the filter criteria.

  • Calling SearchCases with a searchTerm value that matches a deleted field's value on a case returns the case in the response.

  • Calling BatchPutFieldOptions with a deleted field ID throw a ValidationException.

  • Calling GetCaseEventConfiguration does not return field IDs for deleted fields.

Examples:

Request syntax with placeholder values


resp = client.delete_field({
  domain_id: "DomainId", # required
  field_id: "FieldId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :domain_id (required, String)

    The unique identifier of the Cases domain.

  • :field_id (required, String)

    Unique identifier of the field.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1031
1032
1033
1034
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1031

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

#delete_layout(params = {}) ⇒ Struct

Deletes a layout from a cases template. You can delete up to 100 layouts per domain.

 <p>After a layout is deleted:</p> <ul> <li> <p>You can still retrieve the layout by calling <code>GetLayout</code>.</p> </li> <li> <p>You cannot update a deleted layout by calling <code>UpdateLayout</code>; it throws a <code>ValidationException</code>.</p> </li> <li> <p>Deleted layouts are not included in the <code>ListLayouts</code> response.</p> </li> </ul>

Examples:

Request syntax with placeholder values


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

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:

  • (Struct)

    Returns an empty response.

See Also:



1060
1061
1062
1063
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1060

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

#delete_template(params = {}) ⇒ Struct

Deletes a cases template. You can delete up to 100 templates per domain.

 <p>After a cases template is deleted:</p> <ul> <li> <p>You can still retrieve the template by calling <code>GetTemplate</code>.</p> </li> <li> <p>You cannot update the template. </p> </li> <li> <p>You cannot create a case by using the deleted template.</p> </li> <li> <p>Deleted templates are not included in the <code>ListTemplates</code> response.</p> </li> </ul>

Examples:

Request syntax with placeholder values


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

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:

  • (Struct)

    Returns an empty response.

See Also:



1089
1090
1091
1092
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1089

def delete_template(params = {}, options = {})
  req = build_request(:delete_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.fields[0].value.user_arn_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:



1149
1150
1151
1152
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1149

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

#get_case_audit_events(params = {}) ⇒ Types::GetCaseAuditEventsResponse

Returns the audit history 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_audit_events({
  case_id: "CaseId", # required
  domain_id: "DomainId", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.audit_events #=> Array
resp.audit_events[0].event_id #=> String
resp.audit_events[0].fields #=> Array
resp.audit_events[0].fields[0].event_field_id #=> String
resp.audit_events[0].fields[0].new_value.boolean_value #=> Boolean
resp.audit_events[0].fields[0].new_value.double_value #=> Float
resp.audit_events[0].fields[0].new_value.string_value #=> String
resp.audit_events[0].fields[0].new_value.user_arn_value #=> String
resp.audit_events[0].fields[0].old_value.boolean_value #=> Boolean
resp.audit_events[0].fields[0].old_value.double_value #=> Float
resp.audit_events[0].fields[0].old_value.string_value #=> String
resp.audit_events[0].fields[0].old_value.user_arn_value #=> String
resp.audit_events[0].performed_by.iam_principal_arn #=> String
resp.audit_events[0].performed_by.user.user_arn #=> String
resp.audit_events[0].performed_time #=> Time
resp.audit_events[0].related_item_type #=> String, one of "Contact", "Comment", "File"
resp.audit_events[0].type #=> String, one of "Case.Created", "Case.Updated", "RelatedItem.Created"
resp.next_token #=> 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.

  • :max_results (Integer)

    The maximum number of audit events to return. The current maximum supported value is 25. This is also the default 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.

Returns:

See Also:



1213
1214
1215
1216
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1213

def get_case_audit_events(params = {}, options = {})
  req = build_request(:get_case_audit_events, 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:



1244
1245
1246
1247
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1244

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:



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

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.created_time #=> Time
resp.deleted #=> Boolean
resp.last_modified_time #=> Time
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:



1337
1338
1339
1340
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1337

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.created_time #=> Time
resp.deleted #=> Boolean
resp.description #=> String
resp.last_modified_time #=> Time
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:



1391
1392
1393
1394
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1391

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:



1439
1440
1441
1442
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1439

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:



1481
1482
1483
1484
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1481

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:



1534
1535
1536
1537
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1534

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", "Url", "User"
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:



1581
1582
1583
1584
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1581

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:



1627
1628
1629
1630
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1627

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:



1656
1657
1658
1659
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1656

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:



1707
1708
1709
1710
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1707

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

#put_case_event_configuration(params = {}) ⇒ Struct

Adds case event publishing configuration. For a complete list of fields you can add to the event message, see Create case fields in the Amazon Connect Administrator Guide

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:



1754
1755
1756
1757
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1754

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.

For customer_id you must provide the full customer profile ARN in this format: arn:aws:profile:your AWS Region:your AWS account ID:domains/profiles domain name/profiles/profile ID.

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,
          empty_value: {
          },
          string_value: "FieldValueUnionStringValueString",
          user_arn_value: "String",
        },
      },
      equal_to: {
        id: "FieldId", # required
        value: { # required
          boolean_value: false,
          double_value: 1.0,
          empty_value: {
          },
          string_value: "FieldValueUnionStringValueString",
          user_arn_value: "String",
        },
      },
      greater_than: {
        id: "FieldId", # required
        value: { # required
          boolean_value: false,
          double_value: 1.0,
          empty_value: {
          },
          string_value: "FieldValueUnionStringValueString",
          user_arn_value: "String",
        },
      },
      greater_than_or_equal_to: {
        id: "FieldId", # required
        value: { # required
          boolean_value: false,
          double_value: 1.0,
          empty_value: {
          },
          string_value: "FieldValueUnionStringValueString",
          user_arn_value: "String",
        },
      },
      less_than: {
        id: "FieldId", # required
        value: { # required
          boolean_value: false,
          double_value: 1.0,
          empty_value: {
          },
          string_value: "FieldValueUnionStringValueString",
          user_arn_value: "String",
        },
      },
      less_than_or_equal_to: {
        id: "FieldId", # required
        value: { # required
          boolean_value: false,
          double_value: 1.0,
          empty_value: {
          },
          string_value: "FieldValueUnionStringValueString",
          user_arn_value: "String",
        },
      },
    },
    not: {
      # recursive CaseFilter
    },
    or_all: [
      {
        # 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].fields[0].value.user_arn_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:



1923
1924
1925
1926
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 1923

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",
      },
      file: {
        file_arn: "FileArn",
      },
    },
  ],
  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].content.file.file_arn #=> String
resp.related_items[0].performed_by.user_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", "File"

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:



2003
2004
2005
2006
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 2003

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:



2032
2033
2034
2035
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 2032

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:



2058
2059
2060
2061
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 2058

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

#update_case(params = {}) ⇒ Struct

If you provide a value for PerformedBy.UserArn you must also have connect:DescribeUser permission on the User ARN resource that you provide

 <p>Updates the values of fields on a case. Fields to be updated are received as an array of id/value pairs identical to the <code>CreateCase</code> input .</p> <p>If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.</p>

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,
        empty_value: {
        },
        string_value: "FieldValueUnionStringValueString",
        user_arn_value: "String",
      },
    },
  ],
  performed_by: {
    user_arn: "UserArn",
  },
})

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.

  • :performed_by (Types::UserUnion)

    Represents the identity of the person who performed the action.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2117
2118
2119
2120
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 2117

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:



2151
2152
2153
2154
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 2151

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.

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



2228
2229
2230
2231
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 2228

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:



2286
2287
2288
2289
# File 'gems/aws-sdk-connectcases/lib/aws-sdk-connectcases/client.rb', line 2286

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