MWAAClient#
Auto-generated documentation for MWAA type annotations stubs module types-boto3-mwaa.
MWAAClient#
Type annotations and code completion for boto3.client("mwaa").
 boto3 documentation
# MWAAClient usage example
from boto3.session import Session
from types_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.
# Exceptions.exceptions usage example
client = boto3.client("mwaa")
try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.InternalServerException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.RestApiClientException,
    client.exceptions.RestApiServerException,
    client.exceptions.ValidationException,
) as e:
    print(e)# Exceptions.exceptions type checking example
from types_boto3_mwaa.client import Exceptions
def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...Methods#
can_paginate#
Type annotations and code completion for boto3.client("mwaa").can_paginate method.
 boto3 documentation
# can_paginate method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...generate_presigned_url#
Type annotations and code completion for boto3.client("mwaa").generate_presigned_url method.
 boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...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
# create_cli_token method definition
def create_cli_token(
    self,
    *,
    Name: str,
) -> CreateCliTokenResponseTypeDef:  # (1)
    ...# create_cli_token method usage example with argument unpacking
kwargs: CreateCliTokenRequestTypeDef = {  # (1)
    "Name": ...,
}
parent.create_cli_token(**kwargs)create_environment#
Creates an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.
Type annotations and code completion for boto3.client("mwaa").create_environment method.
 boto3 documentation
# create_environment method definition
def create_environment(
    self,
    *,
    Name: str,
    ExecutionRoleArn: str,
    SourceBucketArn: str,
    DagS3Path: str,
    NetworkConfiguration: NetworkConfigurationUnionTypeDef,  # (1)
    PluginsS3Path: str = ...,
    PluginsS3ObjectVersion: str = ...,
    RequirementsS3Path: str = ...,
    RequirementsS3ObjectVersion: str = ...,
    StartupScriptS3Path: str = ...,
    StartupScriptS3ObjectVersion: str = ...,
    AirflowConfigurationOptions: Mapping[str, str] = ...,
    EnvironmentClass: str = ...,
    MaxWorkers: int = ...,
    KmsKey: str = ...,
    AirflowVersion: str = ...,
    LoggingConfiguration: LoggingConfigurationInputTypeDef = ...,  # (2)
    WeeklyMaintenanceWindowStart: str = ...,
    Tags: Mapping[str, str] = ...,
    WebserverAccessMode: WebserverAccessModeType = ...,  # (3)
    MinWorkers: int = ...,
    Schedulers: int = ...,
    EndpointManagement: EndpointManagementType = ...,  # (4)
    MinWebservers: int = ...,
    MaxWebservers: int = ...,
) -> CreateEnvironmentOutputTypeDef:  # (5)
    ...- See NetworkConfigurationUnionTypeDef
- See LoggingConfigurationInputTypeDef
- See WebserverAccessModeType
- See EndpointManagementType
- See CreateEnvironmentOutputTypeDef
# create_environment method usage example with argument unpacking
kwargs: CreateEnvironmentInputTypeDef = {  # (1)
    "Name": ...,
    "ExecutionRoleArn": ...,
    "SourceBucketArn": ...,
    "DagS3Path": ...,
    "NetworkConfiguration": ...,
}
parent.create_environment(**kwargs)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
# create_web_login_token method definition
def create_web_login_token(
    self,
    *,
    Name: str,
) -> CreateWebLoginTokenResponseTypeDef:  # (1)
    ...# create_web_login_token method usage example with argument unpacking
kwargs: CreateWebLoginTokenRequestTypeDef = {  # (1)
    "Name": ...,
}
parent.create_web_login_token(**kwargs)delete_environment#
Deletes an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.
Type annotations and code completion for boto3.client("mwaa").delete_environment method.
 boto3 documentation
# delete_environment method definition
def delete_environment(
    self,
    *,
    Name: str,
) -> Dict[str, Any]:
    ...# delete_environment method usage example with argument unpacking
kwargs: DeleteEnvironmentInputTypeDef = {  # (1)
    "Name": ...,
}
parent.delete_environment(**kwargs)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
# get_environment method definition
def get_environment(
    self,
    *,
    Name: str,
) -> GetEnvironmentOutputTypeDef:  # (1)
    ...# get_environment method usage example with argument unpacking
kwargs: GetEnvironmentInputTypeDef = {  # (1)
    "Name": ...,
}
parent.get_environment(**kwargs)invoke_rest_api#
Invokes the Apache Airflow REST API on the webserver with the specified inputs.
Type annotations and code completion for boto3.client("mwaa").invoke_rest_api method.
 boto3 documentation
