@nirvana-labs/nirvana-mcp 1.71.1 → 1.73.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/local-docs-search.js +24 -24
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +24 -24
- package/local-docs-search.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/local-docs-search.ts +24 -24
- package/src/server.ts +1 -1
package/src/local-docs-search.ts
CHANGED
|
@@ -652,9 +652,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
652
652
|
qualified: 'client.auditLogs.get',
|
|
653
653
|
params: ['audit_log_id: string;'],
|
|
654
654
|
response:
|
|
655
|
-
'{ id: string; action: string; actor: { id: string; type: audit_log_type; }; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: { id: string; type: string; }; }',
|
|
655
|
+
'{ id: string; action: string; actor: { id: string; name: string; type: audit_log_type; }; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: { id: string; type: string; }; }',
|
|
656
656
|
markdown:
|
|
657
|
-
"## get\n\n`client.auditLogs.get(audit_log_id: string): { id: string; action: string; actor: audit_log_actor; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: object; }`\n\n**get** `/v1/audit_logs/{audit_log_id}`\n\nGet an Audit Log entry\n\n### Parameters\n\n- `audit_log_id: string`\n\n### Returns\n\n- `{ id: string; action: string; actor: { id: string; type: audit_log_type; }; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: { id: string; type: string; }; }`\n Audit log entry.\n\n - `id: string`\n - `action: string`\n - `actor: { id: string; type: 'user' | 'api_key'; }`\n - `client_ip: string`\n - `created_at: string`\n - `method: string`\n - `path: string`\n - `status_code: number`\n - `user_agent: string`\n - `target?: { id: string; type: string; }`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst auditLog = await client.auditLogs.get('audit_log_id');\n\nconsole.log(auditLog);\n```",
|
|
657
|
+
"## get\n\n`client.auditLogs.get(audit_log_id: string): { id: string; action: string; actor: audit_log_actor; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: object; }`\n\n**get** `/v1/audit_logs/{audit_log_id}`\n\nGet an Audit Log entry\n\n### Parameters\n\n- `audit_log_id: string`\n\n### Returns\n\n- `{ id: string; action: string; actor: { id: string; name: string; type: audit_log_type; }; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: { id: string; type: string; }; }`\n Audit log entry.\n\n - `id: string`\n - `action: string`\n - `actor: { id: string; name: string; type: 'user' | 'api_key'; }`\n - `client_ip: string`\n - `created_at: string`\n - `method: string`\n - `path: string`\n - `status_code: number`\n - `user_agent: string`\n - `target?: { id: string; type: string; }`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst auditLog = await client.auditLogs.get('audit_log_id');\n\nconsole.log(auditLog);\n```",
|
|
658
658
|
perLanguage: {
|
|
659
659
|
cli: {
|
|
660
660
|
method: 'audit_logs get',
|
|
@@ -686,9 +686,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
686
686
|
qualified: 'client.auditLogs.list',
|
|
687
687
|
params: ['cursor?: string;', 'limit?: number;'],
|
|
688
688
|
response:
|
|
689
|
-
'{ id: string; action: string; actor: { id: string; type: audit_log_type; }; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: { id: string; type: string; }; }',
|
|
689
|
+
'{ id: string; action: string; actor: { id: string; name: string; type: audit_log_type; }; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: { id: string; type: string; }; }',
|
|
690
690
|
markdown:
|
|
691
|
-
"## list\n\n`client.auditLogs.list(cursor?: string, limit?: number): { id: string; action: string; actor: audit_log_actor; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: object; }`\n\n**get** `/v1/audit_logs`\n\nList Audit Log entries for an organization\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; action: string; actor: { id: string; type: audit_log_type; }; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: { id: string; type: string; }; }`\n Audit log entry.\n\n - `id: string`\n - `action: string`\n - `actor: { id: string; type: 'user' | 'api_key'; }`\n - `client_ip: string`\n - `created_at: string`\n - `method: string`\n - `path: string`\n - `status_code: number`\n - `user_agent: string`\n - `target?: { id: string; type: string; }`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const auditLog of client.auditLogs.list()) {\n console.log(auditLog);\n}\n```",
|
|
691
|
+
"## list\n\n`client.auditLogs.list(cursor?: string, limit?: number): { id: string; action: string; actor: audit_log_actor; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: object; }`\n\n**get** `/v1/audit_logs`\n\nList Audit Log entries for an organization\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; action: string; actor: { id: string; name: string; type: audit_log_type; }; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: { id: string; type: string; }; }`\n Audit log entry.\n\n - `id: string`\n - `action: string`\n - `actor: { id: string; name: string; type: 'user' | 'api_key'; }`\n - `client_ip: string`\n - `created_at: string`\n - `method: string`\n - `path: string`\n - `status_code: number`\n - `user_agent: string`\n - `target?: { id: string; type: string; }`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const auditLog of client.auditLogs.list()) {\n console.log(auditLog);\n}\n```",
|
|
692
692
|
perLanguage: {
|
|
693
693
|
cli: {
|
|
694
694
|
method: 'audit_logs list',
|
|
@@ -3045,9 +3045,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3045
3045
|
qualified: 'client.nks.clusters.controllers.get',
|
|
3046
3046
|
params: ['cluster_id: string;', 'controller_id: string;'],
|
|
3047
3047
|
response:
|
|
3048
|
-
"{ id: string;
|
|
3048
|
+
"{ id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
3049
3049
|
markdown:
|
|
3050
|
-
"## get\n\n`client.nks.clusters.controllers.get(cluster_id: string, controller_id: string): { id: string;
|
|
3050
|
+
"## get\n\n`client.nks.clusters.controllers.get(cluster_id: string, controller_id: string): { id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/controllers/{controller_id}`\n\nGet details about an NKS controller\n\n### Parameters\n\n- `cluster_id: string`\n\n- `controller_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }`\n NKS controller details.\n\n - `id: string`\n - `created_at: string`\n - `instance_type: string`\n - `name: string`\n - `private_ip: string`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst nksController = await client.nks.clusters.controllers.get('controller_id', { cluster_id: 'cluster_id' });\n\nconsole.log(nksController);\n```",
|
|
3051
3051
|
perLanguage: {
|
|
3052
3052
|
cli: {
|
|
3053
3053
|
method: 'controllers get',
|
|
@@ -3080,9 +3080,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3080
3080
|
qualified: 'client.nks.clusters.controllers.list',
|
|
3081
3081
|
params: ['cluster_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
3082
3082
|
response:
|
|
3083
|
-
"{ id: string;
|
|
3083
|
+
"{ id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
3084
3084
|
markdown:
|
|
3085
|
-
"## list\n\n`client.nks.clusters.controllers.list(cluster_id: string, cursor?: string, limit?: number): { id: string;
|
|
3085
|
+
"## list\n\n`client.nks.clusters.controllers.list(cluster_id: string, cursor?: string, limit?: number): { id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/controllers`\n\nList all controllers in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }`\n NKS controller details.\n\n - `id: string`\n - `created_at: string`\n - `instance_type: string`\n - `name: string`\n - `private_ip: string`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const nksController of client.nks.clusters.controllers.list('cluster_id')) {\n console.log(nksController);\n}\n```",
|
|
3086
3086
|
perLanguage: {
|
|
3087
3087
|
cli: {
|
|
3088
3088
|
method: 'controllers list',
|
|
@@ -3256,33 +3256,33 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3256
3256
|
params: [
|
|
3257
3257
|
'cluster_id: string;',
|
|
3258
3258
|
'name: string;',
|
|
3259
|
-
'node_config: { boot_volume: { size: number; type: volume_type; };
|
|
3259
|
+
'node_config: { boot_volume: { size: number; type: volume_type; }; instance_type: string; };',
|
|
3260
3260
|
'node_count: number;',
|
|
3261
3261
|
'tags?: string[];',
|
|
3262
3262
|
],
|
|
3263
3263
|
response:
|
|
3264
3264
|
"{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
3265
3265
|
markdown:
|
|
3266
|
-
"## create\n\n`client.nks.clusters.pools.create(cluster_id: string, name: string, node_config: { boot_volume: nks_node_pool_boot_volume;
|
|
3266
|
+
"## create\n\n`client.nks.clusters.pools.create(cluster_id: string, name: string, node_config: { boot_volume: nks_node_pool_boot_volume; instance_type: string; }, node_count: number, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/nks/clusters/{cluster_id}/pools`\n\nCreate a node pool in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `name: string`\n Name of the node pool.\n\n- `node_config: { boot_volume: { size: number; type: volume_type; }; instance_type: string; }`\n Node configuration.\n - `boot_volume: { size: number; type: 'nvme' | 'abs'; }`\n Boot volume configuration.\n - `instance_type: string`\n Instance type name used for worker nodes.\n\n- `node_count: number`\n Number of nodes. Must be between 1 and 100.\n\n- `tags?: string[]`\n Tags to attach to the node pool.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.nks.clusters.pools.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n},\n node_count: 3,\n});\n\nconsole.log(operation);\n```",
|
|
3267
3267
|
perLanguage: {
|
|
3268
3268
|
cli: {
|
|
3269
3269
|
method: 'pools create',
|
|
3270
3270
|
example:
|
|
3271
|
-
"nirvana nks:clusters:pools create \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --name my-node-pool \\\n --node-config '{boot_volume: {size: 100, type: abs},
|
|
3271
|
+
"nirvana nks:clusters:pools create \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --name my-node-pool \\\n --node-config '{boot_volume: {size: 100, type: abs}, instance_type: n1-standard-8}' \\\n --node-count 3",
|
|
3272
3272
|
},
|
|
3273
3273
|
go: {
|
|
3274
3274
|
method: 'client.NKS.Clusters.Pools.New',
|
|
3275
3275
|
example:
|
|
3276
|
-
'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.NKS.Clusters.Pools.New(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterPoolNewParams{\n\t\t\tName: "my-node-pool",\n\t\t\tNodeConfig: nks.NKSNodePoolNodeConfigParam{\n\t\t\t\tBootVolume: nks.NKSNodePoolBootVolumeParam{\n\t\t\t\t\tSize: 100,\n\t\t\t\t\tType: compute.VolumeTypeABS,\n\t\t\t\t},\n\t\t\t\
|
|
3276
|
+
'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.NKS.Clusters.Pools.New(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterPoolNewParams{\n\t\t\tName: "my-node-pool",\n\t\t\tNodeConfig: nks.NKSNodePoolNodeConfigParam{\n\t\t\t\tBootVolume: nks.NKSNodePoolBootVolumeParam{\n\t\t\t\t\tSize: 100,\n\t\t\t\t\tType: compute.VolumeTypeABS,\n\t\t\t\t},\n\t\t\t\tInstanceType: "n1-standard-8",\n\t\t\t},\n\t\t\tNodeCount: 3,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
3277
3277
|
},
|
|
3278
3278
|
http: {
|
|
3279
3279
|
example:
|
|
3280
|
-
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_config": {\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "
|
|
3280
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_config": {\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "instance_type": "n1-standard-8"\n },\n "node_count": 3,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
3281
3281
|
},
|
|
3282
3282
|
typescript: {
|
|
3283
3283
|
method: 'client.nks.clusters.pools.create',
|
|
3284
3284
|
example:
|
|
3285
|
-
"import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n
|
|
3285
|
+
"import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n },\n node_count: 3,\n});\n\nconsole.log(operation.id);",
|
|
3286
3286
|
},
|
|
3287
3287
|
},
|
|
3288
3288
|
},
|
|
@@ -3296,9 +3296,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3296
3296
|
qualified: 'client.nks.clusters.pools.get',
|
|
3297
3297
|
params: ['cluster_id: string;', 'pool_id: string;'],
|
|
3298
3298
|
response:
|
|
3299
|
-
"{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response;
|
|
3299
|
+
"{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response; instance_type: string; }; node_count: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }",
|
|
3300
3300
|
markdown:
|
|
3301
|
-
"## get\n\n`client.nks.clusters.pools.get(cluster_id: string, pool_id: string): { id: string; cluster_id: string; created_at: string; name: string; node_config: nks_node_pool_node_config_response; node_count: number; status: resource_status; tags: string[]; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}`\n\nGet details about an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response;
|
|
3301
|
+
"## get\n\n`client.nks.clusters.pools.get(cluster_id: string, pool_id: string): { id: string; cluster_id: string; created_at: string; name: string; node_config: nks_node_pool_node_config_response; node_count: number; status: resource_status; tags: string[]; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}`\n\nGet details about an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response; instance_type: string; }; node_count: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }`\n NKS node pool details.\n\n - `id: string`\n - `cluster_id: string`\n - `created_at: string`\n - `name: string`\n - `node_config: { boot_volume: { size: number; type: volume_type; }; instance_type: string; }`\n - `node_count: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst nksNodePool = await client.nks.clusters.pools.get('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(nksNodePool);\n```",
|
|
3302
3302
|
perLanguage: {
|
|
3303
3303
|
cli: {
|
|
3304
3304
|
method: 'pools get',
|
|
@@ -3407,9 +3407,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3407
3407
|
qualified: 'client.nks.clusters.pools.list',
|
|
3408
3408
|
params: ['cluster_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
3409
3409
|
response:
|
|
3410
|
-
"{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response;
|
|
3410
|
+
"{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response; instance_type: string; }; node_count: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }",
|
|
3411
3411
|
markdown:
|
|
3412
|
-
"## list\n\n`client.nks.clusters.pools.list(cluster_id: string, cursor?: string, limit?: number): { id: string; cluster_id: string; created_at: string; name: string; node_config: nks_node_pool_node_config_response; node_count: number; status: resource_status; tags: string[]; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools`\n\nList all node pools in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response;
|
|
3412
|
+
"## list\n\n`client.nks.clusters.pools.list(cluster_id: string, cursor?: string, limit?: number): { id: string; cluster_id: string; created_at: string; name: string; node_config: nks_node_pool_node_config_response; node_count: number; status: resource_status; tags: string[]; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools`\n\nList all node pools in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response; instance_type: string; }; node_count: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }`\n NKS node pool details.\n\n - `id: string`\n - `cluster_id: string`\n - `created_at: string`\n - `name: string`\n - `node_config: { boot_volume: { size: number; type: volume_type; }; instance_type: string; }`\n - `node_count: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const nksNodePool of client.nks.clusters.pools.list('cluster_id')) {\n console.log(nksNodePool);\n}\n```",
|
|
3413
3413
|
perLanguage: {
|
|
3414
3414
|
cli: {
|
|
3415
3415
|
method: 'pools list',
|
|
@@ -3442,31 +3442,31 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3442
3442
|
params: [
|
|
3443
3443
|
'cluster_id: string;',
|
|
3444
3444
|
'name: string;',
|
|
3445
|
-
'node_config: { boot_volume: { size: number; type: volume_type; };
|
|
3445
|
+
'node_config: { boot_volume: { size: number; type: volume_type; }; instance_type: string; };',
|
|
3446
3446
|
'node_count: number;',
|
|
3447
3447
|
'tags?: string[];',
|
|
3448
3448
|
],
|
|
3449
3449
|
markdown:
|
|
3450
|
-
"## create\n\n`client.nks.clusters.pools.availability.create(cluster_id: string, name: string, node_config: { boot_volume: nks_node_pool_boot_volume;
|
|
3450
|
+
"## create\n\n`client.nks.clusters.pools.availability.create(cluster_id: string, name: string, node_config: { boot_volume: nks_node_pool_boot_volume; instance_type: string; }, node_count: number, tags?: string[]): void`\n\n**post** `/v1/nks/clusters/{cluster_id}/pools/availability`\n\nCheck if a node pool can be created in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `name: string`\n Name of the node pool.\n\n- `node_config: { boot_volume: { size: number; type: volume_type; }; instance_type: string; }`\n Node configuration.\n - `boot_volume: { size: number; type: 'nvme' | 'abs'; }`\n Boot volume configuration.\n - `instance_type: string`\n Instance type name used for worker nodes.\n\n- `node_count: number`\n Number of nodes. Must be between 1 and 100.\n\n- `tags?: string[]`\n Tags to attach to the node pool.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.nks.clusters.pools.availability.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n},\n node_count: 3,\n})\n```",
|
|
3451
3451
|
perLanguage: {
|
|
3452
3452
|
cli: {
|
|
3453
3453
|
method: 'availability create',
|
|
3454
3454
|
example:
|
|
3455
|
-
"nirvana nks:clusters:pools:availability create \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --name my-node-pool \\\n --node-config '{boot_volume: {size: 100, type: abs},
|
|
3455
|
+
"nirvana nks:clusters:pools:availability create \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --name my-node-pool \\\n --node-config '{boot_volume: {size: 100, type: abs}, instance_type: n1-standard-8}' \\\n --node-count 3",
|
|
3456
3456
|
},
|
|
3457
3457
|
go: {
|
|
3458
3458
|
method: 'client.NKS.Clusters.Pools.Availability.New',
|
|
3459
3459
|
example:
|
|
3460
|
-
'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.NKS.Clusters.Pools.Availability.New(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterPoolAvailabilityNewParams{\n\t\t\tName: "my-node-pool",\n\t\t\tNodeConfig: nks.NKSNodePoolNodeConfigParam{\n\t\t\t\tBootVolume: nks.NKSNodePoolBootVolumeParam{\n\t\t\t\t\tSize: 100,\n\t\t\t\t\tType: compute.VolumeTypeABS,\n\t\t\t\t},\n\t\t\t\
|
|
3460
|
+
'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.NKS.Clusters.Pools.Availability.New(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterPoolAvailabilityNewParams{\n\t\t\tName: "my-node-pool",\n\t\t\tNodeConfig: nks.NKSNodePoolNodeConfigParam{\n\t\t\t\tBootVolume: nks.NKSNodePoolBootVolumeParam{\n\t\t\t\t\tSize: 100,\n\t\t\t\t\tType: compute.VolumeTypeABS,\n\t\t\t\t},\n\t\t\t\tInstanceType: "n1-standard-8",\n\t\t\t},\n\t\t\tNodeCount: 3,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
3461
3461
|
},
|
|
3462
3462
|
http: {
|
|
3463
3463
|
example:
|
|
3464
|
-
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_config": {\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "
|
|
3464
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_config": {\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "instance_type": "n1-standard-8"\n },\n "node_count": 3,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
3465
3465
|
},
|
|
3466
3466
|
typescript: {
|
|
3467
3467
|
method: 'client.nks.clusters.pools.availability.create',
|
|
3468
3468
|
example:
|
|
3469
|
-
"import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.pools.availability.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n
|
|
3469
|
+
"import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.pools.availability.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n },\n node_count: 3,\n});",
|
|
3470
3470
|
},
|
|
3471
3471
|
},
|
|
3472
3472
|
},
|
package/src/server.ts
CHANGED