Skip to content

batch_delete_connection

batch_delete_connection(
    connection_name_list: DeleteConnectionNameList,
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
) -> BatchDeleteConnectionResponse

Deletes a list of connection definitions from the Data Catalog.

Parameters:

  • catalog_id (Optional[CatalogIdString], default: None ) –

    The ID of the Data Catalog in which the connections reside. If none is provided, the Amazon Web Services account ID is used by default.

  • connection_name_list (DeleteConnectionNameList) –

    A list of names of the connections to delete.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def batch_delete_connection(
    self,
    connection_name_list: "capo_glue.types.delete_connection_name_list.DeleteConnectionNameList",
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    catalog_id: Optional[
        "capo_glue.types.catalog_id_string.CatalogIdString"
    ] = None,
) -> (
    "capo_glue.types.batch_delete_connection_response.BatchDeleteConnectionResponse"
):
    """<p>Deletes a list of connection definitions from the Data Catalog.</p>

    Args:
        catalog_id: <p>The ID of the Data Catalog in which the connections reside. If none is provided, the Amazon Web Services account ID is used by default.</p>
        connection_name_list: <p>A list of names of the connections to delete.</p>

    Raises:
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_glue.types.batch_delete_connection_request.BatchDeleteConnectionRequest]",
    ) -> OperationResponse[
        "capo_glue.types.batch_delete_connection_response.BatchDeleteConnectionResponse"
    ]:
        import capo_glue._operations.aws_glue.batch_delete_connection

        output, http_response = (
            capo_glue._operations.aws_glue.batch_delete_connection.batch_delete_connection(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchDeleteConnection")
    )
    input_: capo_glue.types.batch_delete_connection_request.BatchDeleteConnectionRequest = {
        "connection_name_list": connection_name_list
    }
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id

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