Class: Google::Cloud::Compute::V1::AutoscalingPolicy

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/compute/v1/compute.rb

Overview

Cloud Autoscaler policy.

Defined Under Namespace

Modules: Mode Classes: ScalingSchedulesEntry

Instance Attribute Summary collapse

Instance Attribute Details

#cool_down_period_sec::Integer

Returns The number of seconds that your application takes to initialize on a VM instance. This is referred to as the initialization 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:

  • (::Integer)

    The number of seconds that your application takes to initialize on a VM instance. This is referred to as the initialization 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.



9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 9326

class AutoscalingPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::Compute::V1::AutoscalingPolicyScalingSchedule]
  class ScalingSchedulesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # 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"
  module Mode
    # A value indicating that the enum field is not set.
    UNDEFINED_MODE = 0

    # Do not automatically scale the MIG in or out.
    # The recommended_size field contains the size of MIG that would be set if
    # the actuation mode was enabled.
    OFF = 78_159

    # Automatically scale the MIG in and out according to the policy.
    ON = 2527

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_SCALE_OUT = 152_713_670

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_UP = 478_095_374
  end
end

#cpu_utilization::Google::Cloud::Compute::V1::AutoscalingPolicyCpuUtilization

Returns Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.

Returns:



9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 9326

class AutoscalingPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::Compute::V1::AutoscalingPolicyScalingSchedule]
  class ScalingSchedulesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # 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"
  module Mode
    # A value indicating that the enum field is not set.
    UNDEFINED_MODE = 0

    # Do not automatically scale the MIG in or out.
    # The recommended_size field contains the size of MIG that would be set if
    # the actuation mode was enabled.
    OFF = 78_159

    # Automatically scale the MIG in and out according to the policy.
    ON = 2527

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_SCALE_OUT = 152_713_670

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_UP = 478_095_374
  end
end

#custom_metric_utilizations::Array<::Google::Cloud::Compute::V1::AutoscalingPolicyCustomMetricUtilization>

Returns Configuration parameters of autoscaling based on a custom metric.

Returns:



9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 9326

class AutoscalingPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::Compute::V1::AutoscalingPolicyScalingSchedule]
  class ScalingSchedulesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # 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"
  module Mode
    # A value indicating that the enum field is not set.
    UNDEFINED_MODE = 0

    # Do not automatically scale the MIG in or out.
    # The recommended_size field contains the size of MIG that would be set if
    # the actuation mode was enabled.
    OFF = 78_159

    # Automatically scale the MIG in and out according to the policy.
    ON = 2527

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_SCALE_OUT = 152_713_670

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_UP = 478_095_374
  end
end

#load_balancing_utilization::Google::Cloud::Compute::V1::AutoscalingPolicyLoadBalancingUtilization

Returns Configuration parameters of autoscaling based on load balancer.

Returns:



9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 9326

class AutoscalingPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::Compute::V1::AutoscalingPolicyScalingSchedule]
  class ScalingSchedulesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # 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"
  module Mode
    # A value indicating that the enum field is not set.
    UNDEFINED_MODE = 0

    # Do not automatically scale the MIG in or out.
    # The recommended_size field contains the size of MIG that would be set if
    # the actuation mode was enabled.
    OFF = 78_159

    # Automatically scale the MIG in and out according to the policy.
    ON = 2527

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_SCALE_OUT = 152_713_670

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_UP = 478_095_374
  end
end

#max_num_replicas::Integer

Returns 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:

  • (::Integer)

    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.



9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 9326

class AutoscalingPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::Compute::V1::AutoscalingPolicyScalingSchedule]
  class ScalingSchedulesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # 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"
  module Mode
    # A value indicating that the enum field is not set.
    UNDEFINED_MODE = 0

    # Do not automatically scale the MIG in or out.
    # The recommended_size field contains the size of MIG that would be set if
    # the actuation mode was enabled.
    OFF = 78_159

    # Automatically scale the MIG in and out according to the policy.
    ON = 2527

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_SCALE_OUT = 152_713_670

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_UP = 478_095_374
  end
end

#min_num_replicas::Integer

Returns 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:

  • (::Integer)

    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.



