CreateTaskTemplate
Creates a new task template in the specified Amazon Connect instance.
Request Syntax
PUT /instance/InstanceId
/task/template HTTP/1.1
Content-type: application/json
{
"ClientToken": "string
",
"Constraints": {
"InvisibleFields": [
{
"Id": {
"Name": "string
"
}
}
],
"ReadOnlyFields": [
{
"Id": {
"Name": "string
"
}
}
],
"RequiredFields": [
{
"Id": {
"Name": "string
"
}
}
]
},
"ContactFlowId": "string
",
"Defaults": {
"DefaultFieldValues": [
{
"DefaultValue": "string
",
"Id": {
"Name": "string
"
}
}
]
},
"Description": "string
",
"Fields": [
{
"Description": "string
",
"Id": {
"Name": "string
"
},
"SingleSelectOptions": [ "string
" ],
"Type": "string
"
}
],
"Name": "string
",
"Status": "string
"
}
URI Request Parameters
The request uses the following URI parameters.
- InstanceId
-
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
Length Constraints: Minimum length of 1. Maximum length of 100.
Required: Yes
Request Body
The request accepts the following data in JSON format.
- ClientToken
-
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the AWS SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs
. Type: String
Length Constraints: Maximum length of 500.
Required: No
- Constraints
-
Constraints that are applicable to the fields listed.
Type: TaskTemplateConstraints object
Required: No
- ContactFlowId
-
The identifier of the flow that runs by default when a task is created by referencing this template.
Type: String
Length Constraints: Maximum length of 500.
Required: No
- Defaults
-
The default values for fields when a task is created by referencing this template.
Type: TaskTemplateDefaults object
Required: No
- Description
-
The description of the task template.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- Fields
-
Fields that are part of the template.
Type: Array of TaskTemplateField objects
Required: Yes
- Name
-
The name of the task template.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Required: Yes
- Status
-
Marks a template as
ACTIVE
orINACTIVE
for a task to refer to it. Tasks can only be created fromACTIVE
templates. If a template is marked asINACTIVE
, then a task that refers to this template cannot be created.Type: String
Valid Values:
ACTIVE | INACTIVE
Required: No
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"Arn": "string",
"Id": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalServiceException
-
Request processing failed because of an error or failure with the service.
HTTP Status Code: 500
- InvalidParameterException
-
One or more of the specified parameters are not valid.
HTTP Status Code: 400
- PropertyValidationException
-
The property is not valid.
HTTP Status Code: 400
- ResourceNotFoundException
-
The specified resource was not found.
HTTP Status Code: 404
- ServiceQuotaExceededException
-
The service quota has been exceeded.
HTTP Status Code: 402
- ThrottlingException
-
The throttling limit has been exceeded.
HTTP Status Code: 429
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: