> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Clickhouse Postgres Service Create: Inputs, Cost & CLI

> Create new Postgres service. Includes inputs, outputs, pricing notes, Deepline CLI examples, and GTM automation guidance.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=clickhouse_postgres_service_create:{"organizationId":"{{organizationId}}","name":"{{name}}","provider":"aws","region":"{{region}}","size":"c6gd.large"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                      | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Required | Default | Description                                                                                                                                                             |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.organizationId`  | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Yes      |         | ID of the organization that will own the service.                                                                                                                       |
| `payload.name`            | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Yes      |         | Name of the Postgres service. Alphanumerical string with whitespaces up to 50 characters.                                                                               |
| `payload.provider`        | `"aws"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Yes      |         | The cloud provider for a Postgres service.                                                                                                                              |
| `payload.region`          | `string`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Yes      |         | The cloud region for a Postgres service.                                                                                                                                |
| `payload.postgresVersion` | `"18" \| "17"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | No       |         |                                                                                                                                                                         |
| `payload.size`            | `"c6gd.large" \| "c6gd.xlarge" \| "c6gd.2xlarge" \| "c6gd.4xlarge" \| "c6gd.8xlarge" \| "c6gd.16xlarge" \| "i7i.large" \| "i7i.xlarge" \| "i7i.2xlarge" \| "i7i.4xlarge" \| "i7i.8xlarge" \| "i7i.12xlarge" \| "i7i.16xlarge" \| "i7i.24xlarge" \| "i7ie.large" \| "i7ie.xlarge" \| "i7ie.2xlarge" \| "i7ie.3xlarge" \| "i7ie.6xlarge" \| "i7ie.12xlarge" \| "i7ie.18xlarge" \| "i7ie.24xlarge" \| "i8g.large" \| "i8g.xlarge" \| "i8g.2xlarge" \| "i8g.4xlarge" \| "i8g.8xlarge" \| "i8g.16xlarge" \| "i8g.24xlarge" \| "i8ge.large" \| "i8ge.xlarge" \| "i8ge.2xlarge" \| "i8ge.3xlarge" \| "i8ge.6xlarge" \| "i8ge.12xlarge" \| "i8ge.18xlarge" \| "i8ge.24xlarge" \| "m6gd.large" \| "m6gd.xlarge" \| "m6gd.2xlarge" \| "m6gd.4xlarge" \| "m6gd.8xlarge" \| "m6gd.16xlarge" \| "m6id.large" \| "m6id.xlarge" \| "m6id.2xlarge" \| "m6id.4xlarge" \| "m6id.8xlarge" \| "m6id.16xlarge" \| "m8gd.large" \| "m8gd.xlarge" \| "m8gd.2xlarge" \| "m8gd.4xlarge" \| "m8gd.8xlarge" \| "m8gd.16xlarge" \| "r6gd.medium" \| "r6gd.large" \| "r6gd.xlarge" \| "r6gd.2xlarge" \| "r6gd.4xlarge" \| "r6gd.8xlarge" \| "r6gd.12xlarge" \| "r6gd.16xlarge" \| "r6id.large" \| "r6id.xlarge" \| "r6id.2xlarge" \| "r6id.4xlarge" \| "r6id.8xlarge" \| "r6id.12xlarge" \| "r6id.16xlarge" \| "r6id.24xlarge" \| "r6id.32xlarge" \| "r8gd.medium" \| "r8gd.large" \| "r8gd.xlarge" \| "r8gd.2xlarge" \| "r8gd.4xlarge" \| "r8gd.8xlarge" \| "r8gd.12xlarge" \| "r8gd.16xlarge" \| "r8gd.24xlarge" \| "r8gd.48xlarge"` | Yes      |         | The VM size for a Postgres service.                                                                                                                                     |
| `payload.haType`          | `"none" \| "async" \| "sync"`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | No       |         | Type of high availability: “none” for no replication, “async” for asynchronous replication to a single standby, and “sync” for synchronous replication to two standbys. |
| `payload.tags`            | `array`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | No       |         | Tags associated with the Postgres service. Tag keys starting with “chc\_” are reserved for internal use.                                                                |
| `payload.pgConfig`        | `object`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | No       |         | Postgres [runtime configuration](https://www.postgresql.org/docs/current/runtime-config.html) configuration.                                                            |
| `payload.pgBouncerConfig` | `record`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | No       |         | PgBouncer [runtime configuration](https://www.pgbouncer.org/config.html) configuration.                                                                                 |

### Allowed values

| Field                     | Allowed values                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.provider`        | `aws`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `payload.postgresVersion` | `18`, `17`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `payload.size`            | `c6gd.large`, `c6gd.xlarge`, `c6gd.2xlarge`, `c6gd.4xlarge`, `c6gd.8xlarge`, `c6gd.16xlarge`, `i7i.large`, `i7i.xlarge`, `i7i.2xlarge`, `i7i.4xlarge`, `i7i.8xlarge`, `i7i.12xlarge`, `i7i.16xlarge`, `i7i.24xlarge`, `i7ie.large`, `i7ie.xlarge`, `i7ie.2xlarge`, `i7ie.3xlarge`, `i7ie.6xlarge`, `i7ie.12xlarge`, `i7ie.18xlarge`, `i7ie.24xlarge`, `i8g.large`, `i8g.xlarge`, `i8g.2xlarge`, `i8g.4xlarge`, `i8g.8xlarge`, `i8g.16xlarge`, `i8g.24xlarge`, `i8ge.large`, `i8ge.xlarge`, `i8ge.2xlarge`, `i8ge.3xlarge`, `i8ge.6xlarge`, `i8ge.12xlarge`, `i8ge.18xlarge`, `i8ge.24xlarge`, `m6gd.large`, `m6gd.xlarge`, `m6gd.2xlarge`, `m6gd.4xlarge`, `m6gd.8xlarge`, `m6gd.16xlarge`, `m6id.large`, `m6id.xlarge`, `m6id.2xlarge`, `m6id.4xlarge`, `m6id.8xlarge`, `m6id.16xlarge`, `m8gd.large`, `m8gd.xlarge`, `m8gd.2xlarge`, `m8gd.4xlarge`, `m8gd.8xlarge`, `m8gd.16xlarge`, `r6gd.medium`, `r6gd.large`, `r6gd.xlarge`, `r6gd.2xlarge`, `r6gd.4xlarge`, `r6gd.8xlarge`, `r6gd.12xlarge`, `r6gd.16xlarge`, `r6id.large`, `r6id.xlarge`, `r6id.2xlarge`, `r6id.4xlarge`, `r6id.8xlarge`, `r6id.12xlarge`, `r6id.16xlarge`, `r6id.24xlarge`, `r6id.32xlarge`, `r8gd.medium`, `r8gd.large`, `r8gd.xlarge`, `r8gd.2xlarge`, `r8gd.4xlarge`, `r8gd.8xlarge`, `r8gd.12xlarge`, `r8gd.16xlarge`, `r8gd.24xlarge`, `r8gd.48xlarge` |
| `payload.haType`          | `none`, `async`, `sync`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. Creates a new Postgres service in the organization and returns it. The service is started asynchronously.",
    "properties": {
      "organizationId": {
        "type": "string",
        "description": "ID of the organization that will own the service.",
        "format": "uuid"
      },
      "name": {
        "type": "string",
        "description": "Name of the Postgres service. Alphanumerical string with whitespaces up to 50 characters.",
        "minLength": 1,
        "maxLength": 50
      },
      "provider": {
        "type": "string",
        "description": "The cloud provider for a Postgres service.",
        "enum": [
          "aws"
        ]
      },
      "region": {
        "type": "string",
        "description": "The cloud region for a Postgres service."
      },
      "postgresVersion": {
        "type": "string",
        "enum": [
          "18",
          "17"
        ]
      },
      "size": {
        "type": "string",
        "description": "The VM size for a Postgres service.",
        "enum": [
          "c6gd.large",
          "c6gd.xlarge",
          "c6gd.2xlarge",
          "c6gd.4xlarge",
          "c6gd.8xlarge",
          "c6gd.16xlarge",
          "i7i.large",
          "i7i.xlarge",
          "i7i.2xlarge",
          "i7i.4xlarge",
          "i7i.8xlarge",
          "i7i.12xlarge",
          "i7i.16xlarge",
          "i7i.24xlarge",
          "i7ie.large",
          "i7ie.xlarge",
          "i7ie.2xlarge",
          "i7ie.3xlarge",
          "i7ie.6xlarge",
          "i7ie.12xlarge",
          "i7ie.18xlarge",
          "i7ie.24xlarge",
          "i8g.large",
          "i8g.xlarge",
          "i8g.2xlarge",
          "i8g.4xlarge",
          "i8g.8xlarge",
          "i8g.16xlarge",
          "i8g.24xlarge",
          "i8ge.large",
          "i8ge.xlarge",
          "i8ge.2xlarge",
          "i8ge.3xlarge",
          "i8ge.6xlarge",
          "i8ge.12xlarge",
          "i8ge.18xlarge",
          "i8ge.24xlarge",
          "m6gd.large",
          "m6gd.xlarge",
          "m6gd.2xlarge",
          "m6gd.4xlarge",
          "m6gd.8xlarge",
          "m6gd.16xlarge",
          "m6id.large",
          "m6id.xlarge",
          "m6id.2xlarge",
          "m6id.4xlarge",
          "m6id.8xlarge",
          "m6id.16xlarge",
          "m8gd.large",
          "m8gd.xlarge",
          "m8gd.2xlarge",
          "m8gd.4xlarge",
          "m8gd.8xlarge",
          "m8gd.16xlarge",
          "r6gd.medium",
          "r6gd.large",
          "r6gd.xlarge",
          "r6gd.2xlarge",
          "r6gd.4xlarge",
          "r6gd.8xlarge",
          "r6gd.12xlarge",
          "r6gd.16xlarge",
          "r6id.large",
          "r6id.xlarge",
          "r6id.2xlarge",
          "r6id.4xlarge",
          "r6id.8xlarge",
          "r6id.12xlarge",
          "r6id.16xlarge",
          "r6id.24xlarge",
          "r6id.32xlarge",
          "r8gd.medium",
          "r8gd.large",
          "r8gd.xlarge",
          "r8gd.2xlarge",
          "r8gd.4xlarge",
          "r8gd.8xlarge",
          "r8gd.12xlarge",
          "r8gd.16xlarge",
          "r8gd.24xlarge",
          "r8gd.48xlarge"
        ]
      },
      "haType": {
        "type": "string",
        "description": "Type of high availability: “none” for no replication, “async” for asynchronous replication to a single standby, and “sync” for synchronous replication to two standbys.",
        "enum": [
          "none",
          "async",
          "sync"
        ]
      },
      "tags": {
        "type": "array",
        "description": "Tags associated with the Postgres service. Tag keys starting with “chc_” are reserved for internal use.",
        "maxItems": 50,
        "items": {
          "type": "object",
          "properties": {
            "key": {
              "type": "string",
              "description": "Tag key. Must be alphanumeric with dashes, underscores and dots.",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-zA-Z0-9._-]+$"
            },
            "value": {
              "type": "string",
              "description": "Tag value. Must be alphanumeric with dashes, underscores and dots.",
              "maxLength": 256,
              "pattern": "^[a-zA-Z0-9._-]+$"
            }
          },
          "required": [
            "key"
          ],
          "additionalProperties": false
        }
      },
      "pgConfig": {
        "type": "object",
        "description": "Postgres [runtime configuration](https://www.postgresql.org/docs/current/runtime-config.html) configuration.",
        "minProperties": 1,
        "properties": {
          "max_connections": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Sets the maximum number of concurrent connections to the database server.",
            "minimum": 1
          },
          "default_transaction_isolation": {
            "type": "string",
            "description": "Sets the default transaction isolation level for new transactions.",
            "enum": [
              "read committed",
              "repeatable read",
              "serializable"
            ]
          },
          "ssl_min_protocol_version": {
            "type": "string",
            "description": "Sets the minimum SSL/TLS protocol version allowed for client connections.",
            "enum": [
              "TLSv1",
              "TLSv1.1",
              "TLSv1.2",
              "TLSv1.3"
            ]
          },
          "maintenance_work_mem": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Sets the maximum memory to be used for maintenance operations.",
            "minimum": 64
          },
          "work_mem": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Sets the amount of memory Postgres will use for internal operations like sorting and hashing as part of executing a query.",
            "minimum": 64
          },
          "effective_cache_size": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Sets the planner's assumption about the total size of data caches.",
            "minimum": 8
          },
          "random_page_cost": {
            "type": [
              "string",
              "number"
            ],
            "description": "Sets the planner's estimate of the cost of a non-sequentially-fetched disk page. Lower values (1.1-1.5) are better for SSDs.",
            "minimum": 0
          },
          "effective_io_concurrency": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Number of concurrent disk I/O operations the planner expects. Higher values (100-200) benefit SSDs.",
            "minimum": 0
          },
          "max_worker_processes": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Maximum number of background processes the system can support. Includes parallel query workers, logical replication, and more.",
            "minimum": 0
          },
          "max_parallel_workers": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Maximum number of workers that can be used for parallel operations. Cannot exceed max_worker_processes.",
            "minimum": 0
          },
          "max_parallel_workers_per_gather": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Maximum number of parallel workers per executor node for parallel queries. Use 0 to disable parallel queries.",
            "minimum": 0
          },
          "max_parallel_maintenance_workers": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Maximum number of parallel workers for maintenance operations like CREATE INDEX and VACUUM.",
            "minimum": 0
          },
          "statement_timeout": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Abort any statement that runs longer than the specified time. Use 0 to disable.",
            "minimum": 0
          },
          "lock_timeout": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Abort any statement that waits longer than the specified time while attempting to acquire a lock. Use 0 to disable.",
            "minimum": 0
          },
          "idle_session_timeout": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Terminate any session that has been idle for longer than the specified time. Use 0 to disable.",
            "minimum": 0
          },
          "idle_in_transaction_session_timeout": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Terminate any session that has been idle within an open transaction for longer than the specified time. Use 0 to disable.",
            "minimum": 0
          },
          "transaction_timeout": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Terminate any statement that takes more than the specified time, even while active. Use 0 to disable.",
            "minimum": 0
          },
          "wal_sender_timeout": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Terminate replication connections that are inactive for longer than this time. Use 0 to disable.",
            "minimum": 0
          },
          "wal_keep_size": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Minimum size of past WAL files kept in pg_wal for standby servers. Use 0 to disable.",
            "minimum": 0
          },
          "min_wal_size": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Minimum size to shrink the WAL to. WAL files are recycled rather than removed when below this size.",
            "minimum": 32768
          },
          "max_wal_size": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Maximum size WAL can grow between checkpoints. Larger values improve write performance but increase crash recovery time.",
            "minimum": 32768
          },
          "max_slot_wal_keep_size": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Specifies the maximum size of WAL files that replication slots are allowed to retain. Use -1 for unlimited.",
            "minimum": 0
          },
          "wal_compression": {
            "type": "string",
            "description": "Compress full-page writes in WAL. Reduces I/O at the cost of CPU. Options vary by PostgreSQL version.",
            "enum": [
              "off",
              "on",
              "lz4",
              "zstd"
            ]
          },
          "autovacuum_max_workers": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Maximum number of autovacuum worker processes that can run at the same time. Workers share a single cost-limit budget, so raising this alone may not speed up vacuuming.",
            "minimum": 1
          },
          "autovacuum_naptime": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Minimum delay between autovacuum runs. Lower values make autovacuum check for work more frequently.",
            "minimum": 1
          },
          "autovacuum_work_mem": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Maximum memory each autovacuum worker uses to track dead tuples. Higher values reduce repeated index-vacuum passes on large tables. Use -1 to fall back to maintenance_work_mem.",
            "minimum": 1024
          },
          "autovacuum_vacuum_scale_factor": {
            "type": [
              "string",
              "number"
            ],
            "description": "Fraction of a table's rows that must change before autovacuum runs. Lower values vacuum large tables more frequently.",
            "minimum": 0
          },
          "autovacuum_analyze_scale_factor": {
            "type": [
              "string",
              "number"
            ],
            "description": "Fraction of a table's rows that must change before autovacuum runs ANALYZE to refresh planner statistics.",
            "minimum": 0
          },
          "autovacuum_vacuum_insert_scale_factor": {
            "type": [
              "string",
              "number"
            ],
            "description": "Fraction of a table's rows that must be inserted before autovacuum runs. Helps vacuum insert-heavy, rarely-updated tables.",
            "minimum": 0
          },
          "autovacuum_vacuum_cost_limit": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Cost-accounting limit shared across all autovacuum workers before they pause. Use -1 to inherit vacuum_cost_limit.",
            "minimum": 1
          },
          "autovacuum_vacuum_cost_delay": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Time autovacuum sleeps when the cost limit is reached. Lower values speed up vacuuming at the cost of more I/O.",
            "minimum": 0
          }
        },
        "additionalProperties": false
      },
      "pgBouncerConfig": {
        "type": "object",
        "description": "PgBouncer [runtime configuration](https://www.pgbouncer.org/config.html) configuration.",
        "minProperties": 1,
        "maxProperties": 64,
        "additionalProperties": {
          "type": "string",
          "description": "Any PgBouncer configuration parameter."
        }
      }
    },
    "required": [
      "organizationId",
      "name",
      "provider",
      "region",
      "size"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                    |
| ------------- | -------- | -------- | ------- | ---------------------------------------------- |
| `result.data` | `object` | Yes      |         | Provider response payload.                     |
| `result.meta` | `object` | No       |         | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "status": {
            "type": "number",
            "description": "HTTP status code."
          },
          "requestId": {
            "type": "string",
            "description": "Unique id assigned to every request. UUIDv4",
            "format": "uuid"
          },
          "result": {
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the Postgres service. Alphanumerical string with whitespaces up to 50 characters.",
                "minLength": 1,
                "maxLength": 50
              },
              "provider": {
                "type": "string",
                "description": "The cloud provider for a Postgres service.",
                "enum": [
                  "aws"
                ]
              },
              "region": {
                "type": "string",
                "description": "The cloud region for a Postgres service."
              },
              "postgresVersion": {
                "type": "string",
                "enum": [
                  "18",
                  "17"
                ]
              },
              "size": {
                "type": "string",
                "description": "The VM size for a Postgres service.",
                "enum": [
                  "c6gd.large",
                  "c6gd.xlarge",
                  "c6gd.2xlarge",
                  "c6gd.4xlarge",
                  "c6gd.8xlarge",
                  "c6gd.16xlarge",
                  "i7i.large",
                  "i7i.xlarge",
                  "i7i.2xlarge",
                  "i7i.4xlarge",
                  "i7i.8xlarge",
                  "i7i.12xlarge",
                  "i7i.16xlarge",
                  "i7i.24xlarge",
                  "i7ie.large",
                  "i7ie.xlarge",
                  "i7ie.2xlarge",
                  "i7ie.3xlarge",
                  "i7ie.6xlarge",
                  "i7ie.12xlarge",
                  "i7ie.18xlarge",
                  "i7ie.24xlarge",
                  "i8g.large",
                  "i8g.xlarge",
                  "i8g.2xlarge",
                  "i8g.4xlarge",
                  "i8g.8xlarge",
                  "i8g.16xlarge",
                  "i8g.24xlarge",
                  "i8ge.large",
                  "i8ge.xlarge",
                  "i8ge.2xlarge",
                  "i8ge.3xlarge",
                  "i8ge.6xlarge",
                  "i8ge.12xlarge",
                  "i8ge.18xlarge",
                  "i8ge.24xlarge",
                  "m6gd.large",
                  "m6gd.xlarge",
                  "m6gd.2xlarge",
                  "m6gd.4xlarge",
                  "m6gd.8xlarge",
                  "m6gd.16xlarge",
                  "m6id.large",
                  "m6id.xlarge",
                  "m6id.2xlarge",
                  "m6id.4xlarge",
                  "m6id.8xlarge",
                  "m6id.16xlarge",
                  "m8gd.large",
                  "m8gd.xlarge",
                  "m8gd.2xlarge",
                  "m8gd.4xlarge",
                  "m8gd.8xlarge",
                  "m8gd.16xlarge",
                  "r6gd.medium",
                  "r6gd.large",
                  "r6gd.xlarge",
                  "r6gd.2xlarge",
                  "r6gd.4xlarge",
                  "r6gd.8xlarge",
                  "r6gd.12xlarge",
                  "r6gd.16xlarge",
                  "r6id.large",
                  "r6id.xlarge",
                  "r6id.2xlarge",
                  "r6id.4xlarge",
                  "r6id.8xlarge",
                  "r6id.12xlarge",
                  "r6id.16xlarge",
                  "r6id.24xlarge",
                  "r6id.32xlarge",
                  "r8gd.medium",
                  "r8gd.large",
                  "r8gd.xlarge",
                  "r8gd.2xlarge",
                  "r8gd.4xlarge",
                  "r8gd.8xlarge",
                  "r8gd.12xlarge",
                  "r8gd.16xlarge",
                  "r8gd.24xlarge",
                  "r8gd.48xlarge"
                ]
              },
              "haType": {
                "type": "string",
                "description": "Type of high availability: “none” for no replication, “async” for asynchronous replication to a single standby, and “sync” for synchronous replication to two standbys.",
                "enum": [
                  "none",
                  "async",
                  "sync"
                ]
              },
              "tags": {
                "type": "array",
                "description": "Tags associated with the Postgres service. Tag keys starting with “chc_” are reserved for internal use.",
                "maxItems": 50,
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "description": "Tag key. Must be alphanumeric with dashes, underscores and dots.",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-zA-Z0-9._-]+$"
                    },
                    "value": {
                      "type": "string",
                      "description": "Tag value. Must be alphanumeric with dashes, underscores and dots.",
                      "maxLength": 256,
                      "pattern": "^[a-zA-Z0-9._-]+$"
                    }
                  },
                  "required": [
                    "key"
                  ],
                  "additionalProperties": false
                }
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "storageSize": {
                "type": "integer",
                "description": "The storage size, in GiB, which must be supported by the specified `size`."
              },
              "state": {
                "type": "string",
                "description": "Current state of the service",
                "enum": [
                  "creating",
                  "restarting",
                  "running",
                  "replaying_wal",
                  "restoring_backup",
                  "finalizing_restore",
                  "unavailable",
                  "stopped",
                  "deleting"
                ]
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "isPrimary": {
                "type": "boolean",
                "description": "True if this service is the primary service in the data warehouse",
                "default": false
              },
              "connectionString": {
                "type": "string",
                "description": "Connection string to the Postgres service. Embeds the service password, so it is only returned when the service is created or its password is reset. Omitted from every other response when Postgres credential redaction is enabled for the organization. Not guaranteed to be present — treat as optional."
              },
              "username": {
                "type": "string",
                "description": "Username for the Postgres service"
              },
              "password": {
                "type": "string",
                "description": "Password for the Postgres service. Only returned when the service is created or its password is reset. Omitted from every other response when Postgres credential redaction is enabled for the organization. Not guaranteed to be present — treat as optional."
              },
              "hostname": {
                "type": "string",
                "description": "Hostname for the Postgres service"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute clickhouse_postgres_service_create --payload '{
  "organizationId": "string",
  "name": "string",
  "provider": "aws",
  "region": "string",
  "size": "c6gd.large"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.
* Billing mode: `no_bill`.