9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 9326

class AutoscalingPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::Compute::V1::AutoscalingPolicyScalingSchedule]
  class ScalingSchedulesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # 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"
  module Mode
    # A value indicating that the enum field is not set.
    UNDEFINED_MODE = 0

    # Do not automatically scale the MIG in or out.
    # The recommended_size field contains the size of MIG that would be set if
    # the actuation mode was enabled.
    OFF = 78_159

    # Automatically scale the MIG in and out according to the policy.
    ON = 2527

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_SCALE_OUT = 152_713_670

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_UP = 478_095_374
  end
end

#mode::String

Returns 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" Check the Mode enum for the list of possible values.

Returns:

  • (::String)

    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" Check the Mode enum for the list of possible values.



9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 9326

class AutoscalingPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::Compute::V1::AutoscalingPolicyScalingSchedule]
  class ScalingSchedulesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # 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"
  module Mode
    # A value indicating that the enum field is not set.
    UNDEFINED_MODE = 0

    # Do not automatically scale the MIG in or out.
    # The recommended_size field contains the size of MIG that would be set if
    # the actuation mode was enabled.
    OFF = 78_159

    # Automatically scale the MIG in and out according to the policy.
    ON = 2527

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_SCALE_OUT = 152_713_670

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_UP = 478_095_374
  end
end

#scale_in_control::Google::Cloud::Compute::V1::AutoscalingPolicyScaleInControl



9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 9326

class AutoscalingPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::Compute::V1::AutoscalingPolicyScalingSchedule]
  class ScalingSchedulesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # 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"
  module Mode
    # A value indicating that the enum field is not set.
    UNDEFINED_MODE = 0

    # Do not automatically scale the MIG in or out.
    # The recommended_size field contains the size of MIG that would be set if
    # the actuation mode was enabled.
    OFF = 78_159

    # Automatically scale the MIG in and out according to the policy.
    ON = 2527

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_SCALE_OUT = 152_713_670

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_UP = 478_095_374
  end
end

#scaling_schedules::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::AutoscalingPolicyScalingSchedule}

Returns 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:

  • (::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::AutoscalingPolicyScalingSchedule})

    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.



9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 9326

class AutoscalingPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::Compute::V1::AutoscalingPolicyScalingSchedule]
  class ScalingSchedulesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # 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"
  module Mode
    # A value indicating that the enum field is not set.
    UNDEFINED_MODE = 0

    # Do not automatically scale the MIG in or out.
    # The recommended_size field contains the size of MIG that would be set if
    # the actuation mode was enabled.
    OFF = 78_159

    # Automatically scale the MIG in and out according to the policy.
    ON = 2527

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_SCALE_OUT = 152_713_670

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_UP = 478_095_374
  end
end

#stabilization_period_sec::Integer

Returns The number of seconds that autoscaler waits for load stabilization before making scale-in decisions. This is referred to as the stabilization period. This might appear as a delay in scaling in but it is an important mechanism for your application to not have fluctuating size due to short term load fluctuations.

The default stabilization period is 600 seconds.

Returns:

  • (::Integer)

    The number of seconds that autoscaler waits for load stabilization before making scale-in decisions. This is referred to as the stabilization period. This might appear as a delay in scaling in but it is an important mechanism for your application to not have fluctuating size due to short term load fluctuations.

    The default stabilization period is 600 seconds.



9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
# File 'proto_docs/google/cloud/compute/v1/compute.rb', line 9326

class AutoscalingPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::Google::Cloud::Compute::V1::AutoscalingPolicyScalingSchedule]
  class ScalingSchedulesEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # 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"
  module Mode
    # A value indicating that the enum field is not set.
    UNDEFINED_MODE = 0

    # Do not automatically scale the MIG in or out.
    # The recommended_size field contains the size of MIG that would be set if
    # the actuation mode was enabled.
    OFF = 78_159

    # Automatically scale the MIG in and out according to the policy.
    ON = 2527

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_SCALE_OUT = 152_713_670

    # Automatically create VMs according to the policy, but do not scale
    # the MIG in.
    ONLY_UP = 478_095_374
  end
end