Skip to content

start_integration_authorization async

start_integration_authorization(
    provider_type: IntegrationAuthorizationProviderType,
    *,
    config_overrides: Optional[AsyncContinuumClientConfig] = None,
    name: Optional[IntegrationName] = None,
) -> StartIntegrationAuthorizationOutput

Starts an OAuth authorization for a new integration and returns the values the caller sends to the provider's authorization endpoint. The authorization belongs to the calling AWS account, can be redeemed once by CreateIntegration from that same account, and expires after ten minutes.

Parameters:

  • provider_type (IntegrationAuthorizationProviderType) –

    The provider to authorize. Only GITHUB is supported.

  • name (Optional[IntegrationName], default: None ) –

    The name the integration will be created with. When specified, the request fails with ConflictException if an integration with this name already exists in the account, before the caller leaves for the provider. The name is only checked: it is not reserved, stored, or authorized. CreateIntegration requires its own name, checks it again, and may use a different one.

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.

  • 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/async_continuum.py
async def start_integration_authorization(
    self,
    provider_type: "capo_continuum.types.integration_authorization_provider_type.IntegrationAuthorizationProviderType",
    *,
    config_overrides: Optional[AsyncContinuumClientConfig] = None,
    name: Optional["capo_continuum.types.integration_name.IntegrationName"] = None,
) -> "capo_continuum.types.start_integration_authorization_output.StartIntegrationAuthorizationOutput":
    """Starts an OAuth authorization for a new integration and returns the values the caller sends to the provider's authorization endpoint. The authorization belongs to the calling AWS account, can be redeemed once by CreateIntegration from that same account, and expires after ten minutes.

    Args:
        provider_type: The provider to authorize. Only GITHUB is supported.
        name: The name the integration will be created with. When specified, the request fails with ConflictException if an integration with this name already exists in the account, before the caller leaves for the provider. The name is only checked: it is not reserved, stored, or authorized. CreateIntegration requires its own name, checks it again, and may use a different one.

    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.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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_continuum.types.start_integration_authorization_input.StartIntegrationAuthorizationInput]",
    ) -> AsyncOperationResponse[
        "capo_continuum.types.start_integration_authorization_output.StartIntegrationAuthorizationOutput"
    ]:
        import capo_continuum._operations.continuum_control_plane.start_integration_authorization

        (
            output,
            http_response,
        ) = await capo_continuum._operations.continuum_control_plane.start_integration_authorization.async_start_integration_authorization(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_continuum.types.start_integration_authorization_output.StartIntegrationAuthorizationOutput",
    ) -> dict[str, Any]:
        import capo_continuum.types.start_integration_authorization_output

        return capo_continuum.types.start_integration_authorization_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "StartIntegrationAuthorization", redact_output=_redact_output
        ),
    )
    input_: capo_continuum.types.start_integration_authorization_input.StartIntegrationAuthorizationInput = {
        "provider_type": provider_type
    }
    if name is not None:
        input_["name"] = name

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