@nirvana-labs/nirvana-mcp 1.98.6 → 1.98.8
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.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +133 -27
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +133 -27
- 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 +133 -27
- package/src/server.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-docs-search.d.mts","sourceRoot":"","sources":["src/local-docs-search.ts"],"names":[],"mappings":"AA+CA,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CAC/C,CAAC;
|
|
1
|
+
{"version":3,"file":"local-docs-search.d.mts","sourceRoot":"","sources":["src/local-docs-search.ts"],"names":[],"mappings":"AA+CA,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CAC/C,CAAC;AAwlKF;;;;GAIG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,UAAU,CAAiC;IAEnD,OAAO;WAKM,MAAM,CAAC,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAY1E,MAAM,CAAC,KAAK,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,YAAY;IA2EhB,OAAO,CAAC,YAAY;YAiBN,iBAAiB;IA4C/B,OAAO,CAAC,UAAU;CAgBnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-docs-search.d.ts","sourceRoot":"","sources":["src/local-docs-search.ts"],"names":[],"mappings":"AA+CA,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CAC/C,CAAC;
|
|
1
|
+
{"version":3,"file":"local-docs-search.d.ts","sourceRoot":"","sources":["src/local-docs-search.ts"],"names":[],"mappings":"AA+CA,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CAC/C,CAAC;AAwlKF;;;;GAIG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,UAAU,CAAiC;IAEnD,OAAO;WAKM,MAAM,CAAC,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,eAAe,CAAC;IAY1E,MAAM,CAAC,KAAK,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,YAAY;IA2EhB,OAAO,CAAC,YAAY;YAiBN,iBAAiB;IA4C/B,OAAO,CAAC,UAAU;CAgBnB"}
|
package/local-docs-search.js
CHANGED
|
@@ -968,19 +968,20 @@ const EMBEDDED_METHODS = [
|
|
|
968
968
|
description: 'List quota usage and limits for the current organization across all regions',
|
|
969
969
|
stainlessPath: '(resource) quotas > (method) list',
|
|
970
970
|
qualified: 'client.quotas.list',
|
|
971
|
-
|
|
972
|
-
|
|
971
|
+
params: ['cursor?: string;', 'limit?: number;', 'region?: string;', 'sort?: string;'],
|
|
972
|
+
response: "{ compute: { memory_gb: quota_dimension_detail; vcpu: quota_dimension_detail; }; networking: { connect_connections: quota_dimension_detail; public_ips: quota_dimension_detail; vpcs: quota_dimension_detail; }; nks: { clusters: quota_dimension_detail; node_pool_memory_gb: quota_dimension_detail; node_pool_vcpu: quota_dimension_detail; public_ips: quota_dimension_detail; }; region: 'us-sva-2'; storage: { abs: quota_dimension_detail; local_nvme: quota_dimension_detail; }; }",
|
|
973
|
+
markdown: "## list\n\n`client.quotas.list(cursor?: string, limit?: number, region?: string, sort?: string): { compute: quota_compute; networking: quota_networking; nks: quota_nks; region: region_name; storage: quota_storage; }`\n\n**get** `/v1/quotas`\n\nList quota usage and limits for the current organization across all regions\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request. Only valid for the same filters and sort order.\n\n- `limit?: number`\n Maximum number of items to return\n\n- `region?: string`\n Filter by region\n\n- `sort?: string`\n Comma-separated sort terms in precedence order, each field:asc or field:desc. Fields: region\n\n### Returns\n\n- `{ compute: { memory_gb: quota_dimension_detail; vcpu: quota_dimension_detail; }; networking: { connect_connections: quota_dimension_detail; public_ips: quota_dimension_detail; vpcs: quota_dimension_detail; }; nks: { clusters: quota_dimension_detail; node_pool_memory_gb: quota_dimension_detail; node_pool_vcpu: quota_dimension_detail; public_ips: quota_dimension_detail; }; region: 'us-sva-2'; storage: { abs: quota_dimension_detail; local_nvme: quota_dimension_detail; }; }`\n Quota response.\n\n - `compute: { memory_gb: { limit: number; remaining: number; used: number; }; vcpu: { limit: number; remaining: number; used: number; }; }`\n - `networking: { connect_connections: { limit: number; remaining: number; used: number; }; public_ips: { limit: number; remaining: number; used: number; }; vpcs: { limit: number; remaining: number; used: number; }; }`\n - `nks: { clusters: { limit: number; remaining: number; used: number; }; node_pool_memory_gb: { limit: number; remaining: number; used: number; }; node_pool_vcpu: { limit: number; remaining: number; used: number; }; public_ips: { limit: number; remaining: number; used: number; }; }`\n - `region: 'us-sva-2'`\n - `storage: { abs: { limit: number; remaining: number; used: number; }; local_nvme: { limit: number; remaining: number; used: number; }; }`\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 quota of client.quotas.list()) {\n console.log(quota);\n}\n```",
|
|
973
974
|
perLanguage: {
|
|
974
975
|
typescript: {
|
|
975
976
|
method: 'client.quotas.list',
|
|
976
|
-
example: "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\
|
|
977
|
+
example: "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\n// Automatically fetches more pages as needed.\nfor await (const quota of client.quotas.list()) {\n console.log(quota.compute);\n}",
|
|
977
978
|
},
|
|
978
979
|
http: {
|
|
979
980
|
example: 'curl https://api.nirvanalabs.io/v1/quotas \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
980
981
|
},
|
|
981
982
|
go: {
|
|
982
983
|
method: 'client.Quotas.List',
|
|
983
|
-
example: '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/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\
|
|
984
|
+
example: '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/option"\n\t"github.com/nirvana-labs/nirvana-go/quotas"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Quotas.List(context.TODO(), quotas.QuotaListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
984
985
|
},
|
|
985
986
|
cli: {
|
|
986
987
|
method: 'quotas list',
|
|
@@ -1311,9 +1312,21 @@ const EMBEDDED_METHODS = [
|
|
|
1311
1312
|
description: 'List all regions',
|
|
1312
1313
|
stainlessPath: '(resource) regions > (method) list',
|
|
1313
1314
|
qualified: 'client.regions.list',
|
|
1314
|
-
params: [
|
|
1315
|
+
params: [
|
|
1316
|
+
"availability?: 'live' | 'preview' | 'maintenance' | 'sunset';",
|
|
1317
|
+
'compute_vms?: boolean;',
|
|
1318
|
+
'cursor?: string;',
|
|
1319
|
+
'limit?: number;',
|
|
1320
|
+
'networking_connect?: boolean;',
|
|
1321
|
+
'networking_vpcs?: boolean;',
|
|
1322
|
+
'nks_autoscaling?: boolean;',
|
|
1323
|
+
'nks_clusters?: boolean;',
|
|
1324
|
+
'sort?: string;',
|
|
1325
|
+
'storage_abs?: boolean;',
|
|
1326
|
+
'storage_local_nvme?: boolean;',
|
|
1327
|
+
],
|
|
1315
1328
|
response: "{ availability: 'live' | 'preview' | 'maintenance' | 'sunset'; compute: { vms: boolean; }; name: string; networking: { connect: boolean; vpcs: boolean; }; nks: { autoscaling: boolean; clusters: boolean; }; storage: { abs: boolean; local_nvme: boolean; }; }",
|
|
1316
|
-
markdown: "## list\n\n`client.regions.list(cursor?: string, limit?: number): { availability: region_availability; compute: object; name: string; networking: object; nks: object; storage: object; }`\n\n**get** `/v1/regions`\n\nList all regions\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request
|
|
1329
|
+
markdown: "## list\n\n`client.regions.list(availability?: 'live' | 'preview' | 'maintenance' | 'sunset', compute_vms?: boolean, cursor?: string, limit?: number, networking_connect?: boolean, networking_vpcs?: boolean, nks_autoscaling?: boolean, nks_clusters?: boolean, sort?: string, storage_abs?: boolean, storage_local_nvme?: boolean): { availability: region_availability; compute: object; name: string; networking: object; nks: object; storage: object; }`\n\n**get** `/v1/regions`\n\nList all regions\n\n### Parameters\n\n- `availability?: 'live' | 'preview' | 'maintenance' | 'sunset'`\n Filter by region availability\n\n- `compute_vms?: boolean`\n Only regions where Virtual Machines are available\n\n- `cursor?: string`\n Pagination cursor returned by a previous request. Only valid for the same filters and sort order.\n\n- `limit?: number`\n Maximum number of items to return\n\n- `networking_connect?: boolean`\n Only regions where Nirvana Connect is available\n\n- `networking_vpcs?: boolean`\n Only regions where VPCs are available\n\n- `nks_autoscaling?: boolean`\n Only regions where NKS node pool autoscaling is available\n\n- `nks_clusters?: boolean`\n Only regions where NKS clusters are available\n\n- `sort?: string`\n Comma-separated sort terms in precedence order, each field:asc or field:desc. Fields: longitude, name, availability\n\n- `storage_abs?: boolean`\n Only regions where Accelerated Block Storage is available\n\n- `storage_local_nvme?: boolean`\n Only regions where locally-attached NVMe storage is available\n\n### Returns\n\n- `{ availability: 'live' | 'preview' | 'maintenance' | 'sunset'; compute: { vms: boolean; }; name: string; networking: { connect: boolean; vpcs: boolean; }; nks: { autoscaling: boolean; clusters: boolean; }; storage: { abs: boolean; local_nvme: boolean; }; }`\n Region response with product availability.\n\n - `availability: 'live' | 'preview' | 'maintenance' | 'sunset'`\n - `compute: { vms: boolean; }`\n - `name: string`\n - `networking: { connect: boolean; vpcs: boolean; }`\n - `nks: { autoscaling: boolean; clusters: boolean; }`\n - `storage: { abs: boolean; local_nvme: boolean; }`\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 region of client.regions.list()) {\n console.log(region);\n}\n```",
|
|
1317
1330
|
perLanguage: {
|
|
1318
1331
|
typescript: {
|
|
1319
1332
|
method: 'client.regions.list',
|
|
@@ -3281,9 +3294,9 @@ const EMBEDDED_METHODS = [
|
|
|
3281
3294
|
description: 'List all supported Kubernetes versions for NKS clusters',
|
|
3282
3295
|
stainlessPath: '(resource) nks.kubernetes_versions > (method) list',
|
|
3283
3296
|
qualified: 'client.nks.kubernetesVersions.list',
|
|
3284
|
-
params: ['cursor?: string;', 'limit?: number;'],
|
|
3297
|
+
params: ['cursor?: string;', 'limit?: number;', 'name?: string;', 'sort?: string;'],
|
|
3285
3298
|
response: '{ created_at: string; display_name: string; name: string; }',
|
|
3286
|
-
markdown: "## list\n\n`client.nks.kubernetesVersions.list(cursor?: string, limit?: number): { created_at: string; display_name: string; name: string; }`\n\n**get** `/v1/nks/kubernetes_versions`\n\nList all supported Kubernetes versions for NKS clusters\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request
|
|
3299
|
+
markdown: "## list\n\n`client.nks.kubernetesVersions.list(cursor?: string, limit?: number, name?: string, sort?: string): { created_at: string; display_name: string; name: string; }`\n\n**get** `/v1/nks/kubernetes_versions`\n\nList all supported Kubernetes versions for NKS clusters\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request. Only valid for the same filters and sort order.\n\n- `limit?: number`\n Maximum number of items to return\n\n- `name?: string`\n Filter by a case-insensitive substring of the version name, e.g. 1.34\n\n- `sort?: string`\n Comma-separated sort terms in precedence order, each field:asc or field:desc. Fields: created_at, version\n\n### Returns\n\n- `{ created_at: string; display_name: string; name: string; }`\n NKS Kubernetes version details.\n\n - `created_at: string`\n - `display_name: string`\n - `name: 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 kubernetesVersion of client.nks.kubernetesVersions.list()) {\n console.log(kubernetesVersion);\n}\n```",
|
|
3287
3300
|
perLanguage: {
|
|
3288
3301
|
typescript: {
|
|
3289
3302
|
method: 'client.nks.kubernetesVersions.list',
|
|
@@ -3434,9 +3447,21 @@ const EMBEDDED_METHODS = [
|
|
|
3434
3447
|
description: 'List all NKS clusters',
|
|
3435
3448
|
stainlessPath: '(resource) nks.clusters > (method) list',
|
|
3436
3449
|
qualified: 'client.nks.clusters.list',
|
|
3437
|
-
params: [
|
|
3450
|
+
params: [
|
|
3451
|
+
'project_id: string;',
|
|
3452
|
+
'autoscaling?: boolean;',
|
|
3453
|
+
'cursor?: string;',
|
|
3454
|
+
'kubernetes_version?: string;',
|
|
3455
|
+
'limit?: number;',
|
|
3456
|
+
'name?: string;',
|
|
3457
|
+
'region?: string;',
|
|
3458
|
+
'sort?: string;',
|
|
3459
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
3460
|
+
'tags?: string[];',
|
|
3461
|
+
'vpc_id?: string;',
|
|
3462
|
+
],
|
|
3438
3463
|
response: "{ id: string; autoscaling: boolean; created_at: string; kubernetes_version: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: 'us-sva-2'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }",
|
|
3439
|
-
markdown: "## list\n\n`client.nks.clusters.list(project_id: string, cursor?: string, limit?: number): { id: string; autoscaling: boolean; created_at: string; kubernetes_version: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: region_name; status: resource_status; tags: string[]; updated_at: string; vpc_id: string; }`\n\n**get** `/v1/nks/clusters`\n\nList all NKS clusters\n\n### Parameters\n\n- `project_id: string`\n Project ID of resources to request\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; autoscaling: boolean; created_at: string; kubernetes_version: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: 'us-sva-2'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }`\n NKS Cluster details.\n\n - `id: string`\n - `autoscaling: boolean`\n - `created_at: string`\n - `kubernetes_version: string`\n - `name: string`\n - `pool_ids: string[]`\n - `private_ip: string`\n - `project_id: string`\n - `public_ip: string`\n - `region: 'us-sva-2'`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `tags: string[]`\n - `updated_at: string`\n - `vpc_id: 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 nksCluster of client.nks.clusters.list({ project_id: 'project_id' })) {\n console.log(nksCluster);\n}\n```",
|
|
3464
|
+
markdown: "## list\n\n`client.nks.clusters.list(project_id: string, autoscaling?: boolean, cursor?: string, kubernetes_version?: string, limit?: number, name?: string, region?: string, sort?: string, status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error', tags?: string[], vpc_id?: string): { id: string; autoscaling: boolean; created_at: string; kubernetes_version: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: region_name; status: resource_status; tags: string[]; updated_at: string; vpc_id: string; }`\n\n**get** `/v1/nks/clusters`\n\nList all NKS clusters\n\n### Parameters\n\n- `project_id: string`\n Project ID of resources to request\n\n- `autoscaling?: boolean`\n Filter by whether autoscaling is enabled\n\n- `cursor?: string`\n Pagination cursor returned by a previous request. Only valid for the same filters and sort order.\n\n- `kubernetes_version?: string`\n Filter by Kubernetes version, matched exactly\n\n- `limit?: number`\n Maximum number of items to return\n\n- `name?: string`\n Filter by a case-insensitive substring of the Cluster name\n\n- `region?: string`\n Filter by region\n\n- `sort?: string`\n Comma-separated sort terms in precedence order, each field:asc or field:desc. Fields: created_at, updated_at, name, status\n\n- `status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error'`\n Filter by Cluster status\n\n- `tags?: string[]`\n Filter by tags. Repeat the parameter to require several tags; a Cluster must carry all of them.\n\n- `vpc_id?: string`\n Filter by the VPC the Cluster is in\n\n### Returns\n\n- `{ id: string; autoscaling: boolean; created_at: string; kubernetes_version: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: 'us-sva-2'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }`\n NKS Cluster details.\n\n - `id: string`\n - `autoscaling: boolean`\n - `created_at: string`\n - `kubernetes_version: string`\n - `name: string`\n - `pool_ids: string[]`\n - `private_ip: string`\n - `project_id: string`\n - `public_ip: string`\n - `region: 'us-sva-2'`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `tags: string[]`\n - `updated_at: string`\n - `vpc_id: 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 nksCluster of client.nks.clusters.list({ project_id: 'project_id' })) {\n console.log(nksCluster);\n}\n```",
|
|
3440
3465
|
perLanguage: {
|
|
3441
3466
|
typescript: {
|
|
3442
3467
|
method: 'client.nks.clusters.list',
|
|
@@ -3622,9 +3647,19 @@ const EMBEDDED_METHODS = [
|
|
|
3622
3647
|
description: 'List all persistent volume claims in an NKS cluster',
|
|
3623
3648
|
stainlessPath: '(resource) nks.clusters.persistent_volume_claims > (method) list',
|
|
3624
3649
|
qualified: 'client.nks.clusters.persistentVolumeClaims.list',
|
|
3625
|
-
params: [
|
|
3650
|
+
params: [
|
|
3651
|
+
'cluster_id: string;',
|
|
3652
|
+
'cursor?: string;',
|
|
3653
|
+
'limit?: number;',
|
|
3654
|
+
'name?: string;',
|
|
3655
|
+
'size_gb_max?: number;',
|
|
3656
|
+
'size_gb_min?: number;',
|
|
3657
|
+
'sort?: string;',
|
|
3658
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
3659
|
+
"type?: 'abs';",
|
|
3660
|
+
],
|
|
3626
3661
|
response: "{ id: string; cluster_id: string; created_at: string; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
3627
|
-
markdown: "## list\n\n`client.nks.clusters.persistentVolumeClaims.list(cluster_id: string, cursor?: string, limit?: number): { id: string; cluster_id: string; created_at: string; name: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/persistent_volume_claims`\n\nList all persistent volume claims in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request
|
|
3662
|
+
markdown: "## list\n\n`client.nks.clusters.persistentVolumeClaims.list(cluster_id: string, cursor?: string, limit?: number, name?: string, size_gb_max?: number, size_gb_min?: number, sort?: string, status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error', type?: 'abs'): { id: string; cluster_id: string; created_at: string; name: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/persistent_volume_claims`\n\nList all persistent volume claims in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request. Only valid for the same filters and sort order.\n\n- `limit?: number`\n Maximum number of items to return\n\n- `name?: string`\n Filter by a case-insensitive substring of the claim name\n\n- `size_gb_max?: number`\n Only claims of at most this size\n\n- `size_gb_min?: number`\n Only claims of at least this size\n\n- `sort?: string`\n Comma-separated sort terms in precedence order, each field:asc or field:desc. Fields: created_at, updated_at, name, status, size_gb\n\n- `status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error'`\n Filter by persistent volume claim status\n\n- `type?: 'abs'`\n Filter by storage type\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS persistent volume claim details.\n\n - `id: string`\n - `cluster_id: string`\n - `created_at: string`\n - `name: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\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 persistentVolumeClaim of client.nks.clusters.persistentVolumeClaims.list('cluster_id')) {\n console.log(persistentVolumeClaim);\n}\n```",
|
|
3628
3663
|
perLanguage: {
|
|
3629
3664
|
typescript: {
|
|
3630
3665
|
method: 'client.nks.clusters.persistentVolumeClaims.list',
|
|
@@ -3709,9 +3744,19 @@ const EMBEDDED_METHODS = [
|
|
|
3709
3744
|
description: 'List all controllers in an NKS cluster',
|
|
3710
3745
|
stainlessPath: '(resource) nks.clusters.controllers > (method) list',
|
|
3711
3746
|
qualified: 'client.nks.clusters.controllers.list',
|
|
3712
|
-
params: [
|
|
3747
|
+
params: [
|
|
3748
|
+
'cluster_id: string;',
|
|
3749
|
+
'cursor?: string;',
|
|
3750
|
+
'has_private_ip?: boolean;',
|
|
3751
|
+
'instance_type?: string;',
|
|
3752
|
+
'limit?: number;',
|
|
3753
|
+
'name?: string;',
|
|
3754
|
+
'private_ip?: string;',
|
|
3755
|
+
'sort?: string;',
|
|
3756
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
3757
|
+
],
|
|
3713
3758
|
response: "{ id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
3714
|
-
markdown: "## 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```",
|
|
3759
|
+
markdown: "## list\n\n`client.nks.clusters.controllers.list(cluster_id: string, cursor?: string, has_private_ip?: boolean, instance_type?: string, limit?: number, name?: string, private_ip?: string, sort?: string, status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error'): { 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. Only valid for the same filters and sort order.\n\n- `has_private_ip?: boolean`\n Filter by whether a private address has been assigned yet\n\n- `instance_type?: string`\n Filter by the controller's instance type\n\n- `limit?: number`\n Maximum number of items to return\n\n- `name?: string`\n Filter by a case-insensitive substring of the controller name\n\n- `private_ip?: string`\n Filter by the controller's private address\n\n- `sort?: string`\n Comma-separated sort terms in precedence order, each field:asc or field:desc. Fields: created_at, updated_at, name, status\n\n- `status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error'`\n Filter by controller status\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```",
|
|
3715
3760
|
perLanguage: {
|
|
3716
3761
|
typescript: {
|
|
3717
3762
|
method: 'client.nks.clusters.controllers.list',
|
|
@@ -3767,9 +3812,21 @@ const EMBEDDED_METHODS = [
|
|
|
3767
3812
|
description: 'List all volumes attached to an NKS controller',
|
|
3768
3813
|
stainlessPath: '(resource) nks.clusters.controllers.volumes > (method) list',
|
|
3769
3814
|
qualified: 'client.nks.clusters.controllers.volumes.list',
|
|
3770
|
-
params: [
|
|
3815
|
+
params: [
|
|
3816
|
+
'cluster_id: string;',
|
|
3817
|
+
'controller_id: string;',
|
|
3818
|
+
'cursor?: string;',
|
|
3819
|
+
"kind?: 'boot' | 'data';",
|
|
3820
|
+
'limit?: number;',
|
|
3821
|
+
'name?: string;',
|
|
3822
|
+
'size_gb_max?: number;',
|
|
3823
|
+
'size_gb_min?: number;',
|
|
3824
|
+
'sort?: string;',
|
|
3825
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
3826
|
+
"type?: 'abs';",
|
|
3827
|
+
],
|
|
3771
3828
|
response: "{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
3772
|
-
markdown: "## list\n\n`client.nks.clusters.controllers.volumes.list(cluster_id: string, controller_id: string, cursor?: string, limit?: number): { id: string; created_at: string; kind: volume_kind; name: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/controllers/{controller_id}/volumes`\n\nList all volumes attached to an NKS controller\n\n### Parameters\n\n- `cluster_id: string`\n\n- `controller_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; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS controller volume details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'boot' | 'data'`\n - `name: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\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 nksControllerVolume of client.nks.clusters.controllers.volumes.list('controller_id', { cluster_id: 'cluster_id' })) {\n console.log(nksControllerVolume);\n}\n```",
|
|
3829
|
+
markdown: "## list\n\n`client.nks.clusters.controllers.volumes.list(cluster_id: string, controller_id: string, cursor?: string, kind?: 'boot' | 'data', limit?: number, name?: string, size_gb_max?: number, size_gb_min?: number, sort?: string, status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error', type?: 'abs'): { id: string; created_at: string; kind: volume_kind; name: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/controllers/{controller_id}/volumes`\n\nList all volumes attached to an NKS controller\n\n### Parameters\n\n- `cluster_id: string`\n\n- `controller_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request. Only valid for the same filters and sort order.\n\n- `kind?: 'boot' | 'data'`\n Filter by volume kind\n\n- `limit?: number`\n Maximum number of items to return\n\n- `name?: string`\n Filter by a case-insensitive substring of the volume name\n\n- `size_gb_max?: number`\n Only volumes of at most this size\n\n- `size_gb_min?: number`\n Only volumes of at least this size\n\n- `sort?: string`\n Comma-separated sort terms in precedence order, each field:asc or field:desc. Fields: created_at, updated_at, name, status, size_gb\n\n- `status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error'`\n Filter by volume status\n\n- `type?: 'abs'`\n Filter by storage type\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS controller volume details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'boot' | 'data'`\n - `name: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\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 nksControllerVolume of client.nks.clusters.controllers.volumes.list('controller_id', { cluster_id: 'cluster_id' })) {\n console.log(nksControllerVolume);\n}\n```",
|
|
3773
3830
|
perLanguage: {
|
|
3774
3831
|
typescript: {
|
|
3775
3832
|
method: 'client.nks.clusters.controllers.volumes.list',
|
|
@@ -3854,9 +3911,18 @@ const EMBEDDED_METHODS = [
|
|
|
3854
3911
|
description: 'List all load balancers in an NKS cluster',
|
|
3855
3912
|
stainlessPath: '(resource) nks.clusters.load_balancers > (method) list',
|
|
3856
3913
|
qualified: 'client.nks.clusters.loadBalancers.list',
|
|
3857
|
-
params: [
|
|
3914
|
+
params: [
|
|
3915
|
+
'cluster_id: string;',
|
|
3916
|
+
'cursor?: string;',
|
|
3917
|
+
'limit?: number;',
|
|
3918
|
+
'namespace?: string;',
|
|
3919
|
+
'public_ip_enabled?: boolean;',
|
|
3920
|
+
'service_name?: string;',
|
|
3921
|
+
'sort?: string;',
|
|
3922
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
3923
|
+
],
|
|
3858
3924
|
response: "{ id: string; cluster_id: string; created_at: string; namespace: string; private_ip: string; public_ip: string; public_ip_enabled: boolean; service_name: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
3859
|
-
markdown: "## list\n\n`client.nks.clusters.loadBalancers.list(cluster_id: string, cursor?: string, limit?: number): { id: string; cluster_id: string; created_at: string; namespace: string; private_ip: string; public_ip: string; public_ip_enabled: boolean; service_name: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/load_balancers`\n\nList all load balancers in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request
|
|
3925
|
+
markdown: "## list\n\n`client.nks.clusters.loadBalancers.list(cluster_id: string, cursor?: string, limit?: number, namespace?: string, public_ip_enabled?: boolean, service_name?: string, sort?: string, status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error'): { id: string; cluster_id: string; created_at: string; namespace: string; private_ip: string; public_ip: string; public_ip_enabled: boolean; service_name: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/load_balancers`\n\nList all load balancers in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request. Only valid for the same filters and sort order.\n\n- `limit?: number`\n Maximum number of items to return\n\n- `namespace?: string`\n Filter by Kubernetes namespace\n\n- `public_ip_enabled?: boolean`\n Filter by whether the load balancer is exposed publicly\n\n- `service_name?: string`\n Filter by a case-insensitive substring of the Kubernetes service name\n\n- `sort?: string`\n Comma-separated sort terms in precedence order, each field:asc or field:desc. Fields: created_at, updated_at, namespace, service_name, status\n\n- `status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error'`\n Filter by load balancer status\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; namespace: string; private_ip: string; public_ip: string; public_ip_enabled: boolean; service_name: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }`\n NKS load balancer details.\n\n - `id: string`\n - `cluster_id: string`\n - `created_at: string`\n - `namespace: string`\n - `private_ip: string`\n - `public_ip: string`\n - `public_ip_enabled: boolean`\n - `service_name: 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 nksLoadBalancer of client.nks.clusters.loadBalancers.list('cluster_id')) {\n console.log(nksLoadBalancer);\n}\n```",
|
|
3860
3926
|
perLanguage: {
|
|
3861
3927
|
typescript: {
|
|
3862
3928
|
method: 'client.nks.clusters.loadBalancers.list',
|
|
@@ -4011,9 +4077,20 @@ const EMBEDDED_METHODS = [
|
|
|
4011
4077
|
description: 'List all node pools in an NKS cluster',
|
|
4012
4078
|
stainlessPath: '(resource) nks.clusters.pools > (method) list',
|
|
4013
4079
|
qualified: 'client.nks.clusters.pools.list',
|
|
4014
|
-
params: [
|
|
4080
|
+
params: [
|
|
4081
|
+
'cluster_id: string;',
|
|
4082
|
+
'cursor?: string;',
|
|
4083
|
+
'instance_type?: string;',
|
|
4084
|
+
'limit?: number;',
|
|
4085
|
+
'name?: string;',
|
|
4086
|
+
'node_count_max?: number;',
|
|
4087
|
+
'node_count_min?: number;',
|
|
4088
|
+
'sort?: string;',
|
|
4089
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
4090
|
+
'tags?: string[];',
|
|
4091
|
+
],
|
|
4015
4092
|
response: "{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response; instance_type: string; labels: string[]; taints: string[]; }; node_count: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }",
|
|
4016
|
-
markdown: "## 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; labels: string[]; taints: 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; labels: string[]; taints: 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```",
|
|
4093
|
+
markdown: "## list\n\n`client.nks.clusters.pools.list(cluster_id: string, cursor?: string, instance_type?: string, limit?: number, name?: string, node_count_max?: number, node_count_min?: number, sort?: string, status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error', tags?: 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`\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. Only valid for the same filters and sort order.\n\n- `instance_type?: string`\n Filter by the instance type the pool's nodes run\n\n- `limit?: number`\n Maximum number of items to return\n\n- `name?: string`\n Filter by a case-insensitive substring of the node pool name\n\n- `node_count_max?: number`\n Only pools with at most this many nodes\n\n- `node_count_min?: number`\n Only pools with at least this many nodes\n\n- `sort?: string`\n Comma-separated sort terms in precedence order, each field:asc or field:desc. Fields: created_at, updated_at, name, status, node_count\n\n- `status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error'`\n Filter by node pool status\n\n- `tags?: string[]`\n Filter by tags. Repeat the parameter to require several tags; a node pool must carry all of them.\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; labels: string[]; taints: 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; labels: string[]; taints: 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```",
|
|
4017
4094
|
perLanguage: {
|
|
4018
4095
|
typescript: {
|
|
4019
4096
|
method: 'client.nks.clusters.pools.list',
|
|
@@ -4236,9 +4313,19 @@ const EMBEDDED_METHODS = [
|
|
|
4236
4313
|
description: 'List all nodes in an NKS node pool',
|
|
4237
4314
|
stainlessPath: '(resource) nks.clusters.pools.nodes > (method) list',
|
|
4238
4315
|
qualified: 'client.nks.clusters.pools.nodes.list',
|
|
4239
|
-
params: [
|
|
4316
|
+
params: [
|
|
4317
|
+
'cluster_id: string;',
|
|
4318
|
+
'pool_id: string;',
|
|
4319
|
+
'cursor?: string;',
|
|
4320
|
+
'has_private_ip?: boolean;',
|
|
4321
|
+
'limit?: number;',
|
|
4322
|
+
'name?: string;',
|
|
4323
|
+
'private_ip?: string;',
|
|
4324
|
+
'sort?: string;',
|
|
4325
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
4326
|
+
],
|
|
4240
4327
|
response: "{ id: string; created_at: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
4241
|
-
markdown: "## list\n\n`client.nks.clusters.pools.nodes.list(cluster_id: string, pool_id: string, cursor?: string, limit?: number): { id: string; created_at: string; name: string; private_ip: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes`\n\nList all nodes in an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_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; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }`\n NKS node details.\n\n - `id: string`\n - `created_at: 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 nksNode of client.nks.clusters.pools.nodes.list('pool_id', { cluster_id: 'cluster_id' })) {\n console.log(nksNode);\n}\n```",
|
|
4328
|
+
markdown: "## list\n\n`client.nks.clusters.pools.nodes.list(cluster_id: string, pool_id: string, cursor?: string, has_private_ip?: boolean, limit?: number, name?: string, private_ip?: string, sort?: string, status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error'): { id: string; created_at: string; name: string; private_ip: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes`\n\nList all nodes in an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request. Only valid for the same filters and sort order.\n\n- `has_private_ip?: boolean`\n Filter by whether a private address has been assigned yet\n\n- `limit?: number`\n Maximum number of items to return\n\n- `name?: string`\n Filter by a case-insensitive substring of the node name\n\n- `private_ip?: string`\n Filter by the node's private address\n\n- `sort?: string`\n Comma-separated sort terms in precedence order, each field:asc or field:desc. Fields: created_at, updated_at, name, status\n\n- `status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error'`\n Filter by node status\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }`\n NKS node details.\n\n - `id: string`\n - `created_at: 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 nksNode of client.nks.clusters.pools.nodes.list('pool_id', { cluster_id: 'cluster_id' })) {\n console.log(nksNode);\n}\n```",
|
|
4242
4329
|
perLanguage: {
|
|
4243
4330
|
typescript: {
|
|
4244
4331
|
method: 'client.nks.clusters.pools.nodes.list',
|
|
@@ -4299,10 +4386,17 @@ const EMBEDDED_METHODS = [
|
|
|
4299
4386
|
'pool_id: string;',
|
|
4300
4387
|
'node_id: string;',
|
|
4301
4388
|
'cursor?: string;',
|
|
4389
|
+
"kind?: 'boot' | 'data';",
|
|
4302
4390
|
'limit?: number;',
|
|
4391
|
+
'name?: string;',
|
|
4392
|
+
'size_gb_max?: number;',
|
|
4393
|
+
'size_gb_min?: number;',
|
|
4394
|
+
'sort?: string;',
|
|
4395
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
4396
|
+
"type?: 'abs';",
|
|
4303
4397
|
],
|
|
4304
4398
|
response: "{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; node_id: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
4305
|
-
markdown: "## list\n\n`client.nks.clusters.pools.nodes.volumes.list(cluster_id: string, pool_id: string, node_id: string, cursor?: string, limit?: number): { id: string; created_at: string; kind: volume_kind; name: string; node_id: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes/{node_id}/volumes`\n\nList all volumes attached to an NKS node\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n- `node_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; kind: 'boot' | 'data'; name: string; node_id: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS node volume details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'boot' | 'data'`\n - `name: string`\n - `node_id: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\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 nksNodeVolume of client.nks.clusters.pools.nodes.volumes.list('node_id', { cluster_id: 'cluster_id', pool_id: 'pool_id' })) {\n console.log(nksNodeVolume);\n}\n```",
|
|
4399
|
+
markdown: "## list\n\n`client.nks.clusters.pools.nodes.volumes.list(cluster_id: string, pool_id: string, node_id: string, cursor?: string, kind?: 'boot' | 'data', limit?: number, name?: string, size_gb_max?: number, size_gb_min?: number, sort?: string, status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error', type?: 'abs'): { id: string; created_at: string; kind: volume_kind; name: string; node_id: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes/{node_id}/volumes`\n\nList all volumes attached to an NKS node\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n- `node_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request. Only valid for the same filters and sort order.\n\n- `kind?: 'boot' | 'data'`\n Filter by volume kind\n\n- `limit?: number`\n Maximum number of items to return\n\n- `name?: string`\n Filter by a case-insensitive substring of the volume name\n\n- `size_gb_max?: number`\n Only volumes of at most this size\n\n- `size_gb_min?: number`\n Only volumes of at least this size\n\n- `sort?: string`\n Comma-separated sort terms in precedence order, each field:asc or field:desc. Fields: created_at, updated_at, name, status, size_gb\n\n- `status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error'`\n Filter by volume status\n\n- `type?: 'abs'`\n Filter by storage type\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; node_id: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS node volume details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'boot' | 'data'`\n - `name: string`\n - `node_id: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\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 nksNodeVolume of client.nks.clusters.pools.nodes.volumes.list('node_id', { cluster_id: 'cluster_id', pool_id: 'pool_id' })) {\n console.log(nksNodeVolume);\n}\n```",
|
|
4306
4400
|
perLanguage: {
|
|
4307
4401
|
typescript: {
|
|
4308
4402
|
method: 'client.nks.clusters.pools.nodes.volumes.list',
|
|
@@ -4329,9 +4423,21 @@ const EMBEDDED_METHODS = [
|
|
|
4329
4423
|
description: 'List all volumes attached to the nodes of an NKS node pool',
|
|
4330
4424
|
stainlessPath: '(resource) nks.clusters.pools.volumes > (method) list',
|
|
4331
4425
|
qualified: 'client.nks.clusters.pools.volumes.list',
|
|
4332
|
-
params: [
|
|
4426
|
+
params: [
|
|
4427
|
+
'cluster_id: string;',
|
|
4428
|
+
'pool_id: string;',
|
|
4429
|
+
'cursor?: string;',
|
|
4430
|
+
"kind?: 'boot' | 'data';",
|
|
4431
|
+
'limit?: number;',
|
|
4432
|
+
'name?: string;',
|
|
4433
|
+
'size_gb_max?: number;',
|
|
4434
|
+
'size_gb_min?: number;',
|
|
4435
|
+
'sort?: string;',
|
|
4436
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
4437
|
+
"type?: 'abs';",
|
|
4438
|
+
],
|
|
4333
4439
|
response: "{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; node_id: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
4334
|
-
markdown: "## list\n\n`client.nks.clusters.pools.volumes.list(cluster_id: string, pool_id: string, cursor?: string, limit?: number): { id: string; created_at: string; kind: volume_kind; name: string; node_id: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/volumes`\n\nList all volumes attached to the nodes of an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_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; kind: 'boot' | 'data'; name: string; node_id: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS node volume details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'boot' | 'data'`\n - `name: string`\n - `node_id: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\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 nksNodeVolume of client.nks.clusters.pools.volumes.list('pool_id', { cluster_id: 'cluster_id' })) {\n console.log(nksNodeVolume);\n}\n```",
|
|
4440
|
+
markdown: "## list\n\n`client.nks.clusters.pools.volumes.list(cluster_id: string, pool_id: string, cursor?: string, kind?: 'boot' | 'data', limit?: number, name?: string, size_gb_max?: number, size_gb_min?: number, sort?: string, status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error', type?: 'abs'): { id: string; created_at: string; kind: volume_kind; name: string; node_id: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/volumes`\n\nList all volumes attached to the nodes of an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request. Only valid for the same filters and sort order.\n\n- `kind?: 'boot' | 'data'`\n Filter by volume kind\n\n- `limit?: number`\n Maximum number of items to return\n\n- `name?: string`\n Filter by a case-insensitive substring of the volume name\n\n- `size_gb_max?: number`\n Only volumes of at most this size\n\n- `size_gb_min?: number`\n Only volumes of at least this size\n\n- `sort?: string`\n Comma-separated sort terms in precedence order, each field:asc or field:desc. Fields: created_at, updated_at, name, status, size_gb\n\n- `status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error'`\n Filter by volume status\n\n- `type?: 'abs'`\n Filter by storage type\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; node_id: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS node volume details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'boot' | 'data'`\n - `name: string`\n - `node_id: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\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 nksNodeVolume of client.nks.clusters.pools.volumes.list('pool_id', { cluster_id: 'cluster_id' })) {\n console.log(nksNodeVolume);\n}\n```",
|
|
4335
4441
|
perLanguage: {
|
|
4336
4442
|
typescript: {
|
|
4337
4443
|
method: 'client.nks.clusters.pools.volumes.list',
|
|
@@ -4358,11 +4464,11 @@ const EMBEDDED_READMES = [
|
|
|
4358
4464
|
},
|
|
4359
4465
|
{
|
|
4360
4466
|
language: 'go',
|
|
4361
|
-
content: '# Nirvana Labs Go API Library\n\n<a href="https://pkg.go.dev/github.com/nirvana-labs/nirvana-go"><img src="https://pkg.go.dev/badge/github.com/nirvana-labs/nirvana-go.svg" alt="Go Reference"></a>\n\nThe Nirvana Labs Go library provides convenient access to the [Nirvana Labs REST API](https://docs.nirvanalabs.io)\nfrom applications written in Go.\n\n\n\n## MCP Server\n\nUse the Nirvana Labs MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[](https://cursor.com/en-US/install-mcp?name=%40nirvana-labs%2Fnirvana-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBuaXJ2YW5hLWxhYnMvbmlydmFuYS1tY3AiXSwiZW52Ijp7Ik5JUlZBTkFfTEFCU19BUElfS0VZIjoiTXkgQVBJIEtleSJ9fQ)\n[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40nirvana-labs%2Fnirvana-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40nirvana-labs%2Fnirvana-mcp%22%5D%2C%22env%22%3A%7B%22NIRVANA_LABS_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n```go\nimport (\n\t"github.com/nirvana-labs/nirvana-go" // imported as SDK_PackageName\n)\n```\n\n<!-- x-release-please-end -->\n\nOr to pin the version:\n\n<!-- x-release-please-start-version -->\n\n```sh\ngo get -u \'github.com/nirvana-labs/nirvana-go@v1.98.5\'\n```\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage 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/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"), // defaults to os.LookupEnv("NIRVANA_LABS_API_KEY")\n\t)\n\toperation, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Compute.VMs.New(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/nirvana-labs/nirvana-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Compute.VMs.ListAutoPaging(context.TODO(), compute.VMListParams{\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tLimit: nirvana.Int(10),\n})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tvm := iter.Current()\n\tfmt.Printf("%+v\\n", vm)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Compute.VMs.List(context.TODO(), compute.VMListParams{\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tLimit: nirvana.Int(10),\n})\nfor page != nil {\n\tfor _, vm := range page.Items {\n\t\tfmt.Printf("%+v\\n", vm)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{\n\tBootVolume: compute.VMNewParamsBootVolume{\n\t\tSize: 100,\n\t\tType: compute.VolumeTypeABS,\n\t},\n\tInstanceType: "n1-standard-2",\n\tName: "my-vm",\n\tOSImageName: "ubuntu-noble-2025-10-01",\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tPublicIPEnabled: true,\n\tRegion: shared.RegionNameUsSva2,\n\tSSHKey: compute.SSHKeyRequestParam{\n\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t},\n\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n})\nif err != nil {\n\tvar apierr *nirvana.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/v1/compute/vms": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Compute.VMs.New(\n\tctx,\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := nirvana.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Compute.VMs.New(\n\tcontext.TODO(),\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\noperation, err := client.Compute.VMs.New(\n\tcontext.TODO(),\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", operation)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/nirvana-labs/nirvana-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
|
|
4467
|
+
content: '# Nirvana Labs Go API Library\n\n<a href="https://pkg.go.dev/github.com/nirvana-labs/nirvana-go"><img src="https://pkg.go.dev/badge/github.com/nirvana-labs/nirvana-go.svg" alt="Go Reference"></a>\n\nThe Nirvana Labs Go library provides convenient access to the [Nirvana Labs REST API](https://docs.nirvanalabs.io)\nfrom applications written in Go.\n\n\n\n## MCP Server\n\nUse the Nirvana Labs MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[](https://cursor.com/en-US/install-mcp?name=%40nirvana-labs%2Fnirvana-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBuaXJ2YW5hLWxhYnMvbmlydmFuYS1tY3AiXSwiZW52Ijp7Ik5JUlZBTkFfTEFCU19BUElfS0VZIjoiTXkgQVBJIEtleSJ9fQ)\n[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40nirvana-labs%2Fnirvana-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40nirvana-labs%2Fnirvana-mcp%22%5D%2C%22env%22%3A%7B%22NIRVANA_LABS_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n```go\nimport (\n\t"github.com/nirvana-labs/nirvana-go" // imported as SDK_PackageName\n)\n```\n\n<!-- x-release-please-end -->\n\nOr to pin the version:\n\n<!-- x-release-please-start-version -->\n\n```sh\ngo get -u \'github.com/nirvana-labs/nirvana-go@v1.98.7\'\n```\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage 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/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"), // defaults to os.LookupEnv("NIRVANA_LABS_API_KEY")\n\t)\n\toperation, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Compute.VMs.New(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/nirvana-labs/nirvana-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Compute.VMs.ListAutoPaging(context.TODO(), compute.VMListParams{\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tLimit: nirvana.Int(10),\n})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\tvm := iter.Current()\n\tfmt.Printf("%+v\\n", vm)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Compute.VMs.List(context.TODO(), compute.VMListParams{\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tLimit: nirvana.Int(10),\n})\nfor page != nil {\n\tfor _, vm := range page.Items {\n\t\tfmt.Printf("%+v\\n", vm)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{\n\tBootVolume: compute.VMNewParamsBootVolume{\n\t\tSize: 100,\n\t\tType: compute.VolumeTypeABS,\n\t},\n\tInstanceType: "n1-standard-2",\n\tName: "my-vm",\n\tOSImageName: "ubuntu-noble-2025-10-01",\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tPublicIPEnabled: true,\n\tRegion: shared.RegionNameUsSva2,\n\tSSHKey: compute.SSHKeyRequestParam{\n\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t},\n\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n})\nif err != nil {\n\tvar apierr *nirvana.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/v1/compute/vms": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Compute.VMs.New(\n\tctx,\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := nirvana.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Compute.VMs.New(\n\tcontext.TODO(),\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\noperation, err := client.Compute.VMs.New(\n\tcontext.TODO(),\n\tcompute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tInstanceType: "n1-standard-2",\n\t\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", operation)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/nirvana-labs/nirvana-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
|
|
4362
4468
|
},
|
|
4363
4469
|
{
|
|
4364
4470
|
language: 'terraform',
|
|
4365
|
-
content: '# Nirvana Labs Terraform Provider\n\nThe [Nirvana Labs Terraform provider](https://registry.terraform.io/providers/nirvana-labs/nirvana/latest/docs) provides convenient access to\nthe [Nirvana Labs REST API](https://docs.nirvanalabs.io) from Terraform.\n\n\n\n## Requirements\n\nThis provider requires Terraform CLI 1.0 or later. You can [install it for your system](https://developer.hashicorp.com/terraform/install)\non Hashicorp\'s website.\n\n## Usage\n\nAdd the following to your `main.tf` file:\n\n<!-- x-release-please-start-version -->\n\n```hcl\n# Declare the provider and version\nterraform {\n required_providers {\n SDK_ProviderTypeName = {\n source = "nirvana-labs/nirvana"\n version = "~> 1.98.
|
|
4471
|
+
content: '# Nirvana Labs Terraform Provider\n\nThe [Nirvana Labs Terraform provider](https://registry.terraform.io/providers/nirvana-labs/nirvana/latest/docs) provides convenient access to\nthe [Nirvana Labs REST API](https://docs.nirvanalabs.io) from Terraform.\n\n\n\n## Requirements\n\nThis provider requires Terraform CLI 1.0 or later. You can [install it for your system](https://developer.hashicorp.com/terraform/install)\non Hashicorp\'s website.\n\n## Usage\n\nAdd the following to your `main.tf` file:\n\n<!-- x-release-please-start-version -->\n\n```hcl\n# Declare the provider and version\nterraform {\n required_providers {\n SDK_ProviderTypeName = {\n source = "nirvana-labs/nirvana"\n version = "~> 1.98.7"\n }\n }\n}\n\n# Initialize the provider\nprovider "nirvana" {\n api_key = "My API Key" # or set NIRVANA_LABS_API_KEY env variable\n}\n\n# Configure a resource\nresource "nirvana_compute_vm" "example_compute_vm" {\n boot_volume = {\n size = 100\n type = "abs"\n tags = ["production", "ethereum"]\n }\n instance_type = "n1-standard-2"\n name = "my-vm"\n os_image_name = "ubuntu-noble-2025-10-01"\n project_id = "123e4567-e89b-12d3-a456-426614174000"\n public_ip_enabled = true\n region = "us-sva-2"\n ssh_key = {\n public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n }\n subnet_id = "123e4567-e89b-12d3-a456-426614174000"\n data_volumes = [{\n name = "my-data-volume"\n size = 100\n type = "abs"\n tags = ["production", "ethereum"]\n }]\n tags = ["production", "ethereum"]\n}\n```\n\n<!-- x-release-please-end -->\n\nInitialize your project by running `terraform init` in the directory.\n\nAdditional examples can be found in the [./examples](./examples) folder within this repository, and you can\nrefer to the full documentation on [the Terraform Registry](https://registry.terraform.io/providers/nirvana-labs/nirvana/latest/docs).\n\n### Provider Options\nWhen you initialize the provider, the following options are supported. It is recommended to use environment variables for sensitive values like access tokens.\nIf an environment variable is provided, then the option does not need to be set in the terraform source.\n\n| Property | Environment variable | Required | Default value |\n| -------- | ---------------------- | -------- | ------------- |\n| api_key | `NIRVANA_LABS_API_KEY` | true | — |\n\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/nirvana-labs/terraform-provider-nirvana/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n',
|
|
4366
4472
|
},
|
|
4367
4473
|
{
|
|
4368
4474
|
language: 'cli',
|