Skip to content

list_data_lake_datasets async

list_data_lake_datasets(
    instance_id: UUID,
    namespace: DataLakeNamespaceName,
    *,
    config_overrides: Optional[AsyncSupplyChainClientConfig] = None,
    next_token: Optional[DataLakeDatasetNextToken] = None,
    max_results: Optional[DataLakeDatasetMaxResults] = None,
) -> ListDataLakeDatasetsResponse

Enables you to programmatically view the list of Amazon Web Services Supply Chain data lake datasets. Developers can view the datasets and the corresponding information such as namespace, schema, and so on for a given instance ID and namespace.

Parameters:

Raises:

Examples:

List AWS Supply Chain datasets

>>> await client.list_data_lake_datasets(instance_id='1877dd20-dee9-4639-8e99-cb67acf21fe5', namespace='asc')
List custom datasets using pagination
>>> await client.list_data_lake_datasets(instance_id='1877dd20-dee9-4639-8e99-cb67acf21fe5', namespace='default', max_results=2, next_token='next_token_returned_from_previous_list_request')
Source code in docs_src/capo_supplychain/_services/async_supply_chain.py
async def list_data_lake_datasets(
    self,
    instance_id: "capo_supplychain.types.uuid.UUID",
    namespace: "capo_supplychain.types.data_lake_namespace_name.DataLakeNamespaceName",
    *,
    config_overrides: Optional[AsyncSupplyChainClientConfig] = None,
    next_token: Optional[
        "capo_supplychain.types.data_lake_dataset_next_token.DataLakeDatasetNextToken"
    ] = None,
    max_results: Optional[
        "capo_supplychain.types.data_lake_dataset_max_results.DataLakeDatasetMaxResults"
    ] = None,
) -> "capo_supplychain.types.list_data_lake_datasets_response.ListDataLakeDatasetsResponse":
    """<p>Enables you to programmatically view the list of Amazon Web Services Supply Chain data lake datasets. Developers can view the datasets and the corresponding information such as namespace, schema, and so on for a given instance ID and namespace.</p>

    Args:
        instance_id: <p>The Amazon Web Services Supply Chain instance identifier.</p>
        namespace: <p>The namespace of the dataset, besides the custom defined namespace, every instance comes with below pre-defined namespaces:</p> <ul> <li> <p> <b>asc</b> - For information on the Amazon Web Services Supply Chain supported datasets see <a href="https://docs.aws.amazon.com/aws-supply-chain/latest/userguide/data-model-asc.html">https://docs.aws.amazon.com/aws-supply-chain/latest/userguide/data-model-asc.html</a>.</p> </li> <li> <p> <b>default</b> - For datasets with custom user-defined schemas.</p> </li> </ul>
        next_token: <p>The pagination token to fetch next page of datasets.</p>
        max_results: <p>The max number of datasets 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 datasets

        >>> await client.list_data_lake_datasets(instance_id='1877dd20-dee9-4639-8e99-cb67acf21fe5', namespace='asc')
        List custom datasets using pagination

        >>> await client.list_data_lake_datasets(instance_id='1877dd20-dee9-4639-8e99-cb67acf21fe5', namespace='default', max_results=2, next_token='next_token_returned_from_previous_list_request')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_supplychain.types.list_data_lake_datasets_request.ListDataLakeDatasetsRequest]",
    ) -> AsyncOperationResponse[
        "capo_supplychain.types.list_data_lake_datasets_response.ListDataLakeDatasetsResponse"
    ]:
        import capo_supplychain._operations.galaxy_public_api_gateway.list_data_lake_datasets

        (
            output,
            http_response,
        ) = await capo_supplychain._operations.galaxy_public_api_gateway.list_data_lake_datasets.async_list_data_lake_datasets(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDataLakeDatasets")
    )
    input_: capo_supplychain.types.list_data_lake_datasets_request.ListDataLakeDatasetsRequest = {
        "instance_id": instance_id,
        "namespace": namespace,
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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