

# Actions
<a name="API_Operations"></a>

The following actions are supported:
+  [CreateCliToken](API_CreateCliToken.md) 
+  [CreateEnvironment](API_CreateEnvironment.md) 
+  [CreateWebLoginToken](API_CreateWebLoginToken.md) 
+  [DeleteEnvironment](API_DeleteEnvironment.md) 
+  [GetEnvironment](API_GetEnvironment.md) 
+  [InvokeRestApi](API_InvokeRestApi.md) 
+  [ListEnvironments](API_ListEnvironments.md) 
+  [ListTagsForResource](API_ListTagsForResource.md) 
+  [PublishMetrics](API_PublishMetrics.md) 
+  [TagResource](API_TagResource.md) 
+  [UntagResource](API_UntagResource.md) 
+  [UpdateEnvironment](API_UpdateEnvironment.md) 

# CreateCliToken
<a name="API_CreateCliToken"></a>

Creates a CLI token for the Airflow CLI. To learn more, see [Creating an Apache Airflow CLI token](https://docs.aws.amazon.com/mwaa/latest/userguide/call-mwaa-apis-cli.html).

## Request Syntax
<a name="API_CreateCliToken_RequestSyntax"></a>

```
POST /clitoken/Name HTTP/1.1
```

## URI Request Parameters
<a name="API_CreateCliToken_RequestParameters"></a>

The request uses the following URI parameters.

 ** [Name](#API_CreateCliToken_RequestSyntax) **   <a name="mwaa-CreateCliToken-request-uri-Name"></a>
The name of the Amazon MWAA environment. For example, `MyMWAAEnvironment`.  
Length Constraints: Minimum length of 1. Maximum length of 80.  
Pattern: `[a-zA-Z][0-9a-zA-Z-_]*`   
Required: Yes

## Request Body
<a name="API_CreateCliToken_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_CreateCliToken_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "CliToken": "string",
   "WebServerHostname": "string"
}
```

## Response Elements
<a name="API_CreateCliToken_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [CliToken](#API_CreateCliToken_ResponseSyntax) **   <a name="mwaa-CreateCliToken-response-CliToken"></a>
An Airflow CLI login token.  
Type: String

 ** [WebServerHostname](#API_CreateCliToken_ResponseSyntax) **   <a name="mwaa-CreateCliToken-response-WebServerHostname"></a>
The Airflow web server hostname for the environment.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 255.  
Pattern: `(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])` 

## Errors
<a name="API_CreateCliToken_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** ResourceNotFoundException **   
ResourceNotFoundException: The resource is not available.  
HTTP Status Code: 404

## See Also
<a name="API_CreateCliToken_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/mwaa-2020-07-01/CreateCliToken) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/mwaa-2020-07-01/CreateCliToken) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/mwaa-2020-07-01/CreateCliToken) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/mwaa-2020-07-01/CreateCliToken) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/mwaa-2020-07-01/CreateCliToken) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/mwaa-2020-07-01/CreateCliToken) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/mwaa-2020-07-01/CreateCliToken) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/mwaa-2020-07-01/CreateCliToken) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/mwaa-2020-07-01/CreateCliToken) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/mwaa-2020-07-01/CreateCliToken) 

# CreateEnvironment
<a name="API_CreateEnvironment"></a>

Creates an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.

## Request Syntax
<a name="API_CreateEnvironment_RequestSyntax"></a>

```
PUT /environments/Name HTTP/1.1
Content-type: application/json

