aws.rum.MetricsDestination
Explore with Pulumi AI
Provides a CloudWatch RUM Metrics Destination resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.rum.MetricsDestination("example", {
appMonitorName: exampleAwsRumAppMonitor.name,
destination: "CloudWatch",
});
import pulumi
import pulumi_aws as aws
example = aws.rum.MetricsDestination("example",
app_monitor_name=example_aws_rum_app_monitor["name"],
destination="CloudWatch")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rum"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rum.NewMetricsDestination(ctx, "example", &rum.MetricsDestinationArgs{
AppMonitorName: pulumi.Any(exampleAwsRumAppMonitor.Name),
Destination: pulumi.String("CloudWatch"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Rum.MetricsDestination("example", new()
{
AppMonitorName = exampleAwsRumAppMonitor.Name,
Destination = "CloudWatch",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rum.MetricsDestination;
import com.pulumi.aws.rum.MetricsDestinationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new MetricsDestination("example", MetricsDestinationArgs.builder()
.appMonitorName(exampleAwsRumAppMonitor.name())
.destination("CloudWatch")
.build());
}
}
resources:
example:
type: aws:rum:MetricsDestination
properties:
appMonitorName: ${exampleAwsRumAppMonitor.name}
destination: CloudWatch
Create MetricsDestination Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MetricsDestination(name: string, args: MetricsDestinationArgs, opts?: CustomResourceOptions);
@overload
def MetricsDestination(resource_name: str,
args: MetricsDestinationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MetricsDestination(resource_name: str,
opts: Optional[ResourceOptions] = None,
app_monitor_name: Optional[str] = None,
destination: Optional[str] = None,
destination_arn: Optional[str] = None,
iam_role_arn: Optional[str] = None)
func NewMetricsDestination(ctx *Context, name string, args MetricsDestinationArgs, opts ...ResourceOption) (*MetricsDestination, error)
public MetricsDestination(string name, MetricsDestinationArgs args, CustomResourceOptions? opts = null)
public MetricsDestination(String name, MetricsDestinationArgs args)
public MetricsDestination(String name, MetricsDestinationArgs args, CustomResourceOptions options)
type: aws:rum:MetricsDestination
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args MetricsDestinationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args MetricsDestinationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args MetricsDestinationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MetricsDestinationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MetricsDestinationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var metricsDestinationResource = new Aws.Rum.MetricsDestination("metricsDestinationResource", new()
{
AppMonitorName = "string",
Destination = "string",
DestinationArn = "string",
IamRoleArn = "string",
});
example, err := rum.NewMetricsDestination(ctx, "metricsDestinationResource", &rum.MetricsDestinationArgs{
AppMonitorName: pulumi.String("string"),
Destination: pulumi.String("string"),
DestinationArn: pulumi.String("string"),
IamRoleArn: pulumi.String("string"),
})
var metricsDestinationResource = new MetricsDestination("metricsDestinationResource", MetricsDestinationArgs.builder()
.appMonitorName("string")
.destination("string")
.destinationArn("string")
.iamRoleArn("string")
.build());
metrics_destination_resource = aws.rum.MetricsDestination("metricsDestinationResource",
app_monitor_name="string",
destination="string",
destination_arn="string",
iam_role_arn="string")
const metricsDestinationResource = new aws.rum.MetricsDestination("metricsDestinationResource", {
appMonitorName: "string",
destination: "string",
destinationArn: "string",
iamRoleArn: "string",
});
type: aws:rum:MetricsDestination
properties:
appMonitorName: string
destination: string
destinationArn: string
iamRoleArn: string
MetricsDestination Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The MetricsDestination resource accepts the following input properties:
- App
Monitor stringName - The name of the CloudWatch RUM app monitor that will send the metrics.
- Destination string
- Defines the destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, 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. - Destination
Arn string - Use this parameter only if Destination is Evidently. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.
- Iam
Role stringArn - This parameter is required if Destination is Evidently. If Destination is CloudWatch, do not use this parameter.
- App
Monitor stringName - The name of the CloudWatch RUM app monitor that will send the metrics.
- Destination string
- Defines the destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, 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. - Destination
Arn string - Use this parameter only if Destination is Evidently. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.
- Iam
Role stringArn - This parameter is required if Destination is Evidently. If Destination is CloudWatch, do not use this parameter.
- app
Monitor StringName - The name of the CloudWatch RUM app monitor that will send the metrics.
- destination String
- Defines the destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, 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. - destination
Arn String - Use this parameter only if Destination is Evidently. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.
- iam
Role StringArn - This parameter is required if Destination is Evidently. If Destination is CloudWatch, do not use this parameter.
- app
Monitor stringName - The name of the CloudWatch RUM app monitor that will send the metrics.
- destination string
- Defines the destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, 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. - destination
Arn string - Use this parameter only if Destination is Evidently. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.
- iam
Role stringArn - This parameter is required if Destination is Evidently. If Destination is CloudWatch, do not use this parameter.
- app_
monitor_ strname - The name of the CloudWatch RUM app monitor that will send the metrics.
- destination str
- Defines the destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, 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. - destination_
arn str - Use this parameter only if Destination is Evidently. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.
- iam_
role_ strarn - This parameter is required if Destination is Evidently. If Destination is CloudWatch, do not use this parameter.
- app
Monitor StringName - The name of the CloudWatch RUM app monitor that will send the metrics.
- destination String
- Defines the destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, 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. - destination
Arn String - Use this parameter only if Destination is Evidently. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.
- iam
Role StringArn - This parameter is required if Destination is Evidently. If Destination is CloudWatch, do not use this parameter.
Outputs
All input properties are implicitly available as output properties. Additionally, the MetricsDestination resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing MetricsDestination Resource
Get an existing MetricsDestination resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: MetricsDestinationState, opts?: CustomResourceOptions): MetricsDestination
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
app_monitor_name: Optional[str] = None,
destination: Optional[str] = None,
destination_arn: Optional[str] = None,
iam_role_arn: Optional[str] = None) -> MetricsDestination
func GetMetricsDestination(ctx *Context, name string, id IDInput, state *MetricsDestinationState, opts ...ResourceOption) (*MetricsDestination, error)
public static MetricsDestination Get(string name, Input<string> id, MetricsDestinationState? state, CustomResourceOptions? opts = null)
public static MetricsDestination get(String name, Output<String> id, MetricsDestinationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- App
Monitor stringName - The name of the CloudWatch RUM app monitor that will send the metrics.
- Destination string
- Defines the destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, 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. - Destination
Arn string - Use this parameter only if Destination is Evidently. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.
- Iam
Role stringArn - This parameter is required if Destination is Evidently. If Destination is CloudWatch, do not use this parameter.
- App
Monitor stringName - The name of the CloudWatch RUM app monitor that will send the metrics.
- Destination string
- Defines the destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, 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. - Destination
Arn string - Use this parameter only if Destination is Evidently. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.
- Iam
Role stringArn - This parameter is required if Destination is Evidently. If Destination is CloudWatch, do not use this parameter.
- app
Monitor StringName - The name of the CloudWatch RUM app monitor that will send the metrics.
- destination String
- Defines the destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, 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. - destination
Arn String - Use this parameter only if Destination is Evidently. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.
- iam
Role StringArn - This parameter is required if Destination is Evidently. If Destination is CloudWatch, do not use this parameter.
- app
Monitor stringName - The name of the CloudWatch RUM app monitor that will send the metrics.
- destination string
- Defines the destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, 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. - destination
Arn string - Use this parameter only if Destination is Evidently. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.
- iam
Role stringArn - This parameter is required if Destination is Evidently. If Destination is CloudWatch, do not use this parameter.
- app_
monitor_ strname - The name of the CloudWatch RUM app monitor that will send the metrics.
- destination str
- Defines the destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, 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. - destination_
arn str - Use this parameter only if Destination is Evidently. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.
- iam_
role_ strarn - This parameter is required if Destination is Evidently. If Destination is CloudWatch, do not use this parameter.
- app
Monitor StringName - The name of the CloudWatch RUM app monitor that will send the metrics.
- destination String
- Defines the destination to send the metrics to. Valid values are
CloudWatch
andEvidently
. If you specifyEvidently
, 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. - destination
Arn String - Use this parameter only if Destination is Evidently. This parameter specifies the ARN of the Evidently experiment that will receive the extended metrics.
- iam
Role StringArn - This parameter is required if Destination is Evidently. If Destination is CloudWatch, do not use this parameter.
Import
Using pulumi import
, import Cloudwatch RUM Metrics Destination using the id
. For example:
$ pulumi import aws:rum/metricsDestination:MetricsDestination example example
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.