airflow.providers.amazon.aws.operators.mwaa_serverless

Amazon MWAA Serverless operators.

Classes

MwaaServerlessStartWorkflowRunOperator

Start a new execution of an Amazon MWAA Serverless workflow.

MwaaServerlessCreateWorkflowOperator

Create an Amazon MWAA Serverless workflow.

MwaaServerlessUpdateWorkflowOperator

Update an existing Amazon MWAA Serverless workflow.

MwaaServerlessDeleteWorkflowOperator

Delete an Amazon MWAA Serverless workflow.

MwaaServerlessStopWorkflowRunOperator

Stop a running Amazon MWAA Serverless workflow run.

Module Contents

class airflow.providers.amazon.aws.operators.mwaa_serverless.MwaaServerlessStartWorkflowRunOperator(*, workflow_arn, override_parameters=None, workflow_version=None, **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook]

Start a new execution of an Amazon MWAA Serverless workflow.

This operator triggers a workflow run that executes the tasks defined in the workflow. MWAA Serverless handles task scheduling, worker scaling, dependency resolution, and monitoring.

See also

For more information on how to use this operator, take a look at the guide: Start a Workflow Run

Parameters:
  • workflow_arn (str) – The ARN of the workflow to run. (templated)

  • override_parameters (dict[str, Any] | None) – Optional parameters to override defaults for this run. (templated)

  • workflow_version (str | None) – Optional version of the workflow to execute. (templated)

template_fields: tuple[str, ...][source]
template_fields_renderers[source]
aws_hook_class[source]
workflow_arn[source]
override_parameters = None[source]
workflow_version = None[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.amazon.aws.operators.mwaa_serverless.MwaaServerlessCreateWorkflowOperator(*, workflow_name, definition_s3_location, code=None, role_arn, description=None, tags=None, create_workflow_kwargs=None, if_exists='skip', **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook]

Create an Amazon MWAA Serverless workflow.

See also

For more information on how to use this operator, take a look at the guide: Create a Workflow

Parameters:
  • workflow_name (str) – The name of the workflow. (templated)

  • definition_s3_location (dict[str, str]) – Dict with Bucket and ObjectKey for the YAML definition. (templated)

  • code (dict[str, Any] | None) – Optional code location for PythonOperator and BashOperator tasks, as a dict with an S3Location key containing Bucket, ObjectKey, and optionally VersionId. (templated)

  • role_arn (str) – The execution role ARN. (templated)

  • description (str | None) – Optional description. (templated)

  • tags (dict[str, str] | None) – Optional tags dict.

  • create_workflow_kwargs (dict[str, Any] | None) – Optional parameters to pass to the CreateWorkflow API for inputs this operator does not expose, such as NetworkConfiguration, LoggingConfiguration, EngineVersion, TriggerMode, EncryptionConfiguration and ClientToken. (templated)

  • if_exists (Literal['fail', 'skip']) – Behavior when the workflow already exists. "fail" raises an error, "skip" returns the existing ARN.

aws_hook_class[source]
template_fields: tuple[str, ...][source]
template_fields_renderers[source]
workflow_name[source]
definition_s3_location[source]
code = None[source]
role_arn[source]
description = None[source]
tags = None[source]
create_workflow_kwargs[source]
if_exists = 'skip'[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.amazon.aws.operators.mwaa_serverless.MwaaServerlessUpdateWorkflowOperator(*, workflow_arn, definition_s3_location, code=None, role_arn, description=None, update_workflow_kwargs=None, **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook]

Update an existing Amazon MWAA Serverless workflow.

See also

For more information on how to use this operator, take a look at the guide: Update a Workflow

Parameters:
  • workflow_arn (str) – The ARN of the workflow to update. (templated)

  • definition_s3_location (dict[str, str]) – Dict with Bucket, ObjectKey, and optionally VersionId for the updated YAML definition. (templated)

  • code (dict[str, Any] | None) – Optional code location for PythonOperator and BashOperator tasks, as a dict with an S3Location key containing Bucket, ObjectKey, and optionally VersionId. (templated)

  • role_arn (str) – The execution role ARN. (templated)

  • description (str | None) – Optional updated description. (templated)

  • update_workflow_kwargs (dict[str, Any] | None) – Optional parameters to pass to the UpdateWorkflow API for inputs this operator does not expose, such as NetworkConfiguration, LoggingConfiguration, EngineVersion and TriggerMode. (templated)

aws_hook_class[source]
template_fields: tuple[str, ...][source]
template_fields_renderers[source]
workflow_arn[source]
definition_s3_location[source]
code = None[source]
role_arn[source]
description = None[source]
update_workflow_kwargs[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.amazon.aws.operators.mwaa_serverless.MwaaServerlessDeleteWorkflowOperator(*, workflow_arn, workflow_version=None, **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook]

Delete an Amazon MWAA Serverless workflow.

See also

For more information on how to use this operator, take a look at the guide: Delete a Workflow

Parameters:
  • workflow_arn (str) – The ARN of the workflow to delete. (templated)

  • workflow_version (str | None) – Optional specific version to delete. If not specified, all versions are deleted. (templated)

aws_hook_class[source]
template_fields: tuple[str, ...][source]
workflow_arn[source]
workflow_version = None[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.amazon.aws.operators.mwaa_serverless.MwaaServerlessStopWorkflowRunOperator(*, workflow_arn, run_id, **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook]

Stop a running Amazon MWAA Serverless workflow run.

See also

For more information on how to use this operator, take a look at the guide: Stop a Workflow Run

Parameters:
  • workflow_arn (str) – The ARN of the workflow. (templated)

  • run_id (str) – The ID of the run to stop. (templated)

aws_hook_class[source]
template_fields: tuple[str, ...][source]
workflow_arn[source]
run_id[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

Was this entry helpful?