@nirvana-labs/nirvana 1.55.4 → 1.57.0
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/CHANGELOG.md +30 -0
- package/bin/migration-config.json +300 -0
- package/client.d.mts +4 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/api-keys/api-keys.d.mts +1 -16
- package/resources/api-keys/api-keys.d.mts.map +1 -1
- package/resources/api-keys/api-keys.d.ts +1 -16
- package/resources/api-keys/api-keys.d.ts.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/nks/clusters/availability.d.mts +65 -0
- package/resources/nks/clusters/availability.d.mts.map +1 -0
- package/resources/nks/clusters/availability.d.ts +65 -0
- package/resources/nks/clusters/availability.d.ts.map +1 -0
- package/resources/nks/clusters/availability.js +46 -0
- package/resources/nks/clusters/availability.js.map +1 -0
- package/resources/nks/clusters/availability.mjs +42 -0
- package/resources/nks/clusters/availability.mjs.map +1 -0
- package/resources/nks/clusters/clusters.d.mts +191 -0
- package/resources/nks/clusters/clusters.d.mts.map +1 -0
- package/resources/nks/clusters/clusters.d.ts +191 -0
- package/resources/nks/clusters/clusters.d.ts.map +1 -0
- package/resources/nks/clusters/clusters.js +96 -0
- package/resources/nks/clusters/clusters.js.map +1 -0
- package/resources/nks/clusters/clusters.mjs +91 -0
- package/resources/nks/clusters/clusters.mjs.map +1 -0
- package/resources/nks/clusters/index.d.mts +4 -0
- package/resources/nks/clusters/index.d.mts.map +1 -0
- package/resources/nks/clusters/index.d.ts +4 -0
- package/resources/nks/clusters/index.d.ts.map +1 -0
- package/resources/nks/clusters/index.js +11 -0
- package/resources/nks/clusters/index.js.map +1 -0
- package/resources/nks/clusters/index.mjs +5 -0
- package/resources/nks/clusters/index.mjs.map +1 -0
- package/resources/nks/clusters/kubeconfig.d.mts +18 -0
- package/resources/nks/clusters/kubeconfig.d.mts.map +1 -0
- package/resources/nks/clusters/kubeconfig.d.ts +18 -0
- package/resources/nks/clusters/kubeconfig.d.ts.map +1 -0
- package/resources/nks/clusters/kubeconfig.js +23 -0
- package/resources/nks/clusters/kubeconfig.js.map +1 -0
- package/resources/nks/clusters/kubeconfig.mjs +19 -0
- package/resources/nks/clusters/kubeconfig.mjs.map +1 -0
- package/resources/nks/clusters/pools/availability.d.mts +74 -0
- package/resources/nks/clusters/pools/availability.d.mts.map +1 -0
- package/resources/nks/clusters/pools/availability.d.ts +74 -0
- package/resources/nks/clusters/pools/availability.d.ts.map +1 -0
- package/resources/nks/clusters/pools/availability.js +56 -0
- package/resources/nks/clusters/pools/availability.js.map +1 -0
- package/resources/nks/clusters/pools/availability.mjs +52 -0
- package/resources/nks/clusters/pools/availability.mjs.map +1 -0
- package/resources/nks/clusters/pools/index.d.mts +4 -0
- package/resources/nks/clusters/pools/index.d.mts.map +1 -0
- package/resources/nks/clusters/pools/index.d.ts +4 -0
- package/resources/nks/clusters/pools/index.d.ts.map +1 -0
- package/resources/nks/clusters/pools/index.js +11 -0
- package/resources/nks/clusters/pools/index.js.map +1 -0
- package/resources/nks/clusters/pools/index.mjs +5 -0
- package/resources/nks/clusters/pools/index.mjs.map +1 -0
- package/resources/nks/clusters/pools/nodes/index.d.mts +3 -0
- package/resources/nks/clusters/pools/nodes/index.d.mts.map +1 -0
- package/resources/nks/clusters/pools/nodes/index.d.ts +3 -0
- package/resources/nks/clusters/pools/nodes/index.d.ts.map +1 -0
- package/resources/nks/clusters/pools/nodes/index.js +9 -0
- package/resources/nks/clusters/pools/nodes/index.js.map +1 -0
- package/resources/nks/clusters/pools/nodes/index.mjs +4 -0
- package/resources/nks/clusters/pools/nodes/index.mjs.map +1 -0
- package/resources/nks/clusters/pools/nodes/nodes.d.mts +95 -0
- package/resources/nks/clusters/pools/nodes/nodes.d.mts.map +1 -0
- package/resources/nks/clusters/pools/nodes/nodes.d.ts +95 -0
- package/resources/nks/clusters/pools/nodes/nodes.d.ts.map +1 -0
- package/resources/nks/clusters/pools/nodes/nodes.js +52 -0
- package/resources/nks/clusters/pools/nodes/nodes.js.map +1 -0
- package/resources/nks/clusters/pools/nodes/nodes.mjs +47 -0
- package/resources/nks/clusters/pools/nodes/nodes.mjs.map +1 -0
- package/resources/nks/clusters/pools/nodes/volumes.d.mts +109 -0
- package/resources/nks/clusters/pools/nodes/volumes.d.mts.map +1 -0
- package/resources/nks/clusters/pools/nodes/volumes.d.ts +109 -0
- package/resources/nks/clusters/pools/nodes/volumes.d.ts.map +1 -0
- package/resources/nks/clusters/pools/nodes/volumes.js +49 -0
- package/resources/nks/clusters/pools/nodes/volumes.js.map +1 -0
- package/resources/nks/clusters/pools/nodes/volumes.mjs +45 -0
- package/resources/nks/clusters/pools/nodes/volumes.mjs.map +1 -0
- package/resources/nks/clusters/pools/nodes.d.mts +2 -0
- package/resources/nks/clusters/pools/nodes.d.mts.map +1 -0
- package/resources/nks/clusters/pools/nodes.d.ts +2 -0
- package/resources/nks/clusters/pools/nodes.d.ts.map +1 -0
- package/resources/nks/clusters/pools/nodes.js +6 -0
- package/resources/nks/clusters/pools/nodes.js.map +1 -0
- package/resources/nks/clusters/pools/nodes.mjs +3 -0
- package/resources/nks/clusters/pools/nodes.mjs.map +1 -0
- package/resources/nks/clusters/pools/pools.d.mts +219 -0
- package/resources/nks/clusters/pools/pools.d.mts.map +1 -0
- package/resources/nks/clusters/pools/pools.d.ts +219 -0
- package/resources/nks/clusters/pools/pools.d.ts.map +1 -0
- package/resources/nks/clusters/pools/pools.js +109 -0
- package/resources/nks/clusters/pools/pools.js.map +1 -0
- package/resources/nks/clusters/pools/pools.mjs +104 -0
- package/resources/nks/clusters/pools/pools.mjs.map +1 -0
- package/resources/nks/clusters/pools.d.mts +2 -0
- package/resources/nks/clusters/pools.d.mts.map +1 -0
- package/resources/nks/clusters/pools.d.ts +2 -0
- package/resources/nks/clusters/pools.d.ts.map +1 -0
- package/resources/nks/clusters/pools.js +6 -0
- package/resources/nks/clusters/pools.js.map +1 -0
- package/resources/nks/clusters/pools.mjs +3 -0
- package/resources/nks/clusters/pools.mjs.map +1 -0
- package/resources/nks/clusters.d.mts +2 -0
- package/resources/nks/clusters.d.mts.map +1 -0
- package/resources/nks/clusters.d.ts +2 -0
- package/resources/nks/clusters.d.ts.map +1 -0
- package/resources/nks/clusters.js +6 -0
- package/resources/nks/clusters.js.map +1 -0
- package/resources/nks/clusters.mjs +3 -0
- package/resources/nks/clusters.mjs.map +1 -0
- package/resources/nks/index.d.mts +3 -0
- package/resources/nks/index.d.mts.map +1 -0
- package/resources/nks/index.d.ts +3 -0
- package/resources/nks/index.d.ts.map +1 -0
- package/resources/nks/index.js +9 -0
- package/resources/nks/index.js.map +1 -0
- package/resources/nks/index.mjs +4 -0
- package/resources/nks/index.mjs.map +1 -0
- package/resources/nks/nks.d.mts +10 -0
- package/resources/nks/nks.d.mts.map +1 -0
- package/resources/nks/nks.d.ts +10 -0
- package/resources/nks/nks.d.ts.map +1 -0
- package/resources/nks/nks.js +17 -0
- package/resources/nks/nks.js.map +1 -0
- package/resources/nks/nks.mjs +12 -0
- package/resources/nks/nks.mjs.map +1 -0
- package/resources/nks.d.mts +2 -0
- package/resources/nks.d.mts.map +1 -0
- package/resources/nks.d.ts +2 -0
- package/resources/nks.d.ts.map +1 -0
- package/resources/nks.js +6 -0
- package/resources/nks.js.map +1 -0
- package/resources/nks.mjs +3 -0
- package/resources/nks.mjs.map +1 -0
- package/resources/operations/operations.d.mts +1 -1
- package/resources/operations/operations.d.mts.map +1 -1
- package/resources/operations/operations.d.ts +1 -1
- package/resources/operations/operations.d.ts.map +1 -1
- package/resources/projects/projects.d.mts +54 -50
- package/resources/projects/projects.d.mts.map +1 -1
- package/resources/projects/projects.d.ts +54 -50
- package/resources/projects/projects.d.ts.map +1 -1
- package/resources/regions/regions.d.mts +13 -0
- package/resources/regions/regions.d.mts.map +1 -1
- package/resources/regions/regions.d.ts +13 -0
- package/resources/regions/regions.d.ts.map +1 -1
- package/resources/shared.d.mts +14 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +14 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/user/security.d.mts +1 -16
- package/resources/user/security.d.mts.map +1 -1
- package/resources/user/security.d.ts +1 -16
- package/resources/user/security.d.ts.map +1 -1
- package/src/client.ts +6 -0
- package/src/resources/api-keys/api-keys.ts +1 -18
- package/src/resources/index.ts +1 -0
- package/src/resources/nks/api.md +78 -0
- package/src/resources/nks/clusters/availability.ts +93 -0
- package/src/resources/nks/clusters/clusters.ts +275 -0
- package/src/resources/nks/clusters/index.ts +26 -0
- package/src/resources/nks/clusters/kubeconfig.ts +23 -0
- package/src/resources/nks/clusters/pools/availability.ts +103 -0
- package/src/resources/nks/clusters/pools/index.ts +24 -0
- package/src/resources/nks/clusters/pools/nodes/index.ts +18 -0
- package/src/resources/nks/clusters/pools/nodes/nodes.ts +150 -0
- package/src/resources/nks/clusters/pools/nodes/volumes.ts +152 -0
- package/src/resources/nks/clusters/pools/nodes.ts +3 -0
- package/src/resources/nks/clusters/pools/pools.ts +310 -0
- package/src/resources/nks/clusters/pools.ts +3 -0
- package/src/resources/nks/clusters.ts +3 -0
- package/src/resources/nks/index.ts +13 -0
- package/src/resources/nks/nks.ts +33 -0
- package/src/resources/nks.ts +3 -0
- package/src/resources/operations/operations.ts +1 -1
- package/src/resources/projects/api.md +3 -0
- package/src/resources/projects/projects.ts +63 -54
- package/src/resources/regions/regions.ts +15 -0
- package/src/resources/shared.ts +16 -8
- package/src/resources/user/security.ts +1 -18
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as Shared from "../../shared.mjs";
|
|
3
|
+
import * as OperationsAPI from "../../operations/operations.mjs";
|
|
4
|
+
import * as AvailabilityAPI from "./availability.mjs";
|
|
5
|
+
import { Availability, AvailabilityCreateParams, AvailabilityUpdateParams } from "./availability.mjs";
|
|
6
|
+
import * as KubeconfigAPI from "./kubeconfig.mjs";
|
|
7
|
+
import * as PoolsAPI from "./pools/pools.mjs";
|
|
8
|
+
import { NKSNodeConfig, NKSNodeConfigResponse, NKSNodePool, NKSNodePoolList, NKSNodePoolsCursor, PoolCreateParams, PoolDeleteParams, PoolGetParams, PoolListParams, PoolUpdateParams, Pools } from "./pools/pools.mjs";
|
|
9
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
10
|
+
import { Cursor, type CursorParams, PagePromise } from "../../../core/pagination.mjs";
|
|
11
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
12
|
+
export declare class Clusters extends APIResource {
|
|
13
|
+
availability: AvailabilityAPI.Availability;
|
|
14
|
+
kubeconfig: KubeconfigAPI.Kubeconfig;
|
|
15
|
+
pools: PoolsAPI.Pools;
|
|
16
|
+
/**
|
|
17
|
+
* Create an NKS Cluster
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const operation = await client.nks.clusters.create({
|
|
22
|
+
* name: 'my-cluster',
|
|
23
|
+
* project_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
24
|
+
* region: 'us-wdc-1',
|
|
25
|
+
* vpc_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
create(body: ClusterCreateParams, options?: RequestOptions): APIPromise<OperationsAPI.Operation>;
|
|
30
|
+
/**
|
|
31
|
+
* Update an NKS cluster
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const nksCluster = await client.nks.clusters.update(
|
|
36
|
+
* 'cluster_id',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
update(clusterID: string, body: ClusterUpdateParams, options?: RequestOptions): APIPromise<NKSCluster>;
|
|
41
|
+
/**
|
|
42
|
+
* List all NKS clusters
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* // Automatically fetches more pages as needed.
|
|
47
|
+
* for await (const nksCluster of client.nks.clusters.list({
|
|
48
|
+
* project_id: 'project_id',
|
|
49
|
+
* })) {
|
|
50
|
+
* // ...
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
list(query: ClusterListParams, options?: RequestOptions): PagePromise<NKSClustersCursor, NKSCluster>;
|
|
55
|
+
/**
|
|
56
|
+
* Delete an NKS cluster
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const operation = await client.nks.clusters.delete(
|
|
61
|
+
* 'cluster_id',
|
|
62
|
+
* );
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
delete(clusterID: string, options?: RequestOptions): APIPromise<OperationsAPI.Operation>;
|
|
66
|
+
/**
|
|
67
|
+
* Get details about an NKS cluster
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* const nksCluster = await client.nks.clusters.get(
|
|
72
|
+
* 'cluster_id',
|
|
73
|
+
* );
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
get(clusterID: string, options?: RequestOptions): APIPromise<NKSCluster>;
|
|
77
|
+
}
|
|
78
|
+
export type NKSClustersCursor = Cursor<NKSCluster>;
|
|
79
|
+
/**
|
|
80
|
+
* Kubeconfig for an NKS Cluster.
|
|
81
|
+
*/
|
|
82
|
+
export interface Kubeconfig {
|
|
83
|
+
/**
|
|
84
|
+
* Kubeconfig content for the Cluster.
|
|
85
|
+
*/
|
|
86
|
+
kubeconfig: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* NKS Cluster details.
|
|
90
|
+
*/
|
|
91
|
+
export interface NKSCluster {
|
|
92
|
+
/**
|
|
93
|
+
* Unique identifier for the Cluster.
|
|
94
|
+
*/
|
|
95
|
+
id: string;
|
|
96
|
+
/**
|
|
97
|
+
* When the Cluster was created.
|
|
98
|
+
*/
|
|
99
|
+
created_at: string;
|
|
100
|
+
/**
|
|
101
|
+
* Name of the Cluster.
|
|
102
|
+
*/
|
|
103
|
+
name: string;
|
|
104
|
+
/**
|
|
105
|
+
* IDs of pools belonging to this Cluster.
|
|
106
|
+
*/
|
|
107
|
+
pool_ids: Array<string>;
|
|
108
|
+
/**
|
|
109
|
+
* Private IP (VIP) of the Cluster.
|
|
110
|
+
*/
|
|
111
|
+
private_ip: string;
|
|
112
|
+
/**
|
|
113
|
+
* Project ID the Cluster belongs to.
|
|
114
|
+
*/
|
|
115
|
+
project_id: string;
|
|
116
|
+
/**
|
|
117
|
+
* Public IP of the Cluster.
|
|
118
|
+
*/
|
|
119
|
+
public_ip: string;
|
|
120
|
+
/**
|
|
121
|
+
* Region the resource is in.
|
|
122
|
+
*/
|
|
123
|
+
region: Shared.RegionName;
|
|
124
|
+
/**
|
|
125
|
+
* Status of the resource.
|
|
126
|
+
*/
|
|
127
|
+
status: Shared.ResourceStatus;
|
|
128
|
+
/**
|
|
129
|
+
* Tags attached to the Cluster.
|
|
130
|
+
*/
|
|
131
|
+
tags: Array<string>;
|
|
132
|
+
/**
|
|
133
|
+
* When the Cluster was last updated.
|
|
134
|
+
*/
|
|
135
|
+
updated_at: string;
|
|
136
|
+
/**
|
|
137
|
+
* ID of the VPC the Cluster is in.
|
|
138
|
+
*/
|
|
139
|
+
vpc_id: string;
|
|
140
|
+
}
|
|
141
|
+
export interface NKSClusterList {
|
|
142
|
+
items: Array<NKSCluster>;
|
|
143
|
+
/**
|
|
144
|
+
* Pagination response details.
|
|
145
|
+
*/
|
|
146
|
+
pagination: Shared.Pagination;
|
|
147
|
+
}
|
|
148
|
+
export interface ClusterCreateParams {
|
|
149
|
+
/**
|
|
150
|
+
* Name of the Cluster.
|
|
151
|
+
*/
|
|
152
|
+
name: string;
|
|
153
|
+
/**
|
|
154
|
+
* Project ID to create the Cluster in.
|
|
155
|
+
*/
|
|
156
|
+
project_id: string;
|
|
157
|
+
/**
|
|
158
|
+
* Region the resource is in.
|
|
159
|
+
*/
|
|
160
|
+
region: Shared.RegionName;
|
|
161
|
+
/**
|
|
162
|
+
* ID of the VPC to use for the Cluster.
|
|
163
|
+
*/
|
|
164
|
+
vpc_id: string;
|
|
165
|
+
/**
|
|
166
|
+
* Tags to attach to the Cluster.
|
|
167
|
+
*/
|
|
168
|
+
tags?: Array<string>;
|
|
169
|
+
}
|
|
170
|
+
export interface ClusterUpdateParams {
|
|
171
|
+
/**
|
|
172
|
+
* Name of the Cluster.
|
|
173
|
+
*/
|
|
174
|
+
name?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Tags to attach to the Cluster.
|
|
177
|
+
*/
|
|
178
|
+
tags?: Array<string>;
|
|
179
|
+
}
|
|
180
|
+
export interface ClusterListParams extends CursorParams {
|
|
181
|
+
/**
|
|
182
|
+
* Project ID of resources to request
|
|
183
|
+
*/
|
|
184
|
+
project_id: string;
|
|
185
|
+
}
|
|
186
|
+
export declare namespace Clusters {
|
|
187
|
+
export { type Kubeconfig as Kubeconfig, type NKSCluster as NKSCluster, type NKSClusterList as NKSClusterList, type NKSClustersCursor as NKSClustersCursor, type ClusterCreateParams as ClusterCreateParams, type ClusterUpdateParams as ClusterUpdateParams, type ClusterListParams as ClusterListParams, };
|
|
188
|
+
export { Availability as Availability, type AvailabilityCreateParams as AvailabilityCreateParams, type AvailabilityUpdateParams as AvailabilityUpdateParams, };
|
|
189
|
+
export { Pools as Pools, type NKSNodeConfig as NKSNodeConfig, type NKSNodeConfigResponse as NKSNodeConfigResponse, type NKSNodePool as NKSNodePool, type NKSNodePoolList as NKSNodePoolList, type NKSNodePoolsCursor as NKSNodePoolsCursor, type PoolCreateParams as PoolCreateParams, type PoolUpdateParams as PoolUpdateParams, type PoolListParams as PoolListParams, type PoolDeleteParams as PoolDeleteParams, type PoolGetParams as PoolGetParams, };
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=clusters.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clusters.d.mts","sourceRoot":"","sources":["../../../src/resources/nks/clusters/clusters.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,aAAa;OAClB,KAAK,eAAe;OACpB,EAAE,YAAY,EAAE,wBAAwB,EAAE,wBAAwB,EAAE;OACpE,KAAK,aAAa;OAClB,KAAK,QAAQ;OACb,EACL,aAAa,EACb,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,KAAK,EACN;OACM,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;IAC5F,UAAU,EAAE,aAAa,CAAC,UAAU,CAA8C;IAClF,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC;IAIhG;;;;;;;;;OASG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,U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AI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,aAAa,IAAI,aAAa,GACpC,CAAC;CACH"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import * as Shared from "../../shared.js";
|
|
3
|
+
import * as OperationsAPI from "../../operations/operations.js";
|
|
4
|
+
import * as AvailabilityAPI from "./availability.js";
|
|
5
|
+
import { Availability, AvailabilityCreateParams, AvailabilityUpdateParams } from "./availability.js";
|
|
6
|
+
import * as KubeconfigAPI from "./kubeconfig.js";
|
|
7
|
+
import * as PoolsAPI from "./pools/pools.js";
|
|
8
|
+
import { NKSNodeConfig, NKSNodeConfigResponse, NKSNodePool, NKSNodePoolList, NKSNodePoolsCursor, PoolCreateParams, PoolDeleteParams, PoolGetParams, PoolListParams, PoolUpdateParams, Pools } from "./pools/pools.js";
|
|
9
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
10
|
+
import { Cursor, type CursorParams, PagePromise } from "../../../core/pagination.js";
|
|
11
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
12
|
+
export declare class Clusters extends APIResource {
|
|
13
|
+
availability: AvailabilityAPI.Availability;
|
|
14
|
+
kubeconfig: KubeconfigAPI.Kubeconfig;
|
|
15
|
+
pools: PoolsAPI.Pools;
|
|
16
|
+
/**
|
|
17
|
+
* Create an NKS Cluster
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const operation = await client.nks.clusters.create({
|
|
22
|
+
* name: 'my-cluster',
|
|
23
|
+
* project_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
24
|
+
* region: 'us-wdc-1',
|
|
25
|
+
* vpc_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
create(body: ClusterCreateParams, options?: RequestOptions): APIPromise<OperationsAPI.Operation>;
|
|
30
|
+
/**
|
|
31
|
+
* Update an NKS cluster
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const nksCluster = await client.nks.clusters.update(
|
|
36
|
+
* 'cluster_id',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
update(clusterID: string, body: ClusterUpdateParams, options?: RequestOptions): APIPromise<NKSCluster>;
|
|
41
|
+
/**
|
|
42
|
+
* List all NKS clusters
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* // Automatically fetches more pages as needed.
|
|
47
|
+
* for await (const nksCluster of client.nks.clusters.list({
|
|
48
|
+
* project_id: 'project_id',
|
|
49
|
+
* })) {
|
|
50
|
+
* // ...
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
list(query: ClusterListParams, options?: RequestOptions): PagePromise<NKSClustersCursor, NKSCluster>;
|
|
55
|
+
/**
|
|
56
|
+
* Delete an NKS cluster
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const operation = await client.nks.clusters.delete(
|
|
61
|
+
* 'cluster_id',
|
|
62
|
+
* );
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
delete(clusterID: string, options?: RequestOptions): APIPromise<OperationsAPI.Operation>;
|
|
66
|
+
/**
|
|
67
|
+
* Get details about an NKS cluster
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* const nksCluster = await client.nks.clusters.get(
|
|
72
|
+
* 'cluster_id',
|
|
73
|
+
* );
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
get(clusterID: string, options?: RequestOptions): APIPromise<NKSCluster>;
|
|
77
|
+
}
|
|
78
|
+
export type NKSClustersCursor = Cursor<NKSCluster>;
|
|
79
|
+
/**
|
|
80
|
+
* Kubeconfig for an NKS Cluster.
|
|
81
|
+
*/
|
|
82
|
+
export interface Kubeconfig {
|
|
83
|
+
/**
|
|
84
|
+
* Kubeconfig content for the Cluster.
|
|
85
|
+
*/
|
|
86
|
+
kubeconfig: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* NKS Cluster details.
|
|
90
|
+
*/
|
|
91
|
+
export interface NKSCluster {
|
|
92
|
+
/**
|
|
93
|
+
* Unique identifier for the Cluster.
|
|
94
|
+
*/
|
|
95
|
+
id: string;
|
|
96
|
+
/**
|
|
97
|
+
* When the Cluster was created.
|
|
98
|
+
*/
|
|
99
|
+
created_at: string;
|
|
100
|
+
/**
|
|
101
|
+
* Name of the Cluster.
|
|
102
|
+
*/
|
|
103
|
+
name: string;
|
|
104
|
+
/**
|
|
105
|
+
* IDs of pools belonging to this Cluster.
|
|
106
|
+
*/
|
|
107
|
+
pool_ids: Array<string>;
|
|
108
|
+
/**
|
|
109
|
+
* Private IP (VIP) of the Cluster.
|
|
110
|
+
*/
|
|
111
|
+
private_ip: string;
|
|
112
|
+
/**
|
|
113
|
+
* Project ID the Cluster belongs to.
|
|
114
|
+
*/
|
|
115
|
+
project_id: string;
|
|
116
|
+
/**
|
|
117
|
+
* Public IP of the Cluster.
|
|
118
|
+
*/
|
|
119
|
+
public_ip: string;
|
|
120
|
+
/**
|
|
121
|
+
* Region the resource is in.
|
|
122
|
+
*/
|
|
123
|
+
region: Shared.RegionName;
|
|
124
|
+
/**
|
|
125
|
+
* Status of the resource.
|
|
126
|
+
*/
|
|
127
|
+
status: Shared.ResourceStatus;
|
|
128
|
+
/**
|
|
129
|
+
* Tags attached to the Cluster.
|
|
130
|
+
*/
|
|
131
|
+
tags: Array<string>;
|
|
132
|
+
/**
|
|
133
|
+
* When the Cluster was last updated.
|
|
134
|
+
*/
|
|
135
|
+
updated_at: string;
|
|
136
|
+
/**
|
|
137
|
+
* ID of the VPC the Cluster is in.
|
|
138
|
+
*/
|
|
139
|
+
vpc_id: string;
|
|
140
|
+
}
|
|
141
|
+
export interface NKSClusterList {
|
|
142
|
+
items: Array<NKSCluster>;
|
|
143
|
+
/**
|
|
144
|
+
* Pagination response details.
|
|
145
|
+
*/
|
|
146
|
+
pagination: Shared.Pagination;
|
|
147
|
+
}
|
|
148
|
+
export interface ClusterCreateParams {
|
|
149
|
+
/**
|
|
150
|
+
* Name of the Cluster.
|
|
151
|
+
*/
|
|
152
|
+
name: string;
|
|
153
|
+
/**
|
|
154
|
+
* Project ID to create the Cluster in.
|
|
155
|
+
*/
|
|
156
|
+
project_id: string;
|
|
157
|
+
/**
|
|
158
|
+
* Region the resource is in.
|
|
159
|
+
*/
|
|
160
|
+
region: Shared.RegionName;
|
|
161
|
+
/**
|
|
162
|
+
* ID of the VPC to use for the Cluster.
|
|
163
|
+
*/
|
|
164
|
+
vpc_id: string;
|
|
165
|
+
/**
|
|
166
|
+
* Tags to attach to the Cluster.
|
|
167
|
+
*/
|
|
168
|
+
tags?: Array<string>;
|
|
169
|
+
}
|
|
170
|
+
export interface ClusterUpdateParams {
|
|
171
|
+
/**
|
|
172
|
+
* Name of the Cluster.
|
|
173
|
+
*/
|
|
174
|
+
name?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Tags to attach to the Cluster.
|
|
177
|
+
*/
|
|
178
|
+
tags?: Array<string>;
|
|
179
|
+
}
|
|
180
|
+
export interface ClusterListParams extends CursorParams {
|
|
181
|
+
/**
|
|
182
|
+
* Project ID of resources to request
|
|
183
|
+
*/
|
|
184
|
+
project_id: string;
|
|
185
|
+
}
|
|
186
|
+
export declare namespace Clusters {
|
|
187
|
+
export { type Kubeconfig as Kubeconfig, type NKSCluster as NKSCluster, type NKSClusterList as NKSClusterList, type NKSClustersCursor as NKSClustersCursor, type ClusterCreateParams as ClusterCreateParams, type ClusterUpdateParams as ClusterUpdateParams, type ClusterListParams as ClusterListParams, };
|
|
188
|
+
export { Availability as Availability, type AvailabilityCreateParams as AvailabilityCreateParams, type AvailabilityUpdateParams as AvailabilityUpdateParams, };
|
|
189
|
+
export { Pools as Pools, type NKSNodeConfig as NKSNodeConfig, type NKSNodeConfigResponse as NKSNodeConfigResponse, type NKSNodePool as NKSNodePool, type NKSNodePoolList as NKSNodePoolList, type NKSNodePoolsCursor as NKSNodePoolsCursor, type PoolCreateParams as PoolCreateParams, type PoolUpdateParams as PoolUpdateParams, type PoolListParams as PoolListParams, type PoolDeleteParams as PoolDeleteParams, type PoolGetParams as PoolGetParams, };
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=clusters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clusters.d.ts","sourceRoot":"","sources":["../../../src/resources/nks/clusters/clusters.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,KAAK,aAAa;OAClB,KAAK,eAAe;OACpB,EAAE,YAAY,EAAE,wBAAwB,EAAE,wBAAwB,EAAE;OACpE,KAAK,aAAa;OAClB,KAAK,QAAQ;OACb,EACL,aAAa,EACb,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,KAAK,EACN;OACM,EAAE,UAAU,EAAE;OACd,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE;OAC1C,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;IAC5F,UAAU,EAAE,aAAa,CAAC,UAAU,CAA8C;IAClF,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC,SAAS,CAAC;IAIhG;;;;;;;;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W,IAAI,WAAW,EAC/B,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,aAAa,IAAI,aAAa,GACpC,CAAC;CACH"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Clusters = void 0;
|
|
5
|
+
const tslib_1 = require("../../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../../core/resource.js");
|
|
7
|
+
const AvailabilityAPI = tslib_1.__importStar(require("./availability.js"));
|
|
8
|
+
const availability_1 = require("./availability.js");
|
|
9
|
+
const KubeconfigAPI = tslib_1.__importStar(require("./kubeconfig.js"));
|
|
10
|
+
const PoolsAPI = tslib_1.__importStar(require("./pools/pools.js"));
|
|
11
|
+
const pools_1 = require("./pools/pools.js");
|
|
12
|
+
const pagination_1 = require("../../../core/pagination.js");
|
|
13
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
14
|
+
class Clusters extends resource_1.APIResource {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
this.availability = new AvailabilityAPI.Availability(this._client);
|
|
18
|
+
this.kubeconfig = new KubeconfigAPI.Kubeconfig(this._client);
|
|
19
|
+
this.pools = new PoolsAPI.Pools(this._client);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Create an NKS Cluster
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const operation = await client.nks.clusters.create({
|
|
27
|
+
* name: 'my-cluster',
|
|
28
|
+
* project_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
29
|
+
* region: 'us-wdc-1',
|
|
30
|
+
* vpc_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
create(body, options) {
|
|
35
|
+
return this._client.post('/v1/nks/clusters', { body, ...options });
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Update an NKS cluster
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const nksCluster = await client.nks.clusters.update(
|
|
43
|
+
* 'cluster_id',
|
|
44
|
+
* );
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
update(clusterID, body, options) {
|
|
48
|
+
return this._client.patch((0, path_1.path) `/v1/nks/clusters/${clusterID}`, { body, ...options });
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* List all NKS clusters
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* // Automatically fetches more pages as needed.
|
|
56
|
+
* for await (const nksCluster of client.nks.clusters.list({
|
|
57
|
+
* project_id: 'project_id',
|
|
58
|
+
* })) {
|
|
59
|
+
* // ...
|
|
60
|
+
* }
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
list(query, options) {
|
|
64
|
+
return this._client.getAPIList('/v1/nks/clusters', (pagination_1.Cursor), { query, ...options });
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Delete an NKS cluster
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* const operation = await client.nks.clusters.delete(
|
|
72
|
+
* 'cluster_id',
|
|
73
|
+
* );
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
delete(clusterID, options) {
|
|
77
|
+
return this._client.delete((0, path_1.path) `/v1/nks/clusters/${clusterID}`, options);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Get details about an NKS cluster
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const nksCluster = await client.nks.clusters.get(
|
|
85
|
+
* 'cluster_id',
|
|
86
|
+
* );
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
get(clusterID, options) {
|
|
90
|
+
return this._client.get((0, path_1.path) `/v1/nks/clusters/${clusterID}`, options);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.Clusters = Clusters;
|
|
94
|
+
Clusters.Availability = availability_1.Availability;
|
|
95
|
+
Clusters.Pools = pools_1.Pools;
|
|
96
|
+
//# sourceMappingURL=clusters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clusters.js","sourceRoot":"","sources":["../../../src/resources/nks/clusters/clusters.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAGrD,2EAAkD;AAClD,oDAAkG;AAClG,uEAA8C;AAC9C,mEAA0C;AAC1C,4CAYuB;AAEvB,4DAAkF;AAElF,0DAAoD;AAEpD,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5F,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClF,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA6E3D,CAAC;IA3EC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,SAAiB,EAAE,IAAyB,EAAE,OAAwB;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,oBAAoB,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,KAAwB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAA,mBAAkB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChG,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,SAAiB,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,oBAAoB,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;OASG;IACH,GAAG,CAAC,SAAiB,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oBAAoB,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;CACF;AAhFD,4BAgFC;AAsID,QAAQ,CAAC,YAAY,GAAG,2BAAY,CAAC;AACrC,QAAQ,CAAC,KAAK,GAAG,aAAK,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import * as AvailabilityAPI from "./availability.mjs";
|
|
4
|
+
import { Availability } from "./availability.mjs";
|
|
5
|
+
import * as KubeconfigAPI from "./kubeconfig.mjs";
|
|
6
|
+
import * as PoolsAPI from "./pools/pools.mjs";
|
|
7
|
+
import { Pools, } from "./pools/pools.mjs";
|
|
8
|
+
import { Cursor } from "../../../core/pagination.mjs";
|
|
9
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
10
|
+
export class Clusters extends APIResource {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.availability = new AvailabilityAPI.Availability(this._client);
|
|
14
|
+
this.kubeconfig = new KubeconfigAPI.Kubeconfig(this._client);
|
|
15
|
+
this.pools = new PoolsAPI.Pools(this._client);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Create an NKS Cluster
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const operation = await client.nks.clusters.create({
|
|
23
|
+
* name: 'my-cluster',
|
|
24
|
+
* project_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
25
|
+
* region: 'us-wdc-1',
|
|
26
|
+
* vpc_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
create(body, options) {
|
|
31
|
+
return this._client.post('/v1/nks/clusters', { body, ...options });
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Update an NKS cluster
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const nksCluster = await client.nks.clusters.update(
|
|
39
|
+
* 'cluster_id',
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
update(clusterID, body, options) {
|
|
44
|
+
return this._client.patch(path `/v1/nks/clusters/${clusterID}`, { body, ...options });
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* List all NKS clusters
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* // Automatically fetches more pages as needed.
|
|
52
|
+
* for await (const nksCluster of client.nks.clusters.list({
|
|
53
|
+
* project_id: 'project_id',
|
|
54
|
+
* })) {
|
|
55
|
+
* // ...
|
|
56
|
+
* }
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
list(query, options) {
|
|
60
|
+
return this._client.getAPIList('/v1/nks/clusters', (Cursor), { query, ...options });
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Delete an NKS cluster
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const operation = await client.nks.clusters.delete(
|
|
68
|
+
* 'cluster_id',
|
|
69
|
+
* );
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
delete(clusterID, options) {
|
|
73
|
+
return this._client.delete(path `/v1/nks/clusters/${clusterID}`, options);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Get details about an NKS cluster
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const nksCluster = await client.nks.clusters.get(
|
|
81
|
+
* 'cluster_id',
|
|
82
|
+
* );
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
get(clusterID, options) {
|
|
86
|
+
return this._client.get(path `/v1/nks/clusters/${clusterID}`, options);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
Clusters.Availability = Availability;
|
|
90
|
+
Clusters.Pools = Pools;
|
|
91
|
+
//# sourceMappingURL=clusters.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clusters.mjs","sourceRoot":"","sources":["../../../src/resources/nks/clusters/clusters.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,KAAK,eAAe;OACpB,EAAE,YAAY,EAAsD;OACpE,KAAK,aAAa;OAClB,KAAK,QAAQ;OACb,EAWL,KAAK,GACN;OAEM,EAAE,MAAM,EAAkC;OAE1C,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5F,eAAU,GAA6B,IAAI,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;Q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availability.mjs";
|
|
2
|
+
export { Clusters, type Kubeconfig, type NKSCluster, type NKSClusterList, type ClusterCreateParams, type ClusterUpdateParams, type ClusterListParams, type NKSClustersCursor, } from "./clusters.mjs";
|
|
3
|
+
export { Pools, type NKSNodeConfig, type NKSNodeConfigResponse, type NKSNodePool, type NKSNodePoolList, type PoolCreateParams, type PoolUpdateParams, type PoolListParams, type PoolDeleteParams, type PoolGetParams, type NKSNodePoolsCursor, } from "./pools/index.mjs";
|
|
4
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/nks/clusters/index.ts"],"names":[],"mappings":"OAEO,EAAE,YAAY,EAAE,KAAK,wBAAwB,EAAE,KAAK,wBAAwB,EAAE;OAC9E,EACL,QAAQ,EACR,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB;OACM,EACL,KAAK,EACL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,kBAAkB,GACxB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Availability, type AvailabilityCreateParams, type AvailabilityUpdateParams } from "./availability.js";
|
|
2
|
+
export { Clusters, type Kubeconfig, type NKSCluster, type NKSClusterList, type ClusterCreateParams, type ClusterUpdateParams, type ClusterListParams, type NKSClustersCursor, } from "./clusters.js";
|
|
3
|
+
export { Pools, type NKSNodeConfig, type NKSNodeConfigResponse, type NKSNodePool, type NKSNodePoolList, type PoolCreateParams, type PoolUpdateParams, type PoolListParams, type PoolDeleteParams, type PoolGetParams, type NKSNodePoolsCursor, } from "./pools/index.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/nks/clusters/index.ts"],"names":[],"mappings":"OAEO,EAAE,YAAY,EAAE,KAAK,wBAAwB,EAAE,KAAK,wBAAwB,EAAE;OAC9E,EACL,QAAQ,EACR,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB;OACM,EACL,KAAK,EACL,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,kBAAkB,GACxB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Pools = exports.Clusters = exports.Availability = void 0;
|
|
5
|
+
var availability_1 = require("./availability.js");
|
|
6
|
+
Object.defineProperty(exports, "Availability", { enumerable: true, get: function () { return availability_1.Availability; } });
|
|
7
|
+
var clusters_1 = require("./clusters.js");
|
|
8
|
+
Object.defineProperty(exports, "Clusters", { enumerable: true, get: function () { return clusters_1.Clusters; } });
|
|
9
|
+
var index_1 = require("./pools/index.js");
|
|
10
|
+
Object.defineProperty(exports, "Pools", { enumerable: true, get: function () { return index_1.Pools; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/nks/clusters/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA4G;AAAnG,4GAAA,YAAY,OAAA;AACrB,0CASoB;AARlB,oGAAA,QAAQ,OAAA;AASV,0CAYuB;AAXrB,8FAAA,KAAK,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/nks/clusters/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,YAAY,EAAgE;OAC9E,EACL,QAAQ,GAQT;OACM,EACL,KAAK,GAWN"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as ClustersAPI from "./clusters.mjs";
|
|
3
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
4
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
5
|
+
export declare class Kubeconfig extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Get the kubeconfig for an NKS cluster
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const kubeconfig = await client.nks.clusters.kubeconfig.get(
|
|
12
|
+
* 'cluster_id',
|
|
13
|
+
* );
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
get(clusterID: string, options?: RequestOptions): APIPromise<ClustersAPI.Kubeconfig>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=kubeconfig.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kubeconfig.d.mts","sourceRoot":"","sources":["../../../src/resources/nks/clusters/kubeconfig.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;OASG;IACH,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC,UAAU,CAAC;CAGrF"}
|