Continuum / Client / create_integration

create_integration

Continuum.Client.create_integration(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.create_integration(
    clientToken='string',
    name='string',
    providerConfiguration={
        'github': {
            'authorization': {
                'authorizationCode': 'string',
                'state': 'string',
                'redirectUrl': 'string'
            },
            'organizationName': 'string'
        },
        'gitlab': {
            'instanceUrl': 'string',
            'targetType': 'GROUP'|'PROJECT',
            'targetPath': 'string',
            'accessToken': 'string'
        },
        's3': {
            'bucket': 'string',
            'roleArn': 'string',
            'externalId': 'string'
        }
    }
)
Parameters:
  • clientToken (string) –

    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.

    This field is autopopulated if not provided.

  • name (string) –

    [REQUIRED]

    The name for the integration.

  • providerConfiguration (dict) –

    [REQUIRED]

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

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: github, gitlab, s3.

    • github (dict) –

      Configuration for a GitHub.com integration.

      • authorization (dict) – [REQUIRED]

        OAuth authorization used to establish the integration. Required on create; not returned on read operations.

        • authorizationCode (string) – [REQUIRED]

          The OAuth authorization code returned by GitHub after the user authorizes the application.

        • state (string) – [REQUIRED]

          The state returned by GitHub in the OAuth callback. It must be the state that StartIntegrationAuthorization returned to the same AWS account, and the authorization request must have sent that call’s codeChallenge. The state can be redeemed once. A stage that enforces authorization sessions rejects a missing, expired, already used, or other-account state with ValidationException; restart the authorization with StartIntegrationAuthorization.

        • redirectUrl (string) –

          The redirect URL used to obtain the authorization code. Must match one of the redirect URLs registered on the GitHub App. If omitted, the App’s default redirect URL is used. Not stored or returned after creation.

      • organizationName (string) –

        The name of the GitHub organization to associate with the integration. If not specified, the integration is associated with the authenticated user’s personal account.

    • gitlab (dict) –

      Configuration for a GitLab integration.

      • instanceUrl (string) – [REQUIRED]

        The HTTPS base URL of the GitLab instance (gitlab.com or self-managed).

      • targetType (string) – [REQUIRED]

        Whether the integration targets a group or a single project.

      • targetPath (string) – [REQUIRED]

        The group or project path the integration targets.

      • accessToken (string) – [REQUIRED]

        The GitLab access token (personal, group or project). Write-only; not stored or returned after creation. If the token carries the self-rotate scope, rotation is opted in and Continuum manages the token thereafter.

    • s3 (dict) –

      Configuration for a customer-managed S3 integration.

      • bucket (string) – [REQUIRED]

        Customer-managed source bucket name.

      • roleArn (string) – [REQUIRED]

        Role Continuum will assume to read from the source bucket.

      • externalId (string) – [REQUIRED]

        Caller-provided external ID required by the role trust policy.

Return type:

dict

Returns:

Response Syntax

{
    'integrationId': 'string',
    'integrationArn': 'string',
    'createdAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    Contains the original identifier, ARN, and creation time of the new or replayed integration. A replay can refer to an integration that has since been deleted.

    • integrationId (string) –

      The unique identifier of the created integration.

    • integrationArn (string) –

      The ARN of the created integration.

    • createdAt (datetime) –

      The timestamp when the integration was created.

Exceptions