- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
UpdateTemplateCommand
Updates the attributes of an existing template. The template attributes that can be modified include name
, description
, layoutConfiguration
, requiredFields
, and status
. At least one of these attributes must not be null. If a null value is provided for a given attribute, that attribute is ignored and its current value is preserved.
Other template APIs are:
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ConnectCasesClient, UpdateTemplateCommand } from "@aws-sdk/client-connectcases"; // ES Modules import
// const { ConnectCasesClient, UpdateTemplateCommand } = require("@aws-sdk/client-connectcases"); // CommonJS import
const client = new ConnectCasesClient(config);
const input = { // UpdateTemplateRequest
domainId: "STRING_VALUE", // required
templateId: "STRING_VALUE", // required
name: "STRING_VALUE",
description: "STRING_VALUE",
layoutConfiguration: { // LayoutConfiguration
defaultLayout: "STRING_VALUE",
},
requiredFields: [ // RequiredFieldList
{ // RequiredField
fieldId: "STRING_VALUE", // required
},
],
status: "STRING_VALUE",
rules: [ // TemplateCaseRuleList
{ // TemplateRule
caseRuleId: "STRING_VALUE", // required
fieldId: "STRING_VALUE", // required
},
],
};
const command = new UpdateTemplateCommand(input);
const response = await client.send(command);
// {};
UpdateTemplateCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
domainId Required | string | undefined | The unique identifier of the Cases domain. |
templateId Required | string | undefined | A unique identifier for the template. |
description | string | undefined | A brief description of the template. |
layoutConfiguration | LayoutConfiguration | undefined | Configuration of layouts associated to the template. |
name | string | undefined | The name of the template. It must be unique per domain. |
requiredFields | RequiredField[] | undefined | A list of fields that must contain a value for a case to be successfully created with this template. |
rules | TemplateRule[] | undefined | A list of case rules (also known as case field conditions ) on a template. |
status | TemplateStatus | undefined | The status of the template. |
UpdateTemplateCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You do not have sufficient access to perform this action. |
ConflictException | client | The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. See the accompanying error message for details. |
InternalServerException | server | We couldn't process your request because of an issue with the server. Try again later. |
ResourceNotFoundException | client | We couldn't find the requested resource. Check that your resources exists and were created in the same Amazon Web Services Region as your request, and try your request again. |
ThrottlingException | client | The rate has been exceeded for this API. Please try again after a few minutes. |
ValidationException | client | The request isn't valid. Check the syntax and try again. |
ConnectCasesServiceException | Base exception class for all service exceptions from ConnectCases service. |