Class ComputeAutoscalerAutoscalingPolicyMetric.Builder
- java.lang.Object
-
- com.hashicorp.cdktf.providers.google.compute_autoscaler.ComputeAutoscalerAutoscalingPolicyMetric.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ComputeAutoscalerAutoscalingPolicyMetric>
- Enclosing interface:
- ComputeAutoscalerAutoscalingPolicyMetric
@Stability(Stable) public static final class ComputeAutoscalerAutoscalingPolicyMetric.Builder extends Object implements software.amazon.jsii.Builder<ComputeAutoscalerAutoscalingPolicyMetric>
A builder forComputeAutoscalerAutoscalingPolicyMetric
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComputeAutoscalerAutoscalingPolicyMetricbuild()Builds the configured instance.ComputeAutoscalerAutoscalingPolicyMetric.Buildername(String name)Sets the value ofComputeAutoscalerAutoscalingPolicyMetric.getName()ComputeAutoscalerAutoscalingPolicyMetric.Buildertarget(Number target)Sets the value ofComputeAutoscalerAutoscalingPolicyMetric.getTarget()ComputeAutoscalerAutoscalingPolicyMetric.Buildertype(String type)Sets the value ofComputeAutoscalerAutoscalingPolicyMetric.getType()
-
-
-
Method Detail
-
name
@Stability(Stable) public ComputeAutoscalerAutoscalingPolicyMetric.Builder name(String name)
Sets the value ofComputeAutoscalerAutoscalingPolicyMetric.getName()- Parameters:
name- The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. This parameter is required. The metric must have a value type of INT64 or DOUBLE. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_autoscaler#name ComputeAutoscaler#name}- Returns:
this
-
target
@Stability(Stable) public ComputeAutoscalerAutoscalingPolicyMetric.Builder target(Number target)
Sets the value ofComputeAutoscalerAutoscalingPolicyMetric.getTarget()- Parameters:
target- The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric. For example, a good metric to use as a utilizationTarget is www.googleapis.com/compute/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_autoscaler#target ComputeAutoscaler#target}- Returns:
this
-
type
@Stability(Stable) public ComputeAutoscalerAutoscalingPolicyMetric.Builder type(String type)
Sets the value ofComputeAutoscalerAutoscalingPolicyMetric.getType()- Parameters:
type- Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Possible values: ["GAUGE", "DELTA_PER_SECOND", "DELTA_PER_MINUTE"]. Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/5.43.1/docs/resources/compute_autoscaler#type ComputeAutoscaler#type}- Returns:
this
-
build
@Stability(Stable) public ComputeAutoscalerAutoscalingPolicyMetric build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ComputeAutoscalerAutoscalingPolicyMetric>- Returns:
- a new instance of
ComputeAutoscalerAutoscalingPolicyMetric - Throws:
NullPointerException- if any required attribute was not provided
-
-