{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/chronosphere/main/json-schema/chronosphere-configv1-create-gcp-metrics-integration-response-schema.json", "title": "configv1CreateGcpMetricsIntegrationResponse", "x-generated": "2026-10-03", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/chronosphere-gcpmetricsintegration-api-openapi.yml#/components/schemas/configv1CreateGcpMetricsIntegrationResponse", "properties": { "gcp_metrics_integration": { "$ref": "#/$defs/configv1GcpMetricsIntegration" } }, "type": "object", "$defs": { "GcpMetricsIntegrationLabelContext": { "description": "LabelContext represents the scope of a label in GCP (used for filters and aggregations).\n\n - RESOURCE_LABELS: Scopes labels to resources.\n - METRIC_LABELS: Scopes labels to metrics.\n - METADATA_SYSTEM_LABELS: Scopes labels to system metadata.\n - METADATA_USER_LABELS: Scopes labels to user metadata.", "enum": [ "RESOURCE_LABELS", "METRIC_LABELS", "METADATA_SYSTEM_LABELS", "METADATA_USER_LABELS" ], "type": "string" }, "GcpMetricsIntegrationMetricGroup": { "properties": { "filters": { "description": "Rollup rules to apply server-side aggregations to metrics in this group.", "items": { "$ref": "#/$defs/configv1GcpMetricsIntegrationFilter" }, "type": "array" }, "prefixes": { "description": "A list of Google Cloud metric prefixes to ingest.\n\nFilters to apply to metrics in this group.", "items": { "type": "string" }, "type": "array" }, "project_id": { "description": "The Google Cloud project ID that can access the metric data.", "type": "string" }, "rollup_rules": { "items": { "$ref": "#/$defs/configv1GcpMetricsIntegrationRollupRule" }, "type": "array" } }, "type": "object" }, "GcpMetricsIntegrationRollupRuleLabel": { "description": "Specifies a label to keep during aggregation.", "properties": { "context": { "allOf": [ { "$ref": "#/$defs/GcpMetricsIntegrationLabelContext" } ], "description": "Specifies the scope of the label, such as `resource.labels` or `metric.labels`." }, "name": { "description": "Name of the label.", "type": "string" } }, "type": "object" }, "GcpMetricsIntegrationRollupRuleLabelPolicy": { "description": "Specifies which labels to preserve during aggregation.", "properties": { "keep": { "description": "Labels to keep during aggregation.", "items": { "$ref": "#/$defs/GcpMetricsIntegrationRollupRuleLabel" }, "type": "array" } }, "type": "object" }, "configv1GcpMetricsIntegration": { "properties": { "created_at": { "description": "Timestamp of when the GcpMetricsIntegration was created. Cannot be set by clients.", "format": "date-time", "readOnly": true, "type": "string" }, "metric_groups": { "description": "An array of metric groups to be ingested for this integration.", "items": { "$ref": "#/$defs/GcpMetricsIntegrationMetricGroup" }, "type": "array" }, "name": { "description": "The name of the GcpMetricsIntegration. You can modify this value after the GcpMetricsIntegration is created.", "type": "string" }, "service_account": { "allOf": [ { "$ref": "#/$defs/configv1GcpMetricsIntegrationServiceAccount" } ], "description": "The Google Cloud service account to use for API authentication." }, "slug": { "description": "The unique identifier of the GcpMetricsIntegration. If a `slug` isn't provided, one is generated based on the `name` field. You can't modify this field after the GcpMetricsIntegration is created.", "type": "string" }, "updated_at": { "description": "Timestamp of when the GcpMetricsIntegration was last updated. Cannot be set by clients.", "format": "date-time", "readOnly": true, "type": "string" } }, "required": [ "name" ], "type": "object" }, "configv1GcpMetricsIntegrationAggregation": { "description": "Specifies the cross-series aggregation method.", "enum": [ "MEAN", "MIN", "MAX", "SUM", "COUNT" ], "type": "string" }, "configv1GcpMetricsIntegrationFilter": { "description": "Defines a filter to apply to metrics.", "properties": { "context": { "allOf": [ { "$ref": "#/$defs/GcpMetricsIntegrationLabelContext" } ], "description": "Specifies the scope of the label, such as `resource.labels` or `metric.labels`." }, "name": { "description": "Label name to filter on.", "type": "string" }, "value_glob": { "description": "Value pattern using glob syntax, such as `\"prod-*\"` or `\"us-east-?\"`.\nIf a glob pattern isn't specified, an exact match is applied.", "type": "string" } }, "type": "object" }, "configv1GcpMetricsIntegrationRollupRule": { "description": "Defines server-side aggregation rules for metrics.", "properties": { "aggregation": { "allOf": [ { "$ref": "#/$defs/configv1GcpMetricsIntegrationAggregation" } ], "description": "Aggregation method to use for cross-series aggregation." }, "label_policy": { "allOf": [ { "$ref": "#/$defs/GcpMetricsIntegrationRollupRuleLabelPolicy" } ], "description": "Specifies which labels to preserve during aggregation." }, "metric_name": { "description": "Metric name to apply the aggregation to, such as `\"cloudsql.googleapis.com/database/uptime\"`.", "type": "string" } }, "type": "object" }, "configv1GcpMetricsIntegrationServiceAccount": { "properties": { "client_email": { "description": "The email address of the Google Cloud service account to impersonate for authentication.", "type": "string" } }, "type": "object" } } }