putIntegration method

Future<PutIntegrationResponse> putIntegration({
  1. required String domainName,
  2. List<String>? eventTriggerNames,
  3. FlowDefinition? flowDefinition,
  4. String? objectTypeName,
  5. Map<String, String>? objectTypeNames,
  6. String? roleArn,
  7. Scope? scope,
  8. Map<String, String>? tags,
  9. String? uri,
})

Adds an integration between the service and a third-party service, which includes Amazon AppFlow and Amazon Connect.

An integration can belong to only one domain.

To add or remove tags on an existing Integration, 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 eventTriggerNames : A list of unique names for active event triggers associated with the integration.

Parameter flowDefinition : The configuration that controls how Customer Profiles retrieves data from the source.

Parameter objectTypeName : The name of the profile object type.

Parameter objectTypeNames : A map in which each key is an event type from an external application such as Segment or Shopify, and each value is an ObjectTypeName (template) used to ingest the event. It supports the following event types: SegmentIdentify, ShopifyCreateCustomers, ShopifyUpdateCustomers, ShopifyCreateDraftOrders, ShopifyUpdateDraftOrders, ShopifyCreateOrders, and ShopifyUpdatedOrders.

Parameter roleArn : The Amazon Resource Name (ARN) of the IAM role. The Integration uses this role to make Customer Profiles requests on your behalf.

Parameter scope : Specifies whether the integration applies to profile level data (associated with profiles) or domain level data (not associated with any specific profile). The default value is PROFILE.

Parameter tags : The tags used to organize, track, or control access for this resource.

Parameter uri : The URI of the S3 bucket or any other type of data source.

Implementation

Future<PutIntegrationResponse> putIntegration({
  required String domainName,
  List<String>? eventTriggerNames,
  FlowDefinition? flowDefinition,
  String? objectTypeName,
  Map<String, String>? objectTypeNames,
  String? roleArn,
  Scope? scope,
  Map<String, String>? tags,
  String? uri,
}) async {
  final $payload = <String, dynamic>{
    if (eventTriggerNames != null) 'EventTriggerNames': eventTriggerNames,
    if (flowDefinition != null) 'FlowDefinition': flowDefinition,
    if (objectTypeName != null) 'ObjectTypeName': objectTypeName,
    if (objectTypeNames != null) 'ObjectTypeNames': objectTypeNames,
    if (roleArn != null) 'RoleArn': roleArn,
    if (scope != null) 'Scope': scope.value,
    if (tags != null) 'Tags': tags,
    if (uri != null) 'Uri': uri,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/domains/${Uri.encodeComponent(domainName)}/integrations',
    exceptionFnMap: _exceptionFns,
  );
  return PutIntegrationResponse.fromJson(response);
}