Skip to content

list_prospecting_from_engagement_tasks async

list_prospecting_from_engagement_tasks(
    catalog: CatalogIdentifier,
    *,
    config_overrides: Optional[AsyncPartnerCentralSellingClientConfig] = None,
    max_results: Optional[PageSize] = None,
    next_token: Optional[str] = None,
    task_identifier: Optional[TaskIdentifierList] = None,
    task_name: Optional[TaskNameList] = None,
    start_after: Optional[DateTime] = None,
    start_before: Optional[DateTime] = None,
    sort: Optional[ProspectingFromEngagementTaskSort] = None,
) -> ListProspectingFromEngagementTasksResponse

Lists all prospecting tasks initiated by the caller's account. Supports optional filters by task identifier, task name, or start time range. Results can be sorted using configurable options. The response is paginated. Use the NextToken value from each response to retrieve subsequent pages.

Parameters:

  • catalog (CatalogIdentifier) –

    Specifies the catalog to list tasks from. Specify AWS for production environments and Sandbox for testing and development purposes.

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

    The maximum number of results to return in a single page. If additional results exist, the response includes a NextToken value for retrieving the next page. If omitted, the API uses a service-defined default page size.

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

    The pagination token from a previous call to this API. Include this value to retrieve the next page of results. If omitted, the first page is returned.

  • task_identifier (Optional[TaskIdentifierList], default: None ) –

    Filters the results to include only the tasks with the specified identifiers. Provide up to 10 task IDs to narrow the list to specific tasks. If omitted, tasks are not filtered by identifier.

  • task_name (Optional[TaskNameList], default: None ) –

    Filters the results to include only tasks with the specified names. Provide up to 10 task names to narrow the list. If omitted, tasks are not filtered by name.

  • start_after (Optional[DateTime], default: None ) –

    Filters tasks to include only those that started after the specified timestamp. Use this with StartBefore to define a start-time range for your query. The format follows ISO 8601 date-time notation.

  • start_before (Optional[DateTime], default: None ) –

    Filters tasks to include only those that started before the specified timestamp. Use this with StartAfter to define a start-time range for your query. The format follows ISO 8601 date-time notation.

  • sort (Optional[ProspectingFromEngagementTaskSort], default: None ) –

    Specifies the field and order used to sort the returned tasks. If omitted, tasks are returned in the default sort order.

Raises:

  • AccessDeniedException –

    This error occurs when you don't have permission to perform the requested action.

    You don’t have access to this action or resource. Review IAM policies or contact your AWS administrator for assistance.

  • InternalServerException –

    This error occurs when the specified resource can’t be found or doesn't exist. Resource ID and type might be incorrect.

    Suggested action: This is usually a transient error. Retry after the provided retry delay or a short interval. If the problem persists, contact AWS support.

  • ThrottlingException –

    This error occurs when there are too many requests sent. Review the provided quotas and adapt your usage to avoid throttling.

    This error occurs when there are too many requests sent. Review the provided Quotas and retry after the provided delay.

  • ValidationException –

    The input fails to satisfy the constraints specified by the service or business validation rules.

    Suggested action: Review the error message, including the failed fields and reasons, to correct the request payload.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_partnercentral_selling/_services/async_partner_central_selling.py