# invoke_rest_api method definition
def invoke_rest_api(
    self,
    *,
    Name: str,
    Path: str,
    Method: RestApiMethodType,  # (1)
    QueryParameters: Mapping[str, Any] = ...,
    Body: Mapping[str, Any] = ...,
) -> InvokeRestApiResponseTypeDef:  # (2)
    ...# invoke_rest_api method usage example with argument unpacking
kwargs: InvokeRestApiRequestTypeDef = {  # (1)
    "Name": ...,
    "Path": ...,
    "Method": ...,
}
parent.invoke_rest_api(**kwargs)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
# list_environments method definition
def list_environments(
    self,
    *,
    NextToken: str = ...,
    MaxResults: int = ...,
) -> ListEnvironmentsOutputTypeDef:  # (1)
    ...# list_environments method usage example with argument unpacking
kwargs: ListEnvironmentsInputTypeDef = {  # (1)
    "NextToken": ...,
}
parent.list_environments(**kwargs)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
# list_tags_for_resource method definition
def list_tags_for_resource(
    self,
    *,
    ResourceArn: str,
) -> ListTagsForResourceOutputTypeDef:  # (1)
    ...# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceInputTypeDef = {  # (1)
    "ResourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)publish_metrics#
Internal only.
Type annotations and code completion for boto3.client("mwaa").publish_metrics method.
 boto3 documentation
# publish_metrics method definition
def publish_metrics(
    self,
    *,
    EnvironmentName: str,
    MetricData: Sequence[MetricDatumTypeDef],  # (1)
) -> Dict[str, Any]:
    ...- See Sequence[MetricDatumTypeDef]
# publish_metrics method usage example with argument unpacking
kwargs: PublishMetricsInputTypeDef = {  # (1)
    "EnvironmentName": ...,
    "MetricData": ...,
}
parent.publish_metrics(**kwargs)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
# tag_resource method definition
def tag_resource(
    self,
    *,
    ResourceArn: str,
    Tags: Mapping[str, str],
) -> Dict[str, Any]:
    ...# tag_resource method usage example with argument unpacking
kwargs: TagResourceInputTypeDef = {  # (1)
    "ResourceArn": ...,
    "Tags": ...,
}
parent.tag_resource(**kwargs)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
# untag_resource method definition
def untag_resource(
    self,
    *,
    ResourceArn: str,
    tagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...# untag_resource method usage example with argument unpacking
kwargs: UntagResourceInputTypeDef = {  # (1)
    "ResourceArn": ...,
    "tagKeys": ...,
}
parent.untag_resource(**kwargs)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
# update_environment method definition
def update_environment(
    self,
    *,
    Name: str,
    ExecutionRoleArn: str = ...,
    AirflowConfigurationOptions: Mapping[str, str] = ...,
    AirflowVersion: str = ...,
    DagS3Path: str = ...,
    EnvironmentClass: str = ...,
    LoggingConfiguration: LoggingConfigurationInputTypeDef = ...,  # (1)
    MaxWorkers: int = ...,
    MinWorkers: int = ...,
    MaxWebservers: int = ...,
    MinWebservers: int = ...,
    WorkerReplacementStrategy: WorkerReplacementStrategyType = ...,  # (2)
    NetworkConfiguration: UpdateNetworkConfigurationInputTypeDef = ...,  # (3)
    PluginsS3Path: str = ...,
    PluginsS3ObjectVersion: str = ...,
    RequirementsS3Path: str = ...,
    RequirementsS3ObjectVersion: str = ...,
    Schedulers: int = ...,
    SourceBucketArn: str = ...,
    StartupScriptS3Path: str = ...,
    StartupScriptS3ObjectVersion: str = ...,
    WebserverAccessMode: WebserverAccessModeType = ...,  # (4)
    WeeklyMaintenanceWindowStart: str = ...,
) -> UpdateEnvironmentOutputTypeDef:  # (5)
    ...- See LoggingConfigurationInputTypeDef
- See WorkerReplacementStrategyType
- See UpdateNetworkConfigurationInputTypeDef
- See WebserverAccessModeType
- See UpdateEnvironmentOutputTypeDef
# update_environment method usage example with argument unpacking
kwargs: UpdateEnvironmentInputTypeDef = {  # (1)
    "Name": ...,
}
parent.update_environment(**kwargs)get_paginator#
Type annotations and code completion for boto3.client("mwaa").get_paginator method with overloads.
- client.get_paginator("list_environments")-> ListEnvironmentsPaginator