:doc:`CloudWatchRUM <../../rum>` / Client / put_rum_metrics_destination

***************************
put_rum_metrics_destination
***************************



.. py:method:: CloudWatchRUM.Client.put_rum_metrics_destination(**kwargs)

  

  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 `BatchCreateRumMetricDefinitions <https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_BatchCreateRumMetricDefinitions.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/rum-2018-05-10/PutRumMetricsDestination>`_  


  **Request Syntax**
  ::

    response = client.put_rum_metrics_destination(
        AppMonitorName='string',
        Destination='CloudWatch'|'Evidently',
        DestinationArn='string',
        IamRoleArn='string'
    )
    
  :type AppMonitorName: string
  :param AppMonitorName: **[REQUIRED]** 

    The name of the CloudWatch RUM app monitor that will send the metrics.

    

  
  :type Destination: string
  :param Destination: **[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 CloudWatchEvidently experiment that is to be the destination and an IAM role that has permission to write to the experiment.

    

  
  :type DestinationArn: string
  :param DestinationArn: 

    Use this parameter only if ``Destination`` is ``Evidently``. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.

    

  
  :type IamRoleArn: string
  :param IamRoleArn: 

    This parameter is required if ``Destination`` is ``Evidently``. If ``Destination`` is ``CloudWatch``, don't 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.

     

    If you specify this parameter, you must be signed on to a role that has `PassRole <https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html>`__ permissions attached to it, to allow the role to be passed. The `CloudWatchAmazonCloudWatchRUMFullAccess <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/auth-and-access-control-cw.html#managed-policies-cloudwatch-RUM>`__ policy doesn't include ``PassRole`` permissions.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`CloudWatchRUM.Client.exceptions.ConflictException`

  
  *   :py:class:`CloudWatchRUM.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`CloudWatchRUM.Client.exceptions.InternalServerException`

  
  *   :py:class:`CloudWatchRUM.Client.exceptions.ValidationException`

  
  *   :py:class:`CloudWatchRUM.Client.exceptions.ThrottlingException`

  
  *   :py:class:`CloudWatchRUM.Client.exceptions.AccessDeniedException`

  