/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CloudWatchRUM { namespace Model { /** *

Use this structure to define one extended metric or custom metric that RUM * will send to CloudWatch or CloudWatch Evidently. For more information, see * Additional metrics that you can send to CloudWatch and CloudWatch * Evidently.

This structure is validated differently for extended * metrics and custom metrics. For extended metrics that are sent to the * AWS/RUM namespace, the following validations apply:

  • *

    The Namespace parameter must be omitted or set to * AWS/RUM.

  • Only certain combinations of values for * Name, ValueKey, and EventPattern are * valid. In addition to what is displayed in the list below, the * EventPattern can also include information used by the * DimensionKeys field.

    • If Name is * PerformanceNavigationDuration, then ValueKeymust be * event_details.duration and the EventPattern must * include * {"event_type":["com.amazon.rum.performance_navigation_event"]}

      *
    • If Name is PerformanceResourceDuration, * then ValueKeymust be event_details.duration and the * EventPattern must include * {"event_type":["com.amazon.rum.performance_resource_event"]}

      *
    • If Name is * NavigationSatisfiedTransaction, then ValueKeymust be * null and the EventPattern must include { "event_type": * ["com.amazon.rum.performance_navigation_event"], "event_details": { "duration": * [{ "numeric": [">",2000] }] } }

    • If * Name is NavigationToleratedTransaction, then * ValueKeymust be null and the EventPattern must include * { "event_type": ["com.amazon.rum.performance_navigation_event"], * "event_details": { "duration": [{ "numeric": [">=",2000,"<"8000] }] } * }

    • If Name is * NavigationFrustratedTransaction, then ValueKeymust be * null and the EventPattern must include { "event_type": * ["com.amazon.rum.performance_navigation_event"], "event_details": { "duration": * [{ "numeric": [">=",8000] }] } }

    • If * Name is WebVitalsCumulativeLayoutShift, then * ValueKeymust be event_details.value and the * EventPattern must include * {"event_type":["com.amazon.rum.cumulative_layout_shift_event"]} *

    • If Name is * WebVitalsFirstInputDelay, then ValueKeymust be * event_details.value and the EventPattern must include * {"event_type":["com.amazon.rum.first_input_delay_event"]}

      *
    • If Name is * WebVitalsLargestContentfulPaint, then ValueKeymust be * event_details.value and the EventPattern must include * {"event_type":["com.amazon.rum.largest_contentful_paint_event"]} *

    • If Name is JsErrorCount, then * ValueKeymust be null and the EventPattern must include * {"event_type":["com.amazon.rum.js_error_event"]}

    • *

      If Name is HttpErrorCount, then * ValueKeymust be null and the EventPattern must include * {"event_type":["com.amazon.rum.http_event"]}

    • If * Name is SessionCount, then ValueKeymust * be null and the EventPattern must include * {"event_type":["com.amazon.rum.session_start_event"]}

    • *

For custom metrics, the following validation rules * apply:

  • The namespace can't be omitted and can't be * AWS/RUM. You can use the AWS/RUM namespace only for * extended metrics.

  • All dimensions listed in the * DimensionKeys field must be present in the value of * EventPattern.

  • The values that you specify for * ValueKey, EventPattern, and DimensionKeys * must be fields in RUM events, so all first-level keys in these fields must be * one of the keys in the list later in this section.

  • If you set * a value for EventPattern, it must be a JSON object.

  • *

    For every non-empty event_details, there must be a non-empty * event_type.

  • If EventPattern contains * an event_details field, it must also contain an * event_type. For every built-in event_type that you * use, you must use a value for event_details that corresponds to * that event_type. For information about event details that * correspond to event types, see * RUM event details.

  • In EventPattern, any JSON * array must contain only one value.

Valid key values for * first-level keys in the ValueKey, EventPattern, and * DimensionKeys fields:

  • account_id *

  • application_Id

  • * application_version

  • * application_name

  • batch_id

    *
  • event_details

  • * event_id

  • event_interaction

    *
  • event_timestamp

  • * event_type

  • event_version

    *
  • log_stream

  • metadata *

  • sessionId

  • * user_details

  • userId

  • *

See Also:

AWS * API Reference

*/ class MetricDefinitionRequest { public: AWS_CLOUDWATCHRUM_API MetricDefinitionRequest(); AWS_CLOUDWATCHRUM_API MetricDefinitionRequest(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDWATCHRUM_API MetricDefinitionRequest& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDWATCHRUM_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Use this field only if you are sending the metric to CloudWatch.

This * field is a map of field paths to dimension names. It defines the dimensions to * associate with this metric in CloudWatch. For extended metrics, valid values for * the entries in this field are the following:

  • * "metadata.pageId": "PageId"

  • * "metadata.browserName": "BrowserName"

  • * "metadata.deviceType": "DeviceType"

  • * "metadata.osName": "OSName"

  • * "metadata.countryCode": "CountryCode"

  • * "event_details.fileType": "FileType"

For both * extended metrics and custom metrics, all dimensions listed in this field must * also be included in EventPattern.

*/ inline const Aws::Map& GetDimensionKeys() const{ return m_dimensionKeys; } /** *

Use this field only if you are sending the metric to CloudWatch.

This * field is a map of field paths to dimension names. It defines the dimensions to * associate with this metric in CloudWatch. For extended metrics, valid values for * the entries in this field are the following:

  • * "metadata.pageId": "PageId"

  • * "metadata.browserName": "BrowserName"

  • * "metadata.deviceType": "DeviceType"

  • * "metadata.osName": "OSName"

  • * "metadata.countryCode": "CountryCode"

  • * "event_details.fileType": "FileType"

For both * extended metrics and custom metrics, all dimensions listed in this field must * also be included in EventPattern.

*/ inline bool DimensionKeysHasBeenSet() const { return m_dimensionKeysHasBeenSet; } /** *

Use this field only if you are sending the metric to CloudWatch.

This * field is a map of field paths to dimension names. It defines the dimensions to * associate with this metric in CloudWatch. For extended metrics, valid values for * the entries in this field are the following:

  • * "metadata.pageId": "PageId"

  • * "metadata.browserName": "BrowserName"

  • * "metadata.deviceType": "DeviceType"

  • * "metadata.osName": "OSName"

  • * "metadata.countryCode": "CountryCode"

  • * "event_details.fileType": "FileType"

For both * extended metrics and custom metrics, all dimensions listed in this field must * also be included in EventPattern.

*/ inline void SetDimensionKeys(const Aws::Map& value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys = value; } /** *

Use this field only if you are sending the metric to CloudWatch.

This * field is a map of field paths to dimension names. It defines the dimensions to * associate with this metric in CloudWatch. For extended metrics, valid values for * the entries in this field are the following:

  • * "metadata.pageId": "PageId"

  • * "metadata.browserName": "BrowserName"

  • * "metadata.deviceType": "DeviceType"

  • * "metadata.osName": "OSName"

  • * "metadata.countryCode": "CountryCode"

  • * "event_details.fileType": "FileType"

For both * extended metrics and custom metrics, all dimensions listed in this field must * also be included in EventPattern.

*/ inline void SetDimensionKeys(Aws::Map&& value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys = std::move(value); } /** *

Use this field only if you are sending the metric to CloudWatch.

This * field is a map of field paths to dimension names. It defines the dimensions to * associate with this metric in CloudWatch. For extended metrics, valid values for * the entries in this field are the following:

  • * "metadata.pageId": "PageId"

  • * "metadata.browserName": "BrowserName"

  • * "metadata.deviceType": "DeviceType"

  • * "metadata.osName": "OSName"

  • * "metadata.countryCode": "CountryCode"

  • * "event_details.fileType": "FileType"

For both * extended metrics and custom metrics, all dimensions listed in this field must * also be included in EventPattern.

*/ inline MetricDefinitionRequest& WithDimensionKeys(const Aws::Map& value) { SetDimensionKeys(value); return *this;} /** *

Use this field only if you are sending the metric to CloudWatch.

This * field is a map of field paths to dimension names. It defines the dimensions to * associate with this metric in CloudWatch. For extended metrics, valid values for * the entries in this field are the following:

  • * "metadata.pageId": "PageId"

  • * "metadata.browserName": "BrowserName"

  • * "metadata.deviceType": "DeviceType"

  • * "metadata.osName": "OSName"

  • * "metadata.countryCode": "CountryCode"

  • * "event_details.fileType": "FileType"

For both * extended metrics and custom metrics, all dimensions listed in this field must * also be included in EventPattern.

*/ inline MetricDefinitionRequest& WithDimensionKeys(Aws::Map&& value) { SetDimensionKeys(std::move(value)); return *this;} /** *

Use this field only if you are sending the metric to CloudWatch.

This * field is a map of field paths to dimension names. It defines the dimensions to * associate with this metric in CloudWatch. For extended metrics, valid values for * the entries in this field are the following:

  • * "metadata.pageId": "PageId"

  • * "metadata.browserName": "BrowserName"

  • * "metadata.deviceType": "DeviceType"

  • * "metadata.osName": "OSName"

  • * "metadata.countryCode": "CountryCode"

  • * "event_details.fileType": "FileType"

For both * extended metrics and custom metrics, all dimensions listed in this field must * also be included in EventPattern.

*/ inline MetricDefinitionRequest& AddDimensionKeys(const Aws::String& key, const Aws::String& value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys.emplace(key, value); return *this; } /** *

Use this field only if you are sending the metric to CloudWatch.

This * field is a map of field paths to dimension names. It defines the dimensions to * associate with this metric in CloudWatch. For extended metrics, valid values for * the entries in this field are the following:

  • * "metadata.pageId": "PageId"

  • * "metadata.browserName": "BrowserName"

  • * "metadata.deviceType": "DeviceType"

  • * "metadata.osName": "OSName"

  • * "metadata.countryCode": "CountryCode"

  • * "event_details.fileType": "FileType"

For both * extended metrics and custom metrics, all dimensions listed in this field must * also be included in EventPattern.

*/ inline MetricDefinitionRequest& AddDimensionKeys(Aws::String&& key, const Aws::String& value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys.emplace(std::move(key), value); return *this; } /** *

Use this field only if you are sending the metric to CloudWatch.

This * field is a map of field paths to dimension names. It defines the dimensions to * associate with this metric in CloudWatch. For extended metrics, valid values for * the entries in this field are the following:

  • * "metadata.pageId": "PageId"

  • * "metadata.browserName": "BrowserName"

  • * "metadata.deviceType": "DeviceType"

  • * "metadata.osName": "OSName"

  • * "metadata.countryCode": "CountryCode"

  • * "event_details.fileType": "FileType"

For both * extended metrics and custom metrics, all dimensions listed in this field must * also be included in EventPattern.

*/ inline MetricDefinitionRequest& AddDimensionKeys(const Aws::String& key, Aws::String&& value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys.emplace(key, std::move(value)); return *this; } /** *

Use this field only if you are sending the metric to CloudWatch.

This * field is a map of field paths to dimension names. It defines the dimensions to * associate with this metric in CloudWatch. For extended metrics, valid values for * the entries in this field are the following:

  • * "metadata.pageId": "PageId"

  • * "metadata.browserName": "BrowserName"

  • * "metadata.deviceType": "DeviceType"

  • * "metadata.osName": "OSName"

  • * "metadata.countryCode": "CountryCode"

  • * "event_details.fileType": "FileType"

For both * extended metrics and custom metrics, all dimensions listed in this field must * also be included in EventPattern.

*/ inline MetricDefinitionRequest& AddDimensionKeys(Aws::String&& key, Aws::String&& value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys.emplace(std::move(key), std::move(value)); return *this; } /** *

Use this field only if you are sending the metric to CloudWatch.

This * field is a map of field paths to dimension names. It defines the dimensions to * associate with this metric in CloudWatch. For extended metrics, valid values for * the entries in this field are the following:

  • * "metadata.pageId": "PageId"

  • * "metadata.browserName": "BrowserName"

  • * "metadata.deviceType": "DeviceType"

  • * "metadata.osName": "OSName"

  • * "metadata.countryCode": "CountryCode"

  • * "event_details.fileType": "FileType"

For both * extended metrics and custom metrics, all dimensions listed in this field must * also be included in EventPattern.

*/ inline MetricDefinitionRequest& AddDimensionKeys(const char* key, Aws::String&& value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys.emplace(key, std::move(value)); return *this; } /** *

Use this field only if you are sending the metric to CloudWatch.

This * field is a map of field paths to dimension names. It defines the dimensions to * associate with this metric in CloudWatch. For extended metrics, valid values for * the entries in this field are the following:

  • * "metadata.pageId": "PageId"

  • * "metadata.browserName": "BrowserName"

  • * "metadata.deviceType": "DeviceType"

  • * "metadata.osName": "OSName"

  • * "metadata.countryCode": "CountryCode"

  • * "event_details.fileType": "FileType"

For both * extended metrics and custom metrics, all dimensions listed in this field must * also be included in EventPattern.

*/ inline MetricDefinitionRequest& AddDimensionKeys(Aws::String&& key, const char* value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys.emplace(std::move(key), value); return *this; } /** *

Use this field only if you are sending the metric to CloudWatch.

This * field is a map of field paths to dimension names. It defines the dimensions to * associate with this metric in CloudWatch. For extended metrics, valid values for * the entries in this field are the following:

  • * "metadata.pageId": "PageId"

  • * "metadata.browserName": "BrowserName"

  • * "metadata.deviceType": "DeviceType"

  • * "metadata.osName": "OSName"

  • * "metadata.countryCode": "CountryCode"

  • * "event_details.fileType": "FileType"

For both * extended metrics and custom metrics, all dimensions listed in this field must * also be included in EventPattern.

*/ inline MetricDefinitionRequest& AddDimensionKeys(const char* key, const char* value) { m_dimensionKeysHasBeenSet = true; m_dimensionKeys.emplace(key, value); return *this; } /** *

The pattern that defines the metric, specified as a JSON object. RUM checks * events that happen in a user's session against the pattern, and events that * match the pattern are sent to the metric destination.

When you define * extended metrics, the metric definition is not valid if * EventPattern is omitted.

Example event patterns:

    *
  • '{ "event_type": ["com.amazon.rum.js_error_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Firefox" ] }, "event_details": { "duration": [{ * "numeric": [ "<", 2000 ] }] } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], "countryCode": [ "US" ] }, * "event_details": { "duration": [{ "numeric": [ ">=", 2000, "<", 8000 ] }] * } }'

If the metrics destination' is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline const Aws::String& GetEventPattern() const{ return m_eventPattern; } /** *

The pattern that defines the metric, specified as a JSON object. RUM checks * events that happen in a user's session against the pattern, and events that * match the pattern are sent to the metric destination.

When you define * extended metrics, the metric definition is not valid if * EventPattern is omitted.

Example event patterns:

    *
  • '{ "event_type": ["com.amazon.rum.js_error_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Firefox" ] }, "event_details": { "duration": [{ * "numeric": [ "<", 2000 ] }] } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], "countryCode": [ "US" ] }, * "event_details": { "duration": [{ "numeric": [ ">=", 2000, "<", 8000 ] }] * } }'

If the metrics destination' is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline bool EventPatternHasBeenSet() const { return m_eventPatternHasBeenSet; } /** *

The pattern that defines the metric, specified as a JSON object. RUM checks * events that happen in a user's session against the pattern, and events that * match the pattern are sent to the metric destination.

When you define * extended metrics, the metric definition is not valid if * EventPattern is omitted.

Example event patterns:

    *
  • '{ "event_type": ["com.amazon.rum.js_error_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Firefox" ] }, "event_details": { "duration": [{ * "numeric": [ "<", 2000 ] }] } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], "countryCode": [ "US" ] }, * "event_details": { "duration": [{ "numeric": [ ">=", 2000, "<", 8000 ] }] * } }'

If the metrics destination' is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline void SetEventPattern(const Aws::String& value) { m_eventPatternHasBeenSet = true; m_eventPattern = value; } /** *

The pattern that defines the metric, specified as a JSON object. RUM checks * events that happen in a user's session against the pattern, and events that * match the pattern are sent to the metric destination.

When you define * extended metrics, the metric definition is not valid if * EventPattern is omitted.

Example event patterns:

    *
  • '{ "event_type": ["com.amazon.rum.js_error_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Firefox" ] }, "event_details": { "duration": [{ * "numeric": [ "<", 2000 ] }] } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], "countryCode": [ "US" ] }, * "event_details": { "duration": [{ "numeric": [ ">=", 2000, "<", 8000 ] }] * } }'

If the metrics destination' is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline void SetEventPattern(Aws::String&& value) { m_eventPatternHasBeenSet = true; m_eventPattern = std::move(value); } /** *

The pattern that defines the metric, specified as a JSON object. RUM checks * events that happen in a user's session against the pattern, and events that * match the pattern are sent to the metric destination.

When you define * extended metrics, the metric definition is not valid if * EventPattern is omitted.

Example event patterns:

    *
  • '{ "event_type": ["com.amazon.rum.js_error_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Firefox" ] }, "event_details": { "duration": [{ * "numeric": [ "<", 2000 ] }] } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], "countryCode": [ "US" ] }, * "event_details": { "duration": [{ "numeric": [ ">=", 2000, "<", 8000 ] }] * } }'

If the metrics destination' is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline void SetEventPattern(const char* value) { m_eventPatternHasBeenSet = true; m_eventPattern.assign(value); } /** *

The pattern that defines the metric, specified as a JSON object. RUM checks * events that happen in a user's session against the pattern, and events that * match the pattern are sent to the metric destination.

When you define * extended metrics, the metric definition is not valid if * EventPattern is omitted.

Example event patterns:

    *
  • '{ "event_type": ["com.amazon.rum.js_error_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Firefox" ] }, "event_details": { "duration": [{ * "numeric": [ "<", 2000 ] }] } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], "countryCode": [ "US" ] }, * "event_details": { "duration": [{ "numeric": [ ">=", 2000, "<", 8000 ] }] * } }'

If the metrics destination' is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline MetricDefinitionRequest& WithEventPattern(const Aws::String& value) { SetEventPattern(value); return *this;} /** *

The pattern that defines the metric, specified as a JSON object. RUM checks * events that happen in a user's session against the pattern, and events that * match the pattern are sent to the metric destination.

When you define * extended metrics, the metric definition is not valid if * EventPattern is omitted.

Example event patterns:

    *
  • '{ "event_type": ["com.amazon.rum.js_error_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Firefox" ] }, "event_details": { "duration": [{ * "numeric": [ "<", 2000 ] }] } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], "countryCode": [ "US" ] }, * "event_details": { "duration": [{ "numeric": [ ">=", 2000, "<", 8000 ] }] * } }'

If the metrics destination' is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline MetricDefinitionRequest& WithEventPattern(Aws::String&& value) { SetEventPattern(std::move(value)); return *this;} /** *

The pattern that defines the metric, specified as a JSON object. RUM checks * events that happen in a user's session against the pattern, and events that * match the pattern are sent to the metric destination.

When you define * extended metrics, the metric definition is not valid if * EventPattern is omitted.

Example event patterns:

    *
  • '{ "event_type": ["com.amazon.rum.js_error_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Firefox" ] }, "event_details": { "duration": [{ * "numeric": [ "<", 2000 ] }] } }'

  • '{ * "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { * "browserName": [ "Chrome", "Safari" ], "countryCode": [ "US" ] }, * "event_details": { "duration": [{ "numeric": [ ">=", 2000, "<", 8000 ] }] * } }'

If the metrics destination' is * CloudWatch and the event also matches a value in * DimensionKeys, then the metric is published with the specified * dimensions.

*/ inline MetricDefinitionRequest& WithEventPattern(const char* value) { SetEventPattern(value); return *this;} /** *

The name for the metric that is defined in this structure. For custom * metrics, you can specify any name that you like. For extended metrics, valid * values are the following:

  • * PerformanceNavigationDuration

  • * PerformanceResourceDuration

  • * NavigationSatisfiedTransaction

  • * NavigationToleratedTransaction

  • * NavigationFrustratedTransaction

  • * WebVitalsCumulativeLayoutShift

  • * WebVitalsFirstInputDelay

  • * WebVitalsLargestContentfulPaint

  • * JsErrorCount

  • HttpErrorCount

    *
  • SessionCount

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name for the metric that is defined in this structure. For custom * metrics, you can specify any name that you like. For extended metrics, valid * values are the following:

  • * PerformanceNavigationDuration

  • * PerformanceResourceDuration

  • * NavigationSatisfiedTransaction

  • * NavigationToleratedTransaction

  • * NavigationFrustratedTransaction

  • * WebVitalsCumulativeLayoutShift

  • * WebVitalsFirstInputDelay

  • * WebVitalsLargestContentfulPaint

  • * JsErrorCount

  • HttpErrorCount

    *
  • SessionCount

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name for the metric that is defined in this structure. For custom * metrics, you can specify any name that you like. For extended metrics, valid * values are the following:

  • * PerformanceNavigationDuration

  • * PerformanceResourceDuration

  • * NavigationSatisfiedTransaction

  • * NavigationToleratedTransaction

  • * NavigationFrustratedTransaction

  • * WebVitalsCumulativeLayoutShift

  • * WebVitalsFirstInputDelay

  • * WebVitalsLargestContentfulPaint

  • * JsErrorCount

  • HttpErrorCount

    *
  • SessionCount

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name for the metric that is defined in this structure. For custom * metrics, you can specify any name that you like. For extended metrics, valid * values are the following:

  • * PerformanceNavigationDuration

  • * PerformanceResourceDuration

  • * NavigationSatisfiedTransaction

  • * NavigationToleratedTransaction

  • * NavigationFrustratedTransaction

  • * WebVitalsCumulativeLayoutShift

  • * WebVitalsFirstInputDelay

  • * WebVitalsLargestContentfulPaint

  • * JsErrorCount

  • HttpErrorCount

    *
  • SessionCount

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name for the metric that is defined in this structure. For custom * metrics, you can specify any name that you like. For extended metrics, valid * values are the following:

  • * PerformanceNavigationDuration

  • * PerformanceResourceDuration

  • * NavigationSatisfiedTransaction

  • * NavigationToleratedTransaction

  • * NavigationFrustratedTransaction

  • * WebVitalsCumulativeLayoutShift

  • * WebVitalsFirstInputDelay

  • * WebVitalsLargestContentfulPaint

  • * JsErrorCount

  • HttpErrorCount

    *
  • SessionCount

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name for the metric that is defined in this structure. For custom * metrics, you can specify any name that you like. For extended metrics, valid * values are the following:

  • * PerformanceNavigationDuration

  • * PerformanceResourceDuration

  • * NavigationSatisfiedTransaction

  • * NavigationToleratedTransaction

  • * NavigationFrustratedTransaction

  • * WebVitalsCumulativeLayoutShift

  • * WebVitalsFirstInputDelay

  • * WebVitalsLargestContentfulPaint

  • * JsErrorCount

  • HttpErrorCount

    *
  • SessionCount

*/ inline MetricDefinitionRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name for the metric that is defined in this structure. For custom * metrics, you can specify any name that you like. For extended metrics, valid * values are the following:

  • * PerformanceNavigationDuration

  • * PerformanceResourceDuration

  • * NavigationSatisfiedTransaction

  • * NavigationToleratedTransaction

  • * NavigationFrustratedTransaction

  • * WebVitalsCumulativeLayoutShift

  • * WebVitalsFirstInputDelay

  • * WebVitalsLargestContentfulPaint

  • * JsErrorCount

  • HttpErrorCount

    *
  • SessionCount

*/ inline MetricDefinitionRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name for the metric that is defined in this structure. For custom * metrics, you can specify any name that you like. For extended metrics, valid * values are the following:

  • * PerformanceNavigationDuration

  • * PerformanceResourceDuration

  • * NavigationSatisfiedTransaction

  • * NavigationToleratedTransaction

  • * NavigationFrustratedTransaction

  • * WebVitalsCumulativeLayoutShift

  • * WebVitalsFirstInputDelay

  • * WebVitalsLargestContentfulPaint

  • * JsErrorCount

  • HttpErrorCount

    *
  • SessionCount

*/ inline MetricDefinitionRequest& WithName(const char* value) { SetName(value); return *this;} /** *

If this structure is for a custom metric instead of an extended metrics, use * this parameter to define the metric namespace for that custom metric. Do not * specify this parameter if this structure is for an extended metric.

You * cannot use any string that starts with AWS/ for your namespace.

*/ inline const Aws::String& GetNamespace() const{ return m_namespace; } /** *

If this structure is for a custom metric instead of an extended metrics, use * this parameter to define the metric namespace for that custom metric. Do not * specify this parameter if this structure is for an extended metric.

You * cannot use any string that starts with AWS/ for your namespace.

*/ inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; } /** *

If this structure is for a custom metric instead of an extended metrics, use * this parameter to define the metric namespace for that custom metric. Do not * specify this parameter if this structure is for an extended metric.

You * cannot use any string that starts with AWS/ for your namespace.

*/ inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; } /** *

If this structure is for a custom metric instead of an extended metrics, use * this parameter to define the metric namespace for that custom metric. Do not * specify this parameter if this structure is for an extended metric.

You * cannot use any string that starts with AWS/ for your namespace.

*/ inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = std::move(value); } /** *

If this structure is for a custom metric instead of an extended metrics, use * this parameter to define the metric namespace for that custom metric. Do not * specify this parameter if this structure is for an extended metric.

You * cannot use any string that starts with AWS/ for your namespace.

*/ inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); } /** *

If this structure is for a custom metric instead of an extended metrics, use * this parameter to define the metric namespace for that custom metric. Do not * specify this parameter if this structure is for an extended metric.

You * cannot use any string that starts with AWS/ for your namespace.

*/ inline MetricDefinitionRequest& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;} /** *

If this structure is for a custom metric instead of an extended metrics, use * this parameter to define the metric namespace for that custom metric. Do not * specify this parameter if this structure is for an extended metric.

You * cannot use any string that starts with AWS/ for your namespace.

*/ inline MetricDefinitionRequest& WithNamespace(Aws::String&& value) { SetNamespace(std::move(value)); return *this;} /** *

If this structure is for a custom metric instead of an extended metrics, use * this parameter to define the metric namespace for that custom metric. Do not * specify this parameter if this structure is for an extended metric.

You * cannot use any string that starts with AWS/ for your namespace.

*/ inline MetricDefinitionRequest& WithNamespace(const char* value) { SetNamespace(value); return *this;} /** *

The CloudWatch metric unit to use for this metric. If you omit this field, * the metric is recorded with no unit.

*/ inline const Aws::String& GetUnitLabel() const{ return m_unitLabel; } /** *

The CloudWatch metric unit to use for this metric. If you omit this field, * the metric is recorded with no unit.

*/ inline bool UnitLabelHasBeenSet() const { return m_unitLabelHasBeenSet; } /** *

The CloudWatch metric unit to use for this metric. If you omit this field, * the metric is recorded with no unit.

*/ inline void SetUnitLabel(const Aws::String& value) { m_unitLabelHasBeenSet = true; m_unitLabel = value; } /** *

The CloudWatch metric unit to use for this metric. If you omit this field, * the metric is recorded with no unit.

*/ inline void SetUnitLabel(Aws::String&& value) { m_unitLabelHasBeenSet = true; m_unitLabel = std::move(value); } /** *

The CloudWatch metric unit to use for this metric. If you omit this field, * the metric is recorded with no unit.

*/ inline void SetUnitLabel(const char* value) { m_unitLabelHasBeenSet = true; m_unitLabel.assign(value); } /** *

The CloudWatch metric unit to use for this metric. If you omit this field, * the metric is recorded with no unit.

*/ inline MetricDefinitionRequest& WithUnitLabel(const Aws::String& value) { SetUnitLabel(value); return *this;} /** *

The CloudWatch metric unit to use for this metric. If you omit this field, * the metric is recorded with no unit.

*/ inline MetricDefinitionRequest& WithUnitLabel(Aws::String&& value) { SetUnitLabel(std::move(value)); return *this;} /** *

The CloudWatch metric unit to use for this metric. If you omit this field, * the metric is recorded with no unit.

*/ inline MetricDefinitionRequest& WithUnitLabel(const char* value) { SetUnitLabel(value); return *this;} /** *

The field within the event object that the metric value is sourced from.

*

If you omit this field, a hardcoded value of 1 is pushed as the metric value. * This is useful if you just want to count the number of events that the filter * catches.

If this metric is sent to CloudWatch Evidently, this field will * be passed to Evidently raw and Evidently will handle data extraction from the * event.

*/ inline const Aws::String& GetValueKey() const{ return m_valueKey; } /** *

The field within the event object that the metric value is sourced from.

*

If you omit this field, a hardcoded value of 1 is pushed as the metric value. * This is useful if you just want to count the number of events that the filter * catches.

If this metric is sent to CloudWatch Evidently, this field will * be passed to Evidently raw and Evidently will handle data extraction from the * event.

*/ inline bool ValueKeyHasBeenSet() const { return m_valueKeyHasBeenSet; } /** *

The field within the event object that the metric value is sourced from.

*

If you omit this field, a hardcoded value of 1 is pushed as the metric value. * This is useful if you just want to count the number of events that the filter * catches.

If this metric is sent to CloudWatch Evidently, this field will * be passed to Evidently raw and Evidently will handle data extraction from the * event.

*/ inline void SetValueKey(const Aws::String& value) { m_valueKeyHasBeenSet = true; m_valueKey = value; } /** *

The field within the event object that the metric value is sourced from.

*

If you omit this field, a hardcoded value of 1 is pushed as the metric value. * This is useful if you just want to count the number of events that the filter * catches.

If this metric is sent to CloudWatch Evidently, this field will * be passed to Evidently raw and Evidently will handle data extraction from the * event.

*/ inline void SetValueKey(Aws::String&& value) { m_valueKeyHasBeenSet = true; m_valueKey = std::move(value); } /** *

The field within the event object that the metric value is sourced from.

*

If you omit this field, a hardcoded value of 1 is pushed as the metric value. * This is useful if you just want to count the number of events that the filter * catches.

If this metric is sent to CloudWatch Evidently, this field will * be passed to Evidently raw and Evidently will handle data extraction from the * event.

*/ inline void SetValueKey(const char* value) { m_valueKeyHasBeenSet = true; m_valueKey.assign(value); } /** *

The field within the event object that the metric value is sourced from.

*

If you omit this field, a hardcoded value of 1 is pushed as the metric value. * This is useful if you just want to count the number of events that the filter * catches.

If this metric is sent to CloudWatch Evidently, this field will * be passed to Evidently raw and Evidently will handle data extraction from the * event.

*/ inline MetricDefinitionRequest& WithValueKey(const Aws::String& value) { SetValueKey(value); return *this;} /** *

The field within the event object that the metric value is sourced from.

*

If you omit this field, a hardcoded value of 1 is pushed as the metric value. * This is useful if you just want to count the number of events that the filter * catches.

If this metric is sent to CloudWatch Evidently, this field will * be passed to Evidently raw and Evidently will handle data extraction from the * event.

*/ inline MetricDefinitionRequest& WithValueKey(Aws::String&& value) { SetValueKey(std::move(value)); return *this;} /** *

The field within the event object that the metric value is sourced from.

*

If you omit this field, a hardcoded value of 1 is pushed as the metric value. * This is useful if you just want to count the number of events that the filter * catches.

If this metric is sent to CloudWatch Evidently, this field will * be passed to Evidently raw and Evidently will handle data extraction from the * event.

*/ inline MetricDefinitionRequest& WithValueKey(const char* value) { SetValueKey(value); return *this;} private: Aws::Map m_dimensionKeys; bool m_dimensionKeysHasBeenSet = false; Aws::String m_eventPattern; bool m_eventPatternHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_namespace; bool m_namespaceHasBeenSet = false; Aws::String m_unitLabel; bool m_unitLabelHasBeenSet = false; Aws::String m_valueKey; bool m_valueKeyHasBeenSet = false; }; } // namespace Model } // namespace CloudWatchRUM } // namespace Aws