{
   "AirflowConfigurationOptions": { 
      "string" : "string" 
   },
   "AirflowVersion": "string",
   "DagS3Path": "string",
   "EndpointManagement": "string",
   "EnvironmentClass": "string",
   "ExecutionRoleArn": "string",
   "KmsKey": "string",
   "LoggingConfiguration": { 
      "DagProcessingLogs": { 
         "Enabled": boolean,
         "LogLevel": "string"
      },
      "SchedulerLogs": { 
         "Enabled": boolean,
         "LogLevel": "string"
      },
      "TaskLogs": { 
         "Enabled": boolean,
         "LogLevel": "string"
      },
      "WebserverLogs": { 
         "Enabled": boolean,
         "LogLevel": "string"
      },
      "WorkerLogs": { 
         "Enabled": boolean,
         "LogLevel": "string"
      }
   },
   "MaxWebservers": number,
   "MaxWorkers": number,
   "MinWebservers": number,
   "MinWorkers": number,
   "NetworkConfiguration": { 
      "SecurityGroupIds": [ "string" ],
      "SubnetIds": [ "string" ]
   },
   "PluginsS3ObjectVersion": "string",
   "PluginsS3Path": "string",
   "RequirementsS3ObjectVersion": "string",
   "RequirementsS3Path": "string",
   "Schedulers": number,
   "SourceBucketArn": "string",
   "StartupScriptS3ObjectVersion": "string",
   "StartupScriptS3Path": "string",
   "Tags": { 
      "string" : "string" 
   },
   "WebserverAccessMode": "string",
   "WeeklyMaintenanceWindowStart": "string"
}
```

## URI Request Parameters
<a name="API_CreateEnvironment_RequestParameters"></a>

The request uses the following URI parameters.

 ** [Name](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-uri-Name"></a>
The name of the Amazon MWAA environment. For example, `MyMWAAEnvironment`.  
Length Constraints: Minimum length of 1. Maximum length of 80.  
Pattern: `[a-zA-Z][0-9a-zA-Z-_]*`   
Required: Yes

## Request Body
<a name="API_CreateEnvironment_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [AirflowConfigurationOptions](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-AirflowConfigurationOptions"></a>
A list of key-value pairs containing the Apache Airflow configuration options you want to attach to your environment. For more information, refer to [Apache Airflow configuration options](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html).  
Type: String to string map  
Key Length Constraints: Minimum length of 1. Maximum length of 64.  
Key Pattern: `[a-z]+([a-z0-9._]*[a-z0-9_]+)?`   
Value Length Constraints: Minimum length of 1. Maximum length of 65536.  
Value Pattern: `[ -~]+`   
Required: No

 ** [AirflowVersion](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-AirflowVersion"></a>
The Apache Airflow version for your environment. If no value is specified, it defaults to the latest version. For more information, refer to [Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA)](https://docs.aws.amazon.com/mwaa/latest/userguide/airflow-versions.html).  
Valid values: `2.4.3`, `2.5.1`, `2.6.3`, `2.7.2`, `2.8.1`, `2.9.2`, `2.10.1`, `2.10.3`, and `3.0.6`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 32.  
Pattern: `[0-9a-z.]+`   
Required: No

 ** [DagS3Path](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-DagS3Path"></a>
The relative path to the DAGs folder on your Amazon S3 bucket. For example, `dags`. For more information, refer to [Adding or updating DAGs](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-folder.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: `.*`   
Required: Yes

 ** [EndpointManagement](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-EndpointManagement"></a>
Defines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA. If set to `SERVICE`, Amazon MWAA will create and manage the required VPC endpoints in your VPC. If set to `CUSTOMER`, you must create, and manage, the VPC endpoints for your VPC. If you choose to create an environment in a shared VPC, you must set this value to `CUSTOMER`. In a shared VPC deployment, the environment will remain in `PENDING` status until you create the VPC endpoints. If you do not take action to create the endpoints within 72 hours, the status will change to `CREATE_FAILED`. You can delete the failed environment and create a new one.  
Type: String  
Valid Values: `CUSTOMER | SERVICE`   
Required: No

 ** [EnvironmentClass](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-EnvironmentClass"></a>
The environment class type. Valid values: `mw1.micro`, `mw1.small`, `mw1.medium`, `mw1.large`, `mw1.xlarge`, and `mw1.2xlarge`. For more information, refer to [Amazon MWAA environment class](https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Required: No

 ** [ExecutionRoleArn](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-ExecutionRoleArn"></a>
The Amazon Resource Name (ARN) of the execution role for your environment. An execution role is an AWS Identity and Access Management (IAM) role that grants MWAA permission to access AWS services and resources used by your environment. For example, `arn:aws:iam::123456789:role/my-execution-role`. For more information, refer to [Amazon MWAA Execution role](https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1224.  
Pattern: `arn:aws(-[a-z]+)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+`   
Required: Yes

 ** [KmsKey](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-KmsKey"></a>
The AWS Key Management Service (KMS) key to encrypt the data in your environment. You can use an AWS owned CMK, or a Customer managed CMK (advanced). For more information, refer to [Create an Amazon MWAA environment](https://docs.aws.amazon.com/mwaa/latest/userguide/create-environment.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1224.  
Pattern: `(((arn:aws(-[a-z]+)?:kms:[a-z]{2}-[a-z]+-\d:\d+:)?key\/)?[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}|(arn:aws(-[a-z]+)?:kms:[a-z]{2}-[a-z]+-\d:\d+:)?alias/.+)`   
Required: No

 ** [LoggingConfiguration](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-LoggingConfiguration"></a>
Defines the Apache Airflow logs to send to CloudWatch Logs.  
Type: [LoggingConfigurationInput](API_LoggingConfigurationInput.md) object  
Required: No

 ** [MaxWebservers](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-MaxWebservers"></a>
 The maximum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for `MaxWebservers` when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. For example, in scenarios where your workload requires network calls to the Apache Airflow REST API with a high transaction-per-second (TPS) rate, Amazon MWAA will increase the number of web servers up to the number set in `MaxWebserers`. As TPS rates decrease Amazon MWAA disposes of the additional web servers, and scales down to the number set in `MinxWebserers`.   
Valid values: For environments larger than mw1.micro, accepts values from `2` to `5`. Defaults to `2` for all environment sizes except mw1.micro, which defaults to `1`.  
Type: Integer  
Valid Range: Minimum value of 1.  
Required: No

 ** [MaxWorkers](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-MaxWorkers"></a>
The maximum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the `MaxWorkers` field. For example, `20`. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the one worker that is included with your environment, or the number you specify in `MinWorkers`.  
Type: Integer  
Valid Range: Minimum value of 1.  
Required: No

 ** [MinWebservers](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-MinWebservers"></a>
 The minimum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for `MaxWebservers` when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. As the transaction-per-second rate, and the network load, decrease, Amazon MWAA disposes of the additional web servers, and scales down to the number set in `MinxWebserers`.   
Valid values: For environments larger than mw1.micro, accepts values from `2` to `5`. Defaults to `2` for all environment sizes except mw1.micro, which defaults to `1`.  
Type: Integer  
Valid Range: Minimum value of 1.  
Required: No

 ** [MinWorkers](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-MinWorkers"></a>
The minimum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the `MaxWorkers` field. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the worker count you specify in the `MinWorkers` field. For example, `2`.  
Type: Integer  
Valid Range: Minimum value of 1.  
Required: No

 ** [NetworkConfiguration](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-NetworkConfiguration"></a>
The VPC networking components used to secure and enable network traffic between the AWS resources for your environment. For more information, refer to [About networking on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/networking-about.html).  
Type: [NetworkConfiguration](API_NetworkConfiguration.md) object  
Required: Yes

 ** [PluginsS3ObjectVersion](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-PluginsS3ObjectVersion"></a>
The version of the plugins.zip file on your Amazon S3 bucket. You must specify a version each time a plugins.zip file is updated. For more information, refer to [How S3 Versioning works](https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Required: No

 ** [PluginsS3Path](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-PluginsS3Path"></a>
The relative path to the `plugins.zip` file on your Amazon S3 bucket. For example, `plugins.zip`. If specified, then the `plugins.zip` version is required. For more information, refer to [Installing custom plugins](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: `.*`   
Required: No

 ** [RequirementsS3ObjectVersion](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-RequirementsS3ObjectVersion"></a>
The version of the `requirements.txt` file on your Amazon S3 bucket. You must specify a version each time a requirements.txt file is updated. For more information, refer to [How S3 Versioning works](https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Required: No

 ** [RequirementsS3Path](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-RequirementsS3Path"></a>
The relative path to the `requirements.txt` file on your Amazon S3 bucket. For example, `requirements.txt`. If specified, then a version is required. For more information, refer to [Installing Python dependencies](https://docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: `.*`   
Required: No

 ** [Schedulers](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-Schedulers"></a>
The number of Apache Airflow schedulers to run in your environment. Valid values:  
+ v2 - For environments larger than mw1.micro, accepts values from `2` to `5`. Defaults to `2` for all environment sizes except mw1.micro, which defaults to `1`.
+ v1 - Accepts `1`.
Type: Integer  
Valid Range: Maximum value of 5.  
Required: No

 ** [SourceBucketArn](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-SourceBucketArn"></a>
The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example, `arn:aws:s3:::my-airflow-bucket-unique-name`. For more information, refer to [Create an Amazon S3 bucket for Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-s3-bucket.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1224.  
Pattern: `arn:aws(-[a-z]+)?:s3:::[a-z0-9.\-]+`   
Required: Yes

 ** [StartupScriptS3ObjectVersion](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-StartupScriptS3ObjectVersion"></a>
The version of the startup shell script in your Amazon S3 bucket. You must specify the [version ID](https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html) that Amazon S3 assigns to the file every time you update the script.   
 Version IDs are Unicode, UTF-8 encoded, URL-ready, opaque strings that are no more than 1,024 bytes long. The following is an example:   
 `3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo`   
 For more information, refer to [Using a startup script](https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html).   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Required: No

 ** [StartupScriptS3Path](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-StartupScriptS3Path"></a>
The relative path to the startup shell script in your Amazon S3 bucket. For example, `s3://mwaa-environment/startup.sh`.  
 Amazon MWAA runs the script as your environment starts, and before running the Apache Airflow process. You can use this script to install dependencies, modify Apache Airflow configuration options, and set environment variables. For more information, refer to [Using a startup script](https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html).   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: `.*`   
