UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

531 lines (530 loc) 27.3 kB
/** * Copyright (c) HashiCorp, Inc. * SPDX-License-Identifier: MPL-2.0 */ import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; export interface LoggingMetricConfig extends cdktf.TerraformMetaArguments { /** * 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/6.13.0/docs/resources/logging_metric#bucket_name LoggingMetric#bucket_name} */ readonly bucketName?: string; /** * 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/6.13.0/docs/resources/logging_metric#description LoggingMetric#description} */ readonly description?: string; /** * 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/6.13.0/docs/resources/logging_metric#disabled LoggingMetric#disabled} */ readonly disabled?: boolean | cdktf.IResolvable; /** * 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/6.13.0/docs/resources/logging_metric#filter LoggingMetric#filter} */ readonly filter: string; /** * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/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. */ readonly id?: string; /** * 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/6.13.0/docs/resources/logging_metric#label_extractors LoggingMetric#label_extractors} */ readonly labelExtractors?: { [key: string]: string; }; /** * 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/6.13.0/docs/resources/logging_metric#name LoggingMetric#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#project LoggingMetric#project} */ readonly project?: string; /** * 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/6.13.0/docs/resources/logging_metric#value_extractor LoggingMetric#value_extractor} */ readonly valueExtractor?: string; /** * bucket_options block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#bucket_options LoggingMetric#bucket_options} */ readonly bucketOptions?: LoggingMetricBucketOptions; /** * metric_descriptor block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#metric_descriptor LoggingMetric#metric_descriptor} */ readonly metricDescriptor?: LoggingMetricMetricDescriptor; /** * timeouts block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#timeouts LoggingMetric#timeouts} */ readonly timeouts?: LoggingMetricTimeouts; } export interface LoggingMetricBucketOptionsExplicitBuckets { /** * The values must be monotonically increasing. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#bounds LoggingMetric#bounds} */ readonly bounds: number[]; } export declare function loggingMetricBucketOptionsExplicitBucketsToTerraform(struct?: LoggingMetricBucketOptionsExplicitBucketsOutputReference | LoggingMetricBucketOptionsExplicitBuckets): any; export declare function loggingMetricBucketOptionsExplicitBucketsToHclTerraform(struct?: LoggingMetricBucketOptionsExplicitBucketsOutputReference | LoggingMetricBucketOptionsExplicitBuckets): any; export declare class LoggingMetricBucketOptionsExplicitBucketsOutputReference extends cdktf.ComplexObject { private isEmptyObject; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string); get internalValue(): LoggingMetricBucketOptionsExplicitBuckets | undefined; set internalValue(value: LoggingMetricBucketOptionsExplicitBuckets | undefined); private _bounds?; get bounds(): number[]; set bounds(value: number[]); get boundsInput(): number[] | undefined; } export interface LoggingMetricBucketOptionsExponentialBuckets { /** * Must be greater than 1. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#growth_factor LoggingMetric#growth_factor} */ readonly growthFactor: number; /** * Must be greater than 0. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#num_finite_buckets LoggingMetric#num_finite_buckets} */ readonly numFiniteBuckets: number; /** * Must be greater than 0. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#scale LoggingMetric#scale} */ readonly scale: number; } export declare function loggingMetricBucketOptionsExponentialBucketsToTerraform(struct?: LoggingMetricBucketOptionsExponentialBucketsOutputReference | LoggingMetricBucketOptionsExponentialBuckets): any; export declare function loggingMetricBucketOptionsExponentialBucketsToHclTerraform(struct?: LoggingMetricBucketOptionsExponentialBucketsOutputReference | LoggingMetricBucketOptionsExponentialBuckets): any; export declare class LoggingMetricBucketOptionsExponentialBucketsOutputReference extends cdktf.ComplexObject { private isEmptyObject; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string); get internalValue(): LoggingMetricBucketOptionsExponentialBuckets | undefined; set internalValue(value: LoggingMetricBucketOptionsExponentialBuckets | undefined); private _growthFactor?; get growthFactor(): number; set growthFactor(value: number); get growthFactorInput(): number | undefined; private _numFiniteBuckets?; get numFiniteBuckets(): number; set numFiniteBuckets(value: number); get numFiniteBucketsInput(): number | undefined; private _scale?; get scale(): number; set scale(value: number); get scaleInput(): number | undefined; } export interface LoggingMetricBucketOptionsLinearBuckets { /** * Must be greater than 0. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#num_finite_buckets LoggingMetric#num_finite_buckets} */ readonly numFiniteBuckets: number; /** * Lower bound of the first bucket. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#offset LoggingMetric#offset} */ readonly offset: number; /** * Must be greater than 0. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#width LoggingMetric#width} */ readonly width: number; } export declare function loggingMetricBucketOptionsLinearBucketsToTerraform(struct?: LoggingMetricBucketOptionsLinearBucketsOutputReference | LoggingMetricBucketOptionsLinearBuckets): any; export declare function loggingMetricBucketOptionsLinearBucketsToHclTerraform(struct?: LoggingMetricBucketOptionsLinearBucketsOutputReference | LoggingMetricBucketOptionsLinearBuckets): any; export declare class LoggingMetricBucketOptionsLinearBucketsOutputReference extends cdktf.ComplexObject { private isEmptyObject; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string); get internalValue(): LoggingMetricBucketOptionsLinearBuckets | undefined; set internalValue(value: LoggingMetricBucketOptionsLinearBuckets | undefined); private _numFiniteBuckets?; get numFiniteBuckets(): number; set numFiniteBuckets(value: number); get numFiniteBucketsInput(): number | undefined; private _offset?; get offset(): number; set offset(value: number); get offsetInput(): number | undefined; private _width?; get width(): number; set width(value: number); get widthInput(): number | undefined; } export interface LoggingMetricBucketOptions { /** * explicit_buckets block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#explicit_buckets LoggingMetric#explicit_buckets} */ readonly explicitBuckets?: LoggingMetricBucketOptionsExplicitBuckets; /** * exponential_buckets block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#exponential_buckets LoggingMetric#exponential_buckets} */ readonly exponentialBuckets?: LoggingMetricBucketOptionsExponentialBuckets; /** * linear_buckets block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#linear_buckets LoggingMetric#linear_buckets} */ readonly linearBuckets?: LoggingMetricBucketOptionsLinearBuckets; } export declare function loggingMetricBucketOptionsToTerraform(struct?: LoggingMetricBucketOptionsOutputReference | LoggingMetricBucketOptions): any; export declare function loggingMetricBucketOptionsToHclTerraform(struct?: LoggingMetricBucketOptionsOutputReference | LoggingMetricBucketOptions): any; export declare class LoggingMetricBucketOptionsOutputReference extends cdktf.ComplexObject { private isEmptyObject; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string); get internalValue(): LoggingMetricBucketOptions | undefined; set internalValue(value: LoggingMetricBucketOptions | undefined); private _explicitBuckets; get explicitBuckets(): LoggingMetricBucketOptionsExplicitBucketsOutputReference; putExplicitBuckets(value: LoggingMetricBucketOptionsExplicitBuckets): void; resetExplicitBuckets(): void; get explicitBucketsInput(): LoggingMetricBucketOptionsExplicitBuckets | undefined; private _exponentialBuckets; get exponentialBuckets(): LoggingMetricBucketOptionsExponentialBucketsOutputReference; putExponentialBuckets(value: LoggingMetricBucketOptionsExponentialBuckets): void; resetExponentialBuckets(): void; get exponentialBucketsInput(): LoggingMetricBucketOptionsExponentialBuckets | undefined; private _linearBuckets; get linearBuckets(): LoggingMetricBucketOptionsLinearBucketsOutputReference; putLinearBuckets(value: LoggingMetricBucketOptionsLinearBuckets): void; resetLinearBuckets(): void; get linearBucketsInput(): LoggingMetricBucketOptionsLinearBuckets | undefined; } export interface LoggingMetricMetricDescriptorLabels { /** * A human-readable description for the label. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#description LoggingMetric#description} */ readonly description?: string; /** * The label key. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#key LoggingMetric#key} */ readonly key: string; /** * The type of data that can be assigned to the label. Default value: "STRING" Possible values: ["BOOL", "INT64", "STRING"] * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#value_type LoggingMetric#value_type} */ readonly valueType?: string; } export declare function loggingMetricMetricDescriptorLabelsToTerraform(struct?: LoggingMetricMetricDescriptorLabels | cdktf.IResolvable): any; export declare function loggingMetricMetricDescriptorLabelsToHclTerraform(struct?: LoggingMetricMetricDescriptorLabels | cdktf.IResolvable): any; export declare class LoggingMetricMetricDescriptorLabelsOutputReference extends cdktf.ComplexObject { private isEmptyObject; private resolvableValue?; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean); get internalValue(): LoggingMetricMetricDescriptorLabels | cdktf.IResolvable | undefined; set internalValue(value: LoggingMetricMetricDescriptorLabels | cdktf.IResolvable | undefined); private _description?; get description(): string; set description(value: string); resetDescription(): void; get descriptionInput(): string | undefined; private _key?; get key(): string; set key(value: string); get keyInput(): string | undefined; private _valueType?; get valueType(): string; set valueType(value: string); resetValueType(): void; get valueTypeInput(): string | undefined; } export declare class LoggingMetricMetricDescriptorLabelsList extends cdktf.ComplexList { protected terraformResource: cdktf.IInterpolatingParent; protected terraformAttribute: string; protected wrapsSet: boolean; internalValue?: LoggingMetricMetricDescriptorLabels[] | cdktf.IResolvable; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean); /** * @param index the index of the item to return */ get(index: number): LoggingMetricMetricDescriptorLabelsOutputReference; } export interface LoggingMetricMetricDescriptor { /** * A concise name for the metric, which can be displayed in user interfaces. Use sentence case * without an ending period, for example "Request count". This field is optional but it is * recommended to be set for any metrics associated with user-visible concepts, such as Quota. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#display_name LoggingMetric#display_name} */ readonly displayName?: string; /** * Whether the metric records instantaneous values, changes to a value, etc. * Some combinations of metricKind and valueType might not be supported. * For counter metrics, set this to DELTA. Possible values: ["DELTA", "GAUGE", "CUMULATIVE"] * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#metric_kind LoggingMetric#metric_kind} */ readonly metricKind: string; /** * The unit in which the metric value is reported. It is only applicable if the valueType is * 'INT64', 'DOUBLE', or 'DISTRIBUTION'. The supported units are a subset of * [The Unified Code for Units of Measure](http://unitsofmeasure.org/ucum.html) standard * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#unit LoggingMetric#unit} */ readonly unit?: string; /** * Whether the measurement is an integer, a floating-point number, etc. * Some combinations of metricKind and valueType might not be supported. * For counter metrics, set this to INT64. Possible values: ["BOOL", "INT64", "DOUBLE", "STRING", "DISTRIBUTION", "MONEY"] * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#value_type LoggingMetric#value_type} */ readonly valueType: string; /** * labels block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#labels LoggingMetric#labels} */ readonly labels?: LoggingMetricMetricDescriptorLabels[] | cdktf.IResolvable; } export declare function loggingMetricMetricDescriptorToTerraform(struct?: LoggingMetricMetricDescriptorOutputReference | LoggingMetricMetricDescriptor): any; export declare function loggingMetricMetricDescriptorToHclTerraform(struct?: LoggingMetricMetricDescriptorOutputReference | LoggingMetricMetricDescriptor): any; export declare class LoggingMetricMetricDescriptorOutputReference extends cdktf.ComplexObject { private isEmptyObject; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string); get internalValue(): LoggingMetricMetricDescriptor | undefined; set internalValue(value: LoggingMetricMetricDescriptor | undefined); private _displayName?; get displayName(): string; set displayName(value: string); resetDisplayName(): void; get displayNameInput(): string | undefined; private _metricKind?; get metricKind(): string; set metricKind(value: string); get metricKindInput(): string | undefined; private _unit?; get unit(): string; set unit(value: string); resetUnit(): void; get unitInput(): string | undefined; private _valueType?; get valueType(): string; set valueType(value: string); get valueTypeInput(): string | undefined; private _labels; get labels(): LoggingMetricMetricDescriptorLabelsList; putLabels(value: LoggingMetricMetricDescriptorLabels[] | cdktf.IResolvable): void; resetLabels(): void; get labelsInput(): cdktf.IResolvable | LoggingMetricMetricDescriptorLabels[] | undefined; } export interface LoggingMetricTimeouts { /** * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#create LoggingMetric#create} */ readonly create?: string; /** * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#delete LoggingMetric#delete} */ readonly delete?: string; /** * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#update LoggingMetric#update} */ readonly update?: string; } export declare function loggingMetricTimeoutsToTerraform(struct?: LoggingMetricTimeouts | cdktf.IResolvable): any; export declare function loggingMetricTimeoutsToHclTerraform(struct?: LoggingMetricTimeouts | cdktf.IResolvable): any; export declare class LoggingMetricTimeoutsOutputReference extends cdktf.ComplexObject { private isEmptyObject; private resolvableValue?; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string); get internalValue(): LoggingMetricTimeouts | cdktf.IResolvable | undefined; set internalValue(value: LoggingMetricTimeouts | cdktf.IResolvable | undefined); private _create?; get create(): string; set create(value: string); resetCreate(): void; get createInput(): string | undefined; private _delete?; get delete(): string; set delete(value: string); resetDelete(): void; get deleteInput(): string | undefined; private _update?; get update(): string; set update(value: string); resetUpdate(): void; get updateInput(): string | undefined; } /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric google_logging_metric} */ export declare class LoggingMetric extends cdktf.TerraformResource { static readonly tfResourceType = "google_logging_metric"; /** * Generates CDKTF code for importing a LoggingMetric resource upon running "cdktf plan <stack-name>" * @param scope The scope in which to define this construct * @param importToId The construct id used in the generated config for the LoggingMetric to import * @param importFromId The id of the existing LoggingMetric that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the LoggingMetric to import is found */ static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktf.TerraformProvider): cdktf.ImportableResource; /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/logging_metric google_logging_metric} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options LoggingMetricConfig */ constructor(scope: Construct, id: string, config: LoggingMetricConfig); private _bucketName?; get bucketName(): string; set bucketName(value: string); resetBucketName(): void; get bucketNameInput(): string | undefined; private _description?; get description(): string; set description(value: string); resetDescription(): void; get descriptionInput(): string | undefined; private _disabled?; get disabled(): boolean | cdktf.IResolvable; set disabled(value: boolean | cdktf.IResolvable); resetDisabled(): void; get disabledInput(): boolean | cdktf.IResolvable | undefined; private _filter?; get filter(): string; set filter(value: string); get filterInput(): string | undefined; private _id?; get id(): string; set id(value: string); resetId(): void; get idInput(): string | undefined; private _labelExtractors?; get labelExtractors(): { [key: string]: string; }; set labelExtractors(value: { [key: string]: string; }); resetLabelExtractors(): void; get labelExtractorsInput(): { [key: string]: string; } | undefined; private _name?; get name(): string; set name(value: string); get nameInput(): string | undefined; private _project?; get project(): string; set project(value: string); resetProject(): void; get projectInput(): string | undefined; private _valueExtractor?; get valueExtractor(): string; set valueExtractor(value: string); resetValueExtractor(): void; get valueExtractorInput(): string | undefined; private _bucketOptions; get bucketOptions(): LoggingMetricBucketOptionsOutputReference; putBucketOptions(value: LoggingMetricBucketOptions): void; resetBucketOptions(): void; get bucketOptionsInput(): LoggingMetricBucketOptions | undefined; private _metricDescriptor; get metricDescriptor(): LoggingMetricMetricDescriptorOutputReference; putMetricDescriptor(value: LoggingMetricMetricDescriptor): void; resetMetricDescriptor(): void; get metricDescriptorInput(): LoggingMetricMetricDescriptor | undefined; private _timeouts; get timeouts(): LoggingMetricTimeoutsOutputReference; putTimeouts(value: LoggingMetricTimeouts): void; resetTimeouts(): void; get timeoutsInput(): cdktf.IResolvable | LoggingMetricTimeouts | undefined; protected synthesizeAttributes(): { [name: string]: any; }; protected synthesizeHclAttributes(): { [name: string]: any; }; }