1. Packages
  2. CockroachDB Cloud
  3. API Docs
  4. MetricExportCloudwatchConfig
CockroachDB v0.6.0 published on Friday, Nov 1, 2024 by pulumiverse

cockroach.MetricExportCloudwatchConfig

Explore with Pulumi AI

cockroach logo
CockroachDB v0.6.0 published on Friday, Nov 1, 2024 by pulumiverse

    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,
    });
    
    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)
    
    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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    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}
    

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

    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 string
    Cluster ID.
    RoleArn 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 string
    Cluster ID.
    RoleArn 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 String
    Cluster ID.
    roleArn 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 string
    Cluster ID.
    roleArn 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 str
    Cluster ID.
    role_arn 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 String
    Cluster ID.
    roleArn 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)
    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.
    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.

    Package Details

    Repository
    cockroach pulumiverse/pulumi-cockroach
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cockroach Terraform Provider.
    cockroach logo
    CockroachDB v0.6.0 published on Friday, Nov 1, 2024 by pulumiverse