Skip to content

MWAAClient

Index > MWAA > MWAAClient

Auto-generated documentation for MWAA type annotations stubs module mypy-boto3-mwaa.

MWAAClient

Type annotations and code completion for boto3.client("mwaa"). boto3 documentation

Usage example
from boto3.session import Session
from mypy_boto3_mwaa.client import MWAAClient

def get_mwaa_client() -> MWAAClient:
    return Session().client("mwaa")

Exceptions

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("mwaa").exceptions structure.

Usage example
client = boto3.client("mwaa")

try:
    do_something(client)
except (
    client.AccessDeniedException,
    client.ClientError,
    client.InternalServerException,
    client.ResourceNotFoundException,
    client.ValidationException,
) as e:
    print(e)
Type checking example
from mypy_boto3_mwaa.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("mwaa").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("mwaa").close method. boto3 documentation

Method definition
def close(
    self,
) -> None:
    ...

create_cli_token

Creates a CLI token for the Airflow CLI.

Type annotations and code completion for boto3.client("mwaa").create_cli_token method. boto3 documentation

Method definition
def create_cli_token(
    self,
    *,
    Name: str,
) -> CreateCliTokenResponseTypeDef:  # (1)
    ...
  1. See CreateCliTokenResponseTypeDef
Usage example with kwargs
kwargs: CreateCliTokenRequestRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.create_cli_token(**kwargs)
  1. See CreateCliTokenRequestRequestTypeDef

create_environment

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

Type annotations and code completion for boto3.client("mwaa").create_environment method. boto3 documentation

Method definition
def create_environment(
    self,
    *,
    DagS3Path: str,
    ExecutionRoleArn: str,
    Name: str,
    NetworkConfiguration: NetworkConfigurationTypeDef,  # (1)
    SourceBucketArn: str,
    AirflowConfigurationOptions: Mapping[str, str] = ...,
    AirflowVersion: str = ...,
    EnvironmentClass: str = ...,
    KmsKey: str = ...,
    LoggingConfiguration: LoggingConfigurationInputTypeDef = ...,  # (2)
    MaxWorkers: int = ...,
    MinWorkers: int = ...,
    PluginsS3ObjectVersion: str = ...,
    PluginsS3Path: str = ...,
    RequirementsS3ObjectVersion: str = ...,
    RequirementsS3Path: str = ...,
    Schedulers: int = ...,
    Tags: Mapping[str, str] = ...,
    WebserverAccessMode: WebserverAccessModeType = ...,  # (3)
    WeeklyMaintenanceWindowStart: str = ...,
) -> CreateEnvironmentOutputTypeDef:  # (4)
    ...
  1. See NetworkConfigurationTypeDef
  2. See LoggingConfigurationInputTypeDef
  3. See WebserverAccessModeType
  4. See CreateEnvironmentOutputTypeDef
Usage example with kwargs
kwargs: CreateEnvironmentInputRequestTypeDef = {  # (1)
    "DagS3Path": ...,
    "ExecutionRoleArn": ...,
    "Name": ...,
    "NetworkConfiguration": ...,
    "SourceBucketArn": ...,
}

parent.create_environment(**kwargs)
  1. See CreateEnvironmentInputRequestTypeDef

create_web_login_token

Creates a web login token for the Airflow Web UI.

Type annotations and code completion for boto3.client("mwaa").create_web_login_token method. boto3 documentation

Method definition
def create_web_login_token(
    self,
    *,
    Name: str,
) -> CreateWebLoginTokenResponseTypeDef:  # (1)
    ...
  1. See CreateWebLoginTokenResponseTypeDef
Usage example with kwargs
kwargs: CreateWebLoginTokenRequestRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.create_web_login_token(**kwargs)
  1. See CreateWebLoginTokenRequestRequestTypeDef

delete_environment

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

Type annotations and code completion for boto3.client("mwaa").delete_environment method. boto3 documentation

Method definition
def delete_environment(
    self,
    *,
    Name: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: DeleteEnvironmentInputRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.delete_environment(**kwargs)
  1. See DeleteEnvironmentInputRequestTypeDef

generate_presigned_url

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

Type annotations and code completion for boto3.client("mwaa").generate_presigned_url method. boto3 documentation

Method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_environment

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

Type annotations and code completion for boto3.client("mwaa").get_environment method. boto3 documentation

Method definition
def get_environment(
    self,
    *,
    Name: str,
) -> GetEnvironmentOutputTypeDef:  # (1)
    ...
  1. See GetEnvironmentOutputTypeDef
Usage example with kwargs
kwargs: GetEnvironmentInputRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.get_environment(**kwargs)
  1. See GetEnvironmentInputRequestTypeDef

list_environments

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

Type annotations and code completion for boto3.client("mwaa").list_environments method. boto3 documentation

Method definition
def list_environments(
    self,
    *,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> ListEnvironmentsOutputTypeDef:  # (1)
    ...
  1. See ListEnvironmentsOutputTypeDef
Usage example with kwargs
kwargs: ListEnvironmentsInputRequestTypeDef = {  # (1)
    "MaxResults": ...,
}

parent.list_environments(**kwargs)
  1. See ListEnvironmentsInputRequestTypeDef

list_tags_for_resource

Lists the key-value tag pairs associated to the Amazon Managed Workflows for Apache Airflow (MWAA) environment.

Type annotations and code completion for boto3.client("mwaa").list_tags_for_resource method. boto3 documentation

Method definition
def list_tags_for_resource(
    self,
    *,
    ResourceArn: str,
) -> ListTagsForResourceOutputTypeDef:  # (1)
    ...
  1. See ListTagsForResourceOutputTypeDef
Usage example with kwargs
kwargs: ListTagsForResourceInputRequestTypeDef = {  # (1)
    "ResourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceInputRequestTypeDef

publish_metrics

Internal only.

Type annotations and code completion for boto3.client("mwaa").publish_metrics method. boto3 documentation

Method definition
def publish_metrics(
    self,
    *,
    EnvironmentName: str,
    MetricData: Sequence[MetricDatumTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See MetricDatumTypeDef
Usage example with kwargs
kwargs: PublishMetricsInputRequestTypeDef = {  # (1)
    "EnvironmentName": ...,
    "MetricData": ...,
}

parent.publish_metrics(**kwargs)
  1. See PublishMetricsInputRequestTypeDef

tag_resource

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

Type annotations and code completion for boto3.client("mwaa").tag_resource method. boto3 documentation

Method definition
def tag_resource(
    self,
    *,
    ResourceArn: str,
    Tags: Mapping[str, str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: TagResourceInputRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "Tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceInputRequestTypeDef

untag_resource

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

Type annotations and code completion for boto3.client("mwaa").untag_resource method. boto3 documentation

Method definition
def untag_resource(
    self,
    *,
    ResourceArn: str,
    tagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: UntagResourceInputRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "tagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceInputRequestTypeDef

update_environment

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

Type annotations and code completion for boto3.client("mwaa").update_environment method. boto3 documentation

Method definition
def update_environment(
    self,
    *,
    Name: str,
    AirflowConfigurationOptions: Mapping[str, str] = ...,
    AirflowVersion: str = ...,
    DagS3Path: str = ...,
    EnvironmentClass: str = ...,
    ExecutionRoleArn: str = ...,
    LoggingConfiguration: LoggingConfigurationInputTypeDef = ...,  # (1)
    MaxWorkers: int = ...,
    MinWorkers: int = ...,
    NetworkConfiguration: UpdateNetworkConfigurationInputTypeDef = ...,  # (2)
    PluginsS3ObjectVersion: str = ...,
    PluginsS3Path: str = ...,
    RequirementsS3ObjectVersion: str = ...,
    RequirementsS3Path: str = ...,
    Schedulers: int = ...,
    SourceBucketArn: str = ...,
    WebserverAccessMode: WebserverAccessModeType = ...,  # (3)
    WeeklyMaintenanceWindowStart: str = ...,
) -> UpdateEnvironmentOutputTypeDef:  # (4)
    ...
  1. See LoggingConfigurationInputTypeDef
  2. See UpdateNetworkConfigurationInputTypeDef
  3. See WebserverAccessModeType
  4. See UpdateEnvironmentOutputTypeDef
Usage example with kwargs
kwargs: UpdateEnvironmentInputRequestTypeDef = {  # (1)
    "Name": ...,
}

parent.update_environment(**kwargs)
  1. See UpdateEnvironmentInputRequestTypeDef

get_paginator

Type annotations and code completion for boto3.client("mwaa").get_paginator method with overloads.