create_domain(
domain_name: name,
default_expiration_days: expirationDaysInteger,
*,
config_overrides: Optional[CustomerProfilesClientConfig] = None,
default_encryption_key: Optional[encryptionKey] = None,
dead_letter_queue_url: Optional[sqsQueueUrl] = None,
matching: Optional[MatchingRequest] = None,
rule_based_matching: Optional[RuleBasedMatchingRequest] = None,
data_store: Optional[DataStoreRequest] = None,
tags: Optional[TagMap] = None,
) -> CreateDomainResponse
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.
Parameters:
-
domain_name
(name)
–
The unique name of the domain.
-
default_expiration_days
(expirationDaysInteger)
–
The default number of days until the data within the domain expires.
-
default_encryption_key
(Optional[encryptionKey], default:
None
)
–
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.
-
dead_letter_queue_url
(Optional[sqsQueueUrl], default:
None
)
–
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.
-
matching
(Optional[MatchingRequest], default:
None
)
–
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.
-
rule_based_matching
(Optional[RuleBasedMatchingRequest], default:
None
)
–
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.
-
data_store
(Optional[DataStoreRequest], default:
None
)
–
Set to true to enabled data store for this domain.
-
tags
(Optional[TagMap], default:
None
)
–
The tags used to organize, track, or control access for this resource.
Raises:
Source code in docs_src/capo_customer_profiles/_services/customer_profiles.py
| def create_domain(
self,
domain_name: "capo_customer_profiles.types.name.name",
default_expiration_days: "capo_customer_profiles.types.expiration_days_integer.expirationDaysInteger",
*,
config_overrides: Optional[CustomerProfilesClientConfig] = None,
default_encryption_key: Optional[
"capo_customer_profiles.types.encryption_key.encryptionKey"
] = None,
dead_letter_queue_url: Optional[
"capo_customer_profiles.types.sqs_queue_url.sqsQueueUrl"
] = None,
matching: Optional[
"capo_customer_profiles.types.matching_request.MatchingRequest"
] = None,
rule_based_matching: Optional[
"capo_customer_profiles.types.rule_based_matching_request.RuleBasedMatchingRequest"
] = None,
data_store: Optional[
"capo_customer_profiles.types.data_store_request.DataStoreRequest"
] = None,
tags: Optional["capo_customer_profiles.types.tag_map.TagMap"] = None,
) -> "capo_customer_profiles.types.create_domain_response.CreateDomainResponse":
"""<p>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.</p> <p>Each Connect Customer instance can be associated with only one domain. Multiple Connect Customer instances can be associated with one domain.</p> <p>Use this API or <a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_UpdateDomain.html">UpdateDomain</a> to enable <a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html">identity resolution</a>: set <code>Matching</code> to true.</p> <p>To prevent cross-service impersonation when you call this API, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/cross-service-confused-deputy-prevention.html">Cross-service confused deputy prevention</a> for sample policies that you should apply. </p> <note> <p>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 <a href="https://docs.aws.amazon.com/connect/latest/adminguide/enable-customer-profiles.html#enable-customer-profiles-step1">Enable Customer Profiles</a>.</p> <p>Each Amazon Connect instance can be associated with only one domain. Multiple Amazon Connect instances can be associated with one domain.</p> </note>
Args:
domain_name: <p>The unique name of the domain.</p>
default_expiration_days: <p>The default number of days until the data within the domain expires.</p>
default_encryption_key: <p>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.</p>
dead_letter_queue_url: <p>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.</p>
matching: <p>The process of matching duplicate profiles. If <code>Matching</code> = <code>true</code>, 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. </p> <p>After the Identity Resolution Job completes, use the <a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html">GetMatches</a> API to return and review the results. Or, if you have configured <code>ExportingConfig</code> in the <code>MatchingRequest</code>, you can download the results from S3.</p>
rule_based_matching: <p>The process of matching duplicate profiles using the Rule-Based matching. If <code>RuleBasedMatching</code> = true, Connect Customer Customer Profiles will start to match and merge your profiles according to your configuration in the <code>RuleBasedMatchingRequest</code>. You can use the <code>ListRuleBasedMatches</code> and <code>GetSimilarProfiles</code> API to return and review the results. Also, if you have configured <code>ExportingConfig</code> in the <code>RuleBasedMatchingRequest</code>, you can download the results from S3.</p>
data_store: <p>Set to true to enabled data store for this domain.</p>
tags: <p>The tags used to organize, track, or control access for this resource.</p>
Raises:
capo_customer_profiles.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_customer_profiles.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
capo_customer_profiles.errors.internal_server_exception.InternalServerException: <p>An internal service error occurred.</p>
capo_customer_profiles.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource does not exist, or access was denied.</p>
capo_customer_profiles.errors.throttling_exception.ThrottlingException: <p>You exceeded the maximum number of requests.</p>
capo_customer_profiles.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_customer_profiles.types.create_domain_request.CreateDomainRequest]",
) -> OperationResponse[
"capo_customer_profiles.types.create_domain_response.CreateDomainResponse"
]:
import capo_customer_profiles._operations.customer_profiles_20200815.create_domain
output, http_response = (
capo_customer_profiles._operations.customer_profiles_20200815.create_domain.create_domain(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateDomain")
)
input_: capo_customer_profiles.types.create_domain_request.CreateDomainRequest = {
"domain_name": domain_name,
"default_expiration_days": default_expiration_days,
}
if default_encryption_key is not None:
input_["default_encryption_key"] = default_encryption_key
if dead_letter_queue_url is not None:
input_["dead_letter_queue_url"] = dead_letter_queue_url
if matching is not None:
input_["matching"] = matching
if rule_based_matching is not None:
input_["rule_based_matching"] = rule_based_matching
if data_store is not None:
input_["data_store"] = data_store
if tags is not None:
input_["tags"] = tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|