Skip to content

list_projects async

list_projects(
    domain_identifier: DomainId,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    user_identifier: Optional[str] = None,
    group_identifier: Optional[str] = None,
    name: Optional[ProjectName] = None,
    project_category: Optional[str] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListProjectsOutput

Lists Amazon DataZone projects.

Parameters:

  • domain_identifier (DomainId) –

    The identifier of the Amazon DataZone domain.

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

    The identifier of the Amazon DataZone user.

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

    The identifier of a group.

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

    The name of the project.

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

    A parameter to filter projects by their category.

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

    When the number of projects 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 projects, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListProjects to list the next set of projects.

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

    The maximum number of projects to return in a single call to ListProjects. When the number of projects 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 ListProjects to list the next set of projects.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def list_projects(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    user_identifier: Optional[str] = None,
    group_identifier: Optional[str] = None,
    name: Optional["capo_datazone.types.project_name.ProjectName"] = None,
    project_category: Optional[str] = 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_projects_output.ListProjectsOutput":
    """<p>Lists Amazon DataZone projects.</p>

    Args:
        domain_identifier: <p>The identifier of the Amazon DataZone domain.</p>
        user_identifier: <p>The identifier of the Amazon DataZone user.</p>
        group_identifier: <p>The identifier of a group.</p>
        name: <p>The name of the project.</p>
        project_category: <p>A parameter to filter projects by their category.</p>
        next_token: <p>When the number of projects 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 projects, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListProjects</code> to list the next set of projects.</p>
        max_results: <p>The maximum number of projects to return in a single call to <code>ListProjects</code>. When the number of projects 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>ListProjects</code> to list the next set of projects.</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.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_datazone.types.list_projects_input.ListProjectsInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.list_projects_output.ListProjectsOutput"
    ]:
        import capo_datazone._operations.data_zone.list_projects

        (
            output,
            http_response,
        ) = await capo_datazone._operations.data_zone.list_projects.async_list_projects(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

        return capo_datazone.types.list_projects_input.redact_sensitive(input_)

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

        return capo_datazone.types.list_projects_output.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ListProjects", redact_input=_redact_input, redact_output=_redact_output
        ),
    )
    input_: capo_datazone.types.list_projects_input.ListProjectsInput = {
        "domain_identifier": domain_identifier
    }
    if user_identifier is not None:
        input_["user_identifier"] = user_identifier
    if group_identifier is not None:
        input_["group_identifier"] = group_identifier
    if name is not None:
        input_["name"] = name
    if project_category is not None:
        input_["project_category"] = project_category
    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