Skip to content

put_integration async

put_integration(
    domain_name: name,
    *,
    config_overrides: Optional[AsyncCustomerProfilesClientConfig] = None,
    uri: Optional[string1To255] = None,
    object_type_name: Optional[typeName] = None,
    object_type_names: Optional[ObjectTypeNames] = None,
    tags: Optional[TagMap] = None,
    flow_definition: Optional[FlowDefinition] = None,
    role_arn: Optional[RoleArn] = None,
    event_trigger_names: Optional[EventTriggerNames] = None,
    scope: Optional[Scope] = None,
) -> PutIntegrationResponse

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.

Parameters:

  • domain_name (name) –

    The unique name of the domain.

  • uri (Optional[string1To255], default: None ) –

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

  • object_type_name (Optional[typeName], default: None ) –

    The name of the profile object type.

  • object_type_names (Optional[ObjectTypeNames], default: None ) –

    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.

  • tags (Optional[TagMap], default: None ) –

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

  • flow_definition (Optional[FlowDefinition], default: None ) –

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

  • role_arn (Optional[RoleArn], default: None ) –

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

  • event_trigger_names (Optional[EventTriggerNames], default: None ) –

    A list of unique names for active event triggers associated with the integration.

  • scope (Optional[Scope], default: None ) –

    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.

Raises:

Source code in docs_src/capo_customer_profiles/_services/async_customer_profiles.py
async def put_integration(
    self,
    domain_name: "capo_customer_profiles.types.name.name",
    *,
    config_overrides: Optional[AsyncCustomerProfilesClientConfig] = None,
    uri: Optional["capo_customer_profiles.types.string1_to255.string1To255"] = None,
    object_type_name: Optional[
        "capo_customer_profiles.types.type_name.typeName"
    ] = None,
    object_type_names: Optional[
        "capo_customer_profiles.types.object_type_names.ObjectTypeNames"
    ] = None,
    tags: Optional["capo_customer_profiles.types.tag_map.TagMap"] = None,
    flow_definition: Optional[
        "capo_customer_profiles.types.flow_definition.FlowDefinition"
    ] = None,
    role_arn: Optional["capo_customer_profiles.types.role_arn.RoleArn"] = None,
    event_trigger_names: Optional[
        "capo_customer_profiles.types.event_trigger_names.EventTriggerNames"
    ] = None,
    scope: Optional["capo_customer_profiles.types.scope.Scope"] = None,
) -> "capo_customer_profiles.types.put_integration_response.PutIntegrationResponse":
    """<p>Adds an integration between the service and a third-party service, which includes Amazon AppFlow and Amazon Connect.</p> <p>An integration can belong to only one domain.</p> <p>To add or remove tags on an existing Integration, see <a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_TagResource.html"> TagResource </a>/<a href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_UntagResource.html"> UntagResource</a>.</p>

    Args:
        domain_name: <p>The unique name of the domain.</p>
        uri: <p>The URI of the S3 bucket or any other type of data source.</p>
        object_type_name: <p>The name of the profile object type.</p>
        object_type_names: <p>A map in which each key is an event type from an external application such as Segment or Shopify, and each value is an <code>ObjectTypeName</code> (template) used to ingest the event. It supports the following event types: <code>SegmentIdentify</code>, <code>ShopifyCreateCustomers</code>, <code>ShopifyUpdateCustomers</code>, <code>ShopifyCreateDraftOrders</code>, <code>ShopifyUpdateDraftOrders</code>, <code>ShopifyCreateOrders</code>, and <code>ShopifyUpdatedOrders</code>.</p>
        tags: <p>The tags used to organize, track, or control access for this resource.</p>
        flow_definition: <p>The configuration that controls how Customer Profiles retrieves data from the source.</p>
        role_arn: <p>The Amazon Resource Name (ARN) of the IAM role. The Integration uses this role to make Customer Profiles requests on your behalf.</p>
        event_trigger_names: <p>A list of unique names for active event triggers associated with the integration.</p>
        scope: <p>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.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_customer_profiles.types.put_integration_request.PutIntegrationRequest]",
    ) -> AsyncOperationResponse[
        "capo_customer_profiles.types.put_integration_response.PutIntegrationResponse"
    ]:
        import capo_customer_profiles._operations.customer_profiles_20200815.put_integration

        (
            output,
            http_response,
        ) = await capo_customer_profiles._operations.customer_profiles_20200815.put_integration.async_put_integration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_customer_profiles.types.put_integration_request.PutIntegrationRequest",
    ) -> dict[str, Any]:
        import capo_customer_profiles.types.put_integration_request

        return (
            capo_customer_profiles.types.put_integration_request.redact_sensitive(
                input_
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("PutIntegration", redact_input=_redact_input),
    )
    input_: capo_customer_profiles.types.put_integration_request.PutIntegrationRequest = {
        "domain_name": domain_name
    }
    if uri is not None:
        input_["uri"] = uri
    if object_type_name is not None:
        input_["object_type_name"] = object_type_name
    if object_type_names is not None:
        input_["object_type_names"] = object_type_names
    if tags is not None:
        input_["tags"] = tags
    if flow_definition is not None:
        input_["flow_definition"] = flow_definition
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if event_trigger_names is not None:
        input_["event_trigger_names"] = event_trigger_names
    if scope is not None:
        input_["scope"] = scope

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output