UpdateTaskTemplate
Updates details about a specific task template in the specified Amazon Connect instance. This operation does not support partial updates. Instead it does a full update of template content.
Request Syntax
POST /instance/InstanceId/task/template/TaskTemplateId HTTP/1.1
Content-type: application/json
{
   "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",
   "SelfAssignFlowId": "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
 - TaskTemplateId
 - 
               
A unique identifier for the task template.
Length Constraints: Minimum length of 1. Maximum length of 500.
Required: Yes
 
Request Body
The request accepts the following data in JSON format.
- 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: No
 - Name
 - 
               
The name of the task template.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Required: No
 - SelfAssignFlowId
 - 
               
The ContactFlowId for the flow that will be run if this template is used to create a self-assigned task.
Type: String
Length Constraints: Maximum length of 500.
Required: No
 - Status
 - 
               
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.Type: String
Valid Values:
ACTIVE | INACTIVERequired: No
 
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
   "Arn": "string",
   "Constraints": { 
      "InvisibleFields": [ 
         { 
            "Id": { 
               "Name": "string"
            }
         }
      ],
      "ReadOnlyFields": [ 
         { 
            "Id": { 
               "Name": "string"
            }
         }
      ],
      "RequiredFields": [ 
         { 
            "Id": { 
               "Name": "string"
            }
         }
      ]
   },
   "ContactFlowId": "string",
   "CreatedTime": number,
   "Defaults": { 
      "DefaultFieldValues": [ 
         { 
            "DefaultValue": "string",
            "Id": { 
               "Name": "string"
            }
         }
      ]
   },
   "Description": "string",
   "Fields": [ 
      { 
         "Description": "string",
         "Id": { 
            "Name": "string"
         },
         "SingleSelectOptions": [ "string" ],
         "Type": "string"
      }
   ],
   "Id": "string",
   "InstanceId": "string",
   "LastModifiedTime": number,
   "Name": "string",
   "SelfAssignFlowId": "string",
   "Status": "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.
- Arn
 - 
               
The Amazon Resource Name (ARN) for the task template resource.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 500.
 - Constraints
 - 
               
Constraints that are applicable to the fields listed.
Type: TaskTemplateConstraints object
 - 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.
 - CreatedTime
 - 
               
The timestamp when the task template was created.
Type: Timestamp
 - Defaults
 - 
               
The default values for fields when a task is created by referencing this template.
Type: TaskTemplateDefaults object
 - Description
 - 
               
The description of the task template.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
 - Fields
 - 
               
Fields that are part of the template.
Type: Array of TaskTemplateField objects
 - Id
 - 
               
The identifier of the task template resource.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 500.
 - InstanceId
 - 
               
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
 - LastModifiedTime
 - 
               
The timestamp when the task template was last modified.
Type: Timestamp
 - Name
 - 
               
The name of the task template.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
 - SelfAssignFlowId
 - 
               
The ContactFlowId for the flow that will be run if this template is used to create a self-assigned task.
Type: String
Length Constraints: Maximum length of 500.
 - Status
 - 
               
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.Type: String
Valid Values:
ACTIVE | INACTIVE 
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.
- Message
 - 
                        
The message.
 
HTTP Status Code: 500
 - InvalidParameterException
 - 
               
One or more of the specified parameters are not valid.
- Message
 - 
                        
The message about the parameters.
 
HTTP Status Code: 400
 - PropertyValidationException
 - 
               
The property is not valid.
HTTP Status Code: 400
 - ResourceNotFoundException
 - 
               
The specified resource was not found.
- Message
 - 
                        
The message about the resource.
 
HTTP Status Code: 404
 - ServiceQuotaExceededException
 - 
               
The service quota has been exceeded.
- Reason
 - 
                        
The reason for the exception.
 
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: