- 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.
ListEnvironmentsCommand
Lists the Amazon Managed Workflows for Apache Airflow (MWAA) environments.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { MWAAClient, ListEnvironmentsCommand } from "@aws-sdk/client-mwaa"; // ES Modules import
// const { MWAAClient, ListEnvironmentsCommand } = require("@aws-sdk/client-mwaa"); // CommonJS import
const client = new MWAAClient(config);
const input = { // ListEnvironmentsInput
NextToken: "STRING_VALUE",
MaxResults: Number("int"),
};
const command = new ListEnvironmentsCommand(input);
const response = await client.send(command);
// { // ListEnvironmentsOutput
// Environments: [ // EnvironmentList // required
// "STRING_VALUE",
// ],
// NextToken: "STRING_VALUE",
// };
ListEnvironmentsCommand Input
See ListEnvironmentsCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
MaxResults | number | undefined | The maximum number of results to retrieve per page. For example, |
NextToken | string | undefined | Retrieves the next page of the results. |
ListEnvironmentsCommand Output
See ListEnvironmentsCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Environments Required | string[] | undefined | Returns a list of Amazon MWAA environments. |
NextToken | string | undefined | Retrieves the next page of the results. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerException | server | InternalServerException: An internal error has occurred. |
ValidationException | client | ValidationException: The provided input is not valid. |
MWAAServiceException | Base exception class for all service exceptions from MWAA service. |