@distilled.cloud/clickhouse-cloud 0.0.0-stage → 1.0.0-rc.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +138 -2
- package/lib/.lazy.json +1 -0
- package/lib/_bundle/lazy.js +4 -0
- package/lib/_bundle/sdk.js +2 -0
- package/lib/_bundle/sdk.js.map +1 -0
- package/lib/credentials.d.ts +34 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +1 -0
- package/lib/errors.d.ts +58 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +1 -0
- package/lib/index.d.ts +49 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +6 -0
- package/lib/pagination.d.ts +10 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +1 -0
- package/lib/protocol.d.ts +19 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +1 -0
- package/lib/retry.d.ts +35 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +1 -0
- package/lib/services/api_keys.d.ts +175 -0
- package/lib/services/api_keys.d.ts.map +1 -0
- package/lib/services/api_keys.js +2 -0
- package/lib/services/api_keys.js.map +1 -0
- package/lib/services/backup.d.ts +117 -0
- package/lib/services/backup.d.ts.map +1 -0
- package/lib/services/backup.js +2 -0
- package/lib/services/backup.js.map +1 -0
- package/lib/services/billing.d.ts +69 -0
- package/lib/services/billing.d.ts.map +1 -0
- package/lib/services/billing.js +2 -0
- package/lib/services/billing.js.map +1 -0
- package/lib/services/click_pipes.d.ts +1637 -0
- package/lib/services/click_pipes.d.ts.map +1 -0
- package/lib/services/click_pipes.js +31 -0
- package/lib/services/click_pipes.js.map +1 -0
- package/lib/services/index.d.ts +14 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +13 -0
- package/lib/services/organization.d.ts +336 -0
- package/lib/services/organization.d.ts.map +1 -0
- package/lib/services/organization.js +2 -0
- package/lib/services/organization.js.map +1 -0
- package/lib/services/postgres.d.ts +726 -0
- package/lib/services/postgres.d.ts.map +1 -0
- package/lib/services/postgres.js +31 -0
- package/lib/services/postgres.js.map +1 -0
- package/lib/services/prometheus.d.ts +71 -0
- package/lib/services/prometheus.d.ts.map +1 -0
- package/lib/services/prometheus.js +2 -0
- package/lib/services/prometheus.js.map +1 -0
- package/lib/services/query_api_endpoints.d.ts +189 -0
- package/lib/services/query_api_endpoints.d.ts.map +1 -0
- package/lib/services/query_api_endpoints.js +2 -0
- package/lib/services/query_api_endpoints.js.map +1 -0
- package/lib/services/role_management.d.ts +159 -0
- package/lib/services/role_management.d.ts.map +1 -0
- package/lib/services/role_management.js +2 -0
- package/lib/services/role_management.js.map +1 -0
- package/lib/services/saved_queries.d.ts +129 -0
- package/lib/services/saved_queries.d.ts.map +1 -0
- package/lib/services/saved_queries.js +2 -0
- package/lib/services/saved_queries.js.map +1 -0
- package/lib/services/service.d.ts +886 -0
- package/lib/services/service.d.ts.map +1 -0
- package/lib/services/service.js +41 -0
- package/lib/services/service.js.map +1 -0
- package/lib/services/udf.d.ts +373 -0
- package/lib/services/udf.d.ts.map +1 -0
- package/lib/services/udf.js +24 -0
- package/lib/services/udf.js.map +1 -0
- package/lib/services/user_management.d.ts +150 -0
- package/lib/services/user_management.d.ts.map +1 -0
- package/lib/services/user_management.js +2 -0
- package/lib/services/user_management.js.map +1 -0
- package/lib/services.lazy/api_keys.js +1 -0
- package/lib/services.lazy/backup.js +1 -0
- package/lib/services.lazy/billing.js +1 -0
- package/lib/services.lazy/click_pipes.js +3 -0
- package/lib/services.lazy/index.js +3 -0
- package/lib/services.lazy/organization.js +1 -0
- package/lib/services.lazy/postgres.js +4 -0
- package/lib/services.lazy/prometheus.js +1 -0
- package/lib/services.lazy/query_api_endpoints.js +1 -0
- package/lib/services.lazy/role_management.js +1 -0
- package/lib/services.lazy/saved_queries.js +1 -0
- package/lib/services.lazy/service.js +4 -0
- package/lib/services.lazy/udf.js +3 -0
- package/lib/services.lazy/user_management.js +1 -0
- package/lib/traits.d.ts +11 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +1 -0
- package/lib/unstable-services/backup.d.ts +165 -0
- package/lib/unstable-services/backup.d.ts.map +1 -0
- package/lib/unstable-services/backup.js +2 -0
- package/lib/unstable-services/backup.js.map +1 -0
- package/lib/unstable-services/billing.d.ts +84 -0
- package/lib/unstable-services/billing.d.ts.map +1 -0
- package/lib/unstable-services/billing.js +2 -0
- package/lib/unstable-services/billing.js.map +1 -0
- package/lib/unstable-services/click_pipes.d.ts +324 -0
- package/lib/unstable-services/click_pipes.d.ts.map +1 -0
- package/lib/unstable-services/click_pipes.js +2 -0
- package/lib/unstable-services/click_pipes.js.map +1 -0
- package/lib/unstable-services/click_stack.d.ts +3538 -0
- package/lib/unstable-services/click_stack.d.ts.map +1 -0
- package/lib/unstable-services/click_stack.js +60 -0
- package/lib/unstable-services/click_stack.js.map +1 -0
- package/lib/unstable-services/index.d.ts +11 -0
- package/lib/unstable-services/index.d.ts.map +1 -0
- package/lib/unstable-services/index.js +10 -0
- package/lib/unstable-services/notifications.d.ts +166 -0
- package/lib/unstable-services/notifications.d.ts.map +1 -0
- package/lib/unstable-services/notifications.js +2 -0
- package/lib/unstable-services/notifications.js.map +1 -0
- package/lib/unstable-services/organization.d.ts +403 -0
- package/lib/unstable-services/organization.d.ts.map +1 -0
- package/lib/unstable-services/organization.js +26 -0
- package/lib/unstable-services/organization.js.map +1 -0
- package/lib/unstable-services/postgres.d.ts +415 -0
- package/lib/unstable-services/postgres.d.ts.map +1 -0
- package/lib/unstable-services/postgres.js +2 -0
- package/lib/unstable-services/postgres.js.map +1 -0
- package/lib/unstable-services/service.d.ts +244 -0
- package/lib/unstable-services/service.d.ts.map +1 -0
- package/lib/unstable-services/service.js +2 -0
- package/lib/unstable-services/service.js.map +1 -0
- package/lib/unstable-services/snapshot.d.ts +146 -0
- package/lib/unstable-services/snapshot.d.ts.map +1 -0
- package/lib/unstable-services/snapshot.js +2 -0
- package/lib/unstable-services/snapshot.js.map +1 -0
- package/lib/unstable-services/user_management.d.ts +41 -0
- package/lib/unstable-services/user_management.d.ts.map +1 -0
- package/lib/unstable-services/user_management.js +2 -0
- package/lib/unstable-services/user_management.js.map +1 -0
- package/lib/unstable-services.lazy/backup.js +1 -0
- package/lib/unstable-services.lazy/billing.js +1 -0
- package/lib/unstable-services.lazy/click_pipes.js +1 -0
- package/lib/unstable-services.lazy/click_stack.js +4 -0
- package/lib/unstable-services.lazy/index.js +3 -0
- package/lib/unstable-services.lazy/notifications.js +1 -0
- package/lib/unstable-services.lazy/organization.js +4 -0
- package/lib/unstable-services.lazy/postgres.js +1 -0
- package/lib/unstable-services.lazy/service.js +1 -0
- package/lib/unstable-services.lazy/snapshot.js +1 -0
- package/lib/unstable-services.lazy/user_management.js +1 -0
- package/package.json +94 -3
- package/src/credentials.ts +88 -0
- package/src/errors.ts +76 -0
- package/src/index.ts +53 -0
- package/src/pagination.ts +9 -0
- package/src/protocol.ts +76 -0
- package/src/retry.ts +53 -0
- package/src/services/api_keys.ts +466 -0
- package/src/services/backup.ts +347 -0
- package/src/services/billing.ts +170 -0
- package/src/services/click_pipes.ts +3483 -0
- package/src/services/index.ts +14 -0
- package/src/services/organization.ts +901 -0
- package/src/services/postgres.ts +1967 -0
- package/src/services/prometheus.ts +271 -0
- package/src/services/query_api_endpoints.ts +466 -0
- package/src/services/role_management.ts +436 -0
- package/src/services/saved_queries.ts +384 -0
- package/src/services/service.ts +2112 -0
- package/src/services/udf.ts +1019 -0
- package/src/services/user_management.ts +508 -0
- package/src/traits.ts +45 -0
- package/src/unstable-services/backup.ts +422 -0
- package/src/unstable-services/billing.ts +232 -0
- package/src/unstable-services/click_pipes.ts +702 -0
- package/src/unstable-services/click_stack.ts +7114 -0
- package/src/unstable-services/index.ts +11 -0
- package/src/unstable-services/notifications.ts +451 -0
- package/src/unstable-services/organization.ts +1107 -0
- package/src/unstable-services/postgres.ts +1061 -0
- package/src/unstable-services/service.ts +795 -0
- package/src/unstable-services/snapshot.ts +397 -0
- package/src/unstable-services/user_management.ts +127 -0
|
@@ -0,0 +1,901 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as C from "@distilled.cloud/core/category";
|
|
3
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-clickhouse-cloud/specs/openapi.json). Do not edit.
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
|
+
import { ClickHouseCloudServiceErrors } from "../errors.ts";
|
|
7
|
+
import { paginateCursor } from "../pagination.ts";
|
|
8
|
+
import {
|
|
9
|
+
ClickHouseCloudProtocol,
|
|
10
|
+
ClickHouseCloudPaginatedProtocol,
|
|
11
|
+
type ClickHouseCloudOpError,
|
|
12
|
+
type ClickHouseCloudOpContext,
|
|
13
|
+
} from "../protocol.ts";
|
|
14
|
+
import * as Retry from "../retry.ts";
|
|
15
|
+
import * as T from "../traits.ts";
|
|
16
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
17
|
+
const __s: any[] = [];
|
|
18
|
+
|
|
19
|
+
export type { ClickHouseCloudOpError, ClickHouseCloudOpContext };
|
|
20
|
+
|
|
21
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
22
|
+
const TELEMETRY = {
|
|
23
|
+
system: "clickhouse-cloud-api",
|
|
24
|
+
responseHeaders: [
|
|
25
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
26
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
27
|
+
],
|
|
28
|
+
prefix: "ClickhouseCloud",
|
|
29
|
+
service: "Organizations",
|
|
30
|
+
labels: "clickhouse_cloud",
|
|
31
|
+
propagate: "w3c",
|
|
32
|
+
} as const;
|
|
33
|
+
|
|
34
|
+
/** The feature is not available to this organization or service: its plan does not include it, it is not enabled for the organization, or it is not set up. The message says which. */
|
|
35
|
+
export class FeatureUnavailable
|
|
36
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
37
|
+
/*@__PURE__*/ S.TaggedError<FeatureUnavailable>()("FeatureUnavailable", {
|
|
38
|
+
message: S.String,
|
|
39
|
+
body: /*@__PURE__*/ S.optional(S.Unknown),
|
|
40
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
41
|
+
}).pipe(C.withAuthError),
|
|
42
|
+
[{ status: 403, message: { includes: "Not a byoc organization" } }],
|
|
43
|
+
) {}
|
|
44
|
+
|
|
45
|
+
/** Region in which the BYOC infrastructure will be located */
|
|
46
|
+
export type CreateByocInfrastructureRequestRegionId =
|
|
47
|
+
| "ap-northeast-1"
|
|
48
|
+
| "ap-northeast-2"
|
|
49
|
+
| "ap-south-1"
|
|
50
|
+
| "ap-southeast-1"
|
|
51
|
+
| "ap-southeast-2"
|
|
52
|
+
| "ca-central-1"
|
|
53
|
+
| "eu-central-1"
|
|
54
|
+
| "eu-west-1"
|
|
55
|
+
| "eu-west-2"
|
|
56
|
+
| "il-central-1"
|
|
57
|
+
| "us-east-1"
|
|
58
|
+
| "us-east-2"
|
|
59
|
+
| "us-west-2"
|
|
60
|
+
| "us-east1"
|
|
61
|
+
| "us-central1"
|
|
62
|
+
| "europe-west2"
|
|
63
|
+
| "europe-west4"
|
|
64
|
+
| "asia-southeast1"
|
|
65
|
+
| "asia-northeast1"
|
|
66
|
+
| "eastus"
|
|
67
|
+
| "eastus2"
|
|
68
|
+
| "westus3"
|
|
69
|
+
| "germanywestcentral"
|
|
70
|
+
| "centralus";
|
|
71
|
+
export type CreateByocInfrastructureRequestAvailabilityZoneSuffixesItem =
|
|
72
|
+
| "a"
|
|
73
|
+
| "b"
|
|
74
|
+
| "c"
|
|
75
|
+
| "d"
|
|
76
|
+
| "e"
|
|
77
|
+
| "f";
|
|
78
|
+
/** List of availability zone suffixes */
|
|
79
|
+
export type CreateByocInfrastructureRequestAvailabilityZoneSuffixesList = Array<
|
|
80
|
+
CreateByocInfrastructureRequestAvailabilityZoneSuffixesItem | (string & {})
|
|
81
|
+
>;
|
|
82
|
+
/** BYO-VPC only: private subnet IDs or names (1-6 entries on AWS, exactly one on GCP) */
|
|
83
|
+
export type CreateByocInfrastructureRequestPrivateSubnetIdsList = Array<string>;
|
|
84
|
+
/** AWS BYO-VPC only: public subnet IDs (at most 6 entries) */
|
|
85
|
+
export type CreateByocInfrastructureRequestPublicSubnetIdsList = Array<string>;
|
|
86
|
+
/** GCP BYO-VPC only: secondary IP range names on the subnet to use for pod IPs. Omitted: all secondary ranges are used */
|
|
87
|
+
export type CreateByocInfrastructureRequestGcpPodCidrRangeNamesList = Array<string>;
|
|
88
|
+
export type ByocInfrastructureTags = { [key: string]: string | undefined };
|
|
89
|
+
/** At least three distinct availability zones of the region. Omitted: the region default */
|
|
90
|
+
export type ByocRestrictedFactsAvailabilityZonesList = Array<string>;
|
|
91
|
+
/** Direct image mode only (required there): IAM roles of the cluster nodes, in `accountId` */
|
|
92
|
+
export type ByocRestrictedFactsNodeRoleArnsList = Array<string>;
|
|
93
|
+
export interface ByocRestrictedFacts {
|
|
94
|
+
/** Name of the EKS cluster the connector runs in */
|
|
95
|
+
clusterName: string;
|
|
96
|
+
/** Node group the platform components run on. Omitted: `system` */
|
|
97
|
+
platformNodeGroup?: string | undefined;
|
|
98
|
+
/** At least three distinct availability zones of the region. Omitted: the region default */
|
|
99
|
+
availabilityZones?: ByocRestrictedFactsAvailabilityZonesList | undefined;
|
|
100
|
+
/** Prefix of the namespace each service runs in. Must match the executor configuration. Omitted: `ns-` */
|
|
101
|
+
namespacePrefix?: string | undefined;
|
|
102
|
+
/** Direct image mode only (required there): IAM role of the connector executor, in `accountId` */
|
|
103
|
+
executorRoleArn?: string | undefined;
|
|
104
|
+
/** Direct image mode only (required there): IAM roles of the cluster nodes, in `accountId` */
|
|
105
|
+
nodeRoleArns?: ByocRestrictedFactsNodeRoleArnsList | undefined;
|
|
106
|
+
/** How the connector pulls platform images: `direct` from the ClickHouse registry, or `bundle` from `imageRegistry` */
|
|
107
|
+
imageMode: string;
|
|
108
|
+
/** Bundle image mode only (required there): OCI repository root holding the platform images */
|
|
109
|
+
imageRegistry?: string | undefined;
|
|
110
|
+
/** S3 bucket services store data in */
|
|
111
|
+
dataBucket: string;
|
|
112
|
+
/** S3 bucket services store backups in */
|
|
113
|
+
backupBucket: string;
|
|
114
|
+
/** IAM role services assume to reach the buckets, in `accountId` */
|
|
115
|
+
storageRoleArn: string;
|
|
116
|
+
/** Remote-write URL of the connector scraper. Required unless `enableMonitoring` is false */
|
|
117
|
+
scraperEndpoint?: string | undefined;
|
|
118
|
+
/** Install the monitoring components. Default true */
|
|
119
|
+
enableMonitoring?: boolean | undefined;
|
|
120
|
+
/** Install the volume snapshot controller. Default true */
|
|
121
|
+
enableSnapshotController?: boolean | undefined;
|
|
122
|
+
/** Install the ClickHouse autoscaler. Default false */
|
|
123
|
+
enableAutoscaler?: boolean | undefined;
|
|
124
|
+
}
|
|
125
|
+
export interface CreateByocInfrastructureRequest {
|
|
126
|
+
/** ID of the requested organization. */
|
|
127
|
+
organizationId: string;
|
|
128
|
+
/** Region in which the BYOC infrastructure will be located */
|
|
129
|
+
regionId: CreateByocInfrastructureRequestRegionId | (string & {});
|
|
130
|
+
/** Cloud account ID the BYOC infrastructure is configured for: AWS account ID, GCP project ID, or Azure subscription ID */
|
|
131
|
+
accountId: string;
|
|
132
|
+
/** List of availability zone suffixes */
|
|
133
|
+
availabilityZoneSuffixes?:
|
|
134
|
+
| CreateByocInfrastructureRequestAvailabilityZoneSuffixesList
|
|
135
|
+
| undefined;
|
|
136
|
+
/** CIDR range for the ClickHouse-managed VPC. Mutually exclusive with the BYO-VPC fields (`vpcId`, `privateSubnetIds`, `publicSubnetIds`) */
|
|
137
|
+
vpcCidrRange?: string | undefined;
|
|
138
|
+
/** AWS only: ExternalID baked into the ClickHouse management role trust policy in your account */
|
|
139
|
+
externalId?: string | undefined;
|
|
140
|
+
/** Azure only (required for Azure regions): Entra tenant ID of the subscription */
|
|
141
|
+
tenantId?: string | undefined;
|
|
142
|
+
/** Azure only (required for Azure regions): client ID of the service principal ClickHouse uses to manage the infrastructure */
|
|
143
|
+
servicePrincipalClientId?: string | undefined;
|
|
144
|
+
/** BYO-VPC only (AWS and GCP): ID or network name of the customer-provided VPC to deploy into. Requires `privateSubnetIds` */
|
|
145
|
+
vpcId?: string | undefined;
|
|
146
|
+
/** BYO-VPC only: private subnet IDs or names (1-6 entries on AWS, exactly one on GCP) */
|
|
147
|
+
privateSubnetIds?: CreateByocInfrastructureRequestPrivateSubnetIdsList | undefined;
|
|
148
|
+
/** AWS BYO-VPC only: public subnet IDs (at most 6 entries) */
|
|
149
|
+
publicSubnetIds?: CreateByocInfrastructureRequestPublicSubnetIdsList | undefined;
|
|
150
|
+
/** GCP BYO-VPC only: secondary IP range names on the subnet to use for pod IPs. Omitted: all secondary ranges are used */
|
|
151
|
+
gcpPodCidrRangeNames?: CreateByocInfrastructureRequestGcpPodCidrRangeNamesList | undefined;
|
|
152
|
+
/** GCP BYO-VPC only: Shared VPC host project owning the VPC and subnet, when different from `accountId` */
|
|
153
|
+
gcpSharedVpcHostProjectId?: string | undefined;
|
|
154
|
+
tags?: ByocInfrastructureTags | undefined;
|
|
155
|
+
/** How ClickHouse reaches the infrastructure. `standard` (default) provisions it through a management role in your account; `restricted` registers a cluster you own, reached only through the connector you install. `restricted` is AWS only and requires `restrictedFacts` */
|
|
156
|
+
accessModel?: string | undefined;
|
|
157
|
+
restrictedFacts?: ByocRestrictedFacts | undefined;
|
|
158
|
+
/** Human readable name for infrastructure */
|
|
159
|
+
displayName?: string | undefined;
|
|
160
|
+
}
|
|
161
|
+
/** Region for which the BYOC has been configured and where it is possible to create services */
|
|
162
|
+
export type ByocConfigRegionId =
|
|
163
|
+
| "ap-northeast-1"
|
|
164
|
+
| "ap-northeast-2"
|
|
165
|
+
| "ap-south-1"
|
|
166
|
+
| "ap-southeast-1"
|
|
167
|
+
| "ap-southeast-2"
|
|
168
|
+
| "ca-central-1"
|
|
169
|
+
| "eu-central-1"
|
|
170
|
+
| "eu-west-1"
|
|
171
|
+
| "eu-west-2"
|
|
172
|
+
| "il-central-1"
|
|
173
|
+
| "us-east-1"
|
|
174
|
+
| "us-east-2"
|
|
175
|
+
| "us-west-2"
|
|
176
|
+
| "us-east1"
|
|
177
|
+
| "us-central1"
|
|
178
|
+
| "europe-west2"
|
|
179
|
+
| "europe-west4"
|
|
180
|
+
| "asia-southeast1"
|
|
181
|
+
| "asia-northeast1"
|
|
182
|
+
| "eastus"
|
|
183
|
+
| "eastus2"
|
|
184
|
+
| "westus3"
|
|
185
|
+
| "germanywestcentral"
|
|
186
|
+
| "centralus";
|
|
187
|
+
/** Cloud provider of the region */
|
|
188
|
+
export type ByocConfigCloudProvider = "gcp" | "aws" | "azure";
|
|
189
|
+
export interface ByocConfig {
|
|
190
|
+
/** Unique identifier of the BYOC configuration */
|
|
191
|
+
id: string;
|
|
192
|
+
/** State of the infrastructure. Current values: 'infra-provisioning', 'infra-terminated', 'infra-terminating', 'infra-ready', 'infra-degraded', 'infra-upgrading', 'infra-awaiting-connector'. New states may be added; treat an unknown state as not ready */
|
|
193
|
+
state?: string | undefined;
|
|
194
|
+
/** Cloud account ID the BYOC infrastructure is bound to: AWS account ID, GCP project ID, or Azure subscription ID */
|
|
195
|
+
accountId?: string | undefined;
|
|
196
|
+
/** DEPRECATED. Use `accountId` instead. Cloud account ID the BYOC infrastructure is bound to */
|
|
197
|
+
accountName?: string | undefined;
|
|
198
|
+
/** Region for which the BYOC has been configured and where it is possible to create services */
|
|
199
|
+
regionId?: ByocConfigRegionId | undefined;
|
|
200
|
+
/** Cloud provider of the region */
|
|
201
|
+
cloudProvider?: ByocConfigCloudProvider | undefined;
|
|
202
|
+
/** Human readable name for infrastructure */
|
|
203
|
+
displayName?: string | undefined;
|
|
204
|
+
/** How ClickHouse reaches the infrastructure: `standard` through a management role in your account, or `restricted` through a connector you install in a cluster you own */
|
|
205
|
+
accessModel?: string | undefined;
|
|
206
|
+
}
|
|
207
|
+
export interface DeleteByocInfrastructureRequest {
|
|
208
|
+
/** ID of the requested organization. */
|
|
209
|
+
organizationId: string;
|
|
210
|
+
/** ID of the requested BYOC Infrastructure */
|
|
211
|
+
byocInfrastructureId: string;
|
|
212
|
+
}
|
|
213
|
+
export interface DeleteByocInfrastructureResponse {
|
|
214
|
+
/** HTTP status code. */
|
|
215
|
+
status?: number | undefined;
|
|
216
|
+
/** Unique id assigned to every request. UUIDv4 */
|
|
217
|
+
requestId?: string | undefined;
|
|
218
|
+
}
|
|
219
|
+
export interface GetActivityRequest {
|
|
220
|
+
/** ID of the requested organization. */
|
|
221
|
+
organizationId: string;
|
|
222
|
+
/** ID of the requested activity. */
|
|
223
|
+
activityId: string;
|
|
224
|
+
}
|
|
225
|
+
/** Type of the actor: 'user', 'support', 'system', 'api'. */
|
|
226
|
+
export type ActivityActorType = "user" | "support" | "system" | "api";
|
|
227
|
+
/** For 'openapi_key_update' activities: the type of update that was performed. */
|
|
228
|
+
export type ActivityKeyUpdateType =
|
|
229
|
+
| "created"
|
|
230
|
+
| "deleted"
|
|
231
|
+
| "name-changed"
|
|
232
|
+
| "role-changed"
|
|
233
|
+
| "state-changed"
|
|
234
|
+
| "date-changed"
|
|
235
|
+
| "ip-access-list-changed"
|
|
236
|
+
| "org-role-changed"
|
|
237
|
+
| "default-service-role-changed"
|
|
238
|
+
| "service-role-changed"
|
|
239
|
+
| "roles-v2-changed";
|
|
240
|
+
/** For role and actor-role activities: IDs of the affected roles. */
|
|
241
|
+
export type ActivityTargetRoleIdsList = Array<string>;
|
|
242
|
+
/** For role and actor-role activities: names of the affected roles, when recorded. */
|
|
243
|
+
export type ActivityTargetRoleNamesList = Array<string>;
|
|
244
|
+
/** For 'organization_member_update_roles' and 'organization_member_remove_roles' activities: IDs of the affected actors (e.g. 'user/<id>'). */
|
|
245
|
+
export type ActivityTargetActorIdsList = Array<string>;
|
|
246
|
+
/** For 'role_resources_delete' activities: IDs of the deleted resources the roles referenced. */
|
|
247
|
+
export type ActivityTargetResourceIdsList = Array<string>;
|
|
248
|
+
export interface Activity {
|
|
249
|
+
/** Unique activity ID. */
|
|
250
|
+
id?: string | undefined;
|
|
251
|
+
/** Timestamp of the activity. ISO-8601. */
|
|
252
|
+
createdAt?: string | undefined;
|
|
253
|
+
/** Type of the activity. One of 'create_organization', 'delete_organization', 'organization_update_name', 'transfer_service_in', 'transfer_service_out', 'save_payment_method', 'marketplace_subscription', 'migrate_marketplace_billing_details_in', 'migrate_marketplace_billing_details_out', 'organization_update_tier', 'organization_invite_create', 'organization_invite_delete', 'organization_member_join', 'organization_member_add', 'organization_member_leave', 'organization_member_delete', 'organization_member_update_role', 'organization_member_update_roles', 'organization_member_update_mfa_method', 'organization_saml_connection_create', 'organization_saml_connection_update', 'user_login', 'user_login_failed', 'user_logout', 'key_create', 'key_delete', 'openapi_key_update', 'service_create', 'service_start', 'service_stop', 'service_awaken', 'service_idle', 'service_running', 'service_partially_running', 'service_delete', 'service_update_name', 'service_update_ip_access_list', 'service_update_autoscaling_memory', 'service_update_autoscaling_idling', 'service_update_password', 'service_update_autoscaling_replicas', 'service_update_max_allowable_replicas', 'service_update_backup_configuration', 'service_restore_backup', 'service_update_release_channel', 'service_update_gpt_usage_consent', 'service_update_private_endpoints', 'service_import_to_organization', 'service_export_from_organization', 'service_maintenance_start', 'service_maintenance_end', 'service_update_core_dump', 'service_update_deletion_protection', 'service_update_autoscaling_schedule', 'service_update_query_endpoints', 'service_update_direct_connection', 'service_update_sql_console_jwt_auth', 'service_update_snapshot_configuration', 'service_update_collector_ip_access_list', 'service_update_mysql_interface', 'service_update_upgrade_window', 'service_delete_upgrade_window', 'service_trigger_failover', 'service_trigger_recovery', 'service_mcp_enabled', 'service_mcp_disabled', 'service_upgrade', 'service_scaled_down_for_tier_change', 'service_encryption_key_check_failed', 'service_encryption_key_rotation_failed', 'service_encryption_key_rotated', 'service_stop_encryption_key_inaccessible', 'service_restart_encryption_key_rotation', 'backup_delete', 'backup_bucket_create', 'backup_bucket_update', 'backup_bucket_delete', 'backup_bucket_archive', 'warehouse_update_name', 'warehouse_update_release_channel', 'role_create', 'role_update', 'role_delete', 'role_resources_delete', 'organization_member_remove_roles', 'scim_user_profile_update', 'scim_group_create', 'scim_group_update', 'scim_group_delete', 'organization_saml_connection_delete', 'organization_update_saml_query_ownership_migration', 'organization_approved_domain_verify', 'organization_approved_domain_update', 'organization_approved_domain_delete', 'organization_approved_domain_auto_join', 'organization_approved_domain_auto_invite', 'datadog_integration_create', 'datadog_integration_delete', 'organization_update_spend_alert', 'organization_update_core_dumps', 'organization_update_ai_support', 'organization_update_ai_data_sharing', 'organization_update_private_endpoints', 'organization_update_pci_compliance', 'organization_update_hipaa_status', 'organization_security_contact_add', 'organization_security_contact_remove', 'organization_security_contact_replace', 'organization_update_public_preview', 'byoc_infrastructure_update_customer_authorized_access', 'transfer_credits_in', 'transfer_credits_out', 'promo_code_claim', 'schema_advisor_seed', 'schema_advisor_generate_plan', 'schema_advisor_approve_plan', 'schema_advisor_start_deployment', 'schema_advisor_start_benchmark', 'schema_advisor_run_benchmark', 'schema_advisor_start_promotion', 'schema_advisor_exchange_tables', 'schema_advisor_drop_sandbox', 'udf_create', 'udf_update', 'udf_delete', 'udf_version_create', 'udf_version_delete', 'udf_attach', 'udf_detach', 'udf_update_services', 'udf_redeploy', 'udf_rebuild', 'postgres_action'. New values may be added; treat unknown values as valid. */
|
|
254
|
+
type?: string | undefined;
|
|
255
|
+
/** Type of the actor: 'user', 'support', 'system', 'api'. */
|
|
256
|
+
actorType?: ActivityActorType | undefined;
|
|
257
|
+
/** Unique actor ID. */
|
|
258
|
+
actorId?: string | undefined;
|
|
259
|
+
/** Additional information about the actor. */
|
|
260
|
+
actorDetails?: string | undefined;
|
|
261
|
+
/** IP address of the actor. Defined for 'user' and 'api' actor types. */
|
|
262
|
+
actorIpAddress?: string | undefined;
|
|
263
|
+
/** Scope of the activity: organization ID this activity is related to. */
|
|
264
|
+
organizationId?: string | undefined;
|
|
265
|
+
/** Scope of the activity: service ID this activity is related to. */
|
|
266
|
+
serviceId?: string | undefined;
|
|
267
|
+
/** User agent of the actor */
|
|
268
|
+
userAgent?: string | undefined;
|
|
269
|
+
/** For 'openapi_key_update' activities: the ID of the API key that was updated. */
|
|
270
|
+
targetKeyId?: string | undefined;
|
|
271
|
+
/** For 'openapi_key_update' activities: the type of update that was performed. */
|
|
272
|
+
keyUpdateType?: ActivityKeyUpdateType | undefined;
|
|
273
|
+
/** For role and actor-role activities: IDs of the affected roles. */
|
|
274
|
+
targetRoleIds?: ActivityTargetRoleIdsList | undefined;
|
|
275
|
+
/** For role and actor-role activities: names of the affected roles, when recorded. */
|
|
276
|
+
targetRoleNames?: ActivityTargetRoleNamesList | undefined;
|
|
277
|
+
/** For 'organization_member_update_roles' and 'organization_member_remove_roles' activities: IDs of the affected actors (e.g. 'user/<id>'). */
|
|
278
|
+
targetActorIds?: ActivityTargetActorIdsList | undefined;
|
|
279
|
+
/** For 'role_resources_delete' activities: IDs of the deleted resources the roles referenced. */
|
|
280
|
+
targetResourceIds?: ActivityTargetResourceIdsList | undefined;
|
|
281
|
+
/** For 'service_delete' activities: true when a deletion protection override was recorded for the delete. Omitted when none was recorded. */
|
|
282
|
+
deletionProtectionBypassed?: boolean | undefined;
|
|
283
|
+
}
|
|
284
|
+
export interface GetOrganizationRequest {
|
|
285
|
+
/** ID of the requested organization. */
|
|
286
|
+
organizationId: string;
|
|
287
|
+
}
|
|
288
|
+
/** Cloud provider in which the private endpoint is lcoated */
|
|
289
|
+
export type OrganizationPrivateEndpointCloudProvider = "gcp" | "aws" | "azure";
|
|
290
|
+
/** Region in which the private endpoint is located */
|
|
291
|
+
export type OrganizationPrivateEndpointRegion =
|
|
292
|
+
| "ap-northeast-1"
|
|
293
|
+
| "ap-northeast-2"
|
|
294
|
+
| "ap-south-1"
|
|
295
|
+
| "ap-southeast-1"
|
|
296
|
+
| "ap-southeast-2"
|
|
297
|
+
| "ca-central-1"
|
|
298
|
+
| "eu-central-1"
|
|
299
|
+
| "eu-west-1"
|
|
300
|
+
| "eu-west-2"
|
|
301
|
+
| "il-central-1"
|
|
302
|
+
| "us-east-1"
|
|
303
|
+
| "us-east-2"
|
|
304
|
+
| "us-west-2"
|
|
305
|
+
| "us-east1"
|
|
306
|
+
| "us-central1"
|
|
307
|
+
| "europe-west2"
|
|
308
|
+
| "europe-west4"
|
|
309
|
+
| "asia-southeast1"
|
|
310
|
+
| "asia-northeast1"
|
|
311
|
+
| "eastus"
|
|
312
|
+
| "eastus2"
|
|
313
|
+
| "westus3"
|
|
314
|
+
| "germanywestcentral"
|
|
315
|
+
| "centralus";
|
|
316
|
+
export interface OrganizationPrivateEndpoint {
|
|
317
|
+
/** Private endpoint identifier */
|
|
318
|
+
id?: string | undefined;
|
|
319
|
+
/** Description of private endpoint */
|
|
320
|
+
description?: string | undefined;
|
|
321
|
+
/** Cloud provider in which the private endpoint is lcoated */
|
|
322
|
+
cloudProvider?: OrganizationPrivateEndpointCloudProvider | undefined;
|
|
323
|
+
/** Region in which the private endpoint is located */
|
|
324
|
+
region?: OrganizationPrivateEndpointRegion | undefined;
|
|
325
|
+
}
|
|
326
|
+
/** List of private endpoints for organization */
|
|
327
|
+
export type OrganizationPrivateEndpointsList = Array<OrganizationPrivateEndpoint>;
|
|
328
|
+
/** BYOC configuration for the organization */
|
|
329
|
+
export type OrganizationByocConfigList = Array<ByocConfig>;
|
|
330
|
+
export interface OrganizationCapabilities {
|
|
331
|
+
/** Whether the organization is eligible to enable snapshots on its primary services. */
|
|
332
|
+
snapshots?: boolean | undefined;
|
|
333
|
+
}
|
|
334
|
+
export interface Organization {
|
|
335
|
+
/** Unique organization ID. */
|
|
336
|
+
id?: string | undefined;
|
|
337
|
+
/** The timestamp the organization was created. ISO-8601. */
|
|
338
|
+
createdAt?: string | undefined;
|
|
339
|
+
/** Name of the organization. */
|
|
340
|
+
name?: string | undefined;
|
|
341
|
+
/** List of private endpoints for organization */
|
|
342
|
+
privateEndpoints?: OrganizationPrivateEndpointsList | undefined;
|
|
343
|
+
/** BYOC configuration for the organization */
|
|
344
|
+
byocConfig?: OrganizationByocConfigList | undefined;
|
|
345
|
+
/** Whether crash reports (core dumps) collection is enabled for services in the organization. When disabled at the organization level, individual services cannot enable crash reports. */
|
|
346
|
+
enableCoreDumps?: boolean | undefined;
|
|
347
|
+
capabilities?: OrganizationCapabilities | undefined;
|
|
348
|
+
/** Whether knowledge-based AI support, which answers support questions with an AI model trained on public documentation, is turned on in the organization's settings. Read-only. */
|
|
349
|
+
knowledgeBasedAiSupportEnabled?: boolean | undefined;
|
|
350
|
+
/** Whether the organization's settings allow AI inputs, outputs and related metadata to be used for product improvement and support. Read-only. */
|
|
351
|
+
aiDataUseForProductImprovementEnabled?: boolean | undefined;
|
|
352
|
+
}
|
|
353
|
+
export interface ListActivitiesRequest {
|
|
354
|
+
/** ID of the requested organization. */
|
|
355
|
+
organizationId: string;
|
|
356
|
+
/** A starting date for a search */
|
|
357
|
+
from_date?: string | undefined;
|
|
358
|
+
/** An ending date for a search */
|
|
359
|
+
to_date?: string | undefined;
|
|
360
|
+
}
|
|
361
|
+
export type ListActivitiesResponseBodyList = Array<Activity>;
|
|
362
|
+
export type ListActivitiesResponse = ListActivitiesResponseBodyList;
|
|
363
|
+
export interface ListOrganizationsRequest {
|
|
364
|
+
/** Maximum number of results to return. */
|
|
365
|
+
limit?: number | undefined;
|
|
366
|
+
/** Opaque cursor from a previous response's `nextCursor`, marking where to resume the list. */
|
|
367
|
+
cursor?: string | undefined;
|
|
368
|
+
}
|
|
369
|
+
export type ListOrganizationsResponseResultList = Array<Organization>;
|
|
370
|
+
export interface ListOrganizationsResponse {
|
|
371
|
+
/** HTTP status code. */
|
|
372
|
+
status?: number | undefined;
|
|
373
|
+
/** Unique id assigned to every request. UUIDv4 */
|
|
374
|
+
requestId?: string | undefined;
|
|
375
|
+
result: ListOrganizationsResponseResultList;
|
|
376
|
+
/** Maximum number of results returned in this page. */
|
|
377
|
+
limit?: number | undefined;
|
|
378
|
+
/** Cursor for the next page, to be sent as the `cursor` query parameter. Null on the last page. */
|
|
379
|
+
nextCursor?: string | null | undefined;
|
|
380
|
+
}
|
|
381
|
+
export interface UpdateByocInfrastructureRequest {
|
|
382
|
+
/** ID of the requested organization. */
|
|
383
|
+
organizationId: string;
|
|
384
|
+
/** ID of the requested BYOC Infrastructure */
|
|
385
|
+
byocInfrastructureId: string;
|
|
386
|
+
/** Human readable name for infrastructure object */
|
|
387
|
+
displayName?: string | undefined;
|
|
388
|
+
/** Enable or disable private link connectivity on the infrastructure. Disabling is rejected while any service in the organization has active private endpoints */
|
|
389
|
+
enablePrivateLink?: boolean | undefined;
|
|
390
|
+
/** GCP BYO-VPC only: customer-provided Private Service Connect NAT subnet name required to enable private link. Only accepted together with `enablePrivateLink: true` */
|
|
391
|
+
gcpPscSubnetId?: string | undefined;
|
|
392
|
+
/** Enable or disable the private (internal) load balancer of the infrastructure */
|
|
393
|
+
enablePrivateLoadBalancer?: boolean | undefined;
|
|
394
|
+
/** Enable or disable the public (internet-facing) load balancer of the infrastructure */
|
|
395
|
+
enablePublicLoadBalancer?: boolean | undefined;
|
|
396
|
+
tags?: ByocInfrastructureTags | undefined;
|
|
397
|
+
}
|
|
398
|
+
/** Cloud provider in which the private endpoint is lcoated */
|
|
399
|
+
export type OrganizationPatchPrivateEndpointCloudProvider = "gcp" | "aws" | "azure";
|
|
400
|
+
/** Region in which the private endpoint is located */
|
|
401
|
+
export type OrganizationPatchPrivateEndpointRegion =
|
|
402
|
+
| "ap-northeast-1"
|
|
403
|
+
| "ap-northeast-2"
|
|
404
|
+
| "ap-south-1"
|
|
405
|
+
| "ap-southeast-1"
|
|
406
|
+
| "ap-southeast-2"
|
|
407
|
+
| "ca-central-1"
|
|
408
|
+
| "eu-central-1"
|
|
409
|
+
| "eu-west-1"
|
|
410
|
+
| "eu-west-2"
|
|
411
|
+
| "il-central-1"
|
|
412
|
+
| "us-east-1"
|
|
413
|
+
| "us-east-2"
|
|
414
|
+
| "us-west-2"
|
|
415
|
+
| "us-east1"
|
|
416
|
+
| "us-central1"
|
|
417
|
+
| "europe-west2"
|
|
418
|
+
| "europe-west4"
|
|
419
|
+
| "asia-southeast1"
|
|
420
|
+
| "asia-northeast1"
|
|
421
|
+
| "eastus"
|
|
422
|
+
| "eastus2"
|
|
423
|
+
| "westus3"
|
|
424
|
+
| "germanywestcentral"
|
|
425
|
+
| "centralus";
|
|
426
|
+
export interface OrganizationPatchPrivateEndpoint {
|
|
427
|
+
/** Private endpoint identifier */
|
|
428
|
+
id?: string | undefined;
|
|
429
|
+
/** Optional description of private endpoint */
|
|
430
|
+
description?: string | undefined;
|
|
431
|
+
/** Cloud provider in which the private endpoint is lcoated */
|
|
432
|
+
cloudProvider?: OrganizationPatchPrivateEndpointCloudProvider | (string & {}) | undefined;
|
|
433
|
+
/** Region in which the private endpoint is located */
|
|
434
|
+
region?: OrganizationPatchPrivateEndpointRegion | (string & {}) | undefined;
|
|
435
|
+
}
|
|
436
|
+
/** DEPRECATED. Elements to add. Executed after "remove" part is processed. Please use the `Update Service Basic Details` endpoint with the `privateEndpointIds` field instead to modify the private endpoints. */
|
|
437
|
+
export type OrganizationPrivateEndpointsPatchAddList = Array<OrganizationPatchPrivateEndpoint>;
|
|
438
|
+
/** Elements to remove. Executed before "add" part is processed. */
|
|
439
|
+
export type OrganizationPrivateEndpointsPatchRemoveList = Array<OrganizationPatchPrivateEndpoint>;
|
|
440
|
+
export interface OrganizationPrivateEndpointsPatch {
|
|
441
|
+
/** DEPRECATED. Elements to add. Executed after "remove" part is processed. Please use the `Update Service Basic Details` endpoint with the `privateEndpointIds` field instead to modify the private endpoints. */
|
|
442
|
+
add?: OrganizationPrivateEndpointsPatchAddList | undefined;
|
|
443
|
+
/** Elements to remove. Executed before "add" part is processed. */
|
|
444
|
+
remove?: OrganizationPrivateEndpointsPatchRemoveList | undefined;
|
|
445
|
+
}
|
|
446
|
+
export interface UpdateOrganizationRequest {
|
|
447
|
+
/** ID of the organization to update. */
|
|
448
|
+
organizationId: string;
|
|
449
|
+
/** Name of the organization. */
|
|
450
|
+
name?: string | undefined;
|
|
451
|
+
privateEndpoints?: OrganizationPrivateEndpointsPatch | undefined;
|
|
452
|
+
/** Whether crash reports (core dumps) collection is enabled for services in the organization. When disabled at the organization level, individual services cannot enable crash reports. */
|
|
453
|
+
enableCoreDumps?: boolean | undefined;
|
|
454
|
+
}
|
|
455
|
+
export type CreateByocInfrastructureError = FeatureUnavailable | ClickHouseCloudOpError;
|
|
456
|
+
/** Create BYOC Infrastructure Create a new BYOC Infrastructure in the organization. Returns the configuration of the newly created infrastructure */
|
|
457
|
+
export const createByocInfrastructure: API.OperationMethod<
|
|
458
|
+
CreateByocInfrastructureRequest,
|
|
459
|
+
ByocConfig,
|
|
460
|
+
CreateByocInfrastructureError,
|
|
461
|
+
ClickHouseCloudOpContext
|
|
462
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
463
|
+
input: __S(2, __c0, 2) as any as S.Schema<CreateByocInfrastructureRequest>,
|
|
464
|
+
output: __S(16, __c2, 0) as any as S.Schema<ByocConfig>,
|
|
465
|
+
errors: [FeatureUnavailable],
|
|
466
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
467
|
+
protocol: ClickHouseCloudProtocol,
|
|
468
|
+
retry: Retry.Retry,
|
|
469
|
+
telemetry: TELEMETRY,
|
|
470
|
+
span: "CreateByocInfrastructure",
|
|
471
|
+
}));
|
|
472
|
+
|
|
473
|
+
export type DeleteByocInfrastructureError = ClickHouseCloudOpError;
|
|
474
|
+
/** Remove a BYOC infrastructure Removes a BYOC Infrastructure from the organization */
|
|
475
|
+
export const deleteByocInfrastructure: API.OperationMethod<
|
|
476
|
+
DeleteByocInfrastructureRequest,
|
|
477
|
+
DeleteByocInfrastructureResponse,
|
|
478
|
+
DeleteByocInfrastructureError,
|
|
479
|
+
ClickHouseCloudOpContext
|
|
480
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
481
|
+
input: __S(32, __c4, 0) as any as S.Schema<DeleteByocInfrastructureRequest>,
|
|
482
|
+
output: __S(33, __c4, 1) as any as S.Schema<DeleteByocInfrastructureResponse>,
|
|
483
|
+
errors: [],
|
|
484
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
485
|
+
protocol: ClickHouseCloudProtocol,
|
|
486
|
+
retry: Retry.Retry,
|
|
487
|
+
telemetry: TELEMETRY,
|
|
488
|
+
span: "DeleteByocInfrastructure",
|
|
489
|
+
}));
|
|
490
|
+
|
|
491
|
+
export type GetActivityError = ClickHouseCloudOpError;
|
|
492
|
+
/** Organization activity Returns a single organization activity by ID. */
|
|
493
|
+
export const getActivity: API.OperationMethod<
|
|
494
|
+
GetActivityRequest,
|
|
495
|
+
Activity,
|
|
496
|
+
GetActivityError,
|
|
497
|
+
ClickHouseCloudOpContext
|
|
498
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
499
|
+
input: __S(40, __c5, 0) as any as S.Schema<GetActivityRequest>,
|
|
500
|
+
output: __S(48, __c6, 0) as any as S.Schema<Activity>,
|
|
501
|
+
errors: [],
|
|
502
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
503
|
+
protocol: ClickHouseCloudProtocol,
|
|
504
|
+
retry: Retry.Retry,
|
|
505
|
+
telemetry: TELEMETRY,
|
|
506
|
+
span: "GetActivity",
|
|
507
|
+
}));
|
|
508
|
+
|
|
509
|
+
export type GetOrganizationError = ClickHouseCloudOpError;
|
|
510
|
+
/** Get organization details Returns details of a single organization. In order to get the details, the auth key must belong to the organization. */
|
|
511
|
+
export const getOrganization: API.OperationMethod<
|
|
512
|
+
GetOrganizationRequest,
|
|
513
|
+
Organization,
|
|
514
|
+
GetOrganizationError,
|
|
515
|
+
ClickHouseCloudOpContext
|
|
516
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
517
|
+
input: __S(56, __c7, 0) as any as S.Schema<GetOrganizationRequest>,
|
|
518
|
+
output: __S(68, __c8, 4) as any as S.Schema<Organization>,
|
|
519
|
+
errors: [],
|
|
520
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
521
|
+
protocol: ClickHouseCloudProtocol,
|
|
522
|
+
retry: Retry.Retry,
|
|
523
|
+
telemetry: TELEMETRY,
|
|
524
|
+
span: "GetOrganization",
|
|
525
|
+
}));
|
|
526
|
+
|
|
527
|
+
export type ListActivitiesError = ClickHouseCloudOpError;
|
|
528
|
+
/** List of organization activities Returns a list of all organization activities. */
|
|
529
|
+
export const listActivities: API.OperationMethod<
|
|
530
|
+
ListActivitiesRequest,
|
|
531
|
+
ListActivitiesResponse,
|
|
532
|
+
ListActivitiesError,
|
|
533
|
+
ClickHouseCloudOpContext
|
|
534
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
535
|
+
input: __S(72, __c9, 0) as any as S.Schema<ListActivitiesRequest>,
|
|
536
|
+
output: __S(74, __c9, 2) as any as S.Schema<ListActivitiesResponse>,
|
|
537
|
+
errors: [],
|
|
538
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
539
|
+
protocol: ClickHouseCloudProtocol,
|
|
540
|
+
retry: Retry.Retry,
|
|
541
|
+
telemetry: TELEMETRY,
|
|
542
|
+
span: "ListActivities",
|
|
543
|
+
}));
|
|
544
|
+
|
|
545
|
+
export type ListOrganizationsError = ClickHouseCloudOpError;
|
|
546
|
+
/** Get list of available organizations Returns the organizations available to the caller, oldest first. An API key resolves to the single organization it belongs to; a user token returns every organization the user is a member of. Results are capped at `limit` (default 250) per page; the server may return fewer and caps the value at its own maximum. Every response carries `limit` and `nextCursor`; pass `nextCursor` as the `cursor` query parameter to fetch the next page, repeating until it is null. */
|
|
547
|
+
export const listOrganizations: API.PaginatedOperationMethod<
|
|
548
|
+
ListOrganizationsRequest,
|
|
549
|
+
ListOrganizationsResponse,
|
|
550
|
+
ListOrganizationsError,
|
|
551
|
+
ClickHouseCloudOpContext,
|
|
552
|
+
Organization
|
|
553
|
+
> = /*@__PURE__*/ API.makePaginated(
|
|
554
|
+
() => ({
|
|
555
|
+
input: __S(80, __c10, 0) as any as S.Schema<ListOrganizationsRequest>,
|
|
556
|
+
output: __S(82, __c10, 2) as any as S.Schema<ListOrganizationsResponse>,
|
|
557
|
+
errors: [],
|
|
558
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
559
|
+
protocol: ClickHouseCloudPaginatedProtocol,
|
|
560
|
+
retry: Retry.Retry,
|
|
561
|
+
telemetry: TELEMETRY,
|
|
562
|
+
span: "ListOrganizations",
|
|
563
|
+
pagination: {
|
|
564
|
+
mode: "cursor",
|
|
565
|
+
inputToken: "cursor",
|
|
566
|
+
outputToken: "nextCursor",
|
|
567
|
+
items: "result",
|
|
568
|
+
pageSize: "limit",
|
|
569
|
+
} as const,
|
|
570
|
+
}),
|
|
571
|
+
paginateCursor,
|
|
572
|
+
) as any;
|
|
573
|
+
|
|
574
|
+
export type UpdateByocInfrastructureError = ClickHouseCloudOpError;
|
|
575
|
+
/** Update BYOC Infrastructure Update configuration of the BYOC infrastructure: rename it, toggle private link and load balancers, or replace its tags. The request is validated as a whole before anything is applied. If applying a field then fails in the data plane, client errors name the fields already applied, while internal errors return a generic message; retrying the same request is safe either way and converges the infrastructure to the requested state. Returns the modified infrastructure */
|
|
576
|
+
export const updateByocInfrastructure: API.OperationMethod<
|
|
577
|
+
UpdateByocInfrastructureRequest,
|
|
578
|
+
ByocConfig,
|
|
579
|
+
UpdateByocInfrastructureError,
|
|
580
|
+
ClickHouseCloudOpContext
|
|
581
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
582
|
+
input: __S(88, __c11, 0) as any as S.Schema<UpdateByocInfrastructureRequest>,
|
|
583
|
+
output: __S(16, __c2, 0) as any as S.Schema<ByocConfig>,
|
|
584
|
+
errors: [],
|
|
585
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
586
|
+
protocol: ClickHouseCloudProtocol,
|
|
587
|
+
retry: Retry.Retry,
|
|
588
|
+
telemetry: TELEMETRY,
|
|
589
|
+
span: "UpdateByocInfrastructure",
|
|
590
|
+
}));
|
|
591
|
+
|
|
592
|
+
export type UpdateOrganizationError = ClickHouseCloudOpError;
|
|
593
|
+
/** Update organization details Updates organization fields. Requires ADMIN auth key role. */
|
|
594
|
+
export const updateOrganization: API.OperationMethod<
|
|
595
|
+
UpdateOrganizationRequest,
|
|
596
|
+
Organization,
|
|
597
|
+
UpdateOrganizationError,
|
|
598
|
+
ClickHouseCloudOpContext
|
|
599
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
600
|
+
input: __S(97, __c12, 1) as any as S.Schema<UpdateOrganizationRequest>,
|
|
601
|
+
output: __S(68, __c8, 4) as any as S.Schema<Organization>,
|
|
602
|
+
errors: [],
|
|
603
|
+
serviceErrors: ClickHouseCloudServiceErrors,
|
|
604
|
+
protocol: ClickHouseCloudProtocol,
|
|
605
|
+
retry: Retry.Retry,
|
|
606
|
+
telemetry: TELEMETRY,
|
|
607
|
+
span: "UpdateOrganization",
|
|
608
|
+
}));
|
|
609
|
+
|
|
610
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
611
|
+
function __c0(j: number): any {
|
|
612
|
+
switch (j) {
|
|
613
|
+
case 0:
|
|
614
|
+
return S.Array(S.String);
|
|
615
|
+
case 1:
|
|
616
|
+
return S.suspend(() =>
|
|
617
|
+
S.Struct({
|
|
618
|
+
clusterName: S.String,
|
|
619
|
+
platformNodeGroup: S.optional(S.String),
|
|
620
|
+
availabilityZones: S.optional(__S(8, __c1, 0)),
|
|
621
|
+
namespacePrefix: S.optional(S.String),
|
|
622
|
+
executorRoleArn: S.optional(S.String),
|
|
623
|
+
nodeRoleArns: S.optional(__S(8, __c1, 0)),
|
|
624
|
+
imageMode: S.String,
|
|
625
|
+
imageRegistry: S.optional(S.String),
|
|
626
|
+
dataBucket: S.String,
|
|
627
|
+
backupBucket: S.String,
|
|
628
|
+
storageRoleArn: S.String,
|
|
629
|
+
scraperEndpoint: S.optional(S.String),
|
|
630
|
+
enableMonitoring: S.optional(S.Boolean),
|
|
631
|
+
enableSnapshotController: S.optional(S.Boolean),
|
|
632
|
+
enableAutoscaler: S.optional(S.Boolean),
|
|
633
|
+
}),
|
|
634
|
+
).annotate({ identifier: "ByocRestrictedFacts" });
|
|
635
|
+
case 2:
|
|
636
|
+
return S.suspend(() =>
|
|
637
|
+
S.Struct({
|
|
638
|
+
organizationId: S.String.pipe(T.Label()),
|
|
639
|
+
regionId: S.String,
|
|
640
|
+
accountId: S.String,
|
|
641
|
+
availabilityZoneSuffixes: S.optional(__S(0, __c0, 0)),
|
|
642
|
+
vpcCidrRange: S.optional(S.String),
|
|
643
|
+
externalId: S.optional(S.String),
|
|
644
|
+
tenantId: S.optional(S.String),
|
|
645
|
+
servicePrincipalClientId: S.optional(S.String),
|
|
646
|
+
vpcId: S.optional(S.String),
|
|
647
|
+
privateSubnetIds: S.optional(__S(8, __c1, 0)),
|
|
648
|
+
publicSubnetIds: S.optional(__S(8, __c1, 0)),
|
|
649
|
+
gcpPodCidrRangeNames: S.optional(__S(8, __c1, 0)),
|
|
650
|
+
gcpSharedVpcHostProjectId: S.optional(S.String),
|
|
651
|
+
tags: S.optional(__S(24, __c3, 0)),
|
|
652
|
+
accessModel: S.optional(S.String),
|
|
653
|
+
restrictedFacts: S.optional(__S(1, __c0, 1)),
|
|
654
|
+
displayName: S.optional(S.String),
|
|
655
|
+
}).pipe(
|
|
656
|
+
T.Http({
|
|
657
|
+
method: "POST",
|
|
658
|
+
uri: "/v1/organizations/{organizationId}/byocInfrastructure",
|
|
659
|
+
code: 200,
|
|
660
|
+
}),
|
|
661
|
+
),
|
|
662
|
+
).annotate({ identifier: "CreateByocInfrastructureRequest" });
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
function __c1(j: number): any {
|
|
666
|
+
switch (j) {
|
|
667
|
+
case 0:
|
|
668
|
+
return S.Array(S.String);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
function __c2(j: number): any {
|
|
672
|
+
switch (j) {
|
|
673
|
+
case 0:
|
|
674
|
+
return S.suspend(() =>
|
|
675
|
+
S.Struct({
|
|
676
|
+
id: S.String,
|
|
677
|
+
state: S.optional(S.String),
|
|
678
|
+
accountId: S.optional(S.String),
|
|
679
|
+
accountName: S.optional(S.String),
|
|
680
|
+
regionId: S.optional(S.String),
|
|
681
|
+
cloudProvider: S.optional(S.String),
|
|
682
|
+
displayName: S.optional(S.String),
|
|
683
|
+
accessModel: S.optional(S.String),
|
|
684
|
+
}),
|
|
685
|
+
).annotate({ identifier: "ByocConfig" });
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
function __c3(j: number): any {
|
|
689
|
+
switch (j) {
|
|
690
|
+
case 0:
|
|
691
|
+
return S.Record(S.String, S.String);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
function __c4(j: number): any {
|
|
695
|
+
switch (j) {
|
|
696
|
+
case 0:
|
|
697
|
+
return S.suspend(() =>
|
|
698
|
+
S.Struct({
|
|
699
|
+
organizationId: S.String.pipe(T.Label()),
|
|
700
|
+
byocInfrastructureId: S.String.pipe(T.Label()),
|
|
701
|
+
}).pipe(
|
|
702
|
+
T.Http({
|
|
703
|
+
method: "DELETE",
|
|
704
|
+
uri: "/v1/organizations/{organizationId}/byocInfrastructure/{byocInfrastructureId}",
|
|
705
|
+
code: 200,
|
|
706
|
+
}),
|
|
707
|
+
),
|
|
708
|
+
).annotate({ identifier: "DeleteByocInfrastructureRequest" });
|
|
709
|
+
case 1:
|
|
710
|
+
return S.suspend(() =>
|
|
711
|
+
S.Struct({
|
|
712
|
+
status: S.optional(S.Number),
|
|
713
|
+
requestId: S.optional(S.String),
|
|
714
|
+
}),
|
|
715
|
+
).annotate({ identifier: "DeleteByocInfrastructureResponse" });
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
function __c5(j: number): any {
|
|
719
|
+
switch (j) {
|
|
720
|
+
case 0:
|
|
721
|
+
return S.suspend(() =>
|
|
722
|
+
S.Struct({
|
|
723
|
+
organizationId: S.String.pipe(T.Label()),
|
|
724
|
+
activityId: S.String.pipe(T.Label()),
|
|
725
|
+
}).pipe(
|
|
726
|
+
T.Http({
|
|
727
|
+
method: "GET",
|
|
728
|
+
uri: "/v1/organizations/{organizationId}/activities/{activityId}",
|
|
729
|
+
code: 200,
|
|
730
|
+
}),
|
|
731
|
+
),
|
|
732
|
+
).annotate({ identifier: "GetActivityRequest" });
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
function __c6(j: number): any {
|
|
736
|
+
switch (j) {
|
|
737
|
+
case 0:
|
|
738
|
+
return S.suspend(() =>
|
|
739
|
+
S.Struct({
|
|
740
|
+
id: S.optional(S.String),
|
|
741
|
+
createdAt: S.optional(S.String),
|
|
742
|
+
type: S.optional(S.String),
|
|
743
|
+
actorType: S.optional(S.String),
|
|
744
|
+
actorId: S.optional(S.String),
|
|
745
|
+
actorDetails: S.optional(S.String),
|
|
746
|
+
actorIpAddress: S.optional(S.String),
|
|
747
|
+
organizationId: S.optional(S.String),
|
|
748
|
+
serviceId: S.optional(S.String),
|
|
749
|
+
userAgent: S.optional(S.String),
|
|
750
|
+
targetKeyId: S.optional(S.String),
|
|
751
|
+
keyUpdateType: S.optional(S.String),
|
|
752
|
+
targetRoleIds: S.optional(__S(8, __c1, 0)),
|
|
753
|
+
targetRoleNames: S.optional(__S(8, __c1, 0)),
|
|
754
|
+
targetActorIds: S.optional(__S(8, __c1, 0)),
|
|
755
|
+
targetResourceIds: S.optional(__S(8, __c1, 0)),
|
|
756
|
+
deletionProtectionBypassed: S.optional(S.Boolean),
|
|
757
|
+
}),
|
|
758
|
+
).annotate({ identifier: "Activity" });
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
function __c7(j: number): any {
|
|
762
|
+
switch (j) {
|
|
763
|
+
case 0:
|
|
764
|
+
return S.suspend(() =>
|
|
765
|
+
S.Struct({
|
|
766
|
+
organizationId: S.String.pipe(T.Label()),
|
|
767
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/organizations/{organizationId}", code: 200 })),
|
|
768
|
+
).annotate({ identifier: "GetOrganizationRequest" });
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
function __c8(j: number): any {
|
|
772
|
+
switch (j) {
|
|
773
|
+
case 0:
|
|
774
|
+
return S.suspend(() =>
|
|
775
|
+
S.Struct({
|
|
776
|
+
id: S.optional(S.String),
|
|
777
|
+
description: S.optional(S.String),
|
|
778
|
+
cloudProvider: S.optional(S.String),
|
|
779
|
+
region: S.optional(S.String),
|
|
780
|
+
}),
|
|
781
|
+
).annotate({ identifier: "OrganizationPrivateEndpoint" });
|
|
782
|
+
case 1:
|
|
783
|
+
return S.Array(__S(64, __c8, 0));
|
|
784
|
+
case 2:
|
|
785
|
+
return S.Array(__S(16, __c2, 0));
|
|
786
|
+
case 3:
|
|
787
|
+
return S.suspend(() =>
|
|
788
|
+
S.Struct({
|
|
789
|
+
snapshots: S.optional(S.Boolean),
|
|
790
|
+
}),
|
|
791
|
+
).annotate({ identifier: "OrganizationCapabilities" });
|
|
792
|
+
case 4:
|
|
793
|
+
return S.suspend(() =>
|
|
794
|
+
S.Struct({
|
|
795
|
+
id: S.optional(S.String),
|
|
796
|
+
createdAt: S.optional(S.String),
|
|
797
|
+
name: S.optional(S.String),
|
|
798
|
+
privateEndpoints: S.optional(__S(65, __c8, 1)),
|
|
799
|
+
byocConfig: S.optional(__S(66, __c8, 2)),
|
|
800
|
+
enableCoreDumps: S.optional(S.Boolean),
|
|
801
|
+
capabilities: S.optional(__S(67, __c8, 3)),
|
|
802
|
+
knowledgeBasedAiSupportEnabled: S.optional(S.Boolean),
|
|
803
|
+
aiDataUseForProductImprovementEnabled: S.optional(S.Boolean),
|
|
804
|
+
}),
|
|
805
|
+
).annotate({ identifier: "Organization" });
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
function __c9(j: number): any {
|
|
809
|
+
switch (j) {
|
|
810
|
+
case 0:
|
|
811
|
+
return S.suspend(() =>
|
|
812
|
+
S.Struct({
|
|
813
|
+
organizationId: S.String.pipe(T.Label()),
|
|
814
|
+
from_date: S.optional(S.String.pipe(T.Query())),
|
|
815
|
+
to_date: S.optional(S.String.pipe(T.Query())),
|
|
816
|
+
}).pipe(
|
|
817
|
+
T.Http({
|
|
818
|
+
method: "GET",
|
|
819
|
+
uri: "/v1/organizations/{organizationId}/activities",
|
|
820
|
+
code: 200,
|
|
821
|
+
}),
|
|
822
|
+
),
|
|
823
|
+
).annotate({ identifier: "ListActivitiesRequest" });
|
|
824
|
+
case 1:
|
|
825
|
+
return S.Array(__S(48, __c6, 0));
|
|
826
|
+
case 2:
|
|
827
|
+
return S.suspend(() => __S(73, __c9, 1).pipe(T.RawResponseRoot())).annotate({
|
|
828
|
+
identifier: "ListActivitiesResponse",
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
function __c10(j: number): any {
|
|
833
|
+
switch (j) {
|
|
834
|
+
case 0:
|
|
835
|
+
return S.suspend(() =>
|
|
836
|
+
S.Struct({
|
|
837
|
+
limit: S.optional(S.Number.pipe(T.Query())),
|
|
838
|
+
cursor: S.optional(S.String.pipe(T.Query())),
|
|
839
|
+
}).pipe(T.Http({ method: "GET", uri: "/v1/organizations", code: 200 })),
|
|
840
|
+
).annotate({ identifier: "ListOrganizationsRequest" });
|
|
841
|
+
case 1:
|
|
842
|
+
return S.Array(__S(68, __c8, 4));
|
|
843
|
+
case 2:
|
|
844
|
+
return S.suspend(() =>
|
|
845
|
+
S.Struct({
|
|
846
|
+
status: S.optional(S.Number),
|
|
847
|
+
requestId: S.optional(S.String),
|
|
848
|
+
result: __S(81, __c10, 1),
|
|
849
|
+
limit: S.optional(S.Number),
|
|
850
|
+
nextCursor: S.optional(S.NullOr(S.String)),
|
|
851
|
+
}),
|
|
852
|
+
).annotate({ identifier: "ListOrganizationsResponse" });
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
function __c11(j: number): any {
|
|
856
|
+
switch (j) {
|
|
857
|
+
case 0:
|
|
858
|
+
return S.suspend(() =>
|
|
859
|
+
S.Struct({
|
|
860
|
+
organizationId: S.String.pipe(T.Label()),
|
|
861
|
+
byocInfrastructureId: S.String.pipe(T.Label()),
|
|
862
|
+
displayName: S.optional(S.String),
|
|
863
|
+
enablePrivateLink: S.optional(S.Boolean),
|
|
864
|
+
gcpPscSubnetId: S.optional(S.String),
|
|
865
|
+
enablePrivateLoadBalancer: S.optional(S.Boolean),
|
|
866
|
+
enablePublicLoadBalancer: S.optional(S.Boolean),
|
|
867
|
+
tags: S.optional(__S(24, __c3, 0)),
|
|
868
|
+
}).pipe(
|
|
869
|
+
T.Http({
|
|
870
|
+
method: "PATCH",
|
|
871
|
+
uri: "/v1/organizations/{organizationId}/byocInfrastructure/{byocInfrastructureId}",
|
|
872
|
+
code: 200,
|
|
873
|
+
}),
|
|
874
|
+
),
|
|
875
|
+
).annotate({ identifier: "UpdateByocInfrastructureRequest" });
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
function __c12(j: number): any {
|
|
879
|
+
switch (j) {
|
|
880
|
+
case 0:
|
|
881
|
+
return S.suspend(() =>
|
|
882
|
+
S.Struct({
|
|
883
|
+
add: S.optional(__S(65, __c8, 1)),
|
|
884
|
+
remove: S.optional(__S(65, __c8, 1)),
|
|
885
|
+
}),
|
|
886
|
+
).annotate({ identifier: "OrganizationPrivateEndpointsPatch" });
|
|
887
|
+
case 1:
|
|
888
|
+
return S.suspend(() =>
|
|
889
|
+
S.Struct({
|
|
890
|
+
organizationId: S.String.pipe(T.Label()),
|
|
891
|
+
name: S.optional(S.String),
|
|
892
|
+
privateEndpoints: S.optional(__S(96, __c12, 0)),
|
|
893
|
+
enableCoreDumps: S.optional(S.Boolean),
|
|
894
|
+
}).pipe(T.Http({ method: "PATCH", uri: "/v1/organizations/{organizationId}", code: 200 })),
|
|
895
|
+
).annotate({ identifier: "UpdateOrganizationRequest" });
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
899
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
900
|
+
return (__s[i] ??= __L.at(f, j));
|
|
901
|
+
}
|