async def list_prospecting_from_engagement_tasks(
    self,
    catalog: "capo_partnercentral_selling.types.catalog_identifier.CatalogIdentifier",
    *,
    config_overrides: Optional[AsyncPartnerCentralSellingClientConfig] = None,
    max_results: Optional[
        "capo_partnercentral_selling.types.page_size.PageSize"
    ] = None,
    next_token: Optional[str] = None,
    task_identifier: Optional[
        "capo_partnercentral_selling.types.task_identifier_list.TaskIdentifierList"
    ] = None,
    task_name: Optional[
        "capo_partnercentral_selling.types.task_name_list.TaskNameList"
    ] = None,
    start_after: Optional[
        "capo_partnercentral_selling.types.date_time.DateTime"
    ] = None,
    start_before: Optional[
        "capo_partnercentral_selling.types.date_time.DateTime"
    ] = None,
    sort: Optional[
        "capo_partnercentral_selling.types.prospecting_from_engagement_task_sort.ProspectingFromEngagementTaskSort"
    ] = None,
) -> "capo_partnercentral_selling.types.list_prospecting_from_engagement_tasks_response.ListProspectingFromEngagementTasksResponse":
    """<p>Lists all prospecting tasks initiated by the caller's account. Supports optional filters by task identifier, task name, or start time range. Results can be sorted using configurable options. The response is paginated. Use the <code>NextToken</code> value from each response to retrieve subsequent pages.</p>

    Args:
        catalog: <p>Specifies the catalog to list tasks from. Specify <code>AWS</code> for production environments and <code>Sandbox</code> for testing and development purposes.</p>
        max_results: <p>The maximum number of results to return in a single page. If additional results exist, the response includes a <code>NextToken</code> value for retrieving the next page. If omitted, the API uses a service-defined default page size.</p>
        next_token: <p>The pagination token from a previous call to this API. Include this value to retrieve the next page of results. If omitted, the first page is returned.</p>
        task_identifier: <p>Filters the results to include only the tasks with the specified identifiers. Provide up to 10 task IDs to narrow the list to specific tasks. If omitted, tasks are not filtered by identifier.</p>
        task_name: <p>Filters the results to include only tasks with the specified names. Provide up to 10 task names to narrow the list. If omitted, tasks are not filtered by name.</p>
        start_after: <p>Filters tasks to include only those that started after the specified timestamp. Use this with <code>StartBefore</code> to define a start-time range for your query. The format follows ISO 8601 date-time notation.</p>
        start_before: <p>Filters tasks to include only those that started before the specified timestamp. Use this with <code>StartAfter</code> to define a start-time range for your query. The format follows ISO 8601 date-time notation.</p>
        sort: <p>Specifies the field and order used to sort the returned tasks. If omitted, tasks are returned in the default sort order.</p>

    Raises:
        capo_partnercentral_selling.errors.access_denied_exception.AccessDeniedException: <p>This error occurs when you don't have permission to perform the requested action.</p> <p>You don’t have access to this action or resource. Review IAM policies or contact your AWS administrator for assistance.</p>
        capo_partnercentral_selling.errors.internal_server_exception.InternalServerException: <p>This error occurs when the specified resource can’t be found or doesn't exist. Resource ID and type might be incorrect.</p> <p>Suggested action: This is usually a transient error. Retry after the provided retry delay or a short interval. If the problem persists, contact AWS support.</p>
        capo_partnercentral_selling.errors.throttling_exception.ThrottlingException: <p>This error occurs when there are too many requests sent. Review the provided quotas and adapt your usage to avoid throttling.</p> <p>This error occurs when there are too many requests sent. Review the provided <a href="https://docs.aws.amazon.com/partner-central/latest/selling-api/quotas.html">Quotas</a> and retry after the provided delay.</p>
        capo_partnercentral_selling.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service or business validation rules.</p> <p>Suggested action: Review the error message, including the failed fields and reasons, to correct the request payload.</p>
        capo_partnercentral_selling.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_partnercentral_selling.types.list_prospecting_from_engagement_tasks_request.ListProspectingFromEngagementTasksRequest]",
    ) -> AsyncOperationResponse[
        "capo_partnercentral_selling.types.list_prospecting_from_engagement_tasks_response.ListProspectingFromEngagementTasksResponse"
    ]:
        import capo_partnercentral_selling._operations.aws_partner_central_selling.list_prospecting_from_engagement_tasks

        (
            output,
            http_response,
        ) = await capo_partnercentral_selling._operations.aws_partner_central_selling.list_prospecting_from_engagement_tasks.async_list_prospecting_from_engagement_tasks(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListProspectingFromEngagementTasks")
    )
    input_: capo_partnercentral_selling.types.list_prospecting_from_engagement_tasks_request.ListProspectingFromEngagementTasksRequest = {
        "catalog": catalog
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if task_identifier is not None:
        input_["task_identifier"] = task_identifier
    if task_name is not None:
        input_["task_name"] = task_name
    if start_after is not None:
        input_["start_after"] = start_after
    if start_before is not None:
        input_["start_before"] = start_before
    if sort is not None:
        input_["sort"] = sort

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