Required: No

 ** [Tags](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-Tags"></a>
The key-value tag pairs you want to associate to your environment. For example, `"Environment": "Staging"`. For more information, refer to [Tagging AWS resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html).  
Type: String to string map  
Map Entries: Maximum number of 50 items.  
Key Length Constraints: Minimum length of 1. Maximum length of 128.  
Key Pattern: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`   
Value Length Constraints: Minimum length of 1. Maximum length of 256.  
Value Pattern: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`   
Required: No

 ** [WebserverAccessMode](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-WebserverAccessMode"></a>
Defines the access mode for the Apache Airflow *web server*. For more information, refer to [Apache Airflow access modes](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-networking.html).  
Type: String  
Valid Values: `PRIVATE_ONLY | PUBLIC_ONLY`   
Required: No

 ** [WeeklyMaintenanceWindowStart](#API_CreateEnvironment_RequestSyntax) **   <a name="mwaa-CreateEnvironment-request-WeeklyMaintenanceWindowStart"></a>
The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time to start weekly maintenance updates of your environment in the following format: `DAY:HH:MM`. For example: `TUE:03:30`. You can specify a start time in 30 minute increments only.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 9.  
Pattern: `.*(MON|TUE|WED|THU|FRI|SAT|SUN):([01]\d|2[0-3]):(00|30).*`   
Required: No

## Response Syntax
<a name="API_CreateEnvironment_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "Arn": "string"
}
```

## Response Elements
<a name="API_CreateEnvironment_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Arn](#API_CreateEnvironment_ResponseSyntax) **   <a name="mwaa-CreateEnvironment-response-Arn"></a>
The Amazon Resource Name (ARN) returned in the response for the environment.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1224.  
Pattern: `arn:aws(-[a-z]+)?:airflow:[a-z0-9\-]+:\d{12}:environment/\w+.*` 

## Errors
<a name="API_CreateEnvironment_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
InternalServerException: An internal error has occurred.  
HTTP Status Code: 500

 ** ValidationException **   
ValidationException: The provided input is not valid.  
HTTP Status Code: 400

## See Also
<a name="API_CreateEnvironment_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/mwaa-2020-07-01/CreateEnvironment) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/mwaa-2020-07-01/CreateEnvironment) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/mwaa-2020-07-01/CreateEnvironment) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/mwaa-2020-07-01/CreateEnvironment) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/mwaa-2020-07-01/CreateEnvironment) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/mwaa-2020-07-01/CreateEnvironment) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/mwaa-2020-07-01/CreateEnvironment) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/mwaa-2020-07-01/CreateEnvironment) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/mwaa-2020-07-01/CreateEnvironment) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/mwaa-2020-07-01/CreateEnvironment) 

# CreateWebLoginToken
<a name="API_CreateWebLoginToken"></a>

Creates a web login token for the Airflow Web UI. To learn more, see [Creating an Apache Airflow web login token](https://docs.aws.amazon.com/mwaa/latest/userguide/call-mwaa-apis-web.html).

## Request Syntax
<a name="API_CreateWebLoginToken_RequestSyntax"></a>

```
POST /webtoken/Name HTTP/1.1
```

## URI Request Parameters
<a name="API_CreateWebLoginToken_RequestParameters"></a>

The request uses the following URI parameters.

 ** [Name](#API_CreateWebLoginToken_RequestSyntax) **   <a name="mwaa-CreateWebLoginToken-request-uri-Name"></a>
The name of the Amazon MWAA environment. For example, `MyMWAAEnvironment`.  
Length Constraints: Minimum length of 1. Maximum length of 80.  
Pattern: `[a-zA-Z][0-9a-zA-Z-_]*`   
Required: Yes

## Request Body
<a name="API_CreateWebLoginToken_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_CreateWebLoginToken_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "AirflowIdentity": "string",
   "IamIdentity": "string",
   "WebServerHostname": "string",
   "WebToken": "string"
}
```

## Response Elements
<a name="API_CreateWebLoginToken_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [AirflowIdentity](#API_CreateWebLoginToken_ResponseSyntax) **   <a name="mwaa-CreateWebLoginToken-response-AirflowIdentity"></a>
The user name of the Apache Airflow identity creating the web login token.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.

 ** [IamIdentity](#API_CreateWebLoginToken_ResponseSyntax) **   <a name="mwaa-CreateWebLoginToken-response-IamIdentity"></a>
The name of the IAM identity creating the web login token. This might be an IAM user, or an assumed or federated identity. For example, `assumed-role/Admin/your-name`.  
Type: String

 ** [WebServerHostname](#API_CreateWebLoginToken_ResponseSyntax) **   <a name="mwaa-CreateWebLoginToken-response-WebServerHostname"></a>
The Airflow web server hostname for the environment.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 255.  
Pattern: `(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])` 

 ** [WebToken](#API_CreateWebLoginToken_ResponseSyntax) **   <a name="mwaa-CreateWebLoginToken-response-WebToken"></a>
An Airflow web server login token.  
Type: String

## Errors
<a name="API_CreateWebLoginToken_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
Access to the Apache Airflow Web UI or CLI has been denied due to insufficient permissions. To learn more, see [Accessing an Amazon MWAA environment](https://docs.aws.amazon.com/mwaa/latest/userguide/access-policies.html).  
HTTP Status Code: 403

 ** InternalServerException **   
InternalServerException: An internal error has occurred.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
ResourceNotFoundException: The resource is not available.  
HTTP Status Code: 404

 ** ValidationException **   
ValidationException: The provided input is not valid.  
HTTP Status Code: 400

## See Also
<a name="API_CreateWebLoginToken_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/mwaa-2020-07-01/CreateWebLoginToken) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/mwaa-2020-07-01/CreateWebLoginToken) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/mwaa-2020-07-01/CreateWebLoginToken) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/mwaa-2020-07-01/CreateWebLoginToken) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/mwaa-2020-07-01/CreateWebLoginToken) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/mwaa-2020-07-01/CreateWebLoginToken) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/mwaa-2020-07-01/CreateWebLoginToken) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/mwaa-2020-07-01/CreateWebLoginToken) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/mwaa-2020-07-01/CreateWebLoginToken) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/mwaa-2020-07-01/CreateWebLoginToken) 

# DeleteEnvironment
<a name="API_DeleteEnvironment"></a>

Deletes an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.

## Request Syntax
<a name="API_DeleteEnvironment_RequestSyntax"></a>

```
DELETE /environments/Name HTTP/1.1
```

## URI Request Parameters
<a name="API_DeleteEnvironment_RequestParameters"></a>

The request uses the following URI parameters.

 ** [Name](#API_DeleteEnvironment_RequestSyntax) **   <a name="mwaa-DeleteEnvironment-request-uri-Name"></a>
The name of the Amazon MWAA environment. For example, `MyMWAAEnvironment`.  
Length Constraints: Minimum length of 1. Maximum length of 80.  
Pattern: `[a-zA-Z][0-9a-zA-Z-_]*`   
Required: Yes

## Request Body
<a name="API_DeleteEnvironment_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_DeleteEnvironment_ResponseSyntax"></a>

```
HTTP/1.1 200
```

## Response Elements
<a name="API_DeleteEnvironment_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_DeleteEnvironment_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
InternalServerException: An internal error has occurred.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
ResourceNotFoundException: The resource is not available.  
HTTP Status Code: 404

 ** ValidationException **   
ValidationException: The provided input is not valid.  
HTTP Status Code: 400

## See Also
<a name="API_DeleteEnvironment_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/mwaa-2020-07-01/DeleteEnvironment) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/mwaa-2020-07-01/DeleteEnvironment) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/mwaa-2020-07-01/DeleteEnvironment) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/mwaa-2020-07-01/DeleteEnvironment) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/mwaa-2020-07-01/DeleteEnvironment) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/mwaa-2020-07-01/DeleteEnvironment) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/mwaa-2020-07-01/DeleteEnvironment) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/mwaa-2020-07-01/DeleteEnvironment) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/mwaa-2020-07-01/DeleteEnvironment) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/mwaa-2020-07-01/DeleteEnvironment) 

# GetEnvironment
<a name="API_GetEnvironment"></a>

Describes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.

## Request Syntax
<a name="API_GetEnvironment_RequestSyntax"></a>

```
GET /environments/Name HTTP/1.1
```

## URI Request Parameters
<a name="API_GetEnvironment_RequestParameters"></a>

The request uses the following URI parameters.

 ** [Name](#API_GetEnvironment_RequestSyntax) **   <a name="mwaa-GetEnvironment-request-uri-Name"></a>
The name of the Amazon MWAA environment. For example, `MyMWAAEnvironment`.  
Length Constraints: Minimum length of 1. Maximum length of 80.  
Pattern: `[a-zA-Z][0-9a-zA-Z-_]*`   
Required: Yes

## Request Body
<a name="API_GetEnvironment_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_GetEnvironment_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "Environment": { 
      "AirflowConfigurationOptions": { 
         "string" : "string" 
      },
      "AirflowVersion": "string",
      "Arn": "string",
      "CeleryExecutorQueue": "string",
      "CreatedAt": number,
      "DagS3Path": "string",
      "DatabaseVpcEndpointService": "string",
      "EndpointManagement": "string",
      "EnvironmentClass": "string",
      "ExecutionRoleArn": "string",
      "KmsKey": "string",
      "LastUpdate": { 
         "CreatedAt": number,
         "Error": { 
            "ErrorCode": "string",
            "ErrorMessage": "string"
         },
         "Source": "string",
         "Status": "string",
         "WorkerReplacementStrategy": "string"
      },
      "LoggingConfiguration": { 
         "DagProcessingLogs": { 
            "CloudWatchLogGroupArn": "string",
            "Enabled": boolean,
            "LogLevel": "string"
         },
         "SchedulerLogs": { 
            "CloudWatchLogGroupArn": "string",
            "Enabled": boolean,
            "LogLevel": "string"
         },
         "TaskLogs": { 
            "CloudWatchLogGroupArn": "string",
            "Enabled": boolean,
            "LogLevel": "string"
         },
         "WebserverLogs": { 
            "CloudWatchLogGroupArn": "string",
            "Enabled": boolean,
            "LogLevel": "string"
         },
         "WorkerLogs": { 
            "CloudWatchLogGroupArn": "string",
            "Enabled": boolean,
            "LogLevel": "string"
         }
      },
      "MaxWebservers": number,
      "MaxWorkers": number,
      "MinWebservers": number,
      "MinWorkers": number,
      "Name": "string",
      "NetworkConfiguration": { 
         "SecurityGroupIds": [ "string" ],
         "SubnetIds": [ "string" ]
      },
      "PluginsS3ObjectVersion": "string",
      "PluginsS3Path": "string",
      "RequirementsS3ObjectVersion": "string",
      "RequirementsS3Path": "string",
      "Schedulers": number,
      "ServiceRoleArn": "string",
      "SourceBucketArn": "string",
      "StartupScriptS3ObjectVersion": "string",
      "StartupScriptS3Path": "string",
      "Status": "string",
      "Tags": { 
         "string" : "string" 
      },
      "WebserverAccessMode": "string",
      "WebserverUrl": "string",
      "WebserverVpcEndpointService": "string",
      "WeeklyMaintenanceWindowStart": "string"
   }
}
```

## Response Elements
<a name="API_GetEnvironment_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Environment](#API_GetEnvironment_ResponseSyntax) **   <a name="mwaa-GetEnvironment-response-Environment"></a>
An object containing all available details about the environment.  
Type: [Environment](API_Environment.md) object

## Errors
<a name="API_GetEnvironment_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
InternalServerException: An internal error has occurred.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
ResourceNotFoundException: The resource is not available.  
HTTP Status Code: 404

 ** ValidationException **   
ValidationException: The provided input is not valid.  
HTTP Status Code: 400

## See Also
<a name="API_GetEnvironment_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/mwaa-2020-07-01/GetEnvironment) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/mwaa-2020-07-01/GetEnvironment) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/mwaa-2020-07-01/GetEnvironment) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/mwaa-2020-07-01/GetEnvironment) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/mwaa-2020-07-01/GetEnvironment) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/mwaa-2020-07-01/GetEnvironment) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/mwaa-2020-07-01/GetEnvironment) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/mwaa-2020-07-01/GetEnvironment) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/mwaa-2020-07-01/GetEnvironment) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/mwaa-2020-07-01/GetEnvironment) 

# InvokeRestApi
<a name="API_InvokeRestApi"></a>

Invokes the Apache Airflow REST API on the webserver with the specified inputs. To learn more, see [Using the Apache Airflow REST API](https://docs.aws.amazon.com/mwaa/latest/userguide/access-mwaa-apache-airflow-rest-api.html) 

## Request Syntax
<a name="API_InvokeRestApi_RequestSyntax"></a>

```
POST /restapi/Name HTTP/1.1
Content-type: application/json

{
   "Body": JSON value,
   "Method": "string",
   "Path": "string",
   "QueryParameters": JSON value
}
```

## URI Request Parameters
<a name="API_InvokeRestApi_RequestParameters"></a>

The request uses the following URI parameters.

 ** [Name](#API_InvokeRestApi_RequestSyntax) **   <a name="mwaa-InvokeRestApi-request-uri-Name"></a>
The name of the Amazon MWAA environment. For example, `MyMWAAEnvironment`.  
Length Constraints: Minimum length of 1. Maximum length of 80.  
Pattern: `[a-zA-Z][0-9a-zA-Z-_]*`   
Required: Yes

## Request Body
<a name="API_InvokeRestApi_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [Body](#API_InvokeRestApi_RequestSyntax) **   <a name="mwaa-InvokeRestApi-request-Body"></a>
The request body for the Apache Airflow REST API call, provided as a JSON object.  
Type: JSON value  
Required: No

 ** [Method](#API_InvokeRestApi_RequestSyntax) **   <a name="mwaa-InvokeRestApi-request-Method"></a>
The HTTP method used for making Airflow REST API calls. For example, `POST`.   
Type: String  
Valid Values: `GET | PUT | POST | PATCH | DELETE`   
Required: Yes

 ** [Path](#API_InvokeRestApi_RequestSyntax) **   <a name="mwaa-InvokeRestApi-request-Path"></a>
The Apache Airflow REST API endpoint path to be called. For example, `/dags/123456/clearTaskInstances`. For more information, see [Apache Airflow API](https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html)   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Required: Yes

 ** [QueryParameters](#API_InvokeRestApi_RequestSyntax) **   <a name="mwaa-InvokeRestApi-request-QueryParameters"></a>
Query parameters to be included in the Apache Airflow REST API call, provided as a JSON object.   
Type: JSON value  
Required: No

## Response Syntax
<a name="API_InvokeRestApi_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "RestApiResponse": JSON value,
   "RestApiStatusCode": number
}
```

## Response Elements
<a name="API_InvokeRestApi_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [RestApiResponse](#API_InvokeRestApi_ResponseSyntax) **   <a name="mwaa-InvokeRestApi-response-RestApiResponse"></a>
The response data from the Apache Airflow REST API call, provided as a JSON object.  
Type: JSON value

 ** [RestApiStatusCode](#API_InvokeRestApi_ResponseSyntax) **   <a name="mwaa-InvokeRestApi-response-RestApiStatusCode"></a>
The HTTP status code returned by the Apache Airflow REST API call.  
Type: Integer

## Errors
<a name="API_InvokeRestApi_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** AccessDeniedException **   
Access to the Apache Airflow Web UI or CLI has been denied due to insufficient permissions. To learn more, see [Accessing an Amazon MWAA environment](https://docs.aws.amazon.com/mwaa/latest/userguide/access-policies.html).  
HTTP Status Code: 403

 ** InternalServerException **   
InternalServerException: An internal error has occurred.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
ResourceNotFoundException: The resource is not available.  
HTTP Status Code: 404

 ** RestApiClientException **   
An exception indicating that a client-side error occurred during the Apache Airflow REST API call.    
 ** RestApiResponse **   
The error response data from the Apache Airflow REST API call, provided as a JSON object.  
 ** RestApiStatusCode **   
The HTTP status code returned by the Apache Airflow REST API call.
HTTP Status Code: 400

 ** RestApiServerException **   
An exception indicating that a server-side error occurred during the Apache Airflow REST API call.    
 ** RestApiResponse **   
The error response data from the Apache Airflow REST API call, provided as a JSON object.  
 ** RestApiStatusCode **   
The HTTP status code returned by the Apache Airflow REST API call.
HTTP Status Code: 400

 ** ValidationException **   
ValidationException: The provided input is not valid.  
HTTP Status Code: 400

## Examples
<a name="API_InvokeRestApi_Examples"></a>

### Example
<a name="API_InvokeRestApi_Example_1"></a>

This example illustrates one usage of InvokeRestApi.

#### Sample Request
<a name="API_InvokeRestApi_Example_1_Request"></a>

```
{
      "name": "MyEnvironment",
      "path": "/dags",
      "method": "GET"
}
```

### Example
<a name="API_InvokeRestApi_Example_2"></a>

This example illustrates one usage of InvokeRestApi.

#### Sample Response
<a name="API_InvokeRestApi_Example_2_Response"></a>

```
{
      "restApiResponse": {"dags":[],"total_entries":0},
      "restApiStatusCode": 200,
}
```

## See Also
<a name="API_InvokeRestApi_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/mwaa-2020-07-01/InvokeRestApi) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/mwaa-2020-07-01/InvokeRestApi) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/mwaa-2020-07-01/InvokeRestApi) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/mwaa-2020-07-01/InvokeRestApi) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/mwaa-2020-07-01/InvokeRestApi) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/mwaa-2020-07-01/InvokeRestApi) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/mwaa-2020-07-01/InvokeRestApi) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/mwaa-2020-07-01/InvokeRestApi) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/mwaa-2020-07-01/InvokeRestApi) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/mwaa-2020-07-01/InvokeRestApi) 

# ListEnvironments
<a name="API_ListEnvironments"></a>

Lists the Amazon Managed Workflows for Apache Airflow (MWAA) environments.

## Request Syntax
<a name="API_ListEnvironments_RequestSyntax"></a>

```
GET /environments?MaxResults=MaxResults&NextToken=NextToken HTTP/1.1
```

## URI Request Parameters
<a name="API_ListEnvironments_RequestParameters"></a>

The request uses the following URI parameters.

 ** [MaxResults](#API_ListEnvironments_RequestSyntax) **   <a name="mwaa-ListEnvironments-request-uri-MaxResults"></a>
The maximum number of results to retrieve per page. For example, `5` environments per page.  
Valid Range: Minimum value of 1. Maximum value of 25.

 ** [NextToken](#API_ListEnvironments_RequestSyntax) **   <a name="mwaa-ListEnvironments-request-uri-NextToken"></a>
Retrieves the next page of the results.  
Length Constraints: Minimum length of 0. Maximum length of 2048.

## Request Body
<a name="API_ListEnvironments_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_ListEnvironments_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "Environments": [ "string" ],
   "NextToken": "string"
}
```

## Response Elements
<a name="API_ListEnvironments_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Environments](#API_ListEnvironments_ResponseSyntax) **   <a name="mwaa-ListEnvironments-response-Environments"></a>
Returns a list of Amazon MWAA environments.  
Type: Array of strings  
Length Constraints: Minimum length of 1. Maximum length of 80.  
Pattern: `[a-zA-Z][0-9a-zA-Z-_]*` 

 ** [NextToken](#API_ListEnvironments_ResponseSyntax) **   <a name="mwaa-ListEnvironments-response-NextToken"></a>
Retrieves the next page of the results.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 2048.

## Errors
<a name="API_ListEnvironments_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
InternalServerException: An internal error has occurred.  
HTTP Status Code: 500

 ** ValidationException **   
ValidationException: The provided input is not valid.  
HTTP Status Code: 400

## See Also
<a name="API_ListEnvironments_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/mwaa-2020-07-01/ListEnvironments) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/mwaa-2020-07-01/ListEnvironments) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/mwaa-2020-07-01/ListEnvironments) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/mwaa-2020-07-01/ListEnvironments) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/mwaa-2020-07-01/ListEnvironments) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/mwaa-2020-07-01/ListEnvironments) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/mwaa-2020-07-01/ListEnvironments) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/mwaa-2020-07-01/ListEnvironments) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/mwaa-2020-07-01/ListEnvironments) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/mwaa-2020-07-01/ListEnvironments) 

# ListTagsForResource
<a name="API_ListTagsForResource"></a>

Lists the key-value tag pairs associated to the Amazon Managed Workflows for Apache Airflow (MWAA) environment. For example, `"Environment": "Staging"`. 

## Request Syntax
<a name="API_ListTagsForResource_RequestSyntax"></a>

```
GET /tags/ResourceArn HTTP/1.1
```

## URI Request Parameters
<a name="API_ListTagsForResource_RequestParameters"></a>

The request uses the following URI parameters.

 ** [ResourceArn](#API_ListTagsForResource_RequestSyntax) **   <a name="mwaa-ListTagsForResource-request-uri-ResourceArn"></a>
The Amazon Resource Name (ARN) of the Amazon MWAA environment. For example, `arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment`.  
Length Constraints: Minimum length of 1. Maximum length of 1224.  
Pattern: `arn:aws(-[a-z]+)?:airflow:[a-z0-9\-]+:\d{12}:environment/\w+.*`   
Required: Yes

## Request Body
<a name="API_ListTagsForResource_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_ListTagsForResource_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "Tags": { 
      "string" : "string" 
   }
}
```

## Response Elements
<a name="API_ListTagsForResource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Tags](#API_ListTagsForResource_ResponseSyntax) **   <a name="mwaa-ListTagsForResource-response-Tags"></a>
The key-value tag pairs associated to your environment. For more information, refer to [Tagging AWS resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html).  
Type: String to string map  
Map Entries: Maximum number of 50 items.  
Key Length Constraints: Minimum length of 1. Maximum length of 128.  
Key Pattern: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`   
Value Length Constraints: Minimum length of 1. Maximum length of 256.  
Value Pattern: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)` 

## Errors
<a name="API_ListTagsForResource_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
InternalServerException: An internal error has occurred.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
ResourceNotFoundException: The resource is not available.  
HTTP Status Code: 404

 ** ValidationException **   
ValidationException: The provided input is not valid.  
HTTP Status Code: 400

## See Also
<a name="API_ListTagsForResource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/mwaa-2020-07-01/ListTagsForResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/mwaa-2020-07-01/ListTagsForResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/mwaa-2020-07-01/ListTagsForResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/mwaa-2020-07-01/ListTagsForResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/mwaa-2020-07-01/ListTagsForResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/mwaa-2020-07-01/ListTagsForResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/mwaa-2020-07-01/ListTagsForResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/mwaa-2020-07-01/ListTagsForResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/mwaa-2020-07-01/ListTagsForResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/mwaa-2020-07-01/ListTagsForResource) 

# PublishMetrics
<a name="API_PublishMetrics"></a>

 *This action has been deprecated.* 

 **Internal only**. Publishes environment health metrics to Amazon CloudWatch.

## Request Syntax
<a name="API_PublishMetrics_RequestSyntax"></a>

```
POST /metrics/environments/EnvironmentName HTTP/1.1
Content-type: application/json

{
   "MetricData": [ 
      { 
         "Dimensions": [ 
            { 
               "Name": "string",
               "Value": "string"
            }
         ],
         "MetricName": "string",
         "StatisticValues": { 
            "Maximum": number,
            "Minimum": number,
            "SampleCount": number,
            "Sum": number
         },
         "Timestamp": number,
         "Unit": "string",
         "Value": number
      }
   ]
}
```

## URI Request Parameters
<a name="API_PublishMetrics_RequestParameters"></a>

The request uses the following URI parameters.

 ** [EnvironmentName](#API_PublishMetrics_RequestSyntax) **   <a name="mwaa-PublishMetrics-request-uri-EnvironmentName"></a>
 **Internal only**. The name of the environment.  
Length Constraints: Minimum length of 1. Maximum length of 80.  
Pattern: `[a-zA-Z][0-9a-zA-Z-_]*`   
Required: Yes

## Request Body
<a name="API_PublishMetrics_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [MetricData](#API_PublishMetrics_RequestSyntax) **   <a name="mwaa-PublishMetrics-request-MetricData"></a>
 *This parameter has been deprecated.*   
 **Internal only**. Publishes metrics to Amazon CloudWatch. To learn more about the metrics published to Amazon CloudWatch, see [Amazon MWAA performance metrics in Amazon CloudWatch](https://docs.aws.amazon.com/mwaa/latest/userguide/cw-metrics.html).  
Type: Array of [MetricDatum](API_MetricDatum.md) objects  
Required: Yes

## Response Syntax
<a name="API_PublishMetrics_ResponseSyntax"></a>

```
HTTP/1.1 200
```

## Response Elements
<a name="API_PublishMetrics_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_PublishMetrics_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
InternalServerException: An internal error has occurred.  
HTTP Status Code: 500

 ** ValidationException **   
ValidationException: The provided input is not valid.  
HTTP Status Code: 400

## See Also
<a name="API_PublishMetrics_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/mwaa-2020-07-01/PublishMetrics) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/mwaa-2020-07-01/PublishMetrics) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/mwaa-2020-07-01/PublishMetrics) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/mwaa-2020-07-01/PublishMetrics) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/mwaa-2020-07-01/PublishMetrics) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/mwaa-2020-07-01/PublishMetrics) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/mwaa-2020-07-01/PublishMetrics) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/mwaa-2020-07-01/PublishMetrics) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/mwaa-2020-07-01/PublishMetrics) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/mwaa-2020-07-01/PublishMetrics) 

# TagResource
<a name="API_TagResource"></a>

Associates key-value tag pairs to your Amazon Managed Workflows for Apache Airflow (MWAA) environment. 

## Request Syntax
<a name="API_TagResource_RequestSyntax"></a>

```
POST /tags/ResourceArn HTTP/1.1
Content-type: application/json

{
   "Tags": { 
      "string" : "string" 
   }
}
```

## URI Request Parameters
<a name="API_TagResource_RequestParameters"></a>

The request uses the following URI parameters.

 ** [ResourceArn](#API_TagResource_RequestSyntax) **   <a name="mwaa-TagResource-request-uri-ResourceArn"></a>
The Amazon Resource Name (ARN) of the Amazon MWAA environment. For example, `arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment`.  
Length Constraints: Minimum length of 1. Maximum length of 1224.  
Pattern: `arn:aws(-[a-z]+)?:airflow:[a-z0-9\-]+:\d{12}:environment/\w+.*`   
Required: Yes

## Request Body
<a name="API_TagResource_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [Tags](#API_TagResource_RequestSyntax) **   <a name="mwaa-TagResource-request-Tags"></a>
The key-value tag pairs you want to associate to your environment. For example, `"Environment": "Staging"`. For more information, refer to [Tagging AWS resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html).  
Type: String to string map  
Map Entries: Maximum number of 50 items.  
Key Length Constraints: Minimum length of 1. Maximum length of 128.  
Key Pattern: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`   
Value Length Constraints: Minimum length of 1. Maximum length of 256.  
Value Pattern: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`   
Required: Yes

## Response Syntax
<a name="API_TagResource_ResponseSyntax"></a>

```
HTTP/1.1 200
```

## Response Elements
<a name="API_TagResource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_TagResource_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
InternalServerException: An internal error has occurred.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
ResourceNotFoundException: The resource is not available.  
HTTP Status Code: 404

 ** ValidationException **   
ValidationException: The provided input is not valid.  
HTTP Status Code: 400

## See Also
<a name="API_TagResource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/mwaa-2020-07-01/TagResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/mwaa-2020-07-01/TagResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/mwaa-2020-07-01/TagResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/mwaa-2020-07-01/TagResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/mwaa-2020-07-01/TagResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/mwaa-2020-07-01/TagResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/mwaa-2020-07-01/TagResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/mwaa-2020-07-01/TagResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/mwaa-2020-07-01/TagResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/mwaa-2020-07-01/TagResource) 

# UntagResource
<a name="API_UntagResource"></a>

Removes key-value tag pairs associated to your Amazon Managed Workflows for Apache Airflow (MWAA) environment. For example, `"Environment": "Staging"`.

## Request Syntax
<a name="API_UntagResource_RequestSyntax"></a>

```
DELETE /tags/ResourceArn?tagKeys=tagKeys HTTP/1.1
```

## URI Request Parameters
<a name="API_UntagResource_RequestParameters"></a>

The request uses the following URI parameters.

 ** [ResourceArn](#API_UntagResource_RequestSyntax) **   <a name="mwaa-UntagResource-request-uri-ResourceArn"></a>
The Amazon Resource Name (ARN) of the Amazon MWAA environment. For example, `arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment`.  
Length Constraints: Minimum length of 1. Maximum length of 1224.  
Pattern: `arn:aws(-[a-z]+)?:airflow:[a-z0-9\-]+:\d{12}:environment/\w+.*`   
Required: Yes

 ** [tagKeys](#API_UntagResource_RequestSyntax) **   <a name="mwaa-UntagResource-request-uri-tagKeys"></a>
The key-value tag pair you want to remove. For example, `"Environment": "Staging"`.   
Array Members: Minimum number of 0 items. Maximum number of 50 items.  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`   
Required: Yes

## Request Body
<a name="API_UntagResource_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_UntagResource_ResponseSyntax"></a>

```
HTTP/1.1 200
```

## Response Elements
<a name="API_UntagResource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_UntagResource_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
InternalServerException: An internal error has occurred.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
ResourceNotFoundException: The resource is not available.  
HTTP Status Code: 404

 ** ValidationException **   
ValidationException: The provided input is not valid.  
HTTP Status Code: 400

## See Also
<a name="API_UntagResource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/mwaa-2020-07-01/UntagResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/mwaa-2020-07-01/UntagResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/mwaa-2020-07-01/UntagResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/mwaa-2020-07-01/UntagResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/mwaa-2020-07-01/UntagResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/mwaa-2020-07-01/UntagResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/mwaa-2020-07-01/UntagResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/mwaa-2020-07-01/UntagResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/mwaa-2020-07-01/UntagResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/mwaa-2020-07-01/UntagResource) 

# UpdateEnvironment
<a name="API_UpdateEnvironment"></a>

Updates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.

## Request Syntax
<a name="API_UpdateEnvironment_RequestSyntax"></a>

```
PATCH /environments/Name HTTP/1.1
Content-type: application/json

{
   "AirflowConfigurationOptions": { 
      "string" : "string" 
   },
   "AirflowVersion": "string",
   "DagS3Path": "string",
   "EnvironmentClass": "string",
   "ExecutionRoleArn": "string",
   "LoggingConfiguration": { 
      "DagProcessingLogs": { 
         "Enabled": boolean,
         "LogLevel": "string"
      },
      "SchedulerLogs": { 
         "Enabled": boolean,
         "LogLevel": "string"
      },
      "TaskLogs": { 
         "Enabled": boolean,
         "LogLevel": "string"
      },
      "WebserverLogs": { 
         "Enabled": boolean,
         "LogLevel": "string"
      },
      "WorkerLogs": { 
         "Enabled": boolean,
         "LogLevel": "string"
      }
   },
   "MaxWebservers": number,
   "MaxWorkers": number,
   "MinWebservers": number,
   "MinWorkers": number,
   "NetworkConfiguration": { 
      "SecurityGroupIds": [ "string" ]
   },
   "PluginsS3ObjectVersion": "string",
   "PluginsS3Path": "string",
   "RequirementsS3ObjectVersion": "string",
   "RequirementsS3Path": "string",
   "Schedulers": number,
   "SourceBucketArn": "string",
   "StartupScriptS3ObjectVersion": "string",
   "StartupScriptS3Path": "string",
   "WebserverAccessMode": "string",
   "WeeklyMaintenanceWindowStart": "string",
   "WorkerReplacementStrategy": "string"
}
```

## URI Request Parameters
<a name="API_UpdateEnvironment_RequestParameters"></a>

The request uses the following URI parameters.

 ** [Name](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-uri-Name"></a>
The name of your Amazon MWAA environment. For example, `MyMWAAEnvironment`.  
Length Constraints: Minimum length of 1. Maximum length of 80.  
Pattern: `[a-zA-Z][0-9a-zA-Z-_]*`   
Required: Yes

## Request Body
<a name="API_UpdateEnvironment_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [AirflowConfigurationOptions](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-AirflowConfigurationOptions"></a>
A list of key-value pairs containing the Apache Airflow configuration options you want to attach to your environment. For more information, refer to [Apache Airflow configuration options](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html).  
Type: String to string map  
Key Length Constraints: Minimum length of 1. Maximum length of 64.  
Key Pattern: `[a-z]+([a-z0-9._]*[a-z0-9_]+)?`   
Value Length Constraints: Minimum length of 1. Maximum length of 65536.  
Value Pattern: `[ -~]+`   
Required: No

 ** [AirflowVersion](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-AirflowVersion"></a>
The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA. To downgrade your environment, specify an older version of Apache Airflow supported by Amazon MWAA.  
Before you upgrade or downgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating your resources, see [Upgrading and downgrading an Amazon MWAA environment](https://docs.aws.amazon.com/mwaa/latest/userguide/upgrading-environment.html).  
Valid values: `2.4.3`, `2.5.1`, `2.6.3`, `2.7.2`, `2.8.1`, `2.9.2`, `2.10.1`, `2.10.3`, and `3.0.6`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 32.  
Pattern: `[0-9a-z.]+`   
Required: No

 ** [DagS3Path](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-DagS3Path"></a>
The relative path to the DAGs folder on your Amazon S3 bucket. For example, `dags`. For more information, refer to [Adding or updating DAGs](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-folder.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: `.*`   
Required: No

 ** [EnvironmentClass](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-EnvironmentClass"></a>
The environment class type. Valid values: `mw1.micro`, `mw1.small`, `mw1.medium`, `mw1.large`, `mw1.xlarge`, and `mw1.2xlarge`. For more information, refer to [Amazon MWAA environment class](https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html).   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Required: No

 ** [ExecutionRoleArn](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-ExecutionRoleArn"></a>
The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access AWS resources in your environment. For example, `arn:aws:iam::123456789:role/my-execution-role`. For more information, refer to [Amazon MWAA Execution role](https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1224.  
Pattern: `arn:aws(-[a-z]+)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+`   
Required: No

 ** [LoggingConfiguration](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-LoggingConfiguration"></a>
The Apache Airflow log types to send to CloudWatch Logs.  
Type: [LoggingConfigurationInput](API_LoggingConfigurationInput.md) object  
Required: No

 ** [MaxWebservers](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-MaxWebservers"></a>
 The maximum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for `MaxWebservers` when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. For example, in scenarios where your workload requires network calls to the Apache Airflow REST API with a high transaction-per-second (TPS) rate, Amazon MWAA will increase the number of web servers up to the number set in `MaxWebserers`. As TPS rates decrease Amazon MWAA disposes of the additional web servers, and scales down to the number set in `MinxWebserers`.   
Valid values: For environments larger than mw1.micro, accepts values from `2` to `5`. Defaults to `2` for all environment sizes except mw1.micro, which defaults to `1`.  
Type: Integer  
Valid Range: Minimum value of 1.  
Required: No

 ** [MaxWorkers](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-MaxWorkers"></a>
The maximum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the `MaxWorkers` field. For example, `20`. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the one worker that is included with your environment, or the number you specify in `MinWorkers`.  
Type: Integer  
Valid Range: Minimum value of 1.  
Required: No

 ** [MinWebservers](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-MinWebservers"></a>
 The minimum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for `MaxWebservers` when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. As the transaction-per-second rate, and the network load, decrease, Amazon MWAA disposes of the additional web servers, and scales down to the number set in `MinxWebserers`.   
Valid values: For environments larger than mw1.micro, accepts values from `2` to `5`. Defaults to `2` for all environment sizes except mw1.micro, which defaults to `1`.  
Type: Integer  
Valid Range: Minimum value of 1.  
Required: No

 ** [MinWorkers](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-MinWorkers"></a>
The minimum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the `MaxWorkers` field. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the worker count you specify in the `MinWorkers` field. For example, `2`.  
Type: Integer  
Valid Range: Minimum value of 1.  
Required: No

 ** [NetworkConfiguration](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-NetworkConfiguration"></a>
The VPC networking components used to secure and enable network traffic between the AWS resources for your environment. For more information, refer to [About networking on Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/networking-about.html).  
Type: [UpdateNetworkConfigurationInput](API_UpdateNetworkConfigurationInput.md) object  
Required: No

 ** [PluginsS3ObjectVersion](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-PluginsS3ObjectVersion"></a>
The version of the plugins.zip file on your Amazon S3 bucket. You must specify a version each time a `plugins.zip` file is updated. For more information, refer to [How S3 Versioning works](https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Required: No

 ** [PluginsS3Path](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-PluginsS3Path"></a>
The relative path to the `plugins.zip` file on your Amazon S3 bucket. For example, `plugins.zip`. If specified, then the plugins.zip version is required. For more information, refer to [Installing custom plugins](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: `.*`   
Required: No

 ** [RequirementsS3ObjectVersion](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-RequirementsS3ObjectVersion"></a>
The version of the requirements.txt file on your Amazon S3 bucket. You must specify a version each time a `requirements.txt` file is updated. For more information, refer to [How S3 Versioning works](https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Required: No

 ** [RequirementsS3Path](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-RequirementsS3Path"></a>
The relative path to the `requirements.txt` file on your Amazon S3 bucket. For example, `requirements.txt`. If specified, then a file version is required. For more information, refer to [Installing Python dependencies](https://docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: `.*`   
Required: No

 ** [Schedulers](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-Schedulers"></a>
The number of Apache Airflow schedulers to run in your Amazon MWAA environment.  
Type: Integer  
Valid Range: Maximum value of 5.  
Required: No

 ** [SourceBucketArn](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-SourceBucketArn"></a>
The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example, `arn:aws:s3:::my-airflow-bucket-unique-name`. For more information, refer to [Create an Amazon S3 bucket for Amazon MWAA](https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-s3-bucket.html).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1224.  
Pattern: `arn:aws(-[a-z]+)?:s3:::[a-z0-9.\-]+`   
Required: No

 ** [StartupScriptS3ObjectVersion](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-StartupScriptS3ObjectVersion"></a>
 The version of the startup shell script in your Amazon S3 bucket. You must specify the [version ID](https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html) that Amazon S3 assigns to the file every time you update the script.   
 Version IDs are Unicode, UTF-8 encoded, URL-ready, opaque strings that are no more than 1,024 bytes long. The following is an example:   
 `3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo`   
 For more information, refer to [Using a startup script](https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html).   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Required: No

 ** [StartupScriptS3Path](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-StartupScriptS3Path"></a>
The relative path to the startup shell script in your Amazon S3 bucket. For example, `s3://mwaa-environment/startup.sh`.  
 Amazon MWAA runs the script as your environment starts, and before running the Apache Airflow process. You can use this script to install dependencies, modify Apache Airflow configuration options, and set environment variables. For more information, refer to [Using a startup script](https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html).   
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1024.  
Pattern: `.*`   
Required: No

 ** [WebserverAccessMode](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-WebserverAccessMode"></a>
The Apache Airflow *Web server* access mode. For more information, refer to [Apache Airflow access modes](https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-networking.html).  
Type: String  
Valid Values: `PRIVATE_ONLY | PUBLIC_ONLY`   
Required: No

 ** [WeeklyMaintenanceWindowStart](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-WeeklyMaintenanceWindowStart"></a>
The day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time to start weekly maintenance updates of your environment in the following format: `DAY:HH:MM`. For example: `TUE:03:30`. You can specify a start time in 30 minute increments only.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 9.  
Pattern: `.*(MON|TUE|WED|THU|FRI|SAT|SUN):([01]\d|2[0-3]):(00|30).*`   
Required: No

 ** [WorkerReplacementStrategy](#API_UpdateEnvironment_RequestSyntax) **   <a name="mwaa-UpdateEnvironment-request-WorkerReplacementStrategy"></a>
The worker replacement strategy to use when updating the environment.  
You can select one of the following strategies:  
+  **Forced -** Stops and replaces Apache Airflow workers without waiting for tasks to complete before an update.
+  **Graceful -** Allows Apache Airflow workers to complete running tasks for up to 12 hours during an update before they're stopped and replaced.
Type: String  
Valid Values: `FORCED | GRACEFUL`   
Required: No

## Response Syntax
<a name="API_UpdateEnvironment_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "Arn": "string"
}
```

## Response Elements
<a name="API_UpdateEnvironment_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [Arn](#API_UpdateEnvironment_ResponseSyntax) **   <a name="mwaa-UpdateEnvironment-response-Arn"></a>
The Amazon Resource Name (ARN) of the Amazon MWAA environment. For example, `arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment`.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 1224.  
Pattern: `arn:aws(-[a-z]+)?:airflow:[a-z0-9\-]+:\d{12}:environment/\w+.*` 

## Errors
<a name="API_UpdateEnvironment_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InternalServerException **   
InternalServerException: An internal error has occurred.  
HTTP Status Code: 500

 ** ResourceNotFoundException **   
ResourceNotFoundException: The resource is not available.  
HTTP Status Code: 404

 ** ValidationException **   
ValidationException: The provided input is not valid.  
HTTP Status Code: 400

## See Also
<a name="API_UpdateEnvironment_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/mwaa-2020-07-01/UpdateEnvironment) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/mwaa-2020-07-01/UpdateEnvironment) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/mwaa-2020-07-01/UpdateEnvironment) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/mwaa-2020-07-01/UpdateEnvironment) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/mwaa-2020-07-01/UpdateEnvironment) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/mwaa-2020-07-01/UpdateEnvironment) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/mwaa-2020-07-01/UpdateEnvironment) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/mwaa-2020-07-01/UpdateEnvironment) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/mwaa-2020-07-01/UpdateEnvironment) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/mwaa-2020-07-01/UpdateEnvironment) 