Reference documentation and code samples for the Vision AI V1 API class Google::Cloud::VisionAI::V1::AutoscalingMetricSpec.
The metric specification that defines the target resource utilization
(CPU utilization, accelerator's duty cycle, and so on) for calculating the
desired replica count.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#metric_name
defmetric_name()->::String
Returns
(::String) —
Required. The resource metric name.
Supported metrics:
(::Integer) — The target resource utilization in percentage (1% - 100%) for the given
metric; once the real usage deviates from the target by a certain
percentage, the machine replicas change. The default value is 60
(representing 60%) if not provided.
#target=
deftarget=(value)->::Integer
Parameter
value (::Integer) — The target resource utilization in percentage (1% - 100%) for the given
metric; once the real usage deviates from the target by a certain
percentage, the machine replicas change. The default value is 60
(representing 60%) if not provided.
Returns
(::Integer) — The target resource utilization in percentage (1% - 100%) for the given
metric; once the real usage deviates from the target by a certain
percentage, the machine replicas change. The default value is 60
(representing 60%) if not provided.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Vision AI V1 API - Class Google::Cloud::VisionAI::V1::AutoscalingMetricSpec (v1.1.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.1.1 (latest)](/ruby/docs/reference/google-cloud-vision_ai-v1/latest/Google-Cloud-VisionAI-V1-AutoscalingMetricSpec)\n- [1.1.0](/ruby/docs/reference/google-cloud-vision_ai-v1/1.1.0/Google-Cloud-VisionAI-V1-AutoscalingMetricSpec)\n- [1.0.1](/ruby/docs/reference/google-cloud-vision_ai-v1/1.0.1/Google-Cloud-VisionAI-V1-AutoscalingMetricSpec)\n- [0.4.0](/ruby/docs/reference/google-cloud-vision_ai-v1/0.4.0/Google-Cloud-VisionAI-V1-AutoscalingMetricSpec)\n- [0.3.0](/ruby/docs/reference/google-cloud-vision_ai-v1/0.3.0/Google-Cloud-VisionAI-V1-AutoscalingMetricSpec)\n- [0.2.0](/ruby/docs/reference/google-cloud-vision_ai-v1/0.2.0/Google-Cloud-VisionAI-V1-AutoscalingMetricSpec)\n- [0.1.0](/ruby/docs/reference/google-cloud-vision_ai-v1/0.1.0/Google-Cloud-VisionAI-V1-AutoscalingMetricSpec) \nReference documentation and code samples for the Vision AI V1 API class Google::Cloud::VisionAI::V1::AutoscalingMetricSpec.\n\nThe metric specification that defines the target resource utilization\n(CPU utilization, accelerator's duty cycle, and so on) for calculating the\ndesired replica count. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #metric_name\n\n def metric_name() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Required. The resource metric name.\n Supported metrics:\n\n - For Online Prediction:\n - `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`\n - `aiplatform.googleapis.com/prediction/online/cpu/utilization`\n\n### #metric_name=\n\n def metric_name=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) ---\n\n Required. The resource metric name.\n Supported metrics:\n - For Online Prediction:\n - `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`\n- `aiplatform.googleapis.com/prediction/online/cpu/utilization` \n**Returns**\n\n- (::String) --- Required. The resource metric name.\n Supported metrics:\n\n - For Online Prediction:\n - `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle`\n - `aiplatform.googleapis.com/prediction/online/cpu/utilization`\n\n### #target\n\n def target() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- The target resource utilization in percentage (1% - 100%) for the given metric; once the real usage deviates from the target by a certain percentage, the machine replicas change. The default value is 60 (representing 60%) if not provided.\n\n### #target=\n\n def target=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- The target resource utilization in percentage (1% - 100%) for the given metric; once the real usage deviates from the target by a certain percentage, the machine replicas change. The default value is 60 (representing 60%) if not provided. \n**Returns**\n\n- (::Integer) --- The target resource utilization in percentage (1% - 100%) for the given metric; once the real usage deviates from the target by a certain percentage, the machine replicas change. The default value is 60 (representing 60%) if not provided."]]