Skip to content

describe_project_versions async

describe_project_versions(
    project_arn: ProjectArn,
    *,
    config_overrides: Optional[AsyncRekognitionClientConfig] = None,
    version_names: Optional[VersionNames] = None,
    next_token: Optional[ExtendedPaginationToken] = None,
    max_results: Optional[ProjectVersionsPageSize] = None,
) -> DescribeProjectVersionsResponse

Lists and describes the versions of an Amazon Rekognition project. You can specify up to 10 model or adapter versions in ProjectVersionArns. If you don't specify a value, descriptions for all model/adapter versions in the project are returned.

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

Parameters:

  • project_arn (ProjectArn) –

    The Amazon Resource Name (ARN) of the project that contains the model/adapter you want to describe.

  • version_names (Optional[VersionNames], default: None ) –

    A list of model or project version names that you want to describe. You can add up to 10 model or project version names to the list. If you don't specify a value, all project version descriptions are returned. A version name is part of a project version ARN. For example, my-model.2020-01-21T09.10.15 is the version name in the following ARN. arn:aws:rekognition:us-east-1:123456789012:project/getting-started/version/my-model.2020-01-21T09.10.15/1234567890123.

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

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

  • max_results (Optional[ProjectVersionsPageSize], 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.

Raises:

Source code in docs_src/capo_rekognition/_services/async_rekognition.py
async def describe_project_versions(
    self,
    project_arn: "capo_rekognition.types.project_arn.ProjectArn",
    *,
    config_overrides: Optional[AsyncRekognitionClientConfig] = None,
    version_names: Optional[
        "capo_rekognition.types.version_names.VersionNames"
    ] = None,
    next_token: Optional[
        "capo_rekognition.types.extended_pagination_token.ExtendedPaginationToken"
    ] = None,
    max_results: Optional[
        "capo_rekognition.types.project_versions_page_size.ProjectVersionsPageSize"
    ] = None,
) -> "capo_rekognition.types.describe_project_versions_response.DescribeProjectVersionsResponse":
    """<p>Lists and describes the versions of an Amazon Rekognition project. You can specify up to 10 model or adapter versions in <code>ProjectVersionArns</code>. If you don't specify a value, descriptions for all model/adapter versions in the project are returned.</p> <p>This operation requires permissions to perform the <code>rekognition:DescribeProjectVersions</code> action.</p>

    Args:
        project_arn: <p>The Amazon Resource Name (ARN) of the project that contains the model/adapter you want to describe.</p>
        version_names: <p>A list of model or project version names that you want to describe. You can add up to 10 model or project version names to the list. If you don't specify a value, all project version descriptions are returned. A version name is part of a project version ARN. For example, <code>my-model.2020-01-21T09.10.15</code> is the version name in the following ARN. <code>arn:aws:rekognition:us-east-1:123456789012:project/getting-started/version/<i>my-model.2020-01-21T09.10.15</i>/1234567890123</code>.</p>
        next_token: <p>If the previous response was incomplete (because there is more results to retrieve), Amazon 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>

    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.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request cannot be found.</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_project_versions_request.DescribeProjectVersionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_rekognition.types.describe_project_versions_response.DescribeProjectVersionsResponse"
    ]:
        import capo_rekognition._operations.rekognition_service.describe_project_versions

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeProjectVersions")
    )
    input_: capo_rekognition.types.describe_project_versions_request.DescribeProjectVersionsRequest = {
        "project_arn": project_arn
    }
    if version_names is not None:
        input_["version_names"] = version_names
    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