create_task_template
¶
create_task_template(
instance_id: InstanceId,
name: TaskTemplateName,
fields: TaskTemplateFields,
*,
config_overrides: Optional[ConnectClientConfig] = None,
description: Optional[TaskTemplateDescription] = None,
contact_flow_id: Optional[ContactFlowId] = None,
self_assign_flow_id: Optional[ContactFlowId] = None,
constraints: Optional[TaskTemplateConstraints] = None,
defaults: Optional[TaskTemplateDefaults] = None,
status: Optional[TaskTemplateStatus] = None,
client_token: Optional[ClientToken] = None,
) -> CreateTaskTemplateResponse
Creates a new task template in the specified Connect Customer instance.
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(TaskTemplateName) –The name of the task template.
-
description(Optional[TaskTemplateDescription], default:None) –The description of the task template.
-
contact_flow_id(Optional[ContactFlowId], default:None) –The identifier of the flow that runs by default when a task is created by referencing this template.
Although this parameter is marked as optional, the request must contain either a
ContactFlowIdor a field of typeQUICK_CONNECT. -
self_assign_flow_id(Optional[ContactFlowId], default:None) –The ContactFlowId for the flow that will be run if this template is used to create a self-assigned task.
-
constraints(Optional[TaskTemplateConstraints], default:None) –Constraints that are applicable to the fields listed. Although this parameter is marked as optional in the API model, the service requires it when calling
CreateTaskTemplateorUpdateTaskTemplate. TheRequiredFieldsarray must contain at least one element, and the field of typeNAMEmust be included inRequiredFields. -
defaults(Optional[TaskTemplateDefaults], default:None) –The default values for fields when a task is created by referencing this template.
-
status(Optional[TaskTemplateStatus], default:None) –Marks a template as
ACTIVEorINACTIVEfor a task to refer to it. Tasks can only be created fromACTIVEtemplates. If a template is marked asINACTIVE, then a task that refers to this template cannot be created. -
fields(TaskTemplateFields) –Fields that are part of the template.
The request must contain exactly one field of type
NAME. This field must also be listed in theRequiredFieldsarray within theConstraintsparameter. -
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
Raises:
-
InternalServiceException–Request processing failed because of an error or failure with the service.
-
InvalidParameterException–One or more of the specified parameters are not valid.
-
PropertyValidationException–The property is not valid.
-
ResourceNotFoundException–The specified resource was not found.
-
ServiceQuotaExceededException–The service quota has been exceeded.
-
ThrottlingException–The throttling limit has been exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_connect/_services/connect.py
5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 | |