ListFieldOptionsCommand

Lists all of the field options for a field identifier in the domain.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ConnectCasesClient, ListFieldOptionsCommand } from "@aws-sdk/client-connectcases"; // ES Modules import
// const { ConnectCasesClient, ListFieldOptionsCommand } = require("@aws-sdk/client-connectcases"); // CommonJS import
const client = new ConnectCasesClient(config);
const input = { // ListFieldOptionsRequest
  domainId: "STRING_VALUE", // required
  fieldId: "STRING_VALUE", // required
  maxResults: Number("int"),
  nextToken: "STRING_VALUE",
  values: [ // ValuesList
    "STRING_VALUE",
  ],
};
const command = new ListFieldOptionsCommand(input);
const response = await client.send(command);
// { // ListFieldOptionsResponse
//   options: [ // FieldOptionsList // required
//     { // FieldOption
//       name: "STRING_VALUE", // required
//       value: "STRING_VALUE", // required
//       active: true || false, // required
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListFieldOptionsCommand Input

See ListFieldOptionsCommandInput for more details

Parameter
Type
Description
domainId
Required
string | undefined

The unique identifier of the Cases domain.

fieldId
Required
string | undefined

The unique identifier of a field.

maxResults
number | undefined

The maximum number of results to return per page.

nextToken
string | undefined

The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

values
string[] | undefined

A list of FieldOption values to filter on for ListFieldOptions.

ListFieldOptionsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
options
Required
FieldOption[] | undefined

A list of FieldOption objects.

nextToken
string | undefined

The token for the next set of results. This is null if there are no more results to return.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

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.