Skip to content

list_data_lake_namespaces

list_data_lake_namespaces(
    instance_id: UUID,
    *,
    config_overrides: Optional[SupplyChainClientConfig] = None,
    next_token: Optional[DataLakeNamespaceNextToken] = None,
    max_results: Optional[DataLakeNamespaceMaxResults] = None,
) -> ListDataLakeNamespacesResponse

Enables you to programmatically view the list of Amazon Web Services Supply Chain data lake namespaces. Developers can view the namespaces and the corresponding information such as description for a given instance ID. Note that this API only return custom namespaces, instance pre-defined namespaces are not included.

Parameters:

Raises:

Examples:

List AWS Supply Chain namespaces

>>> client.list_data_lake_namespaces(instance_id='1877dd20-dee9-4639-8e99-cb67acf21fe5')
List AWS Supply Chain namespaces using pagination
>>> client.list_data_lake_namespaces(instance_id='1877dd20-dee9-4639-8e99-cb67acf21fe5', max_results=1, next_token='next_token_returned_from_previous_list_request')
Source code in docs_src/capo_supplychain/_services/supply_chain.py
def list_data_lake_namespaces(
    self,
    instance_id: "capo_supplychain.types.uuid.UUID",
    *,
    config_overrides: Optional[SupplyChainClientConfig] = None,
    next_token: Optional[
        "capo_supplychain.types.data_lake_namespace_next_token.DataLakeNamespaceNextToken"
    ] = None,
    max_results: Optional[
        "capo_supplychain.types.data_lake_namespace_max_results.DataLakeNamespaceMaxResults"
    ] = None,
) -> "capo_supplychain.types.list_data_lake_namespaces_response.ListDataLakeNamespacesResponse":
    """<p>Enables you to programmatically view the list of Amazon Web Services Supply Chain data lake namespaces. Developers can view the namespaces and the corresponding information such as description for a given instance ID. Note that this API only return custom namespaces, instance pre-defined namespaces are not included.</p>

    Args:
        instance_id: <p>The Amazon Web Services Supply Chain instance identifier.</p>
        next_token: <p>The pagination token to fetch next page of namespaces.</p>
        max_results: <p>The max number of namespaces to fetch in this paginated request.</p>

    Raises:
        capo_supplychain.errors.access_denied_exception.AccessDeniedException: <p>You do not have the required privileges to perform this action.</p>
        capo_supplychain.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_supplychain.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_supplychain.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
        capo_supplychain.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request would cause a service quota to be exceeded.</p>
        capo_supplychain.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
        capo_supplychain.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by an AWS service.</p>
        capo_supplychain.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        List AWS Supply Chain namespaces

        >>> client.list_data_lake_namespaces(instance_id='1877dd20-dee9-4639-8e99-cb67acf21fe5')
        List AWS Supply Chain namespaces using pagination

        >>> client.list_data_lake_namespaces(instance_id='1877dd20-dee9-4639-8e99-cb67acf21fe5', max_results=1, next_token='next_token_returned_from_previous_list_request')
    """

    def _handler(
        req: "OperationRequest[capo_supplychain.types.list_data_lake_namespaces_request.ListDataLakeNamespacesRequest]",
    ) -> OperationResponse[
        "capo_supplychain.types.list_data_lake_namespaces_response.ListDataLakeNamespacesResponse"
    ]:
        import capo_supplychain._operations.galaxy_public_api_gateway.list_data_lake_namespaces

        output, http_response = (
            capo_supplychain._operations.galaxy_public_api_gateway.list_data_lake_namespaces.list_data_lake_namespaces(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDataLakeNamespaces")
    )
    input_: capo_supplychain.types.list_data_lake_namespaces_request.ListDataLakeNamespacesRequest = {
        "instance_id": instance_id
    }
    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