{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-save-service-request-v2-schema.json", "title": "SaveServiceRequestV2", "x-generated": "2026-10-04", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/harness-autostopping-rules-v2-api-openapi.yml#/components/schemas/SaveServiceRequestV2", "type": "object", "properties": { "deps": { "type": "array", "items": { "$ref": "#/$defs/ServiceDep" } }, "service": { "$ref": "#/$defs/ServiceV2" }, "apply_now": { "type": "boolean" } }, "$defs": { "ASGMinimal": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "desired": { "type": "integer" }, "min": { "type": "integer" }, "max": { "type": "integer" }, "on_demand": { "type": "integer" }, "spot": { "type": "integer" }, "mixed_instance": { "type": "boolean" }, "cloud_account_id": { "type": "string" }, "provider_name": { "type": "string" }, "target_groups": { "type": "array", "items": { "$ref": "#/$defs/TargetGroupMinimal" } }, "region": { "type": "string" }, "availability_zones": { "type": "array", "items": { "type": "string" } }, "status": { "type": "string" }, "meta": { "type": "object", "properties": {} } } }, "ContainerSvc": { "type": "object", "properties": { "cluster": { "type": "string" }, "service": { "type": "string" }, "region": { "type": "string" }, "task_count": { "type": "number" } } }, "FilterObject": { "type": "object", "properties": { "name": { "type": "string" }, "ids": { "type": "array", "items": { "type": "string" } }, "regions": { "type": "array", "items": { "type": "string" } }, "resource_groups": { "type": "array", "items": { "type": "string" } }, "vpc_id": { "type": "string" }, "zones": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "object", "properties": {} } } }, "HTTPProxy": { "required": [ "proxy", "ports" ], "type": "object", "properties": { "proxy": { "$ref": "#/$defs/Proxy" }, "ports": { "type": "array", "items": { "$ref": "#/$defs/PortConfig" } } } }, "InstanceBasedRoutingDataV2": { "type": "object", "properties": { "filter": { "$ref": "#/$defs/FilterObject" }, "scale_group": { "$ref": "#/$defs/ASGMinimal" } } }, "Opts": { "type": "object", "properties": { "preserve_private_ip": { "type": "boolean" }, "delete_cloud_resources": { "type": "boolean" }, "always_use_private_ip": { "type": "boolean" }, "access_details": { "type": "object", "properties": {} }, "hide_progress_page": { "type": "boolean" }, "idle_time_for_state_sync": { "type": "boolean", "description": "If true, idle time is used for state sync instead of the default 5 minutes" } } }, "PortConfig": { "type": "object", "properties": { "protocol": { "type": "string" }, "target_protocol": { "type": "string" }, "port": { "type": "integer" }, "target_port": { "type": "integer" }, "server_name": { "type": "string" }, "action": { "type": "string" }, "redirect_url": { "type": "string" }, "routing_rules": { "type": "array", "items": { "$ref": "#/$defs/RoutingRule" } } } }, "Proxy": { "type": "object", "properties": { "id": { "type": "string" } } }, "RDSDatabase": { "type": "object", "properties": { "id": { "type": "string" }, "region": { "type": "string" } } }, "RoutingDataV2": { "type": "object", "properties": { "instance": { "$ref": "#/$defs/InstanceBasedRoutingDataV2" }, "lb": { "type": "string" }, "k8s": { "type": "object", "properties": { "RuleJson": { "type": "string" }, "ConnectorID": { "type": "string" }, "Namespace": { "type": "string" } } }, "custom_domain_providers": { "type": "object", "properties": {} }, "container_svc": { "$ref": "#/$defs/ContainerSvc" }, "database": { "$ref": "#/$defs/RDSDatabase" }, "http": { "$ref": "#/$defs/HTTPProxy" }, "tcp": { "$ref": "#/$defs/TCPProxy" } } }, "RoutingRule": { "type": "object", "properties": { "path_match": { "type": "string" } } }, "ServiceDep": { "type": "object" }, "ServiceError": { "type": "object", "properties": { "error": { "type": "string" }, "action": { "type": "string" } } }, "ServiceMetadata": { "type": "object", "properties": { "cloud_provider_details": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string" } } }, "target_group_details": { "type": "object", "properties": {} }, "service_errors": { "type": "array", "items": { "$ref": "#/$defs/ServiceError" } }, "kubernetes_connector_id": { "type": "string" }, "autostopping_proxy_config": { "type": "object", "properties": { "http": { "$ref": "#/$defs/HTTPProxy" }, "tcp": { "$ref": "#/$defs/HTTPProxy" } } } } }, "ServiceV2": { "required": [ "cloud_account_id", "kind", "name", "org_id" ], "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "org_id": { "type": "string" }, "account_identifier": { "type": "string" }, "project_id": { "type": "string" }, "fulfilment": { "type": "string" }, "kind": { "type": "string" }, "cloud_account_id": { "type": "string" }, "idle_time_mins": { "type": "integer", "format": "int64" }, "host_name": { "type": "string" }, "health_check": { "type": "object", "properties": {} }, "custom_domains": { "type": "array", "items": { "type": "string" } }, "match_all_subdomains": { "type": "boolean" }, "disabled": { "type": "boolean" }, "routing": { "$ref": "#/$defs/RoutingDataV2" }, "opts": { "$ref": "#/$defs/Opts" }, "created_at": { "type": "string" }, "metadata": { "$ref": "#/$defs/ServiceMetadata" }, "status": { "type": "string" } } }, "TCPProxy": { "required": [ "proxy" ], "type": "object", "properties": { "proxy": { "$ref": "#/$defs/Proxy" }, "ssh": { "type": "integer" }, "rdp": { "type": "integer" }, "ports": { "type": "array", "items": { "type": "integer" } } } }, "TargetGroupMinimal": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "port": { "type": "integer" }, "protocol": { "type": "string" }, "vpc": { "type": "string" } } } } }