Skip to content

list_labeling_jobs_for_workteam async

list_labeling_jobs_for_workteam(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    workteam_arn: Optional[WorkteamArn] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    creation_time_after: Optional[Timestamp] = None,
    creation_time_before: Optional[Timestamp] = None,
    job_reference_code_contains: Optional[JobReferenceCodeContains] = None,
    sort_by: Optional[ListLabelingJobsForWorkteamSortByOptions] = None,
    sort_order: Optional[SortOrder] = None,
) -> ListLabelingJobsForWorkteamResponse

Gets a list of labeling jobs assigned to a specified work team.

Parameters:

  • workteam_arn (Optional[WorkteamArn], default: None ) –

    The Amazon Resource Name (ARN) of the work team for which you want to see labeling jobs for.

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

    The maximum number of labeling jobs to return in each page of the response.

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

    If the result of the previous ListLabelingJobsForWorkteam request was truncated, the response includes a NextToken. To retrieve the next set of labeling jobs, use the token in the next request.

  • creation_time_after (Optional[Timestamp], default: None ) –

    A filter that returns only labeling jobs created after the specified time (timestamp).

  • creation_time_before (Optional[Timestamp], default: None ) –

    A filter that returns only labeling jobs created before the specified time (timestamp).

  • job_reference_code_contains (Optional[JobReferenceCodeContains], default: None ) –

    A filter the limits jobs to only the ones whose job reference code contains the specified string.

  • sort_by (Optional[ListLabelingJobsForWorkteamSortByOptions], default: None ) –

    The field to sort results by. The default is CreationTime.

  • sort_order (Optional[SortOrder], default: None ) –

    The sort order for results. The default is Ascending.

Raises:

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def list_labeling_jobs_for_workteam(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    workteam_arn: Optional["capo_sagemaker.types.workteam_arn.WorkteamArn"] = None,
    max_results: Optional["capo_sagemaker.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_sagemaker.types.next_token.NextToken"] = None,
    creation_time_after: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    creation_time_before: Optional[
        "capo_sagemaker.types.timestamp.Timestamp"
    ] = None,
    job_reference_code_contains: Optional[
        "capo_sagemaker.types.job_reference_code_contains.JobReferenceCodeContains"
    ] = None,
    sort_by: Optional[
        "capo_sagemaker.types.list_labeling_jobs_for_workteam_sort_by_options.ListLabelingJobsForWorkteamSortByOptions"
    ] = None,
    sort_order: Optional["capo_sagemaker.types.sort_order.SortOrder"] = None,
) -> "capo_sagemaker.types.list_labeling_jobs_for_workteam_response.ListLabelingJobsForWorkteamResponse":
    """<p>Gets a list of labeling jobs assigned to a specified work team.</p>

    Args:
        workteam_arn: <p>The Amazon Resource Name (ARN) of the work team for which you want to see labeling jobs for.</p>
        max_results: <p>The maximum number of labeling jobs to return in each page of the response.</p>
        next_token: <p>If the result of the previous <code>ListLabelingJobsForWorkteam</code> request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of labeling jobs, use the token in the next request.</p>
        creation_time_after: <p>A filter that returns only labeling jobs created after the specified time (timestamp).</p>
        creation_time_before: <p>A filter that returns only labeling jobs created before the specified time (timestamp).</p>
        job_reference_code_contains: <p>A filter the limits jobs to only the ones whose job reference code contains the specified string.</p>
        sort_by: <p>The field to sort results by. The default is <code>CreationTime</code>.</p>
        sort_order: <p>The sort order for results. The default is <code>Ascending</code>.</p>

    Raises:
        capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.list_labeling_jobs_for_workteam_request.ListLabelingJobsForWorkteamRequest]",
    ) -> AsyncOperationResponse[
        "capo_sagemaker.types.list_labeling_jobs_for_workteam_response.ListLabelingJobsForWorkteamResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.list_labeling_jobs_for_workteam

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.list_labeling_jobs_for_workteam.async_list_labeling_jobs_for_workteam(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListLabelingJobsForWorkteam")
    )
    input_: capo_sagemaker.types.list_labeling_jobs_for_workteam_request.ListLabelingJobsForWorkteamRequest = {}
    if workteam_arn is not None:
        input_["workteam_arn"] = workteam_arn
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if creation_time_after is not None:
        input_["creation_time_after"] = creation_time_after
    if creation_time_before is not None:
        input_["creation_time_before"] = creation_time_before
    if job_reference_code_contains is not None:
        input_["job_reference_code_contains"] = job_reference_code_contains
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if sort_order is not None:
        input_["sort_order"] = sort_order

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