Skip to content

describe_projects async

describe_projects(
    *,
    config_overrides: Optional[AsyncRekognitionClientConfig] = None,
    next_token: Optional[ExtendedPaginationToken] = None,
    max_results: Optional[ProjectsPageSize] = None,
    project_names: Optional[ProjectNames] = None,
    features: Optional[CustomizationFeatures] = None,
) -> DescribeProjectsResponse

Gets information about your Rekognition projects.

This operation requires permissions to perform the rekognition:DescribeProjects action.

Parameters:

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

    If the previous response was incomplete (because there is more results to retrieve), Rekognition returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.

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

    The maximum number of results to return per paginated call. The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.

  • project_names (Optional[ProjectNames], default: None ) –

    A list of the projects that you want Rekognition to describe. If you don't specify a value, the response includes descriptions for all the projects in your AWS account.

  • features (Optional[CustomizationFeatures], default: None ) –

    Specifies the type of customization to filter projects by. If no value is specified, CUSTOM_LABELS is used as a default.

Raises:

Source code in docs_src/capo_rekognition/_services/async_rekognition.py
async def describe_projects(
    self,
    *,
    config_overrides: Optional[AsyncRekognitionClientConfig] = None,
    next_token: Optional[
        "capo_rekognition.types.extended_pagination_token.ExtendedPaginationToken"
    ] = None,
    max_results: Optional[
        "capo_rekognition.types.projects_page_size.ProjectsPageSize"
    ] = None,
    project_names: Optional[
        "capo_rekognition.types.project_names.ProjectNames"
    ] = None,
    features: Optional[
        "capo_rekognition.types.customization_features.CustomizationFeatures"
    ] = None,
) -> "capo_rekognition.types.describe_projects_response.DescribeProjectsResponse":
    """<p>Gets information about your Rekognition projects.</p> <p>This operation requires permissions to perform the <code>rekognition:DescribeProjects</code> action.</p>

    Args:
        next_token: <p>If the previous response was incomplete (because there is more results to retrieve), Rekognition returns a pagination token in the response. You can use this pagination token to retrieve the next set of results. </p>
        max_results: <p>The maximum number of results to return per paginated call. The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException error occurs. The default value is 100. </p>
        project_names: <p>A list of the projects that you want Rekognition to describe. If you don't specify a value, the response includes descriptions for all the projects in your AWS account.</p>
        features: <p>Specifies the type of customization to filter projects by. If no value is specified, CUSTOM_LABELS is used as a default.</p>

    Raises:
        capo_rekognition.errors.access_denied_exception.AccessDeniedException: <p>You are not authorized to perform the action.</p>
        capo_rekognition.errors.internal_server_error.InternalServerError: <p>Amazon Rekognition experienced a service issue. Try your call again.</p>
        capo_rekognition.errors.invalid_pagination_token_exception.InvalidPaginationTokenException: <p>Pagination token in the request is not valid.</p>
        capo_rekognition.errors.invalid_parameter_exception.InvalidParameterException: <p>Input parameter violated a constraint. Validate your parameter before calling the API operation again.</p>
        capo_rekognition.errors.provisioned_throughput_exceeded_exception.ProvisionedThroughputExceededException: <p>The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition.</p>
        capo_rekognition.errors.throttling_exception.ThrottlingException: <p>Amazon Rekognition is temporarily unable to process the request. Try your call again.</p>
        capo_rekognition.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rekognition.types.describe_projects_request.DescribeProjectsRequest]",
    ) -> AsyncOperationResponse[
        "capo_rekognition.types.describe_projects_response.DescribeProjectsResponse"
    ]:
        import capo_rekognition._operations.rekognition_service.describe_projects

        (
            output,
            http_response,
        ) = await capo_rekognition._operations.rekognition_service.describe_projects.async_describe_projects(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeProjects")
    )
    input_: capo_rekognition.types.describe_projects_request.DescribeProjectsRequest = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if project_names is not None:
        input_["project_names"] = project_names
    if features is not None:
        input_["features"] = features

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