CloudWatchClient.get_metric_widget_image
rboto-cloudwatch==0.4.0 · Service index · Types
Model summary (excerpt): You can use the GetMetricWidgetImage API to retrieve a snapshot graph of one or more Amazon CloudWatch metrics as a bitmap image. You can then embed this image into your services and products, such as wiki pages, reports, and documents. You could also retrieve images regularly, such as every minute, and create your own custom live dashboard. GetMetricWidgetImage is not available in the Amazon...
Install and imports
from rboto import CloudWatchClient
from rboto_cloudwatch.types import (
GetMetricWidgetImageOutput,
)
Signature
async def get_metric_widget_image(
*,
metric_widget: str,
output_format: str | None = None,
) -> GetMetricWidgetImageOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
metric_widget |
Yes | A JSON string that defines the bitmap graph to be retrieved. The string includes the metrics to include in the graph, statistics, annotations, title, axis limits, and so on. You can include only one MetricWidget parameter in each GetMetricWidgetImage call. For more information about the syntax of MetricWidget see GetMetricWidgetImage: Metric Widget Structure and Syntax . If any metric on the... |
output_format |
No | The format of the resulting image. Only PNG images are supported. The default is png . If you specify png , the API returns an HTTP response with the content-type set to text/xml . The image data is in a MetricWidgetImage field. For example: > iVBORw0KGgoAAAANSUhEUgAAAlgAAAGQEAYAAAAip... 6f0d4192-4d42-11e8-82c1-f539a07e0e3b The image/png setting is intended only for custom HTTP requests. For... |
Output
GetMetricWidgetImageOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
metric_widget_image |
bytes | None |
Always present | — |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
No modeled service errors for this operation.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.