Jump to Content

New API Documentation - Developer Preview Available

We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.

Class ListSegmentsCommandProtected

Returns a list of audience segments that you have created in your account in this Region.

Example

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

import { EvidentlyClient, ListSegmentsCommand } from "@aws-sdk/client-evidently"; // ES Modules import
// const { EvidentlyClient, ListSegmentsCommand } = require("@aws-sdk/client-evidently"); // CommonJS import
const client = new EvidentlyClient(config);
const input = { // ListSegmentsRequest
maxResults: Number("int"),
nextToken: "STRING_VALUE",
};
const command = new ListSegmentsCommand(input);
const response = await client.send(command);
// { // ListSegmentsResponse
// segments: [ // SegmentList
// { // Segment
// arn: "STRING_VALUE", // required
// name: "STRING_VALUE", // required
// pattern: "STRING_VALUE", // required
// createdTime: new Date("TIMESTAMP"), // required
// lastUpdatedTime: new Date("TIMESTAMP"), // required
// description: "STRING_VALUE",
// experimentCount: Number("long"),
// launchCount: Number("long"),
// tags: { // TagMap
// "<keys>": "STRING_VALUE",
// },
// },
// ],
// nextToken: "STRING_VALUE",
// };

Param

ListSegmentsCommandInput

Returns

ListSegmentsCommandOutput

See

Throws

AccessDeniedException (client fault)

You do not have sufficient permissions to perform this action.

Throws

ThrottlingException (client fault)

The request was denied because of request throttling. Retry the request.

Throws

ValidationException (client fault)

The value of a parameter in the request caused an error.

Throws

EvidentlyServiceException

Base exception class for all service exceptions from Evidently service.

Hierarchy

Constructors

Properties

middlewareStack: MiddlewareStack<ListSegmentsCommandInput, ListSegmentsCommandOutput>

Methods