AmazonMWAA

2024/10/23 - AmazonMWAA - 1 new api methods

Changes  Introducing InvokeRestApi which allows users to invoke the Apache Airflow REST API on the webserver with the specified inputs.

InvokeRestApi (new) Link ΒΆ

Invokes the Apache Airflow REST API on the webserver with the specified inputs. To learn more, see Using the Apache Airflow REST API

See also: AWS API Documentation

Request Syntax

client.invoke_rest_api(
    Name='string',
    Path='string',
    Method='GET'|'PUT'|'POST'|'PATCH'|'DELETE',
    QueryParameters={...}|[...]|123|123.4|'string'|True|None,
    Body={...}|[...]|123|123.4|'string'|True|None
)
type Name

string

param Name

[REQUIRED]

The name of the Amazon MWAA environment. For example, MyMWAAEnvironment .

type Path

string

param Path

[REQUIRED]

The Apache Airflow REST API endpoint path to be called. For example, /dags/123456/clearTaskInstances . For more information, see Apache Airflow API

type Method

string

param Method

[REQUIRED]

The HTTP method used for making Airflow REST API calls. For example, POST .

type QueryParameters

:ref:`document<document>`

param QueryParameters

Query parameters to be included in the Apache Airflow REST API call, provided as a JSON object.

type Body

:ref:`document<document>`

param Body

The request body for the Apache Airflow REST API call, provided as a JSON object.

rtype

dict

returns

Response Syntax

{
    'RestApiStatusCode': 123,
    'RestApiResponse': {...}|[...]|123|123.4|'string'|True|None
}

Response Structure

  • (dict) --

    • RestApiStatusCode (integer) --

      The HTTP status code returned by the Apache Airflow REST API call.

    • RestApiResponse (:ref:`document<document>`) --

      The response data from the Apache Airflow REST API call, provided as a JSON object.