create_task_template
async
¶
create_task_template(
instance_id: InstanceId,
name: TaskTemplateName,
fields: TaskTemplateFields,
*,
config_overrides: Optional[AsyncConnectClientConfig] = 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/async_connect.py
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 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 | |