openapi: 3.2.0 info: title: Ubicloud Postgres Metric Destination API version: 0.1.0 contact: url: https://www.ubicloud.com/ email: support@ubicloud.com license: name: GNU Affero General Public License v3.0 (AGPL-3.0) url: https://www.gnu.org/licenses/agpl-3.0.en.html description: 'Operations tagged Postgres Metric Destination across 2 of this provider''s published API definitions: ubicloud-openapi.yml, ubicloud-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.ubicloud.com security: - BearerAuth: [] tags: - description: Postgres Metric Destination name: Postgres Metric Destination paths: /project/{project_id}/location/{location}/postgres/{postgres_database_reference}/metric-destination: parameters: - $ref: '#/components/parameters/location' - $ref: '#/components/parameters/postgres_database_reference' - $ref: '#/components/parameters/project_id' post: operationId: createLocationPostgresMetricDestination summary: Create a new PostgreSQL metric destination requestBody: required: true content: application/json: schema: type: object properties: options: description: 'Additional Prometheus remote_write authentication, as {"authorization": {"type": "Bearer", "credentials": "token"}} and/or {"headers": {"Header-Name": "value"}}' type: - object - 'null' password: description: Password for basic auth, required with username type: - string - 'null' url: description: URL for the Metric Destination type: string username: description: Username for basic auth, required with password type: - string - 'null' additionalProperties: false required: - url responses: '200': $ref: '#/components/responses/PostgresDatabase' default: $ref: '#/components/responses/Error' tags: - Postgres Metric Destination servers: - url: https://api.ubicloud.com ? /project/{project_id}/location/{location}/postgres/{postgres_database_reference}/metric-destination/{metric_destination_id} : parameters: - $ref: '#/components/parameters/location' - $ref: '#/components/parameters/metric_destination_id' - $ref: '#/components/parameters/postgres_database_reference' - $ref: '#/components/parameters/project_id' delete: operationId: deleteLocationPostgresMetricDestination summary: Delete a specific metric destination responses: '204': $ref: '#/components/responses/Delete' default: $ref: '#/components/responses/Error' tags: - Postgres Metric Destination servers: - url: https://api.ubicloud.com components: responses: Delete: description: An empty response after successful resource delete Error: description: An error response content: application/json: schema: $ref: '#/components/schemas/Error' PostgresDatabase: description: A Postgres Database content: application/json: schema: type: object additionalProperties: false allOf: - $ref: '#/components/schemas/PostgresDatabase' - additionalProperties: false properties: connection_string: description: Connection string to the Postgres database type: - string - 'null' private_connection_string: description: Private connection string to the Postgres database, accessible from connected subnets type: - string - 'null' username: description: Username for the Postgres database type: - string - 'null' password: description: Password for the Postgres database type: - string - 'null' hostname: description: Hostname for the Postgres database type: - string - 'null' earliest_restore_time: description: Earliest restore time (if primary) type: - string - 'null' firewall_rules: description: List of Postgres firewall rules type: array items: $ref: '#/components/schemas/PostgresFirewallRule' latest_restore_time: description: Latest restore time (if primary)" type: string primary: description: Is the database primary type: boolean maintenance_window_start_at: description: Maintenance window start time type: - integer - 'null' tags: description: Tags of the Postgres database type: array items: $ref: '#/components/schemas/PostgresTag' required: - connection_string - private_connection_string - username - password - hostname - earliest_restore_time - firewall_rules - latest_restore_time - primary - maintenance_window_start_at - tags parameters: postgres_database_reference: description: Postgres database ID or name examples: id: value: pgn30gjk1d1e2jj34v9x0dq4rp name: value: postgres-database-name in: path name: postgres_database_reference required: true schema: $ref: '#/components/schemas/Reference' location: description: The Ubicloud location/region in: path name: location required: true schema: type: string example: eu-central-h1 project_id: description: ID of the project in: path name: project_id required: true schema: type: string example: pjkkmx0f2vke4h36nk9cm8v8q0 pattern: ^pj[0-9a-hj-km-np-tv-z]{24}$ metric_destination_id: description: Postgres Metric Destination ID in: path name: metric_destination_id required: true schema: type: string example: et7ekmf54nae5nya9s6vebg43f pattern: ^(et|md)[0-9a-hj-km-np-tv-z]{24}$ schemas: PostgresFirewallRule: type: object properties: cidr: description: CIDR of the firewall rule type: string description: description: Port information for the firewall rule type: string id: description: ID of the firewall rule type: string example: frmjgkgbktw62k53005jpx8tt7 pattern: ^fr[0-9a-hj-km-np-tv-z]{24}$ port: description: Port for the Postgres firewall rule type: integer additionalProperties: false required: - cidr - id Error: type: object properties: error: type: object additionalProperties: false properties: code: type: integer example: 401 message: type: string example: There was an error logging in type: type: string example: InvalidCredentials details: type: - object - 'null' required: - code - message - type additionalProperties: false required: - error PostgresTag: type: object properties: key: description: Key of the Postgres tag type: string value: description: Value of the Postgres tag type: string additionalProperties: false required: - key - value Reference: description: Resource ID or name type: string pattern: ^[a-z0-9](?:[a-z0-9\-]{0,61}[a-z0-9])?$ PostgresDatabase: type: object properties: flavor: description: Deprecated. Always standard. type: string deprecated: true ha_type: description: High availability type type: string target_server_count: description: Target number of servers (primary + standbys) type: integer id: description: ID of the Postgres database type: string example: pgn30gjk1d1e2jj34v9x0dq4rp pattern: ^pg[0-9a-hj-km-np-tv-z]{24}$ location: description: Location of the Postgres database type: string name: description: Name of the Postgres database type: string state: description: State of the Postgres database type: string storage_size_gib: description: Storage size in GiB type: integer target_storage_size_gib: description: Desired storage size in GiB type: integer version: description: Current Postgres version type: string enum: - '16' - '17' - '18' target_version: description: Target Postgres version type: string enum: - '16' - '17' - '18' vm_size: description: Size of the underlying VM type: string target_vm_size: description: Desired VM size type: string ca_certificates: description: CA certificates of the root CA used to issue postgres server certificates type: - string - 'null' maintenance_window_start_at: description: Maintenance window start time type: - integer - 'null' maintenance_window_days: description: Days of the week the maintenance window applies to (empty list means every day) type: array items: $ref: '#/components/schemas/MaintenanceWindowDay' read_replica: description: If the database is a read replica or not type: boolean parent: description: Parent Postgres database type: - string - 'null' fallback_active: description: Whether the primary server is running on a fallback instance type type: boolean tags: description: Tags of the Postgres database type: array items: $ref: '#/components/schemas/PostgresTag' created_at: description: Creation timestamp of the Postgres database type: string format: date-time additionalProperties: false required: - flavor - ha_type - target_server_count - id - location - name - state - storage_size_gib - version - target_version - vm_size - maintenance_window_start_at - read_replica - fallback_active - tags - created_at x-go-name: PostgresDatabaseSchema MaintenanceWindowDay: type: string enum: - mon - tue - wed - thu - fri - sat - sun securitySchemes: BearerAuth: bearerFormat: JWT scheme: bearer type: http x-refined-from: - ubicloud-openapi.yml - ubicloud-openapi.yml