ListSourceLocationsCommand

Lists the source locations for a channel. A source location defines the host server URL, and contains a list of sources.

Example Syntax

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

import { MediaTailorClient, ListSourceLocationsCommand } from "@aws-sdk/client-mediatailor"; // ES Modules import
// const { MediaTailorClient, ListSourceLocationsCommand } = require("@aws-sdk/client-mediatailor"); // CommonJS import
const client = new MediaTailorClient(config);
const input = { // ListSourceLocationsRequest
  MaxResults: Number("int"),
  NextToken: "STRING_VALUE",
};
const command = new ListSourceLocationsCommand(input);
const response = await client.send(command);
// { // ListSourceLocationsResponse
//   Items: [ // __listOfSourceLocation
//     { // SourceLocation
//       AccessConfiguration: { // AccessConfiguration
//         AccessType: "S3_SIGV4" || "SECRETS_MANAGER_ACCESS_TOKEN" || "AUTODETECT_SIGV4",
//         SecretsManagerAccessTokenConfiguration: { // SecretsManagerAccessTokenConfiguration
//           HeaderName: "STRING_VALUE",
//           SecretArn: "STRING_VALUE",
//           SecretStringKey: "STRING_VALUE",
//         },
//       },
//       Arn: "STRING_VALUE", // required
//       CreationTime: new Date("TIMESTAMP"),
//       DefaultSegmentDeliveryConfiguration: { // DefaultSegmentDeliveryConfiguration
//         BaseUrl: "STRING_VALUE",
//       },
//       HttpConfiguration: { // HttpConfiguration
//         BaseUrl: "STRING_VALUE", // required
//       },
//       LastModifiedTime: new Date("TIMESTAMP"),
//       SegmentDeliveryConfigurations: [ // __listOfSegmentDeliveryConfiguration
//         { // SegmentDeliveryConfiguration
//           BaseUrl: "STRING_VALUE",
//           Name: "STRING_VALUE",
//         },
//       ],
//       SourceLocationName: "STRING_VALUE", // required
//       Tags: { // __mapOf__string
//         "<keys>": "STRING_VALUE",
//       },
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListSourceLocationsCommand Input

See ListSourceLocationsCommandInput for more details

Parameter
Type
Description
MaxResults
number | undefined

The maximum number of source locations that you want MediaTailor to return in response to the current request. If there are more than MaxResults source locations, use the value of NextToken in the response to get the next page of results.

NextToken
string | undefined

Pagination token returned by the list request when results exceed the maximum allowed. Use the token to fetch the next page of results.

ListSourceLocationsCommand Output

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

A list of source locations.

NextToken
string | undefined

Pagination token returned by the list request when results exceed the maximum allowed. Use the token to fetch the next page of results.

Throws

Name
Fault
Details
MediaTailorServiceException
Base exception class for all service exceptions from MediaTailor service.