1. Packages
  2. CockroachDB Cloud
  3. API Docs
  4. MetricExportCloudwatchConfig
CockroachDB v0.9.4 published on Friday, Mar 21, 2025 by pulumiverse

cockroach.MetricExportCloudwatchConfig

Explore with Pulumi AI

Amazon CloudWatch metric export configuration for a cluster.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cockroach from "@pulumiverse/cockroach";

const config = new pulumi.Config();
const clusterId = config.require("clusterId");
const roleArn = config.require("roleArn");
const logGroupName = config.require("logGroupName");
const awsRegion = config.require("awsRegion");
const example = new cockroach.MetricExportCloudwatchConfig("example", {
    clusterId: clusterId,
    roleArn: roleArn,
    logGroupName: logGroupName,
    targetRegion: awsRegion,
});
Copy
import pulumi
import pulumiverse_cockroach as cockroach

config = pulumi.Config()
cluster_id = config.require("clusterId")
role_arn = config.require("roleArn")
log_group_name = config.require("logGroupName")
aws_region = config.require("awsRegion")
example = cockroach.MetricExportCloudwatchConfig("example",
    cluster_id=cluster_id,
    role_arn=role_arn,
    log_group_name=log_group_name,
    target_region=aws_region)
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
	"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		clusterId := cfg.Require("clusterId")
		roleArn := cfg.Require("roleArn")
		logGroupName := cfg.Require("logGroupName")
		awsRegion := cfg.Require("awsRegion")
		_, err := cockroach.NewMetricExportCloudwatchConfig(ctx, "example", &cockroach.MetricExportCloudwatchConfigArgs{
			ClusterId:    pulumi.String(clusterId),
			RoleArn:      pulumi.String(roleArn),
			LogGroupName: pulumi.String(logGroupName),
			TargetRegion: pulumi.String(awsRegion),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cockroach = Pulumiverse.Cockroach;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var clusterId = config.Require("clusterId");
    var roleArn = config.Require("roleArn");
    var logGroupName = config.Require("logGroupName");
    var awsRegion = config.Require("awsRegion");
    var example = new Cockroach.MetricExportCloudwatchConfig("example", new()
    {
        ClusterId = clusterId,
        RoleArn = roleArn,
        LogGroupName = logGroupName,
        TargetRegion = awsRegion,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cockroach.MetricExportCloudwatchConfig;
import com.pulumi.cockroach.MetricExportCloudwatchConfigArgs;
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) {
        final var config = ctx.config();
        final var clusterId = config.get("clusterId");
        final var roleArn = config.get("roleArn");
        final var logGroupName = config.get("logGroupName");
        final var awsRegion = config.get("awsRegion");
        var example = new MetricExportCloudwatchConfig("example", MetricExportCloudwatchConfigArgs.builder()
            .clusterId(clusterId)
            .roleArn(roleArn)
            .logGroupName(logGroupName)
            .targetRegion(awsRegion)
            .build());

    }
}
Copy
configuration:
  clusterId:
    type: string
  roleArn:
    type: string
  logGroupName:
    type: string
  awsRegion:
    type: string
resources:
  example:
    type: cockroach:MetricExportCloudwatchConfig
    properties:
      clusterId: ${clusterId}
      roleArn: ${roleArn}
      logGroupName: ${logGroupName}
      targetRegion: ${awsRegion}
Copy

Create MetricExportCloudwatchConfig Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new MetricExportCloudwatchConfig(name: string, args: MetricExportCloudwatchConfigArgs, opts?: CustomResourceOptions);
@overload
def MetricExportCloudwatchConfig(resource_name: str,
                                 args: MetricExportCloudwatchConfigArgs,
                                 opts: Optional[ResourceOptions] = None)

@overload
def MetricExportCloudwatchConfig(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 cluster_id: Optional[str] = None,
                                 role_arn: Optional[str] = None,
                                 log_group_name: Optional[str] = None,
                                 target_region: Optional[str] = None)
func NewMetricExportCloudwatchConfig(ctx *Context, name string, args MetricExportCloudwatchConfigArgs, opts ...ResourceOption) (*MetricExportCloudwatchConfig, error)
public MetricExportCloudwatchConfig(string name, MetricExportCloudwatchConfigArgs args, CustomResourceOptions? opts = null)
public MetricExportCloudwatchConfig(String name, MetricExportCloudwatchConfigArgs args)
public MetricExportCloudwatchConfig(String name, MetricExportCloudwatchConfigArgs args, CustomResourceOptions options)
type: cockroach:MetricExportCloudwatchConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. MetricExportCloudwatchConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. MetricExportCloudwatchConfigArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. MetricExportCloudwatchConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. MetricExportCloudwatchConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. MetricExportCloudwatchConfigArgs
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 metricExportCloudwatchConfigResource = new Cockroach.MetricExportCloudwatchConfig("metricExportCloudwatchConfigResource", new()
{
    ClusterId = "string",
    RoleArn = "string",
    LogGroupName = "string",
    TargetRegion = "string",
});
Copy
example, err := cockroach.NewMetricExportCloudwatchConfig(ctx, "metricExportCloudwatchConfigResource", &cockroach.MetricExportCloudwatchConfigArgs{
	ClusterId:    pulumi.String("string"),
	RoleArn:      pulumi.String("string"),
	LogGroupName: pulumi.String("string"),
	TargetRegion: pulumi.String("string"),
})
Copy
var metricExportCloudwatchConfigResource = new MetricExportCloudwatchConfig("metricExportCloudwatchConfigResource", MetricExportCloudwatchConfigArgs.builder()
    .clusterId("string")
    .roleArn("string")
    .logGroupName("string")
    .targetRegion("string")
    .build());
Copy
metric_export_cloudwatch_config_resource = cockroach.MetricExportCloudwatchConfig("metricExportCloudwatchConfigResource",
    cluster_id="string",
    role_arn="string",
    log_group_name="string",
    target_region="string")
Copy
const metricExportCloudwatchConfigResource = new cockroach.MetricExportCloudwatchConfig("metricExportCloudwatchConfigResource", {
    clusterId: "string",
    roleArn: "string",
    logGroupName: "string",
    targetRegion: "string",
});
Copy
type: cockroach:MetricExportCloudwatchConfig
properties:
    clusterId: string
    logGroupName: string
    roleArn: string
    targetRegion: string
Copy

MetricExportCloudwatchConfig 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 MetricExportCloudwatchConfig resource accepts the following input properties:

ClusterId This property is required. string
Cluster ID.
RoleArn This property is required. string
The IAM role used to upload metric segments to the target AWS account.
LogGroupName string
The customized AWS CloudWatch log group name.
TargetRegion string
The specific AWS region that the metrics will be exported to.
ClusterId This property is required. string
Cluster ID.
RoleArn This property is required. string
The IAM role used to upload metric segments to the target AWS account.
LogGroupName string
The customized AWS CloudWatch log group name.
TargetRegion string
The specific AWS region that the metrics will be exported to.
clusterId This property is required. String
Cluster ID.
roleArn This property is required. String
The IAM role used to upload metric segments to the target AWS account.
logGroupName String
The customized AWS CloudWatch log group name.
targetRegion String
The specific AWS region that the metrics will be exported to.
clusterId This property is required. string
Cluster ID.
roleArn This property is required. string
The IAM role used to upload metric segments to the target AWS account.
logGroupName string
The customized AWS CloudWatch log group name.
targetRegion string
The specific AWS region that the metrics will be exported to.
cluster_id This property is required. str
Cluster ID.
role_arn This property is required. str
The IAM role used to upload metric segments to the target AWS account.
log_group_name str
The customized AWS CloudWatch log group name.
target_region str
The specific AWS region that the metrics will be exported to.
clusterId This property is required. String
Cluster ID.
roleArn This property is required. String
The IAM role used to upload metric segments to the target AWS account.
logGroupName String
The customized AWS CloudWatch log group name.
targetRegion String
The specific AWS region that the metrics will be exported to.

Outputs

All input properties are implicitly available as output properties. Additionally, the MetricExportCloudwatchConfig resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Status string
Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
UserMessage string
Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.
Id string
The provider-assigned unique ID for this managed resource.
Status string
Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
UserMessage string
Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.
id String
The provider-assigned unique ID for this managed resource.
status String
Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
userMessage String
Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.
id string
The provider-assigned unique ID for this managed resource.
status string
Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
userMessage string
Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.
id str
The provider-assigned unique ID for this managed resource.
status str
Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
user_message str
Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.
id String
The provider-assigned unique ID for this managed resource.
status String
Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
userMessage String
Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.

Look up Existing MetricExportCloudwatchConfig Resource

Get an existing MetricExportCloudwatchConfig 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?: MetricExportCloudwatchConfigState, opts?: CustomResourceOptions): MetricExportCloudwatchConfig
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cluster_id: Optional[str] = None,
        log_group_name: Optional[str] = None,
        role_arn: Optional[str] = None,
        status: Optional[str] = None,
        target_region: Optional[str] = None,
        user_message: Optional[str] = None) -> MetricExportCloudwatchConfig
