@nirvana-labs/nirvana-mcp 1.64.0 → 1.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +46 -2
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +13 -2
- package/code-tool-worker.mjs.map +1 -1
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +2060 -324
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +2060 -324
- package/local-docs-search.mjs.map +1 -1
- package/methods.d.mts.map +1 -1
- package/methods.d.ts.map +1 -1
- package/methods.js +18 -0
- package/methods.js.map +1 -1
- package/methods.mjs +18 -0
- package/methods.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool-worker.ts +13 -2
- package/src/local-docs-search.ts +2450 -360
- package/src/methods.ts +18 -0
- package/src/server.ts +1 -1
package/local-docs-search.mjs
CHANGED
|
@@ -14,6 +14,51 @@ const EMBEDDED_METHODS = [
|
|
|
14
14
|
qualified: 'client.user.get',
|
|
15
15
|
response: '{ id: string; email: string; first_name: string; last_name: string; }',
|
|
16
16
|
markdown: "## get\n\n`client.user.get(): { id: string; email: string; first_name: string; last_name: string; }`\n\n**get** `/v1/user`\n\nGet details about an authenticated user\n\n### Returns\n\n- `{ id: string; email: string; first_name: string; last_name: string; }`\n User details.\n\n - `id: string`\n - `email: string`\n - `first_name: string`\n - `last_name: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst user = await client.user.get();\n\nconsole.log(user);\n```",
|
|
17
|
+
perLanguage: {
|
|
18
|
+
cli: {
|
|
19
|
+
method: 'user get',
|
|
20
|
+
example: "nirvana user get \\\n --api-key 'My API Key'",
|
|
21
|
+
},
|
|
22
|
+
go: {
|
|
23
|
+
method: 'client.User.Get',
|
|
24
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tuser, err := client.User.Get(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", user.ID)\n}\n',
|
|
25
|
+
},
|
|
26
|
+
http: {
|
|
27
|
+
example: 'curl https://api.nirvanalabs.io/v1/user \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
28
|
+
},
|
|
29
|
+
typescript: {
|
|
30
|
+
method: 'client.user.get',
|
|
31
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst user = await client.user.get();\n\nconsole.log(user.id);",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'get',
|
|
37
|
+
endpoint: '/v1/user/security',
|
|
38
|
+
httpMethod: 'get',
|
|
39
|
+
summary: 'Get User Security Settings',
|
|
40
|
+
description: "Get the current user's security settings",
|
|
41
|
+
stainlessPath: '(resource) user.security > (method) get',
|
|
42
|
+
qualified: 'client.user.security.get',
|
|
43
|
+
response: '{ source_ip_rule: { allowed: string[]; blocked: string[]; }; created_at?: string; updated_at?: string; }',
|
|
44
|
+
markdown: "## get\n\n`client.user.security.get(): { source_ip_rule: source_ip_rule_response; created_at?: string; updated_at?: string; }`\n\n**get** `/v1/user/security`\n\nGet the current user's security settings\n\n### Returns\n\n- `{ source_ip_rule: { allowed: string[]; blocked: string[]; }; created_at?: string; updated_at?: string; }`\n User security settings response.\n\n - `source_ip_rule: { allowed: string[]; blocked: string[]; }`\n - `created_at?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst userSecurity = await client.user.security.get();\n\nconsole.log(userSecurity);\n```",
|
|
45
|
+
perLanguage: {
|
|
46
|
+
cli: {
|
|
47
|
+
method: 'security get',
|
|
48
|
+
example: "nirvana user:security get \\\n --api-key 'My API Key'",
|
|
49
|
+
},
|
|
50
|
+
go: {
|
|
51
|
+
method: 'client.User.Security.Get',
|
|
52
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tuserSecurity, err := client.User.Security.Get(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", userSecurity.SourceIPRule)\n}\n',
|
|
53
|
+
},
|
|
54
|
+
http: {
|
|
55
|
+
example: 'curl https://api.nirvanalabs.io/v1/user/security \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
56
|
+
},
|
|
57
|
+
typescript: {
|
|
58
|
+
method: 'client.user.security.get',
|
|
59
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst userSecurity = await client.user.security.get();\n\nconsole.log(userSecurity.source_ip_rule);",
|
|
60
|
+
},
|
|
61
|
+
},
|
|
17
62
|
},
|
|
18
63
|
{
|
|
19
64
|
name: 'update',
|
|
@@ -26,17 +71,23 @@ const EMBEDDED_METHODS = [
|
|
|
26
71
|
params: ['source_ip_rule?: { allowed?: string[]; blocked?: string[]; };'],
|
|
27
72
|
response: '{ source_ip_rule: { allowed: string[]; blocked: string[]; }; created_at?: string; updated_at?: string; }',
|
|
28
73
|
markdown: "## update\n\n`client.user.security.update(source_ip_rule?: { allowed?: string[]; blocked?: string[]; }): { source_ip_rule: source_ip_rule_response; created_at?: string; updated_at?: string; }`\n\n**patch** `/v1/user/security`\n\nUpdate the current user's security settings\n\n### Parameters\n\n- `source_ip_rule?: { allowed?: string[]; blocked?: string[]; }`\n IP filter rules.\n - `allowed?: string[]`\n List of IPv4 CIDR addresses to allow.\n - `blocked?: string[]`\n List of IPv4 CIDR addresses to deny.\n\n### Returns\n\n- `{ source_ip_rule: { allowed: string[]; blocked: string[]; }; created_at?: string; updated_at?: string; }`\n User security settings response.\n\n - `source_ip_rule: { allowed: string[]; blocked: string[]; }`\n - `created_at?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst userSecurity = await client.user.security.update();\n\nconsole.log(userSecurity);\n```",
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
74
|
+
perLanguage: {
|
|
75
|
+
cli: {
|
|
76
|
+
method: 'security update',
|
|
77
|
+
example: "nirvana user:security update \\\n --api-key 'My API Key'",
|
|
78
|
+
},
|
|
79
|
+
go: {
|
|
80
|
+
method: 'client.User.Security.Update',
|
|
81
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/user"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tuserSecurity, err := client.User.Security.Update(context.TODO(), user.SecurityUpdateParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", userSecurity.SourceIPRule)\n}\n',
|
|
82
|
+
},
|
|
83
|
+
http: {
|
|
84
|
+
example: "curl https://api.nirvanalabs.io/v1/user/security \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $NIRVANA_LABS_API_KEY\" \\\n -d '{}'",
|
|
85
|
+
},
|
|
86
|
+
typescript: {
|
|
87
|
+
method: 'client.user.security.update',
|
|
88
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst userSecurity = await client.user.security.update();\n\nconsole.log(userSecurity.source_ip_rule);",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
40
91
|
},
|
|
41
92
|
{
|
|
42
93
|
name: 'create',
|
|
@@ -57,6 +108,52 @@ const EMBEDDED_METHODS = [
|
|
|
57
108
|
],
|
|
58
109
|
response: "{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }",
|
|
59
110
|
markdown: "## create\n\n`client.apiKeys.create(expires_at: string, name: string, permissions: { permission: 'read' | 'edit'; resource_type: string; }[], project_ids: string[], source_ip_rule?: { allowed?: string[]; blocked?: string[]; }, starts_at?: string, tags?: string[]): { id: string; created_at: string; expires_at: string; name: string; permissions: api_key_permission[]; project_ids: string[]; source_ip_rule: source_ip_rule_response; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n\n**post** `/v1/api_keys`\n\nCreate a new API key\n\n### Parameters\n\n- `expires_at: string`\n When the API Key expires and is no longer valid.\n\n- `name: string`\n API Key name.\n\n- `permissions: { permission: 'read' | 'edit'; resource_type: string; }[]`\n Scoped permissions for this API key. At least one is required.\n\n- `project_ids: string[]`\n Project IDs this API key is scoped to. At least one is required.\n\n- `source_ip_rule?: { allowed?: string[]; blocked?: string[]; }`\n IP filter rules.\n - `allowed?: string[]`\n List of IPv4 CIDR addresses to allow.\n - `blocked?: string[]`\n List of IPv4 CIDR addresses to deny.\n\n- `starts_at?: string`\n When the API Key starts to be valid.\n\n- `tags?: string[]`\n Tags to attach to the API Key.\n\n### Returns\n\n- `{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n API Key response.\n\n - `id: string`\n - `created_at: string`\n - `expires_at: string`\n - `name: string`\n - `permissions: { permission: 'read' | 'edit'; resource_type: string; }[]`\n - `project_ids: string[]`\n - `source_ip_rule: { allowed: string[]; blocked: string[]; }`\n - `status: 'active' | 'inactive' | 'expired'`\n - `tags: string[]`\n - `updated_at: string`\n - `key?: string`\n - `starts_at?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst apiKey = await client.apiKeys.create({\n expires_at: '2025-12-31T23:59:59Z',\n name: 'My API Key',\n permissions: [{ permission: 'edit', resource_type: 'vm' }],\n project_ids: ['123e4567-e89b-12d3-a456-426614174000', '123e4567-e89b-12d3-a456-426614174001'],\n});\n\nconsole.log(apiKey);\n```",
|
|
111
|
+
perLanguage: {
|
|
112
|
+
cli: {
|
|
113
|
+
method: 'api_keys create',
|
|
114
|
+
example: "nirvana api-keys create \\\n --api-key 'My API Key' \\\n --expires-at \"'2025-12-31T23:59:59Z'\" \\\n --name 'My API Key' \\\n --permission '{permission: edit, resource_type: vm}' \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --project-id 123e4567-e89b-12d3-a456-426614174001",
|
|
115
|
+
},
|
|
116
|
+
go: {
|
|
117
|
+
method: 'client.APIKeys.New',
|
|
118
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/api_keys"\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\tapiKey, err := client.APIKeys.New(context.TODO(), api_keys.APIKeyNewParams{\n\t\tExpiresAt: time.Now(),\n\t\tName: "My API Key",\n\t\tPermissions: []api_keys.APIKeyNewParamsPermission{{\n\t\t\tPermission: api_keys.APIPermissionLevelEdit,\n\t\t\tResourceType: api_keys.APIPermissionResourceTypeVM,\n\t\t}},\n\t\tProjectIDs: []string{"123e4567-e89b-12d3-a456-426614174000", "123e4567-e89b-12d3-a456-426614174001"},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", apiKey.ID)\n}\n',
|
|
119
|
+
},
|
|
120
|
+
http: {
|
|
121
|
+
example: 'curl https://api.nirvanalabs.io/v1/api_keys \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "expires_at": "2025-12-31T23:59:59Z",\n "name": "My API Key",\n "permissions": [\n {\n "permission": "edit",\n "resource_type": "vm"\n }\n ],\n "project_ids": [\n "123e4567-e89b-12d3-a456-426614174000",\n "123e4567-e89b-12d3-a456-426614174001"\n ],\n "starts_at": "2025-01-01T00:00:00Z",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
122
|
+
},
|
|
123
|
+
typescript: {
|
|
124
|
+
method: 'client.apiKeys.create',
|
|
125
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst apiKey = await client.apiKeys.create({\n expires_at: '2025-12-31T23:59:59Z',\n name: 'My API Key',\n permissions: [{ permission: 'edit', resource_type: 'vm' }],\n project_ids: ['123e4567-e89b-12d3-a456-426614174000', '123e4567-e89b-12d3-a456-426614174001'],\n});\n\nconsole.log(apiKey.id);",
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'get',
|
|
131
|
+
endpoint: '/v1/api_keys/{api_key_id}',
|
|
132
|
+
httpMethod: 'get',
|
|
133
|
+
summary: 'Get API Key Details',
|
|
134
|
+
description: 'Get details about an API key',
|
|
135
|
+
stainlessPath: '(resource) api_keys > (method) get',
|
|
136
|
+
qualified: 'client.apiKeys.get',
|
|
137
|
+
params: ['api_key_id: string;'],
|
|
138
|
+
response: "{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }",
|
|
139
|
+
markdown: "## get\n\n`client.apiKeys.get(api_key_id: string): { id: string; created_at: string; expires_at: string; name: string; permissions: api_key_permission[]; project_ids: string[]; source_ip_rule: source_ip_rule_response; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n\n**get** `/v1/api_keys/{api_key_id}`\n\nGet details about an API key\n\n### Parameters\n\n- `api_key_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n API Key response.\n\n - `id: string`\n - `created_at: string`\n - `expires_at: string`\n - `name: string`\n - `permissions: { permission: 'read' | 'edit'; resource_type: string; }[]`\n - `project_ids: string[]`\n - `source_ip_rule: { allowed: string[]; blocked: string[]; }`\n - `status: 'active' | 'inactive' | 'expired'`\n - `tags: string[]`\n - `updated_at: string`\n - `key?: string`\n - `starts_at?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst apiKey = await client.apiKeys.get('api_key_id');\n\nconsole.log(apiKey);\n```",
|
|
140
|
+
perLanguage: {
|
|
141
|
+
cli: {
|
|
142
|
+
method: 'api_keys get',
|
|
143
|
+
example: "nirvana api-keys get \\\n --api-key 'My API Key' \\\n --api-key-id api_key_id",
|
|
144
|
+
},
|
|
145
|
+
go: {
|
|
146
|
+
method: 'client.APIKeys.Get',
|
|
147
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tapiKey, err := client.APIKeys.Get(context.TODO(), "api_key_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", apiKey.ID)\n}\n',
|
|
148
|
+
},
|
|
149
|
+
http: {
|
|
150
|
+
example: 'curl https://api.nirvanalabs.io/v1/api_keys/$API_KEY_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
151
|
+
},
|
|
152
|
+
typescript: {
|
|
153
|
+
method: 'client.apiKeys.get',
|
|
154
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst apiKey = await client.apiKeys.get('api_key_id');\n\nconsole.log(apiKey.id);",
|
|
155
|
+
},
|
|
156
|
+
},
|
|
60
157
|
},
|
|
61
158
|
{
|
|
62
159
|
name: 'update',
|
|
@@ -76,6 +173,51 @@ const EMBEDDED_METHODS = [
|
|
|
76
173
|
],
|
|
77
174
|
response: "{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }",
|
|
78
175
|
markdown: "## update\n\n`client.apiKeys.update(api_key_id: string, name?: string, permissions?: { permission: 'read' | 'edit'; resource_type: string; }[], project_ids?: string[], source_ip_rule?: { allowed?: string[]; blocked?: string[]; }, tags?: string[]): { id: string; created_at: string; expires_at: string; name: string; permissions: api_key_permission[]; project_ids: string[]; source_ip_rule: source_ip_rule_response; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n\n**patch** `/v1/api_keys/{api_key_id}`\n\nUpdate an existing API key\n\n### Parameters\n\n- `api_key_id: string`\n\n- `name?: string`\n API Key name.\n\n- `permissions?: { permission: 'read' | 'edit'; resource_type: string; }[]`\n Scoped permissions for this API key. When provided, replaces the entire set. At least one is required.\n\n- `project_ids?: string[]`\n Project IDs this API key is scoped to. When provided, replaces the entire set. At least one is required.\n\n- `source_ip_rule?: { allowed?: string[]; blocked?: string[]; }`\n IP filter rules.\n - `allowed?: string[]`\n List of IPv4 CIDR addresses to allow.\n - `blocked?: string[]`\n List of IPv4 CIDR addresses to deny.\n\n- `tags?: string[]`\n Tags to attach to the API Key.\n\n### Returns\n\n- `{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n API Key response.\n\n - `id: string`\n - `created_at: string`\n - `expires_at: string`\n - `name: string`\n - `permissions: { permission: 'read' | 'edit'; resource_type: string; }[]`\n - `project_ids: string[]`\n - `source_ip_rule: { allowed: string[]; blocked: string[]; }`\n - `status: 'active' | 'inactive' | 'expired'`\n - `tags: string[]`\n - `updated_at: string`\n - `key?: string`\n - `starts_at?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst apiKey = await client.apiKeys.update('api_key_id');\n\nconsole.log(apiKey);\n```",
|
|
176
|
+
perLanguage: {
|
|
177
|
+
cli: {
|
|
178
|
+
method: 'api_keys update',
|
|
179
|
+
example: "nirvana api-keys update \\\n --api-key 'My API Key' \\\n --api-key-id api_key_id",
|
|
180
|
+
},
|
|
181
|
+
go: {
|
|
182
|
+
method: 'client.APIKeys.Update',
|
|
183
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/api_keys"\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\tapiKey, err := client.APIKeys.Update(\n\t\tcontext.TODO(),\n\t\t"api_key_id",\n\t\tapi_keys.APIKeyUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", apiKey.ID)\n}\n',
|
|
184
|
+
},
|
|
185
|
+
http: {
|
|
186
|
+
example: 'curl https://api.nirvanalabs.io/v1/api_keys/$API_KEY_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Updated API Key",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
187
|
+
},
|
|
188
|
+
typescript: {
|
|
189
|
+
method: 'client.apiKeys.update',
|
|
190
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst apiKey = await client.apiKeys.update('api_key_id');\n\nconsole.log(apiKey.id);",
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: 'delete',
|
|
196
|
+
endpoint: '/v1/api_keys/{api_key_id}',
|
|
197
|
+
httpMethod: 'delete',
|
|
198
|
+
summary: 'Delete API Key',
|
|
199
|
+
description: 'Delete an API key',
|
|
200
|
+
stainlessPath: '(resource) api_keys > (method) delete',
|
|
201
|
+
qualified: 'client.apiKeys.delete',
|
|
202
|
+
params: ['api_key_id: string;'],
|
|
203
|
+
markdown: "## delete\n\n`client.apiKeys.delete(api_key_id: string): void`\n\n**delete** `/v1/api_keys/{api_key_id}`\n\nDelete an API key\n\n### Parameters\n\n- `api_key_id: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.apiKeys.delete('api_key_id')\n```",
|
|
204
|
+
perLanguage: {
|
|
205
|
+
cli: {
|
|
206
|
+
method: 'api_keys delete',
|
|
207
|
+
example: "nirvana api-keys delete \\\n --api-key 'My API Key' \\\n --api-key-id api_key_id",
|
|
208
|
+
},
|
|
209
|
+
go: {
|
|
210
|
+
method: 'client.APIKeys.Delete',
|
|
211
|
+
example: 'package main\n\nimport (\n\t"context"\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\terr := client.APIKeys.Delete(context.TODO(), "api_key_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
212
|
+
},
|
|
213
|
+
http: {
|
|
214
|
+
example: 'curl https://api.nirvanalabs.io/v1/api_keys/$API_KEY_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
215
|
+
},
|
|
216
|
+
typescript: {
|
|
217
|
+
method: 'client.apiKeys.delete',
|
|
218
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.apiKeys.delete('api_key_id');",
|
|
219
|
+
},
|
|
220
|
+
},
|
|
79
221
|
},
|
|
80
222
|
{
|
|
81
223
|
name: 'list',
|
|
@@ -88,29 +230,52 @@ const EMBEDDED_METHODS = [
|
|
|
88
230
|
params: ['cursor?: string;', 'limit?: number;'],
|
|
89
231
|
response: "{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }",
|
|
90
232
|
markdown: "## list\n\n`client.apiKeys.list(cursor?: string, limit?: number): { id: string; created_at: string; expires_at: string; name: string; permissions: api_key_permission[]; project_ids: string[]; source_ip_rule: source_ip_rule_response; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n\n**get** `/v1/api_keys`\n\nList all API keys\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n API Key response.\n\n - `id: string`\n - `created_at: string`\n - `expires_at: string`\n - `name: string`\n - `permissions: { permission: 'read' | 'edit'; resource_type: string; }[]`\n - `project_ids: string[]`\n - `source_ip_rule: { allowed: string[]; blocked: string[]; }`\n - `status: 'active' | 'inactive' | 'expired'`\n - `tags: string[]`\n - `updated_at: string`\n - `key?: string`\n - `starts_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 apiKey of client.apiKeys.list()) {\n console.log(apiKey);\n}\n```",
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
233
|
+
perLanguage: {
|
|
234
|
+
cli: {
|
|
235
|
+
method: 'api_keys list',
|
|
236
|
+
example: "nirvana api-keys list \\\n --api-key 'My API Key'",
|
|
237
|
+
},
|
|
238
|
+
go: {
|
|
239
|
+
method: 'client.APIKeys.List',
|
|
240
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/api_keys"\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\tpage, err := client.APIKeys.List(context.TODO(), api_keys.APIKeyListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
241
|
+
},
|
|
242
|
+
http: {
|
|
243
|
+
example: 'curl https://api.nirvanalabs.io/v1/api_keys \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
244
|
+
},
|
|
245
|
+
typescript: {
|
|
246
|
+
method: 'client.apiKeys.list',
|
|
247
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const apiKey of client.apiKeys.list()) {\n console.log(apiKey.id);\n}",
|
|
248
|
+
},
|
|
249
|
+
},
|
|
102
250
|
},
|
|
103
251
|
{
|
|
104
252
|
name: 'get',
|
|
105
|
-
endpoint: '/v1/
|
|
253
|
+
endpoint: '/v1/operations/{operation_id}',
|
|
106
254
|
httpMethod: 'get',
|
|
107
|
-
summary: 'Get
|
|
108
|
-
description: 'Get details about
|
|
109
|
-
stainlessPath: '(resource)
|
|
110
|
-
qualified: 'client.
|
|
111
|
-
params: ['
|
|
112
|
-
response: "{ id: string; created_at: string;
|
|
113
|
-
markdown: "## get\n\n`client.
|
|
255
|
+
summary: 'Get Operation Details',
|
|
256
|
+
description: 'Get details about a specific operation',
|
|
257
|
+
stainlessPath: '(resource) operations > (method) get',
|
|
258
|
+
qualified: 'client.operations.get',
|
|
259
|
+
params: ['operation_id: string;'],
|
|
260
|
+
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
261
|
+
markdown: "## get\n\n`client.operations.get(operation_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**get** `/v1/operations/{operation_id}`\n\nGet details about a specific operation\n\n### Parameters\n\n- `operation_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.operations.get('operation_id');\n\nconsole.log(operation);\n```",
|
|
262
|
+
perLanguage: {
|
|
263
|
+
cli: {
|
|
264
|
+
method: 'operations get',
|
|
265
|
+
example: "nirvana operations get \\\n --api-key 'My API Key' \\\n --operation-id operation_id",
|
|
266
|
+
},
|
|
267
|
+
go: {
|
|
268
|
+
method: 'client.Operations.Get',
|
|
269
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Operations.Get(context.TODO(), "operation_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
270
|
+
},
|
|
271
|
+
http: {
|
|
272
|
+
example: 'curl https://api.nirvanalabs.io/v1/operations/$OPERATION_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
273
|
+
},
|
|
274
|
+
typescript: {
|
|
275
|
+
method: 'client.operations.get',
|
|
276
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.operations.get('operation_id');\n\nconsole.log(operation.id);",
|
|
277
|
+
},
|
|
278
|
+
},
|
|
114
279
|
},
|
|
115
280
|
{
|
|
116
281
|
name: 'list',
|
|
@@ -123,18 +288,23 @@ const EMBEDDED_METHODS = [
|
|
|
123
288
|
params: ['project_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
124
289
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
125
290
|
markdown: "## list\n\n`client.operations.list(project_id: string, cursor?: string, limit?: number): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**get** `/v1/operations`\n\nList all operations\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; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const operation of client.operations.list({ project_id: 'project_id' })) {\n console.log(operation);\n}\n```",
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
291
|
+
perLanguage: {
|
|
292
|
+
cli: {
|
|
293
|
+
method: 'operations list',
|
|
294
|
+
example: "nirvana operations list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
295
|
+
},
|
|
296
|
+
go: {
|
|
297
|
+
method: 'client.Operations.List',
|
|
298
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/operations"\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\tpage, err := client.Operations.List(context.TODO(), operations.OperationListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
299
|
+
},
|
|
300
|
+
http: {
|
|
301
|
+
example: 'curl https://api.nirvanalabs.io/v1/operations \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
302
|
+
},
|
|
303
|
+
typescript: {
|
|
304
|
+
method: 'client.operations.list',
|
|
305
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const operation of client.operations.list({ project_id: 'project_id' })) {\n console.log(operation.id);\n}",
|
|
306
|
+
},
|
|
307
|
+
},
|
|
138
308
|
},
|
|
139
309
|
{
|
|
140
310
|
name: 'create',
|
|
@@ -146,7 +316,53 @@ const EMBEDDED_METHODS = [
|
|
|
146
316
|
qualified: 'client.organizations.create',
|
|
147
317
|
params: ['name: string;'],
|
|
148
318
|
response: "{ id: string; created_at: string; domains: { id: string; domain: string; verified: boolean; }[]; membership: { id: string; role: 'owner' | 'member'; }; name: string; personal: boolean; services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }; updated_at: string; auth_id?: string; }",
|
|
149
|
-
markdown: "## create\n\n`client.organizations.create(name: string): { id: string; created_at: string; domains: organization_domain[]; membership:
|
|
319
|
+
markdown: "## create\n\n`client.organizations.create(name: string): { id: string; created_at: string; domains: organization_domain[]; membership: object; name: string; personal: boolean; services: organization_services; updated_at: string; auth_id?: string; }`\n\n**post** `/v1/organizations`\n\nCreate a new organization\n\n### Parameters\n\n- `name: string`\n Organization name.\n\n### Returns\n\n- `{ id: string; created_at: string; domains: { id: string; domain: string; verified: boolean; }[]; membership: { id: string; role: 'owner' | 'member'; }; name: string; personal: boolean; services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }; updated_at: string; auth_id?: string; }`\n Organization response.\n\n - `id: string`\n - `created_at: string`\n - `domains: { id: string; domain: string; verified: boolean; }[]`\n - `membership: { id: string; role: 'owner' | 'member'; }`\n - `name: string`\n - `personal: boolean`\n - `services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }`\n - `updated_at: string`\n - `auth_id?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst organization = await client.organizations.create({ name: 'My Organization' });\n\nconsole.log(organization);\n```",
|
|
320
|
+
perLanguage: {
|
|
321
|
+
cli: {
|
|
322
|
+
method: 'organizations create',
|
|
323
|
+
example: "nirvana organizations create \\\n --api-key 'My API Key' \\\n --name 'My Organization'",
|
|
324
|
+
},
|
|
325
|
+
go: {
|
|
326
|
+
method: 'client.Organizations.New',
|
|
327
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/organizations"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\torganization, err := client.Organizations.New(context.TODO(), organizations.OrganizationNewParams{\n\t\tName: "My Organization",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", organization.ID)\n}\n',
|
|
328
|
+
},
|
|
329
|
+
http: {
|
|
330
|
+
example: 'curl https://api.nirvanalabs.io/v1/organizations \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Organization"\n }\'',
|
|
331
|
+
},
|
|
332
|
+
typescript: {
|
|
333
|
+
method: 'client.organizations.create',
|
|
334
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organization = await client.organizations.create({ name: 'My Organization' });\n\nconsole.log(organization.id);",
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
name: 'get',
|
|
340
|
+
endpoint: '/v1/organizations/{organization_id}',
|
|
341
|
+
httpMethod: 'get',
|
|
342
|
+
summary: 'Get Organization Details',
|
|
343
|
+
description: 'Get details about an Organization',
|
|
344
|
+
stainlessPath: '(resource) organizations > (method) get',
|
|
345
|
+
qualified: 'client.organizations.get',
|
|
346
|
+
params: ['organization_id: string;'],
|
|
347
|
+
response: "{ id: string; created_at: string; domains: { id: string; domain: string; verified: boolean; }[]; membership: { id: string; role: 'owner' | 'member'; }; name: string; personal: boolean; services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }; updated_at: string; auth_id?: string; }",
|
|
348
|
+
markdown: "## get\n\n`client.organizations.get(organization_id: string): { id: string; created_at: string; domains: organization_domain[]; membership: object; name: string; personal: boolean; services: organization_services; updated_at: string; auth_id?: string; }`\n\n**get** `/v1/organizations/{organization_id}`\n\nGet details about an Organization\n\n### Parameters\n\n- `organization_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; domains: { id: string; domain: string; verified: boolean; }[]; membership: { id: string; role: 'owner' | 'member'; }; name: string; personal: boolean; services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }; updated_at: string; auth_id?: string; }`\n Organization response.\n\n - `id: string`\n - `created_at: string`\n - `domains: { id: string; domain: string; verified: boolean; }[]`\n - `membership: { id: string; role: 'owner' | 'member'; }`\n - `name: string`\n - `personal: boolean`\n - `services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }`\n - `updated_at: string`\n - `auth_id?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst organization = await client.organizations.get('organization_id');\n\nconsole.log(organization);\n```",
|
|
349
|
+
perLanguage: {
|
|
350
|
+
cli: {
|
|
351
|
+
method: 'organizations get',
|
|
352
|
+
example: "nirvana organizations get \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
|
|
353
|
+
},
|
|
354
|
+
go: {
|
|
355
|
+
method: 'client.Organizations.Get',
|
|
356
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\torganization, err := client.Organizations.Get(context.TODO(), "organization_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", organization.ID)\n}\n',
|
|
357
|
+
},
|
|
358
|
+
http: {
|
|
359
|
+
example: 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
360
|
+
},
|
|
361
|
+
typescript: {
|
|
362
|
+
method: 'client.organizations.get',
|
|
363
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organization = await client.organizations.get('organization_id');\n\nconsole.log(organization.id);",
|
|
364
|
+
},
|
|
365
|
+
},
|
|
150
366
|
},
|
|
151
367
|
{
|
|
152
368
|
name: 'update',
|
|
@@ -158,7 +374,24 @@ const EMBEDDED_METHODS = [
|
|
|
158
374
|
qualified: 'client.organizations.update',
|
|
159
375
|
params: ['organization_id: string;', 'name?: string;'],
|
|
160
376
|
response: "{ id: string; created_at: string; domains: { id: string; domain: string; verified: boolean; }[]; membership: { id: string; role: 'owner' | 'member'; }; name: string; personal: boolean; services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }; updated_at: string; auth_id?: string; }",
|
|
161
|
-
markdown: "## update\n\n`client.organizations.update(organization_id: string, name?: string): { id: string; created_at: string; domains: organization_domain[]; membership:
|
|
377
|
+
markdown: "## update\n\n`client.organizations.update(organization_id: string, name?: string): { id: string; created_at: string; domains: organization_domain[]; membership: object; name: string; personal: boolean; services: organization_services; updated_at: string; auth_id?: string; }`\n\n**patch** `/v1/organizations/{organization_id}`\n\nUpdate an existing organization\n\n### Parameters\n\n- `organization_id: string`\n\n- `name?: string`\n Organization name.\n\n### Returns\n\n- `{ id: string; created_at: string; domains: { id: string; domain: string; verified: boolean; }[]; membership: { id: string; role: 'owner' | 'member'; }; name: string; personal: boolean; services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }; updated_at: string; auth_id?: string; }`\n Organization response.\n\n - `id: string`\n - `created_at: string`\n - `domains: { id: string; domain: string; verified: boolean; }[]`\n - `membership: { id: string; role: 'owner' | 'member'; }`\n - `name: string`\n - `personal: boolean`\n - `services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }`\n - `updated_at: string`\n - `auth_id?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst organization = await client.organizations.update('organization_id');\n\nconsole.log(organization);\n```",
|
|
378
|
+
perLanguage: {
|
|
379
|
+
cli: {
|
|
380
|
+
method: 'organizations update',
|
|
381
|
+
example: "nirvana organizations update \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
|
|
382
|
+
},
|
|
383
|
+
go: {
|
|
384
|
+
method: 'client.Organizations.Update',
|
|
385
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/organizations"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\torganization, err := client.Organizations.Update(\n\t\tcontext.TODO(),\n\t\t"organization_id",\n\t\torganizations.OrganizationUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", organization.ID)\n}\n',
|
|
386
|
+
},
|
|
387
|
+
http: {
|
|
388
|
+
example: 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Updated Organization"\n }\'',
|
|
389
|
+
},
|
|
390
|
+
typescript: {
|
|
391
|
+
method: 'client.organizations.update',
|
|
392
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organization = await client.organizations.update('organization_id');\n\nconsole.log(organization.id);",
|
|
393
|
+
},
|
|
394
|
+
},
|
|
162
395
|
},
|
|
163
396
|
{
|
|
164
397
|
name: 'list',
|
|
@@ -170,19 +403,24 @@ const EMBEDDED_METHODS = [
|
|
|
170
403
|
qualified: 'client.organizations.list',
|
|
171
404
|
params: ['cursor?: string;', 'limit?: number;'],
|
|
172
405
|
response: "{ id: string; created_at: string; domains: { id: string; domain: string; verified: boolean; }[]; membership: { id: string; role: 'owner' | 'member'; }; name: string; personal: boolean; services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }; updated_at: string; auth_id?: string; }",
|
|
173
|
-
markdown: "## list\n\n`client.organizations.list(cursor?: string, limit?: number): { id: string; created_at: string; domains: organization_domain[]; membership:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
406
|
+
markdown: "## list\n\n`client.organizations.list(cursor?: string, limit?: number): { id: string; created_at: string; domains: organization_domain[]; membership: object; name: string; personal: boolean; services: organization_services; updated_at: string; auth_id?: string; }`\n\n**get** `/v1/organizations`\n\nList organizations\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; domains: { id: string; domain: string; verified: boolean; }[]; membership: { id: string; role: 'owner' | 'member'; }; name: string; personal: boolean; services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }; updated_at: string; auth_id?: string; }`\n Organization response.\n\n - `id: string`\n - `created_at: string`\n - `domains: { id: string; domain: string; verified: boolean; }[]`\n - `membership: { id: string; role: 'owner' | 'member'; }`\n - `name: string`\n - `personal: boolean`\n - `services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }`\n - `updated_at: string`\n - `auth_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 organization of client.organizations.list()) {\n console.log(organization);\n}\n```",
|
|
407
|
+
perLanguage: {
|
|
408
|
+
cli: {
|
|
409
|
+
method: 'organizations list',
|
|
410
|
+
example: "nirvana organizations list \\\n --api-key 'My API Key'",
|
|
411
|
+
},
|
|
412
|
+
go: {
|
|
413
|
+
method: 'client.Organizations.List',
|
|
414
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/organizations"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Organizations.List(context.TODO(), organizations.OrganizationListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
415
|
+
},
|
|
416
|
+
http: {
|
|
417
|
+
example: 'curl https://api.nirvanalabs.io/v1/organizations \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
418
|
+
},
|
|
419
|
+
typescript: {
|
|
420
|
+
method: 'client.organizations.list',
|
|
421
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const organization of client.organizations.list()) {\n console.log(organization.id);\n}",
|
|
422
|
+
},
|
|
423
|
+
},
|
|
186
424
|
},
|
|
187
425
|
{
|
|
188
426
|
name: 'leave',
|
|
@@ -194,18 +432,81 @@ const EMBEDDED_METHODS = [
|
|
|
194
432
|
qualified: 'client.organizations.leave',
|
|
195
433
|
params: ['organization_id: string;'],
|
|
196
434
|
markdown: "## leave\n\n`client.organizations.leave(organization_id: string): void`\n\n**post** `/v1/organizations/{organization_id}/leave`\n\nLeave an Organization\n\n### Parameters\n\n- `organization_id: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.organizations.leave('organization_id')\n```",
|
|
435
|
+
perLanguage: {
|
|
436
|
+
cli: {
|
|
437
|
+
method: 'organizations leave',
|
|
438
|
+
example: "nirvana organizations leave \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
|
|
439
|
+
},
|
|
440
|
+
go: {
|
|
441
|
+
method: 'client.Organizations.Leave',
|
|
442
|
+
example: 'package main\n\nimport (\n\t"context"\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\terr := client.Organizations.Leave(context.TODO(), "organization_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
443
|
+
},
|
|
444
|
+
http: {
|
|
445
|
+
example: 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/leave \\\n -X POST \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
446
|
+
},
|
|
447
|
+
typescript: {
|
|
448
|
+
method: 'client.organizations.leave',
|
|
449
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.organizations.leave('organization_id');",
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
name: 'get',
|
|
455
|
+
endpoint: '/v1/organizations/{organization_id}/memberships/{membership_id}',
|
|
456
|
+
httpMethod: 'get',
|
|
457
|
+
summary: 'Get Organization Membership',
|
|
458
|
+
description: 'Get details about an organization membership',
|
|
459
|
+
stainlessPath: '(resource) organizations.memberships > (method) get',
|
|
460
|
+
qualified: 'client.organizations.memberships.get',
|
|
461
|
+
params: ['organization_id: string;', 'membership_id: string;'],
|
|
462
|
+
response: "{ id: string; created_at: string; organization_id: string; role: 'owner' | 'member'; updated_at: string; user_id: string; }",
|
|
463
|
+
markdown: "## get\n\n`client.organizations.memberships.get(organization_id: string, membership_id: string): { id: string; created_at: string; organization_id: string; role: 'owner' | 'member'; updated_at: string; user_id: string; }`\n\n**get** `/v1/organizations/{organization_id}/memberships/{membership_id}`\n\nGet details about an organization membership\n\n### Parameters\n\n- `organization_id: string`\n\n- `membership_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; organization_id: string; role: 'owner' | 'member'; updated_at: string; user_id: string; }`\n Organization membership details.\n\n - `id: string`\n - `created_at: string`\n - `organization_id: string`\n - `role: 'owner' | 'member'`\n - `updated_at: string`\n - `user_id: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst organizationMembership = await client.organizations.memberships.get('membership_id', { organization_id: 'organization_id' });\n\nconsole.log(organizationMembership);\n```",
|
|
464
|
+
perLanguage: {
|
|
465
|
+
cli: {
|
|
466
|
+
method: 'memberships get',
|
|
467
|
+
example: "nirvana organizations:memberships get \\\n --api-key 'My API Key' \\\n --organization-id organization_id \\\n --membership-id membership_id",
|
|
468
|
+
},
|
|
469
|
+
go: {
|
|
470
|
+
method: 'client.Organizations.Memberships.Get',
|
|
471
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\torganizationMembership, err := client.Organizations.Memberships.Get(\n\t\tcontext.TODO(),\n\t\t"organization_id",\n\t\t"membership_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", organizationMembership.ID)\n}\n',
|
|
472
|
+
},
|
|
473
|
+
http: {
|
|
474
|
+
example: 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/memberships/$MEMBERSHIP_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
475
|
+
},
|
|
476
|
+
typescript: {
|
|
477
|
+
method: 'client.organizations.memberships.get',
|
|
478
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organizationMembership = await client.organizations.memberships.get('membership_id', {\n organization_id: 'organization_id',\n});\n\nconsole.log(organizationMembership.id);",
|
|
479
|
+
},
|
|
480
|
+
},
|
|
197
481
|
},
|
|
198
482
|
{
|
|
199
483
|
name: 'list',
|
|
200
|
-
endpoint: '/v1/
|
|
484
|
+
endpoint: '/v1/organizations/{organization_id}/memberships',
|
|
201
485
|
httpMethod: 'get',
|
|
202
|
-
summary: 'List
|
|
203
|
-
description: 'List
|
|
204
|
-
stainlessPath: '(resource)
|
|
205
|
-
qualified: 'client.
|
|
206
|
-
params: ['cursor?: string;', 'limit?: number;'],
|
|
207
|
-
response:
|
|
208
|
-
markdown: "## list\n\n`client.
|
|
486
|
+
summary: 'List Organization Memberships',
|
|
487
|
+
description: 'List all memberships for an organization',
|
|
488
|
+
stainlessPath: '(resource) organizations.memberships > (method) list',
|
|
489
|
+
qualified: 'client.organizations.memberships.list',
|
|
490
|
+
params: ['organization_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
491
|
+
response: "{ id: string; created_at: string; organization_id: string; role: 'owner' | 'member'; updated_at: string; user_id: string; }",
|
|
492
|
+
markdown: "## list\n\n`client.organizations.memberships.list(organization_id: string, cursor?: string, limit?: number): { id: string; created_at: string; organization_id: string; role: 'owner' | 'member'; updated_at: string; user_id: string; }`\n\n**get** `/v1/organizations/{organization_id}/memberships`\n\nList all memberships for an organization\n\n### Parameters\n\n- `organization_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; organization_id: string; role: 'owner' | 'member'; updated_at: string; user_id: string; }`\n Organization membership details.\n\n - `id: string`\n - `created_at: string`\n - `organization_id: string`\n - `role: 'owner' | 'member'`\n - `updated_at: string`\n - `user_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 organizationMembership of client.organizations.memberships.list('organization_id')) {\n console.log(organizationMembership);\n}\n```",
|
|
493
|
+
perLanguage: {
|
|
494
|
+
cli: {
|
|
495
|
+
method: 'memberships list',
|
|
496
|
+
example: "nirvana organizations:memberships list \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
|
|
497
|
+
},
|
|
498
|
+
go: {
|
|
499
|
+
method: 'client.Organizations.Memberships.List',
|
|
500
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/organizations"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Organizations.Memberships.List(\n\t\tcontext.TODO(),\n\t\t"organization_id",\n\t\torganizations.MembershipListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
501
|
+
},
|
|
502
|
+
http: {
|
|
503
|
+
example: 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/memberships \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
504
|
+
},
|
|
505
|
+
typescript: {
|
|
506
|
+
method: 'client.organizations.memberships.list',
|
|
507
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const organizationMembership of client.organizations.memberships.list(\n 'organization_id',\n)) {\n console.log(organizationMembership.id);\n}",
|
|
508
|
+
},
|
|
509
|
+
},
|
|
209
510
|
},
|
|
210
511
|
{
|
|
211
512
|
name: 'get',
|
|
@@ -218,6 +519,52 @@ const EMBEDDED_METHODS = [
|
|
|
218
519
|
params: ['audit_log_id: string;'],
|
|
219
520
|
response: '{ id: string; action: string; actor: { id: string; type: audit_log_type; }; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: { id: string; type: string; }; }',
|
|
220
521
|
markdown: "## get\n\n`client.auditLogs.get(audit_log_id: string): { id: string; action: string; actor: audit_log_actor; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: object; }`\n\n**get** `/v1/audit_logs/{audit_log_id}`\n\nGet an Audit Log entry\n\n### Parameters\n\n- `audit_log_id: string`\n\n### Returns\n\n- `{ id: string; action: string; actor: { id: string; type: audit_log_type; }; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: { id: string; type: string; }; }`\n Audit log entry.\n\n - `id: string`\n - `action: string`\n - `actor: { id: string; type: 'user' | 'api_key'; }`\n - `client_ip: string`\n - `created_at: string`\n - `method: string`\n - `path: string`\n - `status_code: number`\n - `user_agent: string`\n - `target?: { id: string; type: string; }`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst auditLog = await client.auditLogs.get('audit_log_id');\n\nconsole.log(auditLog);\n```",
|
|
522
|
+
perLanguage: {
|
|
523
|
+
cli: {
|
|
524
|
+
method: 'audit_logs get',
|
|
525
|
+
example: "nirvana audit-logs get \\\n --api-key 'My API Key' \\\n --audit-log-id audit_log_id",
|
|
526
|
+
},
|
|
527
|
+
go: {
|
|
528
|
+
method: 'client.AuditLogs.Get',
|
|
529
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tauditLog, err := client.AuditLogs.Get(context.TODO(), "audit_log_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", auditLog.ID)\n}\n',
|
|
530
|
+
},
|
|
531
|
+
http: {
|
|
532
|
+
example: 'curl https://api.nirvanalabs.io/v1/audit_logs/$AUDIT_LOG_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
533
|
+
},
|
|
534
|
+
typescript: {
|
|
535
|
+
method: 'client.auditLogs.get',
|
|
536
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst auditLog = await client.auditLogs.get('audit_log_id');\n\nconsole.log(auditLog.id);",
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
name: 'list',
|
|
542
|
+
endpoint: '/v1/audit_logs',
|
|
543
|
+
httpMethod: 'get',
|
|
544
|
+
summary: 'List Audit Logs',
|
|
545
|
+
description: 'List Audit Log entries for an organization',
|
|
546
|
+
stainlessPath: '(resource) audit_logs > (method) list',
|
|
547
|
+
qualified: 'client.auditLogs.list',
|
|
548
|
+
params: ['cursor?: string;', 'limit?: number;'],
|
|
549
|
+
response: '{ id: string; action: string; actor: { id: string; type: audit_log_type; }; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: { id: string; type: string; }; }',
|
|
550
|
+
markdown: "## list\n\n`client.auditLogs.list(cursor?: string, limit?: number): { id: string; action: string; actor: audit_log_actor; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: object; }`\n\n**get** `/v1/audit_logs`\n\nList Audit Log entries for an organization\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; action: string; actor: { id: string; type: audit_log_type; }; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: { id: string; type: string; }; }`\n Audit log entry.\n\n - `id: string`\n - `action: string`\n - `actor: { id: string; type: 'user' | 'api_key'; }`\n - `client_ip: string`\n - `created_at: string`\n - `method: string`\n - `path: string`\n - `status_code: number`\n - `user_agent: string`\n - `target?: { id: string; type: string; }`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const auditLog of client.auditLogs.list()) {\n console.log(auditLog);\n}\n```",
|
|
551
|
+
perLanguage: {
|
|
552
|
+
cli: {
|
|
553
|
+
method: 'audit_logs list',
|
|
554
|
+
example: "nirvana audit-logs list \\\n --api-key 'My API Key'",
|
|
555
|
+
},
|
|
556
|
+
go: {
|
|
557
|
+
method: 'client.AuditLogs.List',
|
|
558
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/audit_logs"\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\tpage, err := client.AuditLogs.List(context.TODO(), audit_logs.AuditLogListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
559
|
+
},
|
|
560
|
+
http: {
|
|
561
|
+
example: 'curl https://api.nirvanalabs.io/v1/audit_logs \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
562
|
+
},
|
|
563
|
+
typescript: {
|
|
564
|
+
method: 'client.auditLogs.list',
|
|
565
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const auditLog of client.auditLogs.list()) {\n console.log(auditLog.id);\n}",
|
|
566
|
+
},
|
|
567
|
+
},
|
|
221
568
|
},
|
|
222
569
|
{
|
|
223
570
|
name: 'create',
|
|
@@ -230,6 +577,52 @@ const EMBEDDED_METHODS = [
|
|
|
230
577
|
params: ['name: string;', 'tags?: string[];'],
|
|
231
578
|
response: '{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }',
|
|
232
579
|
markdown: "## create\n\n`client.projects.create(name: string, tags?: string[]): { id: string; created_at: string; name: string; resources: project_resources; tags: string[]; updated_at: string; }`\n\n**post** `/v1/projects`\n\nCreate a new project\n\n### Parameters\n\n- `name: string`\n Project name.\n\n- `tags?: string[]`\n Tags to attach to the Project.\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }`\n Project response.\n\n - `id: string`\n - `created_at: string`\n - `name: string`\n - `resources: { blockchain: { rpc_nodes_dedicated: number; rpc_nodes_flex: number; }; cloud: { connect_connections: number; nks_clusters: number; nks_node_pools: number; vms: number; volumes: number; vpcs: number; }; }`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst project = await client.projects.create({ name: 'My Project' });\n\nconsole.log(project);\n```",
|
|
580
|
+
perLanguage: {
|
|
581
|
+
cli: {
|
|
582
|
+
method: 'projects create',
|
|
583
|
+
example: "nirvana projects create \\\n --api-key 'My API Key' \\\n --name 'My Project'",
|
|
584
|
+
},
|
|
585
|
+
go: {
|
|
586
|
+
method: 'client.Projects.New',
|
|
587
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/projects"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tproject, err := client.Projects.New(context.TODO(), projects.ProjectNewParams{\n\t\tName: "My Project",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", project.ID)\n}\n',
|
|
588
|
+
},
|
|
589
|
+
http: {
|
|
590
|
+
example: 'curl https://api.nirvanalabs.io/v1/projects \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Project",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
591
|
+
},
|
|
592
|
+
typescript: {
|
|
593
|
+
method: 'client.projects.create',
|
|
594
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.projects.create({ name: 'My Project' });\n\nconsole.log(project.id);",
|
|
595
|
+
},
|
|
596
|
+
},
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
name: 'get',
|
|
600
|
+
endpoint: '/v1/projects/{project_id}',
|
|
601
|
+
httpMethod: 'get',
|
|
602
|
+
summary: 'Get Project Details',
|
|
603
|
+
description: 'Get details about a project',
|
|
604
|
+
stainlessPath: '(resource) projects > (method) get',
|
|
605
|
+
qualified: 'client.projects.get',
|
|
606
|
+
params: ['project_id: string;'],
|
|
607
|
+
response: '{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }',
|
|
608
|
+
markdown: "## get\n\n`client.projects.get(project_id: string): { id: string; created_at: string; name: string; resources: project_resources; tags: string[]; updated_at: string; }`\n\n**get** `/v1/projects/{project_id}`\n\nGet details about a project\n\n### Parameters\n\n- `project_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }`\n Project response.\n\n - `id: string`\n - `created_at: string`\n - `name: string`\n - `resources: { blockchain: { rpc_nodes_dedicated: number; rpc_nodes_flex: number; }; cloud: { connect_connections: number; nks_clusters: number; nks_node_pools: number; vms: number; volumes: number; vpcs: number; }; }`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst project = await client.projects.get('project_id');\n\nconsole.log(project);\n```",
|
|
609
|
+
perLanguage: {
|
|
610
|
+
cli: {
|
|
611
|
+
method: 'projects get',
|
|
612
|
+
example: "nirvana projects get \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
613
|
+
},
|
|
614
|
+
go: {
|
|
615
|
+
method: 'client.Projects.Get',
|
|
616
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tproject, err := client.Projects.Get(context.TODO(), "project_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", project.ID)\n}\n',
|
|
617
|
+
},
|
|
618
|
+
http: {
|
|
619
|
+
example: 'curl https://api.nirvanalabs.io/v1/projects/$PROJECT_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
620
|
+
},
|
|
621
|
+
typescript: {
|
|
622
|
+
method: 'client.projects.get',
|
|
623
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.projects.get('project_id');\n\nconsole.log(project.id);",
|
|
624
|
+
},
|
|
625
|
+
},
|
|
233
626
|
},
|
|
234
627
|
{
|
|
235
628
|
name: 'update',
|
|
@@ -242,6 +635,51 @@ const EMBEDDED_METHODS = [
|
|
|
242
635
|
params: ['project_id: string;', 'name?: string;', 'tags?: string[];'],
|
|
243
636
|
response: '{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }',
|
|
244
637
|
markdown: "## update\n\n`client.projects.update(project_id: string, name?: string, tags?: string[]): { id: string; created_at: string; name: string; resources: project_resources; tags: string[]; updated_at: string; }`\n\n**patch** `/v1/projects/{project_id}`\n\nUpdate an existing project\n\n### Parameters\n\n- `project_id: string`\n\n- `name?: string`\n Project name.\n\n- `tags?: string[]`\n Tags to attach to the Project.\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }`\n Project response.\n\n - `id: string`\n - `created_at: string`\n - `name: string`\n - `resources: { blockchain: { rpc_nodes_dedicated: number; rpc_nodes_flex: number; }; cloud: { connect_connections: number; nks_clusters: number; nks_node_pools: number; vms: number; volumes: number; vpcs: number; }; }`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst project = await client.projects.update('project_id');\n\nconsole.log(project);\n```",
|
|
638
|
+
perLanguage: {
|
|
639
|
+
cli: {
|
|
640
|
+
method: 'projects update',
|
|
641
|
+
example: "nirvana projects update \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
642
|
+
},
|
|
643
|
+
go: {
|
|
644
|
+
method: 'client.Projects.Update',
|
|
645
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/projects"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tproject, err := client.Projects.Update(\n\t\tcontext.TODO(),\n\t\t"project_id",\n\t\tprojects.ProjectUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", project.ID)\n}\n',
|
|
646
|
+
},
|
|
647
|
+
http: {
|
|
648
|
+
example: 'curl https://api.nirvanalabs.io/v1/projects/$PROJECT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Updated Project",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
649
|
+
},
|
|
650
|
+
typescript: {
|
|
651
|
+
method: 'client.projects.update',
|
|
652
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.projects.update('project_id');\n\nconsole.log(project.id);",
|
|
653
|
+
},
|
|
654
|
+
},
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
name: 'delete',
|
|
658
|
+
endpoint: '/v1/projects/{project_id}',
|
|
659
|
+
httpMethod: 'delete',
|
|
660
|
+
summary: 'Delete Project',
|
|
661
|
+
description: 'Delete a project',
|
|
662
|
+
stainlessPath: '(resource) projects > (method) delete',
|
|
663
|
+
qualified: 'client.projects.delete',
|
|
664
|
+
params: ['project_id: string;'],
|
|
665
|
+
markdown: "## delete\n\n`client.projects.delete(project_id: string): void`\n\n**delete** `/v1/projects/{project_id}`\n\nDelete a project\n\n### Parameters\n\n- `project_id: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.projects.delete('project_id')\n```",
|
|
666
|
+
perLanguage: {
|
|
667
|
+
cli: {
|
|
668
|
+
method: 'projects delete',
|
|
669
|
+
example: "nirvana projects delete \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
670
|
+
},
|
|
671
|
+
go: {
|
|
672
|
+
method: 'client.Projects.Delete',
|
|
673
|
+
example: 'package main\n\nimport (\n\t"context"\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\terr := client.Projects.Delete(context.TODO(), "project_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
674
|
+
},
|
|
675
|
+
http: {
|
|
676
|
+
example: 'curl https://api.nirvanalabs.io/v1/projects/$PROJECT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
677
|
+
},
|
|
678
|
+
typescript: {
|
|
679
|
+
method: 'client.projects.delete',
|
|
680
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.projects.delete('project_id');",
|
|
681
|
+
},
|
|
682
|
+
},
|
|
245
683
|
},
|
|
246
684
|
{
|
|
247
685
|
name: 'list',
|
|
@@ -254,29 +692,52 @@ const EMBEDDED_METHODS = [
|
|
|
254
692
|
params: ['cursor?: string;', 'limit?: number;'],
|
|
255
693
|
response: '{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }',
|
|
256
694
|
markdown: "## list\n\n`client.projects.list(cursor?: string, limit?: number): { id: string; created_at: string; name: string; resources: project_resources; tags: string[]; updated_at: string; }`\n\n**get** `/v1/projects`\n\nList all projects\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }`\n Project response.\n\n - `id: string`\n - `created_at: string`\n - `name: string`\n - `resources: { blockchain: { rpc_nodes_dedicated: number; rpc_nodes_flex: number; }; cloud: { connect_connections: number; nks_clusters: number; nks_node_pools: number; vms: number; volumes: number; vpcs: number; }; }`\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 project of client.projects.list()) {\n console.log(project);\n}\n```",
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
695
|
+
perLanguage: {
|
|
696
|
+
cli: {
|
|
697
|
+
method: 'projects list',
|
|
698
|
+
example: "nirvana projects list \\\n --api-key 'My API Key'",
|
|
699
|
+
},
|
|
700
|
+
go: {
|
|
701
|
+
method: 'client.Projects.List',
|
|
702
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/projects"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Projects.List(context.TODO(), projects.ProjectListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
703
|
+
},
|
|
704
|
+
http: {
|
|
705
|
+
example: 'curl https://api.nirvanalabs.io/v1/projects \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
706
|
+
},
|
|
707
|
+
typescript: {
|
|
708
|
+
method: 'client.projects.list',
|
|
709
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const project of client.projects.list()) {\n console.log(project.id);\n}",
|
|
710
|
+
},
|
|
711
|
+
},
|
|
268
712
|
},
|
|
269
713
|
{
|
|
270
714
|
name: 'get',
|
|
271
|
-
endpoint: '/v1/
|
|
715
|
+
endpoint: '/v1/regions/{name}',
|
|
272
716
|
httpMethod: 'get',
|
|
273
|
-
summary: 'Get
|
|
274
|
-
description: 'Get
|
|
275
|
-
stainlessPath: '(resource)
|
|
276
|
-
qualified: 'client.
|
|
277
|
-
params: ['
|
|
278
|
-
response:
|
|
279
|
-
markdown: "## get\n\n`client.
|
|
717
|
+
summary: 'Get Region',
|
|
718
|
+
description: 'Get a region by name',
|
|
719
|
+
stainlessPath: '(resource) regions > (method) get',
|
|
720
|
+
qualified: 'client.regions.get',
|
|
721
|
+
params: ['name: string;'],
|
|
722
|
+
response: "{ availability: 'live' | 'preview' | 'maintenance' | 'sunset'; compute: { vms: boolean; }; name: string; networking: { connect: boolean; vpcs: boolean; }; nks: { clusters: boolean; }; storage: { abs: boolean; local_nvme: boolean; }; }",
|
|
723
|
+
markdown: "## get\n\n`client.regions.get(name: string): { availability: region_availability; compute: object; name: string; networking: object; nks: object; storage: object; }`\n\n**get** `/v1/regions/{name}`\n\nGet a region by name\n\n### Parameters\n\n- `name: string`\n\n### Returns\n\n- `{ availability: 'live' | 'preview' | 'maintenance' | 'sunset'; compute: { vms: boolean; }; name: string; networking: { connect: boolean; vpcs: boolean; }; nks: { 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: { 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\nconst region = await client.regions.get('us-wdc-1');\n\nconsole.log(region);\n```",
|
|
724
|
+
perLanguage: {
|
|
725
|
+
cli: {
|
|
726
|
+
method: 'regions get',
|
|
727
|
+
example: "nirvana regions get \\\n --api-key 'My API Key' \\\n --name us-wdc-1",
|
|
728
|
+
},
|
|
729
|
+
go: {
|
|
730
|
+
method: 'client.Regions.Get',
|
|
731
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tregion, err := client.Regions.Get(context.TODO(), "us-wdc-1")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", region.Availability)\n}\n',
|
|
732
|
+
},
|
|
733
|
+
http: {
|
|
734
|
+
example: 'curl https://api.nirvanalabs.io/v1/regions/$NAME \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
735
|
+
},
|
|
736
|
+
typescript: {
|
|
737
|
+
method: 'client.regions.get',
|
|
738
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst region = await client.regions.get('us-wdc-1');\n\nconsole.log(region.availability);",
|
|
739
|
+
},
|
|
740
|
+
},
|
|
280
741
|
},
|
|
281
742
|
{
|
|
282
743
|
name: 'list',
|
|
@@ -289,18 +750,52 @@ const EMBEDDED_METHODS = [
|
|
|
289
750
|
params: ['cursor?: string;', 'limit?: number;'],
|
|
290
751
|
response: "{ availability: 'live' | 'preview' | 'maintenance' | 'sunset'; compute: { vms: boolean; }; name: string; networking: { connect: boolean; vpcs: boolean; }; nks: { clusters: boolean; }; storage: { abs: boolean; local_nvme: boolean; }; }",
|
|
291
752
|
markdown: "## list\n\n`client.regions.list(cursor?: string, limit?: number): { availability: region_availability; compute: object; name: string; networking: object; nks: object; storage: object; }`\n\n**get** `/v1/regions`\n\nList all regions\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ availability: 'live' | 'preview' | 'maintenance' | 'sunset'; compute: { vms: boolean; }; name: string; networking: { connect: boolean; vpcs: boolean; }; nks: { 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: { 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```",
|
|
753
|
+
perLanguage: {
|
|
754
|
+
cli: {
|
|
755
|
+
method: 'regions list',
|
|
756
|
+
example: "nirvana regions list \\\n --api-key 'My API Key'",
|
|
757
|
+
},
|
|
758
|
+
go: {
|
|
759
|
+
method: 'client.Regions.List',
|
|
760
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/regions"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Regions.List(context.TODO(), regions.RegionListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
761
|
+
},
|
|
762
|
+
http: {
|
|
763
|
+
example: 'curl https://api.nirvanalabs.io/v1/regions \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
764
|
+
},
|
|
765
|
+
typescript: {
|
|
766
|
+
method: 'client.regions.list',
|
|
767
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const region of client.regions.list()) {\n console.log(region.availability);\n}",
|
|
768
|
+
},
|
|
769
|
+
},
|
|
292
770
|
},
|
|
293
771
|
{
|
|
294
|
-
name: '
|
|
295
|
-
endpoint: '/v1/
|
|
772
|
+
name: 'list',
|
|
773
|
+
endpoint: '/v1/instance_types',
|
|
296
774
|
httpMethod: 'get',
|
|
297
|
-
summary: '
|
|
298
|
-
description: '
|
|
299
|
-
stainlessPath: '(resource)
|
|
300
|
-
qualified: 'client.
|
|
301
|
-
params: ['
|
|
302
|
-
response:
|
|
303
|
-
markdown: "##
|
|
775
|
+
summary: 'List Instance Types',
|
|
776
|
+
description: 'List instance types',
|
|
777
|
+
stainlessPath: '(resource) instance_types > (method) list',
|
|
778
|
+
qualified: 'client.instanceTypes.list',
|
|
779
|
+
params: ['cursor?: string;', 'limit?: number;'],
|
|
780
|
+
response: '{ chipset: string; created_at: string; memory_gi: number; name: string; region: string; updated_at: string; vcpu: number; }',
|
|
781
|
+
markdown: "## list\n\n`client.instanceTypes.list(cursor?: string, limit?: number): { chipset: string; created_at: string; memory_gi: number; name: string; region: string; updated_at: string; vcpu: number; }`\n\n**get** `/v1/instance_types`\n\nList instance types\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ chipset: string; created_at: string; memory_gi: number; name: string; region: string; updated_at: string; vcpu: number; }`\n Instance type.\n\n - `chipset: string`\n - `created_at: string`\n - `memory_gi: number`\n - `name: string`\n - `region: string`\n - `updated_at: string`\n - `vcpu: 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 instanceType of client.instanceTypes.list()) {\n console.log(instanceType);\n}\n```",
|
|
782
|
+
perLanguage: {
|
|
783
|
+
cli: {
|
|
784
|
+
method: 'instance_types list',
|
|
785
|
+
example: "nirvana instance-types list \\\n --api-key 'My API Key'",
|
|
786
|
+
},
|
|
787
|
+
go: {
|
|
788
|
+
method: 'client.InstanceTypes.List',
|
|
789
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/instance_types"\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\tpage, err := client.InstanceTypes.List(context.TODO(), instance_types.InstanceTypeListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
790
|
+
},
|
|
791
|
+
http: {
|
|
792
|
+
example: 'curl https://api.nirvanalabs.io/v1/instance_types \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
793
|
+
},
|
|
794
|
+
typescript: {
|
|
795
|
+
method: 'client.instanceTypes.list',
|
|
796
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const instanceType of client.instanceTypes.list()) {\n console.log(instanceType.chipset);\n}",
|
|
797
|
+
},
|
|
798
|
+
},
|
|
304
799
|
},
|
|
305
800
|
{
|
|
306
801
|
name: 'create',
|
|
@@ -326,6 +821,52 @@ const EMBEDDED_METHODS = [
|
|
|
326
821
|
],
|
|
327
822
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
328
823
|
markdown: "## create\n\n`client.compute.vms.create(boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; }, cpu_config: { vcpu: number; }, memory_config: { size: number; }, name: string, os_image_name: string, project_id: string, public_ip_enabled: boolean, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1', ssh_key: { public_key: string; }, subnet_id: string, data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[], tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/compute/vms`\n\nCreate a VM\n\n### Parameters\n\n- `boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; }`\n Boot volume for the VM.\n - `size: number`\n Size of the Volume in GB.\n - `type: 'nvme' | 'abs'`\n Type of the Volume.\n - `tags?: string[]`\n Tags to attach to the Volume.\n\n- `cpu_config: { vcpu: number; }`\n CPU configuration for the VM.\n - `vcpu: number`\n Number of virtual CPUs.\n\n- `memory_config: { size: number; }`\n Memory configuration for the VM.\n - `size: number`\n Size of the memory in GB.\n\n- `name: string`\n Name of the VM.\n\n- `os_image_name: string`\n Name of the OS Image to use for the VM.\n\n- `project_id: string`\n Project ID to create the VM in.\n\n- `public_ip_enabled: boolean`\n Whether to enable public IP for the VM.\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n Region the resource is in.\n\n- `ssh_key: { public_key: string; }`\n Public SSH key configuration for the VM.\n - `public_key: string`\n Public key to and and use to access the VM.\n\n- `subnet_id: string`\n ID of the subnet to use for the VM.\n\n- `data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[]`\n Data volumes for the VM.\n\n- `tags?: string[]`\n Tags to attach to the VM.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.vms.create({\n boot_volume: { size: 100, type: 'abs' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 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-wdc-1',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation);\n```",
|
|
824
|
+
perLanguage: {
|
|
825
|
+
cli: {
|
|
826
|
+
method: 'vms create',
|
|
827
|
+
example: "nirvana compute:vms create \\\n --api-key 'My API Key' \\\n --boot-volume '{size: 100, type: abs}' \\\n --cpu-config '{vcpu: 2}' \\\n --memory-config '{size: 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 \\\n --region us-wdc-1 \\\n --ssh-key '{public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2}' \\\n --subnet-id 123e4567-e89b-12d3-a456-426614174000",
|
|
828
|
+
},
|
|
829
|
+
go: {
|
|
830
|
+
method: 'client.Compute.VMs.New',
|
|
831
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/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"),\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\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: 2,\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: 2,\n\t\t},\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.RegionNameUsWdc1,\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',
|
|
832
|
+
},
|
|
833
|
+
http: {
|
|
834
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/vms \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "cpu_config": {\n "vcpu": 2\n },\n "memory_config": {\n "size": 2\n },\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-wdc-1",\n "ssh_key": {\n "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n },\n "subnet_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
835
|
+
},
|
|
836
|
+
typescript: {
|
|
837
|
+
method: 'client.compute.vms.create',
|
|
838
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.create({\n boot_volume: { size: 100, type: 'abs' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 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-wdc-1',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);",
|
|
839
|
+
},
|
|
840
|
+
},
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
name: 'get',
|
|
844
|
+
endpoint: '/v1/compute/vms/{vm_id}',
|
|
845
|
+
httpMethod: 'get',
|
|
846
|
+
summary: 'Get VM Details',
|
|
847
|
+
description: 'Get details about a VM',
|
|
848
|
+
stainlessPath: '(resource) compute.vms > (method) get',
|
|
849
|
+
qualified: 'client.compute.vms.get',
|
|
850
|
+
params: ['vm_id: string;'],
|
|
851
|
+
response: "{ id: string; boot_volume_id: string; cpu_config: { vcpu: number; }; created_at: string; data_volume_ids: string[]; memory_config: { size: number; }; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; }",
|
|
852
|
+
markdown: "## get\n\n`client.compute.vms.get(vm_id: string): { id: string; boot_volume_id: string; cpu_config: cpu_config; created_at: string; data_volume_ids: string[]; memory_config: memory_config; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: region_name; status: resource_status; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; }`\n\n**get** `/v1/compute/vms/{vm_id}`\n\nGet details about a VM\n\n### Parameters\n\n- `vm_id: string`\n\n### Returns\n\n- `{ id: string; boot_volume_id: string; cpu_config: { vcpu: number; }; created_at: string; data_volume_ids: string[]; memory_config: { size: number; }; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; }`\n VM details.\n\n - `id: string`\n - `boot_volume_id: string`\n - `cpu_config: { vcpu: number; }`\n - `created_at: string`\n - `data_volume_ids: string[]`\n - `memory_config: { size: number; }`\n - `name: string`\n - `private_ip: string`\n - `project_id: string`\n - `public_ip: string`\n - `public_ip_enabled: boolean`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `subnet_id: string`\n - `tags: string[]`\n - `updated_at: string`\n - `vpc_id: string`\n - `vpc_name: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst vm = await client.compute.vms.get('vm_id');\n\nconsole.log(vm);\n```",
|
|
853
|
+
perLanguage: {
|
|
854
|
+
cli: {
|
|
855
|
+
method: 'vms get',
|
|
856
|
+
example: "nirvana compute:vms get \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
857
|
+
},
|
|
858
|
+
go: {
|
|
859
|
+
method: 'client.Compute.VMs.Get',
|
|
860
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tvm, err := client.Compute.VMs.Get(context.TODO(), "vm_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", vm.ID)\n}\n',
|
|
861
|
+
},
|
|
862
|
+
http: {
|
|
863
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
864
|
+
},
|
|
865
|
+
typescript: {
|
|
866
|
+
method: 'client.compute.vms.get',
|
|
867
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst vm = await client.compute.vms.get('vm_id');\n\nconsole.log(vm.id);",
|
|
868
|
+
},
|
|
869
|
+
},
|
|
329
870
|
},
|
|
330
871
|
{
|
|
331
872
|
name: 'update',
|
|
@@ -345,18 +886,23 @@ const EMBEDDED_METHODS = [
|
|
|
345
886
|
],
|
|
346
887
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
347
888
|
markdown: "## update\n\n`client.compute.vms.update(vm_id: string, cpu_config?: { vcpu: number; }, memory_config?: { size: number; }, name?: string, public_ip_enabled?: boolean, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**patch** `/v1/compute/vms/{vm_id}`\n\nUpdate a VM\n\n### Parameters\n\n- `vm_id: string`\n\n- `cpu_config?: { vcpu: number; }`\n CPU configuration for the VM.\n - `vcpu: number`\n Number of virtual CPUs.\n\n- `memory_config?: { size: number; }`\n Memory configuration for the VM.\n - `size: number`\n Size of the memory in GB.\n\n- `name?: string`\n Name of the VM.\n\n- `public_ip_enabled?: boolean`\n Whether to enable public IP for the VM.\n\n- `tags?: string[]`\n Tags to attach to the VM.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.vms.update('vm_id');\n\nconsole.log(operation);\n```",
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
889
|
+
perLanguage: {
|
|
890
|
+
cli: {
|
|
891
|
+
method: 'vms update',
|
|
892
|
+
example: "nirvana compute:vms update \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
893
|
+
},
|
|
894
|
+
go: {
|
|
895
|
+
method: 'client.Compute.VMs.Update',
|
|
896
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.VMs.Update(\n\t\tcontext.TODO(),\n\t\t"vm_id",\n\t\tcompute.VMUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
897
|
+
},
|
|
898
|
+
http: {
|
|
899
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vm",\n "public_ip_enabled": true,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
900
|
+
},
|
|
901
|
+
typescript: {
|
|
902
|
+
method: 'client.compute.vms.update',
|
|
903
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.update('vm_id');\n\nconsole.log(operation.id);",
|
|
904
|
+
},
|
|
905
|
+
},
|
|
360
906
|
},
|
|
361
907
|
{
|
|
362
908
|
name: 'delete',
|
|
@@ -369,18 +915,52 @@ const EMBEDDED_METHODS = [
|
|
|
369
915
|
params: ['vm_id: string;'],
|
|
370
916
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
371
917
|
markdown: "## delete\n\n`client.compute.vms.delete(vm_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/compute/vms/{vm_id}`\n\nDelete a VM\n\n### Parameters\n\n- `vm_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.vms.delete('vm_id');\n\nconsole.log(operation);\n```",
|
|
918
|
+
perLanguage: {
|
|
919
|
+
cli: {
|
|
920
|
+
method: 'vms delete',
|
|
921
|
+
example: "nirvana compute:vms delete \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
922
|
+
},
|
|
923
|
+
go: {
|
|
924
|
+
method: 'client.Compute.VMs.Delete',
|
|
925
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.VMs.Delete(context.TODO(), "vm_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
926
|
+
},
|
|
927
|
+
http: {
|
|
928
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
929
|
+
},
|
|
930
|
+
typescript: {
|
|
931
|
+
method: 'client.compute.vms.delete',
|
|
932
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.delete('vm_id');\n\nconsole.log(operation.id);",
|
|
933
|
+
},
|
|
934
|
+
},
|
|
372
935
|
},
|
|
373
936
|
{
|
|
374
|
-
name: '
|
|
375
|
-
endpoint: '/v1/compute/vms
|
|
937
|
+
name: 'list',
|
|
938
|
+
endpoint: '/v1/compute/vms',
|
|
376
939
|
httpMethod: 'get',
|
|
377
|
-
summary: '
|
|
378
|
-
description: '
|
|
379
|
-
stainlessPath: '(resource) compute.vms > (method)
|
|
380
|
-
qualified: 'client.compute.vms.
|
|
381
|
-
params: ['
|
|
940
|
+
summary: 'List VMs',
|
|
941
|
+
description: 'List all VMs',
|
|
942
|
+
stainlessPath: '(resource) compute.vms > (method) list',
|
|
943
|
+
qualified: 'client.compute.vms.list',
|
|
944
|
+
params: ['project_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
382
945
|
response: "{ id: string; boot_volume_id: string; cpu_config: { vcpu: number; }; created_at: string; data_volume_ids: string[]; memory_config: { size: number; }; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; }",
|
|
383
|
-
markdown: "##
|
|
946
|
+
markdown: "## list\n\n`client.compute.vms.list(project_id: string, cursor?: string, limit?: number): { id: string; boot_volume_id: string; cpu_config: cpu_config; created_at: string; data_volume_ids: string[]; memory_config: memory_config; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: region_name; status: resource_status; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; }`\n\n**get** `/v1/compute/vms`\n\nList all VMs\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; boot_volume_id: string; cpu_config: { vcpu: number; }; created_at: string; data_volume_ids: string[]; memory_config: { size: number; }; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; }`\n VM details.\n\n - `id: string`\n - `boot_volume_id: string`\n - `cpu_config: { vcpu: number; }`\n - `created_at: string`\n - `data_volume_ids: string[]`\n - `memory_config: { size: number; }`\n - `name: string`\n - `private_ip: string`\n - `project_id: string`\n - `public_ip: string`\n - `public_ip_enabled: boolean`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `subnet_id: string`\n - `tags: string[]`\n - `updated_at: string`\n - `vpc_id: string`\n - `vpc_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 vm of client.compute.vms.list({ project_id: 'project_id' })) {\n console.log(vm);\n}\n```",
|
|
947
|
+
perLanguage: {
|
|
948
|
+
cli: {
|
|
949
|
+
method: 'vms list',
|
|
950
|
+
example: "nirvana compute:vms list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
951
|
+
},
|
|
952
|
+
go: {
|
|
953
|
+
method: 'client.Compute.VMs.List',
|
|
954
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\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\tpage, err := client.Compute.VMs.List(context.TODO(), compute.VMListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
955
|
+
},
|
|
956
|
+
http: {
|
|
957
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/vms \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
958
|
+
},
|
|
959
|
+
typescript: {
|
|
960
|
+
method: 'client.compute.vms.list',
|
|
961
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const vm of client.compute.vms.list({ project_id: 'project_id' })) {\n console.log(vm.id);\n}",
|
|
962
|
+
},
|
|
963
|
+
},
|
|
384
964
|
},
|
|
385
965
|
{
|
|
386
966
|
name: 'restart',
|
|
@@ -393,6 +973,23 @@ const EMBEDDED_METHODS = [
|
|
|
393
973
|
params: ['vm_id: string;'],
|
|
394
974
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
395
975
|
markdown: "## restart\n\n`client.compute.vms.restart(vm_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/compute/vms/{vm_id}/restart`\n\nRestart a VM\n\n### Parameters\n\n- `vm_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.vms.restart('vm_id');\n\nconsole.log(operation);\n```",
|
|
976
|
+
perLanguage: {
|
|
977
|
+
cli: {
|
|
978
|
+
method: 'vms restart',
|
|
979
|
+
example: "nirvana compute:vms restart \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
980
|
+
},
|
|
981
|
+
go: {
|
|
982
|
+
method: 'client.Compute.VMs.Restart',
|
|
983
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.VMs.Restart(context.TODO(), "vm_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
984
|
+
},
|
|
985
|
+
http: {
|
|
986
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/restart \\\n -X POST \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
987
|
+
},
|
|
988
|
+
typescript: {
|
|
989
|
+
method: 'client.compute.vms.restart',
|
|
990
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.restart('vm_id');\n\nconsole.log(operation.id);",
|
|
991
|
+
},
|
|
992
|
+
},
|
|
396
993
|
},
|
|
397
994
|
{
|
|
398
995
|
name: 'create',
|
|
@@ -417,6 +1014,23 @@ const EMBEDDED_METHODS = [
|
|
|
417
1014
|
'tags?: string[];',
|
|
418
1015
|
],
|
|
419
1016
|
markdown: "## create\n\n`client.compute.vms.availability.create(boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; }, cpu_config: { vcpu: number; }, memory_config: { size: number; }, name: string, os_image_name: string, project_id: string, public_ip_enabled: boolean, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1', ssh_key: { public_key: string; }, subnet_id: string, data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[], tags?: string[]): void`\n\n**post** `/v1/compute/vms/availability`\n\nCheck VM Create Availability\n\n### Parameters\n\n- `boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; }`\n Boot volume for the VM.\n - `size: number`\n Size of the Volume in GB.\n - `type: 'nvme' | 'abs'`\n Type of the Volume.\n - `tags?: string[]`\n Tags to attach to the Volume.\n\n- `cpu_config: { vcpu: number; }`\n CPU configuration for the VM.\n - `vcpu: number`\n Number of virtual CPUs.\n\n- `memory_config: { size: number; }`\n Memory configuration for the VM.\n - `size: number`\n Size of the memory in GB.\n\n- `name: string`\n Name of the VM.\n\n- `os_image_name: string`\n Name of the OS Image to use for the VM.\n\n- `project_id: string`\n Project ID to create the VM in.\n\n- `public_ip_enabled: boolean`\n Whether to enable public IP for the VM.\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n Region the resource is in.\n\n- `ssh_key: { public_key: string; }`\n Public SSH key configuration for the VM.\n - `public_key: string`\n Public key to and and use to access the VM.\n\n- `subnet_id: string`\n ID of the subnet to use for the VM.\n\n- `data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[]`\n Data volumes for the VM.\n\n- `tags?: string[]`\n Tags to attach to the VM.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.compute.vms.availability.create({\n boot_volume: { size: 100, type: 'abs' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 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-wdc-1',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n})\n```",
|
|
1017
|
+
perLanguage: {
|
|
1018
|
+
cli: {
|
|
1019
|
+
method: 'availability create',
|
|
1020
|
+
example: "nirvana compute:vms:availability create \\\n --api-key 'My API Key' \\\n --boot-volume '{size: 100, type: abs}' \\\n --cpu-config '{vcpu: 2}' \\\n --memory-config '{size: 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 \\\n --region us-wdc-1 \\\n --ssh-key '{public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2}' \\\n --subnet-id 123e4567-e89b-12d3-a456-426614174000",
|
|
1021
|
+
},
|
|
1022
|
+
go: {
|
|
1023
|
+
method: 'client.Compute.VMs.Availability.New',
|
|
1024
|
+
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/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"),\n\t)\n\terr := client.Compute.VMs.Availability.New(context.TODO(), compute.VMAvailabilityNewParams{\n\t\tBootVolume: compute.VMAvailabilityNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: 2,\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: 2,\n\t\t},\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.RegionNameUsWdc1,\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}\n',
|
|
1025
|
+
},
|
|
1026
|
+
http: {
|
|
1027
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "cpu_config": {\n "vcpu": 2\n },\n "memory_config": {\n "size": 2\n },\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-wdc-1",\n "ssh_key": {\n "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n },\n "subnet_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1028
|
+
},
|
|
1029
|
+
typescript: {
|
|
1030
|
+
method: 'client.compute.vms.availability.create',
|
|
1031
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.vms.availability.create({\n boot_volume: { size: 100, type: 'abs' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 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-wdc-1',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});",
|
|
1032
|
+
},
|
|
1033
|
+
},
|
|
420
1034
|
},
|
|
421
1035
|
{
|
|
422
1036
|
name: 'update',
|
|
@@ -435,6 +1049,23 @@ const EMBEDDED_METHODS = [
|
|
|
435
1049
|
'tags?: string[];',
|
|
436
1050
|
],
|
|
437
1051
|
markdown: "## update\n\n`client.compute.vms.availability.update(vm_id: string, cpu_config?: { vcpu: number; }, memory_config?: { size: number; }, name?: string, public_ip_enabled?: boolean, tags?: string[]): void`\n\n**patch** `/v1/compute/vms/{vm_id}/availability`\n\nCheck VM Update Availability\n\n### Parameters\n\n- `vm_id: string`\n\n- `cpu_config?: { vcpu: number; }`\n CPU configuration for the VM.\n - `vcpu: number`\n Number of virtual CPUs.\n\n- `memory_config?: { size: number; }`\n Memory configuration for the VM.\n - `size: number`\n Size of the memory in GB.\n\n- `name?: string`\n Name of the VM.\n\n- `public_ip_enabled?: boolean`\n Whether to enable public IP for the VM.\n\n- `tags?: string[]`\n Tags to attach to the VM.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.compute.vms.availability.update('vm_id')\n```",
|
|
1052
|
+
perLanguage: {
|
|
1053
|
+
cli: {
|
|
1054
|
+
method: 'availability update',
|
|
1055
|
+
example: "nirvana compute:vms:availability update \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
1056
|
+
},
|
|
1057
|
+
go: {
|
|
1058
|
+
method: 'client.Compute.VMs.Availability.Update',
|
|
1059
|
+
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Compute.VMs.Availability.Update(\n\t\tcontext.TODO(),\n\t\t"vm_id",\n\t\tcompute.VMAvailabilityUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
1060
|
+
},
|
|
1061
|
+
http: {
|
|
1062
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vm",\n "public_ip_enabled": true,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1063
|
+
},
|
|
1064
|
+
typescript: {
|
|
1065
|
+
method: 'client.compute.vms.availability.update',
|
|
1066
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.vms.availability.update('vm_id');",
|
|
1067
|
+
},
|
|
1068
|
+
},
|
|
438
1069
|
},
|
|
439
1070
|
{
|
|
440
1071
|
name: 'list',
|
|
@@ -447,6 +1078,23 @@ const EMBEDDED_METHODS = [
|
|
|
447
1078
|
params: ['vm_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
448
1079
|
response: "{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; type: 'nvme' | 'abs'; updated_at: string; vm_id: string; vm_name: string; }",
|
|
449
1080
|
markdown: "## list\n\n`client.compute.vms.volumes.list(vm_id: string, cursor?: string, limit?: number): { id: string; created_at: string; kind: volume_kind; name: string; project_id: string; region: region_name; size: number; status: resource_status; tags: string[]; type: volume_type; updated_at: string; vm_id: string; vm_name: string; }`\n\n**get** `/v1/compute/vms/{vm_id}/volumes`\n\nList VM's Volumes\n\n### Parameters\n\n- `vm_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; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; type: 'nvme' | 'abs'; updated_at: string; vm_id: string; vm_name: string; }`\n Volume details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'boot' | 'data'`\n - `name: string`\n - `project_id: string`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `tags: string[]`\n - `type: 'nvme' | 'abs'`\n - `updated_at: string`\n - `vm_id: string`\n - `vm_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 volume of client.compute.vms.volumes.list('vm_id')) {\n console.log(volume);\n}\n```",
|
|
1081
|
+
perLanguage: {
|
|
1082
|
+
cli: {
|
|
1083
|
+
method: 'volumes list',
|
|
1084
|
+
example: "nirvana compute:vms:volumes list \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
1085
|
+
},
|
|
1086
|
+
go: {
|
|
1087
|
+
method: 'client.Compute.VMs.Volumes.List',
|
|
1088
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\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\tpage, err := client.Compute.VMs.Volumes.List(\n\t\tcontext.TODO(),\n\t\t"vm_id",\n\t\tcompute.VMVolumeListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
1089
|
+
},
|
|
1090
|
+
http: {
|
|
1091
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1092
|
+
},
|
|
1093
|
+
typescript: {
|
|
1094
|
+
method: 'client.compute.vms.volumes.list',
|
|
1095
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const volume of client.compute.vms.volumes.list('vm_id')) {\n console.log(volume.id);\n}",
|
|
1096
|
+
},
|
|
1097
|
+
},
|
|
450
1098
|
},
|
|
451
1099
|
{
|
|
452
1100
|
name: 'list',
|
|
@@ -459,6 +1107,23 @@ const EMBEDDED_METHODS = [
|
|
|
459
1107
|
params: ['cursor?: string;', 'limit?: number;'],
|
|
460
1108
|
response: '{ created_at: string; display_name: string; name: string; }',
|
|
461
1109
|
markdown: "## list\n\n`client.compute.vms.osImages.list(cursor?: string, limit?: number): { created_at: string; display_name: string; name: string; }`\n\n**get** `/v1/compute/vms/os_images`\n\nList all OS Images\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ created_at: string; display_name: string; name: string; }`\n OS Image 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 osImage of client.compute.vms.osImages.list()) {\n console.log(osImage);\n}\n```",
|
|
1110
|
+
perLanguage: {
|
|
1111
|
+
cli: {
|
|
1112
|
+
method: 'os_images list',
|
|
1113
|
+
example: "nirvana compute:vms:os-images list \\\n --api-key 'My API Key'",
|
|
1114
|
+
},
|
|
1115
|
+
go: {
|
|
1116
|
+
method: 'client.Compute.VMs.OSImages.List',
|
|
1117
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\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\tpage, err := client.Compute.VMs.OSImages.List(context.TODO(), compute.VMOSImageListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
1118
|
+
},
|
|
1119
|
+
http: {
|
|
1120
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/os_images \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1121
|
+
},
|
|
1122
|
+
typescript: {
|
|
1123
|
+
method: 'client.compute.vms.osImages.list',
|
|
1124
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const osImage of client.compute.vms.osImages.list()) {\n console.log(osImage.created_at);\n}",
|
|
1125
|
+
},
|
|
1126
|
+
},
|
|
462
1127
|
},
|
|
463
1128
|
{
|
|
464
1129
|
name: 'create',
|
|
@@ -479,6 +1144,52 @@ const EMBEDDED_METHODS = [
|
|
|
479
1144
|
],
|
|
480
1145
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
481
1146
|
markdown: "## create\n\n`client.compute.volumes.create(name: string, project_id: string, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1', size: number, type: 'nvme' | 'abs', tags?: string[], vm_id?: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/compute/volumes`\n\nCreate a Volume. Only data volumes can be created.\n\n### Parameters\n\n- `name: string`\n Name of the Volume.\n\n- `project_id: string`\n Project ID the Volume belongs to.\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n Region the resource is in.\n\n- `size: number`\n Size of the Volume in GB.\n\n- `type: 'nvme' | 'abs'`\n Type of the Volume.\n\n- `tags?: string[]`\n Tags to attach to the Volume.\n\n- `vm_id?: string`\n ID of the VM the Volume is attached to.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.volumes.create({\n name: 'my-data-volume',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-wdc-1',\n size: 100,\n type: 'abs',\n});\n\nconsole.log(operation);\n```",
|
|
1147
|
+
perLanguage: {
|
|
1148
|
+
cli: {
|
|
1149
|
+
method: 'volumes create',
|
|
1150
|
+
example: "nirvana compute:volumes create \\\n --api-key 'My API Key' \\\n --name my-data-volume \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-wdc-1 \\\n --size 100 \\\n --type abs",
|
|
1151
|
+
},
|
|
1152
|
+
go: {
|
|
1153
|
+
method: 'client.Compute.Volumes.New',
|
|
1154
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/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"),\n\t)\n\toperation, err := client.Compute.Volumes.New(context.TODO(), compute.VolumeNewParams{\n\t\tName: "my-data-volume",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tRegion: shared.RegionNameUsWdc1,\n\t\tSize: 100,\n\t\tType: compute.VolumeTypeABS,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1155
|
+
},
|
|
1156
|
+
http: {
|
|
1157
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-wdc-1",\n "size": 100,\n "type": "abs",\n "tags": [\n "production",\n "ethereum"\n ],\n "vm_id": "123e4567-e89b-12d3-a456-426614174000"\n }\'',
|
|
1158
|
+
},
|
|
1159
|
+
typescript: {
|
|
1160
|
+
method: 'client.compute.volumes.create',
|
|
1161
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.create({\n name: 'my-data-volume',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-wdc-1',\n size: 100,\n type: 'abs',\n});\n\nconsole.log(operation.id);",
|
|
1162
|
+
},
|
|
1163
|
+
},
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
name: 'get',
|
|
1167
|
+
endpoint: '/v1/compute/volumes/{volume_id}',
|
|
1168
|
+
httpMethod: 'get',
|
|
1169
|
+
summary: 'Get Volume',
|
|
1170
|
+
description: 'Get a Volume.',
|
|
1171
|
+
stainlessPath: '(resource) compute.volumes > (method) get',
|
|
1172
|
+
qualified: 'client.compute.volumes.get',
|
|
1173
|
+
params: ['volume_id: string;'],
|
|
1174
|
+
response: "{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; type: 'nvme' | 'abs'; updated_at: string; vm_id: string; vm_name: string; }",
|
|
1175
|
+
markdown: "## get\n\n`client.compute.volumes.get(volume_id: string): { id: string; created_at: string; kind: volume_kind; name: string; project_id: string; region: region_name; size: number; status: resource_status; tags: string[]; type: volume_type; updated_at: string; vm_id: string; vm_name: string; }`\n\n**get** `/v1/compute/volumes/{volume_id}`\n\nGet a Volume.\n\n### Parameters\n\n- `volume_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; type: 'nvme' | 'abs'; updated_at: string; vm_id: string; vm_name: string; }`\n Volume details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'boot' | 'data'`\n - `name: string`\n - `project_id: string`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `tags: string[]`\n - `type: 'nvme' | 'abs'`\n - `updated_at: string`\n - `vm_id: string`\n - `vm_name: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst volume = await client.compute.volumes.get('volume_id');\n\nconsole.log(volume);\n```",
|
|
1176
|
+
perLanguage: {
|
|
1177
|
+
cli: {
|
|
1178
|
+
method: 'volumes get',
|
|
1179
|
+
example: "nirvana compute:volumes get \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
|
|
1180
|
+
},
|
|
1181
|
+
go: {
|
|
1182
|
+
method: 'client.Compute.Volumes.Get',
|
|
1183
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tvolume, err := client.Compute.Volumes.Get(context.TODO(), "volume_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", volume.ID)\n}\n',
|
|
1184
|
+
},
|
|
1185
|
+
http: {
|
|
1186
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1187
|
+
},
|
|
1188
|
+
typescript: {
|
|
1189
|
+
method: 'client.compute.volumes.get',
|
|
1190
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst volume = await client.compute.volumes.get('volume_id');\n\nconsole.log(volume.id);",
|
|
1191
|
+
},
|
|
1192
|
+
},
|
|
482
1193
|
},
|
|
483
1194
|
{
|
|
484
1195
|
name: 'update',
|
|
@@ -491,18 +1202,23 @@ const EMBEDDED_METHODS = [
|
|
|
491
1202
|
params: ['volume_id: string;', 'name?: string;', 'size?: number;', 'tags?: string[];'],
|
|
492
1203
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
493
1204
|
markdown: "## update\n\n`client.compute.volumes.update(volume_id: string, name?: string, size?: number, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**patch** `/v1/compute/volumes/{volume_id}`\n\nUpdate a Volume. Boot or data volumes can be updated.\n\n### Parameters\n\n- `volume_id: string`\n\n- `name?: string`\n Name of the Volume.\n\n- `size?: number`\n Size of the Volume in GB.\n\n- `tags?: string[]`\n Tags to attach to the Volume.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.volumes.update('volume_id');\n\nconsole.log(operation);\n```",
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
1205
|
+
perLanguage: {
|
|
1206
|
+
cli: {
|
|
1207
|
+
method: 'volumes update',
|
|
1208
|
+
example: "nirvana compute:volumes update \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
|
|
1209
|
+
},
|
|
1210
|
+
go: {
|
|
1211
|
+
method: 'client.Compute.Volumes.Update',
|
|
1212
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.Volumes.Update(\n\t\tcontext.TODO(),\n\t\t"volume_id",\n\t\tcompute.VolumeUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1213
|
+
},
|
|
1214
|
+
http: {
|
|
1215
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "size": 100,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1216
|
+
},
|
|
1217
|
+
typescript: {
|
|
1218
|
+
method: 'client.compute.volumes.update',
|
|
1219
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.update('volume_id');\n\nconsole.log(operation.id);",
|
|
1220
|
+
},
|
|
1221
|
+
},
|
|
506
1222
|
},
|
|
507
1223
|
{
|
|
508
1224
|
name: 'delete',
|
|
@@ -515,6 +1231,52 @@ const EMBEDDED_METHODS = [
|
|
|
515
1231
|
params: ['volume_id: string;'],
|
|
516
1232
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
517
1233
|
markdown: "## delete\n\n`client.compute.volumes.delete(volume_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/compute/volumes/{volume_id}`\n\nDelete a Volume. Boot or data volumes can be deleted.\n\n### Parameters\n\n- `volume_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.volumes.delete('volume_id');\n\nconsole.log(operation);\n```",
|
|
1234
|
+
perLanguage: {
|
|
1235
|
+
cli: {
|
|
1236
|
+
method: 'volumes delete',
|
|
1237
|
+
example: "nirvana compute:volumes delete \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
|
|
1238
|
+
},
|
|
1239
|
+
go: {
|
|
1240
|
+
method: 'client.Compute.Volumes.Delete',
|
|
1241
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.Volumes.Delete(context.TODO(), "volume_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1242
|
+
},
|
|
1243
|
+
http: {
|
|
1244
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1245
|
+
},
|
|
1246
|
+
typescript: {
|
|
1247
|
+
method: 'client.compute.volumes.delete',
|
|
1248
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.delete('volume_id');\n\nconsole.log(operation.id);",
|
|
1249
|
+
},
|
|
1250
|
+
},
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
name: 'list',
|
|
1254
|
+
endpoint: '/v1/compute/volumes',
|
|
1255
|
+
httpMethod: 'get',
|
|
1256
|
+
summary: 'List Volumes',
|
|
1257
|
+
description: 'List all volumes',
|
|
1258
|
+
stainlessPath: '(resource) compute.volumes > (method) list',
|
|
1259
|
+
qualified: 'client.compute.volumes.list',
|
|
1260
|
+
params: ['project_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
1261
|
+
response: "{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; type: 'nvme' | 'abs'; updated_at: string; vm_id: string; vm_name: string; }",
|
|
1262
|
+
markdown: "## list\n\n`client.compute.volumes.list(project_id: string, cursor?: string, limit?: number): { id: string; created_at: string; kind: volume_kind; name: string; project_id: string; region: region_name; size: number; status: resource_status; tags: string[]; type: volume_type; updated_at: string; vm_id: string; vm_name: string; }`\n\n**get** `/v1/compute/volumes`\n\nList all volumes\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; created_at: string; kind: 'boot' | 'data'; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; type: 'nvme' | 'abs'; updated_at: string; vm_id: string; vm_name: string; }`\n Volume details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'boot' | 'data'`\n - `name: string`\n - `project_id: string`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `tags: string[]`\n - `type: 'nvme' | 'abs'`\n - `updated_at: string`\n - `vm_id: string`\n - `vm_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 volume of client.compute.volumes.list({ project_id: 'project_id' })) {\n console.log(volume);\n}\n```",
|
|
1263
|
+
perLanguage: {
|
|
1264
|
+
cli: {
|
|
1265
|
+
method: 'volumes list',
|
|
1266
|
+
example: "nirvana compute:volumes list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
1267
|
+
},
|
|
1268
|
+
go: {
|
|
1269
|
+
method: 'client.Compute.Volumes.List',
|
|
1270
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\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\tpage, err := client.Compute.Volumes.List(context.TODO(), compute.VolumeListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
1271
|
+
},
|
|
1272
|
+
http: {
|
|
1273
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1274
|
+
},
|
|
1275
|
+
typescript: {
|
|
1276
|
+
method: 'client.compute.volumes.list',
|
|
1277
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const volume of client.compute.volumes.list({ project_id: 'project_id' })) {\n console.log(volume.id);\n}",
|
|
1278
|
+
},
|
|
1279
|
+
},
|
|
518
1280
|
},
|
|
519
1281
|
{
|
|
520
1282
|
name: 'attach',
|
|
@@ -527,6 +1289,23 @@ const EMBEDDED_METHODS = [
|
|
|
527
1289
|
params: ['volume_id: string;', 'vm_id: string;'],
|
|
528
1290
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
529
1291
|
markdown: "## attach\n\n`client.compute.volumes.attach(volume_id: string, vm_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/compute/volumes/{volume_id}/attach`\n\nAttach a volume to a VM\n\n### Parameters\n\n- `volume_id: string`\n\n- `vm_id: string`\n ID of the VM to attach the Volume to.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.volumes.attach('volume_id', { vm_id: '123e4567-e89b-12d3-a456-426614174000' });\n\nconsole.log(operation);\n```",
|
|
1292
|
+
perLanguage: {
|
|
1293
|
+
cli: {
|
|
1294
|
+
method: 'volumes attach',
|
|
1295
|
+
example: "nirvana compute:volumes attach \\\n --api-key 'My API Key' \\\n --volume-id volume_id \\\n --vm-id 123e4567-e89b-12d3-a456-426614174000",
|
|
1296
|
+
},
|
|
1297
|
+
go: {
|
|
1298
|
+
method: 'client.Compute.Volumes.Attach',
|
|
1299
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.Volumes.Attach(\n\t\tcontext.TODO(),\n\t\t"volume_id",\n\t\tcompute.VolumeAttachParams{\n\t\t\tVMID: "123e4567-e89b-12d3-a456-426614174000",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1300
|
+
},
|
|
1301
|
+
http: {
|
|
1302
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID/attach \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "vm_id": "123e4567-e89b-12d3-a456-426614174000"\n }\'',
|
|
1303
|
+
},
|
|
1304
|
+
typescript: {
|
|
1305
|
+
method: 'client.compute.volumes.attach',
|
|
1306
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.attach('volume_id', {\n vm_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);",
|
|
1307
|
+
},
|
|
1308
|
+
},
|
|
530
1309
|
},
|
|
531
1310
|
{
|
|
532
1311
|
name: 'detach',
|
|
@@ -539,18 +1318,23 @@ const EMBEDDED_METHODS = [
|
|
|
539
1318
|
params: ['volume_id: string;'],
|
|
540
1319
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
541
1320
|
markdown: "## detach\n\n`client.compute.volumes.detach(volume_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/compute/volumes/{volume_id}/detach`\n\nDetach a volume from a VM\n\n### Parameters\n\n- `volume_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.volumes.detach('volume_id');\n\nconsole.log(operation);\n```",
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
1321
|
+
perLanguage: {
|
|
1322
|
+
cli: {
|
|
1323
|
+
method: 'volumes detach',
|
|
1324
|
+
example: "nirvana compute:volumes detach \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
|
|
1325
|
+
},
|
|
1326
|
+
go: {
|
|
1327
|
+
method: 'client.Compute.Volumes.Detach',
|
|
1328
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.Volumes.Detach(context.TODO(), "volume_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1329
|
+
},
|
|
1330
|
+
http: {
|
|
1331
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID/detach \\\n -X POST \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1332
|
+
},
|
|
1333
|
+
typescript: {
|
|
1334
|
+
method: 'client.compute.volumes.detach',
|
|
1335
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.detach('volume_id');\n\nconsole.log(operation.id);",
|
|
1336
|
+
},
|
|
1337
|
+
},
|
|
554
1338
|
},
|
|
555
1339
|
{
|
|
556
1340
|
name: 'create',
|
|
@@ -570,6 +1354,23 @@ const EMBEDDED_METHODS = [
|
|
|
570
1354
|
'vm_id?: string;',
|
|
571
1355
|
],
|
|
572
1356
|
markdown: "## create\n\n`client.compute.volumes.availability.create(name: string, project_id: string, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1', size: number, type: 'nvme' | 'abs', tags?: string[], vm_id?: string): void`\n\n**post** `/v1/compute/volumes/availability`\n\nCheck Volume Create Availability\n\n### Parameters\n\n- `name: string`\n Name of the Volume.\n\n- `project_id: string`\n Project ID the Volume belongs to.\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n Region the resource is in.\n\n- `size: number`\n Size of the Volume in GB.\n\n- `type: 'nvme' | 'abs'`\n Type of the Volume.\n\n- `tags?: string[]`\n Tags to attach to the Volume.\n\n- `vm_id?: string`\n ID of the VM the Volume is attached to.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.compute.volumes.availability.create({\n name: 'my-data-volume',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-wdc-1',\n size: 100,\n type: 'abs',\n})\n```",
|
|
1357
|
+
perLanguage: {
|
|
1358
|
+
cli: {
|
|
1359
|
+
method: 'availability create',
|
|
1360
|
+
example: "nirvana compute:volumes:availability create \\\n --api-key 'My API Key' \\\n --name my-data-volume \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-wdc-1 \\\n --size 100 \\\n --type abs",
|
|
1361
|
+
},
|
|
1362
|
+
go: {
|
|
1363
|
+
method: 'client.Compute.Volumes.Availability.New',
|
|
1364
|
+
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/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"),\n\t)\n\terr := client.Compute.Volumes.Availability.New(context.TODO(), compute.VolumeAvailabilityNewParams{\n\t\tName: "my-data-volume",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tRegion: shared.RegionNameUsWdc1,\n\t\tSize: 100,\n\t\tType: compute.VolumeTypeABS,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
1365
|
+
},
|
|
1366
|
+
http: {
|
|
1367
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-wdc-1",\n "size": 100,\n "type": "abs",\n "tags": [\n "production",\n "ethereum"\n ],\n "vm_id": "123e4567-e89b-12d3-a456-426614174000"\n }\'',
|
|
1368
|
+
},
|
|
1369
|
+
typescript: {
|
|
1370
|
+
method: 'client.compute.volumes.availability.create',
|
|
1371
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.volumes.availability.create({\n name: 'my-data-volume',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-wdc-1',\n size: 100,\n type: 'abs',\n});",
|
|
1372
|
+
},
|
|
1373
|
+
},
|
|
573
1374
|
},
|
|
574
1375
|
{
|
|
575
1376
|
name: 'update',
|
|
@@ -581,6 +1382,23 @@ const EMBEDDED_METHODS = [
|
|
|
581
1382
|
qualified: 'client.compute.volumes.availability.update',
|
|
582
1383
|
params: ['volume_id: string;', 'name?: string;', 'size?: number;', 'tags?: string[];'],
|
|
583
1384
|
markdown: "## update\n\n`client.compute.volumes.availability.update(volume_id: string, name?: string, size?: number, tags?: string[]): void`\n\n**patch** `/v1/compute/volumes/{volume_id}/availability`\n\nCheck Volume Update Availability\n\n### Parameters\n\n- `volume_id: string`\n\n- `name?: string`\n Name of the Volume.\n\n- `size?: number`\n Size of the Volume in GB.\n\n- `tags?: string[]`\n Tags to attach to the Volume.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.compute.volumes.availability.update('volume_id')\n```",
|
|
1385
|
+
perLanguage: {
|
|
1386
|
+
cli: {
|
|
1387
|
+
method: 'availability update',
|
|
1388
|
+
example: "nirvana compute:volumes:availability update \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
|
|
1389
|
+
},
|
|
1390
|
+
go: {
|
|
1391
|
+
method: 'client.Compute.Volumes.Availability.Update',
|
|
1392
|
+
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Compute.Volumes.Availability.Update(\n\t\tcontext.TODO(),\n\t\t"volume_id",\n\t\tcompute.VolumeAvailabilityUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
1393
|
+
},
|
|
1394
|
+
http: {
|
|
1395
|
+
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "size": 100,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1396
|
+
},
|
|
1397
|
+
typescript: {
|
|
1398
|
+
method: 'client.compute.volumes.availability.update',
|
|
1399
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.volumes.availability.update('volume_id');",
|
|
1400
|
+
},
|
|
1401
|
+
},
|
|
584
1402
|
},
|
|
585
1403
|
{
|
|
586
1404
|
name: 'create',
|
|
@@ -599,6 +1417,52 @@ const EMBEDDED_METHODS = [
|
|
|
599
1417
|
],
|
|
600
1418
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
601
1419
|
markdown: "## create\n\n`client.networking.vpcs.create(name: string, project_id: string, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1', subnet_name: string, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/networking/vpcs`\n\nCreate a VPC\n\n### Parameters\n\n- `name: string`\n Name of the VPC.\n\n- `project_id: string`\n Project ID the VPC belongs to.\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n Region the resource is in.\n\n- `subnet_name: string`\n Name of the subnet to create.\n\n- `tags?: string[]`\n Tags to attach to the VPC.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.vpcs.create({\n name: 'my-vpc',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-wdc-1',\n subnet_name: 'my-subnet',\n});\n\nconsole.log(operation);\n```",
|
|
1420
|
+
perLanguage: {
|
|
1421
|
+
cli: {
|
|
1422
|
+
method: 'vpcs create',
|
|
1423
|
+
example: "nirvana networking:vpcs create \\\n --api-key 'My API Key' \\\n --name my-vpc \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-wdc-1 \\\n --subnet-name my-subnet",
|
|
1424
|
+
},
|
|
1425
|
+
go: {
|
|
1426
|
+
method: 'client.Networking.VPCs.New',
|
|
1427
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\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"),\n\t)\n\toperation, err := client.Networking.VPCs.New(context.TODO(), networking.VPCNewParams{\n\t\tName: "my-vpc",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tRegion: shared.RegionNameUsWdc1,\n\t\tSubnetName: "my-subnet",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1428
|
+
},
|
|
1429
|
+
http: {
|
|
1430
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-wdc-1",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1431
|
+
},
|
|
1432
|
+
typescript: {
|
|
1433
|
+
method: 'client.networking.vpcs.create',
|
|
1434
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.vpcs.create({\n name: 'my-vpc',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-wdc-1',\n subnet_name: 'my-subnet',\n});\n\nconsole.log(operation.id);",
|
|
1435
|
+
},
|
|
1436
|
+
},
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
name: 'get',
|
|
1440
|
+
endpoint: '/v1/networking/vpcs/{vpc_id}',
|
|
1441
|
+
httpMethod: 'get',
|
|
1442
|
+
summary: 'Get VPC Details',
|
|
1443
|
+
description: 'Get details about a VPC',
|
|
1444
|
+
stainlessPath: '(resource) networking.vpcs > (method) get',
|
|
1445
|
+
qualified: 'client.networking.vpcs.get',
|
|
1446
|
+
params: ['vpc_id: string;'],
|
|
1447
|
+
response: "{ id: string; created_at: string; firewall_rule_ids: string[]; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet: { id: string; cidr: string; created_at: string; name: string; updated_at: string; }; tags: string[]; updated_at: string; }",
|
|
1448
|
+
markdown: "## get\n\n`client.networking.vpcs.get(vpc_id: string): { id: string; created_at: string; firewall_rule_ids: string[]; name: string; project_id: string; region: region_name; status: resource_status; subnet: subnet; tags: string[]; updated_at: string; }`\n\n**get** `/v1/networking/vpcs/{vpc_id}`\n\nGet details about a VPC\n\n### Parameters\n\n- `vpc_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; firewall_rule_ids: string[]; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet: { id: string; cidr: string; created_at: string; name: string; updated_at: string; }; tags: string[]; updated_at: string; }`\n VPC details.\n\n - `id: string`\n - `created_at: string`\n - `firewall_rule_ids: string[]`\n - `name: string`\n - `project_id: string`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `subnet: { id: string; cidr: string; created_at: string; name: string; updated_at: string; }`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst vpc = await client.networking.vpcs.get('vpc_id');\n\nconsole.log(vpc);\n```",
|
|
1449
|
+
perLanguage: {
|
|
1450
|
+
cli: {
|
|
1451
|
+
method: 'vpcs get',
|
|
1452
|
+
example: "nirvana networking:vpcs get \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
|
|
1453
|
+
},
|
|
1454
|
+
go: {
|
|
1455
|
+
method: 'client.Networking.VPCs.Get',
|
|
1456
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tvpc, err := client.Networking.VPCs.Get(context.TODO(), "vpc_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", vpc.ID)\n}\n',
|
|
1457
|
+
},
|
|
1458
|
+
http: {
|
|
1459
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1460
|
+
},
|
|
1461
|
+
typescript: {
|
|
1462
|
+
method: 'client.networking.vpcs.get',
|
|
1463
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst vpc = await client.networking.vpcs.get('vpc_id');\n\nconsole.log(vpc.id);",
|
|
1464
|
+
},
|
|
1465
|
+
},
|
|
602
1466
|
},
|
|
603
1467
|
{
|
|
604
1468
|
name: 'update',
|
|
@@ -611,18 +1475,23 @@ const EMBEDDED_METHODS = [
|
|
|
611
1475
|
params: ['vpc_id: string;', 'name?: string;', 'subnet_name?: string;', 'tags?: string[];'],
|
|
612
1476
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
613
1477
|
markdown: "## update\n\n`client.networking.vpcs.update(vpc_id: string, name?: string, subnet_name?: string, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**patch** `/v1/networking/vpcs/{vpc_id}`\n\nUpdate a VPC\n\n### Parameters\n\n- `vpc_id: string`\n\n- `name?: string`\n Name of the VPC.\n\n- `subnet_name?: string`\n Name of the subnet to create.\n\n- `tags?: string[]`\n Tags to attach to the VPC.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.vpcs.update('vpc_id');\n\nconsole.log(operation);\n```",
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
1478
|
+
perLanguage: {
|
|
1479
|
+
cli: {
|
|
1480
|
+
method: 'vpcs update',
|
|
1481
|
+
example: "nirvana networking:vpcs update \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
|
|
1482
|
+
},
|
|
1483
|
+
go: {
|
|
1484
|
+
method: 'client.Networking.VPCs.Update',
|
|
1485
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.VPCs.Update(\n\t\tcontext.TODO(),\n\t\t"vpc_id",\n\t\tnetworking.VPCUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1486
|
+
},
|
|
1487
|
+
http: {
|
|
1488
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1489
|
+
},
|
|
1490
|
+
typescript: {
|
|
1491
|
+
method: 'client.networking.vpcs.update',
|
|
1492
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.vpcs.update('vpc_id');\n\nconsole.log(operation.id);",
|
|
1493
|
+
},
|
|
1494
|
+
},
|
|
626
1495
|
},
|
|
627
1496
|
{
|
|
628
1497
|
name: 'delete',
|
|
@@ -635,18 +1504,52 @@ const EMBEDDED_METHODS = [
|
|
|
635
1504
|
params: ['vpc_id: string;'],
|
|
636
1505
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
637
1506
|
markdown: "## delete\n\n`client.networking.vpcs.delete(vpc_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/networking/vpcs/{vpc_id}`\n\nDelete a VPC\n\n### Parameters\n\n- `vpc_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.vpcs.delete('vpc_id');\n\nconsole.log(operation);\n```",
|
|
1507
|
+
perLanguage: {
|
|
1508
|
+
cli: {
|
|
1509
|
+
method: 'vpcs delete',
|
|
1510
|
+
example: "nirvana networking:vpcs delete \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
|
|
1511
|
+
},
|
|
1512
|
+
go: {
|
|
1513
|
+
method: 'client.Networking.VPCs.Delete',
|
|
1514
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.VPCs.Delete(context.TODO(), "vpc_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1515
|
+
},
|
|
1516
|
+
http: {
|
|
1517
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1518
|
+
},
|
|
1519
|
+
typescript: {
|
|
1520
|
+
method: 'client.networking.vpcs.delete',
|
|
1521
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.vpcs.delete('vpc_id');\n\nconsole.log(operation.id);",
|
|
1522
|
+
},
|
|
1523
|
+
},
|
|
638
1524
|
},
|
|
639
1525
|
{
|
|
640
|
-
name: '
|
|
641
|
-
endpoint: '/v1/networking/vpcs
|
|
1526
|
+
name: 'list',
|
|
1527
|
+
endpoint: '/v1/networking/vpcs',
|
|
642
1528
|
httpMethod: 'get',
|
|
643
|
-
summary: '
|
|
644
|
-
description: '
|
|
645
|
-
stainlessPath: '(resource) networking.vpcs > (method)
|
|
646
|
-
qualified: 'client.networking.vpcs.
|
|
647
|
-
params: ['
|
|
1529
|
+
summary: 'List VPCs',
|
|
1530
|
+
description: 'List all VPCs',
|
|
1531
|
+
stainlessPath: '(resource) networking.vpcs > (method) list',
|
|
1532
|
+
qualified: 'client.networking.vpcs.list',
|
|
1533
|
+
params: ['project_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
648
1534
|
response: "{ id: string; created_at: string; firewall_rule_ids: string[]; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet: { id: string; cidr: string; created_at: string; name: string; updated_at: string; }; tags: string[]; updated_at: string; }",
|
|
649
|
-
markdown: "##
|
|
1535
|
+
markdown: "## list\n\n`client.networking.vpcs.list(project_id: string, cursor?: string, limit?: number): { id: string; created_at: string; firewall_rule_ids: string[]; name: string; project_id: string; region: region_name; status: resource_status; subnet: subnet; tags: string[]; updated_at: string; }`\n\n**get** `/v1/networking/vpcs`\n\nList all VPCs\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; created_at: string; firewall_rule_ids: string[]; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet: { id: string; cidr: string; created_at: string; name: string; updated_at: string; }; tags: string[]; updated_at: string; }`\n VPC details.\n\n - `id: string`\n - `created_at: string`\n - `firewall_rule_ids: string[]`\n - `name: string`\n - `project_id: string`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `subnet: { id: string; cidr: string; created_at: string; name: string; updated_at: string; }`\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 vpc of client.networking.vpcs.list({ project_id: 'project_id' })) {\n console.log(vpc);\n}\n```",
|
|
1536
|
+
perLanguage: {
|
|
1537
|
+
cli: {
|
|
1538
|
+
method: 'vpcs list',
|
|
1539
|
+
example: "nirvana networking:vpcs list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
1540
|
+
},
|
|
1541
|
+
go: {
|
|
1542
|
+
method: 'client.Networking.VPCs.List',
|
|
1543
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\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\tpage, err := client.Networking.VPCs.List(context.TODO(), networking.VPCListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
1544
|
+
},
|
|
1545
|
+
http: {
|
|
1546
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1547
|
+
},
|
|
1548
|
+
typescript: {
|
|
1549
|
+
method: 'client.networking.vpcs.list',
|
|
1550
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const vpc of client.networking.vpcs.list({ project_id: 'project_id' })) {\n console.log(vpc.id);\n}",
|
|
1551
|
+
},
|
|
1552
|
+
},
|
|
650
1553
|
},
|
|
651
1554
|
{
|
|
652
1555
|
name: 'create',
|
|
@@ -664,6 +1567,23 @@ const EMBEDDED_METHODS = [
|
|
|
664
1567
|
'tags?: string[];',
|
|
665
1568
|
],
|
|
666
1569
|
markdown: "## create\n\n`client.networking.vpcs.availability.create(name: string, project_id: string, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1', subnet_name: string, tags?: string[]): void`\n\n**post** `/v1/networking/vpcs/availability`\n\nCheck if a VPC can be created\n\n### Parameters\n\n- `name: string`\n Name of the VPC.\n\n- `project_id: string`\n Project ID the VPC belongs to.\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n Region the resource is in.\n\n- `subnet_name: string`\n Name of the subnet to create.\n\n- `tags?: string[]`\n Tags to attach to the VPC.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.networking.vpcs.availability.create({\n name: 'my-vpc',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-wdc-1',\n subnet_name: 'my-subnet',\n})\n```",
|
|
1570
|
+
perLanguage: {
|
|
1571
|
+
cli: {
|
|
1572
|
+
method: 'availability create',
|
|
1573
|
+
example: "nirvana networking:vpcs:availability create \\\n --api-key 'My API Key' \\\n --name my-vpc \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-wdc-1 \\\n --subnet-name my-subnet",
|
|
1574
|
+
},
|
|
1575
|
+
go: {
|
|
1576
|
+
method: 'client.Networking.VPCs.Availability.New',
|
|
1577
|
+
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\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"),\n\t)\n\terr := client.Networking.VPCs.Availability.New(context.TODO(), networking.VPCAvailabilityNewParams{\n\t\tName: "my-vpc",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tRegion: shared.RegionNameUsWdc1,\n\t\tSubnetName: "my-subnet",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
1578
|
+
},
|
|
1579
|
+
http: {
|
|
1580
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-wdc-1",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1581
|
+
},
|
|
1582
|
+
typescript: {
|
|
1583
|
+
method: 'client.networking.vpcs.availability.create',
|
|
1584
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.networking.vpcs.availability.create({\n name: 'my-vpc',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-wdc-1',\n subnet_name: 'my-subnet',\n});",
|
|
1585
|
+
},
|
|
1586
|
+
},
|
|
667
1587
|
},
|
|
668
1588
|
{
|
|
669
1589
|
name: 'update',
|
|
@@ -675,6 +1595,23 @@ const EMBEDDED_METHODS = [
|
|
|
675
1595
|
qualified: 'client.networking.vpcs.availability.update',
|
|
676
1596
|
params: ['vpc_id: string;', 'name?: string;', 'subnet_name?: string;', 'tags?: string[];'],
|
|
677
1597
|
markdown: "## update\n\n`client.networking.vpcs.availability.update(vpc_id: string, name?: string, subnet_name?: string, tags?: string[]): void`\n\n**patch** `/v1/networking/vpcs/{vpc_id}/availability`\n\nCheck if a VPC can be updated\n\n### Parameters\n\n- `vpc_id: string`\n\n- `name?: string`\n Name of the VPC.\n\n- `subnet_name?: string`\n Name of the subnet to create.\n\n- `tags?: string[]`\n Tags to attach to the VPC.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.networking.vpcs.availability.update('vpc_id')\n```",
|
|
1598
|
+
perLanguage: {
|
|
1599
|
+
cli: {
|
|
1600
|
+
method: 'availability update',
|
|
1601
|
+
example: "nirvana networking:vpcs:availability update \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
|
|
1602
|
+
},
|
|
1603
|
+
go: {
|
|
1604
|
+
method: 'client.Networking.VPCs.Availability.Update',
|
|
1605
|
+
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Networking.VPCs.Availability.Update(\n\t\tcontext.TODO(),\n\t\t"vpc_id",\n\t\tnetworking.VPCAvailabilityUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
1606
|
+
},
|
|
1607
|
+
http: {
|
|
1608
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1609
|
+
},
|
|
1610
|
+
typescript: {
|
|
1611
|
+
method: 'client.networking.vpcs.availability.update',
|
|
1612
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.networking.vpcs.availability.update('vpc_id');",
|
|
1613
|
+
},
|
|
1614
|
+
},
|
|
678
1615
|
},
|
|
679
1616
|
{
|
|
680
1617
|
name: 'create',
|
|
@@ -695,6 +1632,52 @@ const EMBEDDED_METHODS = [
|
|
|
695
1632
|
],
|
|
696
1633
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
697
1634
|
markdown: "## create\n\n`client.networking.firewallRules.create(vpc_id: string, destination_address: string, destination_ports: string[], name: string, protocol: 'tcp' | 'udp', source_address: string, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/networking/vpcs/{vpc_id}/firewall_rules`\n\nCreate a firewall rule\n\n### Parameters\n\n- `vpc_id: string`\n\n- `destination_address: string`\n Destination address of the Firewall Rule. Either VPC CIDR or VM in VPC. Must be in network-aligned/canonical form.\n\n- `destination_ports: string[]`\n Destination ports of the Firewall Rule.\n\n- `name: string`\n Name of the Firewall Rule.\n\n- `protocol: 'tcp' | 'udp'`\n Protocol of the Firewall Rule.\n\n- `source_address: string`\n Source address of the Firewall Rule. Address of 0.0.0.0 requires a CIDR mask of 0. Must be in network-aligned/canonical form.\n\n- `tags?: string[]`\n Tags to attach to the Firewall Rule.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.firewallRules.create('vpc_id', {\n destination_address: '10.0.0.0/25',\n destination_ports: ['22', '80', '443'],\n name: 'my-firewall-rule',\n protocol: 'tcp',\n source_address: '0.0.0.0/0',\n});\n\nconsole.log(operation);\n```",
|
|
1635
|
+
perLanguage: {
|
|
1636
|
+
cli: {
|
|
1637
|
+
method: 'firewall_rules create',
|
|
1638
|
+
example: "nirvana networking:firewall-rules create \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id \\\n --destination-address 10.0.0.0/25 \\\n --destination-port \"'22'\" \\\n --destination-port \"'80'\" \\\n --destination-port \"'443'\" \\\n --name my-firewall-rule \\\n --protocol tcp \\\n --source-address 0.0.0.0/0",
|
|
1639
|
+
},
|
|
1640
|
+
go: {
|
|
1641
|
+
method: 'client.Networking.FirewallRules.New',
|
|
1642
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.FirewallRules.New(\n\t\tcontext.TODO(),\n\t\t"vpc_id",\n\t\tnetworking.FirewallRuleNewParams{\n\t\t\tDestinationAddress: "10.0.0.0/25",\n\t\t\tDestinationPorts: []string{"22", "80", "443"},\n\t\t\tName: "my-firewall-rule",\n\t\t\tProtocol: networking.FirewallRuleNewParamsProtocolTcp,\n\t\t\tSourceAddress: "0.0.0.0/0",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1643
|
+
},
|
|
1644
|
+
http: {
|
|
1645
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "destination_address": "10.0.0.0/25",\n "destination_ports": [\n "22",\n "80",\n "443"\n ],\n "name": "my-firewall-rule",\n "protocol": "tcp",\n "source_address": "0.0.0.0/0",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1646
|
+
},
|
|
1647
|
+
typescript: {
|
|
1648
|
+
method: 'client.networking.firewallRules.create',
|
|
1649
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.firewallRules.create('vpc_id', {\n destination_address: '10.0.0.0/25',\n destination_ports: ['22', '80', '443'],\n name: 'my-firewall-rule',\n protocol: 'tcp',\n source_address: '0.0.0.0/0',\n});\n\nconsole.log(operation.id);",
|
|
1650
|
+
},
|
|
1651
|
+
},
|
|
1652
|
+
},
|
|
1653
|
+
{
|
|
1654
|
+
name: 'get',
|
|
1655
|
+
endpoint: '/v1/networking/vpcs/{vpc_id}/firewall_rules/{firewall_rule_id}',
|
|
1656
|
+
httpMethod: 'get',
|
|
1657
|
+
summary: 'Firewall Rule Details',
|
|
1658
|
+
description: 'Get details about a firewall rule',
|
|
1659
|
+
stainlessPath: '(resource) networking.firewall_rules > (method) get',
|
|
1660
|
+
qualified: 'client.networking.firewallRules.get',
|
|
1661
|
+
params: ['vpc_id: string;', 'firewall_rule_id: string;'],
|
|
1662
|
+
response: "{ id: string; created_at: string; destination_address: string; destination_ports: string[]; name: string; protocol: 'tcp' | 'udp'; source_address: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }",
|
|
1663
|
+
markdown: "## get\n\n`client.networking.firewallRules.get(vpc_id: string, firewall_rule_id: string): { id: string; created_at: string; destination_address: string; destination_ports: string[]; name: string; protocol: 'tcp' | 'udp'; source_address: string; status: resource_status; tags: string[]; updated_at: string; vpc_id: string; }`\n\n**get** `/v1/networking/vpcs/{vpc_id}/firewall_rules/{firewall_rule_id}`\n\nGet details about a firewall rule\n\n### Parameters\n\n- `vpc_id: string`\n\n- `firewall_rule_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; destination_address: string; destination_ports: string[]; name: string; protocol: 'tcp' | 'udp'; source_address: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }`\n Firewall rule details.\n\n - `id: string`\n - `created_at: string`\n - `destination_address: string`\n - `destination_ports: string[]`\n - `name: string`\n - `protocol: 'tcp' | 'udp'`\n - `source_address: string`\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\nconst firewallRule = await client.networking.firewallRules.get('firewall_rule_id', { vpc_id: 'vpc_id' });\n\nconsole.log(firewallRule);\n```",
|
|
1664
|
+
perLanguage: {
|
|
1665
|
+
cli: {
|
|
1666
|
+
method: 'firewall_rules get',
|
|
1667
|
+
example: "nirvana networking:firewall-rules get \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id \\\n --firewall-rule-id firewall_rule_id",
|
|
1668
|
+
},
|
|
1669
|
+
go: {
|
|
1670
|
+
method: 'client.Networking.FirewallRules.Get',
|
|
1671
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tfirewallRule, err := client.Networking.FirewallRules.Get(\n\t\tcontext.TODO(),\n\t\t"vpc_id",\n\t\t"firewall_rule_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", firewallRule.ID)\n}\n',
|
|
1672
|
+
},
|
|
1673
|
+
http: {
|
|
1674
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules/$FIREWALL_RULE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1675
|
+
},
|
|
1676
|
+
typescript: {
|
|
1677
|
+
method: 'client.networking.firewallRules.get',
|
|
1678
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst firewallRule = await client.networking.firewallRules.get('firewall_rule_id', {\n vpc_id: 'vpc_id',\n});\n\nconsole.log(firewallRule.id);",
|
|
1679
|
+
},
|
|
1680
|
+
},
|
|
698
1681
|
},
|
|
699
1682
|
{
|
|
700
1683
|
name: 'update',
|
|
@@ -716,18 +1699,23 @@ const EMBEDDED_METHODS = [
|
|
|
716
1699
|
],
|
|
717
1700
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
718
1701
|
markdown: "## update\n\n`client.networking.firewallRules.update(vpc_id: string, firewall_rule_id: string, destination_address?: string, destination_ports?: string[], name?: string, protocol?: 'tcp' | 'udp', source_address?: string, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**patch** `/v1/networking/vpcs/{vpc_id}/firewall_rules/{firewall_rule_id}`\n\nUpdate a firewall rule\n\n### Parameters\n\n- `vpc_id: string`\n\n- `firewall_rule_id: string`\n\n- `destination_address?: string`\n Destination address of the Firewall Rule. Either VPC CIDR or VM in VPC. Must be in network-aligned/canonical form.\n\n- `destination_ports?: string[]`\n Destination ports of the Firewall Rule.\n\n- `name?: string`\n Name of the Firewall Rule.\n\n- `protocol?: 'tcp' | 'udp'`\n Protocol of the Firewall Rule.\n\n- `source_address?: string`\n Source address of the Firewall Rule. Address of 0.0.0.0 requires a CIDR mask of 0. Must be in network-aligned/canonical form.\n\n- `tags?: string[]`\n Tags to attach to the Firewall Rule.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.firewallRules.update('firewall_rule_id', { vpc_id: 'vpc_id' });\n\nconsole.log(operation);\n```",
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
1702
|
+
perLanguage: {
|
|
1703
|
+
cli: {
|
|
1704
|
+
method: 'firewall_rules update',
|
|
1705
|
+
example: "nirvana networking:firewall-rules update \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id \\\n --firewall-rule-id firewall_rule_id",
|
|
1706
|
+
},
|
|
1707
|
+
go: {
|
|
1708
|
+
method: 'client.Networking.FirewallRules.Update',
|
|
1709
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.FirewallRules.Update(\n\t\tcontext.TODO(),\n\t\t"vpc_id",\n\t\t"firewall_rule_id",\n\t\tnetworking.FirewallRuleUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1710
|
+
},
|
|
1711
|
+
http: {
|
|
1712
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules/$FIREWALL_RULE_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "destination_address": "10.0.0.0/25",\n "destination_ports": [\n "22",\n "80",\n "443"\n ],\n "name": "my-firewall-rule",\n "protocol": "tcp",\n "source_address": "0.0.0.0/0",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1713
|
+
},
|
|
1714
|
+
typescript: {
|
|
1715
|
+
method: 'client.networking.firewallRules.update',
|
|
1716
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.firewallRules.update('firewall_rule_id', {\n vpc_id: 'vpc_id',\n});\n\nconsole.log(operation.id);",
|
|
1717
|
+
},
|
|
1718
|
+
},
|
|
731
1719
|
},
|
|
732
1720
|
{
|
|
733
1721
|
name: 'delete',
|
|
@@ -740,18 +1728,52 @@ const EMBEDDED_METHODS = [
|
|
|
740
1728
|
params: ['vpc_id: string;', 'firewall_rule_id: string;'],
|
|
741
1729
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
742
1730
|
markdown: "## delete\n\n`client.networking.firewallRules.delete(vpc_id: string, firewall_rule_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/networking/vpcs/{vpc_id}/firewall_rules/{firewall_rule_id}`\n\nDelete a firewall rule\n\n### Parameters\n\n- `vpc_id: string`\n\n- `firewall_rule_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.firewallRules.delete('firewall_rule_id', { vpc_id: 'vpc_id' });\n\nconsole.log(operation);\n```",
|
|
1731
|
+
perLanguage: {
|
|
1732
|
+
cli: {
|
|
1733
|
+
method: 'firewall_rules delete',
|
|
1734
|
+
example: "nirvana networking:firewall-rules delete \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id \\\n --firewall-rule-id firewall_rule_id",
|
|
1735
|
+
},
|
|
1736
|
+
go: {
|
|
1737
|
+
method: 'client.Networking.FirewallRules.Delete',
|
|
1738
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.FirewallRules.Delete(\n\t\tcontext.TODO(),\n\t\t"vpc_id",\n\t\t"firewall_rule_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1739
|
+
},
|
|
1740
|
+
http: {
|
|
1741
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules/$FIREWALL_RULE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1742
|
+
},
|
|
1743
|
+
typescript: {
|
|
1744
|
+
method: 'client.networking.firewallRules.delete',
|
|
1745
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.firewallRules.delete('firewall_rule_id', {\n vpc_id: 'vpc_id',\n});\n\nconsole.log(operation.id);",
|
|
1746
|
+
},
|
|
1747
|
+
},
|
|
743
1748
|
},
|
|
744
1749
|
{
|
|
745
|
-
name: '
|
|
746
|
-
endpoint: '/v1/networking/vpcs/{vpc_id}/firewall_rules
|
|
1750
|
+
name: 'list',
|
|
1751
|
+
endpoint: '/v1/networking/vpcs/{vpc_id}/firewall_rules',
|
|
747
1752
|
httpMethod: 'get',
|
|
748
|
-
summary: 'Firewall
|
|
749
|
-
description: '
|
|
750
|
-
stainlessPath: '(resource) networking.firewall_rules > (method)
|
|
751
|
-
qualified: 'client.networking.firewallRules.
|
|
752
|
-
params: ['vpc_id: string;', '
|
|
1753
|
+
summary: 'List Firewall Rules',
|
|
1754
|
+
description: 'List all firewall rules',
|
|
1755
|
+
stainlessPath: '(resource) networking.firewall_rules > (method) list',
|
|
1756
|
+
qualified: 'client.networking.firewallRules.list',
|
|
1757
|
+
params: ['vpc_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
753
1758
|
response: "{ id: string; created_at: string; destination_address: string; destination_ports: string[]; name: string; protocol: 'tcp' | 'udp'; source_address: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }",
|
|
754
|
-
markdown: "##
|
|
1759
|
+
markdown: "## list\n\n`client.networking.firewallRules.list(vpc_id: string, cursor?: string, limit?: number): { id: string; created_at: string; destination_address: string; destination_ports: string[]; name: string; protocol: 'tcp' | 'udp'; source_address: string; status: resource_status; tags: string[]; updated_at: string; vpc_id: string; }`\n\n**get** `/v1/networking/vpcs/{vpc_id}/firewall_rules`\n\nList all firewall rules\n\n### Parameters\n\n- `vpc_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; destination_address: string; destination_ports: string[]; name: string; protocol: 'tcp' | 'udp'; source_address: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }`\n Firewall rule details.\n\n - `id: string`\n - `created_at: string`\n - `destination_address: string`\n - `destination_ports: string[]`\n - `name: string`\n - `protocol: 'tcp' | 'udp'`\n - `source_address: string`\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 firewallRule of client.networking.firewallRules.list('vpc_id')) {\n console.log(firewallRule);\n}\n```",
|
|
1760
|
+
perLanguage: {
|
|
1761
|
+
cli: {
|
|
1762
|
+
method: 'firewall_rules list',
|
|
1763
|
+
example: "nirvana networking:firewall-rules list \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
|
|
1764
|
+
},
|
|
1765
|
+
go: {
|
|
1766
|
+
method: 'client.Networking.FirewallRules.List',
|
|
1767
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\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\tpage, err := client.Networking.FirewallRules.List(\n\t\tcontext.TODO(),\n\t\t"vpc_id",\n\t\tnetworking.FirewallRuleListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
1768
|
+
},
|
|
1769
|
+
http: {
|
|
1770
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1771
|
+
},
|
|
1772
|
+
typescript: {
|
|
1773
|
+
method: 'client.networking.firewallRules.list',
|
|
1774
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const firewallRule of client.networking.firewallRules.list('vpc_id')) {\n console.log(firewallRule.id);\n}",
|
|
1775
|
+
},
|
|
1776
|
+
},
|
|
755
1777
|
},
|
|
756
1778
|
{
|
|
757
1779
|
name: 'create',
|
|
@@ -773,6 +1795,52 @@ const EMBEDDED_METHODS = [
|
|
|
773
1795
|
],
|
|
774
1796
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
775
1797
|
markdown: "## create\n\n`client.networking.connect.connections.create(bandwidth_mbps: 50 | 200 | 500 | 1000 | 2000, cidrs: string[], name: string, project_id: string, provider_cidrs: string[], region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1', aws?: { account_id: string; region: string; }, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/networking/connect/connections`\n\nCreate a Connect Connection\n\n### Parameters\n\n- `bandwidth_mbps: 50 | 200 | 500 | 1000 | 2000`\n Connect Connection speed in Mbps\n\n- `cidrs: string[]`\n CIDRs for the Connect Connection. Must be in network-aligned/canonical form.\n\n- `name: string`\n Name of the Connect Connection\n\n- `project_id: string`\n Project ID the Connect Connection belongs to\n\n- `provider_cidrs: string[]`\n Provider CIDRs. Must be in network-aligned/canonical form.\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n Region the resource is in.\n\n- `aws?: { account_id: string; region: string; }`\n AWS provider configuration\n - `account_id: string`\n AWS account id\n - `region: string`\n AWS region where the connection will be established\n\n- `tags?: string[]`\n Tags to attach to the Connect Connection\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.connect.connections.create({\n bandwidth_mbps: 50,\n cidrs: ['10.0.0.0/16'],\n name: 'my-connect-connection',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n provider_cidrs: ['172.16.0.0/16'],\n region: 'us-wdc-1',\n});\n\nconsole.log(operation);\n```",
|
|
1798
|
+
perLanguage: {
|
|
1799
|
+
cli: {
|
|
1800
|
+
method: 'connections create',
|
|
1801
|
+
example: "nirvana networking:connect:connections create \\\n --api-key 'My API Key' \\\n --bandwidth-mbps 50 \\\n --cidr 10.0.0.0/16 \\\n --name my-connect-connection \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --provider-cidr 172.16.0.0/16 \\\n --region us-wdc-1",
|
|
1802
|
+
},
|
|
1803
|
+
go: {
|
|
1804
|
+
method: 'client.Networking.Connect.Connections.New',
|
|
1805
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\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"),\n\t)\n\toperation, err := client.Networking.Connect.Connections.New(context.TODO(), networking.ConnectConnectionNewParams{\n\t\tBandwidthMbps: 50,\n\t\tCIDRs: []string{"10.0.0.0/16"},\n\t\tName: "my-connect-connection",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tProviderCIDRs: []string{"172.16.0.0/16"},\n\t\tRegion: shared.RegionNameUsWdc1,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1806
|
+
},
|
|
1807
|
+
http: {
|
|
1808
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/connect/connections \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "bandwidth_mbps": 50,\n "cidrs": [\n "10.0.0.0/16"\n ],\n "name": "my-connect-connection",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "provider_cidrs": [\n "172.16.0.0/16"\n ],\n "region": "us-wdc-1",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1809
|
+
},
|
|
1810
|
+
typescript: {
|
|
1811
|
+
method: 'client.networking.connect.connections.create',
|
|
1812
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.connect.connections.create({\n bandwidth_mbps: 50,\n cidrs: ['10.0.0.0/16'],\n name: 'my-connect-connection',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n provider_cidrs: ['172.16.0.0/16'],\n region: 'us-wdc-1',\n});\n\nconsole.log(operation.id);",
|
|
1813
|
+
},
|
|
1814
|
+
},
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
name: 'get',
|
|
1818
|
+
endpoint: '/v1/networking/connect/connections/{connection_id}',
|
|
1819
|
+
httpMethod: 'get',
|
|
1820
|
+
summary: 'Get Connect Connection',
|
|
1821
|
+
description: 'Get Connect Connection details',
|
|
1822
|
+
stainlessPath: '(resource) networking.connect.connections > (method) get',
|
|
1823
|
+
qualified: 'client.networking.connect.connections.get',
|
|
1824
|
+
params: ['connection_id: string;'],
|
|
1825
|
+
response: "{ id: string; asn: number; aws: { region: string; }; bandwidth_mbps: 50 | 200 | 500 | 1000 | 2000; cidrs: string[]; created_at: string; name: string; project_id: string; provider_asn: number; provider_cidrs: string[]; provider_router_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; router_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }",
|
|
1826
|
+
markdown: "## get\n\n`client.networking.connect.connections.get(connection_id: string): { id: string; asn: number; aws: connect_connection_aws_config; bandwidth_mbps: connect_bandwidth_mbps; cidrs: string[]; created_at: string; name: string; project_id: string; provider_asn: number; provider_cidrs: string[]; provider_router_ip: string; region: region_name; router_ip: string; status: resource_status; tags: string[]; updated_at: string; }`\n\n**get** `/v1/networking/connect/connections/{connection_id}`\n\nGet Connect Connection details\n\n### Parameters\n\n- `connection_id: string`\n\n### Returns\n\n- `{ id: string; asn: number; aws: { region: string; }; bandwidth_mbps: 50 | 200 | 500 | 1000 | 2000; cidrs: string[]; created_at: string; name: string; project_id: string; provider_asn: number; provider_cidrs: string[]; provider_router_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; router_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }`\n Connect Connection details.\n\n - `id: string`\n - `asn: number`\n - `aws: { region: string; }`\n - `bandwidth_mbps: 50 | 200 | 500 | 1000 | 2000`\n - `cidrs: string[]`\n - `created_at: string`\n - `name: string`\n - `project_id: string`\n - `provider_asn: number`\n - `provider_cidrs: string[]`\n - `provider_router_ip: string`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n - `router_ip: string`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst connectConnection = await client.networking.connect.connections.get('connection_id');\n\nconsole.log(connectConnection);\n```",
|
|
1827
|
+
perLanguage: {
|
|
1828
|
+
cli: {
|
|
1829
|
+
method: 'connections get',
|
|
1830
|
+
example: "nirvana networking:connect:connections get \\\n --api-key 'My API Key' \\\n --connection-id connection_id",
|
|
1831
|
+
},
|
|
1832
|
+
go: {
|
|
1833
|
+
method: 'client.Networking.Connect.Connections.Get',
|
|
1834
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tconnectConnection, err := client.Networking.Connect.Connections.Get(context.TODO(), "connection_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", connectConnection.ID)\n}\n',
|
|
1835
|
+
},
|
|
1836
|
+
http: {
|
|
1837
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/connect/connections/$CONNECTION_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1838
|
+
},
|
|
1839
|
+
typescript: {
|
|
1840
|
+
method: 'client.networking.connect.connections.get',
|
|
1841
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst connectConnection = await client.networking.connect.connections.get('connection_id');\n\nconsole.log(connectConnection.id);",
|
|
1842
|
+
},
|
|
1843
|
+
},
|
|
776
1844
|
},
|
|
777
1845
|
{
|
|
778
1846
|
name: 'update',
|
|
@@ -785,18 +1853,23 @@ const EMBEDDED_METHODS = [
|
|
|
785
1853
|
params: ['connection_id: string;', 'name?: string;', 'tags?: string[];'],
|
|
786
1854
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
787
1855
|
markdown: "## update\n\n`client.networking.connect.connections.update(connection_id: string, name?: string, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**patch** `/v1/networking/connect/connections/{connection_id}`\n\nUpdate Connect Connection details\n\n### Parameters\n\n- `connection_id: string`\n\n- `name?: string`\n Name of the Connect Connection.\n\n- `tags?: string[]`\n Tags to attach to the Connect Connection\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.connect.connections.update('connection_id');\n\nconsole.log(operation);\n```",
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
1856
|
+
perLanguage: {
|
|
1857
|
+
cli: {
|
|
1858
|
+
method: 'connections update',
|
|
1859
|
+
example: "nirvana networking:connect:connections update \\\n --api-key 'My API Key' \\\n --connection-id connection_id",
|
|
1860
|
+
},
|
|
1861
|
+
go: {
|
|
1862
|
+
method: 'client.Networking.Connect.Connections.Update',
|
|
1863
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.Connect.Connections.Update(\n\t\tcontext.TODO(),\n\t\t"connection_id",\n\t\tnetworking.ConnectConnectionUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1864
|
+
},
|
|
1865
|
+
http: {
|
|
1866
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/connect/connections/$CONNECTION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-connect-connection",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1867
|
+
},
|
|
1868
|
+
typescript: {
|
|
1869
|
+
method: 'client.networking.connect.connections.update',
|
|
1870
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.connect.connections.update('connection_id');\n\nconsole.log(operation.id);",
|
|
1871
|
+
},
|
|
1872
|
+
},
|
|
800
1873
|
},
|
|
801
1874
|
{
|
|
802
1875
|
name: 'delete',
|
|
@@ -809,18 +1882,52 @@ const EMBEDDED_METHODS = [
|
|
|
809
1882
|
params: ['connection_id: string;'],
|
|
810
1883
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
811
1884
|
markdown: "## delete\n\n`client.networking.connect.connections.delete(connection_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/networking/connect/connections/{connection_id}`\n\nDelete Connect Connection\n\n### Parameters\n\n- `connection_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.connect.connections.delete('connection_id');\n\nconsole.log(operation);\n```",
|
|
1885
|
+
perLanguage: {
|
|
1886
|
+
cli: {
|
|
1887
|
+
method: 'connections delete',
|
|
1888
|
+
example: "nirvana networking:connect:connections delete \\\n --api-key 'My API Key' \\\n --connection-id connection_id",
|
|
1889
|
+
},
|
|
1890
|
+
go: {
|
|
1891
|
+
method: 'client.Networking.Connect.Connections.Delete',
|
|
1892
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.Connect.Connections.Delete(context.TODO(), "connection_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1893
|
+
},
|
|
1894
|
+
http: {
|
|
1895
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/connect/connections/$CONNECTION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1896
|
+
},
|
|
1897
|
+
typescript: {
|
|
1898
|
+
method: 'client.networking.connect.connections.delete',
|
|
1899
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.connect.connections.delete('connection_id');\n\nconsole.log(operation.id);",
|
|
1900
|
+
},
|
|
1901
|
+
},
|
|
812
1902
|
},
|
|
813
1903
|
{
|
|
814
|
-
name: '
|
|
815
|
-
endpoint: '/v1/networking/connect/connections
|
|
1904
|
+
name: 'list',
|
|
1905
|
+
endpoint: '/v1/networking/connect/connections',
|
|
816
1906
|
httpMethod: 'get',
|
|
817
|
-
summary: '
|
|
818
|
-
description: '
|
|
819
|
-
stainlessPath: '(resource) networking.connect.connections > (method)
|
|
820
|
-
qualified: 'client.networking.connect.connections.
|
|
821
|
-
params: ['
|
|
1907
|
+
summary: 'List Connect Connection',
|
|
1908
|
+
description: 'List all Connect Connections',
|
|
1909
|
+
stainlessPath: '(resource) networking.connect.connections > (method) list',
|
|
1910
|
+
qualified: 'client.networking.connect.connections.list',
|
|
1911
|
+
params: ['project_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
822
1912
|
response: "{ id: string; asn: number; aws: { region: string; }; bandwidth_mbps: 50 | 200 | 500 | 1000 | 2000; cidrs: string[]; created_at: string; name: string; project_id: string; provider_asn: number; provider_cidrs: string[]; provider_router_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; router_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }",
|
|
823
|
-
markdown: "##
|
|
1913
|
+
markdown: "## list\n\n`client.networking.connect.connections.list(project_id: string, cursor?: string, limit?: number): { id: string; asn: number; aws: connect_connection_aws_config; bandwidth_mbps: connect_bandwidth_mbps; cidrs: string[]; created_at: string; name: string; project_id: string; provider_asn: number; provider_cidrs: string[]; provider_router_ip: string; region: region_name; router_ip: string; status: resource_status; tags: string[]; updated_at: string; }`\n\n**get** `/v1/networking/connect/connections`\n\nList all Connect Connections\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; asn: number; aws: { region: string; }; bandwidth_mbps: 50 | 200 | 500 | 1000 | 2000; cidrs: string[]; created_at: string; name: string; project_id: string; provider_asn: number; provider_cidrs: string[]; provider_router_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; router_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }`\n Connect Connection details.\n\n - `id: string`\n - `asn: number`\n - `aws: { region: string; }`\n - `bandwidth_mbps: 50 | 200 | 500 | 1000 | 2000`\n - `cidrs: string[]`\n - `created_at: string`\n - `name: string`\n - `project_id: string`\n - `provider_asn: number`\n - `provider_cidrs: string[]`\n - `provider_router_ip: string`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n - `router_ip: string`\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 connectConnection of client.networking.connect.connections.list({ project_id: 'project_id' })) {\n console.log(connectConnection);\n}\n```",
|
|
1914
|
+
perLanguage: {
|
|
1915
|
+
cli: {
|
|
1916
|
+
method: 'connections list',
|
|
1917
|
+
example: "nirvana networking:connect:connections list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
1918
|
+
},
|
|
1919
|
+
go: {
|
|
1920
|
+
method: 'client.Networking.Connect.Connections.List',
|
|
1921
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\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\tpage, err := client.Networking.Connect.Connections.List(context.TODO(), networking.ConnectConnectionListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
1922
|
+
},
|
|
1923
|
+
http: {
|
|
1924
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/connect/connections \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1925
|
+
},
|
|
1926
|
+
typescript: {
|
|
1927
|
+
method: 'client.networking.connect.connections.list',
|
|
1928
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const connectConnection of client.networking.connect.connections.list({\n project_id: 'project_id',\n})) {\n console.log(connectConnection.id);\n}",
|
|
1929
|
+
},
|
|
1930
|
+
},
|
|
824
1931
|
},
|
|
825
1932
|
{
|
|
826
1933
|
name: 'list',
|
|
@@ -833,6 +1940,23 @@ const EMBEDDED_METHODS = [
|
|
|
833
1940
|
params: ['cursor?: string;', 'limit?: number;'],
|
|
834
1941
|
response: "{ nirvana_region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; provider: string; provider_region: string; }",
|
|
835
1942
|
markdown: "## list\n\n`client.networking.connect.routes.list(cursor?: string, limit?: number): { nirvana_region: region_name; provider: string; provider_region: string; }`\n\n**get** `/v1/networking/connect/routes`\n\nList all supported routes with regions for Connect.\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ nirvana_region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; provider: string; provider_region: string; }`\n Routes supported for Connect.\n\n - `nirvana_region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n - `provider: string`\n - `provider_region: 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 connectRoute of client.networking.connect.routes.list()) {\n console.log(connectRoute);\n}\n```",
|
|
1943
|
+
perLanguage: {
|
|
1944
|
+
cli: {
|
|
1945
|
+
method: 'routes list',
|
|
1946
|
+
example: "nirvana networking:connect:routes list \\\n --api-key 'My API Key'",
|
|
1947
|
+
},
|
|
1948
|
+
go: {
|
|
1949
|
+
method: 'client.Networking.Connect.Routes.List',
|
|
1950
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\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\tpage, err := client.Networking.Connect.Routes.List(context.TODO(), networking.ConnectRouteListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
1951
|
+
},
|
|
1952
|
+
http: {
|
|
1953
|
+
example: 'curl https://api.nirvanalabs.io/v1/networking/connect/routes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1954
|
+
},
|
|
1955
|
+
typescript: {
|
|
1956
|
+
method: 'client.networking.connect.routes.list',
|
|
1957
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const connectRoute of client.networking.connect.routes.list()) {\n console.log(connectRoute.provider);\n}",
|
|
1958
|
+
},
|
|
1959
|
+
},
|
|
836
1960
|
},
|
|
837
1961
|
{
|
|
838
1962
|
name: 'create',
|
|
@@ -851,6 +1975,52 @@ const EMBEDDED_METHODS = [
|
|
|
851
1975
|
],
|
|
852
1976
|
response: '{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }',
|
|
853
1977
|
markdown: "## create\n\n`client.rpcNodes.flex.create(blockchain: string, name: string, network: string, project_id: string, tags?: string[]): { id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n\n**post** `/v1/rpc_nodes/flex`\n\nCreate a new RPC Node Flex\n\n### Parameters\n\n- `blockchain: string`\n Blockchain.\n\n- `name: string`\n Name of the RPC Node Flex.\n\n- `network: string`\n Network type (e.g., mainnet, testnet).\n\n- `project_id: string`\n Project ID to associate with the RPC Node Flex.\n\n- `tags?: string[]`\n Tags to attach to the RPC Node Flex (optional, max 50).\n\n### Returns\n\n- `{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n RPC Node Flex details.\n\n - `id: string`\n - `blockchain: string`\n - `created_at: string`\n - `endpoint: string`\n - `name: string`\n - `network: string`\n - `project_id: string`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst flex = await client.rpcNodes.flex.create({\n blockchain: 'ethereum',\n name: 'my-ethereum-node',\n network: 'mainnet',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(flex);\n```",
|
|
1978
|
+
perLanguage: {
|
|
1979
|
+
cli: {
|
|
1980
|
+
method: 'flex create',
|
|
1981
|
+
example: "nirvana rpc-nodes:flex create \\\n --api-key 'My API Key' \\\n --blockchain ethereum \\\n --name my-ethereum-node \\\n --network mainnet \\\n --project-id 123e4567-e89b-12d3-a456-426614174000",
|
|
1982
|
+
},
|
|
1983
|
+
go: {
|
|
1984
|
+
method: 'client.RPCNodes.Flex.New',
|
|
1985
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/rpc_nodes"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tflex, err := client.RPCNodes.Flex.New(context.TODO(), rpc_nodes.FlexNewParams{\n\t\tBlockchain: "ethereum",\n\t\tName: "my-ethereum-node",\n\t\tNetwork: "mainnet",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", flex.ID)\n}\n',
|
|
1986
|
+
},
|
|
1987
|
+
http: {
|
|
1988
|
+
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "blockchain": "ethereum",\n "name": "my-ethereum-node",\n "network": "mainnet",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1989
|
+
},
|
|
1990
|
+
typescript: {
|
|
1991
|
+
method: 'client.rpcNodes.flex.create',
|
|
1992
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst flex = await client.rpcNodes.flex.create({\n blockchain: 'ethereum',\n name: 'my-ethereum-node',\n network: 'mainnet',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(flex.id);",
|
|
1993
|
+
},
|
|
1994
|
+
},
|
|
1995
|
+
},
|
|
1996
|
+
{
|
|
1997
|
+
name: 'get',
|
|
1998
|
+
endpoint: '/v1/rpc_nodes/flex/{node_id}',
|
|
1999
|
+
httpMethod: 'get',
|
|
2000
|
+
summary: 'Get RPC Node Flex Details',
|
|
2001
|
+
description: 'Get details about an RPC Node Flex',
|
|
2002
|
+
stainlessPath: '(resource) rpc_nodes.flex > (method) get',
|
|
2003
|
+
qualified: 'client.rpcNodes.flex.get',
|
|
2004
|
+
params: ['node_id: string;'],
|
|
2005
|
+
response: '{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }',
|
|
2006
|
+
markdown: "## get\n\n`client.rpcNodes.flex.get(node_id: string): { id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n\n**get** `/v1/rpc_nodes/flex/{node_id}`\n\nGet details about an RPC Node Flex\n\n### Parameters\n\n- `node_id: string`\n\n### Returns\n\n- `{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n RPC Node Flex details.\n\n - `id: string`\n - `blockchain: string`\n - `created_at: string`\n - `endpoint: string`\n - `name: string`\n - `network: string`\n - `project_id: string`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst flex = await client.rpcNodes.flex.get('node_id');\n\nconsole.log(flex);\n```",
|
|
2007
|
+
perLanguage: {
|
|
2008
|
+
cli: {
|
|
2009
|
+
method: 'flex get',
|
|
2010
|
+
example: "nirvana rpc-nodes:flex get \\\n --api-key 'My API Key' \\\n --node-id node_id",
|
|
2011
|
+
},
|
|
2012
|
+
go: {
|
|
2013
|
+
method: 'client.RPCNodes.Flex.Get',
|
|
2014
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tflex, err := client.RPCNodes.Flex.Get(context.TODO(), "node_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", flex.ID)\n}\n',
|
|
2015
|
+
},
|
|
2016
|
+
http: {
|
|
2017
|
+
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/$NODE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2018
|
+
},
|
|
2019
|
+
typescript: {
|
|
2020
|
+
method: 'client.rpcNodes.flex.get',
|
|
2021
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst flex = await client.rpcNodes.flex.get('node_id');\n\nconsole.log(flex.id);",
|
|
2022
|
+
},
|
|
2023
|
+
},
|
|
854
2024
|
},
|
|
855
2025
|
{
|
|
856
2026
|
name: 'update',
|
|
@@ -863,18 +2033,23 @@ const EMBEDDED_METHODS = [
|
|
|
863
2033
|
params: ['node_id: string;', 'name?: string;', 'tags?: string[];'],
|
|
864
2034
|
response: '{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }',
|
|
865
2035
|
markdown: "## update\n\n`client.rpcNodes.flex.update(node_id: string, name?: string, tags?: string[]): { id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n\n**patch** `/v1/rpc_nodes/flex/{node_id}`\n\nUpdate an existing RPC Node Flex\n\n### Parameters\n\n- `node_id: string`\n\n- `name?: string`\n Name of the RPC Node Flex.\n\n- `tags?: string[]`\n Tags to attach to the RPC Node Flex (optional, max 50).\n\n### Returns\n\n- `{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n RPC Node Flex details.\n\n - `id: string`\n - `blockchain: string`\n - `created_at: string`\n - `endpoint: string`\n - `name: string`\n - `network: string`\n - `project_id: string`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst flex = await client.rpcNodes.flex.update('node_id');\n\nconsole.log(flex);\n```",
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
2036
|
+
perLanguage: {
|
|
2037
|
+
cli: {
|
|
2038
|
+
method: 'flex update',
|
|
2039
|
+
example: "nirvana rpc-nodes:flex update \\\n --api-key 'My API Key' \\\n --node-id node_id",
|
|
2040
|
+
},
|
|
2041
|
+
go: {
|
|
2042
|
+
method: 'client.RPCNodes.Flex.Update',
|
|
2043
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/rpc_nodes"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tflex, err := client.RPCNodes.Flex.Update(\n\t\tcontext.TODO(),\n\t\t"node_id",\n\t\trpc_nodes.FlexUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", flex.ID)\n}\n',
|
|
2044
|
+
},
|
|
2045
|
+
http: {
|
|
2046
|
+
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/$NODE_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-ethereum-node",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2047
|
+
},
|
|
2048
|
+
typescript: {
|
|
2049
|
+
method: 'client.rpcNodes.flex.update',
|
|
2050
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst flex = await client.rpcNodes.flex.update('node_id');\n\nconsole.log(flex.id);",
|
|
2051
|
+
},
|
|
2052
|
+
},
|
|
878
2053
|
},
|
|
879
2054
|
{
|
|
880
2055
|
name: 'delete',
|
|
@@ -886,18 +2061,52 @@ const EMBEDDED_METHODS = [
|
|
|
886
2061
|
qualified: 'client.rpcNodes.flex.delete',
|
|
887
2062
|
params: ['node_id: string;'],
|
|
888
2063
|
markdown: "## delete\n\n`client.rpcNodes.flex.delete(node_id: string): void`\n\n**delete** `/v1/rpc_nodes/flex/{node_id}`\n\nDelete an RPC Node Flex\n\n### Parameters\n\n- `node_id: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.rpcNodes.flex.delete('node_id')\n```",
|
|
2064
|
+
perLanguage: {
|
|
2065
|
+
cli: {
|
|
2066
|
+
method: 'flex delete',
|
|
2067
|
+
example: "nirvana rpc-nodes:flex delete \\\n --api-key 'My API Key' \\\n --node-id node_id",
|
|
2068
|
+
},
|
|
2069
|
+
go: {
|
|
2070
|
+
method: 'client.RPCNodes.Flex.Delete',
|
|
2071
|
+
example: 'package main\n\nimport (\n\t"context"\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\terr := client.RPCNodes.Flex.Delete(context.TODO(), "node_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
2072
|
+
},
|
|
2073
|
+
http: {
|
|
2074
|
+
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/$NODE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2075
|
+
},
|
|
2076
|
+
typescript: {
|
|
2077
|
+
method: 'client.rpcNodes.flex.delete',
|
|
2078
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.rpcNodes.flex.delete('node_id');",
|
|
2079
|
+
},
|
|
2080
|
+
},
|
|
889
2081
|
},
|
|
890
2082
|
{
|
|
891
|
-
name: '
|
|
892
|
-
endpoint: '/v1/rpc_nodes/flex
|
|
2083
|
+
name: 'list',
|
|
2084
|
+
endpoint: '/v1/rpc_nodes/flex',
|
|
893
2085
|
httpMethod: 'get',
|
|
894
|
-
summary: '
|
|
895
|
-
description: '
|
|
896
|
-
stainlessPath: '(resource) rpc_nodes.flex > (method)
|
|
897
|
-
qualified: 'client.rpcNodes.flex.
|
|
898
|
-
params: ['
|
|
2086
|
+
summary: 'List RPC Node Flex',
|
|
2087
|
+
description: 'List all RPC Node Flex you created',
|
|
2088
|
+
stainlessPath: '(resource) rpc_nodes.flex > (method) list',
|
|
2089
|
+
qualified: 'client.rpcNodes.flex.list',
|
|
2090
|
+
params: ['project_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
899
2091
|
response: '{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }',
|
|
900
|
-
markdown: "##
|
|
2092
|
+
markdown: "## list\n\n`client.rpcNodes.flex.list(project_id: string, cursor?: string, limit?: number): { id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n\n**get** `/v1/rpc_nodes/flex`\n\nList all RPC Node Flex you created\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; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n RPC Node Flex details.\n\n - `id: string`\n - `blockchain: string`\n - `created_at: string`\n - `endpoint: string`\n - `name: string`\n - `network: string`\n - `project_id: string`\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 flex of client.rpcNodes.flex.list({ project_id: 'project_id' })) {\n console.log(flex);\n}\n```",
|
|
2093
|
+
perLanguage: {
|
|
2094
|
+
cli: {
|
|
2095
|
+
method: 'flex list',
|
|
2096
|
+
example: "nirvana rpc-nodes:flex list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
2097
|
+
},
|
|
2098
|
+
go: {
|
|
2099
|
+
method: 'client.RPCNodes.Flex.List',
|
|
2100
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/rpc_nodes"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.RPCNodes.Flex.List(context.TODO(), rpc_nodes.FlexListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2101
|
+
},
|
|
2102
|
+
http: {
|
|
2103
|
+
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2104
|
+
},
|
|
2105
|
+
typescript: {
|
|
2106
|
+
method: 'client.rpcNodes.flex.list',
|
|
2107
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const flex of client.rpcNodes.flex.list({ project_id: 'project_id' })) {\n console.log(flex.id);\n}",
|
|
2108
|
+
},
|
|
2109
|
+
},
|
|
901
2110
|
},
|
|
902
2111
|
{
|
|
903
2112
|
name: 'list',
|
|
@@ -910,18 +2119,23 @@ const EMBEDDED_METHODS = [
|
|
|
910
2119
|
params: ['cursor?: string;', 'limit?: number;'],
|
|
911
2120
|
response: '{ blockchain: string; network: string; }',
|
|
912
2121
|
markdown: "## list\n\n`client.rpcNodes.flex.blockchains.list(cursor?: string, limit?: number): { blockchain: string; network: string; }`\n\n**get** `/v1/rpc_nodes/flex/blockchains`\n\nList all Flex Blockchains\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ blockchain: string; network: string; }`\n Blockchain supported by the RPC Node Flex.\n\n - `blockchain: string`\n - `network: 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 flexBlockchain of client.rpcNodes.flex.blockchains.list()) {\n console.log(flexBlockchain);\n}\n```",
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
2122
|
+
perLanguage: {
|
|
2123
|
+
cli: {
|
|
2124
|
+
method: 'blockchains list',
|
|
2125
|
+
example: "nirvana rpc-nodes:flex:blockchains list \\\n --api-key 'My API Key'",
|
|
2126
|
+
},
|
|
2127
|
+
go: {
|
|
2128
|
+
method: 'client.RPCNodes.Flex.Blockchains.List',
|
|
2129
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/rpc_nodes"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.RPCNodes.Flex.Blockchains.List(context.TODO(), rpc_nodes.FlexBlockchainListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2130
|
+
},
|
|
2131
|
+
http: {
|
|
2132
|
+
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/blockchains \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2133
|
+
},
|
|
2134
|
+
typescript: {
|
|
2135
|
+
method: 'client.rpcNodes.flex.blockchains.list',
|
|
2136
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const flexBlockchain of client.rpcNodes.flex.blockchains.list()) {\n console.log(flexBlockchain.blockchain);\n}",
|
|
2137
|
+
},
|
|
2138
|
+
},
|
|
925
2139
|
},
|
|
926
2140
|
{
|
|
927
2141
|
name: 'get',
|
|
@@ -934,6 +2148,52 @@ const EMBEDDED_METHODS = [
|
|
|
934
2148
|
params: ['node_id: string;'],
|
|
935
2149
|
response: '{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }',
|
|
936
2150
|
markdown: "## get\n\n`client.rpcNodes.dedicated.get(node_id: string): { id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n\n**get** `/v1/rpc_nodes/dedicated/{node_id}`\n\nGet details about an RPC Node Dedicated\n\n### Parameters\n\n- `node_id: string`\n\n### Returns\n\n- `{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n RPC Node Dedicated details.\n\n - `id: string`\n - `blockchain: string`\n - `created_at: string`\n - `endpoint: string`\n - `name: string`\n - `network: string`\n - `project_id: string`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst dedicated = await client.rpcNodes.dedicated.get('node_id');\n\nconsole.log(dedicated);\n```",
|
|
2151
|
+
perLanguage: {
|
|
2152
|
+
cli: {
|
|
2153
|
+
method: 'dedicated get',
|
|
2154
|
+
example: "nirvana rpc-nodes:dedicated get \\\n --api-key 'My API Key' \\\n --node-id node_id",
|
|
2155
|
+
},
|
|
2156
|
+
go: {
|
|
2157
|
+
method: 'client.RPCNodes.Dedicated.Get',
|
|
2158
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdedicated, err := client.RPCNodes.Dedicated.Get(context.TODO(), "node_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dedicated.ID)\n}\n',
|
|
2159
|
+
},
|
|
2160
|
+
http: {
|
|
2161
|
+
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/dedicated/$NODE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2162
|
+
},
|
|
2163
|
+
typescript: {
|
|
2164
|
+
method: 'client.rpcNodes.dedicated.get',
|
|
2165
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst dedicated = await client.rpcNodes.dedicated.get('node_id');\n\nconsole.log(dedicated.id);",
|
|
2166
|
+
},
|
|
2167
|
+
},
|
|
2168
|
+
},
|
|
2169
|
+
{
|
|
2170
|
+
name: 'list',
|
|
2171
|
+
endpoint: '/v1/rpc_nodes/dedicated',
|
|
2172
|
+
httpMethod: 'get',
|
|
2173
|
+
summary: 'List RPC Node Dedicated',
|
|
2174
|
+
description: 'List all RPC Node Dedicated you created',
|
|
2175
|
+
stainlessPath: '(resource) rpc_nodes.dedicated > (method) list',
|
|
2176
|
+
qualified: 'client.rpcNodes.dedicated.list',
|
|
2177
|
+
params: ['project_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
2178
|
+
response: '{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }',
|
|
2179
|
+
markdown: "## list\n\n`client.rpcNodes.dedicated.list(project_id: string, cursor?: string, limit?: number): { id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n\n**get** `/v1/rpc_nodes/dedicated`\n\nList all RPC Node Dedicated you created\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; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n RPC Node Dedicated details.\n\n - `id: string`\n - `blockchain: string`\n - `created_at: string`\n - `endpoint: string`\n - `name: string`\n - `network: string`\n - `project_id: string`\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 dedicated of client.rpcNodes.dedicated.list({ project_id: 'project_id' })) {\n console.log(dedicated);\n}\n```",
|
|
2180
|
+
perLanguage: {
|
|
2181
|
+
cli: {
|
|
2182
|
+
method: 'dedicated list',
|
|
2183
|
+
example: "nirvana rpc-nodes:dedicated list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
2184
|
+
},
|
|
2185
|
+
go: {
|
|
2186
|
+
method: 'client.RPCNodes.Dedicated.List',
|
|
2187
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/rpc_nodes"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.RPCNodes.Dedicated.List(context.TODO(), rpc_nodes.DedicatedListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2188
|
+
},
|
|
2189
|
+
http: {
|
|
2190
|
+
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/dedicated \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2191
|
+
},
|
|
2192
|
+
typescript: {
|
|
2193
|
+
method: 'client.rpcNodes.dedicated.list',
|
|
2194
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const dedicated of client.rpcNodes.dedicated.list({ project_id: 'project_id' })) {\n console.log(dedicated.id);\n}",
|
|
2195
|
+
},
|
|
2196
|
+
},
|
|
937
2197
|
},
|
|
938
2198
|
{
|
|
939
2199
|
name: 'list',
|
|
@@ -946,6 +2206,23 @@ const EMBEDDED_METHODS = [
|
|
|
946
2206
|
params: ['cursor?: string;', 'limit?: number;'],
|
|
947
2207
|
response: '{ blockchain: string; network: string; }',
|
|
948
2208
|
markdown: "## list\n\n`client.rpcNodes.dedicated.blockchains.list(cursor?: string, limit?: number): { blockchain: string; network: string; }`\n\n**get** `/v1/rpc_nodes/dedicated/blockchains`\n\nList all Dedicated Blockchains\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ blockchain: string; network: string; }`\n Blockchain supported by the RPC Node Dedicated.\n\n - `blockchain: string`\n - `network: 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 dedicatedBlockchain of client.rpcNodes.dedicated.blockchains.list()) {\n console.log(dedicatedBlockchain);\n}\n```",
|
|
2209
|
+
perLanguage: {
|
|
2210
|
+
cli: {
|
|
2211
|
+
method: 'blockchains list',
|
|
2212
|
+
example: "nirvana rpc-nodes:dedicated:blockchains list \\\n --api-key 'My API Key'",
|
|
2213
|
+
},
|
|
2214
|
+
go: {
|
|
2215
|
+
method: 'client.RPCNodes.Dedicated.Blockchains.List',
|
|
2216
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/rpc_nodes"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.RPCNodes.Dedicated.Blockchains.List(context.TODO(), rpc_nodes.DedicatedBlockchainListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2217
|
+
},
|
|
2218
|
+
http: {
|
|
2219
|
+
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/dedicated/blockchains \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2220
|
+
},
|
|
2221
|
+
typescript: {
|
|
2222
|
+
method: 'client.rpcNodes.dedicated.blockchains.list',
|
|
2223
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const dedicatedBlockchain of client.rpcNodes.dedicated.blockchains.list()) {\n console.log(dedicatedBlockchain.blockchain);\n}",
|
|
2224
|
+
},
|
|
2225
|
+
},
|
|
949
2226
|
},
|
|
950
2227
|
{
|
|
951
2228
|
name: 'create',
|
|
@@ -964,6 +2241,52 @@ const EMBEDDED_METHODS = [
|
|
|
964
2241
|
],
|
|
965
2242
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
966
2243
|
markdown: "## create\n\n`client.nks.clusters.create(name: string, project_id: string, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1', vpc_id: string, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/nks/clusters`\n\nCreate an NKS Cluster\n\n### Parameters\n\n- `name: string`\n Name of the Cluster.\n\n- `project_id: string`\n Project ID to create the Cluster in.\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n Region the resource is in.\n\n- `vpc_id: string`\n ID of the VPC to use for the Cluster.\n\n- `tags?: string[]`\n Tags to attach to the Cluster.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.nks.clusters.create({\n name: 'my-cluster',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-wdc-1',\n vpc_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation);\n```",
|
|
2244
|
+
perLanguage: {
|
|
2245
|
+
cli: {
|
|
2246
|
+
method: 'clusters create',
|
|
2247
|
+
example: "nirvana nks:clusters create \\\n --api-key 'My API Key' \\\n --name my-cluster \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-wdc-1 \\\n --vpc-id 123e4567-e89b-12d3-a456-426614174000",
|
|
2248
|
+
},
|
|
2249
|
+
go: {
|
|
2250
|
+
method: 'client.NKS.Clusters.New',
|
|
2251
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\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"),\n\t)\n\toperation, err := client.NKS.Clusters.New(context.TODO(), nks.ClusterNewParams{\n\t\tName: "my-cluster",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tRegion: shared.RegionNameUsWdc1,\n\t\tVPCID: "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',
|
|
2252
|
+
},
|
|
2253
|
+
http: {
|
|
2254
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-cluster",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-wdc-1",\n "vpc_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2255
|
+
},
|
|
2256
|
+
typescript: {
|
|
2257
|
+
method: 'client.nks.clusters.create',
|
|
2258
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.create({\n name: 'my-cluster',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-wdc-1',\n vpc_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);",
|
|
2259
|
+
},
|
|
2260
|
+
},
|
|
2261
|
+
},
|
|
2262
|
+
{
|
|
2263
|
+
name: 'get',
|
|
2264
|
+
endpoint: '/v1/nks/clusters/{cluster_id}',
|
|
2265
|
+
httpMethod: 'get',
|
|
2266
|
+
summary: 'Get NKS Cluster Details',
|
|
2267
|
+
description: 'Get details about an NKS cluster',
|
|
2268
|
+
stainlessPath: '(resource) nks.clusters > (method) get',
|
|
2269
|
+
qualified: 'client.nks.clusters.get',
|
|
2270
|
+
params: ['cluster_id: string;'],
|
|
2271
|
+
response: "{ id: string; created_at: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }",
|
|
2272
|
+
markdown: "## get\n\n`client.nks.clusters.get(cluster_id: string): { id: string; created_at: 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/{cluster_id}`\n\nGet details about an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; 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 - `created_at: string`\n - `name: string`\n - `pool_ids: string[]`\n - `private_ip: string`\n - `project_id: string`\n - `public_ip: string`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\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\nconst nksCluster = await client.nks.clusters.get('cluster_id');\n\nconsole.log(nksCluster);\n```",
|
|
2273
|
+
perLanguage: {
|
|
2274
|
+
cli: {
|
|
2275
|
+
method: 'clusters get',
|
|
2276
|
+
example: "nirvana nks:clusters get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2277
|
+
},
|
|
2278
|
+
go: {
|
|
2279
|
+
method: 'client.NKS.Clusters.Get',
|
|
2280
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksCluster, err := client.NKS.Clusters.Get(context.TODO(), "cluster_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksCluster.ID)\n}\n',
|
|
2281
|
+
},
|
|
2282
|
+
http: {
|
|
2283
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2284
|
+
},
|
|
2285
|
+
typescript: {
|
|
2286
|
+
method: 'client.nks.clusters.get',
|
|
2287
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksCluster = await client.nks.clusters.get('cluster_id');\n\nconsole.log(nksCluster.id);",
|
|
2288
|
+
},
|
|
2289
|
+
},
|
|
967
2290
|
},
|
|
968
2291
|
{
|
|
969
2292
|
name: 'update',
|
|
@@ -976,18 +2299,23 @@ const EMBEDDED_METHODS = [
|
|
|
976
2299
|
params: ['cluster_id: string;', 'name?: string;', 'tags?: string[];'],
|
|
977
2300
|
response: "{ id: string; created_at: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }",
|
|
978
2301
|
markdown: "## update\n\n`client.nks.clusters.update(cluster_id: string, name?: string, tags?: string[]): { id: string; created_at: 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**patch** `/v1/nks/clusters/{cluster_id}`\n\nUpdate an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `name?: string`\n Name of the Cluster.\n\n- `tags?: string[]`\n Tags to attach to the Cluster.\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; 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 - `created_at: string`\n - `name: string`\n - `pool_ids: string[]`\n - `private_ip: string`\n - `project_id: string`\n - `public_ip: string`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\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\nconst nksCluster = await client.nks.clusters.update('cluster_id');\n\nconsole.log(nksCluster);\n```",
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
2302
|
+
perLanguage: {
|
|
2303
|
+
cli: {
|
|
2304
|
+
method: 'clusters update',
|
|
2305
|
+
example: "nirvana nks:clusters update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2306
|
+
},
|
|
2307
|
+
go: {
|
|
2308
|
+
method: 'client.NKS.Clusters.Update',
|
|
2309
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksCluster, err := client.NKS.Clusters.Update(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksCluster.ID)\n}\n',
|
|
2310
|
+
},
|
|
2311
|
+
http: {
|
|
2312
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-cluster",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2313
|
+
},
|
|
2314
|
+
typescript: {
|
|
2315
|
+
method: 'client.nks.clusters.update',
|
|
2316
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksCluster = await client.nks.clusters.update('cluster_id');\n\nconsole.log(nksCluster.id);",
|
|
2317
|
+
},
|
|
2318
|
+
},
|
|
991
2319
|
},
|
|
992
2320
|
{
|
|
993
2321
|
name: 'delete',
|
|
@@ -1000,18 +2328,52 @@ const EMBEDDED_METHODS = [
|
|
|
1000
2328
|
params: ['cluster_id: string;'],
|
|
1001
2329
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1002
2330
|
markdown: "## delete\n\n`client.nks.clusters.delete(cluster_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/nks/clusters/{cluster_id}`\n\nDelete an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.nks.clusters.delete('cluster_id');\n\nconsole.log(operation);\n```",
|
|
2331
|
+
perLanguage: {
|
|
2332
|
+
cli: {
|
|
2333
|
+
method: 'clusters delete',
|
|
2334
|
+
example: "nirvana nks:clusters delete \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2335
|
+
},
|
|
2336
|
+
go: {
|
|
2337
|
+
method: 'client.NKS.Clusters.Delete',
|
|
2338
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.NKS.Clusters.Delete(context.TODO(), "cluster_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
2339
|
+
},
|
|
2340
|
+
http: {
|
|
2341
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2342
|
+
},
|
|
2343
|
+
typescript: {
|
|
2344
|
+
method: 'client.nks.clusters.delete',
|
|
2345
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.delete('cluster_id');\n\nconsole.log(operation.id);",
|
|
2346
|
+
},
|
|
2347
|
+
},
|
|
1003
2348
|
},
|
|
1004
2349
|
{
|
|
1005
|
-
name: '
|
|
1006
|
-
endpoint: '/v1/nks/clusters
|
|
2350
|
+
name: 'list',
|
|
2351
|
+
endpoint: '/v1/nks/clusters',
|
|
1007
2352
|
httpMethod: 'get',
|
|
1008
|
-
summary: '
|
|
1009
|
-
description: '
|
|
1010
|
-
stainlessPath: '(resource) nks.clusters > (method)
|
|
1011
|
-
qualified: 'client.nks.clusters.
|
|
1012
|
-
params: ['
|
|
2353
|
+
summary: 'List NKS Clusters',
|
|
2354
|
+
description: 'List all NKS clusters',
|
|
2355
|
+
stainlessPath: '(resource) nks.clusters > (method) list',
|
|
2356
|
+
qualified: 'client.nks.clusters.list',
|
|
2357
|
+
params: ['project_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
1013
2358
|
response: "{ id: string; created_at: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }",
|
|
1014
|
-
markdown: "##
|
|
2359
|
+
markdown: "## list\n\n`client.nks.clusters.list(project_id: string, cursor?: string, limit?: number): { id: string; created_at: 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; created_at: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'; 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 - `created_at: string`\n - `name: string`\n - `pool_ids: string[]`\n - `private_ip: string`\n - `project_id: string`\n - `public_ip: string`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\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```",
|
|
2360
|
+
perLanguage: {
|
|
2361
|
+
cli: {
|
|
2362
|
+
method: 'clusters list',
|
|
2363
|
+
example: "nirvana nks:clusters list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
2364
|
+
},
|
|
2365
|
+
go: {
|
|
2366
|
+
method: 'client.NKS.Clusters.List',
|
|
2367
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.List(context.TODO(), nks.ClusterListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2368
|
+
},
|
|
2369
|
+
http: {
|
|
2370
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2371
|
+
},
|
|
2372
|
+
typescript: {
|
|
2373
|
+
method: 'client.nks.clusters.list',
|
|
2374
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksCluster of client.nks.clusters.list({ project_id: 'project_id' })) {\n console.log(nksCluster.id);\n}",
|
|
2375
|
+
},
|
|
2376
|
+
},
|
|
1015
2377
|
},
|
|
1016
2378
|
{
|
|
1017
2379
|
name: 'create',
|
|
@@ -1029,6 +2391,23 @@ const EMBEDDED_METHODS = [
|
|
|
1029
2391
|
'tags?: string[];',
|
|
1030
2392
|
],
|
|
1031
2393
|
markdown: "## create\n\n`client.nks.clusters.availability.create(name: string, project_id: string, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1', vpc_id: string, tags?: string[]): void`\n\n**post** `/v1/nks/clusters/availability`\n\nCheck if an NKS cluster can be created\n\n### Parameters\n\n- `name: string`\n Name of the Cluster.\n\n- `project_id: string`\n Project ID to create the Cluster in.\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1' | 'us-wdc-1'`\n Region the resource is in.\n\n- `vpc_id: string`\n ID of the VPC to use for the Cluster.\n\n- `tags?: string[]`\n Tags to attach to the Cluster.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.nks.clusters.availability.create({\n name: 'my-cluster',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-wdc-1',\n vpc_id: '123e4567-e89b-12d3-a456-426614174000',\n})\n```",
|
|
2394
|
+
perLanguage: {
|
|
2395
|
+
cli: {
|
|
2396
|
+
method: 'availability create',
|
|
2397
|
+
example: "nirvana nks:clusters:availability create \\\n --api-key 'My API Key' \\\n --name my-cluster \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-wdc-1 \\\n --vpc-id 123e4567-e89b-12d3-a456-426614174000",
|
|
2398
|
+
},
|
|
2399
|
+
go: {
|
|
2400
|
+
method: 'client.NKS.Clusters.Availability.New',
|
|
2401
|
+
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\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"),\n\t)\n\terr := client.NKS.Clusters.Availability.New(context.TODO(), nks.ClusterAvailabilityNewParams{\n\t\tName: "my-cluster",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tRegion: shared.RegionNameUsWdc1,\n\t\tVPCID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
2402
|
+
},
|
|
2403
|
+
http: {
|
|
2404
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-cluster",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-wdc-1",\n "vpc_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2405
|
+
},
|
|
2406
|
+
typescript: {
|
|
2407
|
+
method: 'client.nks.clusters.availability.create',
|
|
2408
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.availability.create({\n name: 'my-cluster',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-wdc-1',\n vpc_id: '123e4567-e89b-12d3-a456-426614174000',\n});",
|
|
2409
|
+
},
|
|
2410
|
+
},
|
|
1032
2411
|
},
|
|
1033
2412
|
{
|
|
1034
2413
|
name: 'update',
|
|
@@ -1040,6 +2419,23 @@ const EMBEDDED_METHODS = [
|
|
|
1040
2419
|
qualified: 'client.nks.clusters.availability.update',
|
|
1041
2420
|
params: ['cluster_id: string;', 'name?: string;', 'tags?: string[];'],
|
|
1042
2421
|
markdown: "## update\n\n`client.nks.clusters.availability.update(cluster_id: string, name?: string, tags?: string[]): void`\n\n**patch** `/v1/nks/clusters/{cluster_id}/availability`\n\nCheck if an NKS cluster can be updated\n\n### Parameters\n\n- `cluster_id: string`\n\n- `name?: string`\n Name of the Cluster.\n\n- `tags?: string[]`\n Tags to attach to the Cluster.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.nks.clusters.availability.update('cluster_id')\n```",
|
|
2422
|
+
perLanguage: {
|
|
2423
|
+
cli: {
|
|
2424
|
+
method: 'availability update',
|
|
2425
|
+
example: "nirvana nks:clusters:availability update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2426
|
+
},
|
|
2427
|
+
go: {
|
|
2428
|
+
method: 'client.NKS.Clusters.Availability.Update',
|
|
2429
|
+
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.NKS.Clusters.Availability.Update(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterAvailabilityUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
2430
|
+
},
|
|
2431
|
+
http: {
|
|
2432
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-cluster",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2433
|
+
},
|
|
2434
|
+
typescript: {
|
|
2435
|
+
method: 'client.nks.clusters.availability.update',
|
|
2436
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.availability.update('cluster_id');",
|
|
2437
|
+
},
|
|
2438
|
+
},
|
|
1043
2439
|
},
|
|
1044
2440
|
{
|
|
1045
2441
|
name: 'get',
|
|
@@ -1052,18 +2448,23 @@ const EMBEDDED_METHODS = [
|
|
|
1052
2448
|
params: ['cluster_id: string;'],
|
|
1053
2449
|
response: '{ kubeconfig: string; }',
|
|
1054
2450
|
markdown: "## get\n\n`client.nks.clusters.kubeconfig.get(cluster_id: string): { kubeconfig: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/kubeconfig`\n\nGet the kubeconfig for an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n### Returns\n\n- `{ kubeconfig: string; }`\n Kubeconfig for an NKS Cluster.\n\n - `kubeconfig: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst kubeconfig = await client.nks.clusters.kubeconfig.get('cluster_id');\n\nconsole.log(kubeconfig);\n```",
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
2451
|
+
perLanguage: {
|
|
2452
|
+
cli: {
|
|
2453
|
+
method: 'kubeconfig get',
|
|
2454
|
+
example: "nirvana nks:clusters:kubeconfig get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2455
|
+
},
|
|
2456
|
+
go: {
|
|
2457
|
+
method: 'client.NKS.Clusters.Kubeconfig.Get',
|
|
2458
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tkubeconfig, err := client.NKS.Clusters.Kubeconfig.Get(context.TODO(), "cluster_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", kubeconfig.Kubeconfig)\n}\n',
|
|
2459
|
+
},
|
|
2460
|
+
http: {
|
|
2461
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/kubeconfig \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2462
|
+
},
|
|
2463
|
+
typescript: {
|
|
2464
|
+
method: 'client.nks.clusters.kubeconfig.get',
|
|
2465
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst kubeconfig = await client.nks.clusters.kubeconfig.get('cluster_id');\n\nconsole.log(kubeconfig.kubeconfig);",
|
|
2466
|
+
},
|
|
2467
|
+
},
|
|
1067
2468
|
},
|
|
1068
2469
|
{
|
|
1069
2470
|
name: 'get',
|
|
@@ -1076,18 +2477,52 @@ const EMBEDDED_METHODS = [
|
|
|
1076
2477
|
params: ['cluster_id: string;', 'controller_id: string;'],
|
|
1077
2478
|
response: "{ id: string; cpu_config: { vcpu: number; }; created_at: string; memory_config: { size: number; }; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
1078
2479
|
markdown: "## get\n\n`client.nks.clusters.controllers.get(cluster_id: string, controller_id: string): { id: string; cpu_config: nks_controller_cpu_config_response; created_at: string; memory_config: nks_controller_memory_config_response; name: string; private_ip: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/controllers/{controller_id}`\n\nGet details about an NKS controller\n\n### Parameters\n\n- `cluster_id: string`\n\n- `controller_id: string`\n\n### Returns\n\n- `{ id: string; cpu_config: { vcpu: number; }; created_at: string; memory_config: { size: number; }; 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 - `cpu_config: { vcpu: number; }`\n - `created_at: string`\n - `memory_config: { size: number; }`\n - `name: string`\n - `private_ip: string`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst nksController = await client.nks.clusters.controllers.get('controller_id', { cluster_id: 'cluster_id' });\n\nconsole.log(nksController);\n```",
|
|
2480
|
+
perLanguage: {
|
|
2481
|
+
cli: {
|
|
2482
|
+
method: 'controllers get',
|
|
2483
|
+
example: "nirvana nks:clusters:controllers get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --controller-id controller_id",
|
|
2484
|
+
},
|
|
2485
|
+
go: {
|
|
2486
|
+
method: 'client.NKS.Clusters.Controllers.Get',
|
|
2487
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksController, err := client.NKS.Clusters.Controllers.Get(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"controller_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksController.ID)\n}\n',
|
|
2488
|
+
},
|
|
2489
|
+
http: {
|
|
2490
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers/$CONTROLLER_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2491
|
+
},
|
|
2492
|
+
typescript: {
|
|
2493
|
+
method: 'client.nks.clusters.controllers.get',
|
|
2494
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksController = await client.nks.clusters.controllers.get('controller_id', {\n cluster_id: 'cluster_id',\n});\n\nconsole.log(nksController.id);",
|
|
2495
|
+
},
|
|
2496
|
+
},
|
|
1079
2497
|
},
|
|
1080
2498
|
{
|
|
1081
2499
|
name: 'list',
|
|
1082
|
-
endpoint: '/v1/nks/clusters/{cluster_id}/controllers
|
|
2500
|
+
endpoint: '/v1/nks/clusters/{cluster_id}/controllers',
|
|
1083
2501
|
httpMethod: 'get',
|
|
1084
|
-
summary: 'List NKS
|
|
1085
|
-
description: 'List all
|
|
1086
|
-
stainlessPath: '(resource) nks.clusters.controllers
|
|
1087
|
-
qualified: 'client.nks.clusters.controllers.
|
|
1088
|
-
params: ['cluster_id: string;', '
|
|
1089
|
-
response: "{ id: string; created_at: string;
|
|
1090
|
-
markdown: "## list\n\n`client.nks.clusters.controllers.
|
|
2502
|
+
summary: 'List NKS Controllers',
|
|
2503
|
+
description: 'List all controllers in an NKS cluster',
|
|
2504
|
+
stainlessPath: '(resource) nks.clusters.controllers > (method) list',
|
|
2505
|
+
qualified: 'client.nks.clusters.controllers.list',
|
|
2506
|
+
params: ['cluster_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
2507
|
+
response: "{ id: string; cpu_config: { vcpu: number; }; created_at: string; memory_config: { size: number; }; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
2508
|
+
markdown: "## list\n\n`client.nks.clusters.controllers.list(cluster_id: string, cursor?: string, limit?: number): { id: string; cpu_config: nks_controller_cpu_config_response; created_at: string; memory_config: nks_controller_memory_config_response; 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; cpu_config: { vcpu: number; }; created_at: string; memory_config: { size: number; }; 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 - `cpu_config: { vcpu: number; }`\n - `created_at: string`\n - `memory_config: { size: number; }`\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```",
|
|
2509
|
+
perLanguage: {
|
|
2510
|
+
cli: {
|
|
2511
|
+
method: 'controllers list',
|
|
2512
|
+
example: "nirvana nks:clusters:controllers list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2513
|
+
},
|
|
2514
|
+
go: {
|
|
2515
|
+
method: 'client.NKS.Clusters.Controllers.List',
|
|
2516
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.Controllers.List(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterControllerListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2517
|
+
},
|
|
2518
|
+
http: {
|
|
2519
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2520
|
+
},
|
|
2521
|
+
typescript: {
|
|
2522
|
+
method: 'client.nks.clusters.controllers.list',
|
|
2523
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksController of client.nks.clusters.controllers.list('cluster_id')) {\n console.log(nksController.id);\n}",
|
|
2524
|
+
},
|
|
2525
|
+
},
|
|
1091
2526
|
},
|
|
1092
2527
|
{
|
|
1093
2528
|
name: 'get',
|
|
@@ -1100,18 +2535,52 @@ const EMBEDDED_METHODS = [
|
|
|
1100
2535
|
params: ['cluster_id: string;', 'controller_id: string;', 'volume_id: string;'],
|
|
1101
2536
|
response: "{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
1102
2537
|
markdown: "## get\n\n`client.nks.clusters.controllers.volumes.get(cluster_id: string, controller_id: string, volume_id: string): { 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/{volume_id}`\n\nGet details about a volume attached to an NKS controller\n\n### Parameters\n\n- `cluster_id: string`\n\n- `controller_id: string`\n\n- `volume_id: string`\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\nconst nksControllerVolume = await client.nks.clusters.controllers.volumes.get('volume_id', { cluster_id: 'cluster_id', controller_id: 'controller_id' });\n\nconsole.log(nksControllerVolume);\n```",
|
|
2538
|
+
perLanguage: {
|
|
2539
|
+
cli: {
|
|
2540
|
+
method: 'volumes get',
|
|
2541
|
+
example: "nirvana nks:clusters:controllers:volumes get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --controller-id controller_id \\\n --volume-id volume_id",
|
|
2542
|
+
},
|
|
2543
|
+
go: {
|
|
2544
|
+
method: 'client.NKS.Clusters.Controllers.Volumes.Get',
|
|
2545
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksControllerVolume, err := client.NKS.Clusters.Controllers.Volumes.Get(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"controller_id",\n\t\t"volume_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksControllerVolume.ID)\n}\n',
|
|
2546
|
+
},
|
|
2547
|
+
http: {
|
|
2548
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers/$CONTROLLER_ID/volumes/$VOLUME_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2549
|
+
},
|
|
2550
|
+
typescript: {
|
|
2551
|
+
method: 'client.nks.clusters.controllers.volumes.get',
|
|
2552
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksControllerVolume = await client.nks.clusters.controllers.volumes.get('volume_id', {\n cluster_id: 'cluster_id',\n controller_id: 'controller_id',\n});\n\nconsole.log(nksControllerVolume.id);",
|
|
2553
|
+
},
|
|
2554
|
+
},
|
|
1103
2555
|
},
|
|
1104
2556
|
{
|
|
1105
2557
|
name: 'list',
|
|
1106
|
-
endpoint: '/v1/nks/clusters/{cluster_id}/
|
|
2558
|
+
endpoint: '/v1/nks/clusters/{cluster_id}/controllers/{controller_id}/volumes',
|
|
1107
2559
|
httpMethod: 'get',
|
|
1108
|
-
summary: 'List NKS
|
|
1109
|
-
description: 'List all
|
|
1110
|
-
stainlessPath: '(resource) nks.clusters.
|
|
1111
|
-
qualified: 'client.nks.clusters.
|
|
1112
|
-
params: ['cluster_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
1113
|
-
response: "{ id: string;
|
|
1114
|
-
markdown: "## list\n\n`client.nks.clusters.
|
|
2560
|
+
summary: 'List NKS Controller Volumes',
|
|
2561
|
+
description: 'List all volumes attached to an NKS controller',
|
|
2562
|
+
stainlessPath: '(resource) nks.clusters.controllers.volumes > (method) list',
|
|
2563
|
+
qualified: 'client.nks.clusters.controllers.volumes.list',
|
|
2564
|
+
params: ['cluster_id: string;', 'controller_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
2565
|
+
response: "{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
2566
|
+
markdown: "## list\n\n`client.nks.clusters.controllers.volumes.list(cluster_id: string, controller_id: string, cursor?: string, limit?: number): { id: string; created_at: string; kind: volume_kind; name: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/controllers/{controller_id}/volumes`\n\nList all volumes attached to an NKS controller\n\n### Parameters\n\n- `cluster_id: string`\n\n- `controller_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS controller volume details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'boot' | 'data'`\n - `name: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const nksControllerVolume of client.nks.clusters.controllers.volumes.list('controller_id', { cluster_id: 'cluster_id' })) {\n console.log(nksControllerVolume);\n}\n```",
|
|
2567
|
+
perLanguage: {
|
|
2568
|
+
cli: {
|
|
2569
|
+
method: 'volumes list',
|
|
2570
|
+
example: "nirvana nks:clusters:controllers:volumes list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --controller-id controller_id",
|
|
2571
|
+
},
|
|
2572
|
+
go: {
|
|
2573
|
+
method: 'client.NKS.Clusters.Controllers.Volumes.List',
|
|
2574
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.Controllers.Volumes.List(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"controller_id",\n\t\tnks.ClusterControllerVolumeListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2575
|
+
},
|
|
2576
|
+
http: {
|
|
2577
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers/$CONTROLLER_ID/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2578
|
+
},
|
|
2579
|
+
typescript: {
|
|
2580
|
+
method: 'client.nks.clusters.controllers.volumes.list',
|
|
2581
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksControllerVolume of client.nks.clusters.controllers.volumes.list(\n 'controller_id',\n { cluster_id: 'cluster_id' },\n)) {\n console.log(nksControllerVolume.id);\n}",
|
|
2582
|
+
},
|
|
2583
|
+
},
|
|
1115
2584
|
},
|
|
1116
2585
|
{
|
|
1117
2586
|
name: 'get',
|
|
@@ -1124,6 +2593,52 @@ const EMBEDDED_METHODS = [
|
|
|
1124
2593
|
params: ['cluster_id: string;', 'load_balancer_id: string;'],
|
|
1125
2594
|
response: "{ id: string; cluster_id: string; created_at: string; namespace: string; private_ip: string; service_name: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
1126
2595
|
markdown: "## get\n\n`client.nks.clusters.loadBalancers.get(cluster_id: string, load_balancer_id: string): { id: string; cluster_id: string; created_at: string; namespace: string; private_ip: string; service_name: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/load_balancers/{load_balancer_id}`\n\nGet details about an NKS load balancer\n\n### Parameters\n\n- `cluster_id: string`\n\n- `load_balancer_id: string`\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; namespace: string; private_ip: string; 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 - `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\nconst nksLoadBalancer = await client.nks.clusters.loadBalancers.get('load_balancer_id', { cluster_id: 'cluster_id' });\n\nconsole.log(nksLoadBalancer);\n```",
|
|
2596
|
+
perLanguage: {
|
|
2597
|
+
cli: {
|
|
2598
|
+
method: 'load_balancers get',
|
|
2599
|
+
example: "nirvana nks:clusters:load-balancers get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --load-balancer-id load_balancer_id",
|
|
2600
|
+
},
|
|
2601
|
+
go: {
|
|
2602
|
+
method: 'client.NKS.Clusters.LoadBalancers.Get',
|
|
2603
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksLoadBalancer, err := client.NKS.Clusters.LoadBalancers.Get(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"load_balancer_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksLoadBalancer.ID)\n}\n',
|
|
2604
|
+
},
|
|
2605
|
+
http: {
|
|
2606
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/load_balancers/$LOAD_BALANCER_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2607
|
+
},
|
|
2608
|
+
typescript: {
|
|
2609
|
+
method: 'client.nks.clusters.loadBalancers.get',
|
|
2610
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksLoadBalancer = await client.nks.clusters.loadBalancers.get('load_balancer_id', {\n cluster_id: 'cluster_id',\n});\n\nconsole.log(nksLoadBalancer.id);",
|
|
2611
|
+
},
|
|
2612
|
+
},
|
|
2613
|
+
},
|
|
2614
|
+
{
|
|
2615
|
+
name: 'list',
|
|
2616
|
+
endpoint: '/v1/nks/clusters/{cluster_id}/load_balancers',
|
|
2617
|
+
httpMethod: 'get',
|
|
2618
|
+
summary: 'List NKS Load Balancers',
|
|
2619
|
+
description: 'List all load balancers in an NKS cluster',
|
|
2620
|
+
stainlessPath: '(resource) nks.clusters.load_balancers > (method) list',
|
|
2621
|
+
qualified: 'client.nks.clusters.loadBalancers.list',
|
|
2622
|
+
params: ['cluster_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
2623
|
+
response: "{ id: string; cluster_id: string; created_at: string; namespace: string; private_ip: string; service_name: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
2624
|
+
markdown: "## list\n\n`client.nks.clusters.loadBalancers.list(cluster_id: string, cursor?: string, limit?: number): { id: string; cluster_id: string; created_at: string; namespace: string; private_ip: string; 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\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; namespace: string; private_ip: string; 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 - `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```",
|
|
2625
|
+
perLanguage: {
|
|
2626
|
+
cli: {
|
|
2627
|
+
method: 'load_balancers list',
|
|
2628
|
+
example: "nirvana nks:clusters:load-balancers list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2629
|
+
},
|
|
2630
|
+
go: {
|
|
2631
|
+
method: 'client.NKS.Clusters.LoadBalancers.List',
|
|
2632
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.LoadBalancers.List(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterLoadBalancerListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2633
|
+
},
|
|
2634
|
+
http: {
|
|
2635
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/load_balancers \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2636
|
+
},
|
|
2637
|
+
typescript: {
|
|
2638
|
+
method: 'client.nks.clusters.loadBalancers.list',
|
|
2639
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksLoadBalancer of client.nks.clusters.loadBalancers.list('cluster_id')) {\n console.log(nksLoadBalancer.id);\n}",
|
|
2640
|
+
},
|
|
2641
|
+
},
|
|
1127
2642
|
},
|
|
1128
2643
|
{
|
|
1129
2644
|
name: 'create',
|
|
@@ -1142,6 +2657,52 @@ const EMBEDDED_METHODS = [
|
|
|
1142
2657
|
],
|
|
1143
2658
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1144
2659
|
markdown: "## create\n\n`client.nks.clusters.pools.create(cluster_id: string, name: string, node_config: { boot_volume: nks_node_pool_boot_volume; cpu_config: nks_node_pool_cpu_config; memory_config: nks_node_pool_memory_config; }, node_count: number, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/nks/clusters/{cluster_id}/pools`\n\nCreate a node pool in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `name: string`\n Name of the node pool.\n\n- `node_config: { boot_volume: { size: number; type: volume_type; }; cpu_config: { vcpu: number; }; memory_config: { size: number; }; }`\n Node configuration.\n - `boot_volume: { size: number; type: 'nvme' | 'abs'; }`\n Boot volume configuration.\n - `cpu_config: { vcpu: number; }`\n CPU configuration.\n - `memory_config: { size: number; }`\n Memory configuration.\n\n- `node_count: number`\n Number of nodes. Must be between 1 and 100.\n\n- `tags?: string[]`\n Tags to attach to the node pool.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.nks.clusters.pools.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n cpu_config: { vcpu: 4 },\n memory_config: { size: 8 },\n},\n node_count: 3,\n});\n\nconsole.log(operation);\n```",
|
|
2660
|
+
perLanguage: {
|
|
2661
|
+
cli: {
|
|
2662
|
+
method: 'pools create',
|
|
2663
|
+
example: "nirvana nks:clusters:pools create \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --name my-node-pool \\\n --node-config '{boot_volume: {size: 100, type: abs}, cpu_config: {vcpu: 4}, memory_config: {size: 8}}' \\\n --node-count 3",
|
|
2664
|
+
},
|
|
2665
|
+
go: {
|
|
2666
|
+
method: 'client.NKS.Clusters.Pools.New',
|
|
2667
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.NKS.Clusters.Pools.New(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterPoolNewParams{\n\t\t\tName: "my-node-pool",\n\t\t\tNodeConfig: nks.NKSNodePoolNodeConfigParam{\n\t\t\t\tBootVolume: nks.NKSNodePoolBootVolumeParam{\n\t\t\t\t\tSize: 100,\n\t\t\t\t\tType: compute.VolumeTypeABS,\n\t\t\t\t},\n\t\t\t\tCPUConfig: nks.NKSNodePoolCPUConfigParam{\n\t\t\t\t\tVcpu: 4,\n\t\t\t\t},\n\t\t\t\tMemoryConfig: nks.NKSNodePoolMemoryConfigParam{\n\t\t\t\t\tSize: 8,\n\t\t\t\t},\n\t\t\t},\n\t\t\tNodeCount: 3,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
2668
|
+
},
|
|
2669
|
+
http: {
|
|
2670
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_config": {\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "cpu_config": {\n "vcpu": 4\n },\n "memory_config": {\n "size": 8\n }\n },\n "node_count": 3,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2671
|
+
},
|
|
2672
|
+
typescript: {
|
|
2673
|
+
method: 'client.nks.clusters.pools.create',
|
|
2674
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n cpu_config: { vcpu: 4 },\n memory_config: { size: 8 },\n },\n node_count: 3,\n});\n\nconsole.log(operation.id);",
|
|
2675
|
+
},
|
|
2676
|
+
},
|
|
2677
|
+
},
|
|
2678
|
+
{
|
|
2679
|
+
name: 'get',
|
|
2680
|
+
endpoint: '/v1/nks/clusters/{cluster_id}/pools/{pool_id}',
|
|
2681
|
+
httpMethod: 'get',
|
|
2682
|
+
summary: 'Get NKS Node Pool Details',
|
|
2683
|
+
description: 'Get details about an NKS node pool',
|
|
2684
|
+
stainlessPath: '(resource) nks.clusters.pools > (method) get',
|
|
2685
|
+
qualified: 'client.nks.clusters.pools.get',
|
|
2686
|
+
params: ['cluster_id: string;', 'pool_id: string;'],
|
|
2687
|
+
response: "{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response; cpu_config: nks_node_pool_cpu_config_response; memory_config: nks_node_pool_memory_config_response; }; node_count: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }",
|
|
2688
|
+
markdown: "## get\n\n`client.nks.clusters.pools.get(cluster_id: string, pool_id: string): { id: string; cluster_id: string; created_at: string; name: string; node_config: nks_node_pool_node_config_response; node_count: number; status: resource_status; tags: string[]; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}`\n\nGet details about an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response; cpu_config: nks_node_pool_cpu_config_response; memory_config: nks_node_pool_memory_config_response; }; 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; }; cpu_config: { vcpu: number; }; memory_config: { size: number; }; }`\n - `node_count: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst nksNodePool = await client.nks.clusters.pools.get('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(nksNodePool);\n```",
|
|
2689
|
+
perLanguage: {
|
|
2690
|
+
cli: {
|
|
2691
|
+
method: 'pools get',
|
|
2692
|
+
example: "nirvana nks:clusters:pools get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
|
|
2693
|
+
},
|
|
2694
|
+
go: {
|
|
2695
|
+
method: 'client.NKS.Clusters.Pools.Get',
|
|
2696
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksNodePool, err := client.NKS.Clusters.Pools.Get(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksNodePool.ID)\n}\n',
|
|
2697
|
+
},
|
|
2698
|
+
http: {
|
|
2699
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2700
|
+
},
|
|
2701
|
+
typescript: {
|
|
2702
|
+
method: 'client.nks.clusters.pools.get',
|
|
2703
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksNodePool = await client.nks.clusters.pools.get('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(nksNodePool.id);",
|
|
2704
|
+
},
|
|
2705
|
+
},
|
|
1145
2706
|
},
|
|
1146
2707
|
{
|
|
1147
2708
|
name: 'update',
|
|
@@ -1160,18 +2721,23 @@ const EMBEDDED_METHODS = [
|
|
|
1160
2721
|
],
|
|
1161
2722
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1162
2723
|
markdown: "## update\n\n`client.nks.clusters.pools.update(cluster_id: string, pool_id: string, name?: string, node_count?: number, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**patch** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}`\n\nUpdate an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n- `name?: string`\n Name of the node pool.\n\n- `node_count?: number`\n Number of nodes.\n\n- `tags?: string[]`\n Tags to attach to the node pool.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.nks.clusters.pools.update('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(operation);\n```",
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
2724
|
+
perLanguage: {
|
|
2725
|
+
cli: {
|
|
2726
|
+
method: 'pools update',
|
|
2727
|
+
example: "nirvana nks:clusters:pools update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
|
|
2728
|
+
},
|
|
2729
|
+
go: {
|
|
2730
|
+
method: 'client.NKS.Clusters.Pools.Update',
|
|
2731
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.NKS.Clusters.Pools.Update(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t\tnks.ClusterPoolUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
2732
|
+
},
|
|
2733
|
+
http: {
|
|
2734
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_count": 5,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2735
|
+
},
|
|
2736
|
+
typescript: {
|
|
2737
|
+
method: 'client.nks.clusters.pools.update',
|
|
2738
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.update('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(operation.id);",
|
|
2739
|
+
},
|
|
2740
|
+
},
|
|
1175
2741
|
},
|
|
1176
2742
|
{
|
|
1177
2743
|
name: 'delete',
|
|
@@ -1184,18 +2750,52 @@ const EMBEDDED_METHODS = [
|
|
|
1184
2750
|
params: ['cluster_id: string;', 'pool_id: string;'],
|
|
1185
2751
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1186
2752
|
markdown: "## delete\n\n`client.nks.clusters.pools.delete(cluster_id: string, pool_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}`\n\nDelete an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.nks.clusters.pools.delete('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(operation);\n```",
|
|
2753
|
+
perLanguage: {
|
|
2754
|
+
cli: {
|
|
2755
|
+
method: 'pools delete',
|
|
2756
|
+
example: "nirvana nks:clusters:pools delete \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
|
|
2757
|
+
},
|
|
2758
|
+
go: {
|
|
2759
|
+
method: 'client.NKS.Clusters.Pools.Delete',
|
|
2760
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.NKS.Clusters.Pools.Delete(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
2761
|
+
},
|
|
2762
|
+
http: {
|
|
2763
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2764
|
+
},
|
|
2765
|
+
typescript: {
|
|
2766
|
+
method: 'client.nks.clusters.pools.delete',
|
|
2767
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.delete('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(operation.id);",
|
|
2768
|
+
},
|
|
2769
|
+
},
|
|
1187
2770
|
},
|
|
1188
2771
|
{
|
|
1189
|
-
name: '
|
|
1190
|
-
endpoint: '/v1/nks/clusters/{cluster_id}/pools
|
|
2772
|
+
name: 'list',
|
|
2773
|
+
endpoint: '/v1/nks/clusters/{cluster_id}/pools',
|
|
1191
2774
|
httpMethod: 'get',
|
|
1192
|
-
summary: '
|
|
1193
|
-
description: '
|
|
1194
|
-
stainlessPath: '(resource) nks.clusters.pools > (method)
|
|
1195
|
-
qualified: 'client.nks.clusters.pools.
|
|
1196
|
-
params: ['cluster_id: string;', '
|
|
2775
|
+
summary: 'List NKS Node Pools',
|
|
2776
|
+
description: 'List all node pools in an NKS cluster',
|
|
2777
|
+
stainlessPath: '(resource) nks.clusters.pools > (method) list',
|
|
2778
|
+
qualified: 'client.nks.clusters.pools.list',
|
|
2779
|
+
params: ['cluster_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
1197
2780
|
response: "{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response; cpu_config: nks_node_pool_cpu_config_response; memory_config: nks_node_pool_memory_config_response; }; node_count: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }",
|
|
1198
|
-
markdown: "##
|
|
2781
|
+
markdown: "## list\n\n`client.nks.clusters.pools.list(cluster_id: string, cursor?: string, limit?: number): { id: string; cluster_id: string; created_at: string; name: string; node_config: nks_node_pool_node_config_response; node_count: number; status: resource_status; tags: string[]; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools`\n\nList all node pools in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response; cpu_config: nks_node_pool_cpu_config_response; memory_config: nks_node_pool_memory_config_response; }; 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; }; cpu_config: { vcpu: number; }; memory_config: { size: number; }; }`\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```",
|
|
2782
|
+
perLanguage: {
|
|
2783
|
+
cli: {
|
|
2784
|
+
method: 'pools list',
|
|
2785
|
+
example: "nirvana nks:clusters:pools list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2786
|
+
},
|
|
2787
|
+
go: {
|
|
2788
|
+
method: 'client.NKS.Clusters.Pools.List',
|
|
2789
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.Pools.List(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterPoolListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2790
|
+
},
|
|
2791
|
+
http: {
|
|
2792
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2793
|
+
},
|
|
2794
|
+
typescript: {
|
|
2795
|
+
method: 'client.nks.clusters.pools.list',
|
|
2796
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksNodePool of client.nks.clusters.pools.list('cluster_id')) {\n console.log(nksNodePool.id);\n}",
|
|
2797
|
+
},
|
|
2798
|
+
},
|
|
1199
2799
|
},
|
|
1200
2800
|
{
|
|
1201
2801
|
name: 'create',
|
|
@@ -1213,6 +2813,23 @@ const EMBEDDED_METHODS = [
|
|
|
1213
2813
|
'tags?: string[];',
|
|
1214
2814
|
],
|
|
1215
2815
|
markdown: "## create\n\n`client.nks.clusters.pools.availability.create(cluster_id: string, name: string, node_config: { boot_volume: nks_node_pool_boot_volume; cpu_config: nks_node_pool_cpu_config; memory_config: nks_node_pool_memory_config; }, node_count: number, tags?: string[]): void`\n\n**post** `/v1/nks/clusters/{cluster_id}/pools/availability`\n\nCheck if a node pool can be created in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `name: string`\n Name of the node pool.\n\n- `node_config: { boot_volume: { size: number; type: volume_type; }; cpu_config: { vcpu: number; }; memory_config: { size: number; }; }`\n Node configuration.\n - `boot_volume: { size: number; type: 'nvme' | 'abs'; }`\n Boot volume configuration.\n - `cpu_config: { vcpu: number; }`\n CPU configuration.\n - `memory_config: { size: number; }`\n Memory configuration.\n\n- `node_count: number`\n Number of nodes. Must be between 1 and 100.\n\n- `tags?: string[]`\n Tags to attach to the node pool.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.nks.clusters.pools.availability.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n cpu_config: { vcpu: 4 },\n memory_config: { size: 8 },\n},\n node_count: 3,\n})\n```",
|
|
2816
|
+
perLanguage: {
|
|
2817
|
+
cli: {
|
|
2818
|
+
method: 'availability create',
|
|
2819
|
+
example: "nirvana nks:clusters:pools:availability create \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --name my-node-pool \\\n --node-config '{boot_volume: {size: 100, type: abs}, cpu_config: {vcpu: 4}, memory_config: {size: 8}}' \\\n --node-count 3",
|
|
2820
|
+
},
|
|
2821
|
+
go: {
|
|
2822
|
+
method: 'client.NKS.Clusters.Pools.Availability.New',
|
|
2823
|
+
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.NKS.Clusters.Pools.Availability.New(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterPoolAvailabilityNewParams{\n\t\t\tName: "my-node-pool",\n\t\t\tNodeConfig: nks.NKSNodePoolNodeConfigParam{\n\t\t\t\tBootVolume: nks.NKSNodePoolBootVolumeParam{\n\t\t\t\t\tSize: 100,\n\t\t\t\t\tType: compute.VolumeTypeABS,\n\t\t\t\t},\n\t\t\t\tCPUConfig: nks.NKSNodePoolCPUConfigParam{\n\t\t\t\t\tVcpu: 4,\n\t\t\t\t},\n\t\t\t\tMemoryConfig: nks.NKSNodePoolMemoryConfigParam{\n\t\t\t\t\tSize: 8,\n\t\t\t\t},\n\t\t\t},\n\t\t\tNodeCount: 3,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
2824
|
+
},
|
|
2825
|
+
http: {
|
|
2826
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_config": {\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "cpu_config": {\n "vcpu": 4\n },\n "memory_config": {\n "size": 8\n }\n },\n "node_count": 3,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2827
|
+
},
|
|
2828
|
+
typescript: {
|
|
2829
|
+
method: 'client.nks.clusters.pools.availability.create',
|
|
2830
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.pools.availability.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n cpu_config: { vcpu: 4 },\n memory_config: { size: 8 },\n },\n node_count: 3,\n});",
|
|
2831
|
+
},
|
|
2832
|
+
},
|
|
1216
2833
|
},
|
|
1217
2834
|
{
|
|
1218
2835
|
name: 'update',
|
|
@@ -1230,18 +2847,52 @@ const EMBEDDED_METHODS = [
|
|
|
1230
2847
|
'tags?: string[];',
|
|
1231
2848
|
],
|
|
1232
2849
|
markdown: "## update\n\n`client.nks.clusters.pools.availability.update(cluster_id: string, pool_id: string, name?: string, node_count?: number, tags?: string[]): void`\n\n**patch** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/availability`\n\nCheck if an NKS node pool can be updated\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n- `name?: string`\n Name of the node pool.\n\n- `node_count?: number`\n Number of nodes.\n\n- `tags?: string[]`\n Tags to attach to the node pool.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.nks.clusters.pools.availability.update('pool_id', { cluster_id: 'cluster_id' })\n```",
|
|
2850
|
+
perLanguage: {
|
|
2851
|
+
cli: {
|
|
2852
|
+
method: 'availability update',
|
|
2853
|
+
example: "nirvana nks:clusters:pools:availability update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
|
|
2854
|
+
},
|
|
2855
|
+
go: {
|
|
2856
|
+
method: 'client.NKS.Clusters.Pools.Availability.Update',
|
|
2857
|
+
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.NKS.Clusters.Pools.Availability.Update(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t\tnks.ClusterPoolAvailabilityUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
2858
|
+
},
|
|
2859
|
+
http: {
|
|
2860
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_count": 5,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2861
|
+
},
|
|
2862
|
+
typescript: {
|
|
2863
|
+
method: 'client.nks.clusters.pools.availability.update',
|
|
2864
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.pools.availability.update('pool_id', { cluster_id: 'cluster_id' });",
|
|
2865
|
+
},
|
|
2866
|
+
},
|
|
1233
2867
|
},
|
|
1234
2868
|
{
|
|
1235
|
-
name: '
|
|
1236
|
-
endpoint: '/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes',
|
|
2869
|
+
name: 'get',
|
|
2870
|
+
endpoint: '/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes/{node_id}',
|
|
1237
2871
|
httpMethod: 'get',
|
|
1238
|
-
summary: '
|
|
1239
|
-
description: '
|
|
1240
|
-
stainlessPath: '(resource) nks.clusters.pools.nodes > (method)
|
|
1241
|
-
qualified: 'client.nks.clusters.pools.nodes.
|
|
1242
|
-
params: ['cluster_id: string;', 'pool_id: string;', '
|
|
2872
|
+
summary: 'Get NKS Node Details',
|
|
2873
|
+
description: 'Get details about an NKS node',
|
|
2874
|
+
stainlessPath: '(resource) nks.clusters.pools.nodes > (method) get',
|
|
2875
|
+
qualified: 'client.nks.clusters.pools.nodes.get',
|
|
2876
|
+
params: ['cluster_id: string;', 'pool_id: string;', 'node_id: string;'],
|
|
1243
2877
|
response: "{ id: string; created_at: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
1244
|
-
markdown: "##
|
|
2878
|
+
markdown: "## get\n\n`client.nks.clusters.pools.nodes.get(cluster_id: string, pool_id: string, node_id: string): { 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/{node_id}`\n\nGet details about an NKS node\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n- `node_id: string`\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\nconst nksNode = await client.nks.clusters.pools.nodes.get('node_id', { cluster_id: 'cluster_id', pool_id: 'pool_id' });\n\nconsole.log(nksNode);\n```",
|
|
2879
|
+
perLanguage: {
|
|
2880
|
+
cli: {
|
|
2881
|
+
method: 'nodes get',
|
|
2882
|
+
example: "nirvana nks:clusters:pools:nodes get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id \\\n --node-id node_id",
|
|
2883
|
+
},
|
|
2884
|
+
go: {
|
|
2885
|
+
method: 'client.NKS.Clusters.Pools.Nodes.Get',
|
|
2886
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksNode, err := client.NKS.Clusters.Pools.Nodes.Get(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t\t"node_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksNode.ID)\n}\n',
|
|
2887
|
+
},
|
|
2888
|
+
http: {
|
|
2889
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2890
|
+
},
|
|
2891
|
+
typescript: {
|
|
2892
|
+
method: 'client.nks.clusters.pools.nodes.get',
|
|
2893
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksNode = await client.nks.clusters.pools.nodes.get('node_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n});\n\nconsole.log(nksNode.id);",
|
|
2894
|
+
},
|
|
2895
|
+
},
|
|
1245
2896
|
},
|
|
1246
2897
|
{
|
|
1247
2898
|
name: 'delete',
|
|
@@ -1254,18 +2905,81 @@ const EMBEDDED_METHODS = [
|
|
|
1254
2905
|
params: ['cluster_id: string;', 'pool_id: string;', 'node_id: string;'],
|
|
1255
2906
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1256
2907
|
markdown: "## delete\n\n`client.nks.clusters.pools.nodes.delete(cluster_id: string, pool_id: string, node_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes/{node_id}`\n\nDelete a single node from an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n- `node_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.nks.clusters.pools.nodes.delete('node_id', { cluster_id: 'cluster_id', pool_id: 'pool_id' });\n\nconsole.log(operation);\n```",
|
|
2908
|
+
perLanguage: {
|
|
2909
|
+
cli: {
|
|
2910
|
+
method: 'nodes delete',
|
|
2911
|
+
example: "nirvana nks:clusters:pools:nodes delete \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id \\\n --node-id node_id",
|
|
2912
|
+
},
|
|
2913
|
+
go: {
|
|
2914
|
+
method: 'client.NKS.Clusters.Pools.Nodes.Delete',
|
|
2915
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.NKS.Clusters.Pools.Nodes.Delete(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t\t"node_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
2916
|
+
},
|
|
2917
|
+
http: {
|
|
2918
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2919
|
+
},
|
|
2920
|
+
typescript: {
|
|
2921
|
+
method: 'client.nks.clusters.pools.nodes.delete',
|
|
2922
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.nodes.delete('node_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n});\n\nconsole.log(operation.id);",
|
|
2923
|
+
},
|
|
2924
|
+
},
|
|
1257
2925
|
},
|
|
1258
2926
|
{
|
|
1259
|
-
name: '
|
|
1260
|
-
endpoint: '/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes
|
|
2927
|
+
name: 'list',
|
|
2928
|
+
endpoint: '/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes',
|
|
1261
2929
|
httpMethod: 'get',
|
|
1262
|
-
summary: '
|
|
1263
|
-
description: '
|
|
1264
|
-
stainlessPath: '(resource) nks.clusters.pools.nodes > (method)
|
|
1265
|
-
qualified: 'client.nks.clusters.pools.nodes.
|
|
1266
|
-
params: ['cluster_id: string;', 'pool_id: string;', '
|
|
2930
|
+
summary: 'List NKS Nodes',
|
|
2931
|
+
description: 'List all nodes in an NKS node pool',
|
|
2932
|
+
stainlessPath: '(resource) nks.clusters.pools.nodes > (method) list',
|
|
2933
|
+
qualified: 'client.nks.clusters.pools.nodes.list',
|
|
2934
|
+
params: ['cluster_id: string;', 'pool_id: string;', 'cursor?: string;', 'limit?: number;'],
|
|
1267
2935
|
response: "{ id: string; created_at: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
1268
|
-
markdown: "##
|
|
2936
|
+
markdown: "## list\n\n`client.nks.clusters.pools.nodes.list(cluster_id: string, pool_id: string, cursor?: string, limit?: number): { id: string; created_at: string; name: string; private_ip: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes`\n\nList all nodes in an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }`\n NKS node details.\n\n - `id: string`\n - `created_at: string`\n - `name: string`\n - `private_ip: string`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const nksNode of client.nks.clusters.pools.nodes.list('pool_id', { cluster_id: 'cluster_id' })) {\n console.log(nksNode);\n}\n```",
|
|
2937
|
+
perLanguage: {
|
|
2938
|
+
cli: {
|
|
2939
|
+
method: 'nodes list',
|
|
2940
|
+
example: "nirvana nks:clusters:pools:nodes list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
|
|
2941
|
+
},
|
|
2942
|
+
go: {
|
|
2943
|
+
method: 'client.NKS.Clusters.Pools.Nodes.List',
|
|
2944
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.Pools.Nodes.List(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t\tnks.ClusterPoolNodeListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2945
|
+
},
|
|
2946
|
+
http: {
|
|
2947
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2948
|
+
},
|
|
2949
|
+
typescript: {
|
|
2950
|
+
method: 'client.nks.clusters.pools.nodes.list',
|
|
2951
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksNode of client.nks.clusters.pools.nodes.list('pool_id', {\n cluster_id: 'cluster_id',\n})) {\n console.log(nksNode.id);\n}",
|
|
2952
|
+
},
|
|
2953
|
+
},
|
|
2954
|
+
},
|
|
2955
|
+
{
|
|
2956
|
+
name: 'get',
|
|
2957
|
+
endpoint: '/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes/{node_id}/volumes/{volume_id}',
|
|
2958
|
+
httpMethod: 'get',
|
|
2959
|
+
summary: 'Get NKS Node Volume Details',
|
|
2960
|
+
description: 'Get details about a volume attached to an NKS node',
|
|
2961
|
+
stainlessPath: '(resource) nks.clusters.pools.nodes.volumes > (method) get',
|
|
2962
|
+
qualified: 'client.nks.clusters.pools.nodes.volumes.get',
|
|
2963
|
+
params: ['cluster_id: string;', 'pool_id: string;', 'node_id: string;', 'volume_id: string;'],
|
|
2964
|
+
response: "{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
2965
|
+
markdown: "## get\n\n`client.nks.clusters.pools.nodes.volumes.get(cluster_id: string, pool_id: string, node_id: string, volume_id: string): { 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}/pools/{pool_id}/nodes/{node_id}/volumes/{volume_id}`\n\nGet details about a volume 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- `volume_id: string`\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 node 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\nconst nksNodeVolume = await client.nks.clusters.pools.nodes.volumes.get('volume_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n node_id: 'node_id',\n});\n\nconsole.log(nksNodeVolume);\n```",
|
|
2966
|
+
perLanguage: {
|
|
2967
|
+
cli: {
|
|
2968
|
+
method: 'volumes get',
|
|
2969
|
+
example: "nirvana nks:clusters:pools:nodes:volumes get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id \\\n --node-id node_id \\\n --volume-id volume_id",
|
|
2970
|
+
},
|
|
2971
|
+
go: {
|
|
2972
|
+
method: 'client.NKS.Clusters.Pools.Nodes.Volumes.Get',
|
|
2973
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksNodeVolume, err := client.NKS.Clusters.Pools.Nodes.Volumes.Get(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t\t"node_id",\n\t\t"volume_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksNodeVolume.ID)\n}\n',
|
|
2974
|
+
},
|
|
2975
|
+
http: {
|
|
2976
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID/volumes/$VOLUME_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2977
|
+
},
|
|
2978
|
+
typescript: {
|
|
2979
|
+
method: 'client.nks.clusters.pools.nodes.volumes.get',
|
|
2980
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksNodeVolume = await client.nks.clusters.pools.nodes.volumes.get('volume_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n node_id: 'node_id',\n});\n\nconsole.log(nksNodeVolume.id);",
|
|
2981
|
+
},
|
|
2982
|
+
},
|
|
1269
2983
|
},
|
|
1270
2984
|
{
|
|
1271
2985
|
name: 'list',
|
|
@@ -1284,21 +2998,43 @@ const EMBEDDED_METHODS = [
|
|
|
1284
2998
|
],
|
|
1285
2999
|
response: "{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
1286
3000
|
markdown: "## list\n\n`client.nks.clusters.pools.nodes.volumes.list(cluster_id: string, pool_id: string, node_id: string, cursor?: string, limit?: number): { id: string; created_at: string; kind: volume_kind; name: string; 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; 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 - `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```",
|
|
3001
|
+
perLanguage: {
|
|
3002
|
+
cli: {
|
|
3003
|
+
method: 'volumes list',
|
|
3004
|
+
example: "nirvana nks:clusters:pools:nodes:volumes list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id \\\n --node-id node_id",
|
|
3005
|
+
},
|
|
3006
|
+
go: {
|
|
3007
|
+
method: 'client.NKS.Clusters.Pools.Nodes.Volumes.List',
|
|
3008
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.Pools.Nodes.Volumes.List(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t\t"node_id",\n\t\tnks.ClusterPoolNodeVolumeListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
3009
|
+
},
|
|
3010
|
+
http: {
|
|
3011
|
+
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3012
|
+
},
|
|
3013
|
+
typescript: {
|
|
3014
|
+
method: 'client.nks.clusters.pools.nodes.volumes.list',
|
|
3015
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksNodeVolume of client.nks.clusters.pools.nodes.volumes.list('node_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n})) {\n console.log(nksNodeVolume.id);\n}",
|
|
3016
|
+
},
|
|
3017
|
+
},
|
|
3018
|
+
},
|
|
3019
|
+
];
|
|
3020
|
+
const EMBEDDED_READMES = [
|
|
3021
|
+
{
|
|
3022
|
+
language: 'go',
|
|
3023
|
+
content: '# Nirvana Labs Go API Library\n\n<a href="https://pkg.go.dev/github.com/nirvana-labs/nirvana-go"><img src="https://pkg.go.dev/badge/github.com/nirvana-labs/nirvana-go.svg" alt="Go Reference"></a>\n\nThe Nirvana Labs Go library provides convenient access to the [Nirvana Labs REST API](https://docs.nirvanalabs.io)\nfrom applications written in Go.\n\n\n\n## MCP Server\n\nUse the Nirvana Labs MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[](https://cursor.com/en-US/install-mcp?name=%40nirvana-labs%2Fnirvana-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBuaXJ2YW5hLWxhYnMvbmlydmFuYS1tY3AiXSwiZW52Ijp7Ik5JUlZBTkFfTEFCU19BUElfS0VZIjoiTXkgQVBJIEtleSJ9fQ)\n[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40nirvana-labs%2Fnirvana-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40nirvana-labs%2Fnirvana-mcp%22%5D%2C%22env%22%3A%7B%22NIRVANA_LABS_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n```go\nimport (\n\t"github.com/nirvana-labs/nirvana-go" // imported as SDK_PackageName\n)\n```\n\n<!-- x-release-please-end -->\n\nOr to pin the version:\n\n<!-- x-release-please-start-version -->\n\n```sh\ngo get -u \'github.com/nirvana-labs/nirvana-go@v0.0.1\'\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.VolumeTypeNvme,\n\t\t},\n\t\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: 2,\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: 2,\n\t\t},\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.RegionNameUsWdc1,\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.VolumeTypeNvme,\n\t},\n\tCPUConfig: compute.CPUConfigRequestParam{\n\t\tVcpu: 2,\n\t},\n\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\tSize: 2,\n\t},\n\tName: "my-vm",\n\tOSImageName: "ubuntu-noble-2025-10-01",\n\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\tPublicIPEnabled: true,\n\tRegion: shared.RegionNameUsWdc1,\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.VolumeTypeNvme,\n\t\t},\n\t\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: 2,\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: 2,\n\t\t},\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.RegionNameUsWdc1,\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.VolumeTypeNvme,\n\t\t},\n\t\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: 2,\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: 2,\n\t\t},\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.RegionNameUsWdc1,\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.VolumeTypeNvme,\n\t\t},\n\t\tCPUConfig: compute.CPUConfigRequestParam{\n\t\t\tVcpu: 2,\n\t\t},\n\t\tMemoryConfig: compute.MemoryConfigRequestParam{\n\t\t\tSize: 2,\n\t\t},\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.RegionNameUsWdc1,\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',
|
|
1287
3024
|
},
|
|
1288
3025
|
{
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
stainlessPath: '(resource) nks.clusters.pools.nodes.volumes > (method) get',
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
3026
|
+
language: 'terraform',
|
|
3027
|
+
content: '# Nirvana Labs Terraform Provider\n\nThe [Nirvana Labs Terraform provider](https://registry.terraform.io/providers/nirvana-labs/nirvana/latest/docs) provides convenient access to\nthe [Nirvana Labs REST API](https://docs.nirvanalabs.io) from Terraform.\n\n\n\n## Requirements\n\nThis provider requires Terraform CLI 1.0 or later. You can [install it for your system](https://developer.hashicorp.com/terraform/install)\non Hashicorp\'s website.\n\n## Usage\n\nAdd the following to your `main.tf` file:\n\n<!-- x-release-please-start-version -->\n\n```hcl\n# Declare the provider and version\nterraform {\n required_providers {\n SDK_ProviderTypeName = {\n source = "nirvana-labs/nirvana"\n version = "~> 0.0.1"\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 = "nvme"\n tags = ["production", "ethereum"]\n }\n cpu_config = {\n vcpu = 2\n }\n memory_config = {\n size = 2\n }\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-wdc-1"\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',
|
|
3028
|
+
},
|
|
3029
|
+
{
|
|
3030
|
+
language: 'typescript',
|
|
3031
|
+
content: "# Nirvana Labs TypeScript API Library\n\n[)](https://npmjs.org/package/@nirvana-labs/nirvana) \n\nThis library provides convenient access to the Nirvana Labs REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [docs.nirvanalabs.io](https://docs.nirvanalabs.io). The full API of this library can be found in [api.md](api.md).\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```sh\nnpm install @nirvana-labs/nirvana\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n<!-- prettier-ignore -->\n```js\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.create({\n boot_volume: { size: 100, type: 'nvme' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 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-wdc-1',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n<!-- prettier-ignore -->\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst params: NirvanaLabs.Compute.VMCreateParams = {\n boot_volume: { size: 100, type: 'nvme' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 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-wdc-1',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n};\nconst operation: NirvanaLabs.Operation = await client.compute.vms.create(params);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n<!-- prettier-ignore -->\n```ts\nconst operation = await client.compute.vms\n .create({\n boot_volume: { size: 100, type: 'nvme' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 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-wdc-1',\n ssh_key: {\n public_key:\n 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n })\n .catch(async (err) => {\n if (err instanceof NirvanaLabs.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n });\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n<!-- prettier-ignore -->\n```js\n// Configure the default for all requests:\nconst client = new NirvanaLabs({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.compute.vms.create({\n boot_volume: { size: 100, type: 'nvme' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 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-wdc-1',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n}, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n<!-- prettier-ignore -->\n```ts\n// Configure the default for all requests:\nconst client = new NirvanaLabs({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.compute.vms.create({\n boot_volume: { size: 100, type: 'nvme' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 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-wdc-1',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n}, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n## Auto-pagination\n\nList methods in the NirvanaLabs API are paginated.\nYou can use the `for await … of` syntax to iterate through items across all pages:\n\n```ts\nasync function fetchAllVMs(params) {\n const allVMs = [];\n // Automatically fetches more pages as needed.\n for await (const vm of client.compute.vms.list({\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n limit: 10,\n })) {\n allVMs.push(vm);\n }\n return allVMs;\n}\n```\n\nAlternatively, you can request a single page at a time:\n\n```ts\nlet page = await client.compute.vms.list({\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n limit: 10,\n});\nfor (const vm of page.items) {\n console.log(vm);\n}\n\n// Convenience methods are provided for manually paginating:\nwhile (page.hasNextPage()) {\n page = await page.getNextPage();\n // ...\n}\n```\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n<!-- prettier-ignore -->\n```ts\nconst client = new NirvanaLabs();\n\nconst response = await client.compute.vms\n .create({\n boot_volume: { size: 100, type: 'nvme' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 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-wdc-1',\n ssh_key: {\n public_key:\n 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n })\n .asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: operation, response: raw } = await client.compute.vms\n .create({\n boot_volume: { size: 100, type: 'nvme' },\n cpu_config: { vcpu: 2 },\n memory_config: { size: 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-wdc-1',\n ssh_key: {\n public_key:\n 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nconsole.log(operation.id);\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `NIRVANA_LABS_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new NirvanaLabs({\n logger: logger.child({ name: 'NirvanaLabs' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\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.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.compute.vms.create({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\nimport fetch from 'my-fetch';\n\nconst client = new NirvanaLabs({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new NirvanaLabs({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\n\n```ts\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\n\n```ts\nimport NirvanaLabs from 'npm:@nirvana-labs/nirvana';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new NirvanaLabs({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\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 that only affect static types, without breaking runtime behavior.\n2. 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.)_\n3. 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-typescript/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n",
|
|
3032
|
+
},
|
|
3033
|
+
{
|
|
3034
|
+
language: 'cli',
|
|
3035
|
+
content: "# Nirvana Labs CLI\n\nThe official CLI for the [Nirvana Labs REST API](https://docs.nirvanalabs.io).\n\n<!-- x-release-please-start-version -->\n\n## Installation\n\n### Installing with Homebrew\n\n~~~sh\nbrew install nirvana-labs/tap/nirvana\n~~~\n\n### Installing with Go\n\nTo test or install the CLI locally, you need [Go](https://go.dev/doc/install) version 1.22 or later installed.\n\n~~~sh\ngo install 'github.com/nirvana-labs/nirvana-cli/cmd/nirvana@latest'\n~~~\n\nOnce you have run `go install`, the binary is placed in your Go bin directory:\n\n- **Default location**: `$HOME/go/bin` (or `$GOPATH/bin` if GOPATH is set)\n- **Check your path**: Run `go env GOPATH` to see the base directory\n\nIf commands aren't found after installation, add the Go bin directory to your PATH:\n\n~~~sh\n# Add to your shell profile (.zshrc, .bashrc, etc.)\nexport PATH=\"$PATH:$(go env GOPATH)/bin\"\n~~~\n\n<!-- x-release-please-end -->\n\n### Running Locally\n\nAfter cloning the git repository for this project, you can use the\n`scripts/run` script to run the tool locally:\n\n~~~sh\n./scripts/run args...\n~~~\n\n## Usage\n\nThe CLI follows a resource-based command structure:\n\n~~~sh\nnirvana [resource] <command> [flags...]\n~~~\n\n~~~sh\nnirvana compute:vms create \\\n --api-key 'My API Key' \\\n --boot-volume '{size: 100, type: nvme}' \\\n --cpu-config '{vcpu: 2}' \\\n --memory-config '{size: 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 \\\n --region us-wdc-1 \\\n --ssh-key '{public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2}' \\\n --subnet-id 123e4567-e89b-12d3-a456-426614174000\n~~~\n\nFor details about specific commands, use the `--help` flag.\n\n### Environment variables\n\n| Environment variable | Required |\n| ---------------------- | -------- |\n| `NIRVANA_LABS_API_KEY` | yes |\n\n### Global flags\n\n- `--api-key` (can also be set with `NIRVANA_LABS_API_KEY` env var)\n- `--help` - Show command line usage\n- `--debug` - Enable debug logging (includes HTTP request/response details)\n- `--version`, `-v` - Show the CLI version\n- `--base-url` - Use a custom API backend URL\n- `--format` - Change the output format (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--format-error` - Change the output format for errors (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--transform` - Transform the data output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n- `--transform-error` - Transform the error output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n\n### Passing files as arguments\n\nTo pass files to your API, you can use the `@myfile.ext` syntax:\n\n~~~bash\nnirvana <command> --arg @abe.jpg\n~~~\n\nFiles can also be passed inside JSON or YAML blobs:\n\n~~~bash\nnirvana <command> --arg '{image: \"@abe.jpg\"}'\n# Equivalent:\nnirvana <command> <<YAML\narg:\n image: \"@abe.jpg\"\nYAML\n~~~\n\nIf you need to pass a string literal that begins with an `@` sign, you can\nescape the `@` sign to avoid accidentally passing a file.\n\n~~~bash\nnirvana <command> --username '\\@abe'\n~~~\n\n#### Explicit encoding\n\nFor JSON endpoints, the CLI tool does filetype sniffing to determine whether the\nfile contents should be sent as a string literal (for plain text files) or as a\nbase64-encoded string literal (for binary files). If you need to explicitly send\nthe file as either plain text or base64-encoded data, you can use\n`@file://myfile.txt` (for string encoding) or `@data://myfile.dat` (for\nbase64-encoding). Note that absolute paths will begin with `@file://` or\n`@data://`, followed by a third `/` (for example, `@file:///tmp/file.txt`).\n\n~~~bash\nnirvana <command> --arg @data://file.txt\n~~~\n",
|
|
1299
3036
|
},
|
|
1300
3037
|
];
|
|
1301
|
-
const EMBEDDED_READMES = [];
|
|
1302
3038
|
const INDEX_OPTIONS = {
|
|
1303
3039
|
fields: [
|
|
1304
3040
|
'name',
|