Skip to content

search_engagements

search_engagements(
    catalog: CatalogIdentifier,
    *,
    config_overrides: Optional[PartnerCentralSellingClientConfig] = None,
    keyword: Optional[EngagementSearchKeyword] = None,
    filter: Optional[EngagementSearchFilter] = None,
    group_id: Optional[GroupId] = None,
    sort: Optional[EngagementSearchSort] = None,
    max_results: Optional[PageSize] = None,
    next_token: Optional[LeadsNextToken] = None,
) -> SearchEngagementsResponse

Searches the engagements in AWS Partner Central that match your criteria, such as customer industry or geography. You can combine a free-text Keyword, a structured Filter tree, an engagement group (GroupId), and Sort options, and each search criterion that you specify narrows the results. Results are paginated, so use NextToken to retrieve additional results.

Parameters:

  • catalog (CatalogIdentifier) –

    Specifies the catalog to search. The following values are valid:

    • AWS: Production.

    • Sandbox: Testing environments.

  • keyword (Optional[EngagementSearchKeyword], default: None ) –

    An optional free-text query string matched against the engagement title, description, customer company name, and member company names. When provided together with Filter or GroupId, each one narrows the result set.

  • filter (Optional[EngagementSearchFilter], default: None ) –

    A recursive, structured filter tree. Each node is either a boolean combinator (AndAllFilters, OrAllFilters, or NotFilter) or a leaf predicate (a single comparison such as EqualsTo). When provided together with Keyword or GroupId, each one narrows the result set.

  • group_id (Optional[GroupId], default: None ) –

    The identifier of an engagement group that ListEngagementGroups returns. When you specify a group, the operation returns only the engagements that match the criteria that define the group. The group must be active and available to you in the specified catalog. Otherwise, the request fails with a ValidationException.

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

    Specifies the field and direction used to sort the search results. If you omit this field, results are sorted by creation time, newest first.

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

    Specifies the maximum number of results to return in a single call. If you omit this value, the operation returns up to 20 results. Use this value to control pagination together with NextToken.

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

    A pagination token returned by a previous call. Pass it in a subsequent call to retrieve the next page of results. Omit it on the first call.

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.

Examples:

Search engagements by keyword and customer country Returns AWS catalog engagements whose text matches the keyword and whose prospected customer is in the United States, newest first.

>>> client.search_engagements(catalog='AWS', keyword='data analytics', filter={'EqualsTo': {'Key': 'ProspectingCustomerCountry', 'Value': {'StringValue': 'US'}}}, sort={'SortBy': 'CreatedAt', 'SortOrder': 'DESCENDING'}, max_results=20)
Source code in docs_src/capo_partnercentral_selling/_services/partner_central_selling.py
def search_engagements(
    self,
    catalog: "capo_partnercentral_selling.types.catalog_identifier.CatalogIdentifier",
    *,
    config_overrides: Optional[PartnerCentralSellingClientConfig] = None,
    keyword: Optional[
        "capo_partnercentral_selling.types.engagement_search_keyword.EngagementSearchKeyword"
    ] = None,
    filter: Optional[
        "capo_partnercentral_selling.types.engagement_search_filter.EngagementSearchFilter"
    ] = None,
    group_id: Optional["capo_partnercentral_selling.types.group_id.GroupId"] = None,
    sort: Optional[
        "capo_partnercentral_selling.types.engagement_search_sort.EngagementSearchSort"
    ] = None,
    max_results: Optional[
        "capo_partnercentral_selling.types.page_size.PageSize"
    ] = None,
    next_token: Optional[
        "capo_partnercentral_selling.types.leads_next_token.LeadsNextToken"
    ] = None,
) -> "capo_partnercentral_selling.types.search_engagements_response.SearchEngagementsResponse":
    """<p>Searches the engagements in AWS Partner Central that match your criteria, such as customer industry or geography. You can combine a free-text <code>Keyword</code>, a structured <code>Filter</code> tree, an engagement group (<code>GroupId</code>), and <code>Sort</code> options, and each search criterion that you specify narrows the results. Results are paginated, so use <code>NextToken</code> to retrieve additional results.</p>

    Args:
        catalog: <p>Specifies the catalog to search. The following values are valid:</p> <ul> <li> <p> <code>AWS</code>: Production.</p> </li> <li> <p> <code>Sandbox</code>: Testing environments.</p> </li> </ul>
        keyword: <p>An optional free-text query string matched against the engagement title, description, customer company name, and member company names. When provided together with <code>Filter</code> or <code>GroupId</code>, each one narrows the result set.</p>
        filter: <p>A recursive, structured filter tree. Each node is either a boolean combinator (<code>AndAllFilters</code>, <code>OrAllFilters</code>, or <code>NotFilter</code>) or a leaf predicate (a single comparison such as <code>EqualsTo</code>). When provided together with <code>Keyword</code> or <code>GroupId</code>, each one narrows the result set.</p>
        group_id: <p>The identifier of an engagement group that <code>ListEngagementGroups</code> returns. When you specify a group, the operation returns only the engagements that match the criteria that define the group. The group must be active and available to you in the specified catalog. Otherwise, the request fails with a <code>ValidationException</code>.</p>
        sort: <p>Specifies the field and direction used to sort the search results. If you omit this field, results are sorted by creation time, newest first.</p>
        max_results: <p>Specifies the maximum number of results to return in a single call. If you omit this value, the operation returns up to 20 results. Use this value to control pagination together with <code>NextToken</code>.</p>
        next_token: <p>A pagination token returned by a previous call. Pass it in a subsequent call to retrieve the next page of results. Omit it on the first call.</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.

    Examples:
        Search engagements by keyword and customer country
        Returns AWS catalog engagements whose text matches the keyword and whose prospected customer is in the United States, newest first.

        >>> client.search_engagements(catalog='AWS', keyword='data analytics', filter={'EqualsTo': {'Key': 'ProspectingCustomerCountry', 'Value': {'StringValue': 'US'}}}, sort={'SortBy': 'CreatedAt', 'SortOrder': 'DESCENDING'}, max_results=20)
    """

    def _handler(
        req: "OperationRequest[capo_partnercentral_selling.types.search_engagements_request.SearchEngagementsRequest]",
    ) -> OperationResponse[
        "capo_partnercentral_selling.types.search_engagements_response.SearchEngagementsResponse"
    ]:
        import capo_partnercentral_selling._operations.aws_partner_central_selling.search_engagements

        output, http_response = (
            capo_partnercentral_selling._operations.aws_partner_central_selling.search_engagements.search_engagements(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_partnercentral_selling.types.search_engagements_request.SearchEngagementsRequest",
    ) -> dict[str, Any]:
        import capo_partnercentral_selling.types.search_engagements_request

        return capo_partnercentral_selling.types.search_engagements_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_partnercentral_selling.types.search_engagements_response.SearchEngagementsResponse",
    ) -> dict[str, Any]:
        import capo_partnercentral_selling.types.search_engagements_response

        return capo_partnercentral_selling.types.search_engagements_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "SearchEngagements",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_partnercentral_selling.types.search_engagements_request.SearchEngagementsRequest = {
        "catalog": catalog
    }
    if keyword is not None:
        input_["keyword"] = keyword
    if filter is not None:
        input_["filter"] = filter
    if group_id is not None:
        input_["group_id"] = group_id
    if sort is not None:
        input_["sort"] = sort
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output