Table of Contents
MWAA.
Client
¶A low-level client representing AmazonMWAA
This section contains the Amazon Managed Workflows for Apache Airflow (MWAA) API reference documentation. For more information, see What Is Amazon MWAA? .
client = session.create_client('mwaa')
These are the available methods:
can_paginate
(operation_name)¶Check if an operation can be paginated.
operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo
, and you’d normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.
True
if the operation can be paginated,
False
otherwise.
create_cli_token
(**kwargs)¶Create a CLI token to use Airflow CLI.
See also: AWS API Documentation
Request Syntax
response = client.create_cli_token(
Name='string'
)
Name (string) –
[REQUIRED]
Create a CLI token request for a MWAA environment.
dict
Response Syntax
{
'CliToken': 'string',
'WebServerHostname': 'string'
}
Response Structure
(dict) –
CliToken (string) –
Create an Airflow CLI login token response for the provided JWT token.
WebServerHostname (string) –
Create an Airflow CLI login token response for the provided webserver hostname.
Exceptions
create_environment
(**kwargs)¶JSON blob that describes the environment to create.
See also: AWS API Documentation
Request Syntax
response = client.create_environment(
AirflowConfigurationOptions={
'string': 'string'
},
AirflowVersion='string',
DagS3Path='string',
EnvironmentClass='string',
ExecutionRoleArn='string',
KmsKey='string',
LoggingConfiguration={
'DagProcessingLogs': {
'Enabled': True|False,
'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
},
'SchedulerLogs': {
'Enabled': True|False,
'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
},
'TaskLogs': {
'Enabled': True|False,
'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
},
'WebserverLogs': {
'Enabled': True|False,
'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
},
'WorkerLogs': {
'Enabled': True|False,
'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
}
},
MaxWorkers=123,
Name='string',
NetworkConfiguration={
'SecurityGroupIds': [
'string',
],
'SubnetIds': [
'string',
]
},
PluginsS3ObjectVersion='string',
PluginsS3Path='string',
RequirementsS3ObjectVersion='string',
RequirementsS3Path='string',
SourceBucketArn='string',
Tags={
'string': 'string'
},
WebserverAccessMode='PRIVATE_ONLY'|'PUBLIC_ONLY',
WeeklyMaintenanceWindowStart='string'
)
AirflowConfigurationOptions (dict) –
The Apache Airflow configuration setting you want to override in your environment. For more information, see Environment configuration .
(string) –
(string) –
AirflowVersion (string) – The Apache Airflow version you want to use for your environment.
DagS3Path (string) –
[REQUIRED]
The relative path to the DAG folder on your Amazon S3 storage bucket. For example, dags
. For more information, see Importing DAGs on Amazon MWAA .
EnvironmentClass (string) – The environment class you want to use for your environment. The environment class determines the size of the containers and database used for your Apache Airflow services.
ExecutionRoleArn (string) –
[REQUIRED]
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, see Managing access to Amazon Managed Workflows for Apache Airflow .
KmsKey (string) – The AWS Key Management Service (KMS) key to encrypt and decrypt the data in your environment. You can use an AWS KMS key managed by MWAA, or a custom KMS key (advanced). For more information, see Customer master keys (CMKs) in the AWS KMS developer guide.
LoggingConfiguration (dict) –
The Apache Airflow logs you want to send to Amazon CloudWatch Logs.
DagProcessingLogs (dict) –
A JSON blob that provides configuration to use for logging with respect to the various Apache Airflow services: DagProcessingLogs, SchedulerLogs, TaskLogs, WebserverLogs, and WorkerLogs.
Enabled (boolean) – [REQUIRED]
Defines that the logging module is enabled.
LogLevel (string) – [REQUIRED]
Defines the log level, which can be CRITICAL, ERROR, WARNING, or INFO.
SchedulerLogs (dict) –
A JSON blob that provides configuration to use for logging with respect to the various Apache Airflow services: DagProcessingLogs, SchedulerLogs, TaskLogs, WebserverLogs, and WorkerLogs.
Enabled (boolean) – [REQUIRED]
Defines that the logging module is enabled.
LogLevel (string) – [REQUIRED]
Defines the log level, which can be CRITICAL, ERROR, WARNING, or INFO.
TaskLogs (dict) –
A JSON blob that provides configuration to use for logging with respect to the various Apache Airflow services: DagProcessingLogs, SchedulerLogs, TaskLogs, WebserverLogs, and WorkerLogs.
Enabled (boolean) – [REQUIRED]
Defines that the logging module is enabled.
LogLevel (string) – [REQUIRED]
Defines the log level, which can be CRITICAL, ERROR, WARNING, or INFO.
WebserverLogs (dict) –
A JSON blob that provides configuration to use for logging with respect to the various Apache Airflow services: DagProcessingLogs, SchedulerLogs, TaskLogs, WebserverLogs, and WorkerLogs.
Enabled (boolean) – [REQUIRED]
Defines that the logging module is enabled.
LogLevel (string) – [REQUIRED]
Defines the log level, which can be CRITICAL, ERROR, WARNING, or INFO.
WorkerLogs (dict) –
A JSON blob that provides configuration to use for logging with respect to the various Apache Airflow services: DagProcessingLogs, SchedulerLogs, TaskLogs, WebserverLogs, and WorkerLogs.
Enabled (boolean) – [REQUIRED]
Defines that the logging module is enabled.
LogLevel (string) – [REQUIRED]
Defines the log level, which can be CRITICAL, ERROR, WARNING, or INFO.
MaxWorkers (integer) – The maximum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers and the Fargate containers that run your tasks up to the number you specify in this field. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra containers leaving the one worker that is included with your environment.
Name (string) –
[REQUIRED]
The name of your MWAA environment.
NetworkConfiguration (dict) –
[REQUIRED]
The VPC networking components you want to use for your environment. At least two private subnet identifiers and one VPC security group identifier are required to create an environment. For more information, see Creating the VPC network for a MWAA environment .
SecurityGroupIds (list) –
A JSON list of 1 or more security groups IDs by name, in the same VPC as the subnets.
(string) –
SubnetIds (list) –
Provide a JSON list of 2 subnet IDs by name. These must be private subnets, in the same VPC, in two different availability zones.
(string) –
PluginsS3ObjectVersion (string) – The plugins.zip
file version you want to use.
PluginsS3Path (string) – The relative path to the plugins.zip
file on your Amazon S3 storage bucket. For example, plugins.zip
. If a relative path is provided in the request, then PluginsS3ObjectVersion
is required. For more information, see Importing DAGs on Amazon MWAA .
RequirementsS3ObjectVersion (string) – The requirements.txt
file version you want to use.
RequirementsS3Path (string) – The relative path to the requirements.txt
file on your Amazon S3 storage bucket. For example, requirements.txt
. If a relative path is provided in the request, then RequirementsS3ObjectVersion
is required. For more information, see Importing DAGs on Amazon MWAA .
SourceBucketArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of your Amazon S3 storage bucket. For example, arn:aws:s3:::airflow-mybucketname
.
Tags (dict) –
The metadata tags you want to attach to your environment. For more information, see Tagging AWS resources .
(string) –
(string) –
WebserverAccessMode (string) – The networking access of your Apache Airflow web server. A public network allows your Airflow UI to be accessed over the Internet by users granted access in your IAM policy. A private network limits access of your Airflow UI to users within your VPC. For more information, see Creating the VPC network for a MWAA environment .
WeeklyMaintenanceWindowStart (string) – The day and time you want MWAA to start weekly maintenance updates on your environment.
dict
Response Syntax
{
'Arn': 'string'
}
Response Structure
(dict) –
Arn (string) –
The resulting Amazon MWAA envirnonment ARN.
Exceptions
create_web_login_token
(**kwargs)¶Create a JWT token to be used to login to Airflow Web UI with claims based Authentication.
See also: AWS API Documentation
Request Syntax
response = client.create_web_login_token(
Name='string'
)
Name (string) –
[REQUIRED]
Create an Airflow Web UI login token request for a MWAA environment.
dict
Response Syntax
{
'WebServerHostname': 'string',
'WebToken': 'string'
}
Response Structure
(dict) –
WebServerHostname (string) –
Create an Airflow Web UI login token response for the provided webserver hostname.
WebToken (string) –
Create an Airflow Web UI login token response for the provided JWT token.
Exceptions
delete_environment
(**kwargs)¶Delete an existing environment.
See also: AWS API Documentation
Request Syntax
response = client.delete_environment(
Name='string'
)
Name (string) –
[REQUIRED]
The name of the environment to delete.
dict
Response Syntax
{}
Response Structure
(dict) –
Exceptions
generate_presigned_url
(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
ClientMethod (string) – The client method to presign for
Params (dict) – The parameters normally passed to
ClientMethod
.
ExpiresIn (int) – The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
HttpMethod (string) – The http method to use on the generated url. By default, the http method is whatever is used in the method’s model.
The presigned url
get_environment
(**kwargs)¶Get details of an existing environment.
See also: AWS API Documentation
Request Syntax
response = client.get_environment(
Name='string'
)
Name (string) –
[REQUIRED]
The name of the environment to retrieve.
dict
Response Syntax
{
'Environment': {
'AirflowConfigurationOptions': {
'string': 'string'
},
'AirflowVersion': 'string',
'Arn': 'string',
'CreatedAt': datetime(2015, 1, 1),
'DagS3Path': 'string',
'EnvironmentClass': 'string',
'ExecutionRoleArn': 'string',
'KmsKey': 'string',
'LastUpdate': {
'CreatedAt': datetime(2015, 1, 1),
'Error': {
'ErrorCode': 'string',
'ErrorMessage': 'string'
},
'Status': 'SUCCESS'|'PENDING'|'FAILED'
},
'LoggingConfiguration': {
'DagProcessingLogs': {
'CloudWatchLogGroupArn': 'string',
'Enabled': True|False,
'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
},
'SchedulerLogs': {
'CloudWatchLogGroupArn': 'string',
'Enabled': True|False,
'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
},
'TaskLogs': {
'CloudWatchLogGroupArn': 'string',
'Enabled': True|False,
'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
},
'WebserverLogs': {
'CloudWatchLogGroupArn': 'string',
'Enabled': True|False,
'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
},
'WorkerLogs': {
'CloudWatchLogGroupArn': 'string',
'Enabled': True|False,
'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
}
},
'MaxWorkers': 123,
'Name': 'string',
'NetworkConfiguration': {
'SecurityGroupIds': [
'string',
],
'SubnetIds': [
'string',
]
},
'PluginsS3ObjectVersion': 'string',
'PluginsS3Path': 'string',
'RequirementsS3ObjectVersion': 'string',
'RequirementsS3Path': 'string',
'ServiceRoleArn': 'string',
'SourceBucketArn': 'string',
'Status': 'CREATING'|'CREATE_FAILED'|'AVAILABLE'|'UPDATING'|'DELETING'|'DELETED',
'Tags': {
'string': 'string'
},
'WebserverAccessMode': 'PRIVATE_ONLY'|'PUBLIC_ONLY',
'WebserverUrl': 'string',
'WeeklyMaintenanceWindowStart': 'string'
}
}
Response Structure
(dict) –
Environment (dict) –
A JSON blob with environment details.
AirflowConfigurationOptions (dict) –
The Airflow Configuration Options of the Amazon MWAA Environment.
(string) –
(string) –
AirflowVersion (string) –
The AirflowV ersion of the Amazon MWAA Environment.
Arn (string) –
The ARN of the Amazon MWAA Environment.
CreatedAt (datetime) –
The Created At date of the Amazon MWAA Environment.
DagS3Path (string) –
The Dags S3 Path of the Amazon MWAA Environment.
EnvironmentClass (string) –
The Environment Class (size) of the Amazon MWAA Environment.
ExecutionRoleArn (string) –
The Execution Role ARN of the Amazon MWAA Environment.
KmsKey (string) –
The Kms Key of the Amazon MWAA Environment.
LastUpdate (dict) –
Last update information for the environment.
CreatedAt (datetime) –
Time that last update occurred.
Error (dict) –
Error string of last update, if applicable.
ErrorCode (string) –
Error code of update.
ErrorMessage (string) –
Error message of update.
Status (string) –
Status of last update of SUCCESS, FAILED, CREATING, DELETING.
LoggingConfiguration (dict) –
The Logging Configuration of the Amazon MWAA Environment.
DagProcessingLogs (dict) –
A JSON blob that provides configuration to use for logging with respect to the various Apache Airflow services: DagProcessingLogs, SchedulerLogs, TaskLogs, WebserverLogs, and WorkerLogs.
CloudWatchLogGroupArn (string) –
Provides the ARN for the CloudWatch group where the logs will be published.
Enabled (boolean) –
Defines that the logging module is enabled.
LogLevel (string) –
Defines the log level, which can be CRITICAL, ERROR, WARNING, or INFO.
SchedulerLogs (dict) –
A JSON blob that provides configuration to use for logging with respect to the various Apache Airflow services: DagProcessingLogs, SchedulerLogs, TaskLogs, WebserverLogs, and WorkerLogs.
CloudWatchLogGroupArn (string) –
Provides the ARN for the CloudWatch group where the logs will be published.
Enabled (boolean) –
Defines that the logging module is enabled.
LogLevel (string) –
Defines the log level, which can be CRITICAL, ERROR, WARNING, or INFO.
TaskLogs (dict) –
A JSON blob that provides configuration to use for logging with respect to the various Apache Airflow services: DagProcessingLogs, SchedulerLogs, TaskLogs, WebserverLogs, and WorkerLogs.
CloudWatchLogGroupArn (string) –
Provides the ARN for the CloudWatch group where the logs will be published.
Enabled (boolean) –
Defines that the logging module is enabled.
LogLevel (string) –
Defines the log level, which can be CRITICAL, ERROR, WARNING, or INFO.
WebserverLogs (dict) –
A JSON blob that provides configuration to use for logging with respect to the various Apache Airflow services: DagProcessingLogs, SchedulerLogs, TaskLogs, WebserverLogs, and WorkerLogs.
CloudWatchLogGroupArn (string) –
Provides the ARN for the CloudWatch group where the logs will be published.
Enabled (boolean) –
Defines that the logging module is enabled.
LogLevel (string) –
Defines the log level, which can be CRITICAL, ERROR, WARNING, or INFO.
WorkerLogs (dict) –
A JSON blob that provides configuration to use for logging with respect to the various Apache Airflow services: DagProcessingLogs, SchedulerLogs, TaskLogs, WebserverLogs, and WorkerLogs.
CloudWatchLogGroupArn (string) –
Provides the ARN for the CloudWatch group where the logs will be published.
Enabled (boolean) –
Defines that the logging module is enabled.
LogLevel (string) –
Defines the log level, which can be CRITICAL, ERROR, WARNING, or INFO.
MaxWorkers (integer) –
The Maximum Workers of the Amazon MWAA Environment.
Name (string) –
The name of the Amazon MWAA Environment.
NetworkConfiguration (dict) –
Provide the security group and subnet IDs for the workers and scheduler.
SecurityGroupIds (list) –
A JSON list of 1 or more security groups IDs by name, in the same VPC as the subnets.
(string) –
SubnetIds (list) –
Provide a JSON list of 2 subnet IDs by name. These must be private subnets, in the same VPC, in two different availability zones.
(string) –
PluginsS3ObjectVersion (string) –
The Plugins.zip S3 Object Version of the Amazon MWAA Environment.
PluginsS3Path (string) –
The Plugins.zip S3 Path of the Amazon MWAA Environment.
RequirementsS3ObjectVersion (string) –
The Requirements.txt file S3 Object Version of the Amazon MWAA Environment.
RequirementsS3Path (string) –
The Requirement.txt S3 Path of the Amazon MWAA Environment.
ServiceRoleArn (string) –
The Service Role ARN of the Amazon MWAA Environment.
SourceBucketArn (string) –
The Source S3 Bucket ARN of the Amazon MWAA Environment.
Status (string) –
The status of the Amazon MWAA Environment.
Tags (dict) –
The Tags of the Amazon MWAA Environment.
(string) –
(string) –
WebserverAccessMode (string) –
The Webserver Access Mode of the Amazon MWAA Environment (public or private only).
WebserverUrl (string) –
The Webserver URL of the Amazon MWAA Environment.
WeeklyMaintenanceWindowStart (string) –
The Weekly Maintenance Window Start of the Amazon MWAA Environment.
Exceptions
get_paginator
(operation_name)¶Create a paginator for an operation.
operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo
, and you’d normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.
OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate
method to
check if an operation is pageable.
L{botocore.paginate.Paginator}
A paginator object.
get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
waiter_name (str) – The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
The specified waiter object.
botocore.waiter.Waiter
list_environments
(**kwargs)¶List Amazon MWAA Environments.
See also: AWS API Documentation
Request Syntax
response = client.list_environments(
MaxResults=123,
NextToken='string'
)
MaxResults (integer) – The maximum results when listing MWAA environments.
NextToken (string) – The Next Token when listing MWAA environments.
dict
Response Syntax
{
'Environments': [
'string',
],
'NextToken': 'string'
}
Response Structure
(dict) –
Environments (list) –
The list of Amazon MWAA Environments.
(string) –
NextToken (string) –
The Next Token when listing MWAA environments.
Exceptions
List the tags for MWAA environments.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
ResourceArn='string'
)
ResourceArn (string) –
[REQUIRED]
The ARN of the MWAA environment.
dict
Response Syntax
{
'Tags': {
'string': 'string'
}
}
Response Structure
(dict) –
Tags (dict) –
The tags of the MWAA environments.
(string) –
(string) –
Exceptions
publish_metrics
(**kwargs)¶An operation for publishing metrics from the customers to the Ops plane.
See also: AWS API Documentation
Request Syntax
response = client.publish_metrics(
EnvironmentName='string',
MetricData=[
{
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
],
'MetricName': 'string',
'StatisticValues': {
'Maximum': 123.0,
'Minimum': 123.0,
'SampleCount': 123,
'Sum': 123.0
},
'Timestamp': datetime(2015, 1, 1),
'Unit': 'Seconds'|'Microseconds'|'Milliseconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None',
'Value': 123.0
},
]
)
EnvironmentName (string) –
[REQUIRED]
Publishes environment metric data to Amazon CloudWatch.
MetricData (list) –
[REQUIRED]
Publishes metric data points to Amazon CloudWatch. CloudWatch associates the data points with the specified metrica.
(dict) –
Internal only API.
Dimensions (list) –
Internal only API.
(dict) –
Internal only API.
Name (string) – [REQUIRED]
Internal only API.
Value (string) – [REQUIRED]
Internal only API.
MetricName (string) – [REQUIRED]
Internal only API.
StatisticValues (dict) –
Internal only API.
Maximum (float) –
Internal only API.
Minimum (float) –
Internal only API.
SampleCount (integer) –
Internal only API.
Sum (float) –
Internal only API.
Timestamp (datetime) – [REQUIRED]
Internal only API.
Unit (string) –
Unit
Value (float) –
Internal only API.
dict
Response Syntax
{}
Response Structure
(dict) –
Exceptions
tag_resource
(**kwargs)¶Add tag to the MWAA environments.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
ResourceArn='string',
Tags={
'string': 'string'
}
)
ResourceArn (string) –
[REQUIRED]
The tag resource ARN of the MWAA environments.
Tags (dict) –
[REQUIRED]
The tag resource tag of the MWAA environments.
(string) –
(string) –
dict
Response Syntax
{}
Response Structure
(dict) –
Exceptions
untag_resource
(**kwargs)¶Remove a tag from the MWAA environments.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
ResourceArn='string',
tagKeys=[
'string',
]
)
ResourceArn (string) –
[REQUIRED]
The tag resource ARN of the MWAA environments.
tagKeys (list) –
[REQUIRED]
The tag resource key of the MWAA environments.
(string) –
dict
Response Syntax
{}
Response Structure
(dict) –
Exceptions
update_environment
(**kwargs)¶Update an MWAA environment.
See also: AWS API Documentation
Request Syntax
response = client.update_environment(
AirflowConfigurationOptions={
'string': 'string'
},
AirflowVersion='string',
DagS3Path='string',
EnvironmentClass='string',
ExecutionRoleArn='string',
LoggingConfiguration={
'DagProcessingLogs': {
'Enabled': True|False,
'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
},
'SchedulerLogs': {
'Enabled': True|False,
'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
},
'TaskLogs': {
'Enabled': True|False,
'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
},
'WebserverLogs': {
'Enabled': True|False,
'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
},
'WorkerLogs': {
'Enabled': True|False,
'LogLevel': 'CRITICAL'|'ERROR'|'WARNING'|'INFO'|'DEBUG'
}
},
MaxWorkers=123,
Name='string',
NetworkConfiguration={
'SecurityGroupIds': [
'string',
]
},
PluginsS3ObjectVersion='string',
PluginsS3Path='string',
RequirementsS3ObjectVersion='string',
RequirementsS3Path='string',
SourceBucketArn='string',
WebserverAccessMode='PRIVATE_ONLY'|'PUBLIC_ONLY',
WeeklyMaintenanceWindowStart='string'
)
AirflowConfigurationOptions (dict) –
The Airflow Configuration Options to update of your Amazon MWAA environment.
(string) –
(string) –
AirflowVersion (string) – The Airflow Version to update of your Amazon MWAA environment.
DagS3Path (string) – The Dags folder S3 Path to update of your Amazon MWAA environment.
EnvironmentClass (string) – The Environment Class to update of your Amazon MWAA environment.
ExecutionRoleArn (string) – The Executio Role ARN to update of your Amazon MWAA environment.
LoggingConfiguration (dict) –
The Logging Configuration to update of your Amazon MWAA environment.
DagProcessingLogs (dict) –
A JSON blob that provides configuration to use for logging with respect to the various Apache Airflow services: DagProcessingLogs, SchedulerLogs, TaskLogs, WebserverLogs, and WorkerLogs.
Enabled (boolean) – [REQUIRED]
Defines that the logging module is enabled.
LogLevel (string) – [REQUIRED]
Defines the log level, which can be CRITICAL, ERROR, WARNING, or INFO.
SchedulerLogs (dict) –
A JSON blob that provides configuration to use for logging with respect to the various Apache Airflow services: DagProcessingLogs, SchedulerLogs, TaskLogs, WebserverLogs, and WorkerLogs.
Enabled (boolean) – [REQUIRED]
Defines that the logging module is enabled.
LogLevel (string) – [REQUIRED]
Defines the log level, which can be CRITICAL, ERROR, WARNING, or INFO.
TaskLogs (dict) –
A JSON blob that provides configuration to use for logging with respect to the various Apache Airflow services: DagProcessingLogs, SchedulerLogs, TaskLogs, WebserverLogs, and WorkerLogs.
Enabled (boolean) – [REQUIRED]
Defines that the logging module is enabled.
LogLevel (string) – [REQUIRED]
Defines the log level, which can be CRITICAL, ERROR, WARNING, or INFO.
WebserverLogs (dict) –
A JSON blob that provides configuration to use for logging with respect to the various Apache Airflow services: DagProcessingLogs, SchedulerLogs, TaskLogs, WebserverLogs, and WorkerLogs.
Enabled (boolean) – [REQUIRED]
Defines that the logging module is enabled.
LogLevel (string) – [REQUIRED]
Defines the log level, which can be CRITICAL, ERROR, WARNING, or INFO.
WorkerLogs (dict) –
A JSON blob that provides configuration to use for logging with respect to the various Apache Airflow services: DagProcessingLogs, SchedulerLogs, TaskLogs, WebserverLogs, and WorkerLogs.
Enabled (boolean) – [REQUIRED]
Defines that the logging module is enabled.
LogLevel (string) – [REQUIRED]
Defines the log level, which can be CRITICAL, ERROR, WARNING, or INFO.
MaxWorkers (integer) – The Maximum Workers to update of your Amazon MWAA environment.
Name (string) –
[REQUIRED]
The name of your Amazon MWAA environment that you wish to update.
NetworkConfiguration (dict) –
The Network Configuration to update of your Amazon MWAA environment.
SecurityGroupIds (list) – [REQUIRED]
Provide a JSON list of 1 or more security groups IDs by name, in the same VPC as the subnets.
(string) –
PluginsS3ObjectVersion (string) – The Plugins.zip S3 Object Version to update of your Amazon MWAA environment.
PluginsS3Path (string) – The Plugins.zip S3 Path to update of your Amazon MWAA environment.
RequirementsS3ObjectVersion (string) – The Requirements.txt S3 ObjectV ersion to update of your Amazon MWAA environment.
RequirementsS3Path (string) – The Requirements.txt S3 Path to update of your Amazon MWAA environment.
SourceBucketArn (string) – The S3 Source Bucket ARN to update of your Amazon MWAA environment.
WebserverAccessMode (string) – The Webserver Access Mode to update of your Amazon MWAA environment.
WeeklyMaintenanceWindowStart (string) – The Weekly Maintenance Window Start to update of your Amazon MWAA environment.
dict
Response Syntax
{
'Arn': 'string'
}
Response Structure
(dict) –
Arn (string) –
The ARN to update of your Amazon MWAA environment.
Exceptions
Client exceptions are available on a client instance via the exceptions
property. For more detailed instructions and examples on the exact usage of client exceptions, see the error handling user guide.
The available client exceptions are:
MWAA.Client.exceptions.
AccessDeniedException
¶Access to the Airflow Web UI or CLI has been Denied. Please follow the MWAA user guide to setup permissions to access the Web UI and CLI functionality.
Example
try:
...
except client.exceptions.AccessDeniedException as e:
print(e.response)
response
¶The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'Message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
Access to the Airflow Web UI or CLI has been Denied. Please follow the MWAA user guide to setup permissions to access the Web UI and CLI functionality.
Message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
MWAA.Client.exceptions.
InternalServerException
¶InternalServerException: An internal error has occurred.
Example
try:
...
except client.exceptions.InternalServerException as e:
print(e.response)
response
¶The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
InternalServerException: An internal error has occurred.
message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
MWAA.Client.exceptions.
ResourceNotFoundException
¶ResourceNotFoundException: The resource is not available.
Example
try:
...
except client.exceptions.ResourceNotFoundException as e:
print(e.response)
response
¶The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
ResourceNotFoundException: The resource is not available.
message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
MWAA.Client.exceptions.
ValidationException
¶ValidationException: The provided input is not valid.
Example
try:
...
except client.exceptions.ValidationException as e:
print(e.response)
response
¶The parsed error response. All exceptions have a top level Error
key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.
Syntax
{
'message': 'string',
'Error': {
'Code': 'string',
'Message': 'string'
}
}
Structure
(dict) –
ValidationException: The provided input is not valid.
message (string) –
Error (dict) – Normalized access to common exception attributes.
Code (string) – An identifier specifying the exception type.
Message (string) – A descriptive message explaining why the exception occured.
The available paginators are:
MWAA.Paginator.
ListEnvironments
¶paginator = client.get_paginator('list_environments')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from MWAA.Client.list_environments()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
PaginationConfig (dict) –
A dictionary that provides parameters to control pagination.
MaxItems (integer) –
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
PageSize (integer) –
The size of each page.
StartingToken (string) –
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
'Environments': [
'string',
],
}
Response Structure
(dict) –
Environments (list) –
The list of Amazon MWAA Environments.
(string) –