gcp.vertex-ai-endpoint

GCP Vertex AI Endpoint Resource

Vertex AI Endpoints are used to deploy machine learning models for online prediction.

example:

List all Vertex AI Endpoints in specific locations:

policies:
  - name: vertexai-endpoints-missing-env-label
    resource: gcp.vertex-ai-endpoint
    query:
      - location: us-central1
      - location: us-east1
    filters:
      - type: value
        key: labels.env
        op: absent
example:

List all Vertex AI Endpoints across all locations:

policies:
  - name: vertexai-endpoints-all-locations
    resource: gcp.vertex-ai-endpoint

Filters

metrics

Supports metrics filters on resources.

All resources that have cloud watch metrics are supported.

Docs on cloud watch metrics

- name: firewall-hit-count
  resource: gcp.firewall
  filters:
    - type: metrics
      name: firewallinsights.googleapis.com/subnet/firewall_hit_count
      aligner: ALIGN_COUNT
      days: 14
      value: 1
      op: greater-than

The period-start key allows you to align the metric window in two ways. By default, using auto, the window is computed relative to the current time. Alternatively, setting it to start-of-day aligns the window to full UTC calendar days, beginning at 00:00:00 UTC and ending at current day 00:00:00 UTC.

- name: instance-low-cpu-last-full-day
  resource: gcp.instance
  filters:
    - type: metrics
      name: compute.googleapis.com/instance/cpu/utilization
      aligner: ALIGN_MEAN
      days: 1
      value: 0.05
      op: less-than
      period-start: start-of-day
properties:
  aligner:
    enum:
    - ALIGN_NONE
    - ALIGN_DELTA
    - ALIGN_RATE
    - ALIGN_INTERPOLATE
    - ALIGN_MIN
    - ALIGN_MAX
    - ALIGN_MEAN
    - ALIGN_COUNT
    - ALIGN_SUM
    - REDUCE_COUNT_FALSE
    - ALIGN_STDDEV
    - ALIGN_COUNT_TRUE
    - ALIGN_COUNT_FALSE
    - ALIGN_FRACTION_TRUE
    - ALIGN_PERCENTILE_99
    - ALIGN_PERCENTILE_95
    - ALIGN_PERCENTILE_50
    - ALIGN_PERCENTILE_05
    - ALIGN_PERCENT_CHANG
    type: string
  days:
    type: number
  filter:
    type: string
  group-by-fields:
    items:
      type: string
    type: array
  metric-key:
    type: string
  missing-value:
    type: number
  name:
    type: string
  op:
    enum:
    - eq
    - equal
    - ne
    - not-equal
    - gt
    - greater-than
    - ge
    - gte
    - le
    - lte
    - lt
    - less-than
    - glob
    - regex
    - regex-case
    - in
    - ni
    - not-in
    - contains
    - difference
    - intersect
    - mod
    type: string
  period-start:
    enum:
    - auto
    - start-of-day
    type: string
  reducer:
    enum:
    - REDUCE_NONE
    - REDUCE_MEAN
    - REDUCE_MIN
    - REDUCE_MAX
    - REDUCE_MEAN
    - REDUCE_SUM
    - REDUCE_STDDEV
    - REDUCE_COUNT
    - REDUCE_COUNT_TRUE
    - REDUCE_COUNT_FALSE
    - REDUCE_FRACTION_TRUE
    - REDUCE_PERCENTILE_99
    - REDUCE_PERCENTILE_95
    - REDUCE_PERCENTILE_50
    - REDUCE_PERCENTILE_05
    type: string
  type:
    enum:
    - metrics
  value:
    type: number
required:
- value
- name
- op

Permissions - monitoring.timeSeries.list

Actions

delete

Delete Vertex AI Endpoints

Deletes a Vertex AI Endpoint. Note that this is an asynchronous operation that returns a long-running operation. The endpoint will be deleted in the background.

Warning: Deleting an endpoint will undeploy all models from the endpoint. Make sure to check for deployed models before deletion if needed.

example:

Delete endpoints with no deployed models:

policies:
  - name: delete-unused-endpoints
    resource: gcp.vertex-ai-endpoint
    filters:
      - type: value
        key: deployedModels
        value: []
    actions:
      - type: delete

https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.endpoints/delete

properties:
  type:
    enum:
    - delete
required:
- type

Permissions - aiplatform.endpoints.delete

monitor

Create Model Deployment Monitoring Jobs for Vertex AI Endpoints

Creates a ModelDeploymentMonitoringJob that runs periodically to detect prediction drift on deployed models. This provides a baseline monitoring posture for production AI serving.

The action will: - Skip endpoints with no deployed models (with warning log) - Create monitoring jobs with prediction drift detection enabled - Use idempotent naming to avoid duplicate jobs - Handle location-specific API endpoints automatically

Important: Without an instance schema, monitoring jobs remain in PENDING state until ~1000 prediction requests are received. Provide analysis_instance_schema_uri to avoid this delay.

example:

Create monitoring jobs for all production endpoints:

policies:
  - name: monitor-production-endpoints
    resource: gcp.vertex-ai-endpoint
    query:
      - location: us-central1
    filters:
      - type: value
        key: deployedModels
        value: present
    actions:
      - type: monitor

Create monitoring with custom interval and schema (recommended):

policies:
  - name: monitor-with-schema
    resource: gcp.vertex-ai-endpoint
    actions:
      - type: monitor
        monitoring_interval: 86400
        analysis_instance_schema_uri: gs://my-bucket/schema.yaml

https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.modelDeploymentMonitoringJobs/create

properties:
  analysis_instance_schema_uri:
    description: GCS URI to instance schema YAML file in OpenAPI format. Required
      for job to transition from PENDING to RUNNING state. Without this, job remains
      PENDING until ~1000 prediction requests.
    type: string
  display_name:
    description: Custom display name for monitoring job
    type: string
  monitoring_interval:
    description: Monitoring interval in seconds (minimum 1 hour)
    minimum: 3600
    type: integer
  type:
    enum:
    - monitor
required:
- type

Permissions - aiplatform.modelDeploymentMonitoringJobs.create