aws-cdk-lib 2.200.2__py3-none-any.whl → 2.224.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of aws-cdk-lib might be problematic. Click here for more details.
- aws_cdk/__init__.py +1349 -373
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.200.2.jsii.tgz → aws-cdk-lib@2.224.0.jsii.tgz} +0 -0
- aws_cdk/alexa_ask/__init__.py +12 -2
- aws_cdk/aws_accessanalyzer/__init__.py +323 -6
- aws_cdk/aws_acmpca/__init__.py +53 -10
- aws_cdk/aws_aiops/__init__.py +1019 -0
- aws_cdk/aws_amazonmq/__init__.py +357 -313
- aws_cdk/aws_amplify/__init__.py +173 -17
- aws_cdk/aws_amplifyuibuilder/__init__.py +35 -6
- aws_cdk/aws_apigateway/__init__.py +1017 -155
- aws_cdk/aws_apigatewayv2/__init__.py +2796 -379
- aws_cdk/aws_apigatewayv2_integrations/__init__.py +94 -16
- aws_cdk/aws_appconfig/__init__.py +298 -43
- aws_cdk/aws_appflow/__init__.py +151 -6
- aws_cdk/aws_appintegrations/__init__.py +546 -6
- aws_cdk/aws_applicationautoscaling/__init__.py +29 -6
- aws_cdk/aws_applicationinsights/__init__.py +13 -2
- aws_cdk/aws_applicationsignals/__init__.py +374 -6
- aws_cdk/aws_appmesh/__init__.py +94 -26
- aws_cdk/aws_apprunner/__init__.py +66 -18
- aws_cdk/aws_appstream/__init__.py +309 -55
- aws_cdk/aws_appsync/__init__.py +227 -53
- aws_cdk/aws_apptest/__init__.py +71 -2
- aws_cdk/aws_aps/__init__.py +1875 -132
- aws_cdk/aws_arcregionswitch/__init__.py +5095 -0
- aws_cdk/aws_arczonalshift/__init__.py +39 -12
- aws_cdk/aws_athena/__init__.py +365 -29
- aws_cdk/aws_auditmanager/__init__.py +71 -2
- aws_cdk/aws_autoscaling/__init__.py +135 -55
- aws_cdk/aws_autoscaling_common/__init__.py +3 -0
- aws_cdk/aws_autoscalingplans/__init__.py +13 -2
- aws_cdk/aws_b2bi/__init__.py +1819 -99
- aws_cdk/aws_backup/__init__.py +317 -28
- aws_cdk/aws_backupgateway/__init__.py +13 -2
- aws_cdk/aws_batch/__init__.py +1405 -178
- aws_cdk/aws_bcmdataexports/__init__.py +21 -2
- aws_cdk/aws_bedrock/__init__.py +6747 -627
- aws_cdk/aws_bedrockagentcore/__init__.py +10425 -0
- aws_cdk/aws_billingconductor/__init__.py +197 -11
- aws_cdk/aws_budgets/__init__.py +42 -4
- aws_cdk/aws_cassandra/__init__.py +247 -6
- aws_cdk/aws_ce/__init__.py +35 -6
- aws_cdk/aws_certificatemanager/__init__.py +237 -32
- aws_cdk/aws_chatbot/__init__.py +70 -6
- aws_cdk/aws_cleanrooms/__init__.py +709 -206
- aws_cdk/aws_cleanroomsml/__init__.py +13 -2
- aws_cdk/aws_cloud9/__init__.py +13 -2
- aws_cdk/aws_cloudformation/__init__.py +345 -166
- aws_cdk/aws_cloudfront/__init__.py +2101 -680
- aws_cdk/aws_cloudfront/experimental/__init__.py +108 -16
- aws_cdk/aws_cloudfront_origins/__init__.py +614 -73
- aws_cdk/aws_cloudtrail/__init__.py +301 -17
- aws_cdk/aws_cloudwatch/__init__.py +1414 -153
- aws_cdk/aws_codeartifact/__init__.py +35 -6
- aws_cdk/aws_codebuild/__init__.py +1103 -118
- aws_cdk/aws_codecommit/__init__.py +23 -9
- aws_cdk/aws_codeconnections/__init__.py +13 -2
- aws_cdk/aws_codedeploy/__init__.py +67 -6
- aws_cdk/aws_codeguruprofiler/__init__.py +74 -2
- aws_cdk/aws_codegurureviewer/__init__.py +13 -2
- aws_cdk/aws_codepipeline/__init__.py +127 -64
- aws_cdk/aws_codepipeline_actions/__init__.py +749 -0
- aws_cdk/aws_codestar/__init__.py +13 -2
- aws_cdk/aws_codestarconnections/__init__.py +35 -6
- aws_cdk/aws_codestarnotifications/__init__.py +16 -2
- aws_cdk/aws_cognito/__init__.py +814 -80
- aws_cdk/aws_cognito_identitypool/__init__.py +17 -12
- aws_cdk/aws_comprehend/__init__.py +24 -4
- aws_cdk/aws_config/__init__.py +191 -30
- aws_cdk/aws_connect/__init__.py +2736 -191
- aws_cdk/aws_connectcampaigns/__init__.py +13 -2
- aws_cdk/aws_connectcampaignsv2/__init__.py +268 -6
- aws_cdk/aws_controltower/__init__.py +35 -6
- aws_cdk/aws_cur/__init__.py +100 -4
- aws_cdk/aws_customerprofiles/__init__.py +617 -27
- aws_cdk/aws_databrew/__init__.py +68 -12
- aws_cdk/aws_datapipeline/__init__.py +42 -2
- aws_cdk/aws_datasync/__init__.py +723 -203
- aws_cdk/aws_datazone/__init__.py +4425 -608
- aws_cdk/aws_dax/__init__.py +83 -6
- aws_cdk/aws_deadline/__init__.py +321 -32
- aws_cdk/aws_detective/__init__.py +35 -6
- aws_cdk/aws_devicefarm/__init__.py +68 -12
- aws_cdk/aws_devopsguru/__init__.py +37 -6
- aws_cdk/aws_directoryservice/__init__.py +53 -4
- aws_cdk/aws_dlm/__init__.py +13 -2
- aws_cdk/aws_dms/__init__.py +184 -27
- aws_cdk/aws_docdb/__init__.py +323 -46
- aws_cdk/aws_docdbelastic/__init__.py +13 -2
- aws_cdk/aws_dsql/__init__.py +340 -12
- aws_cdk/aws_dynamodb/__init__.py +1463 -166
- aws_cdk/aws_ec2/__init__.py +9636 -1120
- aws_cdk/aws_ecr/__init__.py +631 -43
- aws_cdk/aws_ecr_assets/__init__.py +4 -0
- aws_cdk/aws_ecs/__init__.py +6524 -497
- aws_cdk/aws_ecs_patterns/__init__.py +2 -0
- aws_cdk/aws_efs/__init__.py +264 -24
- aws_cdk/aws_eks/__init__.py +1050 -218
- aws_cdk/aws_elasticache/__init__.py +373 -20
- aws_cdk/aws_elasticbeanstalk/__init__.py +75 -8
- aws_cdk/aws_elasticloadbalancing/__init__.py +16 -2
- aws_cdk/aws_elasticloadbalancingv2/__init__.py +1670 -106
- aws_cdk/aws_elasticsearch/__init__.py +282 -9
- aws_cdk/aws_emr/__init__.py +187 -20
- aws_cdk/aws_emrcontainers/__init__.py +71 -2
- aws_cdk/aws_emrserverless/__init__.py +188 -3
- aws_cdk/aws_entityresolution/__init__.py +585 -58
- aws_cdk/aws_events/__init__.py +969 -124
- aws_cdk/aws_events_targets/__init__.py +310 -54
- aws_cdk/aws_eventschemas/__init__.py +46 -8
- aws_cdk/aws_evidently/__init__.py +57 -10
- aws_cdk/aws_evs/__init__.py +2244 -0
- aws_cdk/aws_finspace/__init__.py +71 -2
- aws_cdk/aws_fis/__init__.py +26 -4
- aws_cdk/aws_fms/__init__.py +35 -6
- aws_cdk/aws_forecast/__init__.py +24 -4
- aws_cdk/aws_frauddetector/__init__.py +79 -14
- aws_cdk/aws_fsx/__init__.py +1236 -142
- aws_cdk/aws_gamelift/__init__.py +653 -78
- aws_cdk/aws_gameliftstreams/__init__.py +38 -16
- aws_cdk/aws_globalaccelerator/__init__.py +55 -14
- aws_cdk/aws_glue/__init__.py +1368 -320
- aws_cdk/aws_grafana/__init__.py +13 -2
- aws_cdk/aws_greengrass/__init__.py +654 -32
- aws_cdk/aws_greengrassv2/__init__.py +53 -4
- aws_cdk/aws_groundstation/__init__.py +122 -6
- aws_cdk/aws_guardduty/__init__.py +1613 -123
- aws_cdk/aws_healthimaging/__init__.py +71 -2
- aws_cdk/aws_healthlake/__init__.py +42 -2
- aws_cdk/aws_iam/__init__.py +480 -140
- aws_cdk/aws_identitystore/__init__.py +24 -4
- aws_cdk/aws_imagebuilder/__init__.py +1433 -183
- aws_cdk/aws_inspector/__init__.py +38 -6
- aws_cdk/aws_inspectorv2/__init__.py +2285 -243
- aws_cdk/aws_internetmonitor/__init__.py +71 -2
- aws_cdk/aws_invoicing/__init__.py +13 -2
- aws_cdk/aws_iot/__init__.py +1730 -86
- aws_cdk/aws_iotanalytics/__init__.py +162 -8
- aws_cdk/aws_iotcoredeviceadvisor/__init__.py +106 -40
- aws_cdk/aws_iotevents/__init__.py +122 -6
- aws_cdk/aws_iotfleethub/__init__.py +71 -2
- aws_cdk/aws_iotfleetwise/__init__.py +195 -14
- aws_cdk/aws_iotsitewise/__init__.py +1837 -89
- aws_cdk/aws_iotthingsgraph/__init__.py +13 -2
- aws_cdk/aws_iottwinmaker/__init__.py +115 -10
- aws_cdk/aws_iotwireless/__init__.py +649 -22
- aws_cdk/aws_ivs/__init__.py +561 -57
- aws_cdk/aws_ivschat/__init__.py +24 -4
- aws_cdk/aws_kafkaconnect/__init__.py +35 -6
- aws_cdk/aws_kendra/__init__.py +120 -28
- aws_cdk/aws_kendraranking/__init__.py +13 -2
- aws_cdk/aws_kinesis/__init__.py +622 -22
- aws_cdk/aws_kinesisanalytics/__init__.py +467 -94
- aws_cdk/aws_kinesisanalyticsv2/__init__.py +201 -11
- aws_cdk/aws_kinesisfirehose/__init__.py +3077 -295
- aws_cdk/aws_kinesisvideo/__init__.py +24 -4
- aws_cdk/aws_kms/__init__.py +188 -41
- aws_cdk/aws_lakeformation/__init__.py +80 -15
- aws_cdk/aws_lambda/__init__.py +2101 -252
- aws_cdk/aws_lambda_event_sources/__init__.py +638 -1
- aws_cdk/aws_lambda_nodejs/__init__.py +63 -24
- aws_cdk/aws_launchwizard/__init__.py +13 -2
- aws_cdk/aws_lex/__init__.py +871 -8
- aws_cdk/aws_licensemanager/__init__.py +24 -4
- aws_cdk/aws_lightsail/__init__.py +2159 -975
- aws_cdk/aws_location/__init__.py +618 -14
- aws_cdk/aws_logs/__init__.py +5904 -956
- aws_cdk/aws_lookoutequipment/__init__.py +13 -2
- aws_cdk/aws_lookoutmetrics/__init__.py +38 -6
- aws_cdk/aws_lookoutvision/__init__.py +71 -2
- aws_cdk/aws_m2/__init__.py +94 -19
- aws_cdk/aws_macie/__init__.py +49 -11
- aws_cdk/aws_managedblockchain/__init__.py +180 -6
- aws_cdk/aws_mediaconnect/__init__.py +101 -18
- aws_cdk/aws_mediaconvert/__init__.py +35 -6
- aws_cdk/aws_medialive/__init__.py +1239 -35
- aws_cdk/aws_mediapackage/__init__.py +59 -12
- aws_cdk/aws_mediapackagev2/__init__.py +1607 -225
- aws_cdk/aws_mediastore/__init__.py +13 -2
- aws_cdk/aws_mediatailor/__init__.py +583 -12
- aws_cdk/aws_memorydb/__init__.py +271 -12
- aws_cdk/aws_mpa/__init__.py +1495 -0
- aws_cdk/aws_msk/__init__.py +104 -18
- aws_cdk/aws_mwaa/__init__.py +121 -9
- aws_cdk/aws_neptune/__init__.py +290 -78
- aws_cdk/aws_neptunegraph/__init__.py +24 -4
- aws_cdk/aws_networkfirewall/__init__.py +1289 -273
- aws_cdk/aws_networkmanager/__init__.py +349 -33
- aws_cdk/aws_nimblestudio/__init__.py +75 -8
- aws_cdk/aws_notifications/__init__.py +317 -12
- aws_cdk/aws_notificationscontacts/__init__.py +13 -2
- aws_cdk/aws_oam/__init__.py +24 -4
- aws_cdk/aws_observabilityadmin/__init__.py +2561 -0
- aws_cdk/aws_odb/__init__.py +5872 -0
- aws_cdk/aws_omics/__init__.py +2495 -529
- aws_cdk/aws_opensearchserverless/__init__.py +312 -37
- aws_cdk/aws_opensearchservice/__init__.py +495 -19
- aws_cdk/aws_opsworks/__init__.py +235 -139
- aws_cdk/aws_opsworkscm/__init__.py +16 -52
- aws_cdk/aws_organizations/__init__.py +70 -10
- aws_cdk/aws_osis/__init__.py +167 -2
- aws_cdk/aws_panorama/__init__.py +151 -6
- aws_cdk/aws_paymentcryptography/__init__.py +24 -4
- aws_cdk/aws_pcaconnectorad/__init__.py +59 -10
- aws_cdk/aws_pcaconnectorscep/__init__.py +24 -4
- aws_cdk/aws_pcs/__init__.py +387 -68
- aws_cdk/aws_personalize/__init__.py +46 -8
- aws_cdk/aws_pinpoint/__init__.py +329 -38
- aws_cdk/aws_pinpointemail/__init__.py +48 -8
- aws_cdk/aws_pipes/__init__.py +12 -2
- aws_cdk/aws_proton/__init__.py +37 -6
- aws_cdk/aws_qbusiness/__init__.py +635 -34
- aws_cdk/aws_qldb/__init__.py +24 -4
- aws_cdk/aws_quicksight/__init__.py +7900 -1160
- aws_cdk/aws_ram/__init__.py +24 -4
- aws_cdk/aws_rbin/__init__.py +12 -2
- aws_cdk/aws_rds/__init__.py +3345 -512
- aws_cdk/aws_redshift/__init__.py +143 -20
- aws_cdk/aws_redshiftserverless/__init__.py +692 -4
- aws_cdk/aws_refactorspaces/__init__.py +64 -14
- aws_cdk/aws_rekognition/__init__.py +93 -6
- aws_cdk/aws_resiliencehub/__init__.py +24 -4
- aws_cdk/aws_resourceexplorer2/__init__.py +35 -6
- aws_cdk/aws_resourcegroups/__init__.py +82 -4
- aws_cdk/aws_robomaker/__init__.py +72 -12
- aws_cdk/aws_rolesanywhere/__init__.py +180 -6
- aws_cdk/aws_route53/__init__.py +3273 -1442
- aws_cdk/aws_route53_targets/__init__.py +3 -0
- aws_cdk/aws_route53profiles/__init__.py +37 -6
- aws_cdk/aws_route53recoverycontrol/__init__.py +46 -8
- aws_cdk/aws_route53recoveryreadiness/__init__.py +104 -8
- aws_cdk/aws_route53resolver/__init__.py +226 -36
- aws_cdk/aws_rtbfabric/__init__.py +3498 -0
- aws_cdk/aws_rum/__init__.py +13 -2
- aws_cdk/aws_s3/__init__.py +1291 -158
- aws_cdk/aws_s3_assets/__init__.py +11 -11
- aws_cdk/aws_s3_deployment/__init__.py +147 -11
- aws_cdk/aws_s3_notifications/__init__.py +7 -7
- aws_cdk/aws_s3express/__init__.py +266 -8
- aws_cdk/aws_s3objectlambda/__init__.py +68 -16
- aws_cdk/aws_s3outposts/__init__.py +46 -8
- aws_cdk/aws_s3tables/__init__.py +2000 -323
- aws_cdk/aws_s3vectors/__init__.py +1378 -0
- aws_cdk/aws_sagemaker/__init__.py +6617 -363
- aws_cdk/aws_sam/__init__.py +79 -14
- aws_cdk/aws_scheduler/__init__.py +237 -4
- aws_cdk/aws_sdb/__init__.py +12 -2
- aws_cdk/aws_secretsmanager/__init__.py +170 -14
- aws_cdk/aws_securityhub/__init__.py +3121 -176
- aws_cdk/aws_securitylake/__init__.py +46 -8
- aws_cdk/aws_servicecatalog/__init__.py +405 -246
- aws_cdk/aws_servicecatalogappregistry/__init__.py +164 -8
- aws_cdk/aws_servicediscovery/__init__.py +140 -47
- aws_cdk/aws_ses/__init__.py +1231 -140
- aws_cdk/aws_shield/__init__.py +46 -8
- aws_cdk/aws_signer/__init__.py +27 -4
- aws_cdk/aws_simspaceweaver/__init__.py +42 -2
- aws_cdk/aws_smsvoice/__init__.py +4716 -0
- aws_cdk/aws_sns/__init__.py +245 -29
- aws_cdk/aws_sns_subscriptions/__init__.py +3 -1
- aws_cdk/aws_sqs/__init__.py +211 -14
- aws_cdk/aws_ssm/__init__.py +401 -58
- aws_cdk/aws_ssmcontacts/__init__.py +46 -8
- aws_cdk/aws_ssmguiconnect/__init__.py +13 -2
- aws_cdk/aws_ssmincidents/__init__.py +24 -4
- aws_cdk/aws_ssmquicksetup/__init__.py +383 -6
- aws_cdk/aws_sso/__init__.py +70 -12
- aws_cdk/aws_stepfunctions/__init__.py +615 -70
- aws_cdk/aws_stepfunctions_tasks/__init__.py +781 -144
- aws_cdk/aws_supportapp/__init__.py +39 -6
- aws_cdk/aws_synthetics/__init__.py +861 -75
- aws_cdk/aws_systemsmanagersap/__init__.py +13 -2
- aws_cdk/aws_timestream/__init__.py +104 -8
- aws_cdk/aws_transfer/__init__.py +784 -87
- aws_cdk/aws_verifiedpermissions/__init__.py +145 -17
- aws_cdk/aws_voiceid/__init__.py +41 -2
- aws_cdk/aws_vpclattice/__init__.py +376 -30
- aws_cdk/aws_waf/__init__.py +79 -14
- aws_cdk/aws_wafregional/__init__.py +123 -22
- aws_cdk/aws_wafv2/__init__.py +1179 -60
- aws_cdk/aws_wisdom/__init__.py +1401 -90
- aws_cdk/aws_workspaces/__init__.py +93 -6
- aws_cdk/aws_workspacesinstances/__init__.py +3940 -0
- aws_cdk/aws_workspacesthinclient/__init__.py +79 -10
- aws_cdk/aws_workspacesweb/__init__.py +1057 -141
- aws_cdk/aws_xray/__init__.py +48 -8
- aws_cdk/cloud_assembly_schema/__init__.py +231 -6
- aws_cdk/custom_resources/__init__.py +40 -12
- aws_cdk/cx_api/__init__.py +85 -14
- aws_cdk/interfaces/__init__.py +739 -0
- aws_cdk/interfaces/alexa_ask/__init__.py +146 -0
- aws_cdk/interfaces/aws_accessanalyzer/__init__.py +146 -0
- aws_cdk/interfaces/aws_acmpca/__init__.py +501 -0
- aws_cdk/interfaces/aws_aiops/__init__.py +146 -0
- aws_cdk/interfaces/aws_amazonmq/__init__.py +386 -0
- aws_cdk/interfaces/aws_amplify/__init__.py +352 -0
- aws_cdk/interfaces/aws_amplifyuibuilder/__init__.py +454 -0
- aws_cdk/interfaces/aws_apigateway/__init__.py +2486 -0
- aws_cdk/interfaces/aws_apigatewayv2/__init__.py +1651 -0
- aws_cdk/interfaces/aws_appconfig/__init__.py +1020 -0
- aws_cdk/interfaces/aws_appflow/__init__.py +404 -0
- aws_cdk/interfaces/aws_appintegrations/__init__.py +396 -0
- aws_cdk/interfaces/aws_applicationautoscaling/__init__.py +307 -0
- aws_cdk/interfaces/aws_applicationinsights/__init__.py +148 -0
- aws_cdk/interfaces/aws_applicationsignals/__init__.py +358 -0
- aws_cdk/interfaces/aws_appmesh/__init__.py +888 -0
- aws_cdk/interfaces/aws_apprunner/__init__.py +564 -0
- aws_cdk/interfaces/aws_appstream/__init__.py +1482 -0
- aws_cdk/interfaces/aws_appsync/__init__.py +1326 -0
- aws_cdk/interfaces/aws_apptest/__init__.py +163 -0
- aws_cdk/interfaces/aws_aps/__init__.py +558 -0
- aws_cdk/interfaces/aws_arcregionswitch/__init__.py +146 -0
- aws_cdk/interfaces/aws_arczonalshift/__init__.py +273 -0
- aws_cdk/interfaces/aws_athena/__init__.py +575 -0
- aws_cdk/interfaces/aws_auditmanager/__init__.py +163 -0
- aws_cdk/interfaces/aws_autoscaling/__init__.py +705 -0
- aws_cdk/interfaces/aws_autoscalingplans/__init__.py +148 -0
- aws_cdk/interfaces/aws_b2bi/__init__.py +524 -0
- aws_cdk/interfaces/aws_backup/__init__.py +955 -0
- aws_cdk/interfaces/aws_backupgateway/__init__.py +146 -0
- aws_cdk/interfaces/aws_batch/__init__.py +681 -0
- aws_cdk/interfaces/aws_bcmdataexports/__init__.py +146 -0
- aws_cdk/interfaces/aws_bedrock/__init__.py +1942 -0
- aws_cdk/interfaces/aws_bedrockagentcore/__init__.py +934 -0
- aws_cdk/interfaces/aws_billing/__init__.py +146 -0
- aws_cdk/interfaces/aws_billingconductor/__init__.py +463 -0
- aws_cdk/interfaces/aws_budgets/__init__.py +261 -0
- aws_cdk/interfaces/aws_cassandra/__init__.py +381 -0
- aws_cdk/interfaces/aws_ce/__init__.py +352 -0
- aws_cdk/interfaces/aws_certificatemanager/__init__.py +251 -0
- aws_cdk/interfaces/aws_chatbot/__init__.py +366 -0
- aws_cdk/interfaces/aws_cleanrooms/__init__.py +1103 -0
- aws_cdk/interfaces/aws_cleanroomsml/__init__.py +148 -0
- aws_cdk/interfaces/aws_cloud9/__init__.py +166 -0
- aws_cdk/interfaces/aws_cloudformation/__init__.py +1919 -0
- aws_cdk/interfaces/aws_cloudfront/__init__.py +1998 -0
- aws_cdk/interfaces/aws_cloudtrail/__init__.py +570 -0
- aws_cdk/interfaces/aws_cloudwatch/__init__.py +733 -0
- aws_cdk/interfaces/aws_codeartifact/__init__.py +352 -0
- aws_cdk/interfaces/aws_codebuild/__init__.py +487 -0
- aws_cdk/interfaces/aws_codecommit/__init__.py +163 -0
- aws_cdk/interfaces/aws_codeconnections/__init__.py +146 -0
- aws_cdk/interfaces/aws_codedeploy/__init__.py +352 -0
- aws_cdk/interfaces/aws_codeguruprofiler/__init__.py +168 -0
- aws_cdk/interfaces/aws_codegurureviewer/__init__.py +148 -0
- aws_cdk/interfaces/aws_codepipeline/__init__.py +388 -0
- aws_cdk/interfaces/aws_codestar/__init__.py +146 -0
- aws_cdk/interfaces/aws_codestarconnections/__init__.py +370 -0
- aws_cdk/interfaces/aws_codestarnotifications/__init__.py +148 -0
- aws_cdk/interfaces/aws_cognito/__init__.py +1929 -0
- aws_cdk/interfaces/aws_comprehend/__init__.py +251 -0
- aws_cdk/interfaces/aws_config/__init__.py +1165 -0
- aws_cdk/interfaces/aws_connect/__init__.py +2949 -0
- aws_cdk/interfaces/aws_connectcampaigns/__init__.py +146 -0
- aws_cdk/interfaces/aws_connectcampaignsv2/__init__.py +146 -0
- aws_cdk/interfaces/aws_controltower/__init__.py +394 -0
- aws_cdk/interfaces/aws_cur/__init__.py +146 -0
- aws_cdk/interfaces/aws_customerprofiles/__init__.py +915 -0
- aws_cdk/interfaces/aws_databrew/__init__.py +661 -0
- aws_cdk/interfaces/aws_datapipeline/__init__.py +146 -0
- aws_cdk/interfaces/aws_datasync/__init__.py +1384 -0
- aws_cdk/interfaces/aws_datazone/__init__.py +2238 -0
- aws_cdk/interfaces/aws_dax/__init__.py +364 -0
- aws_cdk/interfaces/aws_deadline/__init__.py +1303 -0
- aws_cdk/interfaces/aws_detective/__init__.py +364 -0
- aws_cdk/interfaces/aws_devicefarm/__init__.py +663 -0
- aws_cdk/interfaces/aws_devopsguru/__init__.py +362 -0
- aws_cdk/interfaces/aws_directoryservice/__init__.py +251 -0
- aws_cdk/interfaces/aws_dlm/__init__.py +166 -0
- aws_cdk/interfaces/aws_dms/__init__.py +1176 -0
- aws_cdk/interfaces/aws_docdb/__init__.py +560 -0
- aws_cdk/interfaces/aws_docdbelastic/__init__.py +146 -0
- aws_cdk/interfaces/aws_dsql/__init__.py +146 -0
- aws_cdk/interfaces/aws_dynamodb/__init__.py +278 -0
- aws_cdk/interfaces/aws_ec2/__init__.py +11963 -0
- aws_cdk/interfaces/aws_ecr/__init__.py +814 -0
- aws_cdk/interfaces/aws_ecs/__init__.py +845 -0
- aws_cdk/interfaces/aws_efs/__init__.py +392 -0
- aws_cdk/interfaces/aws_eks/__init__.py +948 -0
- aws_cdk/interfaces/aws_elasticache/__init__.py +1108 -0
- aws_cdk/interfaces/aws_elasticbeanstalk/__init__.py +503 -0
- aws_cdk/interfaces/aws_elasticloadbalancing/__init__.py +148 -0
- aws_cdk/interfaces/aws_elasticloadbalancingv2/__init__.py +795 -0
- aws_cdk/interfaces/aws_elasticsearch/__init__.py +158 -0
- aws_cdk/interfaces/aws_emr/__init__.py +913 -0
- aws_cdk/interfaces/aws_emrcontainers/__init__.py +168 -0
- aws_cdk/interfaces/aws_emrserverless/__init__.py +166 -0
- aws_cdk/interfaces/aws_entityresolution/__init__.py +608 -0
- aws_cdk/interfaces/aws_events/__init__.py +872 -0
- aws_cdk/interfaces/aws_eventschemas/__init__.py +455 -0
- aws_cdk/interfaces/aws_evidently/__init__.py +558 -0
- aws_cdk/interfaces/aws_evs/__init__.py +166 -0
- aws_cdk/interfaces/aws_finspace/__init__.py +166 -0
- aws_cdk/interfaces/aws_fis/__init__.py +271 -0
- aws_cdk/interfaces/aws_fms/__init__.py +364 -0
- aws_cdk/interfaces/aws_forecast/__init__.py +249 -0
- aws_cdk/interfaces/aws_frauddetector/__init__.py +764 -0
- aws_cdk/interfaces/aws_fsx/__init__.py +663 -0
- aws_cdk/interfaces/aws_gamelift/__init__.py +1325 -0
- aws_cdk/interfaces/aws_gameliftstreams/__init__.py +249 -0
- aws_cdk/interfaces/aws_globalaccelerator/__init__.py +461 -0
- aws_cdk/interfaces/aws_glue/__init__.py +2377 -0
- aws_cdk/interfaces/aws_grafana/__init__.py +146 -0
- aws_cdk/interfaces/aws_greengrass/__init__.py +1871 -0
- aws_cdk/interfaces/aws_greengrassv2/__init__.py +251 -0
- aws_cdk/interfaces/aws_groundstation/__init__.py +396 -0
- aws_cdk/interfaces/aws_guardduty/__init__.py +1225 -0
- aws_cdk/interfaces/aws_healthimaging/__init__.py +163 -0
- aws_cdk/interfaces/aws_healthlake/__init__.py +146 -0
- aws_cdk/interfaces/aws_iam/__init__.py +1803 -0
- aws_cdk/interfaces/aws_identitystore/__init__.py +288 -0
- aws_cdk/interfaces/aws_imagebuilder/__init__.py +984 -0
- aws_cdk/interfaces/aws_inspector/__init__.py +354 -0
- aws_cdk/interfaces/aws_inspectorv2/__init__.py +467 -0
- aws_cdk/interfaces/aws_internetmonitor/__init__.py +163 -0
- aws_cdk/interfaces/aws_invoicing/__init__.py +146 -0
- aws_cdk/interfaces/aws_iot/__init__.py +3483 -0
- aws_cdk/interfaces/aws_iotanalytics/__init__.py +455 -0
- aws_cdk/interfaces/aws_iotcoredeviceadvisor/__init__.py +168 -0
- aws_cdk/interfaces/aws_iotevents/__init__.py +352 -0
- aws_cdk/interfaces/aws_iotfleethub/__init__.py +166 -0
- aws_cdk/interfaces/aws_iotfleetwise/__init__.py +892 -0
- aws_cdk/interfaces/aws_iotsitewise/__init__.py +1097 -0
- aws_cdk/interfaces/aws_iotthingsgraph/__init__.py +146 -0
- aws_cdk/interfaces/aws_iottwinmaker/__init__.py +711 -0
- aws_cdk/interfaces/aws_iotwireless/__init__.py +1401 -0
- aws_cdk/interfaces/aws_ivs/__init__.py +1075 -0
- aws_cdk/interfaces/aws_ivschat/__init__.py +251 -0
- aws_cdk/interfaces/aws_kafkaconnect/__init__.py +354 -0
- aws_cdk/interfaces/aws_kendra/__init__.py +428 -0
- aws_cdk/interfaces/aws_kendraranking/__init__.py +166 -0
- aws_cdk/interfaces/aws_kinesis/__init__.py +364 -0
- aws_cdk/interfaces/aws_kinesisanalytics/__init__.py +364 -0
- aws_cdk/interfaces/aws_kinesisanalyticsv2/__init__.py +479 -0
- aws_cdk/interfaces/aws_kinesisfirehose/__init__.py +168 -0
- aws_cdk/interfaces/aws_kinesisvideo/__init__.py +283 -0
- aws_cdk/interfaces/aws_kms/__init__.py +376 -0
- aws_cdk/interfaces/aws_lakeformation/__init__.py +860 -0
- aws_cdk/interfaces/aws_lambda/__init__.py +1141 -0
- aws_cdk/interfaces/aws_launchwizard/__init__.py +146 -0
- aws_cdk/interfaces/aws_lex/__init__.py +513 -0
- aws_cdk/interfaces/aws_licensemanager/__init__.py +249 -0
- aws_cdk/interfaces/aws_lightsail/__init__.py +1744 -0
- aws_cdk/interfaces/aws_location/__init__.py +879 -0
- aws_cdk/interfaces/aws_logs/__init__.py +1667 -0
- aws_cdk/interfaces/aws_lookoutequipment/__init__.py +168 -0
- aws_cdk/interfaces/aws_lookoutmetrics/__init__.py +251 -0
- aws_cdk/interfaces/aws_lookoutvision/__init__.py +163 -0
- aws_cdk/interfaces/aws_m2/__init__.py +352 -0
- aws_cdk/interfaces/aws_macie/__init__.py +512 -0
- aws_cdk/interfaces/aws_managedblockchain/__init__.py +381 -0
- aws_cdk/interfaces/aws_mediaconnect/__init__.py +1028 -0
- aws_cdk/interfaces/aws_mediaconvert/__init__.py +396 -0
- aws_cdk/interfaces/aws_medialive/__init__.py +1755 -0
- aws_cdk/interfaces/aws_mediapackage/__init__.py +644 -0
- aws_cdk/interfaces/aws_mediapackagev2/__init__.py +618 -0
- aws_cdk/interfaces/aws_mediastore/__init__.py +146 -0
- aws_cdk/interfaces/aws_mediatailor/__init__.py +788 -0
- aws_cdk/interfaces/aws_memorydb/__init__.py +685 -0
- aws_cdk/interfaces/aws_mpa/__init__.py +249 -0
- aws_cdk/interfaces/aws_msk/__init__.py +764 -0
- aws_cdk/interfaces/aws_mwaa/__init__.py +166 -0
- aws_cdk/interfaces/aws_neptune/__init__.py +663 -0
- aws_cdk/interfaces/aws_neptunegraph/__init__.py +265 -0
- aws_cdk/interfaces/aws_networkfirewall/__init__.py +669 -0
- aws_cdk/interfaces/aws_networkmanager/__init__.py +1832 -0
- aws_cdk/interfaces/aws_nimblestudio/__init__.py +388 -0
- aws_cdk/interfaces/aws_notifications/__init__.py +868 -0
- aws_cdk/interfaces/aws_notificationscontacts/__init__.py +148 -0
- aws_cdk/interfaces/aws_oam/__init__.py +249 -0
- aws_cdk/interfaces/aws_observabilityadmin/__init__.py +362 -0
- aws_cdk/interfaces/aws_odb/__init__.py +562 -0
- aws_cdk/interfaces/aws_omics/__init__.py +838 -0
- aws_cdk/interfaces/aws_opensearchserverless/__init__.py +859 -0
- aws_cdk/interfaces/aws_opensearchservice/__init__.py +283 -0
- aws_cdk/interfaces/aws_opsworks/__init__.py +772 -0
- aws_cdk/interfaces/aws_opsworkscm/__init__.py +146 -0
- aws_cdk/interfaces/aws_organizations/__init__.py +646 -0
- aws_cdk/interfaces/aws_osis/__init__.py +146 -0
- aws_cdk/interfaces/aws_panorama/__init__.py +420 -0
- aws_cdk/interfaces/aws_paymentcryptography/__init__.py +249 -0
- aws_cdk/interfaces/aws_pcaconnectorad/__init__.py +608 -0
- aws_cdk/interfaces/aws_pcaconnectorscep/__init__.py +249 -0
- aws_cdk/interfaces/aws_pcs/__init__.py +352 -0
- aws_cdk/interfaces/aws_personalize/__init__.py +455 -0
- aws_cdk/interfaces/aws_pinpoint/__init__.py +2125 -0
- aws_cdk/interfaces/aws_pinpointemail/__init__.py +467 -0
- aws_cdk/interfaces/aws_pipes/__init__.py +158 -0
- aws_cdk/interfaces/aws_proton/__init__.py +360 -0
- aws_cdk/interfaces/aws_qbusiness/__init__.py +1122 -0
- aws_cdk/interfaces/aws_qldb/__init__.py +283 -0
- aws_cdk/interfaces/aws_quicksight/__init__.py +1566 -0
- aws_cdk/interfaces/aws_ram/__init__.py +249 -0
- aws_cdk/interfaces/aws_rbin/__init__.py +146 -0
- aws_cdk/interfaces/aws_rds/__init__.py +1780 -0
- aws_cdk/interfaces/aws_redshift/__init__.py +1104 -0
- aws_cdk/interfaces/aws_redshiftserverless/__init__.py +356 -0
- aws_cdk/interfaces/aws_refactorspaces/__init__.py +605 -0
- aws_cdk/interfaces/aws_rekognition/__init__.py +406 -0
- aws_cdk/interfaces/aws_resiliencehub/__init__.py +251 -0
- aws_cdk/interfaces/aws_resourceexplorer2/__init__.py +354 -0
- aws_cdk/interfaces/aws_resourcegroups/__init__.py +261 -0
- aws_cdk/interfaces/aws_robomaker/__init__.py +673 -0
- aws_cdk/interfaces/aws_rolesanywhere/__init__.py +384 -0
- aws_cdk/interfaces/aws_route53/__init__.py +804 -0
- aws_cdk/interfaces/aws_route53profiles/__init__.py +368 -0
- aws_cdk/interfaces/aws_route53recoverycontrol/__init__.py +463 -0
- aws_cdk/interfaces/aws_route53recoveryreadiness/__init__.py +535 -0
- aws_cdk/interfaces/aws_route53resolver/__init__.py +1356 -0
- aws_cdk/interfaces/aws_rtbfabric/__init__.py +352 -0
- aws_cdk/interfaces/aws_rum/__init__.py +146 -0
- aws_cdk/interfaces/aws_s3/__init__.py +1171 -0
- aws_cdk/interfaces/aws_s3express/__init__.py +392 -0
- aws_cdk/interfaces/aws_s3objectlambda/__init__.py +271 -0
- aws_cdk/interfaces/aws_s3outposts/__init__.py +455 -0
- aws_cdk/interfaces/aws_s3tables/__init__.py +575 -0
- aws_cdk/interfaces/aws_s3vectors/__init__.py +354 -0
- aws_cdk/interfaces/aws_sagemaker/__init__.py +3797 -0
- aws_cdk/interfaces/aws_sam/__init__.py +603 -0
- aws_cdk/interfaces/aws_scheduler/__init__.py +286 -0
- aws_cdk/interfaces/aws_sdb/__init__.py +146 -0
- aws_cdk/interfaces/aws_secretsmanager/__init__.py +461 -0
- aws_cdk/interfaces/aws_securityhub/__init__.py +1499 -0
- aws_cdk/interfaces/aws_securitylake/__init__.py +474 -0
- aws_cdk/interfaces/aws_servicecatalog/__init__.py +1829 -0
- aws_cdk/interfaces/aws_servicecatalogappregistry/__init__.py +557 -0
- aws_cdk/interfaces/aws_servicediscovery/__init__.py +636 -0
- aws_cdk/interfaces/aws_ses/__init__.py +2018 -0
- aws_cdk/interfaces/aws_shield/__init__.py +455 -0
- aws_cdk/interfaces/aws_signer/__init__.py +266 -0
- aws_cdk/interfaces/aws_simspaceweaver/__init__.py +146 -0
- aws_cdk/interfaces/aws_smsvoice/__init__.py +892 -0
- aws_cdk/interfaces/aws_sns/__init__.py +455 -0
- aws_cdk/interfaces/aws_sqs/__init__.py +364 -0
- aws_cdk/interfaces/aws_ssm/__init__.py +982 -0
- aws_cdk/interfaces/aws_ssmcontacts/__init__.py +455 -0
- aws_cdk/interfaces/aws_ssmguiconnect/__init__.py +146 -0
- aws_cdk/interfaces/aws_ssmincidents/__init__.py +249 -0
- aws_cdk/interfaces/aws_ssmquicksetup/__init__.py +253 -0
- aws_cdk/interfaces/aws_sso/__init__.py +797 -0
- aws_cdk/interfaces/aws_stepfunctions/__init__.py +459 -0
- aws_cdk/interfaces/aws_supportapp/__init__.py +372 -0
- aws_cdk/interfaces/aws_synthetics/__init__.py +249 -0
- aws_cdk/interfaces/aws_systemsmanagersap/__init__.py +148 -0
- aws_cdk/interfaces/aws_timestream/__init__.py +526 -0
- aws_cdk/interfaces/aws_transfer/__init__.py +967 -0
- aws_cdk/interfaces/aws_verifiedpermissions/__init__.py +538 -0
- aws_cdk/interfaces/aws_voiceid/__init__.py +146 -0
- aws_cdk/interfaces/aws_vpclattice/__init__.py +1418 -0
- aws_cdk/interfaces/aws_waf/__init__.py +764 -0
- aws_cdk/interfaces/aws_wafregional/__init__.py +1182 -0
- aws_cdk/interfaces/aws_wafv2/__init__.py +870 -0
- aws_cdk/interfaces/aws_wisdom/__init__.py +1556 -0
- aws_cdk/interfaces/aws_workspaces/__init__.py +352 -0
- aws_cdk/interfaces/aws_workspacesinstances/__init__.py +390 -0
- aws_cdk/interfaces/aws_workspacesthinclient/__init__.py +168 -0
- aws_cdk/interfaces/aws_workspacesweb/__init__.py +1085 -0
- aws_cdk/interfaces/aws_xray/__init__.py +457 -0
- aws_cdk/pipelines/__init__.py +192 -42
- aws_cdk/region_info/__init__.py +3 -0
- aws_cdk/triggers/__init__.py +60 -18
- {aws_cdk_lib-2.200.2.dist-info → aws_cdk_lib-2.224.0.dist-info}/METADATA +338 -16
- aws_cdk_lib-2.224.0.dist-info/RECORD +584 -0
- aws_cdk_lib-2.200.2.dist-info/RECORD +0 -304
- {aws_cdk_lib-2.200.2.dist-info → aws_cdk_lib-2.224.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.200.2.dist-info → aws_cdk_lib-2.224.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.200.2.dist-info → aws_cdk_lib-2.224.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.200.2.dist-info → aws_cdk_lib-2.224.0.dist-info}/top_level.txt +0 -0
|
@@ -54,6 +54,41 @@ metric = cloudwatch.Metric(
|
|
|
54
54
|
)
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
+
### Metric ID
|
|
58
|
+
|
|
59
|
+
Metrics can be assigned a unique identifier using the `id` property. This is
|
|
60
|
+
useful when referencing metrics in math expressions:
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
metric = cloudwatch.Metric(
|
|
64
|
+
namespace="AWS/Lambda",
|
|
65
|
+
metric_name="Invocations",
|
|
66
|
+
dimensions_map={
|
|
67
|
+
"FunctionName": "MyFunction"
|
|
68
|
+
},
|
|
69
|
+
id="invocations"
|
|
70
|
+
)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The `id` must start with a lowercase letter and can only contain letters, numbers, and underscores.
|
|
74
|
+
|
|
75
|
+
### Metric Visible
|
|
76
|
+
|
|
77
|
+
Metrics can be hidden from dashboard graphs using the `visible` property:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
# fn: lambda.Function
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
metric = fn.metric_errors(
|
|
84
|
+
visible=False
|
|
85
|
+
)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
By default, all metrics are visible (`visible: true`). Setting `visible: false`
|
|
89
|
+
hides the metric from dashboard visualizations while still allowing it to be
|
|
90
|
+
used in math expressions given that it has an `id` set to it.
|
|
91
|
+
|
|
57
92
|
### Metric Math
|
|
58
93
|
|
|
59
94
|
Math expressions are supported by instantiating the `MathExpression` class.
|
|
@@ -89,21 +124,45 @@ problem_percentage = cloudwatch.MathExpression(
|
|
|
89
124
|
)
|
|
90
125
|
```
|
|
91
126
|
|
|
127
|
+
### Metric ID Usage in Math Expressions
|
|
128
|
+
|
|
129
|
+
When metrics have custom IDs, you can reference them directly in math expressions.
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
# fn: lambda.Function
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
invocations = fn.metric_invocations(
|
|
136
|
+
id="lambda_invocations"
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
errors = fn.metric_errors(
|
|
140
|
+
id="lambda_errors"
|
|
141
|
+
)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
When metrics have predefined IDs, they can be referenced directly in math expressions by their ID without requiring the `usingMetrics` property.
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
error_rate = cloudwatch.MathExpression(
|
|
148
|
+
expression="lambda_errors / lambda_invocations * 100",
|
|
149
|
+
label="Error Rate (%)"
|
|
150
|
+
)
|
|
151
|
+
```
|
|
152
|
+
|
|
92
153
|
### Search Expressions
|
|
93
154
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
155
|
+
Search expressions allow you to dynamically discover and display metrics that match specific criteria, making them ideal for monitoring dynamic infrastructure where the exact metrics aren't known in advance. A single search expression can return up to 500 time series.
|
|
156
|
+
|
|
157
|
+
#### Using SearchExpression Class
|
|
158
|
+
|
|
159
|
+
Following is an example of a search expression that returns all CPUUtilization metrics with the graph showing the Average statistic with an aggregation period of 5 minutes:
|
|
97
160
|
|
|
98
161
|
```python
|
|
99
|
-
cpu_utilization = cloudwatch.
|
|
100
|
-
expression="SEARCH('{AWS/EC2,InstanceId} MetricName=\"CPUUtilization\"', 'Average',
|
|
101
|
-
|
|
102
|
-
#
|
|
103
|
-
# of using the expression as metric label. This is especially appropriate
|
|
104
|
-
# when using expressions that return multiple time series (like SEARCH()
|
|
105
|
-
# or METRICS()), to show the labels of the retrieved metrics only.
|
|
106
|
-
label=""
|
|
162
|
+
cpu_utilization = cloudwatch.SearchExpression(
|
|
163
|
+
expression="SEARCH('{AWS/EC2,InstanceId} MetricName=\"CPUUtilization\"', 'Average', 900)",
|
|
164
|
+
label="EC2 CPU Utilization",
|
|
165
|
+
color="#ff7f0e"
|
|
107
166
|
)
|
|
108
167
|
```
|
|
109
168
|
|
|
@@ -111,6 +170,15 @@ Cross-account and cross-region search expressions are also supported. Use
|
|
|
111
170
|
the `searchAccount` and `searchRegion` properties to specify the account
|
|
112
171
|
and/or region to evaluate the search expression against.
|
|
113
172
|
|
|
173
|
+
```python
|
|
174
|
+
cross_account_search = cloudwatch.SearchExpression(
|
|
175
|
+
expression="SEARCH('{AWS/Lambda,FunctionName} MetricName=\"Invocations\"', 'Sum', 300)",
|
|
176
|
+
search_account="123456789012",
|
|
177
|
+
search_region="us-west-2",
|
|
178
|
+
label="Production Lambda Invocations"
|
|
179
|
+
)
|
|
180
|
+
```
|
|
181
|
+
|
|
114
182
|
### Aggregation
|
|
115
183
|
|
|
116
184
|
To graph or alarm on metrics you must aggregate them first, using a function
|
|
@@ -418,7 +486,7 @@ metric = cloudwatch.Metric(
|
|
|
418
486
|
namespace="AWS/EC2",
|
|
419
487
|
metric_name="CPUUtilization",
|
|
420
488
|
statistic="Average",
|
|
421
|
-
period=Duration.
|
|
489
|
+
period=Duration.hours(1)
|
|
422
490
|
)
|
|
423
491
|
|
|
424
492
|
# Create an anomaly detection alarm
|
|
@@ -541,6 +609,20 @@ dashboard.add_widgets(cloudwatch.GraphWidget(
|
|
|
541
609
|
))
|
|
542
610
|
```
|
|
543
611
|
|
|
612
|
+
The `displayLabelsOnChart` property can be set to `true` to show labels on the chart. Note that this only has an effect when the `view` property is set to `cloudwatch.GraphWidgetView.PIE`.
|
|
613
|
+
|
|
614
|
+
```python
|
|
615
|
+
# dashboard: cloudwatch.Dashboard
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
dashboard.add_widgets(cloudwatch.GraphWidget(
|
|
619
|
+
# ...
|
|
620
|
+
|
|
621
|
+
view=cloudwatch.GraphWidgetView.PIE,
|
|
622
|
+
display_labels_on_chart=True
|
|
623
|
+
))
|
|
624
|
+
```
|
|
625
|
+
|
|
544
626
|
The `start` and `end` properties can be used to specify the time range for each graph widget independently from those of the dashboard.
|
|
545
627
|
The parameters can be specified at `GraphWidget`, `GaugeWidget`, and `SingleValueWidget`.
|
|
546
628
|
|
|
@@ -811,6 +893,20 @@ dashboard.add_widgets(cloudwatch.LogQueryWidget(
|
|
|
811
893
|
))
|
|
812
894
|
```
|
|
813
895
|
|
|
896
|
+
Log Insights QL is the default query language. You may specify an [alternate query language: OpenSearch PPL or SQL](https://aws.amazon.com/blogs/aws/new-amazon-cloudwatch-and-amazon-opensearch-service-launch-an-integrated-analytics-experience/), if desired:
|
|
897
|
+
|
|
898
|
+
```python
|
|
899
|
+
# dashboard: cloudwatch.Dashboard
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
dashboard.add_widgets(cloudwatch.LogQueryWidget(
|
|
903
|
+
log_group_names=["my-log-group"],
|
|
904
|
+
view=cloudwatch.LogQueryVisualizationType.TABLE,
|
|
905
|
+
query_string="SELECT count(*) as count FROM 'my-log-group'",
|
|
906
|
+
query_language=cloudwatch.LogQueryLanguage.SQL
|
|
907
|
+
))
|
|
908
|
+
```
|
|
909
|
+
|
|
814
910
|
### Custom widget
|
|
815
911
|
|
|
816
912
|
A `CustomWidget` shows the result of an AWS Lambda function:
|
|
@@ -984,6 +1080,38 @@ dashboard = cw.Dashboard(self, "Dash",
|
|
|
984
1080
|
```
|
|
985
1081
|
|
|
986
1082
|
You can add a variable after object instantiation with the method `dashboard.addVariable()`.
|
|
1083
|
+
|
|
1084
|
+
### Cross-Account Visibility
|
|
1085
|
+
|
|
1086
|
+
Both Log and Metric Widget objects support cross-account visibility by allowing you to specify the AWS Account ID that the data (logs or metrics) originates from.
|
|
1087
|
+
|
|
1088
|
+
**Prerequisites:**
|
|
1089
|
+
|
|
1090
|
+
1. The monitoring account must be set up as a monitoring account
|
|
1091
|
+
2. The source account must grant permissions to the monitoring account
|
|
1092
|
+
3. Appropriate IAM roles and policies must be configured
|
|
1093
|
+
|
|
1094
|
+
For detailed setup instructions, see [Cross-Account Cross-Region CloudWatch Console](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html).
|
|
1095
|
+
|
|
1096
|
+
To use this feature, you can set the `accountId` property on `LogQueryWidget`, `GraphWidget`, `AlarmWidget`, `SingleValueWidget`, and `GaugeWidget` constructs:
|
|
1097
|
+
|
|
1098
|
+
```python
|
|
1099
|
+
# dashboard: cloudwatch.Dashboard
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
dashboard.add_widgets(cloudwatch.GraphWidget(
|
|
1103
|
+
# ...
|
|
1104
|
+
account_id="123456789012"
|
|
1105
|
+
))
|
|
1106
|
+
|
|
1107
|
+
dashboard.add_widgets(cloudwatch.LogQueryWidget(
|
|
1108
|
+
log_group_names=["my-log-group"],
|
|
1109
|
+
# ...
|
|
1110
|
+
account_id="123456789012",
|
|
1111
|
+
query_lines=["fields @message"
|
|
1112
|
+
]
|
|
1113
|
+
))
|
|
1114
|
+
```
|
|
987
1115
|
'''
|
|
988
1116
|
from pkgutil import extend_path
|
|
989
1117
|
__path__ = extend_path(__path__, __name__)
|
|
@@ -1033,6 +1161,20 @@ from .. import (
|
|
|
1033
1161
|
TreeInspector as _TreeInspector_488e0dd5,
|
|
1034
1162
|
)
|
|
1035
1163
|
from ..aws_iam import Grant as _Grant_a7ae64f8, IGrantable as _IGrantable_71c4f5de
|
|
1164
|
+
from ..interfaces.aws_cloudwatch import (
|
|
1165
|
+
AlarmReference as _AlarmReference_76b2c14f,
|
|
1166
|
+
AnomalyDetectorReference as _AnomalyDetectorReference_11b9b19b,
|
|
1167
|
+
CompositeAlarmReference as _CompositeAlarmReference_bca78bf2,
|
|
1168
|
+
DashboardReference as _DashboardReference_71933abf,
|
|
1169
|
+
IAlarmRef as _IAlarmRef_2bb0e5de,
|
|
1170
|
+
IAnomalyDetectorRef as _IAnomalyDetectorRef_824aa9dc,
|
|
1171
|
+
ICompositeAlarmRef as _ICompositeAlarmRef_fa51824d,
|
|
1172
|
+
IDashboardRef as _IDashboardRef_3c35946b,
|
|
1173
|
+
IInsightRuleRef as _IInsightRuleRef_436d0d73,
|
|
1174
|
+
IMetricStreamRef as _IMetricStreamRef_2c784fc6,
|
|
1175
|
+
InsightRuleReference as _InsightRuleReference_d30ddeea,
|
|
1176
|
+
MetricStreamReference as _MetricStreamReference_e417a88f,
|
|
1177
|
+
)
|
|
1036
1178
|
|
|
1037
1179
|
|
|
1038
1180
|
@jsii.data_type(
|
|
@@ -1447,7 +1589,7 @@ class AnomalyDetectionAlarmProps:
|
|
|
1447
1589
|
namespace="AWS/EC2",
|
|
1448
1590
|
metric_name="CPUUtilization",
|
|
1449
1591
|
statistic="Average",
|
|
1450
|
-
period=Duration.
|
|
1592
|
+
period=Duration.hours(1)
|
|
1451
1593
|
)
|
|
1452
1594
|
|
|
1453
1595
|
# Create an anomaly detection alarm
|
|
@@ -1661,7 +1803,7 @@ class AnomalyDetectionAlarmProps:
|
|
|
1661
1803
|
)
|
|
1662
1804
|
|
|
1663
1805
|
|
|
1664
|
-
@jsii.implements(_IInspectable_c2943556, _ITaggableV2_4e6798f8)
|
|
1806
|
+
@jsii.implements(_IInspectable_c2943556, _IAlarmRef_2bb0e5de, _ITaggableV2_4e6798f8)
|
|
1665
1807
|
class CfnAlarm(
|
|
1666
1808
|
_CfnResource_9df397a6,
|
|
1667
1809
|
metaclass=jsii.JSIIMeta,
|
|
@@ -1769,7 +1911,8 @@ class CfnAlarm(
|
|
|
1769
1911
|
treat_missing_data: typing.Optional[builtins.str] = None,
|
|
1770
1912
|
unit: typing.Optional[builtins.str] = None,
|
|
1771
1913
|
) -> None:
|
|
1772
|
-
'''
|
|
1914
|
+
'''Create a new ``AWS::CloudWatch::Alarm``.
|
|
1915
|
+
|
|
1773
1916
|
:param scope: Scope in which this resource is defined.
|
|
1774
1917
|
:param id: Construct identifier for this resource (unique in its scope).
|
|
1775
1918
|
:param comparison_operator: The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.
|
|
@@ -1826,6 +1969,48 @@ class CfnAlarm(
|
|
|
1826
1969
|
|
|
1827
1970
|
jsii.create(self.__class__, self, [scope, id, props])
|
|
1828
1971
|
|
|
1972
|
+
@jsii.member(jsii_name="fromAlarmArn")
|
|
1973
|
+
@builtins.classmethod
|
|
1974
|
+
def from_alarm_arn(
|
|
1975
|
+
cls,
|
|
1976
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
1977
|
+
id: builtins.str,
|
|
1978
|
+
arn: builtins.str,
|
|
1979
|
+
) -> _IAlarmRef_2bb0e5de:
|
|
1980
|
+
'''Creates a new IAlarmRef from an ARN.
|
|
1981
|
+
|
|
1982
|
+
:param scope: -
|
|
1983
|
+
:param id: -
|
|
1984
|
+
:param arn: -
|
|
1985
|
+
'''
|
|
1986
|
+
if __debug__:
|
|
1987
|
+
type_hints = typing.get_type_hints(_typecheckingstub__544b0968def3d9b72962fb1bbce7dec4b2d60b4c2518711cc9df447306ed6c4c)
|
|
1988
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
1989
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
1990
|
+
check_type(argname="argument arn", value=arn, expected_type=type_hints["arn"])
|
|
1991
|
+
return typing.cast(_IAlarmRef_2bb0e5de, jsii.sinvoke(cls, "fromAlarmArn", [scope, id, arn]))
|
|
1992
|
+
|
|
1993
|
+
@jsii.member(jsii_name="fromAlarmName")
|
|
1994
|
+
@builtins.classmethod
|
|
1995
|
+
def from_alarm_name(
|
|
1996
|
+
cls,
|
|
1997
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
1998
|
+
id: builtins.str,
|
|
1999
|
+
alarm_name: builtins.str,
|
|
2000
|
+
) -> _IAlarmRef_2bb0e5de:
|
|
2001
|
+
'''Creates a new IAlarmRef from a alarmName.
|
|
2002
|
+
|
|
2003
|
+
:param scope: -
|
|
2004
|
+
:param id: -
|
|
2005
|
+
:param alarm_name: -
|
|
2006
|
+
'''
|
|
2007
|
+
if __debug__:
|
|
2008
|
+
type_hints = typing.get_type_hints(_typecheckingstub__191b683ee20d5f420eb03eb2e0b1a6e0e7cfed31f66a3afa94d14da0767a90f4)
|
|
2009
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
2010
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
2011
|
+
check_type(argname="argument alarm_name", value=alarm_name, expected_type=type_hints["alarm_name"])
|
|
2012
|
+
return typing.cast(_IAlarmRef_2bb0e5de, jsii.sinvoke(cls, "fromAlarmName", [scope, id, alarm_name]))
|
|
2013
|
+
|
|
1829
2014
|
@jsii.member(jsii_name="inspect")
|
|
1830
2015
|
def inspect(self, inspector: _TreeInspector_488e0dd5) -> None:
|
|
1831
2016
|
'''Examines the CloudFormation resource and discloses attributes.
|
|
@@ -1856,6 +2041,12 @@ class CfnAlarm(
|
|
|
1856
2041
|
'''The CloudFormation resource type name for this resource class.'''
|
|
1857
2042
|
return typing.cast(builtins.str, jsii.sget(cls, "CFN_RESOURCE_TYPE_NAME"))
|
|
1858
2043
|
|
|
2044
|
+
@builtins.property
|
|
2045
|
+
@jsii.member(jsii_name="alarmRef")
|
|
2046
|
+
def alarm_ref(self) -> _AlarmReference_76b2c14f:
|
|
2047
|
+
'''A reference to a Alarm resource.'''
|
|
2048
|
+
return typing.cast(_AlarmReference_76b2c14f, jsii.get(self, "alarmRef"))
|
|
2049
|
+
|
|
1859
2050
|
@builtins.property
|
|
1860
2051
|
@jsii.member(jsii_name="attrArn")
|
|
1861
2052
|
def attr_arn(self) -> builtins.str:
|
|
@@ -3181,7 +3372,7 @@ class CfnAlarmProps:
|
|
|
3181
3372
|
)
|
|
3182
3373
|
|
|
3183
3374
|
|
|
3184
|
-
@jsii.implements(_IInspectable_c2943556)
|
|
3375
|
+
@jsii.implements(_IInspectable_c2943556, _IAnomalyDetectorRef_824aa9dc)
|
|
3185
3376
|
class CfnAnomalyDetector(
|
|
3186
3377
|
_CfnResource_9df397a6,
|
|
3187
3378
|
metaclass=jsii.JSIIMeta,
|
|
@@ -3277,7 +3468,8 @@ class CfnAnomalyDetector(
|
|
|
3277
3468
|
single_metric_anomaly_detector: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnAnomalyDetector.SingleMetricAnomalyDetectorProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
3278
3469
|
stat: typing.Optional[builtins.str] = None,
|
|
3279
3470
|
) -> None:
|
|
3280
|
-
'''
|
|
3471
|
+
'''Create a new ``AWS::CloudWatch::AnomalyDetector``.
|
|
3472
|
+
|
|
3281
3473
|
:param scope: Scope in which this resource is defined.
|
|
3282
3474
|
:param id: Construct identifier for this resource (unique in its scope).
|
|
3283
3475
|
:param configuration: Specifies details about how the anomaly detection model is to be trained, including time ranges to exclude when training and updating the model. The configuration can also include the time zone to use for the metric.
|
|
@@ -3336,6 +3528,12 @@ class CfnAnomalyDetector(
|
|
|
3336
3528
|
'''The CloudFormation resource type name for this resource class.'''
|
|
3337
3529
|
return typing.cast(builtins.str, jsii.sget(cls, "CFN_RESOURCE_TYPE_NAME"))
|
|
3338
3530
|
|
|
3531
|
+
@builtins.property
|
|
3532
|
+
@jsii.member(jsii_name="anomalyDetectorRef")
|
|
3533
|
+
def anomaly_detector_ref(self) -> _AnomalyDetectorReference_11b9b19b:
|
|
3534
|
+
'''A reference to a AnomalyDetector resource.'''
|
|
3535
|
+
return typing.cast(_AnomalyDetectorReference_11b9b19b, jsii.get(self, "anomalyDetectorRef"))
|
|
3536
|
+
|
|
3339
3537
|
@builtins.property
|
|
3340
3538
|
@jsii.member(jsii_name="attrId")
|
|
3341
3539
|
def attr_id(self) -> builtins.str:
|
|
@@ -4657,7 +4855,7 @@ class CfnAnomalyDetectorProps:
|
|
|
4657
4855
|
)
|
|
4658
4856
|
|
|
4659
4857
|
|
|
4660
|
-
@jsii.implements(_IInspectable_c2943556, _ITaggableV2_4e6798f8)
|
|
4858
|
+
@jsii.implements(_IInspectable_c2943556, _ICompositeAlarmRef_fa51824d, _ITaggableV2_4e6798f8)
|
|
4661
4859
|
class CfnCompositeAlarm(
|
|
4662
4860
|
_CfnResource_9df397a6,
|
|
4663
4861
|
metaclass=jsii.JSIIMeta,
|
|
@@ -4722,7 +4920,8 @@ class CfnCompositeAlarm(
|
|
|
4722
4920
|
ok_actions: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
4723
4921
|
tags: typing.Optional[typing.Sequence[typing.Union[_CfnTag_f6864754, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
4724
4922
|
) -> None:
|
|
4725
|
-
'''
|
|
4923
|
+
'''Create a new ``AWS::CloudWatch::CompositeAlarm``.
|
|
4924
|
+
|
|
4726
4925
|
:param scope: Scope in which this resource is defined.
|
|
4727
4926
|
:param id: Construct identifier for this resource (unique in its scope).
|
|
4728
4927
|
:param alarm_rule: An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. For each alarm that you reference, you designate a function that specifies whether that alarm needs to be in ALARM state, OK state, or INSUFFICIENT_DATA state. You can use operators (AND, OR and NOT) to combine multiple functions in a single expression. You can use parenthesis to logically group the functions in your expression. You can use either alarm names or ARNs to reference the other alarms that are to be evaluated. Functions can include the following: - ALARM("alarm-name or alarm-ARN") is TRUE if the named alarm is in ALARM state. - OK("alarm-name or alarm-ARN") is TRUE if the named alarm is in OK state. - INSUFFICIENT_DATA("alarm-name or alarm-ARN") is TRUE if the named alarm is in INSUFFICIENT_DATA state. - TRUE always evaluates to TRUE. - FALSE always evaluates to FALSE. TRUE and FALSE are useful for testing a complex AlarmRule structure, and for testing your alarm actions. For more information about ``AlarmRule`` syntax, see `PutCompositeAlarm <https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutCompositeAlarm.html>`_ in the *Amazon CloudWatch API Reference* .
|
|
@@ -4807,6 +5006,12 @@ class CfnCompositeAlarm(
|
|
|
4807
5006
|
def _cfn_properties(self) -> typing.Mapping[builtins.str, typing.Any]:
|
|
4808
5007
|
return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.get(self, "cfnProperties"))
|
|
4809
5008
|
|
|
5009
|
+
@builtins.property
|
|
5010
|
+
@jsii.member(jsii_name="compositeAlarmRef")
|
|
5011
|
+
def composite_alarm_ref(self) -> _CompositeAlarmReference_bca78bf2:
|
|
5012
|
+
'''A reference to a CompositeAlarm resource.'''
|
|
5013
|
+
return typing.cast(_CompositeAlarmReference_bca78bf2, jsii.get(self, "compositeAlarmRef"))
|
|
5014
|
+
|
|
4810
5015
|
@builtins.property
|
|
4811
5016
|
@jsii.member(jsii_name="alarmRule")
|
|
4812
5017
|
def alarm_rule(self) -> builtins.str:
|
|
@@ -5233,7 +5438,7 @@ class CfnCompositeAlarmProps:
|
|
|
5233
5438
|
)
|
|
5234
5439
|
|
|
5235
5440
|
|
|
5236
|
-
@jsii.implements(_IInspectable_c2943556)
|
|
5441
|
+
@jsii.implements(_IInspectable_c2943556, _IDashboardRef_3c35946b)
|
|
5237
5442
|
class CfnDashboard(
|
|
5238
5443
|
_CfnResource_9df397a6,
|
|
5239
5444
|
metaclass=jsii.JSIIMeta,
|
|
@@ -5271,7 +5476,8 @@ class CfnDashboard(
|
|
|
5271
5476
|
dashboard_body: builtins.str,
|
|
5272
5477
|
dashboard_name: typing.Optional[builtins.str] = None,
|
|
5273
5478
|
) -> None:
|
|
5274
|
-
'''
|
|
5479
|
+
'''Create a new ``AWS::CloudWatch::Dashboard``.
|
|
5480
|
+
|
|
5275
5481
|
:param scope: Scope in which this resource is defined.
|
|
5276
5482
|
:param id: Construct identifier for this resource (unique in its scope).
|
|
5277
5483
|
:param dashboard_body: The detailed information about the dashboard in JSON format, including the widgets to include and their location on the dashboard. This parameter is required. For more information about the syntax, see `Dashboard Body Structure and Syntax <https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html>`_ .
|
|
@@ -5287,6 +5493,27 @@ class CfnDashboard(
|
|
|
5287
5493
|
|
|
5288
5494
|
jsii.create(self.__class__, self, [scope, id, props])
|
|
5289
5495
|
|
|
5496
|
+
@jsii.member(jsii_name="fromDashboardName")
|
|
5497
|
+
@builtins.classmethod
|
|
5498
|
+
def from_dashboard_name(
|
|
5499
|
+
cls,
|
|
5500
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
5501
|
+
id: builtins.str,
|
|
5502
|
+
dashboard_name: builtins.str,
|
|
5503
|
+
) -> _IDashboardRef_3c35946b:
|
|
5504
|
+
'''Creates a new IDashboardRef from a dashboardName.
|
|
5505
|
+
|
|
5506
|
+
:param scope: -
|
|
5507
|
+
:param id: -
|
|
5508
|
+
:param dashboard_name: -
|
|
5509
|
+
'''
|
|
5510
|
+
if __debug__:
|
|
5511
|
+
type_hints = typing.get_type_hints(_typecheckingstub__f2a65575230b6782811b6cc1c4a4d1c6cc87f971ef5aa437442cc859d489ff82)
|
|
5512
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
5513
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
5514
|
+
check_type(argname="argument dashboard_name", value=dashboard_name, expected_type=type_hints["dashboard_name"])
|
|
5515
|
+
return typing.cast(_IDashboardRef_3c35946b, jsii.sinvoke(cls, "fromDashboardName", [scope, id, dashboard_name]))
|
|
5516
|
+
|
|
5290
5517
|
@jsii.member(jsii_name="inspect")
|
|
5291
5518
|
def inspect(self, inspector: _TreeInspector_488e0dd5) -> None:
|
|
5292
5519
|
'''Examines the CloudFormation resource and discloses attributes.
|
|
@@ -5322,6 +5549,12 @@ class CfnDashboard(
|
|
|
5322
5549
|
def _cfn_properties(self) -> typing.Mapping[builtins.str, typing.Any]:
|
|
5323
5550
|
return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.get(self, "cfnProperties"))
|
|
5324
5551
|
|
|
5552
|
+
@builtins.property
|
|
5553
|
+
@jsii.member(jsii_name="dashboardRef")
|
|
5554
|
+
def dashboard_ref(self) -> _DashboardReference_71933abf:
|
|
5555
|
+
'''A reference to a Dashboard resource.'''
|
|
5556
|
+
return typing.cast(_DashboardReference_71933abf, jsii.get(self, "dashboardRef"))
|
|
5557
|
+
|
|
5325
5558
|
@builtins.property
|
|
5326
5559
|
@jsii.member(jsii_name="dashboardBody")
|
|
5327
5560
|
def dashboard_body(self) -> builtins.str:
|
|
@@ -5432,7 +5665,7 @@ class CfnDashboardProps:
|
|
|
5432
5665
|
)
|
|
5433
5666
|
|
|
5434
5667
|
|
|
5435
|
-
@jsii.implements(_IInspectable_c2943556, _ITaggable_36806126)
|
|
5668
|
+
@jsii.implements(_IInspectable_c2943556, _IInsightRuleRef_436d0d73, _ITaggable_36806126)
|
|
5436
5669
|
class CfnInsightRule(
|
|
5437
5670
|
_CfnResource_9df397a6,
|
|
5438
5671
|
metaclass=jsii.JSIIMeta,
|
|
@@ -5477,13 +5710,14 @@ class CfnInsightRule(
|
|
|
5477
5710
|
apply_on_transformed_logs: typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]] = None,
|
|
5478
5711
|
tags: typing.Optional[typing.Sequence[typing.Union[_CfnTag_f6864754, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
5479
5712
|
) -> None:
|
|
5480
|
-
'''
|
|
5713
|
+
'''Create a new ``AWS::CloudWatch::InsightRule``.
|
|
5714
|
+
|
|
5481
5715
|
:param scope: Scope in which this resource is defined.
|
|
5482
5716
|
:param id: Construct identifier for this resource (unique in its scope).
|
|
5483
5717
|
:param rule_body: The definition of the rule, as a JSON object. For details about the syntax, see `Contributor Insights Rule Syntax <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights-RuleSyntax.html>`_ in the *Amazon CloudWatch User Guide* .
|
|
5484
5718
|
:param rule_name: The name of the rule.
|
|
5485
5719
|
:param rule_state: The current state of the rule. Valid values are ``ENABLED`` and ``DISABLED`` .
|
|
5486
|
-
:param apply_on_transformed_logs:
|
|
5720
|
+
:param apply_on_transformed_logs: Determines whether the rules is evaluated on transformed versions of logs. Valid values are ``TRUE`` and ``FALSE`` .
|
|
5487
5721
|
:param tags: A list of key-value pairs to associate with the Contributor Insights rule. You can associate as many as 50 tags with a rule. Tags can help you organize and categorize your resources. For more information, see `Tagging Your Amazon CloudWatch Resources <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Tagging.html>`_ . To be able to associate tags with a rule, you must have the ``cloudwatch:TagResource`` permission in addition to the ``cloudwatch:PutInsightRule`` permission.
|
|
5488
5722
|
'''
|
|
5489
5723
|
if __debug__:
|
|
@@ -5561,6 +5795,12 @@ class CfnInsightRule(
|
|
|
5561
5795
|
def _cfn_properties(self) -> typing.Mapping[builtins.str, typing.Any]:
|
|
5562
5796
|
return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.get(self, "cfnProperties"))
|
|
5563
5797
|
|
|
5798
|
+
@builtins.property
|
|
5799
|
+
@jsii.member(jsii_name="insightRuleRef")
|
|
5800
|
+
def insight_rule_ref(self) -> _InsightRuleReference_d30ddeea:
|
|
5801
|
+
'''A reference to a InsightRule resource.'''
|
|
5802
|
+
return typing.cast(_InsightRuleReference_d30ddeea, jsii.get(self, "insightRuleRef"))
|
|
5803
|
+
|
|
5564
5804
|
@builtins.property
|
|
5565
5805
|
@jsii.member(jsii_name="tags")
|
|
5566
5806
|
def tags(self) -> _TagManager_0a598cb3:
|
|
@@ -5611,6 +5851,7 @@ class CfnInsightRule(
|
|
|
5611
5851
|
def apply_on_transformed_logs(
|
|
5612
5852
|
self,
|
|
5613
5853
|
) -> typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]]:
|
|
5854
|
+
'''Determines whether the rules is evaluated on transformed versions of logs.'''
|
|
5614
5855
|
return typing.cast(typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]], jsii.get(self, "applyOnTransformedLogs"))
|
|
5615
5856
|
|
|
5616
5857
|
@apply_on_transformed_logs.setter
|
|
@@ -5663,7 +5904,7 @@ class CfnInsightRuleProps:
|
|
|
5663
5904
|
:param rule_body: The definition of the rule, as a JSON object. For details about the syntax, see `Contributor Insights Rule Syntax <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContributorInsights-RuleSyntax.html>`_ in the *Amazon CloudWatch User Guide* .
|
|
5664
5905
|
:param rule_name: The name of the rule.
|
|
5665
5906
|
:param rule_state: The current state of the rule. Valid values are ``ENABLED`` and ``DISABLED`` .
|
|
5666
|
-
:param apply_on_transformed_logs:
|
|
5907
|
+
:param apply_on_transformed_logs: Determines whether the rules is evaluated on transformed versions of logs. Valid values are ``TRUE`` and ``FALSE`` .
|
|
5667
5908
|
:param tags: A list of key-value pairs to associate with the Contributor Insights rule. You can associate as many as 50 tags with a rule. Tags can help you organize and categorize your resources. For more information, see `Tagging Your Amazon CloudWatch Resources <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Tagging.html>`_ . To be able to associate tags with a rule, you must have the ``cloudwatch:TagResource`` permission in addition to the ``cloudwatch:PutInsightRule`` permission.
|
|
5668
5909
|
|
|
5669
5910
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-insightrule.html
|
|
@@ -5743,7 +5984,10 @@ class CfnInsightRuleProps:
|
|
|
5743
5984
|
def apply_on_transformed_logs(
|
|
5744
5985
|
self,
|
|
5745
5986
|
) -> typing.Optional[typing.Union[builtins.bool, _IResolvable_da3f097b]]:
|
|
5746
|
-
'''
|
|
5987
|
+
'''Determines whether the rules is evaluated on transformed versions of logs.
|
|
5988
|
+
|
|
5989
|
+
Valid values are ``TRUE`` and ``FALSE`` .
|
|
5990
|
+
|
|
5747
5991
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-insightrule.html#cfn-cloudwatch-insightrule-applyontransformedlogs
|
|
5748
5992
|
'''
|
|
5749
5993
|
result = self._values.get("apply_on_transformed_logs")
|
|
@@ -5776,7 +6020,7 @@ class CfnInsightRuleProps:
|
|
|
5776
6020
|
)
|
|
5777
6021
|
|
|
5778
6022
|
|
|
5779
|
-
@jsii.implements(_IInspectable_c2943556, _ITaggable_36806126)
|
|
6023
|
+
@jsii.implements(_IInspectable_c2943556, _IMetricStreamRef_2c784fc6, _ITaggable_36806126)
|
|
5780
6024
|
class CfnMetricStream(
|
|
5781
6025
|
_CfnResource_9df397a6,
|
|
5782
6026
|
metaclass=jsii.JSIIMeta,
|
|
@@ -5857,7 +6101,8 @@ class CfnMetricStream(
|
|
|
5857
6101
|
statistics_configurations: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Sequence[typing.Union[_IResolvable_da3f097b, typing.Union["CfnMetricStream.MetricStreamStatisticsConfigurationProperty", typing.Dict[builtins.str, typing.Any]]]]]] = None,
|
|
5858
6102
|
tags: typing.Optional[typing.Sequence[typing.Union[_CfnTag_f6864754, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
5859
6103
|
) -> None:
|
|
5860
|
-
'''
|
|
6104
|
+
'''Create a new ``AWS::CloudWatch::MetricStream``.
|
|
6105
|
+
|
|
5861
6106
|
:param scope: Scope in which this resource is defined.
|
|
5862
6107
|
:param id: Construct identifier for this resource (unique in its scope).
|
|
5863
6108
|
:param firehose_arn: The ARN of the Amazon Kinesis Firehose delivery stream to use for this metric stream. This Amazon Kinesis Firehose delivery stream must already exist and must be in the same account as the metric stream.
|
|
@@ -5888,6 +6133,48 @@ class CfnMetricStream(
|
|
|
5888
6133
|
|
|
5889
6134
|
jsii.create(self.__class__, self, [scope, id, props])
|
|
5890
6135
|
|
|
6136
|
+
@jsii.member(jsii_name="fromMetricStreamArn")
|
|
6137
|
+
@builtins.classmethod
|
|
6138
|
+
def from_metric_stream_arn(
|
|
6139
|
+
cls,
|
|
6140
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
6141
|
+
id: builtins.str,
|
|
6142
|
+
arn: builtins.str,
|
|
6143
|
+
) -> _IMetricStreamRef_2c784fc6:
|
|
6144
|
+
'''Creates a new IMetricStreamRef from an ARN.
|
|
6145
|
+
|
|
6146
|
+
:param scope: -
|
|
6147
|
+
:param id: -
|
|
6148
|
+
:param arn: -
|
|
6149
|
+
'''
|
|
6150
|
+
if __debug__:
|
|
6151
|
+
type_hints = typing.get_type_hints(_typecheckingstub__50e36a4aae3592a141f72295c65ce2cf6f01c0153925f610e589758abcc065e2)
|
|
6152
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
6153
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
6154
|
+
check_type(argname="argument arn", value=arn, expected_type=type_hints["arn"])
|
|
6155
|
+
return typing.cast(_IMetricStreamRef_2c784fc6, jsii.sinvoke(cls, "fromMetricStreamArn", [scope, id, arn]))
|
|
6156
|
+
|
|
6157
|
+
@jsii.member(jsii_name="fromMetricStreamName")
|
|
6158
|
+
@builtins.classmethod
|
|
6159
|
+
def from_metric_stream_name(
|
|
6160
|
+
cls,
|
|
6161
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
6162
|
+
id: builtins.str,
|
|
6163
|
+
metric_stream_name: builtins.str,
|
|
6164
|
+
) -> _IMetricStreamRef_2c784fc6:
|
|
6165
|
+
'''Creates a new IMetricStreamRef from a metricStreamName.
|
|
6166
|
+
|
|
6167
|
+
:param scope: -
|
|
6168
|
+
:param id: -
|
|
6169
|
+
:param metric_stream_name: -
|
|
6170
|
+
'''
|
|
6171
|
+
if __debug__:
|
|
6172
|
+
type_hints = typing.get_type_hints(_typecheckingstub__635a32b621fbf5f4f1c0d44f6749043dfa44bfb3ec257d8fe8a02439751244c1)
|
|
6173
|
+
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
6174
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
6175
|
+
check_type(argname="argument metric_stream_name", value=metric_stream_name, expected_type=type_hints["metric_stream_name"])
|
|
6176
|
+
return typing.cast(_IMetricStreamRef_2c784fc6, jsii.sinvoke(cls, "fromMetricStreamName", [scope, id, metric_stream_name]))
|
|
6177
|
+
|
|
5891
6178
|
@jsii.member(jsii_name="inspect")
|
|
5892
6179
|
def inspect(self, inspector: _TreeInspector_488e0dd5) -> None:
|
|
5893
6180
|
'''Examines the CloudFormation resource and discloses attributes.
|
|
@@ -5959,6 +6246,12 @@ class CfnMetricStream(
|
|
|
5959
6246
|
def _cfn_properties(self) -> typing.Mapping[builtins.str, typing.Any]:
|
|
5960
6247
|
return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.get(self, "cfnProperties"))
|
|
5961
6248
|
|
|
6249
|
+
@builtins.property
|
|
6250
|
+
@jsii.member(jsii_name="metricStreamRef")
|
|
6251
|
+
def metric_stream_ref(self) -> _MetricStreamReference_e417a88f:
|
|
6252
|
+
'''A reference to a MetricStream resource.'''
|
|
6253
|
+
return typing.cast(_MetricStreamReference_e417a88f, jsii.get(self, "metricStreamRef"))
|
|
6254
|
+
|
|
5962
6255
|
@builtins.property
|
|
5963
6256
|
@jsii.member(jsii_name="tags")
|
|
5964
6257
|
def tags(self) -> _TagManager_0a598cb3:
|
|
@@ -6658,6 +6951,7 @@ class Color(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Color
|
|
|
6658
6951
|
"account": "account",
|
|
6659
6952
|
"color": "color",
|
|
6660
6953
|
"dimensions_map": "dimensionsMap",
|
|
6954
|
+
"id": "id",
|
|
6661
6955
|
"label": "label",
|
|
6662
6956
|
"period": "period",
|
|
6663
6957
|
"region": "region",
|
|
@@ -6665,6 +6959,7 @@ class Color(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Color
|
|
|
6665
6959
|
"stack_region": "stackRegion",
|
|
6666
6960
|
"statistic": "statistic",
|
|
6667
6961
|
"unit": "unit",
|
|
6962
|
+
"visible": "visible",
|
|
6668
6963
|
},
|
|
6669
6964
|
)
|
|
6670
6965
|
class CommonMetricOptions:
|
|
@@ -6674,6 +6969,7 @@ class CommonMetricOptions:
|
|
|
6674
6969
|
account: typing.Optional[builtins.str] = None,
|
|
6675
6970
|
color: typing.Optional[builtins.str] = None,
|
|
6676
6971
|
dimensions_map: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
6972
|
+
id: typing.Optional[builtins.str] = None,
|
|
6677
6973
|
label: typing.Optional[builtins.str] = None,
|
|
6678
6974
|
period: typing.Optional[_Duration_4839e8c3] = None,
|
|
6679
6975
|
region: typing.Optional[builtins.str] = None,
|
|
@@ -6681,12 +6977,14 @@ class CommonMetricOptions:
|
|
|
6681
6977
|
stack_region: typing.Optional[builtins.str] = None,
|
|
6682
6978
|
statistic: typing.Optional[builtins.str] = None,
|
|
6683
6979
|
unit: typing.Optional["Unit"] = None,
|
|
6980
|
+
visible: typing.Optional[builtins.bool] = None,
|
|
6684
6981
|
) -> None:
|
|
6685
6982
|
'''Options shared by most methods accepting metric options.
|
|
6686
6983
|
|
|
6687
6984
|
:param account: Account which this metric comes from. Default: - Deployment account.
|
|
6688
6985
|
:param color: The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The ``Color`` class has a set of standard colors that can be used here. Default: - Automatic color
|
|
6689
6986
|
:param dimensions_map: Dimensions of the metric. Default: - No dimensions.
|
|
6987
|
+
:param id: Unique identifier for this metric when used in dashboard widgets. The id can be used as a variable to represent this metric in math expressions. Valid characters are letters, numbers, and underscore. The first character must be a lowercase letter. Default: - No ID
|
|
6690
6988
|
:param label: Label for this metric when added to a Graph in a Dashboard. You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_ to show summary information about the entire displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. Default: - No label
|
|
6691
6989
|
:param period: The period over which the specified statistic is applied. Default: Duration.minutes(5)
|
|
6692
6990
|
:param region: Region which this metric comes from. Default: - Deployment region.
|
|
@@ -6694,6 +6992,7 @@ class CommonMetricOptions:
|
|
|
6694
6992
|
:param stack_region: Region of the stack this metric is attached to. Default: - Deployment region.
|
|
6695
6993
|
:param statistic: What function to use for aggregating. Use the ``aws_cloudwatch.Stats`` helper class to construct valid input strings. Can be one of the following: - "Minimum" | "min" - "Maximum" | "max" - "Average" | "avg" - "Sum" | "sum" - "SampleCount | "n" - "pNN.NN" - "tmNN.NN" | "tm(NN.NN%:NN.NN%)" - "iqm" - "wmNN.NN" | "wm(NN.NN%:NN.NN%)" - "tcNN.NN" | "tc(NN.NN%:NN.NN%)" - "tsNN.NN" | "ts(NN.NN%:NN.NN%)" Default: Average
|
|
6696
6994
|
:param unit: Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream
|
|
6995
|
+
:param visible: Whether this metric should be visible in dashboard graphs. Setting this to false is useful when you want to hide raw metrics that are used in math expressions, and show only the expression results. Default: true
|
|
6697
6996
|
|
|
6698
6997
|
:exampleMetadata: fixture=_generated
|
|
6699
6998
|
|
|
@@ -6710,13 +7009,15 @@ class CommonMetricOptions:
|
|
|
6710
7009
|
dimensions_map={
|
|
6711
7010
|
"dimensions_map_key": "dimensionsMap"
|
|
6712
7011
|
},
|
|
7012
|
+
id="id",
|
|
6713
7013
|
label="label",
|
|
6714
7014
|
period=cdk.Duration.minutes(30),
|
|
6715
7015
|
region="region",
|
|
6716
7016
|
stack_account="stackAccount",
|
|
6717
7017
|
stack_region="stackRegion",
|
|
6718
7018
|
statistic="statistic",
|
|
6719
|
-
unit=cloudwatch.Unit.SECONDS
|
|
7019
|
+
unit=cloudwatch.Unit.SECONDS,
|
|
7020
|
+
visible=False
|
|
6720
7021
|
)
|
|
6721
7022
|
'''
|
|
6722
7023
|
if __debug__:
|
|
@@ -6724,6 +7025,7 @@ class CommonMetricOptions:
|
|
|
6724
7025
|
check_type(argname="argument account", value=account, expected_type=type_hints["account"])
|
|
6725
7026
|
check_type(argname="argument color", value=color, expected_type=type_hints["color"])
|
|
6726
7027
|
check_type(argname="argument dimensions_map", value=dimensions_map, expected_type=type_hints["dimensions_map"])
|
|
7028
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
6727
7029
|
check_type(argname="argument label", value=label, expected_type=type_hints["label"])
|
|
6728
7030
|
check_type(argname="argument period", value=period, expected_type=type_hints["period"])
|
|
6729
7031
|
check_type(argname="argument region", value=region, expected_type=type_hints["region"])
|
|
@@ -6731,6 +7033,7 @@ class CommonMetricOptions:
|
|
|
6731
7033
|
check_type(argname="argument stack_region", value=stack_region, expected_type=type_hints["stack_region"])
|
|
6732
7034
|
check_type(argname="argument statistic", value=statistic, expected_type=type_hints["statistic"])
|
|
6733
7035
|
check_type(argname="argument unit", value=unit, expected_type=type_hints["unit"])
|
|
7036
|
+
check_type(argname="argument visible", value=visible, expected_type=type_hints["visible"])
|
|
6734
7037
|
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
6735
7038
|
if account is not None:
|
|
6736
7039
|
self._values["account"] = account
|
|
@@ -6738,6 +7041,8 @@ class CommonMetricOptions:
|
|
|
6738
7041
|
self._values["color"] = color
|
|
6739
7042
|
if dimensions_map is not None:
|
|
6740
7043
|
self._values["dimensions_map"] = dimensions_map
|
|
7044
|
+
if id is not None:
|
|
7045
|
+
self._values["id"] = id
|
|
6741
7046
|
if label is not None:
|
|
6742
7047
|
self._values["label"] = label
|
|
6743
7048
|
if period is not None:
|
|
@@ -6752,6 +7057,8 @@ class CommonMetricOptions:
|
|
|
6752
7057
|
self._values["statistic"] = statistic
|
|
6753
7058
|
if unit is not None:
|
|
6754
7059
|
self._values["unit"] = unit
|
|
7060
|
+
if visible is not None:
|
|
7061
|
+
self._values["visible"] = visible
|
|
6755
7062
|
|
|
6756
7063
|
@builtins.property
|
|
6757
7064
|
def account(self) -> typing.Optional[builtins.str]:
|
|
@@ -6782,6 +7089,19 @@ class CommonMetricOptions:
|
|
|
6782
7089
|
result = self._values.get("dimensions_map")
|
|
6783
7090
|
return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
|
|
6784
7091
|
|
|
7092
|
+
@builtins.property
|
|
7093
|
+
def id(self) -> typing.Optional[builtins.str]:
|
|
7094
|
+
'''Unique identifier for this metric when used in dashboard widgets.
|
|
7095
|
+
|
|
7096
|
+
The id can be used as a variable to represent this metric in math expressions.
|
|
7097
|
+
Valid characters are letters, numbers, and underscore. The first character
|
|
7098
|
+
must be a lowercase letter.
|
|
7099
|
+
|
|
7100
|
+
:default: - No ID
|
|
7101
|
+
'''
|
|
7102
|
+
result = self._values.get("id")
|
|
7103
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
7104
|
+
|
|
6785
7105
|
@builtins.property
|
|
6786
7106
|
def label(self) -> typing.Optional[builtins.str]:
|
|
6787
7107
|
'''Label for this metric when added to a Graph in a Dashboard.
|
|
@@ -6879,6 +7199,18 @@ class CommonMetricOptions:
|
|
|
6879
7199
|
result = self._values.get("unit")
|
|
6880
7200
|
return typing.cast(typing.Optional["Unit"], result)
|
|
6881
7201
|
|
|
7202
|
+
@builtins.property
|
|
7203
|
+
def visible(self) -> typing.Optional[builtins.bool]:
|
|
7204
|
+
'''Whether this metric should be visible in dashboard graphs.
|
|
7205
|
+
|
|
7206
|
+
Setting this to false is useful when you want to hide raw metrics
|
|
7207
|
+
that are used in math expressions, and show only the expression results.
|
|
7208
|
+
|
|
7209
|
+
:default: true
|
|
7210
|
+
'''
|
|
7211
|
+
result = self._values.get("visible")
|
|
7212
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
7213
|
+
|
|
6882
7214
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
6883
7215
|
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
6884
7216
|
|
|
@@ -8488,6 +8820,33 @@ class LegendPosition(enum.Enum):
|
|
|
8488
8820
|
'''Add shading below the annotation.'''
|
|
8489
8821
|
|
|
8490
8822
|
|
|
8823
|
+
@jsii.enum(jsii_type="aws-cdk-lib.aws_cloudwatch.LogQueryLanguage")
|
|
8824
|
+
class LogQueryLanguage(enum.Enum):
|
|
8825
|
+
'''Logs Query Language.
|
|
8826
|
+
|
|
8827
|
+
:exampleMetadata: infused
|
|
8828
|
+
|
|
8829
|
+
Example::
|
|
8830
|
+
|
|
8831
|
+
# dashboard: cloudwatch.Dashboard
|
|
8832
|
+
|
|
8833
|
+
|
|
8834
|
+
dashboard.add_widgets(cloudwatch.LogQueryWidget(
|
|
8835
|
+
log_group_names=["my-log-group"],
|
|
8836
|
+
view=cloudwatch.LogQueryVisualizationType.TABLE,
|
|
8837
|
+
query_string="SELECT count(*) as count FROM 'my-log-group'",
|
|
8838
|
+
query_language=cloudwatch.LogQueryLanguage.SQL
|
|
8839
|
+
))
|
|
8840
|
+
'''
|
|
8841
|
+
|
|
8842
|
+
LOGS_INSIGHTS = "LOGS_INSIGHTS"
|
|
8843
|
+
'''Logs Insights QL.'''
|
|
8844
|
+
SQL = "SQL"
|
|
8845
|
+
'''OpenSearch SQL.'''
|
|
8846
|
+
PPL = "PPL"
|
|
8847
|
+
'''OpenSearch PPL.'''
|
|
8848
|
+
|
|
8849
|
+
|
|
8491
8850
|
@jsii.enum(jsii_type="aws-cdk-lib.aws_cloudwatch.LogQueryVisualizationType")
|
|
8492
8851
|
class LogQueryVisualizationType(enum.Enum):
|
|
8493
8852
|
'''Types of view.
|
|
@@ -8525,7 +8884,9 @@ class LogQueryVisualizationType(enum.Enum):
|
|
|
8525
8884
|
jsii_struct_bases=[],
|
|
8526
8885
|
name_mapping={
|
|
8527
8886
|
"log_group_names": "logGroupNames",
|
|
8887
|
+
"account_id": "accountId",
|
|
8528
8888
|
"height": "height",
|
|
8889
|
+
"query_language": "queryLanguage",
|
|
8529
8890
|
"query_lines": "queryLines",
|
|
8530
8891
|
"query_string": "queryString",
|
|
8531
8892
|
"region": "region",
|
|
@@ -8539,7 +8900,9 @@ class LogQueryWidgetProps:
|
|
|
8539
8900
|
self,
|
|
8540
8901
|
*,
|
|
8541
8902
|
log_group_names: typing.Sequence[builtins.str],
|
|
8903
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
8542
8904
|
height: typing.Optional[jsii.Number] = None,
|
|
8905
|
+
query_language: typing.Optional[LogQueryLanguage] = None,
|
|
8543
8906
|
query_lines: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
8544
8907
|
query_string: typing.Optional[builtins.str] = None,
|
|
8545
8908
|
region: typing.Optional[builtins.str] = None,
|
|
@@ -8550,7 +8913,9 @@ class LogQueryWidgetProps:
|
|
|
8550
8913
|
'''Properties for a Query widget.
|
|
8551
8914
|
|
|
8552
8915
|
:param log_group_names: Names of log groups to query.
|
|
8916
|
+
:param account_id: The AWS account ID where the log groups are located. This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account. For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html Default: - Current account
|
|
8553
8917
|
:param height: Height of the widget. Default: 6
|
|
8918
|
+
:param query_language: The query language to use for the query. Default: LogQueryLanguage.LOGS_INSIGHTS
|
|
8554
8919
|
:param query_lines: A sequence of lines to use to build the query. The query will be built by joining the lines together using ``\\n|``. Default: - Exactly one of ``queryString``, ``queryLines`` is required.
|
|
8555
8920
|
:param query_string: Full query string for log insights. Be sure to prepend every new line with a newline and pipe character (``\\n|``). Default: - Exactly one of ``queryString``, ``queryLines`` is required.
|
|
8556
8921
|
:param region: The region the metrics of this widget should be taken from. Default: Current region
|
|
@@ -8576,7 +8941,9 @@ class LogQueryWidgetProps:
|
|
|
8576
8941
|
if __debug__:
|
|
8577
8942
|
type_hints = typing.get_type_hints(_typecheckingstub__b7d4a308b1274696259a35b14b5ae833f34881f95eaba521bb47a74b3a80e8c0)
|
|
8578
8943
|
check_type(argname="argument log_group_names", value=log_group_names, expected_type=type_hints["log_group_names"])
|
|
8944
|
+
check_type(argname="argument account_id", value=account_id, expected_type=type_hints["account_id"])
|
|
8579
8945
|
check_type(argname="argument height", value=height, expected_type=type_hints["height"])
|
|
8946
|
+
check_type(argname="argument query_language", value=query_language, expected_type=type_hints["query_language"])
|
|
8580
8947
|
check_type(argname="argument query_lines", value=query_lines, expected_type=type_hints["query_lines"])
|
|
8581
8948
|
check_type(argname="argument query_string", value=query_string, expected_type=type_hints["query_string"])
|
|
8582
8949
|
check_type(argname="argument region", value=region, expected_type=type_hints["region"])
|
|
@@ -8586,8 +8953,12 @@ class LogQueryWidgetProps:
|
|
|
8586
8953
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
8587
8954
|
"log_group_names": log_group_names,
|
|
8588
8955
|
}
|
|
8956
|
+
if account_id is not None:
|
|
8957
|
+
self._values["account_id"] = account_id
|
|
8589
8958
|
if height is not None:
|
|
8590
8959
|
self._values["height"] = height
|
|
8960
|
+
if query_language is not None:
|
|
8961
|
+
self._values["query_language"] = query_language
|
|
8591
8962
|
if query_lines is not None:
|
|
8592
8963
|
self._values["query_lines"] = query_lines
|
|
8593
8964
|
if query_string is not None:
|
|
@@ -8608,6 +8979,22 @@ class LogQueryWidgetProps:
|
|
|
8608
8979
|
assert result is not None, "Required property 'log_group_names' is missing"
|
|
8609
8980
|
return typing.cast(typing.List[builtins.str], result)
|
|
8610
8981
|
|
|
8982
|
+
@builtins.property
|
|
8983
|
+
def account_id(self) -> typing.Optional[builtins.str]:
|
|
8984
|
+
'''The AWS account ID where the log groups are located.
|
|
8985
|
+
|
|
8986
|
+
This enables cross-account functionality for CloudWatch dashboards.
|
|
8987
|
+
Before using this feature, ensure that proper cross-account sharing is configured
|
|
8988
|
+
between the monitoring account and source account.
|
|
8989
|
+
|
|
8990
|
+
For more information, see:
|
|
8991
|
+
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
|
8992
|
+
|
|
8993
|
+
:default: - Current account
|
|
8994
|
+
'''
|
|
8995
|
+
result = self._values.get("account_id")
|
|
8996
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
8997
|
+
|
|
8611
8998
|
@builtins.property
|
|
8612
8999
|
def height(self) -> typing.Optional[jsii.Number]:
|
|
8613
9000
|
'''Height of the widget.
|
|
@@ -8617,6 +9004,15 @@ class LogQueryWidgetProps:
|
|
|
8617
9004
|
result = self._values.get("height")
|
|
8618
9005
|
return typing.cast(typing.Optional[jsii.Number], result)
|
|
8619
9006
|
|
|
9007
|
+
@builtins.property
|
|
9008
|
+
def query_language(self) -> typing.Optional[LogQueryLanguage]:
|
|
9009
|
+
'''The query language to use for the query.
|
|
9010
|
+
|
|
9011
|
+
:default: LogQueryLanguage.LOGS_INSIGHTS
|
|
9012
|
+
'''
|
|
9013
|
+
result = self._values.get("query_language")
|
|
9014
|
+
return typing.cast(typing.Optional[LogQueryLanguage], result)
|
|
9015
|
+
|
|
8620
9016
|
@builtins.property
|
|
8621
9017
|
def query_lines(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
8622
9018
|
'''A sequence of lines to use to build the query.
|
|
@@ -8745,7 +9141,7 @@ class MathExpression(
|
|
|
8745
9141
|
:param using_metrics: The metrics used in the expression, in a map. The key is the identifier that represents the given metric in the expression, and the value is the actual Metric object. The ``period`` of each metric in ``usingMetrics`` is ignored and instead overridden by the ``period`` specified for the ``MathExpression`` construct. Even if no ``period`` is specified for the ``MathExpression``, it will be overridden by the default value (``Duration.minutes(5)``). Example:: declare const metrics: elbv2.IApplicationLoadBalancerMetrics; new cloudwatch.MathExpression({ expression: 'm1+m2', label: 'AlbErrors', usingMetrics: { m1: metrics.custom('HTTPCode_ELB_500_Count', { period: Duration.minutes(1), // <- This period will be ignored statistic: 'Sum', label: 'HTTPCode_ELB_500_Count', }), m2: metrics.custom('HTTPCode_ELB_502_Count', { period: Duration.minutes(1), // <- This period will be ignored statistic: 'Sum', label: 'HTTPCode_ELB_502_Count', }), }, period: Duration.minutes(3), // <- This overrides the period of each metric in `usingMetrics` // (Even if not specified, it is overridden by the default value) }); Default: - Empty map.
|
|
8746
9142
|
:param color: Color for this metric when added to a Graph in a Dashboard. Default: - Automatic color
|
|
8747
9143
|
:param label: Label for this expression when added to a Graph in a Dashboard. If this expression evaluates to more than one time series (for example, through the use of ``METRICS()`` or ``SEARCH()`` expressions), each time series will appear in the graph using a combination of the expression label and the individual metric label. Specify the empty string (``''``) to suppress the expression label and only keep the metric label. You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_ to show summary information about the displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. If the math expression produces more than one time series, the maximum will be shown for each individual time series produce by this math expression. Default: - Expression value is used as label
|
|
8748
|
-
:param period: The period over which the expression's statistics are applied. This period overrides all periods in the metrics used in this math expression. Default: Duration.minutes(5)
|
|
9144
|
+
:param period: The period over which the math expression's statistics are applied. This period overrides all periods in the metrics used in this math expression. Default: Duration.minutes(5)
|
|
8749
9145
|
:param search_account: Account to evaluate search expressions within. Specifying a searchAccount has no effect to the account used for metrics within the expression (passed via usingMetrics). Default: - Deployment account.
|
|
8750
9146
|
:param search_region: Region to evaluate search expressions within. Specifying a searchRegion has no effect to the region used for metrics within the expression (passed via usingMetrics). Default: - Deployment region.
|
|
8751
9147
|
'''
|
|
@@ -8838,7 +9234,7 @@ class MathExpression(
|
|
|
8838
9234
|
|
|
8839
9235
|
:param color: Color for this metric when added to a Graph in a Dashboard. Default: - Automatic color
|
|
8840
9236
|
:param label: Label for this expression when added to a Graph in a Dashboard. If this expression evaluates to more than one time series (for example, through the use of ``METRICS()`` or ``SEARCH()`` expressions), each time series will appear in the graph using a combination of the expression label and the individual metric label. Specify the empty string (``''``) to suppress the expression label and only keep the metric label. You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_ to show summary information about the displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. If the math expression produces more than one time series, the maximum will be shown for each individual time series produce by this math expression. Default: - Expression value is used as label
|
|
8841
|
-
:param period: The period over which the expression's statistics are applied. This period overrides all periods in the metrics used in this math expression. Default: Duration.minutes(5)
|
|
9237
|
+
:param period: The period over which the math expression's statistics are applied. This period overrides all periods in the metrics used in this math expression. Default: Duration.minutes(5)
|
|
8842
9238
|
:param search_account: Account to evaluate search expressions within. Specifying a searchAccount has no effect to the account used for metrics within the expression (passed via usingMetrics). Default: - Deployment account.
|
|
8843
9239
|
:param search_region: Region to evaluate search expressions within. Specifying a searchRegion has no effect to the region used for metrics within the expression (passed via usingMetrics). Default: - Deployment region.
|
|
8844
9240
|
'''
|
|
@@ -8939,7 +9335,7 @@ class MathExpressionOptions:
|
|
|
8939
9335
|
|
|
8940
9336
|
:param color: Color for this metric when added to a Graph in a Dashboard. Default: - Automatic color
|
|
8941
9337
|
:param label: Label for this expression when added to a Graph in a Dashboard. If this expression evaluates to more than one time series (for example, through the use of ``METRICS()`` or ``SEARCH()`` expressions), each time series will appear in the graph using a combination of the expression label and the individual metric label. Specify the empty string (``''``) to suppress the expression label and only keep the metric label. You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_ to show summary information about the displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. If the math expression produces more than one time series, the maximum will be shown for each individual time series produce by this math expression. Default: - Expression value is used as label
|
|
8942
|
-
:param period: The period over which the expression's statistics are applied. This period overrides all periods in the metrics used in this math expression. Default: Duration.minutes(5)
|
|
9338
|
+
:param period: The period over which the math expression's statistics are applied. This period overrides all periods in the metrics used in this math expression. Default: Duration.minutes(5)
|
|
8943
9339
|
:param search_account: Account to evaluate search expressions within. Specifying a searchAccount has no effect to the account used for metrics within the expression (passed via usingMetrics). Default: - Deployment account.
|
|
8944
9340
|
:param search_region: Region to evaluate search expressions within. Specifying a searchRegion has no effect to the region used for metrics within the expression (passed via usingMetrics). Default: - Deployment region.
|
|
8945
9341
|
|
|
@@ -9018,7 +9414,7 @@ class MathExpressionOptions:
|
|
|
9018
9414
|
|
|
9019
9415
|
@builtins.property
|
|
9020
9416
|
def period(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
9021
|
-
'''The period over which the expression's statistics are applied.
|
|
9417
|
+
'''The period over which the math expression's statistics are applied.
|
|
9022
9418
|
|
|
9023
9419
|
This period overrides all periods in the metrics used in this
|
|
9024
9420
|
math expression.
|
|
@@ -9093,7 +9489,7 @@ class MathExpressionProps(MathExpressionOptions):
|
|
|
9093
9489
|
|
|
9094
9490
|
:param color: Color for this metric when added to a Graph in a Dashboard. Default: - Automatic color
|
|
9095
9491
|
:param label: Label for this expression when added to a Graph in a Dashboard. If this expression evaluates to more than one time series (for example, through the use of ``METRICS()`` or ``SEARCH()`` expressions), each time series will appear in the graph using a combination of the expression label and the individual metric label. Specify the empty string (``''``) to suppress the expression label and only keep the metric label. You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_ to show summary information about the displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. If the math expression produces more than one time series, the maximum will be shown for each individual time series produce by this math expression. Default: - Expression value is used as label
|
|
9096
|
-
:param period: The period over which the expression's statistics are applied. This period overrides all periods in the metrics used in this math expression. Default: Duration.minutes(5)
|
|
9492
|
+
:param period: The period over which the math expression's statistics are applied. This period overrides all periods in the metrics used in this math expression. Default: Duration.minutes(5)
|
|
9097
9493
|
:param search_account: Account to evaluate search expressions within. Specifying a searchAccount has no effect to the account used for metrics within the expression (passed via usingMetrics). Default: - Deployment account.
|
|
9098
9494
|
:param search_region: Region to evaluate search expressions within. Specifying a searchRegion has no effect to the region used for metrics within the expression (passed via usingMetrics). Default: - Deployment region.
|
|
9099
9495
|
:param expression: The expression defining the metric. When an expression contains a SEARCH function, it cannot be used within an Alarm.
|
|
@@ -9183,7 +9579,7 @@ class MathExpressionProps(MathExpressionOptions):
|
|
|
9183
9579
|
|
|
9184
9580
|
@builtins.property
|
|
9185
9581
|
def period(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
9186
|
-
'''The period over which the expression's statistics are applied.
|
|
9582
|
+
'''The period over which the math expression's statistics are applied.
|
|
9187
9583
|
|
|
9188
9584
|
This period overrides all periods in the metrics used in this
|
|
9189
9585
|
math expression.
|
|
@@ -9303,7 +9699,7 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9303
9699
|
namespace="AWS/EC2",
|
|
9304
9700
|
metric_name="CPUUtilization",
|
|
9305
9701
|
statistic="Average",
|
|
9306
|
-
period=Duration.
|
|
9702
|
+
period=Duration.hours(1)
|
|
9307
9703
|
)
|
|
9308
9704
|
|
|
9309
9705
|
# Create an anomaly detection alarm
|
|
@@ -9327,6 +9723,7 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9327
9723
|
account: typing.Optional[builtins.str] = None,
|
|
9328
9724
|
color: typing.Optional[builtins.str] = None,
|
|
9329
9725
|
dimensions_map: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
9726
|
+
id: typing.Optional[builtins.str] = None,
|
|
9330
9727
|
label: typing.Optional[builtins.str] = None,
|
|
9331
9728
|
period: typing.Optional[_Duration_4839e8c3] = None,
|
|
9332
9729
|
region: typing.Optional[builtins.str] = None,
|
|
@@ -9334,6 +9731,7 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9334
9731
|
stack_region: typing.Optional[builtins.str] = None,
|
|
9335
9732
|
statistic: typing.Optional[builtins.str] = None,
|
|
9336
9733
|
unit: typing.Optional["Unit"] = None,
|
|
9734
|
+
visible: typing.Optional[builtins.bool] = None,
|
|
9337
9735
|
) -> None:
|
|
9338
9736
|
'''
|
|
9339
9737
|
:param metric_name: Name of the metric.
|
|
@@ -9341,6 +9739,7 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9341
9739
|
:param account: Account which this metric comes from. Default: - Deployment account.
|
|
9342
9740
|
:param color: The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The ``Color`` class has a set of standard colors that can be used here. Default: - Automatic color
|
|
9343
9741
|
:param dimensions_map: Dimensions of the metric. Default: - No dimensions.
|
|
9742
|
+
:param id: Unique identifier for this metric when used in dashboard widgets. The id can be used as a variable to represent this metric in math expressions. Valid characters are letters, numbers, and underscore. The first character must be a lowercase letter. Default: - No ID
|
|
9344
9743
|
:param label: Label for this metric when added to a Graph in a Dashboard. You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_ to show summary information about the entire displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. Default: - No label
|
|
9345
9744
|
:param period: The period over which the specified statistic is applied. Default: Duration.minutes(5)
|
|
9346
9745
|
:param region: Region which this metric comes from. Default: - Deployment region.
|
|
@@ -9348,6 +9747,7 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9348
9747
|
:param stack_region: Region of the stack this metric is attached to. Default: - Deployment region.
|
|
9349
9748
|
:param statistic: What function to use for aggregating. Use the ``aws_cloudwatch.Stats`` helper class to construct valid input strings. Can be one of the following: - "Minimum" | "min" - "Maximum" | "max" - "Average" | "avg" - "Sum" | "sum" - "SampleCount | "n" - "pNN.NN" - "tmNN.NN" | "tm(NN.NN%:NN.NN%)" - "iqm" - "wmNN.NN" | "wm(NN.NN%:NN.NN%)" - "tcNN.NN" | "tc(NN.NN%:NN.NN%)" - "tsNN.NN" | "ts(NN.NN%:NN.NN%)" Default: Average
|
|
9350
9749
|
:param unit: Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream
|
|
9750
|
+
:param visible: Whether this metric should be visible in dashboard graphs. Setting this to false is useful when you want to hide raw metrics that are used in math expressions, and show only the expression results. Default: true
|
|
9351
9751
|
'''
|
|
9352
9752
|
props = MetricProps(
|
|
9353
9753
|
metric_name=metric_name,
|
|
@@ -9355,6 +9755,7 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9355
9755
|
account=account,
|
|
9356
9756
|
color=color,
|
|
9357
9757
|
dimensions_map=dimensions_map,
|
|
9758
|
+
id=id,
|
|
9358
9759
|
label=label,
|
|
9359
9760
|
period=period,
|
|
9360
9761
|
region=region,
|
|
@@ -9362,6 +9763,7 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9362
9763
|
stack_region=stack_region,
|
|
9363
9764
|
statistic=statistic,
|
|
9364
9765
|
unit=unit,
|
|
9766
|
+
visible=visible,
|
|
9365
9767
|
)
|
|
9366
9768
|
|
|
9367
9769
|
jsii.create(self.__class__, self, [props])
|
|
@@ -9385,7 +9787,7 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9385
9787
|
:param std_devs: The number of standard deviations to use for the anomaly detection band. The higher the value, the wider the band. - Must be greater than 0. A value of 0 or negative values would not make sense in the context of calculating standard deviations. - There is no strict maximum value defined, as standard deviations can theoretically extend infinitely. However, in practice, values beyond 5 or 6 standard deviations are rarely used, as they would result in an extremely wide anomaly detection band, potentially missing significant anomalies. Default: 2
|
|
9386
9788
|
:param color: Color for this metric when added to a Graph in a Dashboard. Default: - Automatic color
|
|
9387
9789
|
:param label: Label for this expression when added to a Graph in a Dashboard. If this expression evaluates to more than one time series (for example, through the use of ``METRICS()`` or ``SEARCH()`` expressions), each time series will appear in the graph using a combination of the expression label and the individual metric label. Specify the empty string (``''``) to suppress the expression label and only keep the metric label. You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_ to show summary information about the displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. If the math expression produces more than one time series, the maximum will be shown for each individual time series produce by this math expression. Default: - Expression value is used as label
|
|
9388
|
-
:param period: The period over which the expression's statistics are applied. This period overrides all periods in the metrics used in this math expression. Default: Duration.minutes(5)
|
|
9790
|
+
:param period: The period over which the math expression's statistics are applied. This period overrides all periods in the metrics used in this math expression. Default: Duration.minutes(5)
|
|
9389
9791
|
:param search_account: Account to evaluate search expressions within. Specifying a searchAccount has no effect to the account used for metrics within the expression (passed via usingMetrics). Default: - Deployment account.
|
|
9390
9792
|
:param search_region: Region to evaluate search expressions within. Specifying a searchRegion has no effect to the region used for metrics within the expression (passed via usingMetrics). Default: - Deployment region.
|
|
9391
9793
|
|
|
@@ -9503,6 +9905,7 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9503
9905
|
account: typing.Optional[builtins.str] = None,
|
|
9504
9906
|
color: typing.Optional[builtins.str] = None,
|
|
9505
9907
|
dimensions_map: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
9908
|
+
id: typing.Optional[builtins.str] = None,
|
|
9506
9909
|
label: typing.Optional[builtins.str] = None,
|
|
9507
9910
|
period: typing.Optional[_Duration_4839e8c3] = None,
|
|
9508
9911
|
region: typing.Optional[builtins.str] = None,
|
|
@@ -9510,6 +9913,7 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9510
9913
|
stack_region: typing.Optional[builtins.str] = None,
|
|
9511
9914
|
statistic: typing.Optional[builtins.str] = None,
|
|
9512
9915
|
unit: typing.Optional["Unit"] = None,
|
|
9916
|
+
visible: typing.Optional[builtins.bool] = None,
|
|
9513
9917
|
) -> "Metric":
|
|
9514
9918
|
'''Return a copy of Metric ``with`` properties changed.
|
|
9515
9919
|
|
|
@@ -9518,6 +9922,7 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9518
9922
|
:param account: Account which this metric comes from. Default: - Deployment account.
|
|
9519
9923
|
:param color: The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The ``Color`` class has a set of standard colors that can be used here. Default: - Automatic color
|
|
9520
9924
|
:param dimensions_map: Dimensions of the metric. Default: - No dimensions.
|
|
9925
|
+
:param id: Unique identifier for this metric when used in dashboard widgets. The id can be used as a variable to represent this metric in math expressions. Valid characters are letters, numbers, and underscore. The first character must be a lowercase letter. Default: - No ID
|
|
9521
9926
|
:param label: Label for this metric when added to a Graph in a Dashboard. You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_ to show summary information about the entire displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. Default: - No label
|
|
9522
9927
|
:param period: The period over which the specified statistic is applied. Default: Duration.minutes(5)
|
|
9523
9928
|
:param region: Region which this metric comes from. Default: - Deployment region.
|
|
@@ -9525,11 +9930,13 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9525
9930
|
:param stack_region: Region of the stack this metric is attached to. Default: - Deployment region.
|
|
9526
9931
|
:param statistic: What function to use for aggregating. Use the ``aws_cloudwatch.Stats`` helper class to construct valid input strings. Can be one of the following: - "Minimum" | "min" - "Maximum" | "max" - "Average" | "avg" - "Sum" | "sum" - "SampleCount | "n" - "pNN.NN" - "tmNN.NN" | "tm(NN.NN%:NN.NN%)" - "iqm" - "wmNN.NN" | "wm(NN.NN%:NN.NN%)" - "tcNN.NN" | "tc(NN.NN%:NN.NN%)" - "tsNN.NN" | "ts(NN.NN%:NN.NN%)" Default: Average
|
|
9527
9932
|
:param unit: Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream
|
|
9933
|
+
:param visible: Whether this metric should be visible in dashboard graphs. Setting this to false is useful when you want to hide raw metrics that are used in math expressions, and show only the expression results. Default: true
|
|
9528
9934
|
'''
|
|
9529
9935
|
props = MetricOptions(
|
|
9530
9936
|
account=account,
|
|
9531
9937
|
color=color,
|
|
9532
9938
|
dimensions_map=dimensions_map,
|
|
9939
|
+
id=id,
|
|
9533
9940
|
label=label,
|
|
9534
9941
|
period=period,
|
|
9535
9942
|
region=region,
|
|
@@ -9537,6 +9944,7 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9537
9944
|
stack_region=stack_region,
|
|
9538
9945
|
statistic=statistic,
|
|
9539
9946
|
unit=unit,
|
|
9947
|
+
visible=visible,
|
|
9540
9948
|
)
|
|
9541
9949
|
|
|
9542
9950
|
return typing.cast("Metric", jsii.invoke(self, "with", [props]))
|
|
@@ -9583,6 +9991,12 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9583
9991
|
'''Dimensions of this metric.'''
|
|
9584
9992
|
return typing.cast(typing.Optional[typing.Mapping[builtins.str, typing.Any]], jsii.get(self, "dimensions"))
|
|
9585
9993
|
|
|
9994
|
+
@builtins.property
|
|
9995
|
+
@jsii.member(jsii_name="id")
|
|
9996
|
+
def id(self) -> typing.Optional[builtins.str]:
|
|
9997
|
+
'''Unique identifier for this metric when used in dashboard widgets.'''
|
|
9998
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "id"))
|
|
9999
|
+
|
|
9586
10000
|
@builtins.property
|
|
9587
10001
|
@jsii.member(jsii_name="label")
|
|
9588
10002
|
def label(self) -> typing.Optional[builtins.str]:
|
|
@@ -9601,6 +10015,12 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9601
10015
|
'''Unit of the metric.'''
|
|
9602
10016
|
return typing.cast(typing.Optional["Unit"], jsii.get(self, "unit"))
|
|
9603
10017
|
|
|
10018
|
+
@builtins.property
|
|
10019
|
+
@jsii.member(jsii_name="visible")
|
|
10020
|
+
def visible(self) -> typing.Optional[builtins.bool]:
|
|
10021
|
+
'''Whether this metric should be visible in dashboard graphs.'''
|
|
10022
|
+
return typing.cast(typing.Optional[builtins.bool], jsii.get(self, "visible"))
|
|
10023
|
+
|
|
9604
10024
|
@builtins.property
|
|
9605
10025
|
@jsii.member(jsii_name="warnings")
|
|
9606
10026
|
def warnings(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
@@ -9628,6 +10048,7 @@ class Metric(metaclass=jsii.JSIIMeta, jsii_type="aws-cdk-lib.aws_cloudwatch.Metr
|
|
|
9628
10048
|
"math_expression": "mathExpression",
|
|
9629
10049
|
"metric_stat": "metricStat",
|
|
9630
10050
|
"rendering_properties": "renderingProperties",
|
|
10051
|
+
"search_expression": "searchExpression",
|
|
9631
10052
|
},
|
|
9632
10053
|
)
|
|
9633
10054
|
class MetricConfig:
|
|
@@ -9637,12 +10058,14 @@ class MetricConfig:
|
|
|
9637
10058
|
math_expression: typing.Optional[typing.Union["MetricExpressionConfig", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
9638
10059
|
metric_stat: typing.Optional[typing.Union["MetricStatConfig", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
9639
10060
|
rendering_properties: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
|
|
10061
|
+
search_expression: typing.Optional[typing.Union["MetricExpressionConfig", typing.Dict[builtins.str, typing.Any]]] = None,
|
|
9640
10062
|
) -> None:
|
|
9641
10063
|
'''Properties of a rendered metric.
|
|
9642
10064
|
|
|
9643
10065
|
:param math_expression: In case the metric is a math expression, the details of the math expression. Default: - None
|
|
9644
10066
|
:param metric_stat: In case the metric represents a query, the details of the query. Default: - None
|
|
9645
10067
|
:param rendering_properties: Additional properties which will be rendered if the metric is used in a dashboard. Examples are 'label' and 'color', but any key in here will be added to dashboard graphs. Default: - None
|
|
10068
|
+
:param search_expression: In case the metric is a search expression, the details of the search expression. Default: - None
|
|
9646
10069
|
|
|
9647
10070
|
:exampleMetadata: fixture=_generated
|
|
9648
10071
|
|
|
@@ -9688,18 +10111,32 @@ class MetricConfig:
|
|
|
9688
10111
|
),
|
|
9689
10112
|
rendering_properties={
|
|
9690
10113
|
"rendering_properties_key": rendering_properties
|
|
9691
|
-
}
|
|
10114
|
+
},
|
|
10115
|
+
search_expression=cloudwatch.MetricExpressionConfig(
|
|
10116
|
+
expression="expression",
|
|
10117
|
+
period=123,
|
|
10118
|
+
using_metrics={
|
|
10119
|
+
"using_metrics_key": metric
|
|
10120
|
+
},
|
|
10121
|
+
|
|
10122
|
+
# the properties below are optional
|
|
10123
|
+
search_account="searchAccount",
|
|
10124
|
+
search_region="searchRegion"
|
|
10125
|
+
)
|
|
9692
10126
|
)
|
|
9693
10127
|
'''
|
|
9694
10128
|
if isinstance(math_expression, dict):
|
|
9695
10129
|
math_expression = MetricExpressionConfig(**math_expression)
|
|
9696
10130
|
if isinstance(metric_stat, dict):
|
|
9697
10131
|
metric_stat = MetricStatConfig(**metric_stat)
|
|
10132
|
+
if isinstance(search_expression, dict):
|
|
10133
|
+
search_expression = MetricExpressionConfig(**search_expression)
|
|
9698
10134
|
if __debug__:
|
|
9699
10135
|
type_hints = typing.get_type_hints(_typecheckingstub__2ddb584abe8421d7f77520aa621133794d500e179ff044f43970dac3fd018cca)
|
|
9700
10136
|
check_type(argname="argument math_expression", value=math_expression, expected_type=type_hints["math_expression"])
|
|
9701
10137
|
check_type(argname="argument metric_stat", value=metric_stat, expected_type=type_hints["metric_stat"])
|
|
9702
10138
|
check_type(argname="argument rendering_properties", value=rendering_properties, expected_type=type_hints["rendering_properties"])
|
|
10139
|
+
check_type(argname="argument search_expression", value=search_expression, expected_type=type_hints["search_expression"])
|
|
9703
10140
|
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
9704
10141
|
if math_expression is not None:
|
|
9705
10142
|
self._values["math_expression"] = math_expression
|
|
@@ -9707,6 +10144,8 @@ class MetricConfig:
|
|
|
9707
10144
|
self._values["metric_stat"] = metric_stat
|
|
9708
10145
|
if rendering_properties is not None:
|
|
9709
10146
|
self._values["rendering_properties"] = rendering_properties
|
|
10147
|
+
if search_expression is not None:
|
|
10148
|
+
self._values["search_expression"] = search_expression
|
|
9710
10149
|
|
|
9711
10150
|
@builtins.property
|
|
9712
10151
|
def math_expression(self) -> typing.Optional["MetricExpressionConfig"]:
|
|
@@ -9740,6 +10179,15 @@ class MetricConfig:
|
|
|
9740
10179
|
result = self._values.get("rendering_properties")
|
|
9741
10180
|
return typing.cast(typing.Optional[typing.Mapping[builtins.str, typing.Any]], result)
|
|
9742
10181
|
|
|
10182
|
+
@builtins.property
|
|
10183
|
+
def search_expression(self) -> typing.Optional["MetricExpressionConfig"]:
|
|
10184
|
+
'''In case the metric is a search expression, the details of the search expression.
|
|
10185
|
+
|
|
10186
|
+
:default: - None
|
|
10187
|
+
'''
|
|
10188
|
+
result = self._values.get("search_expression")
|
|
10189
|
+
return typing.cast(typing.Optional["MetricExpressionConfig"], result)
|
|
10190
|
+
|
|
9743
10191
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
9744
10192
|
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
9745
10193
|
|
|
@@ -9878,6 +10326,7 @@ class MetricExpressionConfig:
|
|
|
9878
10326
|
"account": "account",
|
|
9879
10327
|
"color": "color",
|
|
9880
10328
|
"dimensions_map": "dimensionsMap",
|
|
10329
|
+
"id": "id",
|
|
9881
10330
|
"label": "label",
|
|
9882
10331
|
"period": "period",
|
|
9883
10332
|
"region": "region",
|
|
@@ -9885,6 +10334,7 @@ class MetricExpressionConfig:
|
|
|
9885
10334
|
"stack_region": "stackRegion",
|
|
9886
10335
|
"statistic": "statistic",
|
|
9887
10336
|
"unit": "unit",
|
|
10337
|
+
"visible": "visible",
|
|
9888
10338
|
},
|
|
9889
10339
|
)
|
|
9890
10340
|
class MetricOptions(CommonMetricOptions):
|
|
@@ -9894,6 +10344,7 @@ class MetricOptions(CommonMetricOptions):
|
|
|
9894
10344
|
account: typing.Optional[builtins.str] = None,
|
|
9895
10345
|
color: typing.Optional[builtins.str] = None,
|
|
9896
10346
|
dimensions_map: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
10347
|
+
id: typing.Optional[builtins.str] = None,
|
|
9897
10348
|
label: typing.Optional[builtins.str] = None,
|
|
9898
10349
|
period: typing.Optional[_Duration_4839e8c3] = None,
|
|
9899
10350
|
region: typing.Optional[builtins.str] = None,
|
|
@@ -9901,12 +10352,14 @@ class MetricOptions(CommonMetricOptions):
|
|
|
9901
10352
|
stack_region: typing.Optional[builtins.str] = None,
|
|
9902
10353
|
statistic: typing.Optional[builtins.str] = None,
|
|
9903
10354
|
unit: typing.Optional["Unit"] = None,
|
|
10355
|
+
visible: typing.Optional[builtins.bool] = None,
|
|
9904
10356
|
) -> None:
|
|
9905
10357
|
'''Properties of a metric that can be changed.
|
|
9906
10358
|
|
|
9907
10359
|
:param account: Account which this metric comes from. Default: - Deployment account.
|
|
9908
10360
|
:param color: The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The ``Color`` class has a set of standard colors that can be used here. Default: - Automatic color
|
|
9909
10361
|
:param dimensions_map: Dimensions of the metric. Default: - No dimensions.
|
|
10362
|
+
:param id: Unique identifier for this metric when used in dashboard widgets. The id can be used as a variable to represent this metric in math expressions. Valid characters are letters, numbers, and underscore. The first character must be a lowercase letter. Default: - No ID
|
|
9910
10363
|
:param label: Label for this metric when added to a Graph in a Dashboard. You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_ to show summary information about the entire displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. Default: - No label
|
|
9911
10364
|
:param period: The period over which the specified statistic is applied. Default: Duration.minutes(5)
|
|
9912
10365
|
:param region: Region which this metric comes from. Default: - Deployment region.
|
|
@@ -9914,6 +10367,7 @@ class MetricOptions(CommonMetricOptions):
|
|
|
9914
10367
|
:param stack_region: Region of the stack this metric is attached to. Default: - Deployment region.
|
|
9915
10368
|
:param statistic: What function to use for aggregating. Use the ``aws_cloudwatch.Stats`` helper class to construct valid input strings. Can be one of the following: - "Minimum" | "min" - "Maximum" | "max" - "Average" | "avg" - "Sum" | "sum" - "SampleCount | "n" - "pNN.NN" - "tmNN.NN" | "tm(NN.NN%:NN.NN%)" - "iqm" - "wmNN.NN" | "wm(NN.NN%:NN.NN%)" - "tcNN.NN" | "tc(NN.NN%:NN.NN%)" - "tsNN.NN" | "ts(NN.NN%:NN.NN%)" Default: Average
|
|
9916
10369
|
:param unit: Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream
|
|
10370
|
+
:param visible: Whether this metric should be visible in dashboard graphs. Setting this to false is useful when you want to hide raw metrics that are used in math expressions, and show only the expression results. Default: true
|
|
9917
10371
|
|
|
9918
10372
|
:exampleMetadata: infused
|
|
9919
10373
|
|
|
@@ -9944,6 +10398,7 @@ class MetricOptions(CommonMetricOptions):
|
|
|
9944
10398
|
check_type(argname="argument account", value=account, expected_type=type_hints["account"])
|
|
9945
10399
|
check_type(argname="argument color", value=color, expected_type=type_hints["color"])
|
|
9946
10400
|
check_type(argname="argument dimensions_map", value=dimensions_map, expected_type=type_hints["dimensions_map"])
|
|
10401
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
9947
10402
|
check_type(argname="argument label", value=label, expected_type=type_hints["label"])
|
|
9948
10403
|
check_type(argname="argument period", value=period, expected_type=type_hints["period"])
|
|
9949
10404
|
check_type(argname="argument region", value=region, expected_type=type_hints["region"])
|
|
@@ -9951,6 +10406,7 @@ class MetricOptions(CommonMetricOptions):
|
|
|
9951
10406
|
check_type(argname="argument stack_region", value=stack_region, expected_type=type_hints["stack_region"])
|
|
9952
10407
|
check_type(argname="argument statistic", value=statistic, expected_type=type_hints["statistic"])
|
|
9953
10408
|
check_type(argname="argument unit", value=unit, expected_type=type_hints["unit"])
|
|
10409
|
+
check_type(argname="argument visible", value=visible, expected_type=type_hints["visible"])
|
|
9954
10410
|
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
9955
10411
|
if account is not None:
|
|
9956
10412
|
self._values["account"] = account
|
|
@@ -9958,6 +10414,8 @@ class MetricOptions(CommonMetricOptions):
|
|
|
9958
10414
|
self._values["color"] = color
|
|
9959
10415
|
if dimensions_map is not None:
|
|
9960
10416
|
self._values["dimensions_map"] = dimensions_map
|
|
10417
|
+
if id is not None:
|
|
10418
|
+
self._values["id"] = id
|
|
9961
10419
|
if label is not None:
|
|
9962
10420
|
self._values["label"] = label
|
|
9963
10421
|
if period is not None:
|
|
@@ -9972,6 +10430,8 @@ class MetricOptions(CommonMetricOptions):
|
|
|
9972
10430
|
self._values["statistic"] = statistic
|
|
9973
10431
|
if unit is not None:
|
|
9974
10432
|
self._values["unit"] = unit
|
|
10433
|
+
if visible is not None:
|
|
10434
|
+
self._values["visible"] = visible
|
|
9975
10435
|
|
|
9976
10436
|
@builtins.property
|
|
9977
10437
|
def account(self) -> typing.Optional[builtins.str]:
|
|
@@ -10002,6 +10462,19 @@ class MetricOptions(CommonMetricOptions):
|
|
|
10002
10462
|
result = self._values.get("dimensions_map")
|
|
10003
10463
|
return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
|
|
10004
10464
|
|
|
10465
|
+
@builtins.property
|
|
10466
|
+
def id(self) -> typing.Optional[builtins.str]:
|
|
10467
|
+
'''Unique identifier for this metric when used in dashboard widgets.
|
|
10468
|
+
|
|
10469
|
+
The id can be used as a variable to represent this metric in math expressions.
|
|
10470
|
+
Valid characters are letters, numbers, and underscore. The first character
|
|
10471
|
+
must be a lowercase letter.
|
|
10472
|
+
|
|
10473
|
+
:default: - No ID
|
|
10474
|
+
'''
|
|
10475
|
+
result = self._values.get("id")
|
|
10476
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
10477
|
+
|
|
10005
10478
|
@builtins.property
|
|
10006
10479
|
def label(self) -> typing.Optional[builtins.str]:
|
|
10007
10480
|
'''Label for this metric when added to a Graph in a Dashboard.
|
|
@@ -10099,6 +10572,18 @@ class MetricOptions(CommonMetricOptions):
|
|
|
10099
10572
|
result = self._values.get("unit")
|
|
10100
10573
|
return typing.cast(typing.Optional["Unit"], result)
|
|
10101
10574
|
|
|
10575
|
+
@builtins.property
|
|
10576
|
+
def visible(self) -> typing.Optional[builtins.bool]:
|
|
10577
|
+
'''Whether this metric should be visible in dashboard graphs.
|
|
10578
|
+
|
|
10579
|
+
Setting this to false is useful when you want to hide raw metrics
|
|
10580
|
+
that are used in math expressions, and show only the expression results.
|
|
10581
|
+
|
|
10582
|
+
:default: true
|
|
10583
|
+
'''
|
|
10584
|
+
result = self._values.get("visible")
|
|
10585
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
10586
|
+
|
|
10102
10587
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
10103
10588
|
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
10104
10589
|
|
|
@@ -10118,6 +10603,7 @@ class MetricOptions(CommonMetricOptions):
|
|
|
10118
10603
|
"account": "account",
|
|
10119
10604
|
"color": "color",
|
|
10120
10605
|
"dimensions_map": "dimensionsMap",
|
|
10606
|
+
"id": "id",
|
|
10121
10607
|
"label": "label",
|
|
10122
10608
|
"period": "period",
|
|
10123
10609
|
"region": "region",
|
|
@@ -10125,6 +10611,7 @@ class MetricOptions(CommonMetricOptions):
|
|
|
10125
10611
|
"stack_region": "stackRegion",
|
|
10126
10612
|
"statistic": "statistic",
|
|
10127
10613
|
"unit": "unit",
|
|
10614
|
+
"visible": "visible",
|
|
10128
10615
|
"metric_name": "metricName",
|
|
10129
10616
|
"namespace": "namespace",
|
|
10130
10617
|
},
|
|
@@ -10136,6 +10623,7 @@ class MetricProps(CommonMetricOptions):
|
|
|
10136
10623
|
account: typing.Optional[builtins.str] = None,
|
|
10137
10624
|
color: typing.Optional[builtins.str] = None,
|
|
10138
10625
|
dimensions_map: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
10626
|
+
id: typing.Optional[builtins.str] = None,
|
|
10139
10627
|
label: typing.Optional[builtins.str] = None,
|
|
10140
10628
|
period: typing.Optional[_Duration_4839e8c3] = None,
|
|
10141
10629
|
region: typing.Optional[builtins.str] = None,
|
|
@@ -10143,6 +10631,7 @@ class MetricProps(CommonMetricOptions):
|
|
|
10143
10631
|
stack_region: typing.Optional[builtins.str] = None,
|
|
10144
10632
|
statistic: typing.Optional[builtins.str] = None,
|
|
10145
10633
|
unit: typing.Optional["Unit"] = None,
|
|
10634
|
+
visible: typing.Optional[builtins.bool] = None,
|
|
10146
10635
|
metric_name: builtins.str,
|
|
10147
10636
|
namespace: builtins.str,
|
|
10148
10637
|
) -> None:
|
|
@@ -10151,6 +10640,7 @@ class MetricProps(CommonMetricOptions):
|
|
|
10151
10640
|
:param account: Account which this metric comes from. Default: - Deployment account.
|
|
10152
10641
|
:param color: The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The ``Color`` class has a set of standard colors that can be used here. Default: - Automatic color
|
|
10153
10642
|
:param dimensions_map: Dimensions of the metric. Default: - No dimensions.
|
|
10643
|
+
:param id: Unique identifier for this metric when used in dashboard widgets. The id can be used as a variable to represent this metric in math expressions. Valid characters are letters, numbers, and underscore. The first character must be a lowercase letter. Default: - No ID
|
|
10154
10644
|
:param label: Label for this metric when added to a Graph in a Dashboard. You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_ to show summary information about the entire displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. Default: - No label
|
|
10155
10645
|
:param period: The period over which the specified statistic is applied. Default: Duration.minutes(5)
|
|
10156
10646
|
:param region: Region which this metric comes from. Default: - Deployment region.
|
|
@@ -10158,6 +10648,7 @@ class MetricProps(CommonMetricOptions):
|
|
|
10158
10648
|
:param stack_region: Region of the stack this metric is attached to. Default: - Deployment region.
|
|
10159
10649
|
:param statistic: What function to use for aggregating. Use the ``aws_cloudwatch.Stats`` helper class to construct valid input strings. Can be one of the following: - "Minimum" | "min" - "Maximum" | "max" - "Average" | "avg" - "Sum" | "sum" - "SampleCount | "n" - "pNN.NN" - "tmNN.NN" | "tm(NN.NN%:NN.NN%)" - "iqm" - "wmNN.NN" | "wm(NN.NN%:NN.NN%)" - "tcNN.NN" | "tc(NN.NN%:NN.NN%)" - "tsNN.NN" | "ts(NN.NN%:NN.NN%)" Default: Average
|
|
10160
10650
|
:param unit: Unit used to filter the metric stream. Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units. The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases. CloudWatch does not honor this property for graphs. Default: - All metric datums in the given metric stream
|
|
10651
|
+
:param visible: Whether this metric should be visible in dashboard graphs. Setting this to false is useful when you want to hide raw metrics that are used in math expressions, and show only the expression results. Default: true
|
|
10161
10652
|
:param metric_name: Name of the metric.
|
|
10162
10653
|
:param namespace: Namespace of the metric.
|
|
10163
10654
|
|
|
@@ -10170,7 +10661,7 @@ class MetricProps(CommonMetricOptions):
|
|
|
10170
10661
|
namespace="AWS/EC2",
|
|
10171
10662
|
metric_name="CPUUtilization",
|
|
10172
10663
|
statistic="Average",
|
|
10173
|
-
period=Duration.
|
|
10664
|
+
period=Duration.hours(1)
|
|
10174
10665
|
)
|
|
10175
10666
|
|
|
10176
10667
|
# Create an anomaly detection alarm
|
|
@@ -10190,6 +10681,7 @@ class MetricProps(CommonMetricOptions):
|
|
|
10190
10681
|
check_type(argname="argument account", value=account, expected_type=type_hints["account"])
|
|
10191
10682
|
check_type(argname="argument color", value=color, expected_type=type_hints["color"])
|
|
10192
10683
|
check_type(argname="argument dimensions_map", value=dimensions_map, expected_type=type_hints["dimensions_map"])
|
|
10684
|
+
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
10193
10685
|
check_type(argname="argument label", value=label, expected_type=type_hints["label"])
|
|
10194
10686
|
check_type(argname="argument period", value=period, expected_type=type_hints["period"])
|
|
10195
10687
|
check_type(argname="argument region", value=region, expected_type=type_hints["region"])
|
|
@@ -10197,6 +10689,7 @@ class MetricProps(CommonMetricOptions):
|
|
|
10197
10689
|
check_type(argname="argument stack_region", value=stack_region, expected_type=type_hints["stack_region"])
|
|
10198
10690
|
check_type(argname="argument statistic", value=statistic, expected_type=type_hints["statistic"])
|
|
10199
10691
|
check_type(argname="argument unit", value=unit, expected_type=type_hints["unit"])
|
|
10692
|
+
check_type(argname="argument visible", value=visible, expected_type=type_hints["visible"])
|
|
10200
10693
|
check_type(argname="argument metric_name", value=metric_name, expected_type=type_hints["metric_name"])
|
|
10201
10694
|
check_type(argname="argument namespace", value=namespace, expected_type=type_hints["namespace"])
|
|
10202
10695
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
@@ -10209,6 +10702,8 @@ class MetricProps(CommonMetricOptions):
|
|
|
10209
10702
|
self._values["color"] = color
|
|
10210
10703
|
if dimensions_map is not None:
|
|
10211
10704
|
self._values["dimensions_map"] = dimensions_map
|
|
10705
|
+
if id is not None:
|
|
10706
|
+
self._values["id"] = id
|
|
10212
10707
|
if label is not None:
|
|
10213
10708
|
self._values["label"] = label
|
|
10214
10709
|
if period is not None:
|
|
@@ -10223,6 +10718,8 @@ class MetricProps(CommonMetricOptions):
|
|
|
10223
10718
|
self._values["statistic"] = statistic
|
|
10224
10719
|
if unit is not None:
|
|
10225
10720
|
self._values["unit"] = unit
|
|
10721
|
+
if visible is not None:
|
|
10722
|
+
self._values["visible"] = visible
|
|
10226
10723
|
|
|
10227
10724
|
@builtins.property
|
|
10228
10725
|
def account(self) -> typing.Optional[builtins.str]:
|
|
@@ -10253,6 +10750,19 @@ class MetricProps(CommonMetricOptions):
|
|
|
10253
10750
|
result = self._values.get("dimensions_map")
|
|
10254
10751
|
return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
|
|
10255
10752
|
|
|
10753
|
+
@builtins.property
|
|
10754
|
+
def id(self) -> typing.Optional[builtins.str]:
|
|
10755
|
+
'''Unique identifier for this metric when used in dashboard widgets.
|
|
10756
|
+
|
|
10757
|
+
The id can be used as a variable to represent this metric in math expressions.
|
|
10758
|
+
Valid characters are letters, numbers, and underscore. The first character
|
|
10759
|
+
must be a lowercase letter.
|
|
10760
|
+
|
|
10761
|
+
:default: - No ID
|
|
10762
|
+
'''
|
|
10763
|
+
result = self._values.get("id")
|
|
10764
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
10765
|
+
|
|
10256
10766
|
@builtins.property
|
|
10257
10767
|
def label(self) -> typing.Optional[builtins.str]:
|
|
10258
10768
|
'''Label for this metric when added to a Graph in a Dashboard.
|
|
@@ -10350,6 +10860,18 @@ class MetricProps(CommonMetricOptions):
|
|
|
10350
10860
|
result = self._values.get("unit")
|
|
10351
10861
|
return typing.cast(typing.Optional["Unit"], result)
|
|
10352
10862
|
|
|
10863
|
+
@builtins.property
|
|
10864
|
+
def visible(self) -> typing.Optional[builtins.bool]:
|
|
10865
|
+
'''Whether this metric should be visible in dashboard graphs.
|
|
10866
|
+
|
|
10867
|
+
Setting this to false is useful when you want to hide raw metrics
|
|
10868
|
+
that are used in math expressions, and show only the expression results.
|
|
10869
|
+
|
|
10870
|
+
:default: true
|
|
10871
|
+
'''
|
|
10872
|
+
result = self._values.get("visible")
|
|
10873
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
10874
|
+
|
|
10353
10875
|
@builtins.property
|
|
10354
10876
|
def metric_name(self) -> builtins.str:
|
|
10355
10877
|
'''Name of the metric.'''
|
|
@@ -10588,6 +11110,7 @@ class MetricStatConfig:
|
|
|
10588
11110
|
jsii_type="aws-cdk-lib.aws_cloudwatch.MetricWidgetProps",
|
|
10589
11111
|
jsii_struct_bases=[],
|
|
10590
11112
|
name_mapping={
|
|
11113
|
+
"account_id": "accountId",
|
|
10591
11114
|
"height": "height",
|
|
10592
11115
|
"region": "region",
|
|
10593
11116
|
"title": "title",
|
|
@@ -10598,6 +11121,7 @@ class MetricWidgetProps:
|
|
|
10598
11121
|
def __init__(
|
|
10599
11122
|
self,
|
|
10600
11123
|
*,
|
|
11124
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
10601
11125
|
height: typing.Optional[jsii.Number] = None,
|
|
10602
11126
|
region: typing.Optional[builtins.str] = None,
|
|
10603
11127
|
title: typing.Optional[builtins.str] = None,
|
|
@@ -10605,6 +11129,7 @@ class MetricWidgetProps:
|
|
|
10605
11129
|
) -> None:
|
|
10606
11130
|
'''Basic properties for widgets that display metrics.
|
|
10607
11131
|
|
|
11132
|
+
:param account_id: The AWS account ID where the metrics are located. This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account. For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html Default: - Current account
|
|
10608
11133
|
:param height: Height of the widget. Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.
|
|
10609
11134
|
:param region: The region the metrics of this graph should be taken from. Default: - Current region
|
|
10610
11135
|
:param title: Title for the graph. Default: - None
|
|
@@ -10619,6 +11144,7 @@ class MetricWidgetProps:
|
|
|
10619
11144
|
from aws_cdk import aws_cloudwatch as cloudwatch
|
|
10620
11145
|
|
|
10621
11146
|
metric_widget_props = cloudwatch.MetricWidgetProps(
|
|
11147
|
+
account_id="accountId",
|
|
10622
11148
|
height=123,
|
|
10623
11149
|
region="region",
|
|
10624
11150
|
title="title",
|
|
@@ -10627,11 +11153,14 @@ class MetricWidgetProps:
|
|
|
10627
11153
|
'''
|
|
10628
11154
|
if __debug__:
|
|
10629
11155
|
type_hints = typing.get_type_hints(_typecheckingstub__028d2c6eccbbf06b74566403b038cac0cdc1c8588c939f4352cc861885b12c38)
|
|
11156
|
+
check_type(argname="argument account_id", value=account_id, expected_type=type_hints["account_id"])
|
|
10630
11157
|
check_type(argname="argument height", value=height, expected_type=type_hints["height"])
|
|
10631
11158
|
check_type(argname="argument region", value=region, expected_type=type_hints["region"])
|
|
10632
11159
|
check_type(argname="argument title", value=title, expected_type=type_hints["title"])
|
|
10633
11160
|
check_type(argname="argument width", value=width, expected_type=type_hints["width"])
|
|
10634
11161
|
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
11162
|
+
if account_id is not None:
|
|
11163
|
+
self._values["account_id"] = account_id
|
|
10635
11164
|
if height is not None:
|
|
10636
11165
|
self._values["height"] = height
|
|
10637
11166
|
if region is not None:
|
|
@@ -10641,6 +11170,22 @@ class MetricWidgetProps:
|
|
|
10641
11170
|
if width is not None:
|
|
10642
11171
|
self._values["width"] = width
|
|
10643
11172
|
|
|
11173
|
+
@builtins.property
|
|
11174
|
+
def account_id(self) -> typing.Optional[builtins.str]:
|
|
11175
|
+
'''The AWS account ID where the metrics are located.
|
|
11176
|
+
|
|
11177
|
+
This enables cross-account functionality for CloudWatch dashboards.
|
|
11178
|
+
Before using this feature, ensure that proper cross-account sharing is configured
|
|
11179
|
+
between the monitoring account and source account.
|
|
11180
|
+
|
|
11181
|
+
For more information, see:
|
|
11182
|
+
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
|
11183
|
+
|
|
11184
|
+
:default: - Current account
|
|
11185
|
+
'''
|
|
11186
|
+
result = self._values.get("account_id")
|
|
11187
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
11188
|
+
|
|
10644
11189
|
@builtins.property
|
|
10645
11190
|
def height(self) -> typing.Optional[jsii.Number]:
|
|
10646
11191
|
'''Height of the widget.
|
|
@@ -10797,77 +11342,546 @@ class SearchComponents:
|
|
|
10797
11342
|
) -> None:
|
|
10798
11343
|
'''Search components for use with {@link Values.fromSearchComponents}.
|
|
10799
11344
|
|
|
10800
|
-
:param dimensions: The list of dimensions to be used in the search expression.
|
|
10801
|
-
:param metric_name: The metric name to be used in the search expression.
|
|
10802
|
-
:param namespace: The namespace to be used in the search expression.
|
|
10803
|
-
:param populate_from: The dimension name, that the search expression retrieves, whose values will be used to populate the values to choose from.
|
|
11345
|
+
:param dimensions: The list of dimensions to be used in the search expression.
|
|
11346
|
+
:param metric_name: The metric name to be used in the search expression.
|
|
11347
|
+
:param namespace: The namespace to be used in the search expression.
|
|
11348
|
+
:param populate_from: The dimension name, that the search expression retrieves, whose values will be used to populate the values to choose from.
|
|
11349
|
+
|
|
11350
|
+
:exampleMetadata: infused
|
|
11351
|
+
|
|
11352
|
+
Example::
|
|
11353
|
+
|
|
11354
|
+
import aws_cdk.aws_cloudwatch as cw
|
|
11355
|
+
|
|
11356
|
+
|
|
11357
|
+
dashboard = cw.Dashboard(self, "Dash",
|
|
11358
|
+
default_interval=Duration.days(7),
|
|
11359
|
+
variables=[cw.DashboardVariable(
|
|
11360
|
+
id="functionName",
|
|
11361
|
+
type=cw.VariableType.PATTERN,
|
|
11362
|
+
label="Function",
|
|
11363
|
+
input_type=cw.VariableInputType.RADIO,
|
|
11364
|
+
value="originalFuncNameInDashboard",
|
|
11365
|
+
# equivalent to cw.Values.fromSearch('{AWS/Lambda,FunctionName} MetricName=\"Duration\"', 'FunctionName')
|
|
11366
|
+
values=cw.Values.from_search_components(
|
|
11367
|
+
namespace="AWS/Lambda",
|
|
11368
|
+
dimensions=["FunctionName"],
|
|
11369
|
+
metric_name="Duration",
|
|
11370
|
+
populate_from="FunctionName"
|
|
11371
|
+
),
|
|
11372
|
+
default_value=cw.DefaultValue.FIRST,
|
|
11373
|
+
visible=True
|
|
11374
|
+
)]
|
|
11375
|
+
)
|
|
11376
|
+
'''
|
|
11377
|
+
if __debug__:
|
|
11378
|
+
type_hints = typing.get_type_hints(_typecheckingstub__834c69a269555056b1b73146ff2784af68174eb591f39133c585607049d7afe7)
|
|
11379
|
+
check_type(argname="argument dimensions", value=dimensions, expected_type=type_hints["dimensions"])
|
|
11380
|
+
check_type(argname="argument metric_name", value=metric_name, expected_type=type_hints["metric_name"])
|
|
11381
|
+
check_type(argname="argument namespace", value=namespace, expected_type=type_hints["namespace"])
|
|
11382
|
+
check_type(argname="argument populate_from", value=populate_from, expected_type=type_hints["populate_from"])
|
|
11383
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
11384
|
+
"dimensions": dimensions,
|
|
11385
|
+
"metric_name": metric_name,
|
|
11386
|
+
"namespace": namespace,
|
|
11387
|
+
"populate_from": populate_from,
|
|
11388
|
+
}
|
|
11389
|
+
|
|
11390
|
+
@builtins.property
|
|
11391
|
+
def dimensions(self) -> typing.List[builtins.str]:
|
|
11392
|
+
'''The list of dimensions to be used in the search expression.'''
|
|
11393
|
+
result = self._values.get("dimensions")
|
|
11394
|
+
assert result is not None, "Required property 'dimensions' is missing"
|
|
11395
|
+
return typing.cast(typing.List[builtins.str], result)
|
|
11396
|
+
|
|
11397
|
+
@builtins.property
|
|
11398
|
+
def metric_name(self) -> builtins.str:
|
|
11399
|
+
'''The metric name to be used in the search expression.'''
|
|
11400
|
+
result = self._values.get("metric_name")
|
|
11401
|
+
assert result is not None, "Required property 'metric_name' is missing"
|
|
11402
|
+
return typing.cast(builtins.str, result)
|
|
11403
|
+
|
|
11404
|
+
@builtins.property
|
|
11405
|
+
def namespace(self) -> builtins.str:
|
|
11406
|
+
'''The namespace to be used in the search expression.'''
|
|
11407
|
+
result = self._values.get("namespace")
|
|
11408
|
+
assert result is not None, "Required property 'namespace' is missing"
|
|
11409
|
+
return typing.cast(builtins.str, result)
|
|
11410
|
+
|
|
11411
|
+
@builtins.property
|
|
11412
|
+
def populate_from(self) -> builtins.str:
|
|
11413
|
+
'''The dimension name, that the search expression retrieves, whose values will be used to populate the values to choose from.'''
|
|
11414
|
+
result = self._values.get("populate_from")
|
|
11415
|
+
assert result is not None, "Required property 'populate_from' is missing"
|
|
11416
|
+
return typing.cast(builtins.str, result)
|
|
11417
|
+
|
|
11418
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
11419
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
11420
|
+
|
|
11421
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
11422
|
+
return not (rhs == self)
|
|
11423
|
+
|
|
11424
|
+
def __repr__(self) -> str:
|
|
11425
|
+
return "SearchComponents(%s)" % ", ".join(
|
|
11426
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
11427
|
+
)
|
|
11428
|
+
|
|
11429
|
+
|
|
11430
|
+
@jsii.implements(IMetric)
|
|
11431
|
+
class SearchExpression(
|
|
11432
|
+
metaclass=jsii.JSIIMeta,
|
|
11433
|
+
jsii_type="aws-cdk-lib.aws_cloudwatch.SearchExpression",
|
|
11434
|
+
):
|
|
11435
|
+
'''A CloudWatch search expression for dynamically finding and graphing multiple related metrics.
|
|
11436
|
+
|
|
11437
|
+
Search expressions allow you to search for and graph multiple related metrics from a single expression.
|
|
11438
|
+
This is particularly useful in dynamic environments where the exact metric names or dimensions
|
|
11439
|
+
may not be known at deployment time.
|
|
11440
|
+
|
|
11441
|
+
Example::
|
|
11442
|
+
|
|
11443
|
+
search_expression = cloudwatch.SearchExpression(
|
|
11444
|
+
expression="SEARCH('{AWS/EC2,InstanceId} CPUUtilization', 'Average', 300)",
|
|
11445
|
+
label="EC2 CPU Utilization",
|
|
11446
|
+
period=Duration.minutes(5)
|
|
11447
|
+
)
|
|
11448
|
+
|
|
11449
|
+
This class does not represent a resource, so hence is not a construct. Instead,
|
|
11450
|
+
SearchExpression is an abstraction that makes it easy to specify metrics for use in graphs.
|
|
11451
|
+
|
|
11452
|
+
:exampleMetadata: infused
|
|
11453
|
+
|
|
11454
|
+
Example::
|
|
11455
|
+
|
|
11456
|
+
cpu_utilization = cloudwatch.SearchExpression(
|
|
11457
|
+
expression="SEARCH('{AWS/EC2,InstanceId} MetricName=\"CPUUtilization\"', 'Average', 900)",
|
|
11458
|
+
label="EC2 CPU Utilization",
|
|
11459
|
+
color="#ff7f0e"
|
|
11460
|
+
)
|
|
11461
|
+
'''
|
|
11462
|
+
|
|
11463
|
+
def __init__(
|
|
11464
|
+
self,
|
|
11465
|
+
*,
|
|
11466
|
+
expression: builtins.str,
|
|
11467
|
+
color: typing.Optional[builtins.str] = None,
|
|
11468
|
+
label: typing.Optional[builtins.str] = None,
|
|
11469
|
+
period: typing.Optional[_Duration_4839e8c3] = None,
|
|
11470
|
+
search_account: typing.Optional[builtins.str] = None,
|
|
11471
|
+
search_region: typing.Optional[builtins.str] = None,
|
|
11472
|
+
) -> None:
|
|
11473
|
+
'''
|
|
11474
|
+
:param expression: The search expression defining the metrics to be retrieved. A search expression cannot be used within an Alarm. A search expression allows you to retrieve and graph multiple related metrics in a single statement. It can return up to 500 time series. Examples: - ``SEARCH('{AWS/EC2,InstanceId} CPUUtilization', 'Average', 300)`` - ``SEARCH('{AWS/ApplicationELB,LoadBalancer} RequestCount', 'Sum', 60)`` - ``SEARCH('{MyNamespace,ServiceName} Errors', 'Sum')`` For more information about search expression syntax, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html
|
|
11475
|
+
:param color: Color for the metric produced by the search expression. If the search expression produces more than one time series, the color is assigned to the first one. Other metrics are assigned colors automatically. Default: - Automatically assigned.
|
|
11476
|
+
:param label: Label for this search expression when added to a Graph in a Dashboard. If this expression evaluates to more than one time series, each time series will appear in the graph using a combination of the expression label and the individual metric label. Specify the empty string (``''``) to suppress the expression label and only keep the metric label. You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_ to show summary information about the displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. If the search expression produces more than one time series, the maximum will be shown for each individual time series produce by this search expression. Default: - No label.
|
|
11477
|
+
:param period: The period over which the search expression's statistics are applied. This period overrides the period defined within the search expression. Default: Duration.minutes(5)
|
|
11478
|
+
:param search_account: Account to evaluate search expressions within. Default: - Deployment account.
|
|
11479
|
+
:param search_region: Region to evaluate search expressions within. Default: - Deployment region.
|
|
11480
|
+
'''
|
|
11481
|
+
props = SearchExpressionProps(
|
|
11482
|
+
expression=expression,
|
|
11483
|
+
color=color,
|
|
11484
|
+
label=label,
|
|
11485
|
+
period=period,
|
|
11486
|
+
search_account=search_account,
|
|
11487
|
+
search_region=search_region,
|
|
11488
|
+
)
|
|
11489
|
+
|
|
11490
|
+
jsii.create(self.__class__, self, [props])
|
|
11491
|
+
|
|
11492
|
+
@jsii.member(jsii_name="toMetricConfig")
|
|
11493
|
+
def to_metric_config(self) -> MetricConfig:
|
|
11494
|
+
'''Inspect the details of the metric object.'''
|
|
11495
|
+
return typing.cast(MetricConfig, jsii.invoke(self, "toMetricConfig", []))
|
|
11496
|
+
|
|
11497
|
+
@jsii.member(jsii_name="toString")
|
|
11498
|
+
def to_string(self) -> builtins.str:
|
|
11499
|
+
'''Returns a string representation of an object.'''
|
|
11500
|
+
return typing.cast(builtins.str, jsii.invoke(self, "toString", []))
|
|
11501
|
+
|
|
11502
|
+
@jsii.member(jsii_name="with")
|
|
11503
|
+
def with_(
|
|
11504
|
+
self,
|
|
11505
|
+
*,
|
|
11506
|
+
color: typing.Optional[builtins.str] = None,
|
|
11507
|
+
label: typing.Optional[builtins.str] = None,
|
|
11508
|
+
period: typing.Optional[_Duration_4839e8c3] = None,
|
|
11509
|
+
search_account: typing.Optional[builtins.str] = None,
|
|
11510
|
+
search_region: typing.Optional[builtins.str] = None,
|
|
11511
|
+
) -> "SearchExpression":
|
|
11512
|
+
'''Return a copy of SearchExpression with properties changed.
|
|
11513
|
+
|
|
11514
|
+
All properties except expression can be changed.
|
|
11515
|
+
|
|
11516
|
+
:param color: Color for the metric produced by the search expression. If the search expression produces more than one time series, the color is assigned to the first one. Other metrics are assigned colors automatically. Default: - Automatically assigned.
|
|
11517
|
+
:param label: Label for this search expression when added to a Graph in a Dashboard. If this expression evaluates to more than one time series, each time series will appear in the graph using a combination of the expression label and the individual metric label. Specify the empty string (``''``) to suppress the expression label and only keep the metric label. You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_ to show summary information about the displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. If the search expression produces more than one time series, the maximum will be shown for each individual time series produce by this search expression. Default: - No label.
|
|
11518
|
+
:param period: The period over which the search expression's statistics are applied. This period overrides the period defined within the search expression. Default: Duration.minutes(5)
|
|
11519
|
+
:param search_account: Account to evaluate search expressions within. Default: - Deployment account.
|
|
11520
|
+
:param search_region: Region to evaluate search expressions within. Default: - Deployment region.
|
|
11521
|
+
'''
|
|
11522
|
+
props = SearchExpressionOptions(
|
|
11523
|
+
color=color,
|
|
11524
|
+
label=label,
|
|
11525
|
+
period=period,
|
|
11526
|
+
search_account=search_account,
|
|
11527
|
+
search_region=search_region,
|
|
11528
|
+
)
|
|
11529
|
+
|
|
11530
|
+
return typing.cast("SearchExpression", jsii.invoke(self, "with", [props]))
|
|
11531
|
+
|
|
11532
|
+
@builtins.property
|
|
11533
|
+
@jsii.member(jsii_name="expression")
|
|
11534
|
+
def expression(self) -> builtins.str:
|
|
11535
|
+
'''The search expression defining the metrics to be retrieved.'''
|
|
11536
|
+
return typing.cast(builtins.str, jsii.get(self, "expression"))
|
|
11537
|
+
|
|
11538
|
+
@builtins.property
|
|
11539
|
+
@jsii.member(jsii_name="period")
|
|
11540
|
+
def period(self) -> _Duration_4839e8c3:
|
|
11541
|
+
'''The aggregation period for the metrics produced by the Search Expression.'''
|
|
11542
|
+
return typing.cast(_Duration_4839e8c3, jsii.get(self, "period"))
|
|
11543
|
+
|
|
11544
|
+
@builtins.property
|
|
11545
|
+
@jsii.member(jsii_name="color")
|
|
11546
|
+
def color(self) -> typing.Optional[builtins.str]:
|
|
11547
|
+
'''Hex color code (e.g. '#00ff00'), to use when rendering the resulting metrics in a graph. If multiple time series are returned, color is assigned to the first metric, color for the other metrics is automatically assigned.'''
|
|
11548
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "color"))
|
|
11549
|
+
|
|
11550
|
+
@builtins.property
|
|
11551
|
+
@jsii.member(jsii_name="label")
|
|
11552
|
+
def label(self) -> typing.Optional[builtins.str]:
|
|
11553
|
+
'''The label is used as a prefix for the title of each metric returned by the search expression.'''
|
|
11554
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "label"))
|
|
11555
|
+
|
|
11556
|
+
@builtins.property
|
|
11557
|
+
@jsii.member(jsii_name="searchAccount")
|
|
11558
|
+
def search_account(self) -> typing.Optional[builtins.str]:
|
|
11559
|
+
'''Account to evaluate search expressions within.'''
|
|
11560
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "searchAccount"))
|
|
11561
|
+
|
|
11562
|
+
@builtins.property
|
|
11563
|
+
@jsii.member(jsii_name="searchRegion")
|
|
11564
|
+
def search_region(self) -> typing.Optional[builtins.str]:
|
|
11565
|
+
'''Region to evaluate search expressions within.'''
|
|
11566
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "searchRegion"))
|
|
11567
|
+
|
|
11568
|
+
@builtins.property
|
|
11569
|
+
@jsii.member(jsii_name="warnings")
|
|
11570
|
+
def warnings(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
11571
|
+
'''(deprecated) Warnings generated by this search expression.
|
|
11572
|
+
|
|
11573
|
+
:deprecated: - use warningsV2
|
|
11574
|
+
|
|
11575
|
+
:stability: deprecated
|
|
11576
|
+
'''
|
|
11577
|
+
return typing.cast(typing.Optional[typing.List[builtins.str]], jsii.get(self, "warnings"))
|
|
11578
|
+
|
|
11579
|
+
@builtins.property
|
|
11580
|
+
@jsii.member(jsii_name="warningsV2")
|
|
11581
|
+
def warnings_v2(
|
|
11582
|
+
self,
|
|
11583
|
+
) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
|
|
11584
|
+
'''Warnings generated by this search expression.'''
|
|
11585
|
+
return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], jsii.get(self, "warningsV2"))
|
|
11586
|
+
|
|
11587
|
+
|
|
11588
|
+
@jsii.data_type(
|
|
11589
|
+
jsii_type="aws-cdk-lib.aws_cloudwatch.SearchExpressionOptions",
|
|
11590
|
+
jsii_struct_bases=[],
|
|
11591
|
+
name_mapping={
|
|
11592
|
+
"color": "color",
|
|
11593
|
+
"label": "label",
|
|
11594
|
+
"period": "period",
|
|
11595
|
+
"search_account": "searchAccount",
|
|
11596
|
+
"search_region": "searchRegion",
|
|
11597
|
+
},
|
|
11598
|
+
)
|
|
11599
|
+
class SearchExpressionOptions:
|
|
11600
|
+
def __init__(
|
|
11601
|
+
self,
|
|
11602
|
+
*,
|
|
11603
|
+
color: typing.Optional[builtins.str] = None,
|
|
11604
|
+
label: typing.Optional[builtins.str] = None,
|
|
11605
|
+
period: typing.Optional[_Duration_4839e8c3] = None,
|
|
11606
|
+
search_account: typing.Optional[builtins.str] = None,
|
|
11607
|
+
search_region: typing.Optional[builtins.str] = None,
|
|
11608
|
+
) -> None:
|
|
11609
|
+
'''Configurable options for SearchExpressions.
|
|
11610
|
+
|
|
11611
|
+
:param color: Color for the metric produced by the search expression. If the search expression produces more than one time series, the color is assigned to the first one. Other metrics are assigned colors automatically. Default: - Automatically assigned.
|
|
11612
|
+
:param label: Label for this search expression when added to a Graph in a Dashboard. If this expression evaluates to more than one time series, each time series will appear in the graph using a combination of the expression label and the individual metric label. Specify the empty string (``''``) to suppress the expression label and only keep the metric label. You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_ to show summary information about the displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. If the search expression produces more than one time series, the maximum will be shown for each individual time series produce by this search expression. Default: - No label.
|
|
11613
|
+
:param period: The period over which the search expression's statistics are applied. This period overrides the period defined within the search expression. Default: Duration.minutes(5)
|
|
11614
|
+
:param search_account: Account to evaluate search expressions within. Default: - Deployment account.
|
|
11615
|
+
:param search_region: Region to evaluate search expressions within. Default: - Deployment region.
|
|
11616
|
+
|
|
11617
|
+
:exampleMetadata: fixture=_generated
|
|
11618
|
+
|
|
11619
|
+
Example::
|
|
11620
|
+
|
|
11621
|
+
# The code below shows an example of how to instantiate this type.
|
|
11622
|
+
# The values are placeholders you should change.
|
|
11623
|
+
import aws_cdk as cdk
|
|
11624
|
+
from aws_cdk import aws_cloudwatch as cloudwatch
|
|
11625
|
+
|
|
11626
|
+
search_expression_options = cloudwatch.SearchExpressionOptions(
|
|
11627
|
+
color="color",
|
|
11628
|
+
label="label",
|
|
11629
|
+
period=cdk.Duration.minutes(30),
|
|
11630
|
+
search_account="searchAccount",
|
|
11631
|
+
search_region="searchRegion"
|
|
11632
|
+
)
|
|
11633
|
+
'''
|
|
11634
|
+
if __debug__:
|
|
11635
|
+
type_hints = typing.get_type_hints(_typecheckingstub__9f60f6548f685a7de97fff8e4e2d7ad81a4a32dbef7d990d9298e04900ccf74c)
|
|
11636
|
+
check_type(argname="argument color", value=color, expected_type=type_hints["color"])
|
|
11637
|
+
check_type(argname="argument label", value=label, expected_type=type_hints["label"])
|
|
11638
|
+
check_type(argname="argument period", value=period, expected_type=type_hints["period"])
|
|
11639
|
+
check_type(argname="argument search_account", value=search_account, expected_type=type_hints["search_account"])
|
|
11640
|
+
check_type(argname="argument search_region", value=search_region, expected_type=type_hints["search_region"])
|
|
11641
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
11642
|
+
if color is not None:
|
|
11643
|
+
self._values["color"] = color
|
|
11644
|
+
if label is not None:
|
|
11645
|
+
self._values["label"] = label
|
|
11646
|
+
if period is not None:
|
|
11647
|
+
self._values["period"] = period
|
|
11648
|
+
if search_account is not None:
|
|
11649
|
+
self._values["search_account"] = search_account
|
|
11650
|
+
if search_region is not None:
|
|
11651
|
+
self._values["search_region"] = search_region
|
|
11652
|
+
|
|
11653
|
+
@builtins.property
|
|
11654
|
+
def color(self) -> typing.Optional[builtins.str]:
|
|
11655
|
+
'''Color for the metric produced by the search expression.
|
|
11656
|
+
|
|
11657
|
+
If the search expression produces more than one time series, the color is assigned to the first one.
|
|
11658
|
+
Other metrics are assigned colors automatically.
|
|
11659
|
+
|
|
11660
|
+
:default: - Automatically assigned.
|
|
11661
|
+
'''
|
|
11662
|
+
result = self._values.get("color")
|
|
11663
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
11664
|
+
|
|
11665
|
+
@builtins.property
|
|
11666
|
+
def label(self) -> typing.Optional[builtins.str]:
|
|
11667
|
+
'''Label for this search expression when added to a Graph in a Dashboard.
|
|
11668
|
+
|
|
11669
|
+
If this expression evaluates to more than one time series,
|
|
11670
|
+
each time series will appear in the graph using a combination of the
|
|
11671
|
+
expression label and the individual metric label. Specify the empty
|
|
11672
|
+
string (``''``) to suppress the expression label and only keep the
|
|
11673
|
+
metric label.
|
|
11674
|
+
|
|
11675
|
+
You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_
|
|
11676
|
+
to show summary information about the displayed time series
|
|
11677
|
+
in the legend. For example, if you use::
|
|
11678
|
+
|
|
11679
|
+
[max: ${MAX}] MyMetric
|
|
11680
|
+
|
|
11681
|
+
As the metric label, the maximum value in the visible range will
|
|
11682
|
+
be shown next to the time series name in the graph's legend. If the
|
|
11683
|
+
search expression produces more than one time series, the maximum
|
|
11684
|
+
will be shown for each individual time series produce by this
|
|
11685
|
+
search expression.
|
|
11686
|
+
|
|
11687
|
+
:default: - No label.
|
|
11688
|
+
'''
|
|
11689
|
+
result = self._values.get("label")
|
|
11690
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
11691
|
+
|
|
11692
|
+
@builtins.property
|
|
11693
|
+
def period(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
11694
|
+
'''The period over which the search expression's statistics are applied.
|
|
11695
|
+
|
|
11696
|
+
This period overrides the period defined within the search expression.
|
|
11697
|
+
|
|
11698
|
+
:default: Duration.minutes(5)
|
|
11699
|
+
'''
|
|
11700
|
+
result = self._values.get("period")
|
|
11701
|
+
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
11702
|
+
|
|
11703
|
+
@builtins.property
|
|
11704
|
+
def search_account(self) -> typing.Optional[builtins.str]:
|
|
11705
|
+
'''Account to evaluate search expressions within.
|
|
11706
|
+
|
|
11707
|
+
:default: - Deployment account.
|
|
11708
|
+
'''
|
|
11709
|
+
result = self._values.get("search_account")
|
|
11710
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
11711
|
+
|
|
11712
|
+
@builtins.property
|
|
11713
|
+
def search_region(self) -> typing.Optional[builtins.str]:
|
|
11714
|
+
'''Region to evaluate search expressions within.
|
|
11715
|
+
|
|
11716
|
+
:default: - Deployment region.
|
|
11717
|
+
'''
|
|
11718
|
+
result = self._values.get("search_region")
|
|
11719
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
11720
|
+
|
|
11721
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
11722
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
11723
|
+
|
|
11724
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
11725
|
+
return not (rhs == self)
|
|
11726
|
+
|
|
11727
|
+
def __repr__(self) -> str:
|
|
11728
|
+
return "SearchExpressionOptions(%s)" % ", ".join(
|
|
11729
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
11730
|
+
)
|
|
11731
|
+
|
|
11732
|
+
|
|
11733
|
+
@jsii.data_type(
|
|
11734
|
+
jsii_type="aws-cdk-lib.aws_cloudwatch.SearchExpressionProps",
|
|
11735
|
+
jsii_struct_bases=[SearchExpressionOptions],
|
|
11736
|
+
name_mapping={
|
|
11737
|
+
"color": "color",
|
|
11738
|
+
"label": "label",
|
|
11739
|
+
"period": "period",
|
|
11740
|
+
"search_account": "searchAccount",
|
|
11741
|
+
"search_region": "searchRegion",
|
|
11742
|
+
"expression": "expression",
|
|
11743
|
+
},
|
|
11744
|
+
)
|
|
11745
|
+
class SearchExpressionProps(SearchExpressionOptions):
|
|
11746
|
+
def __init__(
|
|
11747
|
+
self,
|
|
11748
|
+
*,
|
|
11749
|
+
color: typing.Optional[builtins.str] = None,
|
|
11750
|
+
label: typing.Optional[builtins.str] = None,
|
|
11751
|
+
period: typing.Optional[_Duration_4839e8c3] = None,
|
|
11752
|
+
search_account: typing.Optional[builtins.str] = None,
|
|
11753
|
+
search_region: typing.Optional[builtins.str] = None,
|
|
11754
|
+
expression: builtins.str,
|
|
11755
|
+
) -> None:
|
|
11756
|
+
'''Properties for a SearchExpression.
|
|
11757
|
+
|
|
11758
|
+
:param color: Color for the metric produced by the search expression. If the search expression produces more than one time series, the color is assigned to the first one. Other metrics are assigned colors automatically. Default: - Automatically assigned.
|
|
11759
|
+
:param label: Label for this search expression when added to a Graph in a Dashboard. If this expression evaluates to more than one time series, each time series will appear in the graph using a combination of the expression label and the individual metric label. Specify the empty string (``''``) to suppress the expression label and only keep the metric label. You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_ to show summary information about the displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. If the search expression produces more than one time series, the maximum will be shown for each individual time series produce by this search expression. Default: - No label.
|
|
11760
|
+
:param period: The period over which the search expression's statistics are applied. This period overrides the period defined within the search expression. Default: Duration.minutes(5)
|
|
11761
|
+
:param search_account: Account to evaluate search expressions within. Default: - Deployment account.
|
|
11762
|
+
:param search_region: Region to evaluate search expressions within. Default: - Deployment region.
|
|
11763
|
+
:param expression: The search expression defining the metrics to be retrieved. A search expression cannot be used within an Alarm. A search expression allows you to retrieve and graph multiple related metrics in a single statement. It can return up to 500 time series. Examples: - ``SEARCH('{AWS/EC2,InstanceId} CPUUtilization', 'Average', 300)`` - ``SEARCH('{AWS/ApplicationELB,LoadBalancer} RequestCount', 'Sum', 60)`` - ``SEARCH('{MyNamespace,ServiceName} Errors', 'Sum')`` For more information about search expression syntax, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html
|
|
11764
|
+
|
|
11765
|
+
:exampleMetadata: infused
|
|
11766
|
+
|
|
11767
|
+
Example::
|
|
11768
|
+
|
|
11769
|
+
cpu_utilization = cloudwatch.SearchExpression(
|
|
11770
|
+
expression="SEARCH('{AWS/EC2,InstanceId} MetricName=\"CPUUtilization\"', 'Average', 900)",
|
|
11771
|
+
label="EC2 CPU Utilization",
|
|
11772
|
+
color="#ff7f0e"
|
|
11773
|
+
)
|
|
11774
|
+
'''
|
|
11775
|
+
if __debug__:
|
|
11776
|
+
type_hints = typing.get_type_hints(_typecheckingstub__ea7b0e5733d6f08911d542fd96929aa00fb8c855f30bc6cce35d09d7e062f08e)
|
|
11777
|
+
check_type(argname="argument color", value=color, expected_type=type_hints["color"])
|
|
11778
|
+
check_type(argname="argument label", value=label, expected_type=type_hints["label"])
|
|
11779
|
+
check_type(argname="argument period", value=period, expected_type=type_hints["period"])
|
|
11780
|
+
check_type(argname="argument search_account", value=search_account, expected_type=type_hints["search_account"])
|
|
11781
|
+
check_type(argname="argument search_region", value=search_region, expected_type=type_hints["search_region"])
|
|
11782
|
+
check_type(argname="argument expression", value=expression, expected_type=type_hints["expression"])
|
|
11783
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
11784
|
+
"expression": expression,
|
|
11785
|
+
}
|
|
11786
|
+
if color is not None:
|
|
11787
|
+
self._values["color"] = color
|
|
11788
|
+
if label is not None:
|
|
11789
|
+
self._values["label"] = label
|
|
11790
|
+
if period is not None:
|
|
11791
|
+
self._values["period"] = period
|
|
11792
|
+
if search_account is not None:
|
|
11793
|
+
self._values["search_account"] = search_account
|
|
11794
|
+
if search_region is not None:
|
|
11795
|
+
self._values["search_region"] = search_region
|
|
11796
|
+
|
|
11797
|
+
@builtins.property
|
|
11798
|
+
def color(self) -> typing.Optional[builtins.str]:
|
|
11799
|
+
'''Color for the metric produced by the search expression.
|
|
11800
|
+
|
|
11801
|
+
If the search expression produces more than one time series, the color is assigned to the first one.
|
|
11802
|
+
Other metrics are assigned colors automatically.
|
|
11803
|
+
|
|
11804
|
+
:default: - Automatically assigned.
|
|
11805
|
+
'''
|
|
11806
|
+
result = self._values.get("color")
|
|
11807
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
11808
|
+
|
|
11809
|
+
@builtins.property
|
|
11810
|
+
def label(self) -> typing.Optional[builtins.str]:
|
|
11811
|
+
'''Label for this search expression when added to a Graph in a Dashboard.
|
|
11812
|
+
|
|
11813
|
+
If this expression evaluates to more than one time series,
|
|
11814
|
+
each time series will appear in the graph using a combination of the
|
|
11815
|
+
expression label and the individual metric label. Specify the empty
|
|
11816
|
+
string (``''``) to suppress the expression label and only keep the
|
|
11817
|
+
metric label.
|
|
11818
|
+
|
|
11819
|
+
You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_
|
|
11820
|
+
to show summary information about the displayed time series
|
|
11821
|
+
in the legend. For example, if you use::
|
|
10804
11822
|
|
|
10805
|
-
|
|
11823
|
+
[max: ${MAX}] MyMetric
|
|
10806
11824
|
|
|
10807
|
-
|
|
11825
|
+
As the metric label, the maximum value in the visible range will
|
|
11826
|
+
be shown next to the time series name in the graph's legend. If the
|
|
11827
|
+
search expression produces more than one time series, the maximum
|
|
11828
|
+
will be shown for each individual time series produce by this
|
|
11829
|
+
search expression.
|
|
10808
11830
|
|
|
10809
|
-
|
|
10810
|
-
|
|
10811
|
-
|
|
10812
|
-
dashboard = cw.Dashboard(self, "Dash",
|
|
10813
|
-
default_interval=Duration.days(7),
|
|
10814
|
-
variables=[cw.DashboardVariable(
|
|
10815
|
-
id="functionName",
|
|
10816
|
-
type=cw.VariableType.PATTERN,
|
|
10817
|
-
label="Function",
|
|
10818
|
-
input_type=cw.VariableInputType.RADIO,
|
|
10819
|
-
value="originalFuncNameInDashboard",
|
|
10820
|
-
# equivalent to cw.Values.fromSearch('{AWS/Lambda,FunctionName} MetricName=\"Duration\"', 'FunctionName')
|
|
10821
|
-
values=cw.Values.from_search_components(
|
|
10822
|
-
namespace="AWS/Lambda",
|
|
10823
|
-
dimensions=["FunctionName"],
|
|
10824
|
-
metric_name="Duration",
|
|
10825
|
-
populate_from="FunctionName"
|
|
10826
|
-
),
|
|
10827
|
-
default_value=cw.DefaultValue.FIRST,
|
|
10828
|
-
visible=True
|
|
10829
|
-
)]
|
|
10830
|
-
)
|
|
11831
|
+
:default: - No label.
|
|
10831
11832
|
'''
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
check_type(argname="argument dimensions", value=dimensions, expected_type=type_hints["dimensions"])
|
|
10835
|
-
check_type(argname="argument metric_name", value=metric_name, expected_type=type_hints["metric_name"])
|
|
10836
|
-
check_type(argname="argument namespace", value=namespace, expected_type=type_hints["namespace"])
|
|
10837
|
-
check_type(argname="argument populate_from", value=populate_from, expected_type=type_hints["populate_from"])
|
|
10838
|
-
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
10839
|
-
"dimensions": dimensions,
|
|
10840
|
-
"metric_name": metric_name,
|
|
10841
|
-
"namespace": namespace,
|
|
10842
|
-
"populate_from": populate_from,
|
|
10843
|
-
}
|
|
11833
|
+
result = self._values.get("label")
|
|
11834
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
10844
11835
|
|
|
10845
11836
|
@builtins.property
|
|
10846
|
-
def
|
|
10847
|
-
'''The
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
11837
|
+
def period(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
11838
|
+
'''The period over which the search expression's statistics are applied.
|
|
11839
|
+
|
|
11840
|
+
This period overrides the period defined within the search expression.
|
|
11841
|
+
|
|
11842
|
+
:default: Duration.minutes(5)
|
|
11843
|
+
'''
|
|
11844
|
+
result = self._values.get("period")
|
|
11845
|
+
return typing.cast(typing.Optional[_Duration_4839e8c3], result)
|
|
10851
11846
|
|
|
10852
11847
|
@builtins.property
|
|
10853
|
-
def
|
|
10854
|
-
'''
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
11848
|
+
def search_account(self) -> typing.Optional[builtins.str]:
|
|
11849
|
+
'''Account to evaluate search expressions within.
|
|
11850
|
+
|
|
11851
|
+
:default: - Deployment account.
|
|
11852
|
+
'''
|
|
11853
|
+
result = self._values.get("search_account")
|
|
11854
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
10858
11855
|
|
|
10859
11856
|
@builtins.property
|
|
10860
|
-
def
|
|
10861
|
-
'''
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
11857
|
+
def search_region(self) -> typing.Optional[builtins.str]:
|
|
11858
|
+
'''Region to evaluate search expressions within.
|
|
11859
|
+
|
|
11860
|
+
:default: - Deployment region.
|
|
11861
|
+
'''
|
|
11862
|
+
result = self._values.get("search_region")
|
|
11863
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
10865
11864
|
|
|
10866
11865
|
@builtins.property
|
|
10867
|
-
def
|
|
10868
|
-
'''The
|
|
10869
|
-
|
|
10870
|
-
|
|
11866
|
+
def expression(self) -> builtins.str:
|
|
11867
|
+
'''The search expression defining the metrics to be retrieved.
|
|
11868
|
+
|
|
11869
|
+
A search expression cannot be used within an Alarm.
|
|
11870
|
+
|
|
11871
|
+
A search expression allows you to retrieve and graph multiple related metrics in a single statement.
|
|
11872
|
+
It can return up to 500 time series.
|
|
11873
|
+
|
|
11874
|
+
Examples:
|
|
11875
|
+
|
|
11876
|
+
- ``SEARCH('{AWS/EC2,InstanceId} CPUUtilization', 'Average', 300)``
|
|
11877
|
+
- ``SEARCH('{AWS/ApplicationELB,LoadBalancer} RequestCount', 'Sum', 60)``
|
|
11878
|
+
- ``SEARCH('{MyNamespace,ServiceName} Errors', 'Sum')``
|
|
11879
|
+
|
|
11880
|
+
For more information about search expression syntax, see:
|
|
11881
|
+
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html
|
|
11882
|
+
'''
|
|
11883
|
+
result = self._values.get("expression")
|
|
11884
|
+
assert result is not None, "Required property 'expression' is missing"
|
|
10871
11885
|
return typing.cast(builtins.str, result)
|
|
10872
11886
|
|
|
10873
11887
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
@@ -10877,7 +11891,7 @@ class SearchComponents:
|
|
|
10877
11891
|
return not (rhs == self)
|
|
10878
11892
|
|
|
10879
11893
|
def __repr__(self) -> str:
|
|
10880
|
-
return "
|
|
11894
|
+
return "SearchExpressionProps(%s)" % ", ".join(
|
|
10881
11895
|
k + "=" + repr(v) for k, v in self._values.items()
|
|
10882
11896
|
)
|
|
10883
11897
|
|
|
@@ -10898,6 +11912,7 @@ class Shading(enum.Enum):
|
|
|
10898
11912
|
jsii_type="aws-cdk-lib.aws_cloudwatch.SingleValueWidgetProps",
|
|
10899
11913
|
jsii_struct_bases=[MetricWidgetProps],
|
|
10900
11914
|
name_mapping={
|
|
11915
|
+
"account_id": "accountId",
|
|
10901
11916
|
"height": "height",
|
|
10902
11917
|
"region": "region",
|
|
10903
11918
|
"title": "title",
|
|
@@ -10915,6 +11930,7 @@ class SingleValueWidgetProps(MetricWidgetProps):
|
|
|
10915
11930
|
def __init__(
|
|
10916
11931
|
self,
|
|
10917
11932
|
*,
|
|
11933
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
10918
11934
|
height: typing.Optional[jsii.Number] = None,
|
|
10919
11935
|
region: typing.Optional[builtins.str] = None,
|
|
10920
11936
|
title: typing.Optional[builtins.str] = None,
|
|
@@ -10929,6 +11945,7 @@ class SingleValueWidgetProps(MetricWidgetProps):
|
|
|
10929
11945
|
) -> None:
|
|
10930
11946
|
'''Properties for a SingleValueWidget.
|
|
10931
11947
|
|
|
11948
|
+
:param account_id: The AWS account ID where the metrics are located. This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account. For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html Default: - Current account
|
|
10932
11949
|
:param height: Height of the widget. Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.
|
|
10933
11950
|
:param region: The region the metrics of this graph should be taken from. Default: - Current region
|
|
10934
11951
|
:param title: Title for the graph. Default: - None
|
|
@@ -10956,6 +11973,7 @@ class SingleValueWidgetProps(MetricWidgetProps):
|
|
|
10956
11973
|
'''
|
|
10957
11974
|
if __debug__:
|
|
10958
11975
|
type_hints = typing.get_type_hints(_typecheckingstub__4596565f40195bdcc9fe939fa585a3bdf484f8a4a6817e427c6f9e1e49650041)
|
|
11976
|
+
check_type(argname="argument account_id", value=account_id, expected_type=type_hints["account_id"])
|
|
10959
11977
|
check_type(argname="argument height", value=height, expected_type=type_hints["height"])
|
|
10960
11978
|
check_type(argname="argument region", value=region, expected_type=type_hints["region"])
|
|
10961
11979
|
check_type(argname="argument title", value=title, expected_type=type_hints["title"])
|
|
@@ -10970,6 +11988,8 @@ class SingleValueWidgetProps(MetricWidgetProps):
|
|
|
10970
11988
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
10971
11989
|
"metrics": metrics,
|
|
10972
11990
|
}
|
|
11991
|
+
if account_id is not None:
|
|
11992
|
+
self._values["account_id"] = account_id
|
|
10973
11993
|
if height is not None:
|
|
10974
11994
|
self._values["height"] = height
|
|
10975
11995
|
if region is not None:
|
|
@@ -10991,6 +12011,22 @@ class SingleValueWidgetProps(MetricWidgetProps):
|
|
|
10991
12011
|
if start is not None:
|
|
10992
12012
|
self._values["start"] = start
|
|
10993
12013
|
|
|
12014
|
+
@builtins.property
|
|
12015
|
+
def account_id(self) -> typing.Optional[builtins.str]:
|
|
12016
|
+
'''The AWS account ID where the metrics are located.
|
|
12017
|
+
|
|
12018
|
+
This enables cross-account functionality for CloudWatch dashboards.
|
|
12019
|
+
Before using this feature, ensure that proper cross-account sharing is configured
|
|
12020
|
+
between the monitoring account and source account.
|
|
12021
|
+
|
|
12022
|
+
For more information, see:
|
|
12023
|
+
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
|
12024
|
+
|
|
12025
|
+
:default: - Current account
|
|
12026
|
+
'''
|
|
12027
|
+
result = self._values.get("account_id")
|
|
12028
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
12029
|
+
|
|
10994
12030
|
@builtins.property
|
|
10995
12031
|
def height(self) -> typing.Optional[jsii.Number]:
|
|
10996
12032
|
'''Height of the widget.
|
|
@@ -11910,6 +12946,7 @@ class TableThreshold(
|
|
|
11910
12946
|
jsii_type="aws-cdk-lib.aws_cloudwatch.TableWidgetProps",
|
|
11911
12947
|
jsii_struct_bases=[MetricWidgetProps],
|
|
11912
12948
|
name_mapping={
|
|
12949
|
+
"account_id": "accountId",
|
|
11913
12950
|
"height": "height",
|
|
11914
12951
|
"region": "region",
|
|
11915
12952
|
"title": "title",
|
|
@@ -11932,6 +12969,7 @@ class TableWidgetProps(MetricWidgetProps):
|
|
|
11932
12969
|
def __init__(
|
|
11933
12970
|
self,
|
|
11934
12971
|
*,
|
|
12972
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
11935
12973
|
height: typing.Optional[jsii.Number] = None,
|
|
11936
12974
|
region: typing.Optional[builtins.str] = None,
|
|
11937
12975
|
title: typing.Optional[builtins.str] = None,
|
|
@@ -11951,6 +12989,7 @@ class TableWidgetProps(MetricWidgetProps):
|
|
|
11951
12989
|
) -> None:
|
|
11952
12990
|
'''Properties for a TableWidget.
|
|
11953
12991
|
|
|
12992
|
+
:param account_id: The AWS account ID where the metrics are located. This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account. For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html Default: - Current account
|
|
11954
12993
|
:param height: Height of the widget. Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.
|
|
11955
12994
|
:param region: The region the metrics of this graph should be taken from. Default: - Current region
|
|
11956
12995
|
:param title: Title for the graph. Default: - None
|
|
@@ -11985,6 +13024,7 @@ class TableWidgetProps(MetricWidgetProps):
|
|
|
11985
13024
|
summary = TableSummaryProps(**summary)
|
|
11986
13025
|
if __debug__:
|
|
11987
13026
|
type_hints = typing.get_type_hints(_typecheckingstub__03726ba90bb01c2a1340af4f73005fffe1b8288cff57d77f31d745d629defb8b)
|
|
13027
|
+
check_type(argname="argument account_id", value=account_id, expected_type=type_hints["account_id"])
|
|
11988
13028
|
check_type(argname="argument height", value=height, expected_type=type_hints["height"])
|
|
11989
13029
|
check_type(argname="argument region", value=region, expected_type=type_hints["region"])
|
|
11990
13030
|
check_type(argname="argument title", value=title, expected_type=type_hints["title"])
|
|
@@ -12002,6 +13042,8 @@ class TableWidgetProps(MetricWidgetProps):
|
|
|
12002
13042
|
check_type(argname="argument summary", value=summary, expected_type=type_hints["summary"])
|
|
12003
13043
|
check_type(argname="argument thresholds", value=thresholds, expected_type=type_hints["thresholds"])
|
|
12004
13044
|
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
13045
|
+
if account_id is not None:
|
|
13046
|
+
self._values["account_id"] = account_id
|
|
12005
13047
|
if height is not None:
|
|
12006
13048
|
self._values["height"] = height
|
|
12007
13049
|
if region is not None:
|
|
@@ -12035,6 +13077,22 @@ class TableWidgetProps(MetricWidgetProps):
|
|
|
12035
13077
|
if thresholds is not None:
|
|
12036
13078
|
self._values["thresholds"] = thresholds
|
|
12037
13079
|
|
|
13080
|
+
@builtins.property
|
|
13081
|
+
def account_id(self) -> typing.Optional[builtins.str]:
|
|
13082
|
+
'''The AWS account ID where the metrics are located.
|
|
13083
|
+
|
|
13084
|
+
This enables cross-account functionality for CloudWatch dashboards.
|
|
13085
|
+
Before using this feature, ensure that proper cross-account sharing is configured
|
|
13086
|
+
between the monitoring account and source account.
|
|
13087
|
+
|
|
13088
|
+
For more information, see:
|
|
13089
|
+
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
|
13090
|
+
|
|
13091
|
+
:default: - Current account
|
|
13092
|
+
'''
|
|
13093
|
+
result = self._values.get("account_id")
|
|
13094
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
13095
|
+
|
|
12038
13096
|
@builtins.property
|
|
12039
13097
|
def height(self) -> typing.Optional[jsii.Number]:
|
|
12040
13098
|
'''Height of the widget.
|
|
@@ -12872,8 +13930,8 @@ class YAxisProps:
|
|
|
12872
13930
|
'''Properties for a Y-Axis.
|
|
12873
13931
|
|
|
12874
13932
|
:param label: The label. Default: - No label
|
|
12875
|
-
:param max: The max value. Default: -
|
|
12876
|
-
:param min: The min value. Default:
|
|
13933
|
+
:param max: The max value. Default: - Auto
|
|
13934
|
+
:param min: The min value. Default: - Auto
|
|
12877
13935
|
:param show_units: Whether to show units. Default: true
|
|
12878
13936
|
|
|
12879
13937
|
:exampleMetadata: infused
|
|
@@ -12922,7 +13980,7 @@ class YAxisProps:
|
|
|
12922
13980
|
def max(self) -> typing.Optional[jsii.Number]:
|
|
12923
13981
|
'''The max value.
|
|
12924
13982
|
|
|
12925
|
-
:default: -
|
|
13983
|
+
:default: - Auto
|
|
12926
13984
|
'''
|
|
12927
13985
|
result = self._values.get("max")
|
|
12928
13986
|
return typing.cast(typing.Optional[jsii.Number], result)
|
|
@@ -12931,7 +13989,7 @@ class YAxisProps:
|
|
|
12931
13989
|
def min(self) -> typing.Optional[jsii.Number]:
|
|
12932
13990
|
'''The min value.
|
|
12933
13991
|
|
|
12934
|
-
:default:
|
|
13992
|
+
:default: - Auto
|
|
12935
13993
|
'''
|
|
12936
13994
|
result = self._values.get("min")
|
|
12937
13995
|
return typing.cast(typing.Optional[jsii.Number], result)
|
|
@@ -13005,31 +14063,29 @@ class AlarmProps(CreateAlarmOptions):
|
|
|
13005
14063
|
|
|
13006
14064
|
Example::
|
|
13007
14065
|
|
|
13008
|
-
|
|
14066
|
+
# log_group: logs.LogGroup
|
|
13009
14067
|
|
|
13010
|
-
|
|
14068
|
+
mf = logs.MetricFilter(self, "MetricFilter",
|
|
14069
|
+
log_group=log_group,
|
|
14070
|
+
metric_namespace="MyApp",
|
|
14071
|
+
metric_name="Latency",
|
|
14072
|
+
filter_pattern=logs.FilterPattern.exists("$.latency"),
|
|
14073
|
+
metric_value="$.latency",
|
|
14074
|
+
dimensions={
|
|
14075
|
+
"ErrorCode": "$.errorCode"
|
|
14076
|
+
},
|
|
14077
|
+
unit=cloudwatch.Unit.MILLISECONDS
|
|
14078
|
+
)
|
|
13011
14079
|
|
|
13012
|
-
#
|
|
13013
|
-
|
|
14080
|
+
# expose a metric from the metric filter
|
|
14081
|
+
metric = mf.metric()
|
|
13014
14082
|
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
|
|
13018
|
-
|
|
13019
|
-
|
|
13020
|
-
)
|
|
13021
|
-
deployment_group = codedeploy.LambdaDeploymentGroup(self, "BlueGreenDeployment",
|
|
13022
|
-
alias=alias,
|
|
13023
|
-
deployment_config=codedeploy.LambdaDeploymentConfig.LINEAR_10PERCENT_EVERY_1MINUTE,
|
|
13024
|
-
alarms=[alarm
|
|
13025
|
-
]
|
|
14083
|
+
# you can use the metric to create a new alarm
|
|
14084
|
+
cloudwatch.Alarm(self, "alarm from metric filter",
|
|
14085
|
+
metric=metric,
|
|
14086
|
+
threshold=100,
|
|
14087
|
+
evaluation_periods=2
|
|
13026
14088
|
)
|
|
13027
|
-
deployment_group.add_alarm(cloudwatch.Alarm(self, "BlueGreenErrors",
|
|
13028
|
-
comparison_operator=cloudwatch.ComparisonOperator.GREATER_THAN_THRESHOLD,
|
|
13029
|
-
threshold=1,
|
|
13030
|
-
evaluation_periods=1,
|
|
13031
|
-
metric=blue_green_alias.metric_errors()
|
|
13032
|
-
))
|
|
13033
14089
|
'''
|
|
13034
14090
|
if __debug__:
|
|
13035
14091
|
type_hints = typing.get_type_hints(_typecheckingstub__b2e7c873c118fbc1f6cf26e1bb5bd3d8549040c626a6450f2d686bb07b87266b)
|
|
@@ -13175,6 +14231,7 @@ class AlarmProps(CreateAlarmOptions):
|
|
|
13175
14231
|
jsii_type="aws-cdk-lib.aws_cloudwatch.AlarmWidgetProps",
|
|
13176
14232
|
jsii_struct_bases=[MetricWidgetProps],
|
|
13177
14233
|
name_mapping={
|
|
14234
|
+
"account_id": "accountId",
|
|
13178
14235
|
"height": "height",
|
|
13179
14236
|
"region": "region",
|
|
13180
14237
|
"title": "title",
|
|
@@ -13187,6 +14244,7 @@ class AlarmWidgetProps(MetricWidgetProps):
|
|
|
13187
14244
|
def __init__(
|
|
13188
14245
|
self,
|
|
13189
14246
|
*,
|
|
14247
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
13190
14248
|
height: typing.Optional[jsii.Number] = None,
|
|
13191
14249
|
region: typing.Optional[builtins.str] = None,
|
|
13192
14250
|
title: typing.Optional[builtins.str] = None,
|
|
@@ -13196,6 +14254,7 @@ class AlarmWidgetProps(MetricWidgetProps):
|
|
|
13196
14254
|
) -> None:
|
|
13197
14255
|
'''Properties for an AlarmWidget.
|
|
13198
14256
|
|
|
14257
|
+
:param account_id: The AWS account ID where the metrics are located. This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account. For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html Default: - Current account
|
|
13199
14258
|
:param height: Height of the widget. Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.
|
|
13200
14259
|
:param region: The region the metrics of this graph should be taken from. Default: - Current region
|
|
13201
14260
|
:param title: Title for the graph. Default: - None
|
|
@@ -13220,6 +14279,7 @@ class AlarmWidgetProps(MetricWidgetProps):
|
|
|
13220
14279
|
left_y_axis = YAxisProps(**left_y_axis)
|
|
13221
14280
|
if __debug__:
|
|
13222
14281
|
type_hints = typing.get_type_hints(_typecheckingstub__8b6bef2cc64a78bffd68dc95a764829a6c125294deaebcd42b56c493541573d5)
|
|
14282
|
+
check_type(argname="argument account_id", value=account_id, expected_type=type_hints["account_id"])
|
|
13223
14283
|
check_type(argname="argument height", value=height, expected_type=type_hints["height"])
|
|
13224
14284
|
check_type(argname="argument region", value=region, expected_type=type_hints["region"])
|
|
13225
14285
|
check_type(argname="argument title", value=title, expected_type=type_hints["title"])
|
|
@@ -13229,6 +14289,8 @@ class AlarmWidgetProps(MetricWidgetProps):
|
|
|
13229
14289
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
13230
14290
|
"alarm": alarm,
|
|
13231
14291
|
}
|
|
14292
|
+
if account_id is not None:
|
|
14293
|
+
self._values["account_id"] = account_id
|
|
13232
14294
|
if height is not None:
|
|
13233
14295
|
self._values["height"] = height
|
|
13234
14296
|
if region is not None:
|
|
@@ -13240,6 +14302,22 @@ class AlarmWidgetProps(MetricWidgetProps):
|
|
|
13240
14302
|
if left_y_axis is not None:
|
|
13241
14303
|
self._values["left_y_axis"] = left_y_axis
|
|
13242
14304
|
|
|
14305
|
+
@builtins.property
|
|
14306
|
+
def account_id(self) -> typing.Optional[builtins.str]:
|
|
14307
|
+
'''The AWS account ID where the metrics are located.
|
|
14308
|
+
|
|
14309
|
+
This enables cross-account functionality for CloudWatch dashboards.
|
|
14310
|
+
Before using this feature, ensure that proper cross-account sharing is configured
|
|
14311
|
+
between the monitoring account and source account.
|
|
14312
|
+
|
|
14313
|
+
For more information, see:
|
|
14314
|
+
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
|
14315
|
+
|
|
14316
|
+
:default: - Current account
|
|
14317
|
+
'''
|
|
14318
|
+
result = self._values.get("account_id")
|
|
14319
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
14320
|
+
|
|
13243
14321
|
@builtins.property
|
|
13244
14322
|
def height(self) -> typing.Optional[jsii.Number]:
|
|
13245
14323
|
'''Height of the widget.
|
|
@@ -13336,7 +14414,7 @@ class AnomalyDetectionMetricOptions(MathExpressionOptions):
|
|
|
13336
14414
|
|
|
13337
14415
|
:param color: Color for this metric when added to a Graph in a Dashboard. Default: - Automatic color
|
|
13338
14416
|
:param label: Label for this expression when added to a Graph in a Dashboard. If this expression evaluates to more than one time series (for example, through the use of ``METRICS()`` or ``SEARCH()`` expressions), each time series will appear in the graph using a combination of the expression label and the individual metric label. Specify the empty string (``''``) to suppress the expression label and only keep the metric label. You can use `dynamic labels <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html>`_ to show summary information about the displayed time series in the legend. For example, if you use:: [max: ${MAX}] MyMetric As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend. If the math expression produces more than one time series, the maximum will be shown for each individual time series produce by this math expression. Default: - Expression value is used as label
|
|
13339
|
-
:param period: The period over which the expression's statistics are applied. This period overrides all periods in the metrics used in this math expression. Default: Duration.minutes(5)
|
|
14417
|
+
:param period: The period over which the math expression's statistics are applied. This period overrides all periods in the metrics used in this math expression. Default: Duration.minutes(5)
|
|
13340
14418
|
:param search_account: Account to evaluate search expressions within. Specifying a searchAccount has no effect to the account used for metrics within the expression (passed via usingMetrics). Default: - Deployment account.
|
|
13341
14419
|
:param search_region: Region to evaluate search expressions within. Specifying a searchRegion has no effect to the region used for metrics within the expression (passed via usingMetrics). Default: - Deployment region.
|
|
13342
14420
|
:param metric: The metric to add the alarm on. Metric objects can be obtained from most resources, or you can construct custom Metric objects by instantiating one.
|
|
@@ -13429,7 +14507,7 @@ class AnomalyDetectionMetricOptions(MathExpressionOptions):
|
|
|
13429
14507
|
|
|
13430
14508
|
@builtins.property
|
|
13431
14509
|
def period(self) -> typing.Optional[_Duration_4839e8c3]:
|
|
13432
|
-
'''The period over which the expression's statistics are applied.
|
|
14510
|
+
'''The period over which the math expression's statistics are applied.
|
|
13433
14511
|
|
|
13434
14512
|
This period overrides all periods in the metrics used in this
|
|
13435
14513
|
math expression.
|
|
@@ -13864,6 +14942,7 @@ class GaugeWidget(
|
|
|
13864
14942
|
set_period_to_time_range: typing.Optional[builtins.bool] = None,
|
|
13865
14943
|
start: typing.Optional[builtins.str] = None,
|
|
13866
14944
|
statistic: typing.Optional[builtins.str] = None,
|
|
14945
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
13867
14946
|
height: typing.Optional[jsii.Number] = None,
|
|
13868
14947
|
region: typing.Optional[builtins.str] = None,
|
|
13869
14948
|
title: typing.Optional[builtins.str] = None,
|
|
@@ -13872,7 +14951,7 @@ class GaugeWidget(
|
|
|
13872
14951
|
'''
|
|
13873
14952
|
:param annotations: Annotations for the left Y axis. Default: - No annotations
|
|
13874
14953
|
:param end: The end of the time range to use for each widget independently from those of the dashboard. If you specify a value for end, you must also specify a value for start. Specify an absolute time in the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z. Default: When the dashboard loads, the end date will be the current time.
|
|
13875
|
-
:param left_y_axis: Left Y axis. Default:
|
|
14954
|
+
:param left_y_axis: Left Y axis. Default: {min:0,max:100}
|
|
13876
14955
|
:param legend_position: Position of the legend. Default: - bottom
|
|
13877
14956
|
:param live_data: Whether the graph should show live data. Default: false
|
|
13878
14957
|
:param metrics: Metrics to display on left Y axis. Default: - No metrics
|
|
@@ -13880,6 +14959,7 @@ class GaugeWidget(
|
|
|
13880
14959
|
:param set_period_to_time_range: Whether to show the value from the entire time range. Only applicable for Bar and Pie charts. If false, values will be from the most recent period of your chosen time range; if true, shows the value from the entire time range. Default: false
|
|
13881
14960
|
:param start: The start of the time range to use for each widget independently from those of the dashboard. You can specify start without specifying end to specify a relative time range that ends with the current time. In this case, the value of start must begin with -P, and you can use M, H, D, W and M as abbreviations for minutes, hours, days, weeks and months. For example, -PT8H shows the last 8 hours and -P3M shows the last three months. You can also use start along with an end field, to specify an absolute time range. When specifying an absolute time range, use the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z. Default: When the dashboard loads, the start time will be the default time range.
|
|
13882
14961
|
:param statistic: The default statistic to be displayed for each metric. This default can be overridden within the definition of each individual metric Default: - The statistic for each metric is used
|
|
14962
|
+
:param account_id: The AWS account ID where the metrics are located. This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account. For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html Default: - Current account
|
|
13883
14963
|
:param height: Height of the widget. Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.
|
|
13884
14964
|
:param region: The region the metrics of this graph should be taken from. Default: - Current region
|
|
13885
14965
|
:param title: Title for the graph. Default: - None
|
|
@@ -13896,6 +14976,7 @@ class GaugeWidget(
|
|
|
13896
14976
|
set_period_to_time_range=set_period_to_time_range,
|
|
13897
14977
|
start=start,
|
|
13898
14978
|
statistic=statistic,
|
|
14979
|
+
account_id=account_id,
|
|
13899
14980
|
height=height,
|
|
13900
14981
|
region=region,
|
|
13901
14982
|
title=title,
|
|
@@ -13925,6 +15006,7 @@ class GaugeWidget(
|
|
|
13925
15006
|
jsii_type="aws-cdk-lib.aws_cloudwatch.GaugeWidgetProps",
|
|
13926
15007
|
jsii_struct_bases=[MetricWidgetProps],
|
|
13927
15008
|
name_mapping={
|
|
15009
|
+
"account_id": "accountId",
|
|
13928
15010
|
"height": "height",
|
|
13929
15011
|
"region": "region",
|
|
13930
15012
|
"title": "title",
|
|
@@ -13945,6 +15027,7 @@ class GaugeWidgetProps(MetricWidgetProps):
|
|
|
13945
15027
|
def __init__(
|
|
13946
15028
|
self,
|
|
13947
15029
|
*,
|
|
15030
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
13948
15031
|
height: typing.Optional[jsii.Number] = None,
|
|
13949
15032
|
region: typing.Optional[builtins.str] = None,
|
|
13950
15033
|
title: typing.Optional[builtins.str] = None,
|
|
@@ -13962,13 +15045,14 @@ class GaugeWidgetProps(MetricWidgetProps):
|
|
|
13962
15045
|
) -> None:
|
|
13963
15046
|
'''Properties for a GaugeWidget.
|
|
13964
15047
|
|
|
15048
|
+
:param account_id: The AWS account ID where the metrics are located. This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account. For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html Default: - Current account
|
|
13965
15049
|
:param height: Height of the widget. Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.
|
|
13966
15050
|
:param region: The region the metrics of this graph should be taken from. Default: - Current region
|
|
13967
15051
|
:param title: Title for the graph. Default: - None
|
|
13968
15052
|
:param width: Width of the widget, in a grid of 24 units wide. Default: 6
|
|
13969
15053
|
:param annotations: Annotations for the left Y axis. Default: - No annotations
|
|
13970
15054
|
:param end: The end of the time range to use for each widget independently from those of the dashboard. If you specify a value for end, you must also specify a value for start. Specify an absolute time in the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z. Default: When the dashboard loads, the end date will be the current time.
|
|
13971
|
-
:param left_y_axis: Left Y axis. Default:
|
|
15055
|
+
:param left_y_axis: Left Y axis. Default: {min:0,max:100}
|
|
13972
15056
|
:param legend_position: Position of the legend. Default: - bottom
|
|
13973
15057
|
:param live_data: Whether the graph should show live data. Default: false
|
|
13974
15058
|
:param metrics: Metrics to display on left Y axis. Default: - No metrics
|
|
@@ -13998,6 +15082,7 @@ class GaugeWidgetProps(MetricWidgetProps):
|
|
|
13998
15082
|
left_y_axis = YAxisProps(**left_y_axis)
|
|
13999
15083
|
if __debug__:
|
|
14000
15084
|
type_hints = typing.get_type_hints(_typecheckingstub__c1f8fe2511861f7fc6d2225bf5821fc9134b7036355dffb1d0ddd86a99b53dc5)
|
|
15085
|
+
check_type(argname="argument account_id", value=account_id, expected_type=type_hints["account_id"])
|
|
14001
15086
|
check_type(argname="argument height", value=height, expected_type=type_hints["height"])
|
|
14002
15087
|
check_type(argname="argument region", value=region, expected_type=type_hints["region"])
|
|
14003
15088
|
check_type(argname="argument title", value=title, expected_type=type_hints["title"])
|
|
@@ -14013,6 +15098,8 @@ class GaugeWidgetProps(MetricWidgetProps):
|
|
|
14013
15098
|
check_type(argname="argument start", value=start, expected_type=type_hints["start"])
|
|
14014
15099
|
check_type(argname="argument statistic", value=statistic, expected_type=type_hints["statistic"])
|
|
14015
15100
|
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
15101
|
+
if account_id is not None:
|
|
15102
|
+
self._values["account_id"] = account_id
|
|
14016
15103
|
if height is not None:
|
|
14017
15104
|
self._values["height"] = height
|
|
14018
15105
|
if region is not None:
|
|
@@ -14042,6 +15129,22 @@ class GaugeWidgetProps(MetricWidgetProps):
|
|
|
14042
15129
|
if statistic is not None:
|
|
14043
15130
|
self._values["statistic"] = statistic
|
|
14044
15131
|
|
|
15132
|
+
@builtins.property
|
|
15133
|
+
def account_id(self) -> typing.Optional[builtins.str]:
|
|
15134
|
+
'''The AWS account ID where the metrics are located.
|
|
15135
|
+
|
|
15136
|
+
This enables cross-account functionality for CloudWatch dashboards.
|
|
15137
|
+
Before using this feature, ensure that proper cross-account sharing is configured
|
|
15138
|
+
between the monitoring account and source account.
|
|
15139
|
+
|
|
15140
|
+
For more information, see:
|
|
15141
|
+
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
|
15142
|
+
|
|
15143
|
+
:default: - Current account
|
|
15144
|
+
'''
|
|
15145
|
+
result = self._values.get("account_id")
|
|
15146
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
15147
|
+
|
|
14045
15148
|
@builtins.property
|
|
14046
15149
|
def height(self) -> typing.Optional[jsii.Number]:
|
|
14047
15150
|
'''Height of the widget.
|
|
@@ -14106,7 +15209,7 @@ class GaugeWidgetProps(MetricWidgetProps):
|
|
|
14106
15209
|
def left_y_axis(self) -> typing.Optional[YAxisProps]:
|
|
14107
15210
|
'''Left Y axis.
|
|
14108
15211
|
|
|
14109
|
-
:default:
|
|
15212
|
+
:default: {min:0,max:100}
|
|
14110
15213
|
'''
|
|
14111
15214
|
result = self._values.get("left_y_axis")
|
|
14112
15215
|
return typing.cast(typing.Optional[YAxisProps], result)
|
|
@@ -14216,14 +15319,22 @@ class GraphWidget(
|
|
|
14216
15319
|
|
|
14217
15320
|
dashboard.add_widgets(cloudwatch.GraphWidget(
|
|
14218
15321
|
# ...
|
|
15322
|
+
account_id="123456789012"
|
|
15323
|
+
))
|
|
14219
15324
|
|
|
14220
|
-
|
|
15325
|
+
dashboard.add_widgets(cloudwatch.LogQueryWidget(
|
|
15326
|
+
log_group_names=["my-log-group"],
|
|
15327
|
+
# ...
|
|
15328
|
+
account_id="123456789012",
|
|
15329
|
+
query_lines=["fields @message"
|
|
15330
|
+
]
|
|
14221
15331
|
))
|
|
14222
15332
|
'''
|
|
14223
15333
|
|
|
14224
15334
|
def __init__(
|
|
14225
15335
|
self,
|
|
14226
15336
|
*,
|
|
15337
|
+
display_labels_on_chart: typing.Optional[builtins.bool] = None,
|
|
14227
15338
|
end: typing.Optional[builtins.str] = None,
|
|
14228
15339
|
left: typing.Optional[typing.Sequence[IMetric]] = None,
|
|
14229
15340
|
left_annotations: typing.Optional[typing.Sequence[typing.Union[HorizontalAnnotation, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
@@ -14240,12 +15351,14 @@ class GraphWidget(
|
|
|
14240
15351
|
statistic: typing.Optional[builtins.str] = None,
|
|
14241
15352
|
vertical_annotations: typing.Optional[typing.Sequence[typing.Union[VerticalAnnotation, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
14242
15353
|
view: typing.Optional[GraphWidgetView] = None,
|
|
15354
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
14243
15355
|
height: typing.Optional[jsii.Number] = None,
|
|
14244
15356
|
region: typing.Optional[builtins.str] = None,
|
|
14245
15357
|
title: typing.Optional[builtins.str] = None,
|
|
14246
15358
|
width: typing.Optional[jsii.Number] = None,
|
|
14247
15359
|
) -> None:
|
|
14248
15360
|
'''
|
|
15361
|
+
:param display_labels_on_chart: Whether the graph should show labels on the chart. Currently only applicable for Pie charts. Default: false
|
|
14249
15362
|
:param end: The end of the time range to use for each widget independently from those of the dashboard. If you specify a value for end, you must also specify a value for start. Specify an absolute time in the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z. Default: When the dashboard loads, the end date will be the current time.
|
|
14250
15363
|
:param left: Metrics to display on left Y axis. Default: - No metrics
|
|
14251
15364
|
:param left_annotations: Annotations for the left Y axis. Default: - No annotations
|
|
@@ -14262,12 +15375,14 @@ class GraphWidget(
|
|
|
14262
15375
|
:param statistic: The default statistic to be displayed for each metric. This default can be overridden within the definition of each individual metric Default: - The statistic for each metric is used
|
|
14263
15376
|
:param vertical_annotations: Annotations for the X axis. Default: - No annotations
|
|
14264
15377
|
:param view: Display this metric. Default: TimeSeries
|
|
15378
|
+
:param account_id: The AWS account ID where the metrics are located. This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account. For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html Default: - Current account
|
|
14265
15379
|
:param height: Height of the widget. Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.
|
|
14266
15380
|
:param region: The region the metrics of this graph should be taken from. Default: - Current region
|
|
14267
15381
|
:param title: Title for the graph. Default: - None
|
|
14268
15382
|
:param width: Width of the widget, in a grid of 24 units wide. Default: 6
|
|
14269
15383
|
'''
|
|
14270
15384
|
props = GraphWidgetProps(
|
|
15385
|
+
display_labels_on_chart=display_labels_on_chart,
|
|
14271
15386
|
end=end,
|
|
14272
15387
|
left=left,
|
|
14273
15388
|
left_annotations=left_annotations,
|
|
@@ -14284,6 +15399,7 @@ class GraphWidget(
|
|
|
14284
15399
|
statistic=statistic,
|
|
14285
15400
|
vertical_annotations=vertical_annotations,
|
|
14286
15401
|
view=view,
|
|
15402
|
+
account_id=account_id,
|
|
14287
15403
|
height=height,
|
|
14288
15404
|
region=region,
|
|
14289
15405
|
title=title,
|
|
@@ -14324,10 +15440,12 @@ class GraphWidget(
|
|
|
14324
15440
|
jsii_type="aws-cdk-lib.aws_cloudwatch.GraphWidgetProps",
|
|
14325
15441
|
jsii_struct_bases=[MetricWidgetProps],
|
|
14326
15442
|
name_mapping={
|
|
15443
|
+
"account_id": "accountId",
|
|
14327
15444
|
"height": "height",
|
|
14328
15445
|
"region": "region",
|
|
14329
15446
|
"title": "title",
|
|
14330
15447
|
"width": "width",
|
|
15448
|
+
"display_labels_on_chart": "displayLabelsOnChart",
|
|
14331
15449
|
"end": "end",
|
|
14332
15450
|
"left": "left",
|
|
14333
15451
|
"left_annotations": "leftAnnotations",
|
|
@@ -14350,10 +15468,12 @@ class GraphWidgetProps(MetricWidgetProps):
|
|
|
14350
15468
|
def __init__(
|
|
14351
15469
|
self,
|
|
14352
15470
|
*,
|
|
15471
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
14353
15472
|
height: typing.Optional[jsii.Number] = None,
|
|
14354
15473
|
region: typing.Optional[builtins.str] = None,
|
|
14355
15474
|
title: typing.Optional[builtins.str] = None,
|
|
14356
15475
|
width: typing.Optional[jsii.Number] = None,
|
|
15476
|
+
display_labels_on_chart: typing.Optional[builtins.bool] = None,
|
|
14357
15477
|
end: typing.Optional[builtins.str] = None,
|
|
14358
15478
|
left: typing.Optional[typing.Sequence[IMetric]] = None,
|
|
14359
15479
|
left_annotations: typing.Optional[typing.Sequence[typing.Union[HorizontalAnnotation, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
@@ -14373,10 +15493,12 @@ class GraphWidgetProps(MetricWidgetProps):
|
|
|
14373
15493
|
) -> None:
|
|
14374
15494
|
'''Properties for a GraphWidget.
|
|
14375
15495
|
|
|
15496
|
+
:param account_id: The AWS account ID where the metrics are located. This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account. For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html Default: - Current account
|
|
14376
15497
|
:param height: Height of the widget. Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.
|
|
14377
15498
|
:param region: The region the metrics of this graph should be taken from. Default: - Current region
|
|
14378
15499
|
:param title: Title for the graph. Default: - None
|
|
14379
15500
|
:param width: Width of the widget, in a grid of 24 units wide. Default: 6
|
|
15501
|
+
:param display_labels_on_chart: Whether the graph should show labels on the chart. Currently only applicable for Pie charts. Default: false
|
|
14380
15502
|
:param end: The end of the time range to use for each widget independently from those of the dashboard. If you specify a value for end, you must also specify a value for start. Specify an absolute time in the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z. Default: When the dashboard loads, the end date will be the current time.
|
|
14381
15503
|
:param left: Metrics to display on left Y axis. Default: - No metrics
|
|
14382
15504
|
:param left_annotations: Annotations for the left Y axis. Default: - No annotations
|
|
@@ -14403,8 +15525,15 @@ class GraphWidgetProps(MetricWidgetProps):
|
|
|
14403
15525
|
|
|
14404
15526
|
dashboard.add_widgets(cloudwatch.GraphWidget(
|
|
14405
15527
|
# ...
|
|
15528
|
+
account_id="123456789012"
|
|
15529
|
+
))
|
|
14406
15530
|
|
|
14407
|
-
|
|
15531
|
+
dashboard.add_widgets(cloudwatch.LogQueryWidget(
|
|
15532
|
+
log_group_names=["my-log-group"],
|
|
15533
|
+
# ...
|
|
15534
|
+
account_id="123456789012",
|
|
15535
|
+
query_lines=["fields @message"
|
|
15536
|
+
]
|
|
14408
15537
|
))
|
|
14409
15538
|
'''
|
|
14410
15539
|
if isinstance(left_y_axis, dict):
|
|
@@ -14413,10 +15542,12 @@ class GraphWidgetProps(MetricWidgetProps):
|
|
|
14413
15542
|
right_y_axis = YAxisProps(**right_y_axis)
|
|
14414
15543
|
if __debug__:
|
|
14415
15544
|
type_hints = typing.get_type_hints(_typecheckingstub__3471ad100c9e34a517506d76368276ef9b137a3c7b33aecc91910b5dc9263b3b)
|
|
15545
|
+
check_type(argname="argument account_id", value=account_id, expected_type=type_hints["account_id"])
|
|
14416
15546
|
check_type(argname="argument height", value=height, expected_type=type_hints["height"])
|
|
14417
15547
|
check_type(argname="argument region", value=region, expected_type=type_hints["region"])
|
|
14418
15548
|
check_type(argname="argument title", value=title, expected_type=type_hints["title"])
|
|
14419
15549
|
check_type(argname="argument width", value=width, expected_type=type_hints["width"])
|
|
15550
|
+
check_type(argname="argument display_labels_on_chart", value=display_labels_on_chart, expected_type=type_hints["display_labels_on_chart"])
|
|
14420
15551
|
check_type(argname="argument end", value=end, expected_type=type_hints["end"])
|
|
14421
15552
|
check_type(argname="argument left", value=left, expected_type=type_hints["left"])
|
|
14422
15553
|
check_type(argname="argument left_annotations", value=left_annotations, expected_type=type_hints["left_annotations"])
|
|
@@ -14434,6 +15565,8 @@ class GraphWidgetProps(MetricWidgetProps):
|
|
|
14434
15565
|
check_type(argname="argument vertical_annotations", value=vertical_annotations, expected_type=type_hints["vertical_annotations"])
|
|
14435
15566
|
check_type(argname="argument view", value=view, expected_type=type_hints["view"])
|
|
14436
15567
|
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
15568
|
+
if account_id is not None:
|
|
15569
|
+
self._values["account_id"] = account_id
|
|
14437
15570
|
if height is not None:
|
|
14438
15571
|
self._values["height"] = height
|
|
14439
15572
|
if region is not None:
|
|
@@ -14442,6 +15575,8 @@ class GraphWidgetProps(MetricWidgetProps):
|
|
|
14442
15575
|
self._values["title"] = title
|
|
14443
15576
|
if width is not None:
|
|
14444
15577
|
self._values["width"] = width
|
|
15578
|
+
if display_labels_on_chart is not None:
|
|
15579
|
+
self._values["display_labels_on_chart"] = display_labels_on_chart
|
|
14445
15580
|
if end is not None:
|
|
14446
15581
|
self._values["end"] = end
|
|
14447
15582
|
if left is not None:
|
|
@@ -14475,6 +15610,22 @@ class GraphWidgetProps(MetricWidgetProps):
|
|
|
14475
15610
|
if view is not None:
|
|
14476
15611
|
self._values["view"] = view
|
|
14477
15612
|
|
|
15613
|
+
@builtins.property
|
|
15614
|
+
def account_id(self) -> typing.Optional[builtins.str]:
|
|
15615
|
+
'''The AWS account ID where the metrics are located.
|
|
15616
|
+
|
|
15617
|
+
This enables cross-account functionality for CloudWatch dashboards.
|
|
15618
|
+
Before using this feature, ensure that proper cross-account sharing is configured
|
|
15619
|
+
between the monitoring account and source account.
|
|
15620
|
+
|
|
15621
|
+
For more information, see:
|
|
15622
|
+
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
|
|
15623
|
+
|
|
15624
|
+
:default: - Current account
|
|
15625
|
+
'''
|
|
15626
|
+
result = self._values.get("account_id")
|
|
15627
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
15628
|
+
|
|
14478
15629
|
@builtins.property
|
|
14479
15630
|
def height(self) -> typing.Optional[jsii.Number]:
|
|
14480
15631
|
'''Height of the widget.
|
|
@@ -14514,6 +15665,17 @@ class GraphWidgetProps(MetricWidgetProps):
|
|
|
14514
15665
|
result = self._values.get("width")
|
|
14515
15666
|
return typing.cast(typing.Optional[jsii.Number], result)
|
|
14516
15667
|
|
|
15668
|
+
@builtins.property
|
|
15669
|
+
def display_labels_on_chart(self) -> typing.Optional[builtins.bool]:
|
|
15670
|
+
'''Whether the graph should show labels on the chart.
|
|
15671
|
+
|
|
15672
|
+
Currently only applicable for Pie charts.
|
|
15673
|
+
|
|
15674
|
+
:default: false
|
|
15675
|
+
'''
|
|
15676
|
+
result = self._values.get("display_labels_on_chart")
|
|
15677
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
|
15678
|
+
|
|
14517
15679
|
@builtins.property
|
|
14518
15680
|
def end(self) -> typing.Optional[builtins.str]:
|
|
14519
15681
|
'''The end of the time range to use for each widget independently from those of the dashboard.
|
|
@@ -14767,7 +15929,9 @@ class LogQueryWidget(
|
|
|
14767
15929
|
self,
|
|
14768
15930
|
*,
|
|
14769
15931
|
log_group_names: typing.Sequence[builtins.str],
|
|
15932
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
14770
15933
|
height: typing.Optional[jsii.Number] = None,
|
|
15934
|
+
query_language: typing.Optional[LogQueryLanguage] = None,
|
|
14771
15935
|
query_lines: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
14772
15936
|
query_string: typing.Optional[builtins.str] = None,
|
|
14773
15937
|
region: typing.Optional[builtins.str] = None,
|
|
@@ -14777,7 +15941,9 @@ class LogQueryWidget(
|
|
|
14777
15941
|
) -> None:
|
|
14778
15942
|
'''
|
|
14779
15943
|
:param log_group_names: Names of log groups to query.
|
|
15944
|
+
:param account_id: The AWS account ID where the log groups are located. This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account. For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html Default: - Current account
|
|
14780
15945
|
:param height: Height of the widget. Default: 6
|
|
15946
|
+
:param query_language: The query language to use for the query. Default: LogQueryLanguage.LOGS_INSIGHTS
|
|
14781
15947
|
:param query_lines: A sequence of lines to use to build the query. The query will be built by joining the lines together using ``\\n|``. Default: - Exactly one of ``queryString``, ``queryLines`` is required.
|
|
14782
15948
|
:param query_string: Full query string for log insights. Be sure to prepend every new line with a newline and pipe character (``\\n|``). Default: - Exactly one of ``queryString``, ``queryLines`` is required.
|
|
14783
15949
|
:param region: The region the metrics of this widget should be taken from. Default: Current region
|
|
@@ -14787,7 +15953,9 @@ class LogQueryWidget(
|
|
|
14787
15953
|
'''
|
|
14788
15954
|
props = LogQueryWidgetProps(
|
|
14789
15955
|
log_group_names=log_group_names,
|
|
15956
|
+
account_id=account_id,
|
|
14790
15957
|
height=height,
|
|
15958
|
+
query_language=query_language,
|
|
14791
15959
|
query_lines=query_lines,
|
|
14792
15960
|
query_string=query_string,
|
|
14793
15961
|
region=region,
|
|
@@ -14835,6 +16003,7 @@ class SingleValueWidget(
|
|
|
14835
16003
|
set_period_to_time_range: typing.Optional[builtins.bool] = None,
|
|
14836
16004
|
sparkline: typing.Optional[builtins.bool] = None,
|
|
14837
16005
|
start: typing.Optional[builtins.str] = None,
|
|
16006
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
14838
16007
|
height: typing.Optional[jsii.Number] = None,
|
|
14839
16008
|
region: typing.Optional[builtins.str] = None,
|
|
14840
16009
|
title: typing.Optional[builtins.str] = None,
|
|
@@ -14848,6 +16017,7 @@ class SingleValueWidget(
|
|
|
14848
16017
|
:param set_period_to_time_range: Whether to show the value from the entire time range. Default: false
|
|
14849
16018
|
:param sparkline: Whether to show a graph below the value illustrating the value for the whole time range. Cannot be used in combination with ``setPeriodToTimeRange`` Default: false
|
|
14850
16019
|
:param start: The start of the time range to use for each widget independently from those of the dashboard. You can specify start without specifying end to specify a relative time range that ends with the current time. In this case, the value of start must begin with -P, and you can use M, H, D, W and M as abbreviations for minutes, hours, days, weeks and months. For example, -PT8H shows the last 8 hours and -P3M shows the last three months. You can also use start along with an end field, to specify an absolute time range. When specifying an absolute time range, use the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z. Default: When the dashboard loads, the start time will be the default time range.
|
|
16020
|
+
:param account_id: The AWS account ID where the metrics are located. This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account. For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html Default: - Current account
|
|
14851
16021
|
:param height: Height of the widget. Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.
|
|
14852
16022
|
:param region: The region the metrics of this graph should be taken from. Default: - Current region
|
|
14853
16023
|
:param title: Title for the graph. Default: - None
|
|
@@ -14861,6 +16031,7 @@ class SingleValueWidget(
|
|
|
14861
16031
|
set_period_to_time_range=set_period_to_time_range,
|
|
14862
16032
|
sparkline=sparkline,
|
|
14863
16033
|
start=start,
|
|
16034
|
+
account_id=account_id,
|
|
14864
16035
|
height=height,
|
|
14865
16036
|
region=region,
|
|
14866
16037
|
title=title,
|
|
@@ -14911,6 +16082,7 @@ class TableWidget(
|
|
|
14911
16082
|
statistic: typing.Optional[builtins.str] = None,
|
|
14912
16083
|
summary: typing.Optional[typing.Union[TableSummaryProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
14913
16084
|
thresholds: typing.Optional[typing.Sequence[TableThreshold]] = None,
|
|
16085
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
14914
16086
|
height: typing.Optional[jsii.Number] = None,
|
|
14915
16087
|
region: typing.Optional[builtins.str] = None,
|
|
14916
16088
|
title: typing.Optional[builtins.str] = None,
|
|
@@ -14929,6 +16101,7 @@ class TableWidget(
|
|
|
14929
16101
|
:param statistic: The default statistic to be displayed for each metric. This default can be overridden within the definition of each individual metric Default: - The statistic for each metric is used
|
|
14930
16102
|
:param summary: Properties for displaying summary columns. Default: - no summary columns are shown
|
|
14931
16103
|
:param thresholds: Thresholds for highlighting table cells. Default: - No thresholds
|
|
16104
|
+
:param account_id: The AWS account ID where the metrics are located. This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account. For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html Default: - Current account
|
|
14932
16105
|
:param height: Height of the widget. Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.
|
|
14933
16106
|
:param region: The region the metrics of this graph should be taken from. Default: - Current region
|
|
14934
16107
|
:param title: Title for the graph. Default: - None
|
|
@@ -14947,6 +16120,7 @@ class TableWidget(
|
|
|
14947
16120
|
statistic=statistic,
|
|
14948
16121
|
summary=summary,
|
|
14949
16122
|
thresholds=thresholds,
|
|
16123
|
+
account_id=account_id,
|
|
14950
16124
|
height=height,
|
|
14951
16125
|
region=region,
|
|
14952
16126
|
title=title,
|
|
@@ -15296,6 +16470,7 @@ class AlarmWidget(
|
|
|
15296
16470
|
*,
|
|
15297
16471
|
alarm: IAlarm,
|
|
15298
16472
|
left_y_axis: typing.Optional[typing.Union[YAxisProps, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
16473
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
15299
16474
|
height: typing.Optional[jsii.Number] = None,
|
|
15300
16475
|
region: typing.Optional[builtins.str] = None,
|
|
15301
16476
|
title: typing.Optional[builtins.str] = None,
|
|
@@ -15304,6 +16479,7 @@ class AlarmWidget(
|
|
|
15304
16479
|
'''
|
|
15305
16480
|
:param alarm: The alarm to show.
|
|
15306
16481
|
:param left_y_axis: Left Y axis. Default: - No minimum or maximum values for the left Y-axis
|
|
16482
|
+
:param account_id: The AWS account ID where the metrics are located. This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account. For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html Default: - Current account
|
|
15307
16483
|
:param height: Height of the widget. Default: - 6 for Alarm and Graph widgets. 3 for single value widgets where most recent value of a metric is displayed.
|
|
15308
16484
|
:param region: The region the metrics of this graph should be taken from. Default: - Current region
|
|
15309
16485
|
:param title: Title for the graph. Default: - None
|
|
@@ -15312,6 +16488,7 @@ class AlarmWidget(
|
|
|
15312
16488
|
props = AlarmWidgetProps(
|
|
15313
16489
|
alarm=alarm,
|
|
15314
16490
|
left_y_axis=left_y_axis,
|
|
16491
|
+
account_id=account_id,
|
|
15315
16492
|
height=height,
|
|
15316
16493
|
region=region,
|
|
15317
16494
|
title=title,
|
|
@@ -15473,31 +16650,29 @@ class Alarm(
|
|
|
15473
16650
|
|
|
15474
16651
|
Example::
|
|
15475
16652
|
|
|
15476
|
-
|
|
16653
|
+
# log_group: logs.LogGroup
|
|
15477
16654
|
|
|
15478
|
-
|
|
16655
|
+
mf = logs.MetricFilter(self, "MetricFilter",
|
|
16656
|
+
log_group=log_group,
|
|
16657
|
+
metric_namespace="MyApp",
|
|
16658
|
+
metric_name="Latency",
|
|
16659
|
+
filter_pattern=logs.FilterPattern.exists("$.latency"),
|
|
16660
|
+
metric_value="$.latency",
|
|
16661
|
+
dimensions={
|
|
16662
|
+
"ErrorCode": "$.errorCode"
|
|
16663
|
+
},
|
|
16664
|
+
unit=cloudwatch.Unit.MILLISECONDS
|
|
16665
|
+
)
|
|
15479
16666
|
|
|
15480
|
-
#
|
|
15481
|
-
|
|
16667
|
+
# expose a metric from the metric filter
|
|
16668
|
+
metric = mf.metric()
|
|
15482
16669
|
|
|
15483
|
-
|
|
15484
|
-
|
|
15485
|
-
|
|
15486
|
-
|
|
15487
|
-
|
|
15488
|
-
)
|
|
15489
|
-
deployment_group = codedeploy.LambdaDeploymentGroup(self, "BlueGreenDeployment",
|
|
15490
|
-
alias=alias,
|
|
15491
|
-
deployment_config=codedeploy.LambdaDeploymentConfig.LINEAR_10PERCENT_EVERY_1MINUTE,
|
|
15492
|
-
alarms=[alarm
|
|
15493
|
-
]
|
|
16670
|
+
# you can use the metric to create a new alarm
|
|
16671
|
+
cloudwatch.Alarm(self, "alarm from metric filter",
|
|
16672
|
+
metric=metric,
|
|
16673
|
+
threshold=100,
|
|
16674
|
+
evaluation_periods=2
|
|
15494
16675
|
)
|
|
15495
|
-
deployment_group.add_alarm(cloudwatch.Alarm(self, "BlueGreenErrors",
|
|
15496
|
-
comparison_operator=cloudwatch.ComparisonOperator.GREATER_THAN_THRESHOLD,
|
|
15497
|
-
threshold=1,
|
|
15498
|
-
evaluation_periods=1,
|
|
15499
|
-
metric=blue_green_alias.metric_errors()
|
|
15500
|
-
))
|
|
15501
16676
|
'''
|
|
15502
16677
|
|
|
15503
16678
|
def __init__(
|
|
@@ -15687,7 +16862,7 @@ class AnomalyDetectionAlarm(
|
|
|
15687
16862
|
namespace="AWS/EC2",
|
|
15688
16863
|
metric_name="CPUUtilization",
|
|
15689
16864
|
statistic="Average",
|
|
15690
|
-
period=Duration.
|
|
16865
|
+
period=Duration.hours(1)
|
|
15691
16866
|
)
|
|
15692
16867
|
|
|
15693
16868
|
# Create an anomaly detection alarm
|
|
@@ -15821,6 +16996,7 @@ __all__ = [
|
|
|
15821
16996
|
"IVariable",
|
|
15822
16997
|
"IWidget",
|
|
15823
16998
|
"LegendPosition",
|
|
16999
|
+
"LogQueryLanguage",
|
|
15824
17000
|
"LogQueryVisualizationType",
|
|
15825
17001
|
"LogQueryWidget",
|
|
15826
17002
|
"LogQueryWidgetProps",
|
|
@@ -15837,6 +17013,9 @@ __all__ = [
|
|
|
15837
17013
|
"PeriodOverride",
|
|
15838
17014
|
"Row",
|
|
15839
17015
|
"SearchComponents",
|
|
17016
|
+
"SearchExpression",
|
|
17017
|
+
"SearchExpressionOptions",
|
|
17018
|
+
"SearchExpressionProps",
|
|
15840
17019
|
"Shading",
|
|
15841
17020
|
"SingleValueWidget",
|
|
15842
17021
|
"SingleValueWidgetProps",
|
|
@@ -15970,6 +17149,22 @@ def _typecheckingstub__5adc477b9cef758736625389f1a51dec08eb7b348be35f42b0e37d6d4
|
|
|
15970
17149
|
"""Type checking stubs"""
|
|
15971
17150
|
pass
|
|
15972
17151
|
|
|
17152
|
+
def _typecheckingstub__544b0968def3d9b72962fb1bbce7dec4b2d60b4c2518711cc9df447306ed6c4c(
|
|
17153
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
17154
|
+
id: builtins.str,
|
|
17155
|
+
arn: builtins.str,
|
|
17156
|
+
) -> None:
|
|
17157
|
+
"""Type checking stubs"""
|
|
17158
|
+
pass
|
|
17159
|
+
|
|
17160
|
+
def _typecheckingstub__191b683ee20d5f420eb03eb2e0b1a6e0e7cfed31f66a3afa94d14da0767a90f4(
|
|
17161
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
17162
|
+
id: builtins.str,
|
|
17163
|
+
alarm_name: builtins.str,
|
|
17164
|
+
) -> None:
|
|
17165
|
+
"""Type checking stubs"""
|
|
17166
|
+
pass
|
|
17167
|
+
|
|
15973
17168
|
def _typecheckingstub__83bef261115d965bc301e33589e4c9b4a854da5d951fb8e2186758fba16c7f57(
|
|
15974
17169
|
inspector: _TreeInspector_488e0dd5,
|
|
15975
17170
|
) -> None:
|
|
@@ -16477,6 +17672,14 @@ def _typecheckingstub__5add67d5fc6c551e627bade2623b719ee8c8de03ff6216bc3471bbe52
|
|
|
16477
17672
|
"""Type checking stubs"""
|
|
16478
17673
|
pass
|
|
16479
17674
|
|
|
17675
|
+
def _typecheckingstub__f2a65575230b6782811b6cc1c4a4d1c6cc87f971ef5aa437442cc859d489ff82(
|
|
17676
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
17677
|
+
id: builtins.str,
|
|
17678
|
+
dashboard_name: builtins.str,
|
|
17679
|
+
) -> None:
|
|
17680
|
+
"""Type checking stubs"""
|
|
17681
|
+
pass
|
|
17682
|
+
|
|
16480
17683
|
def _typecheckingstub__ea2b521a69d5f78d24dc5aba9c387baa4fc450da2dc68bb876531861ee0929b2(
|
|
16481
17684
|
inspector: _TreeInspector_488e0dd5,
|
|
16482
17685
|
) -> None:
|
|
@@ -16592,6 +17795,22 @@ def _typecheckingstub__324083d9d1c11bed8d2cf8d1d0cab6adbcb8194552cea34115b984457
|
|
|
16592
17795
|
"""Type checking stubs"""
|
|
16593
17796
|
pass
|
|
16594
17797
|
|
|
17798
|
+
def _typecheckingstub__50e36a4aae3592a141f72295c65ce2cf6f01c0153925f610e589758abcc065e2(
|
|
17799
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
17800
|
+
id: builtins.str,
|
|
17801
|
+
arn: builtins.str,
|
|
17802
|
+
) -> None:
|
|
17803
|
+
"""Type checking stubs"""
|
|
17804
|
+
pass
|
|
17805
|
+
|
|
17806
|
+
def _typecheckingstub__635a32b621fbf5f4f1c0d44f6749043dfa44bfb3ec257d8fe8a02439751244c1(
|
|
17807
|
+
scope: _constructs_77d1e7e8.Construct,
|
|
17808
|
+
id: builtins.str,
|
|
17809
|
+
metric_stream_name: builtins.str,
|
|
17810
|
+
) -> None:
|
|
17811
|
+
"""Type checking stubs"""
|
|
17812
|
+
pass
|
|
17813
|
+
|
|
16595
17814
|
def _typecheckingstub__3d75d145801429f4f9f0daaae66adb695e6690f2bd7b00a62aedff30952bef4c(
|
|
16596
17815
|
inspector: _TreeInspector_488e0dd5,
|
|
16597
17816
|
) -> None:
|
|
@@ -16702,6 +17921,7 @@ def _typecheckingstub__dd18f372aac3bb8d4a678dd4ee7a3b5bd34447637695b896086139ee2
|
|
|
16702
17921
|
account: typing.Optional[builtins.str] = None,
|
|
16703
17922
|
color: typing.Optional[builtins.str] = None,
|
|
16704
17923
|
dimensions_map: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
17924
|
+
id: typing.Optional[builtins.str] = None,
|
|
16705
17925
|
label: typing.Optional[builtins.str] = None,
|
|
16706
17926
|
period: typing.Optional[_Duration_4839e8c3] = None,
|
|
16707
17927
|
region: typing.Optional[builtins.str] = None,
|
|
@@ -16709,6 +17929,7 @@ def _typecheckingstub__dd18f372aac3bb8d4a678dd4ee7a3b5bd34447637695b896086139ee2
|
|
|
16709
17929
|
stack_region: typing.Optional[builtins.str] = None,
|
|
16710
17930
|
statistic: typing.Optional[builtins.str] = None,
|
|
16711
17931
|
unit: typing.Optional[Unit] = None,
|
|
17932
|
+
visible: typing.Optional[builtins.bool] = None,
|
|
16712
17933
|
) -> None:
|
|
16713
17934
|
"""Type checking stubs"""
|
|
16714
17935
|
pass
|
|
@@ -16851,7 +18072,9 @@ def _typecheckingstub__f09026a4cce4261b0c1f425d42f625c9bd8f0ba4495e11743f621a2cd
|
|
|
16851
18072
|
def _typecheckingstub__b7d4a308b1274696259a35b14b5ae833f34881f95eaba521bb47a74b3a80e8c0(
|
|
16852
18073
|
*,
|
|
16853
18074
|
log_group_names: typing.Sequence[builtins.str],
|
|
18075
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
16854
18076
|
height: typing.Optional[jsii.Number] = None,
|
|
18077
|
+
query_language: typing.Optional[LogQueryLanguage] = None,
|
|
16855
18078
|
query_lines: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
16856
18079
|
query_string: typing.Optional[builtins.str] = None,
|
|
16857
18080
|
region: typing.Optional[builtins.str] = None,
|
|
@@ -16937,6 +18160,7 @@ def _typecheckingstub__2ddb584abe8421d7f77520aa621133794d500e179ff044f43970dac3f
|
|
|
16937
18160
|
math_expression: typing.Optional[typing.Union[MetricExpressionConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
16938
18161
|
metric_stat: typing.Optional[typing.Union[MetricStatConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
16939
18162
|
rendering_properties: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
|
|
18163
|
+
search_expression: typing.Optional[typing.Union[MetricExpressionConfig, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
16940
18164
|
) -> None:
|
|
16941
18165
|
"""Type checking stubs"""
|
|
16942
18166
|
pass
|
|
@@ -16957,6 +18181,7 @@ def _typecheckingstub__0dbe737a4d124c27184430b7c20048e16171cb8b5b94bdac632b26d84
|
|
|
16957
18181
|
account: typing.Optional[builtins.str] = None,
|
|
16958
18182
|
color: typing.Optional[builtins.str] = None,
|
|
16959
18183
|
dimensions_map: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
18184
|
+
id: typing.Optional[builtins.str] = None,
|
|
16960
18185
|
label: typing.Optional[builtins.str] = None,
|
|
16961
18186
|
period: typing.Optional[_Duration_4839e8c3] = None,
|
|
16962
18187
|
region: typing.Optional[builtins.str] = None,
|
|
@@ -16964,6 +18189,7 @@ def _typecheckingstub__0dbe737a4d124c27184430b7c20048e16171cb8b5b94bdac632b26d84
|
|
|
16964
18189
|
stack_region: typing.Optional[builtins.str] = None,
|
|
16965
18190
|
statistic: typing.Optional[builtins.str] = None,
|
|
16966
18191
|
unit: typing.Optional[Unit] = None,
|
|
18192
|
+
visible: typing.Optional[builtins.bool] = None,
|
|
16967
18193
|
) -> None:
|
|
16968
18194
|
"""Type checking stubs"""
|
|
16969
18195
|
pass
|
|
@@ -16973,6 +18199,7 @@ def _typecheckingstub__5e1e153a11ab88ed91297aedb5d7a78a81e7bf88f8aeda51bc11ff42e
|
|
|
16973
18199
|
account: typing.Optional[builtins.str] = None,
|
|
16974
18200
|
color: typing.Optional[builtins.str] = None,
|
|
16975
18201
|
dimensions_map: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
18202
|
+
id: typing.Optional[builtins.str] = None,
|
|
16976
18203
|
label: typing.Optional[builtins.str] = None,
|
|
16977
18204
|
period: typing.Optional[_Duration_4839e8c3] = None,
|
|
16978
18205
|
region: typing.Optional[builtins.str] = None,
|
|
@@ -16980,6 +18207,7 @@ def _typecheckingstub__5e1e153a11ab88ed91297aedb5d7a78a81e7bf88f8aeda51bc11ff42e
|
|
|
16980
18207
|
stack_region: typing.Optional[builtins.str] = None,
|
|
16981
18208
|
statistic: typing.Optional[builtins.str] = None,
|
|
16982
18209
|
unit: typing.Optional[Unit] = None,
|
|
18210
|
+
visible: typing.Optional[builtins.bool] = None,
|
|
16983
18211
|
metric_name: builtins.str,
|
|
16984
18212
|
namespace: builtins.str,
|
|
16985
18213
|
) -> None:
|
|
@@ -17004,6 +18232,7 @@ def _typecheckingstub__b4491ad5e5a4b9301258f50e45d0278fe9bbf165c840e3c65f8feab63
|
|
|
17004
18232
|
|
|
17005
18233
|
def _typecheckingstub__028d2c6eccbbf06b74566403b038cac0cdc1c8588c939f4352cc861885b12c38(
|
|
17006
18234
|
*,
|
|
18235
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
17007
18236
|
height: typing.Optional[jsii.Number] = None,
|
|
17008
18237
|
region: typing.Optional[builtins.str] = None,
|
|
17009
18238
|
title: typing.Optional[builtins.str] = None,
|
|
@@ -17041,8 +18270,32 @@ def _typecheckingstub__834c69a269555056b1b73146ff2784af68174eb591f39133c58560704
|
|
|
17041
18270
|
"""Type checking stubs"""
|
|
17042
18271
|
pass
|
|
17043
18272
|
|
|
18273
|
+
def _typecheckingstub__9f60f6548f685a7de97fff8e4e2d7ad81a4a32dbef7d990d9298e04900ccf74c(
|
|
18274
|
+
*,
|
|
18275
|
+
color: typing.Optional[builtins.str] = None,
|
|
18276
|
+
label: typing.Optional[builtins.str] = None,
|
|
18277
|
+
period: typing.Optional[_Duration_4839e8c3] = None,
|
|
18278
|
+
search_account: typing.Optional[builtins.str] = None,
|
|
18279
|
+
search_region: typing.Optional[builtins.str] = None,
|
|
18280
|
+
) -> None:
|
|
18281
|
+
"""Type checking stubs"""
|
|
18282
|
+
pass
|
|
18283
|
+
|
|
18284
|
+
def _typecheckingstub__ea7b0e5733d6f08911d542fd96929aa00fb8c855f30bc6cce35d09d7e062f08e(
|
|
18285
|
+
*,
|
|
18286
|
+
color: typing.Optional[builtins.str] = None,
|
|
18287
|
+
label: typing.Optional[builtins.str] = None,
|
|
18288
|
+
period: typing.Optional[_Duration_4839e8c3] = None,
|
|
18289
|
+
search_account: typing.Optional[builtins.str] = None,
|
|
18290
|
+
search_region: typing.Optional[builtins.str] = None,
|
|
18291
|
+
expression: builtins.str,
|
|
18292
|
+
) -> None:
|
|
18293
|
+
"""Type checking stubs"""
|
|
18294
|
+
pass
|
|
18295
|
+
|
|
17044
18296
|
def _typecheckingstub__4596565f40195bdcc9fe939fa585a3bdf484f8a4a6817e427c6f9e1e49650041(
|
|
17045
18297
|
*,
|
|
18298
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
17046
18299
|
height: typing.Optional[jsii.Number] = None,
|
|
17047
18300
|
region: typing.Optional[builtins.str] = None,
|
|
17048
18301
|
title: typing.Optional[builtins.str] = None,
|
|
@@ -17188,6 +18441,7 @@ def _typecheckingstub__837fdebf81b3f53de6d99624ebde152b4aba1d764a0cc2bd930440701
|
|
|
17188
18441
|
|
|
17189
18442
|
def _typecheckingstub__03726ba90bb01c2a1340af4f73005fffe1b8288cff57d77f31d745d629defb8b(
|
|
17190
18443
|
*,
|
|
18444
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
17191
18445
|
height: typing.Optional[jsii.Number] = None,
|
|
17192
18446
|
region: typing.Optional[builtins.str] = None,
|
|
17193
18447
|
title: typing.Optional[builtins.str] = None,
|
|
@@ -17278,6 +18532,7 @@ def _typecheckingstub__b2e7c873c118fbc1f6cf26e1bb5bd3d8549040c626a6450f2d686bb07
|
|
|
17278
18532
|
|
|
17279
18533
|
def _typecheckingstub__8b6bef2cc64a78bffd68dc95a764829a6c125294deaebcd42b56c493541573d5(
|
|
17280
18534
|
*,
|
|
18535
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
17281
18536
|
height: typing.Optional[jsii.Number] = None,
|
|
17282
18537
|
region: typing.Optional[builtins.str] = None,
|
|
17283
18538
|
title: typing.Optional[builtins.str] = None,
|
|
@@ -17360,6 +18615,7 @@ def _typecheckingstub__11f194bd6989eaa4279174f388eb1c44a7faf424b684d189ffe90647d
|
|
|
17360
18615
|
|
|
17361
18616
|
def _typecheckingstub__c1f8fe2511861f7fc6d2225bf5821fc9134b7036355dffb1d0ddd86a99b53dc5(
|
|
17362
18617
|
*,
|
|
18618
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
17363
18619
|
height: typing.Optional[jsii.Number] = None,
|
|
17364
18620
|
region: typing.Optional[builtins.str] = None,
|
|
17365
18621
|
title: typing.Optional[builtins.str] = None,
|
|
@@ -17392,10 +18648,12 @@ def _typecheckingstub__d98276ba6bbea7a9a5b2efedfda4a862eeca9b42a2aaca743679984a1
|
|
|
17392
18648
|
|
|
17393
18649
|
def _typecheckingstub__3471ad100c9e34a517506d76368276ef9b137a3c7b33aecc91910b5dc9263b3b(
|
|
17394
18650
|
*,
|
|
18651
|
+
account_id: typing.Optional[builtins.str] = None,
|
|
17395
18652
|
height: typing.Optional[jsii.Number] = None,
|
|
17396
18653
|
region: typing.Optional[builtins.str] = None,
|
|
17397
18654
|
title: typing.Optional[builtins.str] = None,
|
|
17398
18655
|
width: typing.Optional[jsii.Number] = None,
|
|
18656
|
+
display_labels_on_chart: typing.Optional[builtins.bool] = None,
|
|
17399
18657
|
end: typing.Optional[builtins.str] = None,
|
|
17400
18658
|
left: typing.Optional[typing.Sequence[IMetric]] = None,
|
|
17401
18659
|
left_annotations: typing.Optional[typing.Sequence[typing.Union[HorizontalAnnotation, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
@@ -17574,3 +18832,6 @@ def _typecheckingstub__a7086e47981f437b1862310e2c90e4c5bcd6054dc3450e46e526bc835
|
|
|
17574
18832
|
) -> None:
|
|
17575
18833
|
"""Type checking stubs"""
|
|
17576
18834
|
pass
|
|
18835
|
+
|
|
18836
|
+
for cls in [IAlarm, IAlarmAction, IAlarmRule, IMetric, IVariable, IWidget]:
|
|
18837
|
+
typing.cast(typing.Any, cls).__protocol_attrs__ = typing.cast(typing.Any, cls).__protocol_attrs__ - set(['__jsii_proxy_class__', '__jsii_type__'])
|