AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the CloudWatch RUM UpdateRumMetricDefinition API operation.

Syntax

Update-CWRUMRumMetricDefinition
-MetricDefinitionId <String>
-AppMonitorName <String>
-Destination <MetricDestination>
-DestinationArn <String>
-MetricDefinition_DimensionKey <Hashtable>
-MetricDefinition_EventPattern <String>
-MetricDefinition_Name <String>
-MetricDefinition_Namespace <String>
-MetricDefinition_UnitLabel <String>
-MetricDefinition_ValueKey <String>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>
-ClientConfig <AmazonCloudWatchRUMConfig>

Description

Modifies one existing metric definition for CloudWatch RUM extended metrics. For more information about extended metrics, see BatchCreateRumMetricsDefinitions.

Parameters

-AppMonitorName <String>
The name of the CloudWatch RUM app monitor that sends these metrics.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
Amazon.PowerShell.Cmdlets.CWRUM.AmazonCloudWatchRUMClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Destination <MetricDestination>
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 CloudWatchEvidently experiment that will receive the metrics and an IAM role that has permission to write to the experiment.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-DestinationArn <String>
This parameter is required if Destination is Evidently. If Destination is CloudWatch, do not use this parameter.This parameter specifies the ARN of the Evidently experiment that is to receive the metrics. You must have already defined this experiment as a valid destination. For more information, see PutRumMetricsDestination.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-MetricDefinition_DimensionKey <Hashtable>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesMetricDefinition_DimensionKeys
-MetricDefinition_EventPattern <String>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-MetricDefinition_Name <String>
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
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-MetricDefinition_Namespace <String>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-MetricDefinition_UnitLabel <String>
The CloudWatch metric unit to use for this metric. If you omit this field, the metric is recorded with no unit.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-MetricDefinition_ValueKey <String>
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 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. Evidently will handle data extraction from the event.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-MetricDefinitionId <String>
The ID of the metric definition to update.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the MetricDefinitionId parameter. The -PassThru parameter is deprecated, use -Select '^MetricDefinitionId' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.CloudWatchRUM.Model.UpdateRumMetricDefinitionResponse). Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet does not generate any output.The service response (type Amazon.CloudWatchRUM.Model.UpdateRumMetricDefinitionResponse) can be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z