Class MonitoringMetricDescriptor.Builder

    • Method Detail

      • connection

        @Stability(Experimental)
        public MonitoringMetricDescriptor.Builder connection​(com.hashicorp.cdktf.SSHProvisionerConnection connection)
        Parameters:
        connection - This parameter is required.
        Returns:
        this
      • connection

        @Stability(Experimental)
        public MonitoringMetricDescriptor.Builder connection​(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
        Parameters:
        connection - This parameter is required.
        Returns:
        this
      • count

        @Stability(Experimental)
        public MonitoringMetricDescriptor.Builder count​(com.hashicorp.cdktf.TerraformCount count)
        Parameters:
        count - This parameter is required.
        Returns:
        this
      • dependsOn

        @Stability(Experimental)
        public MonitoringMetricDescriptor.Builder dependsOn​(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
        Parameters:
        dependsOn - This parameter is required.
        Returns:
        this
      • forEach

        @Stability(Experimental)
        public MonitoringMetricDescriptor.Builder forEach​(com.hashicorp.cdktf.ITerraformIterator forEach)
        Parameters:
        forEach - This parameter is required.
        Returns:
        this
      • lifecycle

        @Stability(Experimental)
        public MonitoringMetricDescriptor.Builder lifecycle​(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
        Parameters:
        lifecycle - This parameter is required.
        Returns:
        this
      • provider

        @Stability(Experimental)
        public MonitoringMetricDescriptor.Builder provider​(com.hashicorp.cdktf.TerraformProvider provider)
        Parameters:
        provider - This parameter is required.
        Returns:
        this
      • description

        @Stability(Stable)
        public MonitoringMetricDescriptor.Builder description​(String description)
        A detailed description of the metric, which can be used in documentation.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_metric_descriptor#description MonitoringMetricDescriptor#description}

        Parameters:
        description - A detailed description of the metric, which can be used in documentation. This parameter is required.
        Returns:
        this
      • displayName

        @Stability(Stable)
        public MonitoringMetricDescriptor.Builder displayName​(String displayName)
        A concise name for the metric, which can be displayed in user interfaces.

        Use sentence case without an ending period, for example "Request count". Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_metric_descriptor#display_name MonitoringMetricDescriptor#display_name}

        Parameters:
        displayName - A concise name for the metric, which can be displayed in user interfaces. This parameter is required.
        Returns:
        this
      • metricKind

        @Stability(Stable)
        public MonitoringMetricDescriptor.Builder metricKind​(String metricKind)
        Whether the metric records instantaneous values, changes to a value, etc.

        Some combinations of metricKind and valueType might not be supported. Possible values: ["METRIC_KIND_UNSPECIFIED", "GAUGE", "DELTA", "CUMULATIVE"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_metric_descriptor#metric_kind MonitoringMetricDescriptor#metric_kind}

        Parameters:
        metricKind - Whether the metric records instantaneous values, changes to a value, etc. This parameter is required.
        Returns:
        this
      • type

        @Stability(Stable)
        public MonitoringMetricDescriptor.Builder type​(String type)
        The metric type, including its DNS name prefix.

        The type is not URL-encoded. All service defined metrics must be prefixed with the service name, in the format of {service name}/{relative metric name}, such as cloudsql.googleapis.com/database/cpu/utilization. The relative metric name must have only upper and lower-case letters, digits, '/' and underscores '_' are allowed. Additionally, the maximum number of characters allowed for the relative_metric_name is 100. All user-defined metric types have the DNS name custom.googleapis.com, external.googleapis.com, or logging.googleapis.com/user/. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_metric_descriptor#type MonitoringMetricDescriptor#type}

        Parameters:
        type - The metric type, including its DNS name prefix. This parameter is required.
        Returns:
        this
      • valueType

        @Stability(Stable)
        public MonitoringMetricDescriptor.Builder valueType​(String valueType)
        Whether the measurement is an integer, a floating-point number, etc.

        Some combinations of metricKind and valueType might not be supported. Possible values: ["BOOL", "INT64", "DOUBLE", "STRING", "DISTRIBUTION"] Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_metric_descriptor#value_type MonitoringMetricDescriptor#value_type}

        Parameters:
        valueType - Whether the measurement is an integer, a floating-point number, etc. This parameter is required.
        Returns:
        this
      • id

        @Stability(Stable)
        public MonitoringMetricDescriptor.Builder id​(String id)
        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_metric_descriptor#id MonitoringMetricDescriptor#id}.

        Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.

        Parameters:
        id - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_metric_descriptor#id MonitoringMetricDescriptor#id}. This parameter is required.
        Returns:
        this
      • labels

        @Stability(Stable)
        public MonitoringMetricDescriptor.Builder labels​(com.hashicorp.cdktf.IResolvable labels)
        labels block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_metric_descriptor#labels MonitoringMetricDescriptor#labels}

        Parameters:
        labels - labels block. This parameter is required.
        Returns:
        this
      • labels

        @Stability(Stable)
        public MonitoringMetricDescriptor.Builder labels​(List<? extends MonitoringMetricDescriptorLabels> labels)
        labels block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_metric_descriptor#labels MonitoringMetricDescriptor#labels}

        Parameters:
        labels - labels block. This parameter is required.
        Returns:
        this
      • launchStage

        @Stability(Stable)
        public MonitoringMetricDescriptor.Builder launchStage​(String launchStage)
        The launch stage of the metric definition. Possible values: ["LAUNCH_STAGE_UNSPECIFIED", "UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"].

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_metric_descriptor#launch_stage MonitoringMetricDescriptor#launch_stage}

        Parameters:
        launchStage - The launch stage of the metric definition. Possible values: ["LAUNCH_STAGE_UNSPECIFIED", "UNIMPLEMENTED", "PRELAUNCH", "EARLY_ACCESS", "ALPHA", "BETA", "GA", "DEPRECATED"]. This parameter is required.
        Returns:
        this
      • metadata

        @Stability(Stable)
        public MonitoringMetricDescriptor.Builder metadata​(MonitoringMetricDescriptorMetadata metadata)
        metadata block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_metric_descriptor#metadata MonitoringMetricDescriptor#metadata}

        Parameters:
        metadata - metadata block. This parameter is required.
        Returns:
        this
      • project

        @Stability(Stable)
        public MonitoringMetricDescriptor.Builder project​(String project)
        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_metric_descriptor#project MonitoringMetricDescriptor#project}.

        Parameters:
        project - Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_metric_descriptor#project MonitoringMetricDescriptor#project}. This parameter is required.
        Returns:
        this
      • timeouts

        @Stability(Stable)
        public MonitoringMetricDescriptor.Builder timeouts​(MonitoringMetricDescriptorTimeouts timeouts)
        timeouts block.

        Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_metric_descriptor#timeouts MonitoringMetricDescriptor#timeouts}

        Parameters:
        timeouts - timeouts block. This parameter is required.
        Returns:
        this
      • unit

        @Stability(Stable)
        public MonitoringMetricDescriptor.Builder unit​(String unit)
        The units in which the metric value is reported.

        It is only applicable if the valueType is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of the stored metric values. Different systems may scale the values to be more easily displayed (so a value of 0.02KBy might be displayed as 20By, and a value of 3523KBy might be displayed as 3.5MBy). However, if the unit is KBy, then the value of the metric is always in thousands of bytes, no matter how it may be displayed. If you want a custom metric to record the exact number of CPU-seconds used by a job, you can create an INT64 CUMULATIVE metric whose unit is s{CPU} (or equivalently 1s{CPU} or just s). If the job uses 12,005 CPU-seconds, then the value is written as 12005. Alternatively, if you want a custom metric to record data in a more granular way, you can create a DOUBLE CUMULATIVE metric whose unit is ks{CPU}, and then write the value 12.005 (which is 12005/1000), or use Kis{CPU} and write 11.723 (which is 12005/1024). The supported units are a subset of The Unified Code for Units of Measure standard. More info can be found in the API documentation (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors). Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/monitoring_metric_descriptor#unit MonitoringMetricDescriptor#unit}

        Parameters:
        unit - The units in which the metric value is reported. This parameter is required.
        Returns:
        this