@nirvana-labs/nirvana-mcp 1.98.6 → 1.98.7
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
package/src/local-docs-search.ts
CHANGED
|
@@ -1141,15 +1141,16 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1141
1141
|
description: 'List quota usage and limits for the current organization across all regions',
|
|
1142
1142
|
stainlessPath: '(resource) quotas > (method) list',
|
|
1143
1143
|
qualified: 'client.quotas.list',
|
|
1144
|
+
params: ['cursor?: string;', 'limit?: number;', 'region?: string;', 'sort?: string;'],
|
|
1144
1145
|
response:
|
|
1145
|
-
|
|
1146
|
+
"{ 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; }; }",
|
|
1146
1147
|
markdown:
|
|
1147
|
-
"## list\n\n`client.quotas.list(): {
|
|
1148
|
+
"## 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```",
|
|
1148
1149
|
perLanguage: {
|
|
1149
1150
|
typescript: {
|
|
1150
1151
|
method: 'client.quotas.list',
|
|
1151
1152
|
example:
|
|
1152
|
-
"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\
|
|
1153
|
+
"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}",
|
|
1153
1154
|
},
|
|
1154
1155
|
http: {
|
|
1155
1156
|
example:
|
|
@@ -1158,7 +1159,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1158
1159
|
go: {
|
|
1159
1160
|
method: 'client.Quotas.List',
|
|
1160
1161
|
example:
|
|
1161
|
-
'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\
|
|
1162
|
+
'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',
|
|
1162
1163
|
},
|
|
1163
1164
|
cli: {
|
|
1164
1165
|
method: 'quotas list',
|
|
@@ -1541,11 +1542,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1541
1542
|
description: 'List all regions',
|
|
1542
1543
|
stainlessPath: '(resource) regions > (method) list',
|
|
1543
1544
|
qualified: 'client.regions.list',
|
|
1544
|
-
params: [
|
|
1545
|
+
params: [
|
|
1546
|
+
"availability?: 'live' | 'preview' | 'maintenance' | 'sunset';",
|
|
1547
|
+
'compute_vms?: boolean;',
|
|
1548
|
+
'cursor?: string;',
|
|
1549
|
+
'limit?: number;',
|
|
1550
|
+
'networking_connect?: boolean;',
|
|
1551
|
+
'networking_vpcs?: boolean;',
|
|
1552
|
+
'nks_autoscaling?: boolean;',
|
|
1553
|
+
'nks_clusters?: boolean;',
|
|
1554
|
+
'sort?: string;',
|
|
1555
|
+
'storage_abs?: boolean;',
|
|
1556
|
+
'storage_local_nvme?: boolean;',
|
|
1557
|
+
],
|
|
1545
1558
|
response:
|
|
1546
1559
|
"{ 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; }; }",
|
|
1547
1560
|
markdown:
|
|
1548
|
-
"## 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
|
|
1561
|
+
"## 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```",
|
|
1549
1562
|
perLanguage: {
|
|
1550
1563
|
typescript: {
|
|
1551
1564
|
method: 'client.regions.list',
|
|
@@ -3828,10 +3841,10 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3828
3841
|
description: 'List all supported Kubernetes versions for NKS clusters',
|
|
3829
3842
|
stainlessPath: '(resource) nks.kubernetes_versions > (method) list',
|
|
3830
3843
|
qualified: 'client.nks.kubernetesVersions.list',
|
|
3831
|
-
params: ['cursor?: string;', 'limit?: number;'],
|
|
3844
|
+
params: ['cursor?: string;', 'limit?: number;', 'name?: string;', 'sort?: string;'],
|
|
3832
3845
|
response: '{ created_at: string; display_name: string; name: string; }',
|
|
3833
3846
|
markdown:
|
|
3834
|
-
"## 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
|
|
3847
|
+
"## 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```",
|
|
3835
3848
|
perLanguage: {
|
|
3836
3849
|
typescript: {
|
|
3837
3850
|
method: 'client.nks.kubernetesVersions.list',
|
|
@@ -4006,11 +4019,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4006
4019
|
description: 'List all NKS clusters',
|
|
4007
4020
|
stainlessPath: '(resource) nks.clusters > (method) list',
|
|
4008
4021
|
qualified: 'client.nks.clusters.list',
|
|
4009
|
-
params: [
|
|
4022
|
+
params: [
|
|
4023
|
+
'project_id: string;',
|
|
4024
|
+
'autoscaling?: boolean;',
|
|
4025
|
+
'cursor?: string;',
|
|
4026
|
+
'kubernetes_version?: string;',
|
|
4027
|
+
'limit?: number;',
|
|
4028
|
+
'name?: string;',
|
|
4029
|
+
'region?: string;',
|
|
4030
|
+
'sort?: string;',
|
|
4031
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
4032
|
+
'tags?: string[];',
|
|
4033
|
+
'vpc_id?: string;',
|
|
4034
|
+
],
|
|
4010
4035
|
response:
|
|
4011
4036
|
"{ 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; }",
|
|
4012
4037
|
markdown:
|
|
4013
|
-
"## 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```",
|
|
4038
|
+
"## 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```",
|
|
4014
4039
|
perLanguage: {
|
|
4015
4040
|
typescript: {
|
|
4016
4041
|
method: 'client.nks.clusters.list',
|
|
@@ -4228,11 +4253,21 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4228
4253
|
description: 'List all persistent volume claims in an NKS cluster',
|
|
4229
4254
|
stainlessPath: '(resource) nks.clusters.persistent_volume_claims > (method) list',
|
|
4230
4255
|
qualified: 'client.nks.clusters.persistentVolumeClaims.list',
|
|
4231
|
-
params: [
|
|
4256
|
+
params: [
|
|
4257
|
+
'cluster_id: string;',
|
|
4258
|
+
'cursor?: string;',
|
|
4259
|
+
'limit?: number;',
|
|
4260
|
+
'name?: string;',
|
|
4261
|
+
'size_gb_max?: number;',
|
|
4262
|
+
'size_gb_min?: number;',
|
|
4263
|
+
'sort?: string;',
|
|
4264
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
4265
|
+
"type?: 'abs';",
|
|
4266
|
+
],
|
|
4232
4267
|
response:
|
|
4233
4268
|
"{ 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; }",
|
|
4234
4269
|
markdown:
|
|
4235
|
-
"## 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
|
|
4270
|
+
"## 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```",
|
|
4236
4271
|
perLanguage: {
|
|
4237
4272
|
typescript: {
|
|
4238
4273
|
method: 'client.nks.clusters.persistentVolumeClaims.list',
|
|
@@ -4332,11 +4367,21 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4332
4367
|
description: 'List all controllers in an NKS cluster',
|
|
4333
4368
|
stainlessPath: '(resource) nks.clusters.controllers > (method) list',
|
|
4334
4369
|
qualified: 'client.nks.clusters.controllers.list',
|
|
4335
|
-
params: [
|
|
4370
|
+
params: [
|
|
4371
|
+
'cluster_id: string;',
|
|
4372
|
+
'cursor?: string;',
|
|
4373
|
+
'has_private_ip?: boolean;',
|
|
4374
|
+
'instance_type?: string;',
|
|
4375
|
+
'limit?: number;',
|
|
4376
|
+
'name?: string;',
|
|
4377
|
+
'private_ip?: string;',
|
|
4378
|
+
'sort?: string;',
|
|
4379
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
4380
|
+
],
|
|
4336
4381
|
response:
|
|
4337
4382
|
"{ id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
4338
4383
|
markdown:
|
|
4339
|
-
"## 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```",
|
|
4384
|
+
"## 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```",
|
|
4340
4385
|
perLanguage: {
|
|
4341
4386
|
typescript: {
|
|
4342
4387
|
method: 'client.nks.clusters.controllers.list',
|
|
@@ -4402,11 +4447,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4402
4447
|
description: 'List all volumes attached to an NKS controller',
|
|
4403
4448
|
stainlessPath: '(resource) nks.clusters.controllers.volumes > (method) list',
|
|
4404
4449
|
qualified: 'client.nks.clusters.controllers.volumes.list',
|
|
4405
|
-
params: [
|
|
4450
|
+
params: [
|
|
4451
|
+
'cluster_id: string;',
|
|
4452
|
+
'controller_id: string;',
|
|
4453
|
+
'cursor?: string;',
|
|
4454
|
+
"kind?: 'boot' | 'data';",
|
|
4455
|
+
'limit?: number;',
|
|
4456
|
+
'name?: string;',
|
|
4457
|
+
'size_gb_max?: number;',
|
|
4458
|
+
'size_gb_min?: number;',
|
|
4459
|
+
'sort?: string;',
|
|
4460
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
4461
|
+
"type?: 'abs';",
|
|
4462
|
+
],
|
|
4406
4463
|
response:
|
|
4407
4464
|
"{ 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; }",
|
|
4408
4465
|
markdown:
|
|
4409
|
-
"## 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```",
|
|
4466
|
+
"## 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```",
|
|
4410
4467
|
perLanguage: {
|
|
4411
4468
|
typescript: {
|
|
4412
4469
|
method: 'client.nks.clusters.controllers.volumes.list',
|
|
@@ -4507,11 +4564,20 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4507
4564
|
description: 'List all load balancers in an NKS cluster',
|
|
4508
4565
|
stainlessPath: '(resource) nks.clusters.load_balancers > (method) list',
|
|
4509
4566
|
qualified: 'client.nks.clusters.loadBalancers.list',
|
|
4510
|
-
params: [
|
|
4567
|
+
params: [
|
|
4568
|
+
'cluster_id: string;',
|
|
4569
|
+
'cursor?: string;',
|
|
4570
|
+
'limit?: number;',
|
|
4571
|
+
'namespace?: string;',
|
|
4572
|
+
'public_ip_enabled?: boolean;',
|
|
4573
|
+
'service_name?: string;',
|
|
4574
|
+
'sort?: string;',
|
|
4575
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
4576
|
+
],
|
|
4511
4577
|
response:
|
|
4512
4578
|
"{ 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; }",
|
|
4513
4579
|
markdown:
|
|
4514
|
-
"## 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
|
|
4580
|
+
"## 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```",
|
|
4515
4581
|
perLanguage: {
|
|
4516
4582
|
typescript: {
|
|
4517
4583
|
method: 'client.nks.clusters.loadBalancers.list',
|
|
@@ -4694,11 +4760,22 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4694
4760
|
description: 'List all node pools in an NKS cluster',
|
|
4695
4761
|
stainlessPath: '(resource) nks.clusters.pools > (method) list',
|
|
4696
4762
|
qualified: 'client.nks.clusters.pools.list',
|
|
4697
|
-
params: [
|
|
4763
|
+
params: [
|
|
4764
|
+
'cluster_id: string;',
|
|
4765
|
+
'cursor?: string;',
|
|
4766
|
+
'instance_type?: string;',
|
|
4767
|
+
'limit?: number;',
|
|
4768
|
+
'name?: string;',
|
|
4769
|
+
'node_count_max?: number;',
|
|
4770
|
+
'node_count_min?: number;',
|
|
4771
|
+
'sort?: string;',
|
|
4772
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
4773
|
+
'tags?: string[];',
|
|
4774
|
+
],
|
|
4698
4775
|
response:
|
|
4699
4776
|
"{ 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; }",
|
|
4700
4777
|
markdown:
|
|
4701
|
-
"## 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```",
|
|
4778
|
+
"## 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```",
|
|
4702
4779
|
perLanguage: {
|
|
4703
4780
|
typescript: {
|
|
4704
4781
|
method: 'client.nks.clusters.pools.list',
|
|
@@ -4959,11 +5036,21 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
4959
5036
|
description: 'List all nodes in an NKS node pool',
|
|
4960
5037
|
stainlessPath: '(resource) nks.clusters.pools.nodes > (method) list',
|
|
4961
5038
|
qualified: 'client.nks.clusters.pools.nodes.list',
|
|
4962
|
-
params: [
|
|
5039
|
+
params: [
|
|
5040
|
+
'cluster_id: string;',
|
|
5041
|
+
'pool_id: string;',
|
|
5042
|
+
'cursor?: string;',
|
|
5043
|
+
'has_private_ip?: boolean;',
|
|
5044
|
+
'limit?: number;',
|
|
5045
|
+
'name?: string;',
|
|
5046
|
+
'private_ip?: string;',
|
|
5047
|
+
'sort?: string;',
|
|
5048
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
5049
|
+
],
|
|
4963
5050
|
response:
|
|
4964
5051
|
"{ id: string; created_at: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
4965
5052
|
markdown:
|
|
4966
|
-
"## 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```",
|
|
5053
|
+
"## 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```",
|
|
4967
5054
|
perLanguage: {
|
|
4968
5055
|
typescript: {
|
|
4969
5056
|
method: 'client.nks.clusters.pools.nodes.list',
|
|
@@ -5034,12 +5121,19 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5034
5121
|
'pool_id: string;',
|
|
5035
5122
|
'node_id: string;',
|
|
5036
5123
|
'cursor?: string;',
|
|
5124
|
+
"kind?: 'boot' | 'data';",
|
|
5037
5125
|
'limit?: number;',
|
|
5126
|
+
'name?: string;',
|
|
5127
|
+
'size_gb_max?: number;',
|
|
5128
|
+
'size_gb_min?: number;',
|
|
5129
|
+
'sort?: string;',
|
|
5130
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
5131
|
+
"type?: 'abs';",
|
|
5038
5132
|
],
|
|
5039
5133
|
response:
|
|
5040
5134
|
"{ 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; }",
|
|
5041
5135
|
markdown:
|
|
5042
|
-
"## 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```",
|
|
5136
|
+
"## 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```",
|
|
5043
5137
|
perLanguage: {
|
|
5044
5138
|
typescript: {
|
|
5045
5139
|
method: 'client.nks.clusters.pools.nodes.volumes.list',
|
|
@@ -5070,11 +5164,23 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5070
5164
|
description: 'List all volumes attached to the nodes of an NKS node pool',
|
|
5071
5165
|
stainlessPath: '(resource) nks.clusters.pools.volumes > (method) list',
|
|
5072
5166
|
qualified: 'client.nks.clusters.pools.volumes.list',
|
|
5073
|
-
params: [
|
|
5167
|
+
params: [
|
|
5168
|
+
'cluster_id: string;',
|
|
5169
|
+
'pool_id: string;',
|
|
5170
|
+
'cursor?: string;',
|
|
5171
|
+
"kind?: 'boot' | 'data';",
|
|
5172
|
+
'limit?: number;',
|
|
5173
|
+
'name?: string;',
|
|
5174
|
+
'size_gb_max?: number;',
|
|
5175
|
+
'size_gb_min?: number;',
|
|
5176
|
+
'sort?: string;',
|
|
5177
|
+
"status?: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'error';",
|
|
5178
|
+
"type?: 'abs';",
|
|
5179
|
+
],
|
|
5074
5180
|
response:
|
|
5075
5181
|
"{ 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; }",
|
|
5076
5182
|
markdown:
|
|
5077
|
-
"## 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```",
|
|
5183
|
+
"## 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```",
|
|
5078
5184
|
perLanguage: {
|
|
5079
5185
|
typescript: {
|
|
5080
5186
|
method: 'client.nks.clusters.pools.volumes.list',
|
|
@@ -5108,12 +5214,12 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [
|
|
|
5108
5214
|
{
|
|
5109
5215
|
language: 'go',
|
|
5110
5216
|
content:
|
|
5111
|
-
'# 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',
|
|
5217
|
+
'# 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.6\'\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',
|
|
5112
5218
|
},
|
|
5113
5219
|
{
|
|
5114
5220
|
language: 'terraform',
|
|
5115
5221
|
content:
|
|
5116
|
-
'# 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.
|
|
5222
|
+
'# 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.6"\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',
|
|
5117
5223
|
},
|
|
5118
5224
|
{
|
|
5119
5225
|
language: 'cli',
|
package/src/server.ts
CHANGED