publish_metrics

publish_metrics(**kwargs)
Internal only . Publishes environment health metrics to Amazon CloudWatch.

See also: AWS API Documentation

Request Syntax

response = client.publish_metrics(
    EnvironmentName='string',
    MetricData=[
        {
            'Dimensions': [
                {
                    'Name': 'string',
                    'Value': 'string'
                },
            ],
            'MetricName': 'string',
            'StatisticValues': {
                'Maximum': 123.0,
                'Minimum': 123.0,
                'SampleCount': 123,
                'Sum': 123.0
            },
            'Timestamp': datetime(2015, 1, 1),
            'Unit': 'Seconds'|'Microseconds'|'Milliseconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None',
            'Value': 123.0
        },
    ]
)
Parameters
  • EnvironmentName (string) --

    [REQUIRED]

    Internal only . The name of the environment.

  • MetricData (list) --

    [REQUIRED]

    Internal only . Publishes metrics to Amazon CloudWatch. To learn more about the metrics published to Amazon CloudWatch, see Amazon MWAA performance metrics in Amazon CloudWatch.
    • (dict) --
      Internal only . Collects Apache Airflow metrics. To learn more about the metrics published to Amazon CloudWatch, see Amazon MWAA performance metrics in Amazon CloudWatch.
      • Dimensions (list) --
        Internal only . The dimensions associated with the metric.
        • (dict) --
          Internal only . Represents the dimensions of a metric. To learn more about the metrics published to Amazon CloudWatch, see Amazon MWAA performance metrics in Amazon CloudWatch.
          • Name (string) -- [REQUIRED]
            Internal only . The name of the dimension.
          • Value (string) -- [REQUIRED]
            Internal only . The value of the dimension.
      • MetricName (string) -- [REQUIRED]
        Internal only . The name of the metric.
      • StatisticValues (dict) --
        Internal only . The statistical values for the metric.
        • Maximum (float) --
          Internal only . The maximum value of the sample set.
        • Minimum (float) --
          Internal only . The minimum value of the sample set.
        • SampleCount (integer) --
          Internal only . The number of samples used for the statistic set.
        • Sum (float) --
          Internal only . The sum of values for the sample set.
      • Timestamp (datetime) -- [REQUIRED]
        Internal only . The time the metric data was received.
      • Unit (string) --
        Internal only . The unit used to store the metric.
      • Value (float) --
        Internal only . The value for the metric.
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • MWAA.Client.exceptions.ValidationException
  • MWAA.Client.exceptions.InternalServerException