@nirvana-labs/nirvana 1.55.3 → 1.56.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.
Files changed (181) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/bin/migration-config.json +300 -0
  3. package/client.d.mts +3 -0
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +3 -0
  6. package/client.d.ts.map +1 -1
  7. package/client.js +3 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +3 -0
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/index.d.mts +1 -0
  13. package/resources/index.d.mts.map +1 -1
  14. package/resources/index.d.ts +1 -0
  15. package/resources/index.d.ts.map +1 -1
  16. package/resources/index.js +3 -1
  17. package/resources/index.js.map +1 -1
  18. package/resources/index.mjs +1 -0
  19. package/resources/index.mjs.map +1 -1
  20. package/resources/nks/clusters/availability.d.mts +65 -0
  21. package/resources/nks/clusters/availability.d.mts.map +1 -0
  22. package/resources/nks/clusters/availability.d.ts +65 -0
  23. package/resources/nks/clusters/availability.d.ts.map +1 -0
  24. package/resources/nks/clusters/availability.js +46 -0
  25. package/resources/nks/clusters/availability.js.map +1 -0
  26. package/resources/nks/clusters/availability.mjs +42 -0
  27. package/resources/nks/clusters/availability.mjs.map +1 -0
  28. package/resources/nks/clusters/clusters.d.mts +191 -0
  29. package/resources/nks/clusters/clusters.d.mts.map +1 -0
  30. package/resources/nks/clusters/clusters.d.ts +191 -0
  31. package/resources/nks/clusters/clusters.d.ts.map +1 -0
  32. package/resources/nks/clusters/clusters.js +96 -0
  33. package/resources/nks/clusters/clusters.js.map +1 -0
  34. package/resources/nks/clusters/clusters.mjs +91 -0
  35. package/resources/nks/clusters/clusters.mjs.map +1 -0
  36. package/resources/nks/clusters/index.d.mts +4 -0
  37. package/resources/nks/clusters/index.d.mts.map +1 -0
  38. package/resources/nks/clusters/index.d.ts +4 -0
  39. package/resources/nks/clusters/index.d.ts.map +1 -0
  40. package/resources/nks/clusters/index.js +11 -0
  41. package/resources/nks/clusters/index.js.map +1 -0
  42. package/resources/nks/clusters/index.mjs +5 -0
  43. package/resources/nks/clusters/index.mjs.map +1 -0
  44. package/resources/nks/clusters/kubeconfig.d.mts +18 -0
  45. package/resources/nks/clusters/kubeconfig.d.mts.map +1 -0
  46. package/resources/nks/clusters/kubeconfig.d.ts +18 -0
  47. package/resources/nks/clusters/kubeconfig.d.ts.map +1 -0
  48. package/resources/nks/clusters/kubeconfig.js +23 -0
  49. package/resources/nks/clusters/kubeconfig.js.map +1 -0
  50. package/resources/nks/clusters/kubeconfig.mjs +19 -0
  51. package/resources/nks/clusters/kubeconfig.mjs.map +1 -0
  52. package/resources/nks/clusters/pools/availability.d.mts +74 -0
  53. package/resources/nks/clusters/pools/availability.d.mts.map +1 -0
  54. package/resources/nks/clusters/pools/availability.d.ts +74 -0
  55. package/resources/nks/clusters/pools/availability.d.ts.map +1 -0
  56. package/resources/nks/clusters/pools/availability.js +56 -0
  57. package/resources/nks/clusters/pools/availability.js.map +1 -0
  58. package/resources/nks/clusters/pools/availability.mjs +52 -0
  59. package/resources/nks/clusters/pools/availability.mjs.map +1 -0
  60. package/resources/nks/clusters/pools/index.d.mts +4 -0
  61. package/resources/nks/clusters/pools/index.d.mts.map +1 -0
  62. package/resources/nks/clusters/pools/index.d.ts +4 -0
  63. package/resources/nks/clusters/pools/index.d.ts.map +1 -0
  64. package/resources/nks/clusters/pools/index.js +11 -0
  65. package/resources/nks/clusters/pools/index.js.map +1 -0
  66. package/resources/nks/clusters/pools/index.mjs +5 -0
  67. package/resources/nks/clusters/pools/index.mjs.map +1 -0
  68. package/resources/nks/clusters/pools/nodes/index.d.mts +3 -0
  69. package/resources/nks/clusters/pools/nodes/index.d.mts.map +1 -0
  70. package/resources/nks/clusters/pools/nodes/index.d.ts +3 -0
  71. package/resources/nks/clusters/pools/nodes/index.d.ts.map +1 -0
  72. package/resources/nks/clusters/pools/nodes/index.js +9 -0
  73. package/resources/nks/clusters/pools/nodes/index.js.map +1 -0
  74. package/resources/nks/clusters/pools/nodes/index.mjs +4 -0
  75. package/resources/nks/clusters/pools/nodes/index.mjs.map +1 -0
  76. package/resources/nks/clusters/pools/nodes/nodes.d.mts +95 -0
  77. package/resources/nks/clusters/pools/nodes/nodes.d.mts.map +1 -0
  78. package/resources/nks/clusters/pools/nodes/nodes.d.ts +95 -0
  79. package/resources/nks/clusters/pools/nodes/nodes.d.ts.map +1 -0
  80. package/resources/nks/clusters/pools/nodes/nodes.js +52 -0
  81. package/resources/nks/clusters/pools/nodes/nodes.js.map +1 -0
  82. package/resources/nks/clusters/pools/nodes/nodes.mjs +47 -0
  83. package/resources/nks/clusters/pools/nodes/nodes.mjs.map +1 -0
  84. package/resources/nks/clusters/pools/nodes/volumes.d.mts +109 -0
  85. package/resources/nks/clusters/pools/nodes/volumes.d.mts.map +1 -0
  86. package/resources/nks/clusters/pools/nodes/volumes.d.ts +109 -0
  87. package/resources/nks/clusters/pools/nodes/volumes.d.ts.map +1 -0
  88. package/resources/nks/clusters/pools/nodes/volumes.js +49 -0
  89. package/resources/nks/clusters/pools/nodes/volumes.js.map +1 -0
  90. package/resources/nks/clusters/pools/nodes/volumes.mjs +45 -0
  91. package/resources/nks/clusters/pools/nodes/volumes.mjs.map +1 -0
  92. package/resources/nks/clusters/pools/nodes.d.mts +2 -0
  93. package/resources/nks/clusters/pools/nodes.d.mts.map +1 -0
  94. package/resources/nks/clusters/pools/nodes.d.ts +2 -0
  95. package/resources/nks/clusters/pools/nodes.d.ts.map +1 -0
  96. package/resources/nks/clusters/pools/nodes.js +6 -0
  97. package/resources/nks/clusters/pools/nodes.js.map +1 -0
  98. package/resources/nks/clusters/pools/nodes.mjs +3 -0
  99. package/resources/nks/clusters/pools/nodes.mjs.map +1 -0
  100. package/resources/nks/clusters/pools/pools.d.mts +221 -0
  101. package/resources/nks/clusters/pools/pools.d.mts.map +1 -0
  102. package/resources/nks/clusters/pools/pools.d.ts +221 -0
  103. package/resources/nks/clusters/pools/pools.d.ts.map +1 -0
  104. package/resources/nks/clusters/pools/pools.js +109 -0
  105. package/resources/nks/clusters/pools/pools.js.map +1 -0
  106. package/resources/nks/clusters/pools/pools.mjs +104 -0
  107. package/resources/nks/clusters/pools/pools.mjs.map +1 -0
  108. package/resources/nks/clusters/pools.d.mts +2 -0
  109. package/resources/nks/clusters/pools.d.mts.map +1 -0
  110. package/resources/nks/clusters/pools.d.ts +2 -0
  111. package/resources/nks/clusters/pools.d.ts.map +1 -0
  112. package/resources/nks/clusters/pools.js +6 -0
  113. package/resources/nks/clusters/pools.js.map +1 -0
  114. package/resources/nks/clusters/pools.mjs +3 -0
  115. package/resources/nks/clusters/pools.mjs.map +1 -0
  116. package/resources/nks/clusters.d.mts +2 -0
  117. package/resources/nks/clusters.d.mts.map +1 -0
  118. package/resources/nks/clusters.d.ts +2 -0
  119. package/resources/nks/clusters.d.ts.map +1 -0
  120. package/resources/nks/clusters.js +6 -0
  121. package/resources/nks/clusters.js.map +1 -0
  122. package/resources/nks/clusters.mjs +3 -0
  123. package/resources/nks/clusters.mjs.map +1 -0
  124. package/resources/nks/index.d.mts +3 -0
  125. package/resources/nks/index.d.mts.map +1 -0
  126. package/resources/nks/index.d.ts +3 -0
  127. package/resources/nks/index.d.ts.map +1 -0
  128. package/resources/nks/index.js +9 -0
  129. package/resources/nks/index.js.map +1 -0
  130. package/resources/nks/index.mjs +4 -0
  131. package/resources/nks/index.mjs.map +1 -0
  132. package/resources/nks/nks.d.mts +10 -0
  133. package/resources/nks/nks.d.mts.map +1 -0
  134. package/resources/nks/nks.d.ts +10 -0
  135. package/resources/nks/nks.d.ts.map +1 -0
  136. package/resources/nks/nks.js +17 -0
  137. package/resources/nks/nks.js.map +1 -0
  138. package/resources/nks/nks.mjs +12 -0
  139. package/resources/nks/nks.mjs.map +1 -0
  140. package/resources/nks.d.mts +2 -0
  141. package/resources/nks.d.mts.map +1 -0
  142. package/resources/nks.d.ts +2 -0
  143. package/resources/nks.d.ts.map +1 -0
  144. package/resources/nks.js +6 -0
  145. package/resources/nks.js.map +1 -0
  146. package/resources/nks.mjs +3 -0
  147. package/resources/nks.mjs.map +1 -0
  148. package/resources/operations/operations.d.mts +1 -1
  149. package/resources/operations/operations.d.mts.map +1 -1
  150. package/resources/operations/operations.d.ts +1 -1
  151. package/resources/operations/operations.d.ts.map +1 -1
  152. package/resources/regions/regions.d.mts +13 -0
  153. package/resources/regions/regions.d.mts.map +1 -1
  154. package/resources/regions/regions.d.ts +13 -0
  155. package/resources/regions/regions.d.ts.map +1 -1
  156. package/src/client.ts +5 -0
  157. package/src/resources/index.ts +1 -0
  158. package/src/resources/nks/api.md +77 -0
  159. package/src/resources/nks/clusters/availability.ts +93 -0
  160. package/src/resources/nks/clusters/clusters.ts +273 -0
  161. package/src/resources/nks/clusters/index.ts +25 -0
  162. package/src/resources/nks/clusters/kubeconfig.ts +23 -0
  163. package/src/resources/nks/clusters/pools/availability.ts +103 -0
  164. package/src/resources/nks/clusters/pools/index.ts +23 -0
  165. package/src/resources/nks/clusters/pools/nodes/index.ts +18 -0
  166. package/src/resources/nks/clusters/pools/nodes/nodes.ts +150 -0
  167. package/src/resources/nks/clusters/pools/nodes/volumes.ts +152 -0
  168. package/src/resources/nks/clusters/pools/nodes.ts +3 -0
  169. package/src/resources/nks/clusters/pools/pools.ts +311 -0
  170. package/src/resources/nks/clusters/pools.ts +3 -0
  171. package/src/resources/nks/clusters.ts +3 -0
  172. package/src/resources/nks/index.ts +13 -0
  173. package/src/resources/nks/nks.ts +33 -0
  174. package/src/resources/nks.ts +3 -0
  175. package/src/resources/operations/operations.ts +1 -1
  176. package/src/resources/regions/regions.ts +15 -0
  177. package/src/version.ts +1 -1
  178. package/version.d.mts +1 -1
  179. package/version.d.ts +1 -1
  180. package/version.js +1 -1
  181. package/version.mjs +1 -1
