mwaa

package
v0.0.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package mwaa provides a client for interacting with AWS Managed Workflows for Apache Airflow (MWAA). It includes methods for managing MWAA environments, invoking REST API commands, generating CLI tokens, and executing CLI commands on MWAA environments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides methods to interact with AWS MWAA (Managed Workflows for Apache Airflow).

func NewClient

func NewClient(cfg *config.Config) *Client

NewClient initializes a new MWAA client with the provided configuration.

func (*Client) CreateCliToken

func (c *Client) CreateCliToken(ctx context.Context, environmentName string) (*awsmwaa.CreateCliTokenOutput, error)

CreateCliToken generates a CLI token for the specified MWAA environment.

func (*Client) CreateWebLoginToken

func (c *Client) CreateWebLoginToken(ctx context.Context, environmentName string) (*awsmwaa.CreateWebLoginTokenOutput, error)

CreateWebLoginToken generates a web login token for the specified MWAA environment.

func (*Client) DeleteEnvironment

func (c *Client) DeleteEnvironment(ctx context.Context, environmentName string) error

DeleteEnvironment removes an MWAA environment by its name.

func (*Client) GetEnvironment

func (c *Client) GetEnvironment(ctx context.Context, environmentName string) (*types.Environment, error)

GetEnvironment fetches details for a specific MWAA environment.

func (*Client) InvokeCliCommand

func (c *Client) InvokeCliCommand(ctx context.Context, mwaaEnvName, command string) (int, string, string, error)

InvokeCliCommand executes a CLI command on the specified MWAA environment. It creates a CLI token, prepares the request, and sends it to the MWAA web server.

func (*Client) InvokeRestAPI

func (c *Client) InvokeRestAPI(ctx context.Context, method types.RestApiMethod, environmentName, path string, queryParams, body any) (*awsmwaa.InvokeRestApiOutput, error)

InvokeRestAPI sends a REST API request to the MWAA environment with the specified method and payload.

func (*Client) ListEnvironments

func (c *Client) ListEnvironments(ctx context.Context) ([]string, error)

ListEnvironments retrieves a list of all MWAA environments in the AWS account.

func (*Client) RestAPIGet added in v0.0.4

func (c *Client) RestAPIGet(ctx context.Context, environmentName, path string, queryParams map[string]any, response any) error

RestAPIGet sends a GET request to the MWAA environment's REST API.

func (*Client) RestAPIPost added in v0.0.12

func (c *Client) RestAPIPost(ctx context.Context, environmentName, path string, queryParams map[string]any, body any, response any) error

RestAPIPost sends a POST request to the MWAA environment's REST API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL