Skip to main content

byoc_infrastructures

Creates, updates, deletes, gets or lists a byoc_infrastructures resource.

Overview

Namebyoc_infrastructures
TypeResource
Idclickhouse.organizations.byoc_infrastructures

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
createinsertorganization_idCreate a new BYOC Infrastructure in the organization. Returns the configuration of the newly created infrastructure
updateupdatebyoc_infrastructure_id, organization_idUpdate configuration of the BYOC infrastructure. Returns the modified infrastructure
deletedeletebyoc_infrastructure_id, organization_idRemoves a BYOC Infrastructure from the organization

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
byoc_infrastructure_idstring (uuid)ID of the requested BYOC Infrastructure (wire: byocInfrastructureId)
organization_idstringClickHouse Cloud organization ID. Resolved from the CLICKHOUSE_ORG_ID environment variable when it is set (x-stackQL-envVar); otherwise it must be supplied on every query as WHERE organization_id = <uuid>. A WHERE value always takes precedence over the environment. (x-stackQL-envVar: CLICKHOUSE_ORG_ID)

INSERT examples

Create a new BYOC Infrastructure in the organization. Returns the configuration of the newly created infrastructure

INSERT INTO clickhouse.organizations.byoc_infrastructures (
region_id,
account_id,
availability_zone_suffixes,
vpc_cidr_range,
display_name,
organization_id
)
SELECT
'{{ region_id }}',
'{{ account_id }}',
'{{ availability_zone_suffixes }}',
'{{ vpc_cidr_range }}',
'{{ display_name }}',
'{{ organization_id }}'
RETURNING
request_id,
result,
status
;

UPDATE examples

Update configuration of the BYOC infrastructure. Returns the modified infrastructure

UPDATE clickhouse.organizations.byoc_infrastructures
SET
display_name = '{{ display_name }}'
WHERE
byoc_infrastructure_id = '{{ byoc_infrastructure_id }}' --required
AND organization_id = '{{ organization_id }}' --required unless CLICKHOUSE_ORG_ID is set
RETURNING
request_id,
result,
status;

DELETE examples

Removes a BYOC Infrastructure from the organization

DELETE FROM clickhouse.organizations.byoc_infrastructures
WHERE byoc_infrastructure_id = '{{ byoc_infrastructure_id }}' --required
AND organization_id = '{{ organization_id }}' --required unless CLICKHOUSE_ORG_ID is set
;