Skip to content
v2.278.0

CfnAnomalyMonitorProps Struct ​

Properties for defining a CfnAnomalyMonitor.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ce as ce } from 'aws-cdk-lib';
const cfnAnomalyMonitorProps: ce.CfnAnomalyMonitorProps = {
  monitorName: 'monitorName',
  monitorType: 'monitorType',

  // the properties below are optional
  monitorDimension: 'monitorDimension',
  monitorSpecification: 'monitorSpecification',
  resourceTags: [{
    key: 'key',
    value: 'value',
  }],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ce as ce

cfn_anomaly_monitor_props = ce.CfnAnomalyMonitorProps(
    monitor_name="monitorName",
    monitor_type="monitorType",

    # the properties below are optional
    monitor_dimension="monitorDimension",
    monitor_specification="monitorSpecification",
    resource_tags=[ce.CfnAnomalyMonitor.ResourceTagProperty(
        key="key",
        value="value"
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ce.*;

CfnAnomalyMonitorProps cfnAnomalyMonitorProps = CfnAnomalyMonitorProps.builder()
        .monitorName("monitorName")
        .monitorType("monitorType")

        // the properties below are optional
        .monitorDimension("monitorDimension")
        .monitorSpecification("monitorSpecification")
        .resourceTags(List.of(ResourceTagProperty.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CE;

var cfnAnomalyMonitorProps = new CfnAnomalyMonitorProps {
    MonitorName = "monitorName",
    MonitorType = "monitorType",

    // the properties below are optional
    MonitorDimension = "monitorDimension",
    MonitorSpecification = "monitorSpecification",
    ResourceTags = new [] { new ResourceTagProperty {
        Key = "key",
        Value = "value"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnAnomalyMonitorProps := &CfnAnomalyMonitorProps{
	MonitorName: jsii.String("monitorName"),
	MonitorType: jsii.String("monitorType"),

	// the properties below are optional
	MonitorDimension: jsii.String("monitorDimension"),
	MonitorSpecification: jsii.String("monitorSpecification"),
	ResourceTags: []ResourceTagProperty{
		&ResourceTagProperty{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

monitorDimensionoptionalstringmonitor_dimensionoptionalstrmonitorDimensionoptionalStringMonitorDimensionoptionalstringMonitorDimensionoptional*string #
For customer managed monitors, do not specify this field.
notes

For AWS managed monitors, this field controls which cost dimension is automatically analyzed by the monitor. For TAG and COST_CATEGORY dimensions, you must also specify MonitorSpecification to configure the specific tag or cost category key to analyze.

monitorNamestringmonitor_namestrmonitorNameStringMonitorNamestringMonitorName*string required #
The name of the monitor.
monitorSpecificationoptionalstringmonitor_specificationoptionalstrmonitorSpecificationoptionalStringMonitorSpecificationoptionalstringMonitorSpecificationoptional*string #
The array of `MonitorSpecification` in JSON array format.
notes

For instance, you can use MonitorSpecification to specify a tag, Cost Category, or linked account for your custom anomaly monitor. For further information, see the Examples section of this page.

monitorTypestringmonitor_typestrmonitorTypeStringMonitorTypestringMonitorType*string required #
The type of the monitor.
notes

Set this to DIMENSIONAL for an AWS managed monitor. AWS managed monitors automatically track up to the top 5,000 values by cost within a dimension of your choosing. Each dimension value is evaluated independently. If you start incurring cost in a new value of your chosen dimension, it will automatically be analyzed by an AWS managed monitor.

Set this to CUSTOM for a customer managed monitor. Customer managed monitors let you select specific dimension values that get monitored in aggregate.

For more information about monitor types, see Monitor types in the Billing and Cost Management User Guide .

resourceTagsoptionalCfnAnomalyMonitor.ResourceTagProperty[]resource_tagsoptionaltyping.List[ResourceTagProperty]resourceTagsoptionalList<ResourceTagProperty>ResourceTagsoptionalResourceTagProperty[]ResourceTagsoptional*[]ResourceTagProperty #
Tags to assign to monitor.