- 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.
CreateLayoutCommand
Creates a layout in the Cases domain. Layouts define the following configuration in the top section and More Info tab of the Cases user interface:
-
Fields to display to the users
-
Field ordering
Title and Status fields cannot be part of layouts since they are not configurable.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ConnectCasesClient, CreateLayoutCommand } from "@aws-sdk/client-connectcases"; // ES Modules import
// const { ConnectCasesClient, CreateLayoutCommand } = require("@aws-sdk/client-connectcases"); // CommonJS import
const client = new ConnectCasesClient(config);
const input = { // CreateLayoutRequest
domainId: "STRING_VALUE", // required
name: "STRING_VALUE", // required
content: { // LayoutContent Union: only one key present
basic: { // BasicLayout
topPanel: { // LayoutSections
sections: [ // SectionsList
{ // Section Union: only one key present
fieldGroup: { // FieldGroup
name: "STRING_VALUE",
fields: [ // FieldList // required
{ // FieldItem
id: "STRING_VALUE", // required
},
],
},
},
],
},
moreInfo: {
sections: [
{// Union: only one key present
fieldGroup: {
name: "STRING_VALUE",
fields: [ // required
{
id: "STRING_VALUE", // required
},
],
},
},
],
},
},
},
};
const command = new CreateLayoutCommand(input);
const response = await client.send(command);
// { // CreateLayoutResponse
// layoutId: "STRING_VALUE", // required
// layoutArn: "STRING_VALUE", // required
// };
CreateLayoutCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
content Required | LayoutContent | undefined | Information about which fields will be present in the layout, and information about the order of the fields. |
domainId Required | string | undefined | The unique identifier of the Cases domain. |
name Required | string | undefined | The name of the layout. It must be unique for the Cases domain. |
CreateLayoutCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
layoutArn Required | string | undefined | The Amazon Resource Name (ARN) of the newly created layout. |
layoutId Required | string | undefined | The unique identifier of the layout. |
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. |
ServiceQuotaExceededException | client | The service quota has been exceeded. For a list of service quotas, see Amazon Connect Service Quotas in the Amazon Connect Administrator Guide. |
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. |