Class LoggingMetricConfig.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.logging_metric.LoggingMetricConfig.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<LoggingMetricConfig>
- Enclosing interface:
- LoggingMetricConfig
@Stability(Stable) public static final class LoggingMetricConfig.Builder extends Object implements software.amazon.jsii.Builder<LoggingMetricConfig>
A builder forLoggingMetricConfig
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LoggingMetricConfig.BuilderbucketName(String bucketName)Sets the value ofLoggingMetricConfig.getBucketName()LoggingMetricConfig.BuilderbucketOptions(LoggingMetricBucketOptions bucketOptions)Sets the value ofLoggingMetricConfig.getBucketOptions()LoggingMetricConfigbuild()Builds the configured instance.LoggingMetricConfig.Builderconnection(com.hashicorp.cdktf.SSHProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()LoggingMetricConfig.Builderconnection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)Sets the value ofTerraformMetaArguments.getConnection()LoggingMetricConfig.Buildercount(com.hashicorp.cdktf.TerraformCount count)Sets the value ofTerraformMetaArguments.getCount()LoggingMetricConfig.Buildercount(Number count)Sets the value ofTerraformMetaArguments.getCount()LoggingMetricConfig.BuilderdependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)Sets the value ofTerraformMetaArguments.getDependsOn()LoggingMetricConfig.Builderdescription(String description)Sets the value ofLoggingMetricConfig.getDescription()LoggingMetricConfig.Builderdisabled(com.hashicorp.cdktf.IResolvable disabled)Sets the value ofLoggingMetricConfig.getDisabled()LoggingMetricConfig.Builderdisabled(Boolean disabled)Sets the value ofLoggingMetricConfig.getDisabled()LoggingMetricConfig.Builderfilter(String filter)Sets the value ofLoggingMetricConfig.getFilter()LoggingMetricConfig.BuilderforEach(com.hashicorp.cdktf.ITerraformIterator forEach)Sets the value ofTerraformMetaArguments.getForEach()LoggingMetricConfig.Builderid(String id)Sets the value ofLoggingMetricConfig.getId()LoggingMetricConfig.BuilderlabelExtractors(Map<String,String> labelExtractors)Sets the value ofLoggingMetricConfig.getLabelExtractors()LoggingMetricConfig.Builderlifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)Sets the value ofTerraformMetaArguments.getLifecycle()LoggingMetricConfig.BuildermetricDescriptor(LoggingMetricMetricDescriptor metricDescriptor)Sets the value ofLoggingMetricConfig.getMetricDescriptor()LoggingMetricConfig.Buildername(String name)Sets the value ofLoggingMetricConfig.getName()LoggingMetricConfig.Builderproject(String project)Sets the value ofLoggingMetricConfig.getProject()LoggingMetricConfig.Builderprovider(com.hashicorp.cdktf.TerraformProvider provider)Sets the value ofTerraformMetaArguments.getProvider()LoggingMetricConfig.Builderprovisioners(List<? extends Object> provisioners)Sets the value ofTerraformMetaArguments.getProvisioners()LoggingMetricConfig.Buildertimeouts(LoggingMetricTimeouts timeouts)Sets the value ofLoggingMetricConfig.getTimeouts()LoggingMetricConfig.BuildervalueExtractor(String valueExtractor)Sets the value ofLoggingMetricConfig.getValueExtractor()
-
-
-
Method Detail
-
filter
@Stability(Stable) public LoggingMetricConfig.Builder filter(String filter)
Sets the value ofLoggingMetricConfig.getFilter()- 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. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#filter LoggingMetric#filter}- Returns:
this
-
name
@Stability(Stable) public LoggingMetricConfig.Builder name(String name)
Sets the value ofLoggingMetricConfig.getName()- Parameters:
name- The client-assigned metric identifier. This parameter is required. 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}- Returns:
this
-
bucketName
@Stability(Stable) public LoggingMetricConfig.Builder bucketName(String bucketName)
Sets the value ofLoggingMetricConfig.getBucketName()- Parameters:
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}- Returns:
this
-
bucketOptions
@Stability(Stable) public LoggingMetricConfig.Builder bucketOptions(LoggingMetricBucketOptions bucketOptions)
Sets the value ofLoggingMetricConfig.getBucketOptions()- Parameters:
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}- Returns:
this
-
description
@Stability(Stable) public LoggingMetricConfig.Builder description(String description)
Sets the value ofLoggingMetricConfig.getDescription()- Parameters:
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}- Returns:
this
-
disabled
@Stability(Stable) public LoggingMetricConfig.Builder disabled(Boolean disabled)
Sets the value ofLoggingMetricConfig.getDisabled()- Parameters:
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}- Returns:
this
-
disabled
@Stability(Stable) public LoggingMetricConfig.Builder disabled(com.hashicorp.cdktf.IResolvable disabled)
Sets the value ofLoggingMetricConfig.getDisabled()- Parameters:
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}- Returns:
this
-
id
@Stability(Stable) public LoggingMetricConfig.Builder id(String id)
Sets the value ofLoggingMetricConfig.getId()- Parameters:
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.- Returns:
this
-
labelExtractors
@Stability(Stable) public LoggingMetricConfig.Builder labelExtractors(Map<String,String> labelExtractors)
Sets the value ofLoggingMetricConfig.getLabelExtractors()- 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. 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}- Returns:
this
-
metricDescriptor
@Stability(Stable) public LoggingMetricConfig.Builder metricDescriptor(LoggingMetricMetricDescriptor metricDescriptor)
Sets the value ofLoggingMetricConfig.getMetricDescriptor()- Parameters:
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}- Returns:
this
-
project
@Stability(Stable) public LoggingMetricConfig.Builder project(String project)
Sets the value ofLoggingMetricConfig.getProject()- Parameters:
project- Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/logging_metric#project LoggingMetric#project}.- Returns:
this
-
timeouts
@Stability(Stable) public LoggingMetricConfig.Builder timeouts(LoggingMetricTimeouts timeouts)
Sets the value ofLoggingMetricConfig.getTimeouts()- Parameters:
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}- Returns:
this
-
valueExtractor
@Stability(Stable) public LoggingMetricConfig.Builder valueExtractor(String valueExtractor)
Sets the value ofLoggingMetricConfig.getValueExtractor()- Parameters:
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}- Returns:
this
-
connection
@Stability(Experimental) public LoggingMetricConfig.Builder connection(com.hashicorp.cdktf.SSHProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
connection
@Stability(Experimental) public LoggingMetricConfig.Builder connection(com.hashicorp.cdktf.WinrmProvisionerConnection connection)
Sets the value ofTerraformMetaArguments.getConnection()- Parameters:
connection- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public LoggingMetricConfig.Builder count(Number count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
count
@Stability(Experimental) public LoggingMetricConfig.Builder count(com.hashicorp.cdktf.TerraformCount count)
Sets the value ofTerraformMetaArguments.getCount()- Parameters:
count- the value to be set.- Returns:
this
-
dependsOn
@Stability(Experimental) public LoggingMetricConfig.Builder dependsOn(List<? extends com.hashicorp.cdktf.ITerraformDependable> dependsOn)
Sets the value ofTerraformMetaArguments.getDependsOn()- Parameters:
dependsOn- the value to be set.- Returns:
this
-
forEach
@Stability(Experimental) public LoggingMetricConfig.Builder forEach(com.hashicorp.cdktf.ITerraformIterator forEach)
Sets the value ofTerraformMetaArguments.getForEach()- Parameters:
forEach- the value to be set.- Returns:
this
-
lifecycle
@Stability(Experimental) public LoggingMetricConfig.Builder lifecycle(com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle)
Sets the value ofTerraformMetaArguments.getLifecycle()- Parameters:
lifecycle- the value to be set.- Returns:
this
-
provider
@Stability(Experimental) public LoggingMetricConfig.Builder provider(com.hashicorp.cdktf.TerraformProvider provider)
Sets the value ofTerraformMetaArguments.getProvider()- Parameters:
provider- the value to be set.- Returns:
this
-
provisioners
@Stability(Experimental) public LoggingMetricConfig.Builder provisioners(List<? extends Object> provisioners)
Sets the value ofTerraformMetaArguments.getProvisioners()- Parameters:
provisioners- the value to be set.- Returns:
this
-
build
@Stability(Stable) public LoggingMetricConfig build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LoggingMetricConfig>- Returns:
- a new instance of
LoggingMetricConfig - Throws:
NullPointerException- if any required attribute was not provided
-
-