@@ -0,0 +1,23 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as ClustersAPI from './clusters';
5
+ import { APIPromise } from '../../../core/api-promise';
6
+ import { RequestOptions } from '../../../internal/request-options';
7
+ import { path } from '../../../internal/utils/path';
8
+
9
+ export class Kubeconfig extends APIResource {
10
+ /**
11
+ * Get the kubeconfig for an NKS cluster
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const kubeconfig = await client.nks.clusters.kubeconfig.get(
16
+ * 'cluster_id',
17
+ * );
18
+ * ```
19
+ */
20
+ get(clusterID: string, options?: RequestOptions): APIPromise<ClustersAPI.Kubeconfig> {
21
+ return this._client.get(path`/v1/nks/clusters/${clusterID}/kubeconfig`, options);
22
+ }
23
+ }
@@ -0,0 +1,103 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../../core/resource';
4
+ import * as PoolsAPI from './pools';
5
+ import { APIPromise } from '../../../../core/api-promise';
6
+ import { buildHeaders } from '../../../../internal/headers';
7
+ import { RequestOptions } from '../../../../internal/request-options';
8
+ import { path } from '../../../../internal/utils/path';
9
+
10
+ export class Availability extends APIResource {
11
+ /**
12
+ * Check if a node pool can be created in an NKS cluster
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * await client.nks.clusters.pools.availability.create(
17
+ * 'cluster_id',
18
+ * {
19
+ * name: 'my-node-pool',
20
+ * node_config: {
21
+ * ram_gi: 8,
22
+ * storage_gi: 100,
23
+ * vcpu: 4,
24
+ * },
25
+ * node_count: 3,
26
+ * },
27
+ * );
28
+ * ```
29
+ */
30
+ create(clusterID: string, body: AvailabilityCreateParams, options?: RequestOptions): APIPromise<void> {
31
+ return this._client.post(path`/v1/nks/clusters/${clusterID}/pools/availability`, {
32
+ body,
33
+ ...options,
34
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
35
+ });
36
+ }
37
+
38
+ /**
39
+ * Check if an NKS node pool can be updated
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * await client.nks.clusters.pools.availability.update(
44
+ * 'pool_id',
45
+ * { cluster_id: 'cluster_id' },
46
+ * );
47
+ * ```
48
+ */
49
+ update(poolID: string, params: AvailabilityUpdateParams, options?: RequestOptions): APIPromise<void> {
50
+ const { cluster_id, ...body } = params;
51
+ return this._client.patch(path`/v1/nks/clusters/${cluster_id}/pools/${poolID}/availability`, {
52
+ body,
53
+ ...options,
54
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
55
+ });
56
+ }
57
+ }
58
+
59
+ export interface AvailabilityCreateParams {
60
+ /**
61
+ * Name of the node pool.
62
+ */
63
+ name: string;
64
+
65
+ /**
66
+ * Node configuration.
67
+ */
68
+ node_config: PoolsAPI.NKSNodeConfig;
69
+
70
+ /**
71
+ * Number of nodes. Must be between 1 and 100.
72
+ */
73
+ node_count: number;
74
+
75
+ /**
76
+ * Tags to attach to the node pool.
77
+ */
78
+ tags?: Array<string>;
79
+ }
80
+
81
+ export interface AvailabilityUpdateParams {
82
+ /**
83
+ * Path param: Cluster ID
84
+ */
85
+ cluster_id: string;
86
+
87
+ /**
88
+ * Body param: Name of the node pool.
89
+ */
90
+ name?: string;
91
+
92
+ /**
93
+ * Body param: Tags to attach to the node pool.
94
+ */
95
+ tags?: Array<string>;
96
+ }
97
+
98
+ export declare namespace Availability {
99
+ export {
100
+ type AvailabilityCreateParams as AvailabilityCreateParams,
101
+ type AvailabilityUpdateParams as AvailabilityUpdateParams,
102
+ };
103
+ }
@@ -0,0 +1,23 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export { Availability, type AvailabilityCreateParams, type AvailabilityUpdateParams } from './availability';
4
+ export {
5
+ Nodes,
6
+ type NKSNode,
7
+ type NKSNodeList,
8
+ type NodeListParams,
9
+ type NodeGetParams,
10
+ type NKSNodesCursor,
11
+ } from './nodes/index';
12
+ export {
13
+ Pools,
14
+ type NKSNodeConfig,
15
+ type NKSNodePool,
16
+ type NKSNodePoolList,
17
+ type PoolCreateParams,
18
+ type PoolUpdateParams,
19
+ type PoolListParams,
20
+ type PoolDeleteParams,
21
+ type PoolGetParams,
22
+ type NKSNodePoolsCursor,
23
+ } from './pools';
@@ -0,0 +1,18 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export {
4
+ Nodes,
5
+ type NKSNode,
6
+ type NKSNodeList,
7
+ type NodeListParams,
8
+ type NodeGetParams,
9
+ type NKSNodesCursor,
10
+ } from './nodes';
11
+ export {
12
+ Volumes,
13
+ type NKSNodeVolume,
14
+ type NKSNodeVolumeList,
15
+ type VolumeListParams,
16
+ type VolumeGetParams,
17
+ type NKSNodeVolumesCursor,
18
+ } from './volumes';
@@ -0,0 +1,150 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../../../core/resource';
4
+ import * as Shared from '../../../../shared';
5
+ import * as VolumesAPI from './volumes';
6
+ import {
7
+ NKSNodeVolume,
8
+ NKSNodeVolumeList,
9
+ NKSNodeVolumesCursor,
10
+ VolumeGetParams,
11
+ VolumeListParams,
12
+ Volumes,
13
+ } from './volumes';
14
+ import { APIPromise } from '../../../../../core/api-promise';
15
+ import { Cursor, type CursorParams, PagePromise } from '../../../../../core/pagination';
16
+ import { RequestOptions } from '../../../../../internal/request-options';
17
+ import { path } from '../../../../../internal/utils/path';
18
+
19
+ export class Nodes extends APIResource {
20
+ volumes: VolumesAPI.Volumes = new VolumesAPI.Volumes(this._client);
21
+
22
+ /**
23
+ * List all nodes in an NKS node pool
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * // Automatically fetches more pages as needed.
28
+ * for await (const nksNode of client.nks.clusters.pools.nodes.list(
29
+ * 'pool_id',
30
+ * { cluster_id: 'cluster_id' },
31
+ * )) {
32
+ * // ...
33
+ * }
34
+ * ```
35
+ */
36
+ list(
37
+ poolID: string,
38
+ params: NodeListParams,
39
+ options?: RequestOptions,
40
+ ): PagePromise<NKSNodesCursor, NKSNode> {
41
+ const { cluster_id, ...query } = params;
42
+ return this._client.getAPIList(
43
+ path`/v1/nks/clusters/${cluster_id}/pools/${poolID}/nodes`,
44
+ Cursor<NKSNode>,
45
+ { query, ...options },
46
+ );
47
+ }
48
+
49
+ /**
50
+ * Get details about an NKS node
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const nksNode = await client.nks.clusters.pools.nodes.get(
55
+ * 'node_id',
56
+ * { cluster_id: 'cluster_id', pool_id: 'pool_id' },
57
+ * );
58
+ * ```
59
+ */
60
+ get(nodeID: string, params: NodeGetParams, options?: RequestOptions): APIPromise<NKSNode> {
61
+ const { cluster_id, pool_id } = params;
62
+ return this._client.get(path`/v1/nks/clusters/${cluster_id}/pools/${pool_id}/nodes/${nodeID}`, options);
63
+ }
64
+ }
65
+
66
+ export type NKSNodesCursor = Cursor<NKSNode>;
67
+
68
+ /**
69
+ * NKS node details.
70
+ */
71
+ export interface NKSNode {
72
+ /**
73
+ * Unique identifier for the node.
74
+ */
75
+ id: string;
76
+
77
+ /**
78
+ * When the node was created.
79
+ */
80
+ created_at: string;
81
+
82
+ /**
83
+ * Name of the node.
84
+ */
85
+ name: string;
86
+
87
+ /**
88
+ * Private IP address of the node.
89
+ */
90
+ private_ip: string | null;
91
+
92
+ /**
93
+ * Status of the resource.
94
+ */
95
+ status: Shared.ResourceStatus;
96
+
97
+ /**
98
+ * When the node was last updated.
99
+ */
100
+ updated_at: string;
101
+ }
102
+
103
+ export interface NKSNodeList {
104
+ items: Array<NKSNode>;
105
+
106
+ /**
107
+ * Pagination response details.
108
+ */
109
+ pagination: Shared.Pagination;
110
+ }
111
+
112
+ export interface NodeListParams extends CursorParams {
113
+ /**
114
+ * Path param: Cluster ID
115
+ */
116
+ cluster_id: string;
117
+ }
118
+
119
+ export interface NodeGetParams {
120
+ /**
121
+ * Cluster ID
122
+ */
123
+ cluster_id: string;
124
+
125
+ /**
126
+ * Node Pool ID
127
+ */
128
+ pool_id: string;
129
+ }
130
+
131
+ Nodes.Volumes = Volumes;
132
+
133
+ export declare namespace Nodes {
134
+ export {
135
+ type NKSNode as NKSNode,
136
+ type NKSNodeList as NKSNodeList,
137
+ type NKSNodesCursor as NKSNodesCursor,
138
+ type NodeListParams as NodeListParams,
139
+ type NodeGetParams as NodeGetParams,
140
+ };
141
+
142
+ export {
143
+ Volumes as Volumes,
144
+ type NKSNodeVolume as NKSNodeVolume,
145
+ type NKSNodeVolumeList as NKSNodeVolumeList,
146
+ type NKSNodeVolumesCursor as NKSNodeVolumesCursor,
147
+ type VolumeListParams as VolumeListParams,
148
+ type VolumeGetParams as VolumeGetParams,
149
+ };
150
+ }
@@ -0,0 +1,152 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../../../core/resource';
4
+ import * as Shared from '../../../../shared';
5
+ import * as VolumesAPI from '../../../../compute/volumes/volumes';
6
+ import { APIPromise } from '../../../../../core/api-promise';
7
+ import { Cursor, type CursorParams, PagePromise } from '../../../../../core/pagination';
8
+ import { RequestOptions } from '../../../../../internal/request-options';
9
+ import { path } from '../../../../../internal/utils/path';
10
+
11
+ export class Volumes extends APIResource {
12
+ /**
13
+ * List all volumes attached to an NKS node
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * // Automatically fetches more pages as needed.
18
+ * for await (const nksNodeVolume of client.nks.clusters.pools.nodes.volumes.list(
19
+ * 'node_id',
20
+ * { cluster_id: 'cluster_id', pool_id: 'pool_id' },
21
+ * )) {
22
+ * // ...
23
+ * }
24
+ * ```
25
+ */
26
+ list(
27
+ nodeID: string,
28
+ params: VolumeListParams,
29
+ options?: RequestOptions,
30
+ ): PagePromise<NKSNodeVolumesCursor, NKSNodeVolume> {
31
+ const { cluster_id, pool_id, ...query } = params;
32
+ return this._client.getAPIList(
33
+ path`/v1/nks/clusters/${cluster_id}/pools/${pool_id}/nodes/${nodeID}/volumes`,
34
+ Cursor<NKSNodeVolume>,
35
+ { query, ...options },
36
+ );
37
+ }
38
+
39
+ /**
40
+ * Get details about a volume attached to an NKS node
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * const nksNodeVolume =
45
+ * await client.nks.clusters.pools.nodes.volumes.get(
46
+ * 'volume_id',
47
+ * {
48
+ * cluster_id: 'cluster_id',
49
+ * pool_id: 'pool_id',
50
+ * node_id: 'node_id',
51
+ * },
52
+ * );
53
+ * ```
54
+ */
55
+ get(volumeID: string, params: VolumeGetParams, options?: RequestOptions): APIPromise<NKSNodeVolume> {
56
+ const { cluster_id, pool_id, node_id } = params;
57
+ return this._client.get(
58
+ path`/v1/nks/clusters/${cluster_id}/pools/${pool_id}/nodes/${node_id}/volumes/${volumeID}`,
59
+ options,
60
+ );
61
+ }
62
+ }
63
+
64
+ export type NKSNodeVolumesCursor = Cursor<NKSNodeVolume>;
65
+
66
+ /**
67
+ * NKS node volume details.
68
+ */
69
+ export interface NKSNodeVolume {
70
+ /**
71
+ * Unique identifier for the volume.
72
+ */
73
+ id: string;
74
+
75
+ /**
76
+ * When the volume was created.
77
+ */
78
+ created_at: string;
79
+
80
+ /**
81
+ * Volume kind.
82
+ */
83
+ kind: VolumesAPI.VolumeKind;
84
+
85
+ /**
86
+ * Name of the volume.
87
+ */
88
+ name: string;
89
+
90
+ /**
91
+ * Status of the resource.
92
+ */
93
+ status: Shared.ResourceStatus;
94
+
95
+ /**
96
+ * Type of the Volume.
97
+ */
98
+ type: VolumesAPI.VolumeType;
99
+
100
+ /**
101
+ * When the volume was last updated.
102
+ */
103
+ updated_at: string;
104
+ }
105
+
106
+ export interface NKSNodeVolumeList {
107
+ items: Array<NKSNodeVolume>;
108
+
109
+ /**
110
+ * Pagination response details.
111
+ */
112
+ pagination: Shared.Pagination;
113
+ }
114
+
115
+ export interface VolumeListParams extends CursorParams {
116
+ /**
117
+ * Path param: Cluster ID
118
+ */
119
+ cluster_id: string;
120
+
121
+ /**
122
+ * Path param: Node Pool ID
123
+ */
124
+ pool_id: string;
125
+ }
126
+
127
+ export interface VolumeGetParams {
128
+ /**
129
+ * Cluster ID
130
+ */
131
+ cluster_id: string;
132
+
133
+ /**
134
+ * Node Pool ID
135
+ */
136
+ pool_id: string;
137
+
138
+ /**
139
+ * Node ID
140
+ */
141
+ node_id: string;
142
+ }
143
+
144
+ export declare namespace Volumes {
145
+ export {
146
+ type NKSNodeVolume as NKSNodeVolume,
147
+ type NKSNodeVolumeList as NKSNodeVolumeList,
148
+ type NKSNodeVolumesCursor as NKSNodeVolumesCursor,
149
+ type VolumeListParams as VolumeListParams,
150
+ type VolumeGetParams as VolumeGetParams,
151
+ };
152
+ }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './nodes/index';