- 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.
ListExperimentsCommand
Lists your experiments.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { FisClient, ListExperimentsCommand } from "@aws-sdk/client-fis"; // ES Modules import
// const { FisClient, ListExperimentsCommand } = require("@aws-sdk/client-fis"); // CommonJS import
const client = new FisClient(config);
const input = { // ListExperimentsRequest
maxResults: Number("int"),
nextToken: "STRING_VALUE",
experimentTemplateId: "STRING_VALUE",
};
const command = new ListExperimentsCommand(input);
const response = await client.send(command);
// { // ListExperimentsResponse
// experiments: [ // ExperimentSummaryList
// { // ExperimentSummary
// id: "STRING_VALUE",
// arn: "STRING_VALUE",
// experimentTemplateId: "STRING_VALUE",
// state: { // ExperimentState
// status: "pending" || "initiating" || "running" || "completed" || "stopping" || "stopped" || "failed" || "cancelled",
// reason: "STRING_VALUE",
// error: { // ExperimentError
// accountId: "STRING_VALUE",
// code: "STRING_VALUE",
// location: "STRING_VALUE",
// },
// },
// creationTime: new Date("TIMESTAMP"),
// tags: { // TagMap
// "<keys>": "STRING_VALUE",
// },
// experimentOptions: { // ExperimentOptions
// accountTargeting: "single-account" || "multi-account",
// emptyTargetResolutionMode: "fail" || "skip",
// actionsMode: "skip-all" || "run-all",
// },
// },
// ],
// nextToken: "STRING_VALUE",
// };
ListExperimentsCommand Input
See ListExperimentsCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
experimentTemplateId | string | undefined | The ID of the experiment template. |
maxResults | number | undefined | The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned |
nextToken | string | undefined | The token for the next page of results. |
ListExperimentsCommand Output
See ListExperimentsCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
experiments | ExperimentSummary[] | undefined | The experiments. |
nextToken | string | undefined | The token to use to retrieve the next page of results. This value is |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ValidationException | client | The specified input is not valid, or fails to satisfy the constraints for the request. |
FisServiceException | Base exception class for all service exceptions from Fis service. |