Class LoggingMetric.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.logging_metric.LoggingMetric.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<LoggingMetric>
- Enclosing class:
- LoggingMetric
@Stability(Stable) public static final class LoggingMetric.Builder extends Object implements software.amazon.jsii.Builder<LoggingMetric>
A fluent builder forLoggingMetric.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LoggingMetric.BuilderbucketName(String bucketName)The resource name of the Log Bucket that owns the Log Metric.LoggingMetric.BuilderbucketOptions(LoggingMetricBucketOptions bucketOptions)bucket_options block.LoggingMetricbuild()LoggingMetric.Builderconnection(com.hashicorp.cdktf.SSHProvisionerConnection connection)LoggingMetric.Builderconnection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)LoggingMetric.Buildercount(com.hashicorp.cdktf.TerraformCount count)LoggingMetric.Buildercount(Number count)static LoggingMetric.Buildercreate(software.constructs.Construct scope, String id)LoggingMetric.BuilderdependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)LoggingMetric.Builderdescription(String description)A description of this metric, which is used in documentation.LoggingMetric.Builderdisabled(com.hashicorp.cdktf.IResolvable disabled)If set to True, then this metric is disabled and it does not generate any points.LoggingMetric.Builderdisabled(Boolean disabled)If set to True, then this metric is disabled and it does not generate any points.LoggingMetric.Builderfilter(String filter)An advanced logs filter (https://cloud.google.com/logging/docs/view/advanced-filters) which is used to match log entries.LoggingMetric.BuilderforEach(com.hashicorp.cdktf.ITerraformIterator forEach)LoggingMetric.Builderid(String id)Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#id LoggingMetric#id}.LoggingMetric.BuilderlabelExtractors(Map<String,String> labelExtractors)A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value.LoggingMetric.Builderlifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)LoggingMetric.BuildermetricDescriptor(LoggingMetricMetricDescriptor metricDescriptor)metric_descriptor block.LoggingMetric.Buildername(String name)The client-assigned metric identifier.LoggingMetric.Builderproject(String project)Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#project LoggingMetric#project}.LoggingMetric.Builderprovider(com.hashicorp.cdktf.TerraformProvider provider)LoggingMetric.Builderprovisioners(List<? extends Object> provisioners)LoggingMetric.Buildertimeouts(LoggingMetricTimeouts timeouts)timeouts block.LoggingMetric.BuildervalueExtractor(String valueExtractor)A valueExtractor is required when using a distribution logs-based metric to extract the values to record from a log entry.
-
-
-
Method Detail
-
create
@Stability(Stable) public static LoggingMetric.Builder create(software.constructs.Construct scope, String id)
- Parameters:
scope- The scope in which to define this construct. This parameter is required.id- The scoped construct ID. This parameter is required.- Returns:
- a new instance of
LoggingMetric.Builder.
-
connection
@Stability(Experimental) public LoggingMetric.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
- Parameters:
connection- This parameter is required.- Returns:
this
-
connection
@Stability(Experimental) public LoggingMetric.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
- Parameters:
connection- This parameter is required.- Returns:
this
-
count
@Stability(Experimental) public LoggingMetric.Builder count(Number count)
- Parameters:
count- This parameter is required.- Returns:
this
-
count
@Stability(Experimental) public LoggingMetric.Builder count(com.hashicorp.cdktf.TerraformCount count)
- Parameters:
count- This parameter is required.- Returns:
this
-
dependsOn
@Stability(Experimental) public LoggingMetric.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
- Parameters:
dependsOn- This parameter is required.- Returns:
this
-
forEach
@Stability(Experimental) public LoggingMetric.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
- Parameters:
forEach- This parameter is required.- Returns:
this
-
lifecycle
@Stability(Experimental) public LoggingMetric.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
- Parameters:
lifecycle- This parameter is required.- Returns:
this
-
provider
@Stability(Experimental) public LoggingMetric.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
- Parameters:
provider- This parameter is required.- Returns:
this
-
provisioners
@Stability(Experimental) public LoggingMetric.Builder provisioners(List<? extends Object> provisioners)
- Parameters:
provisioners- This parameter is required.- Returns:
this
-
filter
@Stability(Stable) public LoggingMetric.Builder filter(String filter)
An advanced logs filter (https://cloud.google.com/logging/docs/view/advanced-filters) which is used to match log entries.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#filter LoggingMetric#filter}
- Parameters:
filter- An advanced logs filter (https://cloud.google.com/logging/docs/view/advanced-filters) which is used to match log entries. This parameter is required.- Returns:
this
-
name
@Stability(Stable) public LoggingMetric.Builder name(String name)
The client-assigned metric identifier.Examples - "error_count", "nginx/requests". Metric identifiers are limited to 100 characters and can include only the following characters A-Z, a-z, 0-9, and the special characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#name LoggingMetric#name}
- Parameters:
name- The client-assigned metric identifier. This parameter is required.- Returns:
this
-
bucketName
@Stability(Stable) public LoggingMetric.Builder bucketName(String bucketName)
The resource name of the Log Bucket that owns the Log Metric.Only Log Buckets in projects are supported. The bucket has to be in the same project as the metric. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#bucket_name LoggingMetric#bucket_name}
- Parameters:
bucketName- The resource name of the Log Bucket that owns the Log Metric. This parameter is required.- Returns:
this
-
bucketOptions
@Stability(Stable) public LoggingMetric.Builder bucketOptions(LoggingMetricBucketOptions bucketOptions)
bucket_options block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#bucket_options LoggingMetric#bucket_options}
- Parameters:
bucketOptions- bucket_options block. This parameter is required.- Returns:
this
-
description
@Stability(Stable) public LoggingMetric.Builder description(String description)
A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#description LoggingMetric#description}
- Parameters:
description- A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters. This parameter is required.- Returns:
this
-
disabled
@Stability(Stable) public LoggingMetric.Builder disabled(Boolean disabled)
If set to True, then this metric is disabled and it does not generate any points.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#disabled LoggingMetric#disabled}
- Parameters:
disabled- If set to True, then this metric is disabled and it does not generate any points. This parameter is required.- Returns:
this
-
disabled
@Stability(Stable) public LoggingMetric.Builder disabled(com.hashicorp.cdktf.IResolvable disabled)
If set to True, then this metric is disabled and it does not generate any points.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#disabled LoggingMetric#disabled}
- Parameters:
disabled- If set to True, then this metric is disabled and it does not generate any points. This parameter is required.- Returns:
this
-
id
@Stability(Stable) public LoggingMetric.Builder id(String id)
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#id LoggingMetric#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/logging_metric#id LoggingMetric#id}. This parameter is required.- Returns:
this
-
labelExtractors
@Stability(Stable) public LoggingMetric.Builder labelExtractors(Map<String,String> labelExtractors)
A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value.Each label key specified in the LabelDescriptor must have an associated extractor expression in this map. The syntax of the extractor expression is the same as for the valueExtractor field. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#label_extractors LoggingMetric#label_extractors}
- Parameters:
labelExtractors- A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value. This parameter is required.- Returns:
this
-
metricDescriptor
@Stability(Stable) public LoggingMetric.Builder metricDescriptor(LoggingMetricMetricDescriptor metricDescriptor)
metric_descriptor block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#metric_descriptor LoggingMetric#metric_descriptor}
- Parameters:
metricDescriptor- metric_descriptor block. This parameter is required.- Returns:
this
-
project
@Stability(Stable) public LoggingMetric.Builder project(String project)
Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#project LoggingMetric#project}.- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#project LoggingMetric#project}. This parameter is required.- Returns:
this
-
timeouts
@Stability(Stable) public LoggingMetric.Builder timeouts(LoggingMetricTimeouts timeouts)
timeouts block.Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#timeouts LoggingMetric#timeouts}
- Parameters:
timeouts- timeouts block. This parameter is required.- Returns:
this
-
valueExtractor
@Stability(Stable) public LoggingMetric.Builder valueExtractor(String valueExtractor)
A valueExtractor is required when using a distribution logs-based metric to extract the values to record from a log entry.Two functions are supported for value extraction - EXTRACT(field) or REGEXP_EXTRACT(field, regex). The argument are 1. field - The name of the log entry field from which the value is to be extracted. 2. regex - A regular expression using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax) with a single capture group to extract data from the specified log entry field. The value of the field is converted to a string before applying the regex. It is an error to specify a regex that does not include exactly one capture group. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#value_extractor LoggingMetric#value_extractor}
- Parameters:
valueExtractor- A valueExtractor is required when using a distribution logs-based metric to extract the values to record from a log entry. This parameter is required.- Returns:
this
-
build
@Stability(Stable) public LoggingMetric build()
- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LoggingMetric>- Returns:
- a newly built instance of
LoggingMetric.
-
-