createDomain method
Creates a domain, which is a container for all customer data, such as customer profile attributes, object types, profile keys, and encryption keys. You can create multiple domains, and each domain can have multiple third-party integrations.
Each Connect Customer instance can be associated with only one domain. Multiple Connect Customer instances can be associated with one domain.
Use this API or UpdateDomain
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.
Each Amazon Connect instance can be associated with only one domain. Multiple Amazon Connect instances can be associated with one domain.
May throw AccessDeniedException.
May throw BadRequestException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter defaultExpirationDays :
The default number of days until the data within the domain expires.
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. 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.
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<CreateDomainResponse> createDomain({
required int defaultExpirationDays,
required String domainName,
DataStoreRequest? dataStore,
String? deadLetterQueueUrl,
String? defaultEncryptionKey,
MatchingRequest? matching,
RuleBasedMatchingRequest? ruleBasedMatching,
Map<String, String>? tags,
}) async {
_s.validateNumRange(
'defaultExpirationDays',
defaultExpirationDays,
1,
1098,
isRequired: true,
);
final $payload = <String, dynamic>{
'DefaultExpirationDays': defaultExpirationDays,
if (dataStore != null) 'DataStore': dataStore,
if (deadLetterQueueUrl != null) 'DeadLetterQueueUrl': deadLetterQueueUrl,
if (defaultEncryptionKey != null)
'DefaultEncryptionKey': defaultEncryptionKey,
if (matching != null) 'Matching': matching,
if (ruleBasedMatching != null) 'RuleBasedMatching': ruleBasedMatching,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/domains/${Uri.encodeComponent(domainName)}',
exceptionFnMap: _exceptionFns,
);
return CreateDomainResponse.fromJson(response);
}