Skip to content

create_routing_profile async

create_routing_profile(
    instance_id: InstanceId,
    name: RoutingProfileName,
    description: RoutingProfileDescription,
    default_outbound_queue_id: QueueId,
    media_concurrencies: MediaConcurrencies,
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    queue_configs: Optional[RoutingProfileQueueConfigList] = None,
    manual_assignment_queue_configs: Optional[
        RoutingProfileManualAssignmentQueueConfigList
    ] = None,
    tags: Optional[TagMap] = None,
    agent_availability_timer: Optional[AgentAvailabilityTimer] = None,
) -> CreateRoutingProfileResponse

Creates a new routing profile.

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.

  • name (RoutingProfileName) –

    The name of the routing profile. Must not be more than 127 characters.

  • description (RoutingProfileDescription) –

    Description of the routing profile. Must not be more than 250 characters.

  • default_outbound_queue_id (QueueId) –

    The default outbound queue for the routing profile.

  • queue_configs (Optional[RoutingProfileQueueConfigList], default: None ) –

    The inbound queues associated with the routing profile. If no queue is added, the agent can make only outbound calls.

    The limit of 10 array members applies to the maximum number of RoutingProfileQueueConfig objects that can be passed during a CreateRoutingProfile API request. It is different from the quota of 50 queues per routing profile per instance that is listed in Connect Customer service quotas.

  • manual_assignment_queue_configs (Optional[RoutingProfileManualAssignmentQueueConfigList], default: None ) –

    The manual assignment queues associated with the routing profile. If no queue is added, agents and supervisors can't pick or assign any contacts from this routing profile. The limit of 10 array members applies to the maximum number of RoutingProfileManualAssignmentQueueConfig objects that can be passed during a CreateRoutingProfile API request. It is different from the quota of 50 queues per routing profile per instance that is listed in Connect Customer service quotas.

    For voice contacts, manual assignment supports only agent-first callback contacts. Chat, email, and task contacts are fully supported.

  • media_concurrencies (MediaConcurrencies) –

    The channels that agents can handle in the Contact Control Panel (CCP) for this routing profile.

  • tags (Optional[TagMap], default: None ) –

    The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

  • agent_availability_timer (Optional[AgentAvailabilityTimer], default: None ) –

    Whether agents with this routing profile will have their routing order calculated based on longest idle time or time since their last inbound contact.

Raises:

Source code in docs_src/capo_connect/_services/async_connect.py
async def create_routing_profile(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    name: "capo_connect.types.routing_profile_name.RoutingProfileName",
    description: "capo_connect.types.routing_profile_description.RoutingProfileDescription",
    default_outbound_queue_id: "capo_connect.types.queue_id.QueueId",
    media_concurrencies: "capo_connect.types.media_concurrencies.MediaConcurrencies",
    *,
    config_overrides: Optional[AsyncConnectClientConfig] = None,
    queue_configs: Optional[
        "capo_connect.types.routing_profile_queue_config_list.RoutingProfileQueueConfigList"
    ] = None,
    manual_assignment_queue_configs: Optional[
        "capo_connect.types.routing_profile_manual_assignment_queue_config_list.RoutingProfileManualAssignmentQueueConfigList"
    ] = None,
    tags: Optional["capo_connect.types.tag_map.TagMap"] = None,
    agent_availability_timer: Optional[
        "capo_connect.types.agent_availability_timer.AgentAvailabilityTimer"
    ] = None,
) -> "capo_connect.types.create_routing_profile_response.CreateRoutingProfileResponse":
    """<p>Creates a new routing profile.</p>

    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>
        name: <p>The name of the routing profile. Must not be more than 127 characters.</p>
        description: <p>Description of the routing profile. Must not be more than 250 characters.</p>
        default_outbound_queue_id: <p>The default outbound queue for the routing profile.</p>
        queue_configs: <p>The inbound queues associated with the routing profile. If no queue is added, the agent can make only outbound calls.</p> <p>The limit of 10 array members applies to the maximum number of <code>RoutingProfileQueueConfig</code> objects that can be passed during a CreateRoutingProfile API request. It is different from the quota of 50 queues per routing profile per instance that is listed in <a href="https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html">Connect Customer service quotas</a>. </p>
        manual_assignment_queue_configs: <p>The manual assignment queues associated with the routing profile. If no queue is added, agents and supervisors can't pick or assign any contacts from this routing profile. The limit of 10 array members applies to the maximum number of RoutingProfileManualAssignmentQueueConfig objects that can be passed during a CreateRoutingProfile API request. It is different from the quota of 50 queues per routing profile per instance that is listed in Connect Customer service quotas.</p> <note> <p>For voice contacts, manual assignment supports only agent-first callback contacts. Chat, email, and task contacts are fully supported.</p> </note>
        media_concurrencies: <p>The channels that agents can handle in the Contact Control Panel (CCP) for this routing profile.</p>
        tags: <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
        agent_availability_timer: <p>Whether agents with this routing profile will have their routing order calculated based on <i>longest idle time</i> or <i>time since their last inbound contact</i>. </p>

    Raises:
        capo_connect.errors.duplicate_resource_exception.DuplicateResourceException: <p>A resource with the specified name already exists.</p>
        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.limit_exceeded_exception.LimitExceededException: <p>The allowed limit for the resource has been exceeded.</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.create_routing_profile_request.CreateRoutingProfileRequest]",
    ) -> AsyncOperationResponse[
        "capo_connect.types.create_routing_profile_response.CreateRoutingProfileResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.create_routing_profile

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateRoutingProfile")
    )
    input_: capo_connect.types.create_routing_profile_request.CreateRoutingProfileRequest = {
        "instance_id": instance_id,
        "name": name,
        "description": description,
        "default_outbound_queue_id": default_outbound_queue_id,
        "media_concurrencies": media_concurrencies,
    }
    if queue_configs is not None:
        input_["queue_configs"] = queue_configs
    if manual_assignment_queue_configs is not None:
        input_["manual_assignment_queue_configs"] = manual_assignment_queue_configs
    if tags is not None:
        input_["tags"] = tags
    if agent_availability_timer is not None:
        input_["agent_availability_timer"] = agent_availability_timer

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