Skip to content

search_routing_profiles async

search_routing_profiles(
    instance_id: InstanceId,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    next_token: Optional[NextToken2500] = None,
    max_results: Optional[MaxResult500] = None,
    search_filter: Optional[RoutingProfileSearchFilter] = None,
    search_criteria: Optional[RoutingProfileSearchCriteria] = None,
) -> SearchRoutingProfilesResponse

Searches routing profiles in an Connect Customer instance, with optional filtering.

SearchRoutingProfiles does not populate LastModifiedRegion, LastModifiedTime, MediaConcurrencies.CrossChannelBehavior, and AgentAvailabilityTimer in its response, but DescribeRoutingProfile does.

Parameters:

  • instance_id (InstanceId) –

    The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

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

    The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

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

    The maximum number of results to return per page.

  • search_filter (Optional[RoutingProfileSearchFilter], default: None ) –

    Filters to be applied to search results.

  • search_criteria (Optional[RoutingProfileSearchCriteria], default: None ) –

    The search criteria to be used to return routing profiles.

    The name and description fields support "contains" queries with a minimum of 2 characters and a maximum of 25 characters. Any queries with character lengths outside of this range will throw invalid results.

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def search_routing_profiles(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    next_token: Optional["capo_connect.types.next_token2500.NextToken2500"] = None,
    max_results: Optional["capo_connect.types.max_result500.MaxResult500"] = None,
    search_filter: Optional[
        "capo_connect.types.routing_profile_search_filter.RoutingProfileSearchFilter"
    ] = None,
    search_criteria: Optional[
        "capo_connect.types.routing_profile_search_criteria.RoutingProfileSearchCriteria"
    ] = None,
) -> "capo_connect.types.search_routing_profiles_response.SearchRoutingProfilesResponse":
    """<p>Searches routing profiles in an Connect Customer instance, with optional filtering.</p> <note> <p> <code>SearchRoutingProfiles</code> does not populate LastModifiedRegion, LastModifiedTime, MediaConcurrencies.CrossChannelBehavior, and AgentAvailabilityTimer in its response, but <a href="https://docs.aws.amazon.com/connect/latest/APIReference/API_DescribeRoutingProfile.html">DescribeRoutingProfile</a> does.</p> </note>

    Args:
        instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
        next_token: <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
        max_results: <p>The maximum number of results to return per page.</p>
        search_filter: <p>Filters to be applied to search results.</p>
        search_criteria: <p>The search criteria to be used to return routing profiles.</p> <note> <p>The <code>name</code> and <code>description</code> fields support "contains" queries with a minimum of 2 characters and a maximum of 25 characters. Any queries with character lengths outside of this range will throw invalid results. </p> </note>

    Raises:
        capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_connect.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more of the specified parameters are not valid.</p>
        capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_connect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_connect.types.search_routing_profiles_request.SearchRoutingProfilesRequest]",
    ) -> AsyncOperationResponse[
        "capo_connect.types.search_routing_profiles_response.SearchRoutingProfilesResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.search_routing_profiles

        (
            output,
            http_response,
        ) = await capo_connect._operations.amazon_connect_service.search_routing_profiles.async_search_routing_profiles(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SearchRoutingProfiles")
    )
    input_: capo_connect.types.search_routing_profiles_request.SearchRoutingProfilesRequest = {
        "instance_id": instance_id
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if search_filter is not None:
        input_["search_filter"] = search_filter
    if search_criteria is not None:
        input_["search_criteria"] = search_criteria

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