updateDomain method
Updates the properties of a domain, including creating or selecting a dead letter queue or an encryption key.
After a domain is created, the name can’t be changed.
Use this API or CreateDomain
to enable identity
resolution: set Matching to true.
To prevent cross-service impersonation when you call this API, see Cross-service confused deputy prevention for sample policies that you should apply.
To add or remove tags on an existing Domain, see TagResource/UntagResource.
May throw AccessDeniedException.
May throw BadRequestException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter domainName :
The unique name of the domain.
Parameter dataStore :
Set to true to enabled data store for this domain.
Parameter deadLetterQueueUrl :
The URL of the SQS dead letter queue, which is used for reporting errors
associated with ingesting data from third party applications. If specified
as an empty string, it will clear any existing value. You must set up a
policy on the DeadLetterQueue for the SendMessage operation to enable
Amazon Connect Customer Profiles to send messages to the DeadLetterQueue.
Parameter defaultEncryptionKey :
The default encryption key, which is an AWS managed key, is used when no
specific type of encryption key is specified. It is used to encrypt all
data before it is placed in permanent or semi-permanent storage. If
specified as an empty string, it will clear any existing value.
Parameter defaultExpirationDays :
The default number of days until the data within the domain expires.
Parameter matching :
The process of matching duplicate profiles. If Matching =
true, Amazon Connect Customer Profiles starts a weekly batch
process called Identity Resolution Job. If you do not specify a date and
time for Identity Resolution Job to run, by default it runs every Saturday
at 12AM UTC to detect duplicate profiles in your domains.
After the Identity Resolution Job completes, use the GetMatches
API to return and review the results. Or, if you have configured
ExportingConfig in the MatchingRequest, you can
download the results from S3.
Parameter ruleBasedMatching :
The process of matching duplicate profiles using the rule-Based matching.
If RuleBasedMatching = true, Connect Customer Customer
Profiles will start to match and merge your profiles according to your
configuration in the RuleBasedMatchingRequest. You can use
the ListRuleBasedMatches and GetSimilarProfiles
API to return and review the results. Also, if you have configured
ExportingConfig in the RuleBasedMatchingRequest,
you can download the results from S3.
Parameter tags :
The tags used to organize, track, or control access for this resource.
Implementation
Future<UpdateDomainResponse> updateDomain({
required String domainName,
DataStoreRequest? dataStore,
String? deadLetterQueueUrl,
String? defaultEncryptionKey,
int? defaultExpirationDays,
MatchingRequest? matching,
RuleBasedMatchingRequest? ruleBasedMatching,
Map<String, String>? tags,
}) async {
_s.validateNumRange(
'defaultExpirationDays',
defaultExpirationDays,
1,
1098,
);
final $payload = <String, dynamic>{
if (dataStore != null) 'DataStore': dataStore,
if (deadLetterQueueUrl != null) 'DeadLetterQueueUrl': deadLetterQueueUrl,
if (defaultEncryptionKey != null)
'DefaultEncryptionKey': defaultEncryptionKey,
if (defaultExpirationDays != null)
'DefaultExpirationDays': defaultExpirationDays,
if (matching != null) 'Matching': matching,
if (ruleBasedMatching != null) 'RuleBasedMatching': ruleBasedMatching,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/domains/${Uri.encodeComponent(domainName)}',
exceptionFnMap: _exceptionFns,
);
return UpdateDomainResponse.fromJson(response);
}