All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.compute.model.AutoscalingPolicy.html Maven / Gradle / Ivy

The newest version!






AutoscalingPolicy (Compute Engine API v1-rev20250320-2.0.0)












com.google.api.services.compute.model

Class AutoscalingPolicy

    • Constructor Detail

      • AutoscalingPolicy

        public AutoscalingPolicy()
    • Method Detail

      • getCoolDownPeriodSec

        public Integer getCoolDownPeriodSec()
        The number of seconds that your application takes to initialize on a VM instance. This is referred to as the [initialization period](/compute/docs/autoscaler#cool_down_period). Specifying an accurate initialization period improves autoscaler decisions. For example, when scaling out, the autoscaler ignores data from VMs that are still initializing because those VMs might not yet represent normal usage of your application. The default initialization period is 60 seconds. Initialization periods might vary because of numerous factors. We recommend that you test how long your application takes to initialize. To do this, create a VM and time your application's startup process.
        Returns:
        value or null for none
      • setCoolDownPeriodSec

        public AutoscalingPolicy setCoolDownPeriodSec(Integer coolDownPeriodSec)
        The number of seconds that your application takes to initialize on a VM instance. This is referred to as the [initialization period](/compute/docs/autoscaler#cool_down_period). Specifying an accurate initialization period improves autoscaler decisions. For example, when scaling out, the autoscaler ignores data from VMs that are still initializing because those VMs might not yet represent normal usage of your application. The default initialization period is 60 seconds. Initialization periods might vary because of numerous factors. We recommend that you test how long your application takes to initialize. To do this, create a VM and time your application's startup process.
        Parameters:
        coolDownPeriodSec - coolDownPeriodSec or null for none
      • getCpuUtilization

        public AutoscalingPolicyCpuUtilization getCpuUtilization()
        Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
        Returns:
        value or null for none
      • setCpuUtilization

        public AutoscalingPolicy setCpuUtilization(AutoscalingPolicyCpuUtilization cpuUtilization)
        Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
        Parameters:
        cpuUtilization - cpuUtilization or null for none
      • setCustomMetricUtilizations

        public AutoscalingPolicy setCustomMetricUtilizations(List<AutoscalingPolicyCustomMetricUtilization> customMetricUtilizations)
        Configuration parameters of autoscaling based on a custom metric.
        Parameters:
        customMetricUtilizations - customMetricUtilizations or null for none
      • getLoadBalancingUtilization

        public AutoscalingPolicyLoadBalancingUtilization getLoadBalancingUtilization()
        Configuration parameters of autoscaling based on load balancer.
        Returns:
        value or null for none
      • setLoadBalancingUtilization

        public AutoscalingPolicy setLoadBalancingUtilization(AutoscalingPolicyLoadBalancingUtilization loadBalancingUtilization)
        Configuration parameters of autoscaling based on load balancer.
        Parameters:
        loadBalancingUtilization - loadBalancingUtilization or null for none
      • getMaxNumReplicas

        public Integer getMaxNumReplicas()
        The maximum number of instances that the autoscaler can scale out to. This is required when creating or updating an autoscaler. The maximum number of replicas must not be lower than minimal number of replicas.
        Returns:
        value or null for none
      • setMaxNumReplicas

        public AutoscalingPolicy setMaxNumReplicas(Integer maxNumReplicas)
        The maximum number of instances that the autoscaler can scale out to. This is required when creating or updating an autoscaler. The maximum number of replicas must not be lower than minimal number of replicas.
        Parameters:
        maxNumReplicas - maxNumReplicas or null for none
      • getMinNumReplicas

        public Integer getMinNumReplicas()
        The minimum number of replicas that the autoscaler can scale in to. This cannot be less than 0. If not provided, autoscaler chooses a default value depending on maximum number of instances allowed.
        Returns:
        value or null for none
      • setMinNumReplicas

        public AutoscalingPolicy setMinNumReplicas(Integer minNumReplicas)
        The minimum number of replicas that the autoscaler can scale in to. This cannot be less than 0. If not provided, autoscaler chooses a default value depending on maximum number of instances allowed.
        Parameters:
        minNumReplicas - minNumReplicas or null for none
      • getMode

        public String getMode()
        Defines the operating mode for this policy. The following modes are available: - OFF: Disables the autoscaler but maintains its configuration. - ONLY_SCALE_OUT: Restricts the autoscaler to add VM instances only. - ON: Enables all autoscaler activities according to its policy. For more information, see "Turning off or restricting an autoscaler"
        Returns:
        value or null for none
      • setMode

        public AutoscalingPolicy setMode(String mode)
        Defines the operating mode for this policy. The following modes are available: - OFF: Disables the autoscaler but maintains its configuration. - ONLY_SCALE_OUT: Restricts the autoscaler to add VM instances only. - ON: Enables all autoscaler activities according to its policy. For more information, see "Turning off or restricting an autoscaler"
        Parameters:
        mode - mode or null for none
      • getScalingSchedules

        public Map<String,AutoscalingPolicyScalingSchedule> getScalingSchedules()
        Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler, and they can overlap. During overlapping periods the greatest min_required_replicas of all scaling schedules is applied. Up to 128 scaling schedules are allowed.
        Returns:
        value or null for none
      • setScalingSchedules

        public AutoscalingPolicy setScalingSchedules(Map<String,AutoscalingPolicyScalingSchedule> scalingSchedules)
        Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler, and they can overlap. During overlapping periods the greatest min_required_replicas of all scaling schedules is applied. Up to 128 scaling schedules are allowed.
        Parameters:
        scalingSchedules - scalingSchedules or null for none
      • clone

        public AutoscalingPolicy clone()
        Overrides:
        clone in class com.google.api.client.json.GenericJson

Copyright © 2011–2025 Google. All rights reserved.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy