Skip to content

get_connections

get_connections(
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
    filter: Optional[GetConnectionsFilter] = None,
    hide_password: Optional[Boolean] = None,
    next_token: Optional[Token] = None,
    max_results: Optional[PageSize] = None,
) -> GetConnectionsResponse

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

  • filter (Optional[GetConnectionsFilter], default: None ) –

    A filter that controls which connections are returned.

  • hide_password (Optional[Boolean], default: None ) –

    Allows you to retrieve the connection metadata without returning the password. For instance, the Glue console uses this flag to retrieve the connection, and does not display the password. Set this parameter when the caller might not have permission to use the KMS key to decrypt the password, but it does have permission to access the rest of the connection properties.

  • next_token (Optional[Token], default: None ) –

    A continuation token, if this is a continuation call.

  • max_results (Optional[PageSize], default: None ) –

    The maximum number of connections to return in one response.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def get_connections(
    self,
    *,
    config_overrides: Optional[GlueClientConfig] = None,
    catalog_id: Optional[
        "capo_glue.types.catalog_id_string.CatalogIdString"
    ] = None,
    filter: Optional[
        "capo_glue.types.get_connections_filter.GetConnectionsFilter"
    ] = None,
    hide_password: Optional["capo_glue.types.boolean.Boolean"] = None,
    next_token: Optional["capo_glue.types.token.Token"] = None,
    max_results: Optional["capo_glue.types.page_size.PageSize"] = None,
) -> "capo_glue.types.get_connections_response.GetConnectionsResponse":
    """<p>Retrieves 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>
        filter: <p>A filter that controls which connections are returned.</p>
        hide_password: <p>Allows you to retrieve the connection metadata without returning the password. For instance, the Glue console uses this flag to retrieve the connection, and does not display the password. Set this parameter when the caller might not have permission to use the KMS key to decrypt the password, but it does have permission to access the rest of the connection properties.</p>
        next_token: <p>A continuation token, if this is a continuation call.</p>
        max_results: <p>The maximum number of connections to return in one response.</p>

    Raises:
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
        capo_glue.errors.glue_encryption_exception.GlueEncryptionException: <p>An encryption operation failed.</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</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.get_connections_request.GetConnectionsRequest]",
    ) -> OperationResponse[
        "capo_glue.types.get_connections_response.GetConnectionsResponse"
    ]:
        import capo_glue._operations.aws_glue.get_connections

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetConnections")
    )
    input_: capo_glue.types.get_connections_request.GetConnectionsRequest = {}
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id
    if filter is not None:
        input_["filter"] = filter
    if hide_password is not None:
        input_["hide_password"] = hide_password
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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