Skip to content

create_integration

create_integration(
    name: IntegrationName,
    provider_configuration: ProviderConfiguration,
    *,
    config_overrides: Optional[ContinuumClientConfig] = None,
    client_token: Optional[IntegrationClientToken] = None,
) -> CreateIntegrationOutput

Creates a new integration with an external source provider. Repeating an identical request with the same clientToken returns the original integrationId, integrationArn, and createdAt. Token records are retained for eight hours after success or terminal failure, including after the integration is deleted; replaying a deleted integration's token does not recreate it. An identical request with a retained terminal failure returns the recorded error. Reusing a token with different parameters returns ValidationException. A fresh token starts a new create attempt; if the name is already owned by another integration, ConflictException includes that integration's identifier. An attempt still in progress may return ThrottlingException with retryAfterSeconds set to 1; retry with the same token and identical parameters. GitHub authorization codes are single use. Retry an unresolved attempt with its original token and unchanged parameters first. If the service reports a terminal failure, an expired attempt, or a successful token exchange whose integration could not be saved, restart GitHub authorization with a fresh token and authorization code. The service does not checkpoint provider results for recovery by another request.

Parameters:

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

    An optional token identifying one create attempt within the caller's account, Region, and operation. SDKs generate a token when omitted. If a request reaches the service without a token, the service generates one for that request. Each request without a token starts a new attempt. To replay an attempt, supply the same token and identical input. Authorized users and roles in the same account can retry an attempt this way. Token records are retained for eight hours after success or terminal failure, including after deletion of a successfully created integration. Different input with the same token returns ValidationException.

  • name (IntegrationName) –

    The name for the integration.

  • provider_configuration (ProviderConfiguration) –

    The provider-specific configuration required to create the integration. Only one member may be specified.

Raises:

  • AccessDeniedException –

    The request is not authorized. Verify that your credentials and request signature are valid and that you have permission to perform this action.

  • ConflictException –

    The request could not be completed due to a conflict with the current state of the resource.

  • InternalServerException –

    The request couldn't be processed because of an internal server issue. Try again later. If the problem persists, contact AWS Support.

  • ServiceQuotaExceededException –

    The request would exceed a service quota. Review your quota and request an increase if needed.

  • ThrottlingException –

    The request was denied due to request throttling.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_continuum/_services/continuum.py
def create_integration(
    self,
    name: "capo_continuum.types.integration_name.IntegrationName",
    provider_configuration: "capo_continuum.types.provider_configuration.ProviderConfiguration",
    *,
    config_overrides: Optional[ContinuumClientConfig] = None,
    client_token: Optional[
        "capo_continuum.types.integration_client_token.IntegrationClientToken"
    ] = None,
) -> "capo_continuum.types.create_integration_output.CreateIntegrationOutput":
    """Creates a new integration with an external source provider. Repeating an identical request with the same clientToken returns the original integrationId, integrationArn, and createdAt. Token records are retained for eight hours after success or terminal failure, including after the integration is deleted; replaying a deleted integration's token does not recreate it. An identical request with a retained terminal failure returns the recorded error. Reusing a token with different parameters returns ValidationException. A fresh token starts a new create attempt; if the name is already owned by another integration, ConflictException includes that integration's identifier. An attempt still in progress may return ThrottlingException with retryAfterSeconds set to 1; retry with the same token and identical parameters. GitHub authorization codes are single use. Retry an unresolved attempt with its original token and unchanged parameters first. If the service reports a terminal failure, an expired attempt, or a successful token exchange whose integration could not be saved, restart GitHub authorization with a fresh token and authorization code. The service does not checkpoint provider results for recovery by another request.

    Args:
        client_token: An optional token identifying one create attempt within the caller's account, Region, and operation. SDKs generate a token when omitted. If a request reaches the service without a token, the service generates one for that request. Each request without a token starts a new attempt. To replay an attempt, supply the same token and identical input. Authorized users and roles in the same account can retry an attempt this way. Token records are retained for eight hours after success or terminal failure, including after deletion of a successfully created integration. Different input with the same token returns ValidationException.
        name: The name for the integration.
        provider_configuration: The provider-specific configuration required to create the integration. Only one member may be specified.

    Raises:
        capo_continuum.errors.access_denied_exception.AccessDeniedException: The request is not authorized. Verify that your credentials and request signature are valid and that you have permission to perform this action.
        capo_continuum.errors.conflict_exception.ConflictException: The request could not be completed due to a conflict with the current state of the resource.
        capo_continuum.errors.internal_server_exception.InternalServerException: The request couldn't be processed because of an internal server issue. Try again later. If the problem persists, contact AWS Support.
        capo_continuum.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: The request would exceed a service quota. Review your quota and request an increase if needed.
        capo_continuum.errors.throttling_exception.ThrottlingException: The request was denied due to request throttling.
        capo_continuum.errors.validation_exception.ValidationException
        capo_continuum.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_continuum.types.create_integration_input.CreateIntegrationInput]",
    ) -> OperationResponse[
        "capo_continuum.types.create_integration_output.CreateIntegrationOutput"
    ]:
        import capo_continuum._operations.continuum_control_plane.create_integration

        output, http_response = (
            capo_continuum._operations.continuum_control_plane.create_integration.create_integration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_continuum.types.create_integration_input.CreateIntegrationInput",
    ) -> dict[str, Any]:
        import capo_continuum.types.create_integration_input

        return capo_continuum.types.create_integration_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateIntegration", redact_input=_redact_input),
    )
    input_: capo_continuum.types.create_integration_input.CreateIntegrationInput = {
        "name": name,
        "provider_configuration": provider_configuration,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output