MWAA

Table of Contents

Client

class 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? .

import boto3

client = boto3.client('mwaa')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
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").
Returns
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'
)
Parameters
Name (string) --

[REQUIRED]

Create a CLI token request for a MWAA environment.

Return type
dict
Returns
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

  • MWAA.Client.exceptions.ResourceNotFoundException
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'
)
Parameters
  • 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.
Return type

dict

Returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The resulting Amazon MWAA envirnonment ARN.

Exceptions

  • MWAA.Client.exceptions.ValidationException
  • MWAA.Client.exceptions.InternalServerException
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'
)
Parameters
Name (string) --

[REQUIRED]

Create an Airflow Web UI login token request for a MWAA environment.

Return type
dict
Returns
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

  • MWAA.Client.exceptions.AccessDeniedException
  • MWAA.Client.exceptions.ResourceNotFoundException
  • MWAA.Client.exceptions.ValidationException
  • MWAA.Client.exceptions.InternalServerException
delete_environment(**kwargs)

Delete an existing environment.

See also: AWS API Documentation

Request Syntax

response = client.delete_environment(
    Name='string'
)
Parameters
Name (string) --

[REQUIRED]

The name of the environment to delete.

Return type
dict
Returns
Response Syntax
{}

Response Structure

  • (dict) --

Exceptions

  • MWAA.Client.exceptions.ResourceNotFoundException
  • MWAA.Client.exceptions.ValidationException
  • MWAA.Client.exceptions.InternalServerException
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • 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.
Returns

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'
)
Parameters
Name (string) --

[REQUIRED]

The name of the environment to retrieve.

Return type
dict
Returns
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

  • MWAA.Client.exceptions.ResourceNotFoundException
  • MWAA.Client.exceptions.ValidationException
  • MWAA.Client.exceptions.InternalServerException
get_paginator(operation_name)

Create a paginator for an operation.

Parameters
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").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
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'
)
Parameters
  • MaxResults (integer) -- The maximum results when listing MWAA environments.
  • NextToken (string) -- The Next Token when listing MWAA environments.
Return type

dict

Returns

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

  • MWAA.Client.exceptions.ValidationException
  • MWAA.Client.exceptions.InternalServerException
list_tags_for_resource(**kwargs)

List the tags for MWAA environments.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    ResourceArn='string'
)
Parameters
ResourceArn (string) --

[REQUIRED]

The ARN of the MWAA environment.

Return type
dict
Returns
Response Syntax
{
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --
    • Tags (dict) --

      The tags of the MWAA environments.

      • (string) --
        • (string) --

Exceptions

  • MWAA.Client.exceptions.ResourceNotFoundException
  • MWAA.Client.exceptions.ValidationException
  • MWAA.Client.exceptions.InternalServerException
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
        },
    ]
)
Parameters
  • 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.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • MWAA.Client.exceptions.ValidationException
  • MWAA.Client.exceptions.InternalServerException
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'
    }
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The tag resource ARN of the MWAA environments.

  • Tags (dict) --

    [REQUIRED]

    The tag resource tag of the MWAA environments.

    • (string) --
      • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • MWAA.Client.exceptions.ResourceNotFoundException
  • MWAA.Client.exceptions.ValidationException
  • MWAA.Client.exceptions.InternalServerException
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',
    ]
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The tag resource ARN of the MWAA environments.

  • tagKeys (list) --

    [REQUIRED]

    The tag resource key of the MWAA environments.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • MWAA.Client.exceptions.ResourceNotFoundException
  • MWAA.Client.exceptions.ValidationException
  • MWAA.Client.exceptions.InternalServerException
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'
)
Parameters
  • 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.
Return type

dict

Returns

Response Syntax

{
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Arn (string) --

      The ARN to update of your Amazon MWAA environment.

Exceptions

  • MWAA.Client.exceptions.ResourceNotFoundException
  • MWAA.Client.exceptions.ValidationException
  • MWAA.Client.exceptions.InternalServerException

Paginators

The available paginators are:

class 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'
    }
)
Parameters
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.

Return type
dict
Returns
Response Syntax
{
    'Environments': [
        'string',
    ],

}

Response Structure

  • (dict) --
    • Environments (list) --

      The list of Amazon MWAA Environments.

      • (string) --