Skip to content

list_data_sources

list_data_sources(
    domain_identifier: DomainId,
    project_identifier: str,
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    environment_identifier: Optional[str] = None,
    connection_identifier: Optional[str] = None,
    type: Optional[DataSourceType] = None,
    status: Optional[DataSourceStatus] = None,
    name: Optional[Name] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListDataSourcesOutput

Lists data sources in Amazon DataZone.

Parameters:

  • domain_identifier (DomainId) –

    The identifier of the Amazon DataZone domain in which to list the data sources.

  • project_identifier (str) –

    The identifier of the project in which to list data sources.

  • environment_identifier (Optional[str], default: None ) –

    The identifier of the environment in which to list the data sources.

  • connection_identifier (Optional[str], default: None ) –

    The ID of the connection.

  • type (Optional[DataSourceType], default: None ) –

    The type of the data source.

  • status (Optional[DataSourceStatus], default: None ) –

    The status of the data source.

  • name (Optional[Name], default: None ) –

    The name of the data source.

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

    When the number of data sources is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of data sources, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListDataSources to list the next set of data sources.

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

    The maximum number of data sources to return in a single call to ListDataSources. When the number of data sources to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListDataSources to list the next set of data sources.

Raises:

Source code in docs_src/capo_datazone/_services/data_zone.py
def list_data_sources(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    project_identifier: str,
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    environment_identifier: Optional[str] = None,
    connection_identifier: Optional[str] = None,
    type: Optional["capo_datazone.types.data_source_type.DataSourceType"] = None,
    status: Optional[
        "capo_datazone.types.data_source_status.DataSourceStatus"
    ] = None,
    name: Optional["capo_datazone.types.name.Name"] = None,
    next_token: Optional[
        "capo_datazone.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional["capo_datazone.types.max_results.MaxResults"] = None,
) -> "capo_datazone.types.list_data_sources_output.ListDataSourcesOutput":
    """<p>Lists data sources in Amazon DataZone.</p>

    Args:
        domain_identifier: <p>The identifier of the Amazon DataZone domain in which to list the data sources.</p>
        project_identifier: <p>The identifier of the project in which to list data sources.</p>
        environment_identifier: <p>The identifier of the environment in which to list the data sources.</p>
        connection_identifier: <p>The ID of the connection.</p>
        type: <p>The type of the data source.</p>
        status: <p>The status of the data source.</p>
        name: <p>The name of the data source.</p>
        next_token: <p>When the number of data sources is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of data sources, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListDataSources</code> to list the next set of data sources.</p>
        max_results: <p>The maximum number of data sources to return in a single call to <code>ListDataSources</code>. When the number of data sources to be listed is greater than the value of <code>MaxResults</code>, the response contains a <code>NextToken</code> value that you can use in a subsequent call to <code>ListDataSources</code> to list the next set of data sources.</p>

    Raises:
        capo_datazone.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_datazone.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_datazone.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_datazone.errors.conflict_exception.ConflictException: <p>There is a conflict while performing this action.</p>
        capo_datazone.errors.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
        capo_datazone.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request has exceeded the specified service quota.</p>
        capo_datazone.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
        capo_datazone.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_datazone.types.list_data_sources_input.ListDataSourcesInput]",
    ) -> OperationResponse[
        "capo_datazone.types.list_data_sources_output.ListDataSourcesOutput"
    ]:
        import capo_datazone._operations.data_zone.list_data_sources

        output, http_response = (
            capo_datazone._operations.data_zone.list_data_sources.list_data_sources(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_datazone.types.list_data_sources_input.ListDataSourcesInput",
    ) -> dict[str, Any]:
        import capo_datazone.types.list_data_sources_input

        return capo_datazone.types.list_data_sources_input.redact_sensitive(input_)

    def _redact_output(
        output: "capo_datazone.types.list_data_sources_output.ListDataSourcesOutput",
    ) -> dict[str, Any]:
        import capo_datazone.types.list_data_sources_output

        return capo_datazone.types.list_data_sources_output.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ListDataSources",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_datazone.types.list_data_sources_input.ListDataSourcesInput = {
        "domain_identifier": domain_identifier,
        "project_identifier": project_identifier,
    }
    if environment_identifier is not None:
        input_["environment_identifier"] = environment_identifier
    if connection_identifier is not None:
        input_["connection_identifier"] = connection_identifier
    if type is not None:
        input_["type"] = type
    if status is not None:
        input_["status"] = status
    if name is not None:
        input_["name"] = name
    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