Skip to content

create_event_integration async

create_event_integration(
    name: Name,
    event_filter: EventFilter,
    event_bridge_bus: EventBridgeBus,
    *,
    config_overrides: Optional[AsyncAppIntegrationsClientConfig] = None,
    description: Optional[Description] = None,
    client_token: Optional[IdempotencyToken] = None,
    tags: Optional[TagMap] = None,
) -> CreateEventIntegrationResponse

Creates an EventIntegration, given a specified name, description, and a reference to an Amazon EventBridge bus in your account and a partner event source that pushes events to that bus. No objects are created in the your account, only metadata that is persisted on the EventIntegration control plane.

Parameters:

  • name (Name) –

    The name of the event integration.

  • description (Optional[Description], default: None ) –

    The description of the event integration.

  • event_filter (EventFilter) –

    The event filter.

  • event_bridge_bus (EventBridgeBus) –

    The EventBridge bus.

  • client_token (Optional[IdempotencyToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

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

    The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.

Raises:

Source code in docs_src/capo_appintegrations/_services/async_app_integrations.py
async def create_event_integration(
    self,
    name: "capo_appintegrations.types.name.Name",
    event_filter: "capo_appintegrations.types.event_filter.EventFilter",
    event_bridge_bus: "capo_appintegrations.types.event_bridge_bus.EventBridgeBus",
    *,
    config_overrides: Optional[AsyncAppIntegrationsClientConfig] = None,
    description: Optional[
        "capo_appintegrations.types.description.Description"
    ] = None,
    client_token: Optional[
        "capo_appintegrations.types.idempotency_token.IdempotencyToken"
    ] = None,
    tags: Optional["capo_appintegrations.types.tag_map.TagMap"] = None,
) -> "capo_appintegrations.types.create_event_integration_response.CreateEventIntegrationResponse":
    """<p>Creates an EventIntegration, given a specified name, description, and a reference to an Amazon EventBridge bus in your account and a partner event source that pushes events to that bus. No objects are created in the your account, only metadata that is persisted on the EventIntegration control plane.</p>

    Args:
        name: <p>The name of the event integration.</p>
        description: <p>The description of the event integration.</p>
        event_filter: <p>The event filter.</p>
        event_bridge_bus: <p>The EventBridge bus.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
        tags: <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>

    Raises:
        capo_appintegrations.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_appintegrations.errors.duplicate_resource_exception.DuplicateResourceException: <p>A resource with the specified name already exists.</p>
        capo_appintegrations.errors.internal_service_error.InternalServiceError: <p>Request processing failed due to an error or failure with the service.</p>
        capo_appintegrations.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid. </p>
        capo_appintegrations.errors.resource_quota_exceeded_exception.ResourceQuotaExceededException: <p>The allowed quota for the resource has been exceeded.</p>
        capo_appintegrations.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_appintegrations.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appintegrations.types.create_event_integration_request.CreateEventIntegrationRequest]",
    ) -> AsyncOperationResponse[
        "capo_appintegrations.types.create_event_integration_response.CreateEventIntegrationResponse"
    ]:
        import capo_appintegrations._operations.amazon_app_integration_service.create_event_integration

        (
            output,
            http_response,
        ) = await capo_appintegrations._operations.amazon_app_integration_service.create_event_integration.async_create_event_integration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateEventIntegration")
    )
    input_: capo_appintegrations.types.create_event_integration_request.CreateEventIntegrationRequest = {
        "name": name,
        "event_filter": event_filter,
        "event_bridge_bus": event_bridge_bus,
    }
    if description is not None:
        input_["description"] = description
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags

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