- 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.
CreateCliTokenCommand
Creates a CLI token for the Airflow CLI. To learn more, see Creating an Apache Airflow CLI token .
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { MWAAClient, CreateCliTokenCommand } from "@aws-sdk/client-mwaa"; // ES Modules import
// const { MWAAClient, CreateCliTokenCommand } = require("@aws-sdk/client-mwaa"); // CommonJS import
const client = new MWAAClient(config);
const input = { // CreateCliTokenRequest
Name: "STRING_VALUE", // required
};
const command = new CreateCliTokenCommand(input);
const response = await client.send(command);
// { // CreateCliTokenResponse
// CliToken: "STRING_VALUE",
// WebServerHostname: "STRING_VALUE",
// };
CreateCliTokenCommand Input
See CreateCliTokenCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
Name Required | string | undefined | The name of the Amazon MWAA environment. For example, |
CreateCliTokenCommand Output
See CreateCliTokenCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
CliToken | string | undefined | An Airflow CLI login token. |
WebServerHostname | string | undefined | The Airflow web server hostname for the environment. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ResourceNotFoundException | client | ResourceNotFoundException: The resource is not available. |
MWAAServiceException | Base exception class for all service exceptions from MWAA service. |