Skip to content

delete_git_connection

delete_git_connection(
    provider: GitProvider,
    owner: GitOwnerName,
    *,
    config_overrides: Optional[AmplifyGen3ClientConfig] = None,
) -> None

Deletes a Git connection, so that the service can no longer access repositories through it. This operation doesn't remove the app installation or authorization from your Git provider account. To remove them, use your Git provider's settings. If the connection doesn't exist, the operation succeeds and does nothing.

Parameters:

  • provider (GitProvider) –

    The Git provider.

  • owner (GitOwnerName) –

    The account that the Git connection is for. The value depends on the provider:

    • For GitHub, specify the user or organization name.

    • For GitLab, specify the user name.

    To get this value, call ListGitConnections.

Raises:

Source code in docs_src/capo_amplifygen3/_services/amplify_gen3.py
def delete_git_connection(
    self,
    provider: "capo_amplifygen3.types.git_provider.GitProvider",
    owner: "capo_amplifygen3.types.git_owner_name.GitOwnerName",
    *,
    config_overrides: Optional[AmplifyGen3ClientConfig] = None,
) -> None:
    """<p>Deletes a Git connection, so that the service can no longer access repositories through it. This operation doesn't remove the app installation or authorization from your Git provider account. To remove them, use your Git provider's settings. If the connection doesn't exist, the operation succeeds and does nothing.</p>

    Args:
        provider: <p>The Git provider.</p>
        owner: <p>The account that the Git connection is for. The value depends on the provider:</p> <ul> <li> <p>For GitHub, specify the user or organization name.</p> </li> <li> <p>For GitLab, specify the user name.</p> </li> </ul> <p>To get this value, call ListGitConnections.</p>

    Raises:
        capo_amplifygen3.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
        capo_amplifygen3.errors.internal_server_exception.InternalServerException: <p>An internal error occurred. Retry the request.</p>
        capo_amplifygen3.errors.throttling_exception.ThrottlingException: <p>The request was denied because the request rate exceeds the allowed limit.</p>
        capo_amplifygen3.errors.validation_exception.ValidationException: <p>The request contains invalid parameters or is otherwise malformed.</p>
        capo_amplifygen3.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_amplifygen3.types.delete_git_connection_request.DeleteGitConnectionRequest]",
    ) -> OperationResponse[None]:
        import capo_amplifygen3._operations.omega.delete_git_connection

        output, http_response = (
            capo_amplifygen3._operations.omega.delete_git_connection.delete_git_connection(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteGitConnection")
    )
    input_: capo_amplifygen3.types.delete_git_connection_request.DeleteGitConnectionRequest = {
        "provider": provider,
        "owner": owner,
    }

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