CloudWatchClient.create_resource_metrics_configuration
rboto-cloudwatch==0.4.0 · Service index · Types
Model summary (excerpt): Creates a resource metrics configuration for an Amazon Web Services resource. After you create a configuration, Amazon CloudWatch collects detailed metrics for that resource. Each Amazon Web Services resource can have only one resource metrics configuration. If a configuration already exists for the specified resource ARN, this operation returns a ConflictException . To modify an existing...
Install and imports
from rboto import CloudWatchClient
from collections.abc import Sequence
from rboto_cloudwatch.types import (
CreateResourceMetricsConfigurationOutput,
ResourceMetricSelection,
)
Signature
async def create_resource_metrics_configuration(
*,
resource_arn: str,
metric_selections: Sequence[ResourceMetricSelection] | None = None,
) -> CreateResourceMetricsConfigurationOutput: ...
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) |
|---|---|---|
resource_arn |
Yes | The Amazon Resource Name (ARN) of the Amazon Web Services resource to enable detailed monitoring for. |
metric_selections |
No | Specifies which metrics Amazon CloudWatch collects for the resource. If you omit this parameter, Amazon CloudWatch collects all available detailed metrics for the resource. |
Output
CreateResourceMetricsConfigurationOutput.
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 |
|---|---|---|---|
resource_metrics_configuration |
ResourceMetricsConfigurationOutput | None |
Always present | ResourceMetricsConfigurationOutput |
| 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
CreateResourceMetricsConfigurationOutput, ResourceMetricSelection
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
Import from rboto_cloudwatch.exceptions:
ConflictError, ResourceNotFoundExceptionError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.