Class CfnAppMonitor.MetricDestinationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.rum.CfnAppMonitor.MetricDestinationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAppMonitor.MetricDestinationProperty>
- Enclosing interface:
- CfnAppMonitor.MetricDestinationProperty
@Stability(Stable)
public static final class CfnAppMonitor.MetricDestinationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAppMonitor.MetricDestinationProperty>
A builder for
CfnAppMonitor.MetricDestinationProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.destination
(String destination) Sets the value ofCfnAppMonitor.MetricDestinationProperty.getDestination()
destinationArn
(String destinationArn) Sets the value ofCfnAppMonitor.MetricDestinationProperty.getDestinationArn()
iamRoleArn
(String iamRoleArn) Sets the value ofCfnAppMonitor.MetricDestinationProperty.getIamRoleArn()
metricDefinitions
(List<? extends Object> metricDefinitions) Sets the value ofCfnAppMonitor.MetricDestinationProperty.getMetricDefinitions()
metricDefinitions
(IResolvable metricDefinitions) Sets the value ofCfnAppMonitor.MetricDestinationProperty.getMetricDefinitions()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
destination
@Stability(Stable) public CfnAppMonitor.MetricDestinationProperty.Builder destination(String destination) Sets the value ofCfnAppMonitor.MetricDestinationProperty.getDestination()
- Parameters:
destination
- Defines the destination to send the metrics to. This parameter is required. Valid values areCloudWatch
andEvidently
. If you specifyEvidently
, 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.- Returns:
this
-
destinationArn
@Stability(Stable) public CfnAppMonitor.MetricDestinationProperty.Builder destinationArn(String destinationArn) Sets the value ofCfnAppMonitor.MetricDestinationProperty.getDestinationArn()
- Parameters:
destinationArn
- Use this parameter only ifDestination
isEvidently
. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.- Returns:
this
-
iamRoleArn
@Stability(Stable) public CfnAppMonitor.MetricDestinationProperty.Builder iamRoleArn(String iamRoleArn) Sets the value ofCfnAppMonitor.MetricDestinationProperty.getIamRoleArn()
- Parameters:
iamRoleArn
- This parameter is required ifDestination
isEvidently
. IfDestination
isCloudWatch
, 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.- Returns:
this
-
metricDefinitions
@Stability(Stable) public CfnAppMonitor.MetricDestinationProperty.Builder metricDefinitions(IResolvable metricDefinitions) Sets the value ofCfnAppMonitor.MetricDestinationProperty.getMetricDefinitions()
- Parameters:
metricDefinitions
- An array of structures which define the metrics that you want to send.- Returns:
this
-
metricDefinitions
@Stability(Stable) public CfnAppMonitor.MetricDestinationProperty.Builder metricDefinitions(List<? extends Object> metricDefinitions) Sets the value ofCfnAppMonitor.MetricDestinationProperty.getMetricDefinitions()
- Parameters:
metricDefinitions
- An array of structures which define the metrics that you want to send.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnAppMonitor.MetricDestinationProperty>
- Returns:
- a new instance of
CfnAppMonitor.MetricDestinationProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-