{"id":21026,"library":"cdk-cloudformation-datadog-monitors-monitor","title":"CDK CloudFormation Datadog Monitors Monitor","description":"This is an AWS CDK construct library that provides a L1 CloudFormation resource for Datadog Monitor (DATADOG::MONITORS::MONITOR). It wraps the Datadog Monitor CloudFormation resource, allowing you to define and manage Datadog monitors as part of your CDK infrastructure. The current version is 4.8.0a7 (alpha). The library is part of the cdklabs/cdk-cloudformation project, which generates CDK constructs for CloudFormation registry resources. The library is in maintenance mode and has a release cadence tied to upstream CloudFormation registry changes.","status":"maintenance","version":"4.8.0a7","language":"python","source_language":"en","source_url":"https://github.com/cdklabs/cdk-cloudformation.git","tags":["cdk","cloudformation","datadog","monitor","construct"],"install":[{"cmd":"pip install cdk-cloudformation-datadog-monitors-monitor==4.8.0a7","lang":"bash","label":"Install specific alpha version"}],"dependencies":[{"reason":"Core CDK library required to use constructs.","package":"aws-cdk-lib","optional":false},{"reason":"Base constructs library required by CDK.","package":"constructs","optional":false}],"imports":[{"note":"Wrong: Library name is hyphenated on PyPI but import uses underscores. Also, the module path includes the full prefix.","wrong":"from datadog_monitors_monitor import CfnMonitor","symbol":"CfnMonitor","correct":"from cdk_cloudformation_datadog_monitors_monitor import CfnMonitor"}],"quickstart":{"code":"from aws_cdk import App, Stack\nfrom cdk_cloudformation_datadog_monitors_monitor import CfnMonitor\n\napp = App()\nstack = Stack(app, \"MyStack\")\n\nCfnMonitor(stack, \"MyDatadogMonitor\",\n    type=\"metric alert\",\n    query=\"avg(last_5m):avg:system.cpu.user{*} > 80\",\n    message=\"High CPU usage\",\n    name=\"High CPU Alert\",\n    options={\n        \"notify_no_data\": True,\n        \"no_data_timeframe\": 10,\n        \"thresholds\": {\n            \"critical\": 80.0\n        }\n    },\n    tags=[\"env:production\"]\n)\n\napp.synth()","lang":"python","description":"Creates a Datadog monitor using the CDK CloudFormation resource. Note: This construct requires a Datadog API key and application key to be set up via CloudFormation resource provider or environment variables."},"warnings":[{"fix":"Always check the CloudFormation resource documentation for the latest property types. Pin your library version and test schema changes.","message":"CfnMonitor is a L1 construct - it directly maps to the CloudFormation resource schema. Properties may change with schema updates, breaking your stack if you rely on internal implementation details.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Consider migrating to a dedicated Datadog CDK construct (e.g., datadog-cdk-constructs) or using the CloudFormation resource directly.","message":"This library is in maintenance mode. The cdklabs/cdk-cloudformation project is no longer actively maintained. New features and bug fixes may not be provided.","severity":"deprecated","affected_versions":">=4.0.0"},{"fix":"Install with pip using hyphens, but import using underscores: `from cdk_cloudformation_datadog_monitors_monitor import CfnMonitor`.","message":"The library uses underscores in Python package names (cdk_cloudformation_datadog_monitors_monitor), but the PyPI package name uses hyphens. This mismatch often causes import errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Register the Datadog resource provider in your AWS account by following the Datadog CloudFormation integration guide. You may need to use a custom resource provider or the Datadog AWS integration.","message":"The resource requires a CloudFormation resource provider to be registered in your AWS account. Without the Datadog resource provider, the CloudFormation stack will fail.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install the package: `pip install cdk-cloudformation-datadog-monitors-monitor==4.8.0a7`. Ensure the import is `from cdk_cloudformation_datadog_monitors_monitor import CfnMonitor`.","cause":"Misspelled module name or missing installation of the correct package.","error":"ImportError: cannot import name 'CfnMonitor' from 'cdk_cloudformation_datadog_monitors_monitor'"},{"fix":"Install the package: `pip install cdk-cloudformation-datadog-monitors-monitor==4.8.0a7`.","cause":"Package not installed or installed with a different version.","error":"ModuleNotFoundError: No module named 'cdk_cloudformation_datadog_monitors_monitor'"},{"fix":"Register the Datadog resource provider using the AWS CloudFormation registry or the Datadog integration.","cause":"The Datadog CloudFormation resource provider is not registered in your AWS account.","error":"Resource of type 'DATADOG::MONITORS::MONITOR' does not exist in the CloudFormation registry"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}