Skip to content
v2.278.0

MetricDestinationProperty Struct ​

Creates or updates a destination to receive extended metrics from CloudWatch RUM.

You can send extended metrics to CloudWatch or to a CloudWatch Evidently experiment.

For more information about extended metrics, see Extended metrics that you can send to CloudWatch and CloudWatch Evidently .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_rum as rum } from 'aws-cdk-lib';
const metricDestinationProperty: rum.CfnAppMonitor.MetricDestinationProperty = {
  destination: 'destination',

  // the properties below are optional
  destinationArn: 'destinationArn',
  iamRoleArn: 'iamRoleArn',
  metricDefinitions: [{
    name: 'name',

    // the properties below are optional
    dimensionKeys: {
      dimensionKeysKey: 'dimensionKeys',
    },
    eventPattern: 'eventPattern',
    namespace: 'namespace',
    unitLabel: 'unitLabel',
    valueKey: 'valueKey',
  }],
};
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_rum as rum

metric_destination_property = rum.CfnAppMonitor.MetricDestinationProperty(
    destination="destination",

    # the properties below are optional
    destination_arn="destinationArn",
    iam_role_arn="iamRoleArn",
    metric_definitions=[rum.CfnAppMonitor.MetricDefinitionProperty(
        name="name",

        # the properties below are optional
        dimension_keys={
            "dimension_keys_key": "dimensionKeys"
        },
        event_pattern="eventPattern",
        namespace="namespace",
        unit_label="unitLabel",
        value_key="valueKey"
    )]
)
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.rum.*;

MetricDestinationProperty metricDestinationProperty = MetricDestinationProperty.builder()
        .destination("destination")

        // the properties below are optional
        .destinationArn("destinationArn")
        .iamRoleArn("iamRoleArn")
        .metricDefinitions(List.of(MetricDefinitionProperty.builder()
                .name("name")

                // the properties below are optional
                .dimensionKeys(Map.of(
                        "dimensionKeysKey", "dimensionKeys"))
                .eventPattern("eventPattern")
                .namespace("namespace")
                .unitLabel("unitLabel")
                .valueKey("valueKey")
                .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.RUM;

var metricDestinationProperty = new MetricDestinationProperty {
    Destination = "destination",

    // the properties below are optional
    DestinationArn = "destinationArn",
    IamRoleArn = "iamRoleArn",
    MetricDefinitions = new [] { new MetricDefinitionProperty {
        Name = "name",

        // the properties below are optional
        DimensionKeys = new Dictionary<string, string> {
            { "dimensionKeysKey", "dimensionKeys" }
        },
        EventPattern = "eventPattern",
        Namespace = "namespace",
        UnitLabel = "unitLabel",
        ValueKey = "valueKey"
    } }
};
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"

metricDestinationProperty := &MetricDestinationProperty{
	Destination: jsii.String("destination"),

	// the properties below are optional
	DestinationArn: jsii.String("destinationArn"),
	IamRoleArn: jsii.String("iamRoleArn"),
	MetricDefinitions: []interface{}{
		&MetricDefinitionProperty{
			Name: jsii.String("name"),

			// the properties below are optional
			DimensionKeys: map[string]*string{
				"dimensionKeysKey": jsii.String("dimensionKeys"),
			},
			EventPattern: jsii.String("eventPattern"),
			Namespace: jsii.String("namespace"),
			UnitLabel: jsii.String("unitLabel"),
			ValueKey: jsii.String("valueKey"),
		},
	},
}

Properties ​

destinationstringdestinationstrdestinationStringDestinationstringDestination*string required #
Defines the destination to send the metrics to.

Valid values are CloudWatch and Evidently . If you specify Evidently , you must also specify the ARN of the CloudWatch Evidently experiment that is to be the destination and an IAM role that has permission to write to the experiment.

destinationArnoptionalstringdestination_arnoptionalstrdestinationArnoptionalStringDestinationArnoptionalstringDestinationArnoptional*string #
Use this parameter only if `Destination` is `Evidently` .

This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.

iamRoleArnoptionalstringiam_role_arnoptionalstriamRoleArnoptionalStringIamRoleArnoptionalstringIamRoleArnoptional*string #
This parameter is required if `Destination` is `Evidently` . If `Destination` is `CloudWatch` , do not use this parameter.

This parameter specifies the ARN of an IAM role that RUM will assume to write to the Evidently experiment that you are sending metrics to. This role must have permission to write to that experiment.

metricDefinitionsoptionalIResolvable | IResolvable | CfnAppMonitor.MetricDefinitionProperty[]metric_definitionsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MetricDefinitionProperty]]]metricDefinitionsoptionalIResolvableMetricDefinitionsoptionalIResolvableMetricDefinitionsoptionalinterface{} #
An array of structures which define the metrics that you want to send.