airflow.providers.amazon.aws.utils.tags

Module Contents

Functions

format_tags(source, *[, key_label, value_label])

Format tags for boto call which expect a given format.

airflow.providers.amazon.aws.utils.tags.format_tags(source, *, key_label='Key', value_label='Value')[source]

Format tags for boto call which expect a given format.

If given a dictionary, formats it as an array of objects with a key and a value field to be passed to boto calls that expect this format.

Else, assumes that it’s already in the right format and returns it as is. We do not validate the format here since it’s done by boto anyway, and the error would not be clearer if thrown from here.

Parameters
  • source (Any) – a dict from which keys and values are read

  • key_label (str) – optional, the label to use for keys if not “Key”

  • value_label (str) – optional, the label to use for values if not “Value”

Was this entry helpful?