func GetMetricExportCloudwatchConfig(ctx *Context, name string, id IDInput, state *MetricExportCloudwatchConfigState, opts ...ResourceOption) (*MetricExportCloudwatchConfig, error)
public static MetricExportCloudwatchConfig Get(string name, Input<string> id, MetricExportCloudwatchConfigState? state, CustomResourceOptions? opts = null)
public static MetricExportCloudwatchConfig get(String name, Output<String> id, MetricExportCloudwatchConfigState state, CustomResourceOptions options)
resources:  _:    type: cockroach:MetricExportCloudwatchConfig    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
ClusterId string
Cluster ID.
LogGroupName string
The customized AWS CloudWatch log group name.
RoleArn string
The IAM role used to upload metric segments to the target AWS account.
Status string
Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
TargetRegion string
The specific AWS region that the metrics will be exported to.
UserMessage string
Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.
ClusterId string
Cluster ID.
LogGroupName string
The customized AWS CloudWatch log group name.
RoleArn string
The IAM role used to upload metric segments to the target AWS account.
Status string
Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
TargetRegion string
The specific AWS region that the metrics will be exported to.
UserMessage string
Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.
clusterId String
Cluster ID.
logGroupName String
The customized AWS CloudWatch log group name.
roleArn String
The IAM role used to upload metric segments to the target AWS account.
status String
Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
targetRegion String
The specific AWS region that the metrics will be exported to.
userMessage String
Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.
clusterId string
Cluster ID.
logGroupName string
The customized AWS CloudWatch log group name.
roleArn string
The IAM role used to upload metric segments to the target AWS account.
status string
Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
targetRegion string
The specific AWS region that the metrics will be exported to.
userMessage string
Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.
cluster_id str
Cluster ID.
log_group_name str
The customized AWS CloudWatch log group name.
role_arn str
The IAM role used to upload metric segments to the target AWS account.
status str
Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
target_region str
The specific AWS region that the metrics will be exported to.
user_message str
Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.
clusterId String
Cluster ID.
logGroupName String
The customized AWS CloudWatch log group name.
roleArn String
The IAM role used to upload metric segments to the target AWS account.
status String
Encodes the possible states that a metric export configuration can be in as it is created, deployed, and disabled.
targetRegion String
The specific AWS region that the metrics will be exported to.
userMessage String
Elaborates on the metric export status and hints at how to fix issues that may have occurred during asynchronous operations.

Import

format:

$ pulumi import cockroach:index/metricExportCloudwatchConfig:MetricExportCloudwatchConfig example 1f69fdd2-600a-4cfc-a9ba-16995df0d77d
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
cockroach pulumiverse/pulumi-cockroach
License
Apache-2.0
Notes
This Pulumi package is based on the cockroach Terraform Provider.