Skip to main content

domains

Creates, updates, deletes, gets or lists a domains resource.

Overview

Namedomains
TypeResource
Idaws.customer_profiles.domains

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The timestamp of when the domain was created.
data_storeobjectTrue if data store is enabled for this domain.
dead_letter_queue_urlstringThe URL of the SQS dead letter queue, which is used for reporting errors associated with ingesting data from third party applications.
default_encryption_keystringThe 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.
default_expiration_daysintegerThe default number of days until the data within the domain expires.
domain_namestringThe unique name of the domain. (pattern: <code>^[a-zA-Z0-9_-]+$</code>)
last_updated_atstring (date-time)The timestamp of when the domain was most recently edited.
matchingobjectThe 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.
rule_based_matchingobjectThe 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.
statsobjectUsage-specific statistics about the domain.
tagsobjectThe tags used to organize, track, or control access for this resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_domainselectdomain_name, regionReturns information about a specific domain.
list_domainsselectregionnext-token, max-resultsReturns a list of all the domains for an AWS account that have been created.
create_domaininsertdomain_name, region, DefaultExpirationDaysCreates 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. It is not possible to associate a Customer Profiles domain with an Amazon Connect Instance directly from the API. If you would like to create a domain and associate a Customer Profiles domain, use the Amazon Connect admin website. For more information, see Enable Customer Profiles. Each Amazon Connect instance can be associated with only one domain. Multiple Amazon Connect instances can be associated with one domain.
update_domainupdatedomain_name, regionUpdates 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.
delete_domaindeletedomain_name, regionDeletes a specific domain and all of its customer data, such as customer profile attributes and their related objects.
batch_put_profile_objectexecdomain_name, region, ObjectTypeNameAdds multiple profile objects to a domain of a given ObjectType in a single API call. When adding a specific profile object, like a Contact Record, an inferred profile can get created if it is not mapped to an existing profile. The resulting profile will only have a phone number populated in the standard ProfileObject. Any additional Contact Records with the same phone number will be mapped to the same inferred profile. When a ProfileObject is created and if a ProfileObjectType already exists for the ProfileObject, it will provide data to a standard profile depending on the ProfileObjectType definition. BatchPutProfileObject needs an ObjectType, which can be created using PutProfileObjectType.
detect_profile_object_typeexecdomain_name, region, ObjectsThe process of detecting profile object type mapping by using given objects.
start_upload_jobexecdomain_name, job_id, regionThis API starts the processing of an upload job to ingest profile data.
stop_upload_jobexecdomain_name, job_id, regionThis API stops the processing of an upload job.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
domain_namestringThe unique name of the domain containing the upload job to stop.
job_idstringThe unique identifier of the upload job to stop.
regionstringAWS region (default: us-east-1)
max-resultsintegerThe maximum number of objects returned per page.
next-tokenstringThe pagination token from the previous ListDomain API call.

SELECT examples

Returns information about a specific domain.

SELECT
created_at,
data_store,
dead_letter_queue_url,
default_encryption_key,
default_expiration_days,
domain_name,
last_updated_at,
matching,
rule_based_matching,
stats,
tags
FROM aws.customer_profiles.domains
WHERE domain_name = '{{ domain_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

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. It is not possible to associate a Customer Profiles domain with an Amazon Connect Instance directly from the API. If you would like to create a domain and associate a Customer Profiles domain, use the Amazon Connect admin website. For more information, see Enable Customer Profiles. Each Amazon Connect instance can be associated with only one domain. Multiple Amazon Connect instances can be associated with one domain.

INSERT INTO aws.customer_profiles.domains (
DefaultExpirationDays,
DefaultEncryptionKey,
DeadLetterQueueUrl,
Matching,
RuleBasedMatching,
DataStore,
Tags,
domain_name,
region
)
SELECT
{{ DefaultExpirationDays }} /* required */,
'{{ DefaultEncryptionKey }}',
'{{ DeadLetterQueueUrl }}',
'{{ Matching }}',
'{{ RuleBasedMatching }}',
'{{ DataStore }}',
'{{ Tags }}',
'{{ domain_name }}',
'{{ region }}'
RETURNING
created_at,
data_store,
dead_letter_queue_url,
default_encryption_key,
default_expiration_days,
domain_name,
last_updated_at,
matching,
rule_based_matching,
tags
;

UPDATE examples

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.

UPDATE aws.customer_profiles.domains
SET
DefaultExpirationDays = {{ DefaultExpirationDays }},
DefaultEncryptionKey = '{{ DefaultEncryptionKey }}',
DeadLetterQueueUrl = '{{ DeadLetterQueueUrl }}',
Matching = '{{ Matching }}',
RuleBasedMatching = '{{ RuleBasedMatching }}',
DataStore = '{{ DataStore }}',
Tags = '{{ Tags }}'
WHERE
domain_name = '{{ domain_name }}' --required
AND region = '{{ region }}' --required
RETURNING
created_at,
data_store,
dead_letter_queue_url,
default_encryption_key,
default_expiration_days,
domain_name,
last_updated_at,
matching,
rule_based_matching,
tags;

DELETE examples

Deletes a specific domain and all of its customer data, such as customer profile attributes and their related objects.

DELETE FROM aws.customer_profiles.domains
WHERE domain_name = '{{ domain_name }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Adds multiple profile objects to a domain of a given ObjectType in a single API call. When adding a specific profile object, like a Contact Record, an inferred profile can get created if it is not mapped to an existing profile. The resulting profile will only have a phone number populated in the standard ProfileObject. Any additional Contact Records with the same phone number will be mapped to the same inferred profile. When a ProfileObject is created and if a ProfileObjectType already exists for the ProfileObject, it will provide data to a standard profile depending on the ProfileObjectType definition. BatchPutProfileObject needs an ObjectType, which can be created using PutProfileObjectType.

EXEC aws.customer_profiles.domains.batch_put_profile_object
@domain_name='{{ domain_name }}' --required,
@region='{{ region }}' --required
@@json=
'{
"ObjectTypeName": "{{ ObjectTypeName }}",
"Items": "{{ Items }}"
}'
;