ListCompositionsCommand

Gets summary information about all Compositions in your account, in the AWS region where the API request is processed.

Example Syntax

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

import { IVSRealTimeClient, ListCompositionsCommand } from "@aws-sdk/client-ivs-realtime"; // ES Modules import
// const { IVSRealTimeClient, ListCompositionsCommand } = require("@aws-sdk/client-ivs-realtime"); // CommonJS import
const client = new IVSRealTimeClient(config);
const input = { // ListCompositionsRequest
  filterByStageArn: "STRING_VALUE",
  filterByEncoderConfigurationArn: "STRING_VALUE",
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
};
const command = new ListCompositionsCommand(input);
const response = await client.send(command);
// { // ListCompositionsResponse
//   compositions: [ // CompositionSummaryList // required
//     { // CompositionSummary
//       arn: "STRING_VALUE", // required
//       stageArn: "STRING_VALUE", // required
//       destinations: [ // DestinationSummaryList // required
//         { // DestinationSummary
//           id: "STRING_VALUE", // required
//           state: "STRING_VALUE", // required
//           startTime: new Date("TIMESTAMP"),
//           endTime: new Date("TIMESTAMP"),
//         },
//       ],
//       state: "STRING_VALUE", // required
//       tags: { // Tags
//         "<keys>": "STRING_VALUE",
//       },
//       startTime: new Date("TIMESTAMP"),
//       endTime: new Date("TIMESTAMP"),
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListCompositionsCommand Input

See ListCompositionsCommandInput for more details

Parameter
Type
Description
filterByEncoderConfigurationArn
string | undefined

Filters the Composition list to match the specified EncoderConfiguration attached to at least one of its output.

filterByStageArn
string | undefined

Filters the Composition list to match the specified Stage ARN.

maxResults
number | undefined

Maximum number of results to return. Default: 100.

nextToken
string | undefined

The first Composition to retrieve. This is used for pagination; see the nextToken response field.

ListCompositionsCommand Output

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

List of the matching Compositions (summary information only).

nextToken
string | undefined

If there are more compositions than maxResults, use nextToken in the request to get the next set.

Throws

Name
Fault
Details
AccessDeniedException
client
<p/>
ConflictException
client
<p/>
InternalServerException
server
<p/>
ServiceQuotaExceededException
client
<p/>
ValidationException
client
<p/>
IVSRealTimeServiceException
Base exception class for all service exceptions from IVSRealTime service.