ConnectCases / Client / search_cases
search_cases¶
- ConnectCases.Client.search_cases(**kwargs)¶
Searches for cases within their associated Cases domain. Search results are returned as a paginated list of abridged case documents.
Note
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
.See also: AWS API Documentation
Request Syntax
response = client.search_cases( domainId='string', maxResults=123, nextToken='string', searchTerm='string', filter={ 'field': { 'equalTo': { 'id': 'string', 'value': { 'stringValue': 'string', 'doubleValue': 123.0, 'booleanValue': True|False, 'emptyValue': {} , 'userArnValue': 'string' } }, 'contains': { 'id': 'string', 'value': { 'stringValue': 'string', 'doubleValue': 123.0, 'booleanValue': True|False, 'emptyValue': {} , 'userArnValue': 'string' } }, 'greaterThan': { 'id': 'string', 'value': { 'stringValue': 'string', 'doubleValue': 123.0, 'booleanValue': True|False, 'emptyValue': {} , 'userArnValue': 'string' } }, 'greaterThanOrEqualTo': { 'id': 'string', 'value': { 'stringValue': 'string', 'doubleValue': 123.0, 'booleanValue': True|False, 'emptyValue': {} , 'userArnValue': 'string' } }, 'lessThan': { 'id': 'string', 'value': { 'stringValue': 'string', 'doubleValue': 123.0, 'booleanValue': True|False, 'emptyValue': {} , 'userArnValue': 'string' } }, 'lessThanOrEqualTo': { 'id': 'string', 'value': { 'stringValue': 'string', 'doubleValue': 123.0, 'booleanValue': True|False, 'emptyValue': {} , 'userArnValue': 'string' } } }, 'not': {'... recursive ...'}, 'andAll': [ {'... recursive ...'}, ], 'orAll': [ {'... recursive ...'}, ] }, sorts=[ { 'fieldId': 'string', 'sortOrder': 'Asc'|'Desc' }, ], fields=[ { 'id': 'string' }, ] )
- Parameters:
domainId (string) –
[REQUIRED]
The unique identifier of the Cases domain.
maxResults (integer) – The maximum number of cases to return. When no value is provided, 25 is the default.
nextToken (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.
searchTerm (string) – A word or phrase used to perform a quick search.
filter (dict) –
A list of filter objects.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
field
,not
,andAll
,orAll
.field (dict) –
A list of fields to filter on.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
equalTo
,contains
,greaterThan
,greaterThanOrEqualTo
,lessThan
,lessThanOrEqualTo
.equalTo (dict) –
Object containing field identifier and value information.
id (string) – [REQUIRED]
Unique identifier of a field.
value (dict) – [REQUIRED]
Union of potential field value types.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
stringValue
,doubleValue
,booleanValue
,emptyValue
,userArnValue
.stringValue (string) –
String value type.
doubleValue (float) –
Can be either null, or have a Double number value type. Only one value can be provided.
booleanValue (boolean) –
Can be either null, or have a Boolean value type. Only one value can be provided.
emptyValue (dict) –
An empty value.
userArnValue (string) –
Represents the user that performed the audit.
contains (dict) –
Object containing field identifier and value information.
id (string) – [REQUIRED]
Unique identifier of a field.
value (dict) – [REQUIRED]
Union of potential field value types.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
stringValue
,doubleValue
,booleanValue
,emptyValue
,userArnValue
.stringValue (string) –
String value type.
doubleValue (float) –
Can be either null, or have a Double number value type. Only one value can be provided.
booleanValue (boolean) –
Can be either null, or have a Boolean value type. Only one value can be provided.
emptyValue (dict) –
An empty value.
userArnValue (string) –
Represents the user that performed the audit.
greaterThan (dict) –
Object containing field identifier and value information.
id (string) – [REQUIRED]
Unique identifier of a field.
value (dict) – [REQUIRED]
Union of potential field value types.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
stringValue
,doubleValue
,booleanValue
,emptyValue
,userArnValue
.stringValue (string) –
String value type.
doubleValue (float) –
Can be either null, or have a Double number value type. Only one value can be provided.
booleanValue (boolean) –
Can be either null, or have a Boolean value type. Only one value can be provided.
emptyValue (dict) –
An empty value.
userArnValue (string) –
Represents the user that performed the audit.
greaterThanOrEqualTo (dict) –
Object containing field identifier and value information.
id (string) – [REQUIRED]
Unique identifier of a field.
value (dict) – [REQUIRED]
Union of potential field value types.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
stringValue
,doubleValue
,booleanValue
,emptyValue
,userArnValue
.stringValue (string) –
String value type.
doubleValue (float) –
Can be either null, or have a Double number value type. Only one value can be provided.
booleanValue (boolean) –
Can be either null, or have a Boolean value type. Only one value can be provided.
emptyValue (dict) –
An empty value.
userArnValue (string) –
Represents the user that performed the audit.
lessThan (dict) –
Object containing field identifier and value information.
id (string) – [REQUIRED]
Unique identifier of a field.
value (dict) – [REQUIRED]
Union of potential field value types.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
stringValue
,doubleValue
,booleanValue
,emptyValue
,userArnValue
.stringValue (string) –
String value type.
doubleValue (float) –
Can be either null, or have a Double number value type. Only one value can be provided.
booleanValue (boolean) –
Can be either null, or have a Boolean value type. Only one value can be provided.
emptyValue (dict) –
An empty value.
userArnValue (string) –
Represents the user that performed the audit.
lessThanOrEqualTo (dict) –
Object containing field identifier and value information.
id (string) – [REQUIRED]
Unique identifier of a field.
value (dict) – [REQUIRED]
Union of potential field value types.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
stringValue
,doubleValue
,booleanValue
,emptyValue
,userArnValue
.stringValue (string) –
String value type.
doubleValue (float) –
Can be either null, or have a Double number value type. Only one value can be provided.
booleanValue (boolean) –
Can be either null, or have a Boolean value type. Only one value can be provided.
emptyValue (dict) –
An empty value.
userArnValue (string) –
Represents the user that performed the audit.
not (dict) –
A filter for cases. Only one value can be provided.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
field
,not
,andAll
,orAll
.andAll (list) –
Provides “and all” filtering.
(dict) –
A filter for cases. Only one value can be provided.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
field
,not
,andAll
,orAll
.
orAll (list) –
Provides “or all” filtering.
(dict) –
A filter for cases. Only one value can be provided.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
field
,not
,andAll
,orAll
.
sorts (list) –
A list of sorts where each sort specifies a field and their sort order to be applied to the results.
(dict) –
A structured set of sort terms.
fieldId (string) – [REQUIRED]
Unique identifier of a field.
sortOrder (string) – [REQUIRED]
A structured set of sort terms
fields (list) –
The list of field identifiers to be returned as part of the response.
(dict) –
Object for unique identifier of a field.
id (string) – [REQUIRED]
Unique identifier of a field.
- Return type:
dict
- Returns:
Response Syntax
{ 'nextToken': 'string', 'cases': [ { 'caseId': 'string', 'templateId': 'string', 'fields': [ { 'id': 'string', 'value': { 'stringValue': 'string', 'doubleValue': 123.0, 'booleanValue': True|False, 'emptyValue': {}, 'userArnValue': 'string' } }, ], 'tags': { 'string': 'string' } }, ] }
Response Structure
(dict) –
nextToken (string) –
The token for the next set of results. This is null if there are no more results to return.
cases (list) –
A list of case documents where each case contains the properties
CaseId
andFields
where each field is a complex union structure.(dict) –
A list of items that represent cases.
caseId (string) –
A unique identifier of the case.
templateId (string) –
A unique identifier of a template.
fields (list) –
List of case field values.
(dict) –
Object for case field values.
id (string) –
Unique identifier of a field.
value (dict) –
Union of potential field value types.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
stringValue
,doubleValue
,booleanValue
,emptyValue
,userArnValue
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
stringValue (string) –
String value type.
doubleValue (float) –
Can be either null, or have a Double number value type. Only one value can be provided.
booleanValue (boolean) –
Can be either null, or have a Boolean value type. Only one value can be provided.
emptyValue (dict) –
An empty value.
userArnValue (string) –
Represents the user that performed the audit.
tags (dict) –
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.
(string) –
(string) –
Exceptions
ConnectCases.Client.exceptions.InternalServerException
ConnectCases.Client.exceptions.ResourceNotFoundException
ConnectCases.Client.exceptions.ValidationException
ConnectCases.Client.exceptions.ThrottlingException
ConnectCases.Client.exceptions.AccessDeniedException