pub struct Client { /* private fields */ }
Expand description
Client for Amazon Connect Cases
Client for invoking operations on Amazon Connect Cases. Each operation on Amazon Connect Cases is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_connectcases::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Builder
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_connectcases::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the ListTagsForResource
operation has
a Client::list_tags_for_resource
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.list_tags_for_resource()
.arn("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn batch_get_field(&self) -> BatchGetFieldFluentBuilder
pub fn batch_get_field(&self) -> BatchGetFieldFluentBuilder
Constructs a fluent builder for the BatchGetField
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
fields(FieldIdentifier)
/set_fields(Option<Vec::<FieldIdentifier>>)
:
required: trueA list of unique field identifiers.
- On success, responds with
BatchGetFieldOutput
with field(s):fields(Vec::<GetFieldResponse>)
:A list of detailed field information.
errors(Vec::<FieldError>)
:A list of field errors.
- On failure, responds with
SdkError<BatchGetFieldError>
Source§impl Client
impl Client
Sourcepub fn batch_put_field_options(&self) -> BatchPutFieldOptionsFluentBuilder
pub fn batch_put_field_options(&self) -> BatchPutFieldOptionsFluentBuilder
Constructs a fluent builder for the BatchPutFieldOptions
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
field_id(impl Into<String>)
/set_field_id(Option<String>)
:
required: trueThe unique identifier of a field.
options(FieldOption)
/set_options(Option<Vec::<FieldOption>>)
:
required: trueA list of
FieldOption
objects.
- On success, responds with
BatchPutFieldOptionsOutput
with field(s):errors(Option<Vec::<FieldOptionError>>)
:A list of field errors.
- On failure, responds with
SdkError<BatchPutFieldOptionsError>
Source§impl Client
impl Client
Sourcepub fn create_case(&self) -> CreateCaseFluentBuilder
pub fn create_case(&self) -> CreateCaseFluentBuilder
Constructs a fluent builder for the CreateCase
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
template_id(impl Into<String>)
/set_template_id(Option<String>)
:
required: trueA unique identifier of a template.
fields(FieldValue)
/set_fields(Option<Vec::<FieldValue>>)
:
required: trueAn array of objects with field ID (matching ListFields/DescribeField) and value union data.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA 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.
performed_by(UserUnion)
/set_performed_by(Option<UserUnion>)
:
required: falseRepresents the identity of the person who performed the action.
- On success, responds with
CreateCaseOutput
with field(s):case_id(String)
:A unique identifier of the case.
case_arn(String)
:The Amazon Resource Name (ARN) of the case.
- On failure, responds with
SdkError<CreateCaseError>
Source§impl Client
impl Client
Sourcepub fn create_domain(&self) -> CreateDomainFluentBuilder
pub fn create_domain(&self) -> CreateDomainFluentBuilder
Constructs a fluent builder for the CreateDomain
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name for your Cases domain. It must be unique for your Amazon Web Services account.
- On success, responds with
CreateDomainOutput
with field(s):domain_id(String)
:The unique identifier of the Cases domain.
domain_arn(String)
:The Amazon Resource Name (ARN) for the Cases domain.
domain_status(DomainStatus)
:The status of the domain.
- On failure, responds with
SdkError<CreateDomainError>
Source§impl Client
impl Client
Sourcepub fn create_field(&self) -> CreateFieldFluentBuilder
pub fn create_field(&self) -> CreateFieldFluentBuilder
Constructs a fluent builder for the CreateField
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the field.
r#type(FieldType)
/set_type(Option<FieldType>)
:
required: trueDefines the data type, some system constraints, and default display of the field.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseThe description of the field.
- On success, responds with
CreateFieldOutput
with field(s):field_id(String)
:The unique identifier of a field.
field_arn(String)
:The Amazon Resource Name (ARN) of the field.
- On failure, responds with
SdkError<CreateFieldError>
Source§impl Client
impl Client
Sourcepub fn create_layout(&self) -> CreateLayoutFluentBuilder
pub fn create_layout(&self) -> CreateLayoutFluentBuilder
Constructs a fluent builder for the CreateLayout
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the layout. It must be unique for the Cases domain.
content(LayoutContent)
/set_content(Option<LayoutContent>)
:
required: trueInformation about which fields will be present in the layout, and information about the order of the fields.
- On success, responds with
CreateLayoutOutput
with field(s):layout_id(String)
:The unique identifier of the layout.
layout_arn(String)
:The Amazon Resource Name (ARN) of the newly created layout.
- On failure, responds with
SdkError<CreateLayoutError>
Source§impl Client
impl Client
Constructs a fluent builder for the CreateRelatedItem
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
case_id(impl Into<String>)
/set_case_id(Option<String>)
:
required: trueA unique identifier of the case.
r#type(RelatedItemType)
/set_type(Option<RelatedItemType>)
:
required: trueThe type of a related item.
content(RelatedItemInputContent)
/set_content(Option<RelatedItemInputContent>)
:
required: trueThe content of a related item to be created.
performed_by(UserUnion)
/set_performed_by(Option<UserUnion>)
:
required: falseRepresents the creator of the related item.
- On success, responds with
CreateRelatedItemOutput
with field(s):related_item_id(String)
:The unique identifier of the related item.
related_item_arn(String)
:The Amazon Resource Name (ARN) of the related item.
- On failure, responds with
SdkError<CreateRelatedItemError>
Source§impl Client
impl Client
Sourcepub fn create_template(&self) -> CreateTemplateFluentBuilder
pub fn create_template(&self) -> CreateTemplateFluentBuilder
Constructs a fluent builder for the CreateTemplate
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueA name for the template. It must be unique per domain.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA brief description of the template.
layout_configuration(LayoutConfiguration)
/set_layout_configuration(Option<LayoutConfiguration>)
:
required: falseConfiguration of layouts associated to the template.
required_fields(RequiredField)
/set_required_fields(Option<Vec::<RequiredField>>)
:
required: falseA list of fields that must contain a value for a case to be successfully created with this template.
status(TemplateStatus)
/set_status(Option<TemplateStatus>)
:
required: falseThe status of the template.
- On success, responds with
CreateTemplateOutput
with field(s):template_id(String)
:A unique identifier of a template.
template_arn(String)
:The Amazon Resource Name (ARN) of the newly created template.
- On failure, responds with
SdkError<CreateTemplateError>
Source§impl Client
impl Client
Sourcepub fn delete_domain(&self) -> DeleteDomainFluentBuilder
pub fn delete_domain(&self) -> DeleteDomainFluentBuilder
Constructs a fluent builder for the DeleteDomain
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
- On success, responds with
DeleteDomainOutput
- On failure, responds with
SdkError<DeleteDomainError>
Source§impl Client
impl Client
Sourcepub fn delete_field(&self) -> DeleteFieldFluentBuilder
pub fn delete_field(&self) -> DeleteFieldFluentBuilder
Constructs a fluent builder for the DeleteField
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
field_id(impl Into<String>)
/set_field_id(Option<String>)
:
required: trueUnique identifier of the field.
- On success, responds with
DeleteFieldOutput
- On failure, responds with
SdkError<DeleteFieldError>
Source§impl Client
impl Client
Sourcepub fn delete_layout(&self) -> DeleteLayoutFluentBuilder
pub fn delete_layout(&self) -> DeleteLayoutFluentBuilder
Constructs a fluent builder for the DeleteLayout
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
layout_id(impl Into<String>)
/set_layout_id(Option<String>)
:
required: trueThe unique identifier of the layout.
- On success, responds with
DeleteLayoutOutput
- On failure, responds with
SdkError<DeleteLayoutError>
Source§impl Client
impl Client
Sourcepub fn delete_template(&self) -> DeleteTemplateFluentBuilder
pub fn delete_template(&self) -> DeleteTemplateFluentBuilder
Constructs a fluent builder for the DeleteTemplate
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
template_id(impl Into<String>)
/set_template_id(Option<String>)
:
required: trueA unique identifier of a template.
- On success, responds with
DeleteTemplateOutput
- On failure, responds with
SdkError<DeleteTemplateError>
Source§impl Client
impl Client
Sourcepub fn get_case(&self) -> GetCaseFluentBuilder
pub fn get_case(&self) -> GetCaseFluentBuilder
Constructs a fluent builder for the GetCase
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
case_id(impl Into<String>)
/set_case_id(Option<String>)
:
required: trueA unique identifier of the case.
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
fields(FieldIdentifier)
/set_fields(Option<Vec::<FieldIdentifier>>)
:
required: trueA list of unique field identifiers.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe 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.
- On success, responds with
GetCaseOutput
with field(s):fields(Vec::<FieldValue>)
:A list of detailed field information.
template_id(String)
:A unique identifier of a template.
next_token(Option<String>)
:The token for the next set of results. This is null if there are no more results to return.
tags(Option<HashMap::<String, Option<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.
- On failure, responds with
SdkError<GetCaseError>
Source§impl Client
impl Client
Sourcepub fn get_case_audit_events(&self) -> GetCaseAuditEventsFluentBuilder
pub fn get_case_audit_events(&self) -> GetCaseAuditEventsFluentBuilder
Constructs a fluent builder for the GetCaseAuditEvents
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
case_id(impl Into<String>)
/set_case_id(Option<String>)
:
required: trueA unique identifier of the case.
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe 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(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe 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.
- On success, responds with
GetCaseAuditEventsOutput
with field(s):next_token(Option<String>)
:The token for the next set of results. This is null if there are no more results to return.
audit_events(Vec::<Option<AuditEvent>>)
:A list of case audits where each represents a particular edit of the case.
- On failure, responds with
SdkError<GetCaseAuditEventsError>
Source§impl Client
impl Client
Sourcepub fn get_case_event_configuration(
&self,
) -> GetCaseEventConfigurationFluentBuilder
pub fn get_case_event_configuration( &self, ) -> GetCaseEventConfigurationFluentBuilder
Constructs a fluent builder for the GetCaseEventConfiguration
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
- On success, responds with
GetCaseEventConfigurationOutput
with field(s):event_bridge(Option<EventBridgeConfiguration>)
:Configuration to enable EventBridge case event delivery and determine what data is delivered.
- On failure, responds with
SdkError<GetCaseEventConfigurationError>
Source§impl Client
impl Client
Sourcepub fn get_domain(&self) -> GetDomainFluentBuilder
pub fn get_domain(&self) -> GetDomainFluentBuilder
Constructs a fluent builder for the GetDomain
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
- On success, responds with
GetDomainOutput
with field(s):domain_id(String)
:The unique identifier of the Cases domain.
domain_arn(String)
:The Amazon Resource Name (ARN) for the Cases domain.
name(String)
:The name of the Cases domain.
created_time(DateTime)
:The timestamp when the Cases domain was created.
domain_status(DomainStatus)
:The status of the Cases domain.
tags(Option<HashMap::<String, Option<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.
- On failure, responds with
SdkError<GetDomainError>
Source§impl Client
impl Client
Sourcepub fn get_layout(&self) -> GetLayoutFluentBuilder
pub fn get_layout(&self) -> GetLayoutFluentBuilder
Constructs a fluent builder for the GetLayout
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
layout_id(impl Into<String>)
/set_layout_id(Option<String>)
:
required: trueThe unique identifier of the layout.
- On success, responds with
GetLayoutOutput
with field(s):layout_id(String)
:The unique identifier of the layout.
layout_arn(String)
:The Amazon Resource Name (ARN) of the newly created layout.
name(String)
:The name of the layout. It must be unique.
content(Option<LayoutContent>)
:Information about which fields will be present in the layout, the order of the fields, and read-only attribute of the field.
tags(Option<HashMap::<String, Option<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.
deleted(bool)
:Denotes whether or not the resource has been deleted.
created_time(Option<DateTime>)
:Timestamp at which the resource was created.
last_modified_time(Option<DateTime>)
:Timestamp at which the resource was created or last modified.
- On failure, responds with
SdkError<GetLayoutError>
Source§impl Client
impl Client
Sourcepub fn get_template(&self) -> GetTemplateFluentBuilder
pub fn get_template(&self) -> GetTemplateFluentBuilder
Constructs a fluent builder for the GetTemplate
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
template_id(impl Into<String>)
/set_template_id(Option<String>)
:
required: trueA unique identifier of a template.
- On success, responds with
GetTemplateOutput
with field(s):template_id(String)
:A unique identifier of a template.
template_arn(String)
:The Amazon Resource Name (ARN) of the template.
name(String)
:The name of the template.
description(Option<String>)
:A brief description of the template.
layout_configuration(Option<LayoutConfiguration>)
:Configuration of layouts associated to the template.
required_fields(Option<Vec::<RequiredField>>)
:A list of fields that must contain a value for a case to be successfully created with this template.
tags(Option<HashMap::<String, Option<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.
status(TemplateStatus)
:The status of the template.
deleted(bool)
:Denotes whether or not the resource has been deleted.
created_time(Option<DateTime>)
:Timestamp at which the resource was created.
last_modified_time(Option<DateTime>)
:Timestamp at which the resource was created or last modified.
- On failure, responds with
SdkError<GetTemplateError>
Source§impl Client
impl Client
Sourcepub fn list_cases_for_contact(&self) -> ListCasesForContactFluentBuilder
pub fn list_cases_for_contact(&self) -> ListCasesForContactFluentBuilder
Constructs a fluent builder for the ListCasesForContact
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
contact_arn(impl Into<String>)
/set_contact_arn(Option<String>)
:
required: trueA unique identifier of a contact in Amazon Connect.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return per page.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe 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.
- On success, responds with
ListCasesForContactOutput
with field(s):cases(Vec::<CaseSummary>)
:A list of Case summary information.
next_token(Option<String>)
:The token for the next set of results. This is null if there are no more results to return.
- On failure, responds with
SdkError<ListCasesForContactError>
Source§impl Client
impl Client
Sourcepub fn list_domains(&self) -> ListDomainsFluentBuilder
pub fn list_domains(&self) -> ListDomainsFluentBuilder
Constructs a fluent builder for the ListDomains
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return per page.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe 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.
- On success, responds with
ListDomainsOutput
with field(s):domains(Vec::<DomainSummary>)
:The Cases domain.
next_token(Option<String>)
:The token for the next set of results. This is null if there are no more results to return.
- On failure, responds with
SdkError<ListDomainsError>
Source§impl Client
impl Client
Sourcepub fn list_field_options(&self) -> ListFieldOptionsFluentBuilder
pub fn list_field_options(&self) -> ListFieldOptionsFluentBuilder
Constructs a fluent builder for the ListFieldOptions
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
field_id(impl Into<String>)
/set_field_id(Option<String>)
:
required: trueThe unique identifier of a field.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return per page.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe 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(impl Into<String>)
/set_values(Option<Vec::<String>>)
:
required: falseA list of
FieldOption
values to filter on forListFieldOptions
.
- On success, responds with
ListFieldOptionsOutput
with field(s):options(Vec::<FieldOption>)
:A list of
FieldOption
objects.next_token(Option<String>)
:The token for the next set of results. This is null if there are no more results to return.
- On failure, responds with
SdkError<ListFieldOptionsError>
Source§impl Client
impl Client
Sourcepub fn list_fields(&self) -> ListFieldsFluentBuilder
pub fn list_fields(&self) -> ListFieldsFluentBuilder
Constructs a fluent builder for the ListFields
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return per page.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe 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.
- On success, responds with
ListFieldsOutput
with field(s):fields(Vec::<FieldSummary>)
:List of detailed field information.
next_token(Option<String>)
:The token for the next set of results. This is null if there are no more results to return.
- On failure, responds with
SdkError<ListFieldsError>
Source§impl Client
impl Client
Sourcepub fn list_layouts(&self) -> ListLayoutsFluentBuilder
pub fn list_layouts(&self) -> ListLayoutsFluentBuilder
Constructs a fluent builder for the ListLayouts
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return per page.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe 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.
- On success, responds with
ListLayoutsOutput
with field(s):layouts(Vec::<LayoutSummary>)
:The layouts for the domain.
next_token(Option<String>)
:The token for the next set of results. This is null if there are no more results to return.
- On failure, responds with
SdkError<ListLayoutsError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN)
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap::<String, Option<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.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn list_templates(&self) -> ListTemplatesFluentBuilder
pub fn list_templates(&self) -> ListTemplatesFluentBuilder
Constructs a fluent builder for the ListTemplates
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return per page.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe 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(TemplateStatus)
/set_status(Option<Vec::<TemplateStatus>>)
:
required: falseA list of status values to filter on.
- On success, responds with
ListTemplatesOutput
with field(s):templates(Vec::<TemplateSummary>)
:List of template summary objects.
next_token(Option<String>)
:The token for the next set of results. This is null if there are no more results to return.
- On failure, responds with
SdkError<ListTemplatesError>
Source§impl Client
impl Client
Sourcepub fn put_case_event_configuration(
&self,
) -> PutCaseEventConfigurationFluentBuilder
pub fn put_case_event_configuration( &self, ) -> PutCaseEventConfigurationFluentBuilder
Constructs a fluent builder for the PutCaseEventConfiguration
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
event_bridge(EventBridgeConfiguration)
/set_event_bridge(Option<EventBridgeConfiguration>)
:
required: trueConfiguration to enable EventBridge case event delivery and determine what data is delivered.
- On success, responds with
PutCaseEventConfigurationOutput
- On failure, responds with
SdkError<PutCaseEventConfigurationError>
Source§impl Client
impl Client
Sourcepub fn search_cases(&self) -> SearchCasesFluentBuilder
pub fn search_cases(&self) -> SearchCasesFluentBuilder
Constructs a fluent builder for the SearchCases
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe 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(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe 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(impl Into<String>)
/set_search_term(Option<String>)
:
required: falseA word or phrase used to perform a quick search.
filter(CaseFilter)
/set_filter(Option<CaseFilter>)
:
required: falseA list of filter objects.
sorts(Sort)
/set_sorts(Option<Vec::<Sort>>)
:
required: falseA list of sorts where each sort specifies a field and their sort order to be applied to the results.
fields(FieldIdentifier)
/set_fields(Option<Vec::<FieldIdentifier>>)
:
required: falseThe list of field identifiers to be returned as part of the response.
- On success, responds with
SearchCasesOutput
with field(s):next_token(Option<String>)
:The token for the next set of results. This is null if there are no more results to return.
cases(Vec::<Option<SearchCasesResponseItem>>)
:A list of case documents where each case contains the properties
CaseId
andFields
where each field is a complex union structure.
- On failure, responds with
SdkError<SearchCasesError>
Source§impl Client
impl Client
Constructs a fluent builder for the SearchRelatedItems
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
case_id(impl Into<String>)
/set_case_id(Option<String>)
:
required: trueA unique identifier of the case.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to return per page.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseThe 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.
filters(RelatedItemTypeFilter)
/set_filters(Option<Vec::<RelatedItemTypeFilter>>)
:
required: falseThe list of types of related items and their parameters to use for filtering.
- On success, responds with
SearchRelatedItemsOutput
with field(s):next_token(Option<String>)
:The token for the next set of results. This is null if there are no more results to return.
related_items(Vec::<Option<SearchRelatedItemsResponseItem>>)
:A list of items related to a case.
- On failure, responds with
SdkError<SearchRelatedItemsError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN)
tags(impl Into<String>, Option<String>)
/set_tags(Option<HashMap::<String, Option<String>>>)
:
required: trueA map of of key-value pairs that represent tags on a resource. Tags are used to organize, track, or control access for this resource.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
arn(impl Into<String>)
/set_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN)
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueList of tag keys.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_case(&self) -> UpdateCaseFluentBuilder
pub fn update_case(&self) -> UpdateCaseFluentBuilder
Constructs a fluent builder for the UpdateCase
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
case_id(impl Into<String>)
/set_case_id(Option<String>)
:
required: trueA unique identifier of the case.
fields(FieldValue)
/set_fields(Option<Vec::<FieldValue>>)
:
required: trueAn array of objects with
fieldId
(matching ListFields/DescribeField) and value union data, structured identical toCreateCase
.performed_by(UserUnion)
/set_performed_by(Option<UserUnion>)
:
required: falseRepresents the identity of the person who performed the action.
- On success, responds with
UpdateCaseOutput
- On failure, responds with
SdkError<UpdateCaseError>
Source§impl Client
impl Client
Sourcepub fn update_field(&self) -> UpdateFieldFluentBuilder
pub fn update_field(&self) -> UpdateFieldFluentBuilder
Constructs a fluent builder for the UpdateField
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
field_id(impl Into<String>)
/set_field_id(Option<String>)
:
required: trueThe unique identifier of a field.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseThe name of the field.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseThe description of a field.
- On success, responds with
UpdateFieldOutput
- On failure, responds with
SdkError<UpdateFieldError>
Source§impl Client
impl Client
Sourcepub fn update_layout(&self) -> UpdateLayoutFluentBuilder
pub fn update_layout(&self) -> UpdateLayoutFluentBuilder
Constructs a fluent builder for the UpdateLayout
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
layout_id(impl Into<String>)
/set_layout_id(Option<String>)
:
required: trueThe unique identifier of the layout.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseThe name of the layout. It must be unique per domain.
content(LayoutContent)
/set_content(Option<LayoutContent>)
:
required: falseInformation about which fields will be present in the layout, the order of the fields.
- On success, responds with
UpdateLayoutOutput
- On failure, responds with
SdkError<UpdateLayoutError>
Source§impl Client
impl Client
Sourcepub fn update_template(&self) -> UpdateTemplateFluentBuilder
pub fn update_template(&self) -> UpdateTemplateFluentBuilder
Constructs a fluent builder for the UpdateTemplate
operation.
- The fluent builder is configurable:
domain_id(impl Into<String>)
/set_domain_id(Option<String>)
:
required: trueThe unique identifier of the Cases domain.
template_id(impl Into<String>)
/set_template_id(Option<String>)
:
required: trueA unique identifier for the template.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseThe name of the template. It must be unique per domain.
description(impl Into<String>)
/set_description(Option<String>)
:
required: falseA brief description of the template.
layout_configuration(LayoutConfiguration)
/set_layout_configuration(Option<LayoutConfiguration>)
:
required: falseConfiguration of layouts associated to the template.
required_fields(RequiredField)
/set_required_fields(Option<Vec::<RequiredField>>)
:
required: falseA list of fields that must contain a value for a case to be successfully created with this template.
status(TemplateStatus)
/set_status(Option<TemplateStatus>)
:
required: falseThe status of the template.
- On success, responds with
UpdateTemplateOutput
- On failure, responds with
SdkError<UpdateTemplateError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.bright_black());
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.bright_green());
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.bright_yellow());
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.bright_magenta());
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.bright_white());
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.on_bright_black());
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.on_bright_green());
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.on_bright_yellow());
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlue
.
§Example
println!("{}", value.on_bright_blue());
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.on_bright_magenta());
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightCyan
.
§Example
println!("{}", value.on_bright_cyan());
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.on_bright_white());
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::Underline
.
§Example
println!("{}", value.underline());
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::RapidBlink
.
§Example
println!("{}", value.rapid_blink());
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);