@nirvana-labs/nirvana-mcp 1.81.2 → 1.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/local-docs-search.js +736 -736
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +736 -736
- package/local-docs-search.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/local-docs-search.ts +840 -840
- package/src/server.ts +1 -1
package/src/local-docs-search.ts
CHANGED
|
@@ -62,24 +62,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
62
62
|
markdown:
|
|
63
63
|
"## 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```",
|
|
64
64
|
perLanguage: {
|
|
65
|
-
|
|
66
|
-
method: 'user
|
|
67
|
-
example:
|
|
65
|
+
typescript: {
|
|
66
|
+
method: 'client.user.get',
|
|
67
|
+
example:
|
|
68
|
+
"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);",
|
|
68
69
|
},
|
|
69
70
|
go: {
|
|
70
71
|
method: 'client.User.Get',
|
|
71
72
|
example:
|
|
72
73
|
'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',
|
|
73
74
|
},
|
|
75
|
+
cli: {
|
|
76
|
+
method: 'user get',
|
|
77
|
+
example: "nirvana user get \\\n --api-key 'My API Key'",
|
|
78
|
+
},
|
|
74
79
|
http: {
|
|
75
80
|
example:
|
|
76
81
|
'curl https://api.nirvanalabs.io/v1/user \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
77
82
|
},
|
|
78
|
-
typescript: {
|
|
79
|
-
method: 'client.user.get',
|
|
80
|
-
example:
|
|
81
|
-
"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);",
|
|
82
|
-
},
|
|
83
83
|
},
|
|
84
84
|
},
|
|
85
85
|
{
|
|
@@ -95,24 +95,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
95
95
|
markdown:
|
|
96
96
|
"## 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```",
|
|
97
97
|
perLanguage: {
|
|
98
|
-
|
|
99
|
-
method: 'security
|
|
100
|
-
example:
|
|
98
|
+
typescript: {
|
|
99
|
+
method: 'client.user.security.get',
|
|
100
|
+
example:
|
|
101
|
+
"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);",
|
|
101
102
|
},
|
|
102
103
|
go: {
|
|
103
104
|
method: 'client.User.Security.Get',
|
|
104
105
|
example:
|
|
105
106
|
'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',
|
|
106
107
|
},
|
|
108
|
+
cli: {
|
|
109
|
+
method: 'security get',
|
|
110
|
+
example: "nirvana user:security get \\\n --api-key 'My API Key'",
|
|
111
|
+
},
|
|
107
112
|
http: {
|
|
108
113
|
example:
|
|
109
114
|
'curl https://api.nirvanalabs.io/v1/user/security \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
110
115
|
},
|
|
111
|
-
typescript: {
|
|
112
|
-
method: 'client.user.security.get',
|
|
113
|
-
example:
|
|
114
|
-
"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);",
|
|
115
|
-
},
|
|
116
116
|
},
|
|
117
117
|
},
|
|
118
118
|
{
|
|
@@ -129,24 +129,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
129
129
|
markdown:
|
|
130
130
|
"## 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```",
|
|
131
131
|
perLanguage: {
|
|
132
|
-
|
|
133
|
-
method: 'security
|
|
134
|
-
example:
|
|
132
|
+
typescript: {
|
|
133
|
+
method: 'client.user.security.update',
|
|
134
|
+
example:
|
|
135
|
+
"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);",
|
|
135
136
|
},
|
|
136
137
|
go: {
|
|
137
138
|
method: 'client.User.Security.Update',
|
|
138
139
|
example:
|
|
139
140
|
'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',
|
|
140
141
|
},
|
|
142
|
+
cli: {
|
|
143
|
+
method: 'security update',
|
|
144
|
+
example: "nirvana user:security update \\\n --api-key 'My API Key'",
|
|
145
|
+
},
|
|
141
146
|
http: {
|
|
142
147
|
example:
|
|
143
148
|
"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 '{}'",
|
|
144
149
|
},
|
|
145
|
-
typescript: {
|
|
146
|
-
method: 'client.user.security.update',
|
|
147
|
-
example:
|
|
148
|
-
"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);",
|
|
149
|
-
},
|
|
150
150
|
},
|
|
151
151
|
},
|
|
152
152
|
{
|
|
@@ -171,24 +171,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
171
171
|
markdown:
|
|
172
172
|
"## 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```",
|
|
173
173
|
perLanguage: {
|
|
174
|
-
|
|
175
|
-
method: '
|
|
174
|
+
typescript: {
|
|
175
|
+
method: 'client.apiKeys.create',
|
|
176
176
|
example:
|
|
177
|
-
"nirvana
|
|
177
|
+
"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);",
|
|
178
178
|
},
|
|
179
179
|
go: {
|
|
180
180
|
method: 'client.APIKeys.New',
|
|
181
181
|
example:
|
|
182
182
|
'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',
|
|
183
183
|
},
|
|
184
|
-
|
|
184
|
+
cli: {
|
|
185
|
+
method: 'api_keys create',
|
|
185
186
|
example:
|
|
186
|
-
|
|
187
|
+
"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",
|
|
187
188
|
},
|
|
188
|
-
|
|
189
|
-
method: 'client.apiKeys.create',
|
|
189
|
+
http: {
|
|
190
190
|
example:
|
|
191
|
-
|
|
191
|
+
'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 }\'',
|
|
192
192
|
},
|
|
193
193
|
},
|
|
194
194
|
},
|
|
@@ -206,24 +206,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
206
206
|
markdown:
|
|
207
207
|
"## 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```",
|
|
208
208
|
perLanguage: {
|
|
209
|
-
|
|
210
|
-
method: '
|
|
211
|
-
example:
|
|
209
|
+
typescript: {
|
|
210
|
+
method: 'client.apiKeys.get',
|
|
211
|
+
example:
|
|
212
|
+
"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);",
|
|
212
213
|
},
|
|
213
214
|
go: {
|
|
214
215
|
method: 'client.APIKeys.Get',
|
|
215
216
|
example:
|
|
216
217
|
'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',
|
|
217
218
|
},
|
|
219
|
+
cli: {
|
|
220
|
+
method: 'api_keys get',
|
|
221
|
+
example: "nirvana api-keys get \\\n --api-key 'My API Key' \\\n --api-key-id api_key_id",
|
|
222
|
+
},
|
|
218
223
|
http: {
|
|
219
224
|
example:
|
|
220
225
|
'curl https://api.nirvanalabs.io/v1/api_keys/$API_KEY_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
221
226
|
},
|
|
222
|
-
typescript: {
|
|
223
|
-
method: 'client.apiKeys.get',
|
|
224
|
-
example:
|
|
225
|
-
"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);",
|
|
226
|
-
},
|
|
227
227
|
},
|
|
228
228
|
},
|
|
229
229
|
{
|
|
@@ -247,24 +247,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
247
247
|
markdown:
|
|
248
248
|
"## 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```",
|
|
249
249
|
perLanguage: {
|
|
250
|
-
|
|
251
|
-
method: '
|
|
252
|
-
example:
|
|
250
|
+
typescript: {
|
|
251
|
+
method: 'client.apiKeys.update',
|
|
252
|
+
example:
|
|
253
|
+
"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);",
|
|
253
254
|
},
|
|
254
255
|
go: {
|
|
255
256
|
method: 'client.APIKeys.Update',
|
|
256
257
|
example:
|
|
257
258
|
'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',
|
|
258
259
|
},
|
|
260
|
+
cli: {
|
|
261
|
+
method: 'api_keys update',
|
|
262
|
+
example: "nirvana api-keys update \\\n --api-key 'My API Key' \\\n --api-key-id api_key_id",
|
|
263
|
+
},
|
|
259
264
|
http: {
|
|
260
265
|
example:
|
|
261
266
|
'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 }\'',
|
|
262
267
|
},
|
|
263
|
-
typescript: {
|
|
264
|
-
method: 'client.apiKeys.update',
|
|
265
|
-
example:
|
|
266
|
-
"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);",
|
|
267
|
-
},
|
|
268
268
|
},
|
|
269
269
|
},
|
|
270
270
|
{
|
|
@@ -279,24 +279,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
279
279
|
markdown:
|
|
280
280
|
"## 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```",
|
|
281
281
|
perLanguage: {
|
|
282
|
-
|
|
283
|
-
method: '
|
|
284
|
-
example:
|
|
282
|
+
typescript: {
|
|
283
|
+
method: 'client.apiKeys.delete',
|
|
284
|
+
example:
|
|
285
|
+
"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');",
|
|
285
286
|
},
|
|
286
287
|
go: {
|
|
287
288
|
method: 'client.APIKeys.Delete',
|
|
288
289
|
example:
|
|
289
290
|
'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',
|
|
290
291
|
},
|
|
292
|
+
cli: {
|
|
293
|
+
method: 'api_keys delete',
|
|
294
|
+
example: "nirvana api-keys delete \\\n --api-key 'My API Key' \\\n --api-key-id api_key_id",
|
|
295
|
+
},
|
|
291
296
|
http: {
|
|
292
297
|
example:
|
|
293
298
|
'curl https://api.nirvanalabs.io/v1/api_keys/$API_KEY_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
294
299
|
},
|
|
295
|
-
typescript: {
|
|
296
|
-
method: 'client.apiKeys.delete',
|
|
297
|
-
example:
|
|
298
|
-
"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');",
|
|
299
|
-
},
|
|
300
300
|
},
|
|
301
301
|
},
|
|
302
302
|
{
|
|
@@ -313,24 +313,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
313
313
|
markdown:
|
|
314
314
|
"## 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```",
|
|
315
315
|
perLanguage: {
|
|
316
|
-
|
|
317
|
-
method: '
|
|
318
|
-
example:
|
|
316
|
+
typescript: {
|
|
317
|
+
method: 'client.apiKeys.list',
|
|
318
|
+
example:
|
|
319
|
+
"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}",
|
|
319
320
|
},
|
|
320
321
|
go: {
|
|
321
322
|
method: 'client.APIKeys.List',
|
|
322
323
|
example:
|
|
323
324
|
'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',
|
|
324
325
|
},
|
|
326
|
+
cli: {
|
|
327
|
+
method: 'api_keys list',
|
|
328
|
+
example: "nirvana api-keys list \\\n --api-key 'My API Key'",
|
|
329
|
+
},
|
|
325
330
|
http: {
|
|
326
331
|
example:
|
|
327
332
|
'curl https://api.nirvanalabs.io/v1/api_keys \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
328
333
|
},
|
|
329
|
-
typescript: {
|
|
330
|
-
method: 'client.apiKeys.list',
|
|
331
|
-
example:
|
|
332
|
-
"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}",
|
|
333
|
-
},
|
|
334
334
|
},
|
|
335
335
|
},
|
|
336
336
|
{
|
|
@@ -347,24 +347,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
347
347
|
markdown:
|
|
348
348
|
"## 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```",
|
|
349
349
|
perLanguage: {
|
|
350
|
-
|
|
351
|
-
method: 'operations
|
|
352
|
-
example:
|
|
350
|
+
typescript: {
|
|
351
|
+
method: 'client.operations.get',
|
|
352
|
+
example:
|
|
353
|
+
"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);",
|
|
353
354
|
},
|
|
354
355
|
go: {
|
|
355
356
|
method: 'client.Operations.Get',
|
|
356
357
|
example:
|
|
357
358
|
'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',
|
|
358
359
|
},
|
|
360
|
+
cli: {
|
|
361
|
+
method: 'operations get',
|
|
362
|
+
example: "nirvana operations get \\\n --api-key 'My API Key' \\\n --operation-id operation_id",
|
|
363
|
+
},
|
|
359
364
|
http: {
|
|
360
365
|
example:
|
|
361
366
|
'curl https://api.nirvanalabs.io/v1/operations/$OPERATION_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
362
367
|
},
|
|
363
|
-
typescript: {
|
|
364
|
-
method: 'client.operations.get',
|
|
365
|
-
example:
|
|
366
|
-
"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);",
|
|
367
|
-
},
|
|
368
368
|
},
|
|
369
369
|
},
|
|
370
370
|
{
|
|
@@ -381,24 +381,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
381
381
|
markdown:
|
|
382
382
|
"## 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```",
|
|
383
383
|
perLanguage: {
|
|
384
|
-
|
|
385
|
-
method: 'operations
|
|
386
|
-
example:
|
|
384
|
+
typescript: {
|
|
385
|
+
method: 'client.operations.list',
|
|
386
|
+
example:
|
|
387
|
+
"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}",
|
|
387
388
|
},
|
|
388
389
|
go: {
|
|
389
390
|
method: 'client.Operations.List',
|
|
390
391
|
example:
|
|
391
392
|
'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',
|
|
392
393
|
},
|
|
394
|
+
cli: {
|
|
395
|
+
method: 'operations list',
|
|
396
|
+
example: "nirvana operations list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
397
|
+
},
|
|
393
398
|
http: {
|
|
394
399
|
example:
|
|
395
400
|
'curl https://api.nirvanalabs.io/v1/operations \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
396
401
|
},
|
|
397
|
-
typescript: {
|
|
398
|
-
method: 'client.operations.list',
|
|
399
|
-
example:
|
|
400
|
-
"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}",
|
|
401
|
-
},
|
|
402
402
|
},
|
|
403
403
|
},
|
|
404
404
|
{
|
|
@@ -415,24 +415,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
415
415
|
markdown:
|
|
416
416
|
"## create\n\n`client.organizations.create(name: string): { id: string; created_at: string; domains: organization_domain[]; name: string; personal: boolean; services: organization_services; type: organization_type; 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; }[]; name: string; personal: boolean; services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }; type: 'personal' | 'company'; 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 - `name: string`\n - `personal: boolean`\n - `services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }`\n - `type: 'personal' | 'company'`\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```",
|
|
417
417
|
perLanguage: {
|
|
418
|
-
|
|
419
|
-
method: 'organizations
|
|
420
|
-
example:
|
|
418
|
+
typescript: {
|
|
419
|
+
method: 'client.organizations.create',
|
|
420
|
+
example:
|
|
421
|
+
"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);",
|
|
421
422
|
},
|
|
422
423
|
go: {
|
|
423
424
|
method: 'client.Organizations.New',
|
|
424
425
|
example:
|
|
425
426
|
'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',
|
|
426
427
|
},
|
|
428
|
+
cli: {
|
|
429
|
+
method: 'organizations create',
|
|
430
|
+
example: "nirvana organizations create \\\n --api-key 'My API Key' \\\n --name 'My Organization'",
|
|
431
|
+
},
|
|
427
432
|
http: {
|
|
428
433
|
example:
|
|
429
434
|
'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 }\'',
|
|
430
435
|
},
|
|
431
|
-
typescript: {
|
|
432
|
-
method: 'client.organizations.create',
|
|
433
|
-
example:
|
|
434
|
-
"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);",
|
|
435
|
-
},
|
|
436
436
|
},
|
|
437
437
|
},
|
|
438
438
|
{
|
|
@@ -449,24 +449,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
449
449
|
markdown:
|
|
450
450
|
"## get\n\n`client.organizations.get(organization_id: string): { id: string; created_at: string; domains: organization_domain[]; name: string; personal: boolean; services: organization_services; type: organization_type; 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; }[]; name: string; personal: boolean; services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }; type: 'personal' | 'company'; 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 - `name: string`\n - `personal: boolean`\n - `services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }`\n - `type: 'personal' | 'company'`\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```",
|
|
451
451
|
perLanguage: {
|
|
452
|
-
|
|
453
|
-
method: 'organizations
|
|
452
|
+
typescript: {
|
|
453
|
+
method: 'client.organizations.get',
|
|
454
454
|
example:
|
|
455
|
-
"nirvana
|
|
455
|
+
"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);",
|
|
456
456
|
},
|
|
457
457
|
go: {
|
|
458
458
|
method: 'client.Organizations.Get',
|
|
459
459
|
example:
|
|
460
460
|
'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',
|
|
461
461
|
},
|
|
462
|
-
|
|
462
|
+
cli: {
|
|
463
|
+
method: 'organizations get',
|
|
463
464
|
example:
|
|
464
|
-
|
|
465
|
+
"nirvana organizations get \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
|
|
465
466
|
},
|
|
466
|
-
|
|
467
|
-
method: 'client.organizations.get',
|
|
467
|
+
http: {
|
|
468
468
|
example:
|
|
469
|
-
|
|
469
|
+
'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
470
470
|
},
|
|
471
471
|
},
|
|
472
472
|
},
|
|
@@ -484,24 +484,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
484
484
|
markdown:
|
|
485
485
|
"## update\n\n`client.organizations.update(organization_id: string, name?: string): { id: string; created_at: string; domains: organization_domain[]; name: string; personal: boolean; services: organization_services; type: organization_type; 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; }[]; name: string; personal: boolean; services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }; type: 'personal' | 'company'; 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 - `name: string`\n - `personal: boolean`\n - `services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }`\n - `type: 'personal' | 'company'`\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```",
|
|
486
486
|
perLanguage: {
|
|
487
|
-
|
|
488
|
-
method: 'organizations
|
|
487
|
+
typescript: {
|
|
488
|
+
method: 'client.organizations.update',
|
|
489
489
|
example:
|
|
490
|
-
"nirvana
|
|
490
|
+
"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);",
|
|
491
491
|
},
|
|
492
492
|
go: {
|
|
493
493
|
method: 'client.Organizations.Update',
|
|
494
494
|
example:
|
|
495
495
|
'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',
|
|
496
496
|
},
|
|
497
|
-
|
|
497
|
+
cli: {
|
|
498
|
+
method: 'organizations update',
|
|
498
499
|
example:
|
|
499
|
-
|
|
500
|
+
"nirvana organizations update \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
|
|
500
501
|
},
|
|
501
|
-
|
|
502
|
-
method: 'client.organizations.update',
|
|
502
|
+
http: {
|
|
503
503
|
example:
|
|
504
|
-
|
|
504
|
+
'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 }\'',
|
|
505
505
|
},
|
|
506
506
|
},
|
|
507
507
|
},
|
|
@@ -519,24 +519,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
519
519
|
markdown:
|
|
520
520
|
"## list\n\n`client.organizations.list(cursor?: string, limit?: number): { id: string; created_at: string; domains: organization_domain[]; name: string; personal: boolean; services: organization_services; type: organization_type; 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; }[]; name: string; personal: boolean; services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }; type: 'personal' | 'company'; 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 - `name: string`\n - `personal: boolean`\n - `services: { cloud: boolean; jit_provisioning: boolean; scim: boolean; siem: boolean; sso: boolean; }`\n - `type: 'personal' | 'company'`\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```",
|
|
521
521
|
perLanguage: {
|
|
522
|
-
|
|
523
|
-
method: 'organizations
|
|
524
|
-
example:
|
|
522
|
+
typescript: {
|
|
523
|
+
method: 'client.organizations.list',
|
|
524
|
+
example:
|
|
525
|
+
"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}",
|
|
525
526
|
},
|
|
526
527
|
go: {
|
|
527
528
|
method: 'client.Organizations.List',
|
|
528
529
|
example:
|
|
529
530
|
'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',
|
|
530
531
|
},
|
|
532
|
+
cli: {
|
|
533
|
+
method: 'organizations list',
|
|
534
|
+
example: "nirvana organizations list \\\n --api-key 'My API Key'",
|
|
535
|
+
},
|
|
531
536
|
http: {
|
|
532
537
|
example:
|
|
533
538
|
'curl https://api.nirvanalabs.io/v1/organizations \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
534
539
|
},
|
|
535
|
-
typescript: {
|
|
536
|
-
method: 'client.organizations.list',
|
|
537
|
-
example:
|
|
538
|
-
"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}",
|
|
539
|
-
},
|
|
540
540
|
},
|
|
541
541
|
},
|
|
542
542
|
{
|
|
@@ -551,24 +551,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
551
551
|
markdown:
|
|
552
552
|
"## 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```",
|
|
553
553
|
perLanguage: {
|
|
554
|
-
|
|
555
|
-
method: 'organizations
|
|
554
|
+
typescript: {
|
|
555
|
+
method: 'client.organizations.leave',
|
|
556
556
|
example:
|
|
557
|
-
"nirvana
|
|
557
|
+
"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');",
|
|
558
558
|
},
|
|
559
559
|
go: {
|
|
560
560
|
method: 'client.Organizations.Leave',
|
|
561
561
|
example:
|
|
562
562
|
'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',
|
|
563
563
|
},
|
|
564
|
-
|
|
564
|
+
cli: {
|
|
565
|
+
method: 'organizations leave',
|
|
565
566
|
example:
|
|
566
|
-
|
|
567
|
+
"nirvana organizations leave \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
|
|
567
568
|
},
|
|
568
|
-
|
|
569
|
-
method: 'client.organizations.leave',
|
|
569
|
+
http: {
|
|
570
570
|
example:
|
|
571
|
-
|
|
571
|
+
'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/leave \\\n -X POST \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
572
572
|
},
|
|
573
573
|
},
|
|
574
574
|
},
|
|
@@ -586,24 +586,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
586
586
|
markdown:
|
|
587
587
|
"## 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```",
|
|
588
588
|
perLanguage: {
|
|
589
|
-
|
|
590
|
-
method: 'memberships
|
|
589
|
+
typescript: {
|
|
590
|
+
method: 'client.organizations.memberships.get',
|
|
591
591
|
example:
|
|
592
|
-
"nirvana
|
|
592
|
+
"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);",
|
|
593
593
|
},
|
|
594
594
|
go: {
|
|
595
595
|
method: 'client.Organizations.Memberships.Get',
|
|
596
596
|
example:
|
|
597
597
|
'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',
|
|
598
598
|
},
|
|
599
|
-
|
|
599
|
+
cli: {
|
|
600
|
+
method: 'memberships get',
|
|
600
601
|
example:
|
|
601
|
-
|
|
602
|
+
"nirvana organizations:memberships get \\\n --api-key 'My API Key' \\\n --organization-id organization_id \\\n --membership-id membership_id",
|
|
602
603
|
},
|
|
603
|
-
|
|
604
|
-
method: 'client.organizations.memberships.get',
|
|
604
|
+
http: {
|
|
605
605
|
example:
|
|
606
|
-
|
|
606
|
+
'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/memberships/$MEMBERSHIP_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
607
607
|
},
|
|
608
608
|
},
|
|
609
609
|
},
|
|
@@ -621,24 +621,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
621
621
|
markdown:
|
|
622
622
|
"## 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```",
|
|
623
623
|
perLanguage: {
|
|
624
|
-
|
|
625
|
-
method: 'memberships
|
|
624
|
+
typescript: {
|
|
625
|
+
method: 'client.organizations.memberships.list',
|
|
626
626
|
example:
|
|
627
|
-
"nirvana
|
|
627
|
+
"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}",
|
|
628
628
|
},
|
|
629
629
|
go: {
|
|
630
630
|
method: 'client.Organizations.Memberships.List',
|
|
631
631
|
example:
|
|
632
632
|
'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',
|
|
633
633
|
},
|
|
634
|
-
|
|
634
|
+
cli: {
|
|
635
|
+
method: 'memberships list',
|
|
635
636
|
example:
|
|
636
|
-
|
|
637
|
+
"nirvana organizations:memberships list \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
|
|
637
638
|
},
|
|
638
|
-
|
|
639
|
-
method: 'client.organizations.memberships.list',
|
|
639
|
+
http: {
|
|
640
640
|
example:
|
|
641
|
-
|
|
641
|
+
'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/memberships \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
642
642
|
},
|
|
643
643
|
},
|
|
644
644
|
},
|
|
@@ -656,24 +656,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
656
656
|
markdown:
|
|
657
657
|
"## get\n\n`client.quotas.get(region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'): { compute: quota_compute; networking: quota_networking; nks: quota_nks; region: region_name; storage: quota_storage; }`\n\n**get** `/v1/quotas/{region}`\n\nGet quota usage and limits for the current organization in a single region\n\n### Parameters\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'`\n\n### Returns\n\n- `{ compute: { memory_gb: quota_resource_detail; vcpu: quota_resource_detail; }; networking: { connect_connections: quota_resource_detail; public_ips: quota_resource_detail; vpcs: quota_resource_detail; }; nks: { clusters: quota_resource_detail; node_pool_memory_gb: quota_resource_detail; node_pool_vcpu: quota_resource_detail; public_ips: quota_resource_detail; }; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; storage: { abs: quota_resource_detail; local_nvme: quota_resource_detail; }; }`\n Quota response.\n\n - `compute: { memory_gb: { limit: number; remaining: number; used: number; }; vcpu: { limit: number; remaining: number; used: number; }; }`\n - `networking: { connect_connections: { limit: number; remaining: number; used: number; }; public_ips: { limit: number; remaining: number; used: number; }; vpcs: { limit: number; remaining: number; used: number; }; }`\n - `nks: { clusters: { limit: number; remaining: number; used: number; }; node_pool_memory_gb: { limit: number; remaining: number; used: number; }; node_pool_vcpu: { limit: number; remaining: number; used: number; }; public_ips: { limit: number; remaining: number; used: number; }; }`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'`\n - `storage: { abs: { limit: number; remaining: number; used: number; }; local_nvme: { limit: number; remaining: number; used: number; }; }`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst quota = await client.quotas.get('us-sva-1');\n\nconsole.log(quota);\n```",
|
|
658
658
|
perLanguage: {
|
|
659
|
-
|
|
660
|
-
method: 'quotas
|
|
661
|
-
example:
|
|
659
|
+
typescript: {
|
|
660
|
+
method: 'client.quotas.get',
|
|
661
|
+
example:
|
|
662
|
+
"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 quota = await client.quotas.get('us-sva-1');\n\nconsole.log(quota.compute);",
|
|
662
663
|
},
|
|
663
664
|
go: {
|
|
664
665
|
method: 'client.Quotas.Get',
|
|
665
666
|
example:
|
|
666
667
|
'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/quotas"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tquota, err := client.Quotas.Get(context.TODO(), quotas.QuotaGetParamsRegionUsSva1)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", quota.Compute)\n}\n',
|
|
667
668
|
},
|
|
669
|
+
cli: {
|
|
670
|
+
method: 'quotas get',
|
|
671
|
+
example: "nirvana quotas get \\\n --api-key 'My API Key' \\\n --region us-sva-1",
|
|
672
|
+
},
|
|
668
673
|
http: {
|
|
669
674
|
example:
|
|
670
675
|
'curl https://api.nirvanalabs.io/v1/quotas/$REGION \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
671
676
|
},
|
|
672
|
-
typescript: {
|
|
673
|
-
method: 'client.quotas.get',
|
|
674
|
-
example:
|
|
675
|
-
"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 quota = await client.quotas.get('us-sva-1');\n\nconsole.log(quota.compute);",
|
|
676
|
-
},
|
|
677
677
|
},
|
|
678
678
|
},
|
|
679
679
|
{
|
|
@@ -689,24 +689,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
689
689
|
markdown:
|
|
690
690
|
"## list\n\n`client.quotas.list(): { items: quota[]; pagination: pagination; }`\n\n**get** `/v1/quotas`\n\nList quota usage and limits for the current organization across all regions\n\n### Returns\n\n- `{ items: { compute: quota_compute; networking: quota_networking; nks: quota_nks; region: region_name; storage: quota_storage; }[]; pagination: { next_cursor: string; previous_cursor: string; total_count: number; }; }`\n\n - `items: { compute: { memory_gb: quota_resource_detail; vcpu: quota_resource_detail; }; networking: { connect_connections: quota_resource_detail; public_ips: quota_resource_detail; vpcs: quota_resource_detail; }; nks: { clusters: quota_resource_detail; node_pool_memory_gb: quota_resource_detail; node_pool_vcpu: quota_resource_detail; public_ips: quota_resource_detail; }; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; storage: { abs: quota_resource_detail; local_nvme: quota_resource_detail; }; }[]`\n - `pagination: { next_cursor: string; previous_cursor: string; total_count: number; }`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst quotaList = await client.quotas.list();\n\nconsole.log(quotaList);\n```",
|
|
691
691
|
perLanguage: {
|
|
692
|
-
|
|
693
|
-
method: 'quotas
|
|
694
|
-
example:
|
|
692
|
+
typescript: {
|
|
693
|
+
method: 'client.quotas.list',
|
|
694
|
+
example:
|
|
695
|
+
"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 quotaList = await client.quotas.list();\n\nconsole.log(quotaList.items);",
|
|
695
696
|
},
|
|
696
697
|
go: {
|
|
697
698
|
method: 'client.Quotas.List',
|
|
698
699
|
example:
|
|
699
700
|
'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\tquotaList, err := client.Quotas.List(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", quotaList.Items)\n}\n',
|
|
700
701
|
},
|
|
702
|
+
cli: {
|
|
703
|
+
method: 'quotas list',
|
|
704
|
+
example: "nirvana quotas list \\\n --api-key 'My API Key'",
|
|
705
|
+
},
|
|
701
706
|
http: {
|
|
702
707
|
example:
|
|
703
708
|
'curl https://api.nirvanalabs.io/v1/quotas \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
704
709
|
},
|
|
705
|
-
typescript: {
|
|
706
|
-
method: 'client.quotas.list',
|
|
707
|
-
example:
|
|
708
|
-
"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 quotaList = await client.quotas.list();\n\nconsole.log(quotaList.items);",
|
|
709
|
-
},
|
|
710
710
|
},
|
|
711
711
|
},
|
|
712
712
|
{
|
|
@@ -723,24 +723,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
723
723
|
markdown:
|
|
724
724
|
"## 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?: audit_log_target; }`\n\n**get** `/v1/audit_logs/{audit_log_id}`\n\nGet an Audit Log entry\n\n### Parameters\n\n- `audit_log_id: string`\n\n### Returns\n\n- `{ id: string; action: string; actor: { id: string; name: string; type: audit_log_type; }; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: { id: string; type: string; }; }`\n Audit log entry.\n\n - `id: string`\n - `action: string`\n - `actor: { id: string; name: string; type: 'user' | 'api_key'; }`\n - `client_ip: string`\n - `created_at: string`\n - `method: string`\n - `path: string`\n - `status_code: number`\n - `user_agent: string`\n - `target?: { id: string; type: string; }`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst auditLog = await client.auditLogs.get('audit_log_id');\n\nconsole.log(auditLog);\n```",
|
|
725
725
|
perLanguage: {
|
|
726
|
-
|
|
727
|
-
method: '
|
|
728
|
-
example:
|
|
726
|
+
typescript: {
|
|
727
|
+
method: 'client.auditLogs.get',
|
|
728
|
+
example:
|
|
729
|
+
"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);",
|
|
729
730
|
},
|
|
730
731
|
go: {
|
|
731
732
|
method: 'client.AuditLogs.Get',
|
|
732
733
|
example:
|
|
733
734
|
'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',
|
|
734
735
|
},
|
|
736
|
+
cli: {
|
|
737
|
+
method: 'audit_logs get',
|
|
738
|
+
example: "nirvana audit-logs get \\\n --api-key 'My API Key' \\\n --audit-log-id audit_log_id",
|
|
739
|
+
},
|
|
735
740
|
http: {
|
|
736
741
|
example:
|
|
737
742
|
'curl https://api.nirvanalabs.io/v1/audit_logs/$AUDIT_LOG_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
738
743
|
},
|
|
739
|
-
typescript: {
|
|
740
|
-
method: 'client.auditLogs.get',
|
|
741
|
-
example:
|
|
742
|
-
"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);",
|
|
743
|
-
},
|
|
744
744
|
},
|
|
745
745
|
},
|
|
746
746
|
{
|
|
@@ -757,24 +757,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
757
757
|
markdown:
|
|
758
758
|
"## 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?: audit_log_target; }`\n\n**get** `/v1/audit_logs`\n\nList Audit Log entries for an organization\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; action: string; actor: { id: string; name: string; type: audit_log_type; }; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: { id: string; type: string; }; }`\n Audit log entry.\n\n - `id: string`\n - `action: string`\n - `actor: { id: string; name: string; type: 'user' | 'api_key'; }`\n - `client_ip: string`\n - `created_at: string`\n - `method: string`\n - `path: string`\n - `status_code: number`\n - `user_agent: string`\n - `target?: { id: string; type: string; }`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const auditLog of client.auditLogs.list()) {\n console.log(auditLog);\n}\n```",
|
|
759
759
|
perLanguage: {
|
|
760
|
-
|
|
761
|
-
method: '
|
|
762
|
-
example:
|
|
760
|
+
typescript: {
|
|
761
|
+
method: 'client.auditLogs.list',
|
|
762
|
+
example:
|
|
763
|
+
"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}",
|
|
763
764
|
},
|
|
764
765
|
go: {
|
|
765
766
|
method: 'client.AuditLogs.List',
|
|
766
767
|
example:
|
|
767
768
|
'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',
|
|
768
769
|
},
|
|
770
|
+
cli: {
|
|
771
|
+
method: 'audit_logs list',
|
|
772
|
+
example: "nirvana audit-logs list \\\n --api-key 'My API Key'",
|
|
773
|
+
},
|
|
769
774
|
http: {
|
|
770
775
|
example:
|
|
771
776
|
'curl https://api.nirvanalabs.io/v1/audit_logs \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
772
777
|
},
|
|
773
|
-
typescript: {
|
|
774
|
-
method: 'client.auditLogs.list',
|
|
775
|
-
example:
|
|
776
|
-
"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}",
|
|
777
|
-
},
|
|
778
778
|
},
|
|
779
779
|
},
|
|
780
780
|
{
|
|
@@ -791,24 +791,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
791
791
|
markdown:
|
|
792
792
|
"## 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```",
|
|
793
793
|
perLanguage: {
|
|
794
|
-
|
|
795
|
-
method: 'projects
|
|
796
|
-
example:
|
|
794
|
+
typescript: {
|
|
795
|
+
method: 'client.projects.create',
|
|
796
|
+
example:
|
|
797
|
+
"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);",
|
|
797
798
|
},
|
|
798
799
|
go: {
|
|
799
800
|
method: 'client.Projects.New',
|
|
800
801
|
example:
|
|
801
802
|
'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',
|
|
802
803
|
},
|
|
804
|
+
cli: {
|
|
805
|
+
method: 'projects create',
|
|
806
|
+
example: "nirvana projects create \\\n --api-key 'My API Key' \\\n --name 'My Project'",
|
|
807
|
+
},
|
|
803
808
|
http: {
|
|
804
809
|
example:
|
|
805
810
|
'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 }\'',
|
|
806
811
|
},
|
|
807
|
-
typescript: {
|
|
808
|
-
method: 'client.projects.create',
|
|
809
|
-
example:
|
|
810
|
-
"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);",
|
|
811
|
-
},
|
|
812
812
|
},
|
|
813
813
|
},
|
|
814
814
|
{
|
|
@@ -825,24 +825,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
825
825
|
markdown:
|
|
826
826
|
"## 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```",
|
|
827
827
|
perLanguage: {
|
|
828
|
-
|
|
829
|
-
method: 'projects
|
|
830
|
-
example:
|
|
828
|
+
typescript: {
|
|
829
|
+
method: 'client.projects.get',
|
|
830
|
+
example:
|
|
831
|
+
"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);",
|
|
831
832
|
},
|
|
832
833
|
go: {
|
|
833
834
|
method: 'client.Projects.Get',
|
|
834
835
|
example:
|
|
835
836
|
'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',
|
|
836
837
|
},
|
|
838
|
+
cli: {
|
|
839
|
+
method: 'projects get',
|
|
840
|
+
example: "nirvana projects get \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
841
|
+
},
|
|
837
842
|
http: {
|
|
838
843
|
example:
|
|
839
844
|
'curl https://api.nirvanalabs.io/v1/projects/$PROJECT_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
840
845
|
},
|
|
841
|
-
typescript: {
|
|
842
|
-
method: 'client.projects.get',
|
|
843
|
-
example:
|
|
844
|
-
"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);",
|
|
845
|
-
},
|
|
846
846
|
},
|
|
847
847
|
},
|
|
848
848
|
{
|
|
@@ -859,24 +859,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
859
859
|
markdown:
|
|
860
860
|
"## 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```",
|
|
861
861
|
perLanguage: {
|
|
862
|
-
|
|
863
|
-
method: 'projects
|
|
864
|
-
example:
|
|
862
|
+
typescript: {
|
|
863
|
+
method: 'client.projects.update',
|
|
864
|
+
example:
|
|
865
|
+
"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);",
|
|
865
866
|
},
|
|
866
867
|
go: {
|
|
867
868
|
method: 'client.Projects.Update',
|
|
868
869
|
example:
|
|
869
870
|
'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',
|
|
870
871
|
},
|
|
872
|
+
cli: {
|
|
873
|
+
method: 'projects update',
|
|
874
|
+
example: "nirvana projects update \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
875
|
+
},
|
|
871
876
|
http: {
|
|
872
877
|
example:
|
|
873
878
|
'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 }\'',
|
|
874
879
|
},
|
|
875
|
-
typescript: {
|
|
876
|
-
method: 'client.projects.update',
|
|
877
|
-
example:
|
|
878
|
-
"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);",
|
|
879
|
-
},
|
|
880
880
|
},
|
|
881
881
|
},
|
|
882
882
|
{
|
|
@@ -891,24 +891,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
891
891
|
markdown:
|
|
892
892
|
"## 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```",
|
|
893
893
|
perLanguage: {
|
|
894
|
-
|
|
895
|
-
method: 'projects
|
|
896
|
-
example:
|
|
894
|
+
typescript: {
|
|
895
|
+
method: 'client.projects.delete',
|
|
896
|
+
example:
|
|
897
|
+
"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');",
|
|
897
898
|
},
|
|
898
899
|
go: {
|
|
899
900
|
method: 'client.Projects.Delete',
|
|
900
901
|
example:
|
|
901
902
|
'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',
|
|
902
903
|
},
|
|
904
|
+
cli: {
|
|
905
|
+
method: 'projects delete',
|
|
906
|
+
example: "nirvana projects delete \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
907
|
+
},
|
|
903
908
|
http: {
|
|
904
909
|
example:
|
|
905
910
|
'curl https://api.nirvanalabs.io/v1/projects/$PROJECT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
906
911
|
},
|
|
907
|
-
typescript: {
|
|
908
|
-
method: 'client.projects.delete',
|
|
909
|
-
example:
|
|
910
|
-
"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');",
|
|
911
|
-
},
|
|
912
912
|
},
|
|
913
913
|
},
|
|
914
914
|
{
|
|
@@ -925,24 +925,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
925
925
|
markdown:
|
|
926
926
|
"## 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```",
|
|
927
927
|
perLanguage: {
|
|
928
|
-
|
|
929
|
-
method: 'projects
|
|
930
|
-
example:
|
|
928
|
+
typescript: {
|
|
929
|
+
method: 'client.projects.list',
|
|
930
|
+
example:
|
|
931
|
+
"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}",
|
|
931
932
|
},
|
|
932
933
|
go: {
|
|
933
934
|
method: 'client.Projects.List',
|
|
934
935
|
example:
|
|
935
936
|
'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',
|
|
936
937
|
},
|
|
938
|
+
cli: {
|
|
939
|
+
method: 'projects list',
|
|
940
|
+
example: "nirvana projects list \\\n --api-key 'My API Key'",
|
|
941
|
+
},
|
|
937
942
|
http: {
|
|
938
943
|
example:
|
|
939
944
|
'curl https://api.nirvanalabs.io/v1/projects \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
940
945
|
},
|
|
941
|
-
typescript: {
|
|
942
|
-
method: 'client.projects.list',
|
|
943
|
-
example:
|
|
944
|
-
"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}",
|
|
945
|
-
},
|
|
946
946
|
},
|
|
947
947
|
},
|
|
948
948
|
{
|
|
@@ -959,24 +959,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
959
959
|
markdown:
|
|
960
960
|
"## 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-sva-2');\n\nconsole.log(region);\n```",
|
|
961
961
|
perLanguage: {
|
|
962
|
-
|
|
963
|
-
method: 'regions
|
|
964
|
-
example:
|
|
962
|
+
typescript: {
|
|
963
|
+
method: 'client.regions.get',
|
|
964
|
+
example:
|
|
965
|
+
"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-sva-2');\n\nconsole.log(region.availability);",
|
|
965
966
|
},
|
|
966
967
|
go: {
|
|
967
968
|
method: 'client.Regions.Get',
|
|
968
969
|
example:
|
|
969
970
|
'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-sva-2")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", region.Availability)\n}\n',
|
|
970
971
|
},
|
|
972
|
+
cli: {
|
|
973
|
+
method: 'regions get',
|
|
974
|
+
example: "nirvana regions get \\\n --api-key 'My API Key' \\\n --name us-sva-2",
|
|
975
|
+
},
|
|
971
976
|
http: {
|
|
972
977
|
example:
|
|
973
978
|
'curl https://api.nirvanalabs.io/v1/regions/$NAME \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
974
979
|
},
|
|
975
|
-
typescript: {
|
|
976
|
-
method: 'client.regions.get',
|
|
977
|
-
example:
|
|
978
|
-
"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-sva-2');\n\nconsole.log(region.availability);",
|
|
979
|
-
},
|
|
980
980
|
},
|
|
981
981
|
},
|
|
982
982
|
{
|
|
@@ -993,24 +993,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
993
993
|
markdown:
|
|
994
994
|
"## 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```",
|
|
995
995
|
perLanguage: {
|
|
996
|
-
|
|
997
|
-
method: 'regions
|
|
998
|
-
example:
|
|
996
|
+
typescript: {
|
|
997
|
+
method: 'client.regions.list',
|
|
998
|
+
example:
|
|
999
|
+
"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}",
|
|
999
1000
|
},
|
|
1000
1001
|
go: {
|
|
1001
1002
|
method: 'client.Regions.List',
|
|
1002
1003
|
example:
|
|
1003
1004
|
'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',
|
|
1004
1005
|
},
|
|
1006
|
+
cli: {
|
|
1007
|
+
method: 'regions list',
|
|
1008
|
+
example: "nirvana regions list \\\n --api-key 'My API Key'",
|
|
1009
|
+
},
|
|
1005
1010
|
http: {
|
|
1006
1011
|
example:
|
|
1007
1012
|
'curl https://api.nirvanalabs.io/v1/regions \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1008
1013
|
},
|
|
1009
|
-
typescript: {
|
|
1010
|
-
method: 'client.regions.list',
|
|
1011
|
-
example:
|
|
1012
|
-
"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}",
|
|
1013
|
-
},
|
|
1014
1014
|
},
|
|
1015
1015
|
},
|
|
1016
1016
|
{
|
|
@@ -1027,24 +1027,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1027
1027
|
markdown:
|
|
1028
1028
|
"## get\n\n`client.instanceTypes.get(region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1', name: string): { chipset: string; created_at: string; family: string; memory_gb: number; name: string; network_bandwidth_gbps: number; region: region_name; series: string; updated_at: string; vcpu: number; }`\n\n**get** `/v1/instance_types/{region}/{name}`\n\nGet an instance type by region and name\n\n### Parameters\n\n- `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'`\n\n- `name: string`\n\n### Returns\n\n- `{ chipset: string; created_at: string; family: string; memory_gb: number; name: string; network_bandwidth_gbps: number; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; series: string; updated_at: string; vcpu: number; }`\n Instance type.\n\n - `chipset: string`\n - `created_at: string`\n - `family: string`\n - `memory_gb: number`\n - `name: string`\n - `network_bandwidth_gbps: number`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'`\n - `series: 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\nconst instanceType = await client.instanceTypes.get('n1-standard-8', { region: 'us-sva-2' });\n\nconsole.log(instanceType);\n```",
|
|
1029
1029
|
perLanguage: {
|
|
1030
|
-
|
|
1031
|
-
method: '
|
|
1030
|
+
typescript: {
|
|
1031
|
+
method: 'client.instanceTypes.get',
|
|
1032
1032
|
example:
|
|
1033
|
-
"nirvana
|
|
1033
|
+
"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 instanceType = await client.instanceTypes.get('n1-standard-8', { region: 'us-sva-2' });\n\nconsole.log(instanceType.network_bandwidth_gbps);",
|
|
1034
1034
|
},
|
|
1035
1035
|
go: {
|
|
1036
1036
|
method: 'client.InstanceTypes.Get',
|
|
1037
1037
|
example:
|
|
1038
1038
|
'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\tinstanceType, err := client.InstanceTypes.Get(\n\t\tcontext.TODO(),\n\t\tinstance_types.InstanceTypeGetParamsRegionUsSva2,\n\t\t"n1-standard-8",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", instanceType.NetworkBandwidthGbps)\n}\n',
|
|
1039
1039
|
},
|
|
1040
|
-
|
|
1040
|
+
cli: {
|
|
1041
|
+
method: 'instance_types get',
|
|
1041
1042
|
example:
|
|
1042
|
-
|
|
1043
|
+
"nirvana instance-types get \\\n --api-key 'My API Key' \\\n --region us-sva-2 \\\n --name n1-standard-8",
|
|
1043
1044
|
},
|
|
1044
|
-
|
|
1045
|
-
method: 'client.instanceTypes.get',
|
|
1045
|
+
http: {
|
|
1046
1046
|
example:
|
|
1047
|
-
|
|
1047
|
+
'curl https://api.nirvanalabs.io/v1/instance_types/$REGION/$NAME \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1048
1048
|
},
|
|
1049
1049
|
},
|
|
1050
1050
|
},
|
|
@@ -1062,24 +1062,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1062
1062
|
markdown:
|
|
1063
1063
|
"## list\n\n`client.instanceTypes.list(cursor?: string, limit?: number): { chipset: string; created_at: string; family: string; memory_gb: number; name: string; network_bandwidth_gbps: number; region: region_name; series: 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; family: string; memory_gb: number; name: string; network_bandwidth_gbps: number; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; series: string; updated_at: string; vcpu: number; }`\n Instance type.\n\n - `chipset: string`\n - `created_at: string`\n - `family: string`\n - `memory_gb: number`\n - `name: string`\n - `network_bandwidth_gbps: number`\n - `region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'`\n - `series: 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```",
|
|
1064
1064
|
perLanguage: {
|
|
1065
|
-
|
|
1066
|
-
method: '
|
|
1067
|
-
example:
|
|
1065
|
+
typescript: {
|
|
1066
|
+
method: 'client.instanceTypes.list',
|
|
1067
|
+
example:
|
|
1068
|
+
"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.network_bandwidth_gbps);\n}",
|
|
1068
1069
|
},
|
|
1069
1070
|
go: {
|
|
1070
1071
|
method: 'client.InstanceTypes.List',
|
|
1071
1072
|
example:
|
|
1072
1073
|
'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',
|
|
1073
1074
|
},
|
|
1075
|
+
cli: {
|
|
1076
|
+
method: 'instance_types list',
|
|
1077
|
+
example: "nirvana instance-types list \\\n --api-key 'My API Key'",
|
|
1078
|
+
},
|
|
1074
1079
|
http: {
|
|
1075
1080
|
example:
|
|
1076
1081
|
'curl https://api.nirvanalabs.io/v1/instance_types \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1077
1082
|
},
|
|
1078
|
-
typescript: {
|
|
1079
|
-
method: 'client.instanceTypes.list',
|
|
1080
|
-
example:
|
|
1081
|
-
"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.network_bandwidth_gbps);\n}",
|
|
1082
|
-
},
|
|
1083
1083
|
},
|
|
1084
1084
|
},
|
|
1085
1085
|
{
|
|
@@ -1110,24 +1110,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1110
1110
|
markdown:
|
|
1111
1111
|
"## create\n\n`client.compute.vms.create(boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; }, name: string, os_image_name: string, project_id: string, public_ip_enabled: boolean, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1', ssh_key: { public_key: string; }, subnet_id: string, cpu_config?: { vcpu?: number; }, data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[], instance_type?: string, memory_config?: { 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**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- `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'`\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 use to access the VM.\n\n- `subnet_id: string`\n ID of the subnet to use for the VM.\n\n- `cpu_config?: { vcpu?: number; }`\n CPU configuration for the VM.\n - `vcpu?: number`\n Number of virtual CPUs.\n\n- `data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[]`\n Data volumes for the VM.\n\n- `instance_type?: string`\n Instance type name.\n\n- `memory_config?: { size?: number; }`\n Memory configuration for the VM.\n - `size?: number`\n Size of the memory in GB.\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 name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation);\n```",
|
|
1112
1112
|
perLanguage: {
|
|
1113
|
-
|
|
1114
|
-
method: 'vms
|
|
1113
|
+
typescript: {
|
|
1114
|
+
method: 'client.compute.vms.create',
|
|
1115
1115
|
example:
|
|
1116
|
-
"nirvana
|
|
1116
|
+
"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 name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);",
|
|
1117
1117
|
},
|
|
1118
1118
|
go: {
|
|
1119
1119
|
method: 'client.Compute.VMs.New',
|
|
1120
1120
|
example:
|
|
1121
1121
|
'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\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1122
1122
|
},
|
|
1123
|
-
|
|
1123
|
+
cli: {
|
|
1124
|
+
method: 'vms create',
|
|
1124
1125
|
example:
|
|
1125
|
-
|
|
1126
|
+
"nirvana compute:vms create \\\n --api-key 'My API Key' \\\n --boot-volume '{size: 100, type: abs}' \\\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-sva-2 \\\n --ssh-key '{public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2}' \\\n --subnet-id 123e4567-e89b-12d3-a456-426614174000",
|
|
1126
1127
|
},
|
|
1127
|
-
|
|
1128
|
-
method: 'client.compute.vms.create',
|
|
1128
|
+
http: {
|
|
1129
1129
|
example:
|
|
1130
|
-
|
|
1130
|
+
'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 "name": "my-vm",\n "os_image_name": "ubuntu-noble-2025-10-01",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "public_ip_enabled": true,\n "region": "us-sva-2",\n "ssh_key": {\n "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n },\n "subnet_id": "123e4567-e89b-12d3-a456-426614174000",\n "instance_type": "n1-standard-8",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1131
1131
|
},
|
|
1132
1132
|
},
|
|
1133
1133
|
},
|
|
@@ -1145,24 +1145,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1145
1145
|
markdown:
|
|
1146
1146
|
"## 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; instance_type?: 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'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; instance_type?: 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'`\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 - `instance_type?: 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```",
|
|
1147
1147
|
perLanguage: {
|
|
1148
|
-
|
|
1149
|
-
method: 'vms
|
|
1150
|
-
example:
|
|
1148
|
+
typescript: {
|
|
1149
|
+
method: 'client.compute.vms.get',
|
|
1150
|
+
example:
|
|
1151
|
+
"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);",
|
|
1151
1152
|
},
|
|
1152
1153
|
go: {
|
|
1153
1154
|
method: 'client.Compute.VMs.Get',
|
|
1154
1155
|
example:
|
|
1155
1156
|
'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',
|
|
1156
1157
|
},
|
|
1158
|
+
cli: {
|
|
1159
|
+
method: 'vms get',
|
|
1160
|
+
example: "nirvana compute:vms get \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
1161
|
+
},
|
|
1157
1162
|
http: {
|
|
1158
1163
|
example:
|
|
1159
1164
|
'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1160
1165
|
},
|
|
1161
|
-
typescript: {
|
|
1162
|
-
method: 'client.compute.vms.get',
|
|
1163
|
-
example:
|
|
1164
|
-
"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);",
|
|
1165
|
-
},
|
|
1166
1166
|
},
|
|
1167
1167
|
},
|
|
1168
1168
|
{
|
|
@@ -1187,24 +1187,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1187
1187
|
markdown:
|
|
1188
1188
|
"## update\n\n`client.compute.vms.update(vm_id: string, cpu_config?: { vcpu?: number; }, instance_type?: string, 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- `instance_type?: string`\n Instance type name.\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```",
|
|
1189
1189
|
perLanguage: {
|
|
1190
|
-
|
|
1191
|
-
method: 'vms
|
|
1192
|
-
example:
|
|
1190
|
+
typescript: {
|
|
1191
|
+
method: 'client.compute.vms.update',
|
|
1192
|
+
example:
|
|
1193
|
+
"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);",
|
|
1193
1194
|
},
|
|
1194
1195
|
go: {
|
|
1195
1196
|
method: 'client.Compute.VMs.Update',
|
|
1196
1197
|
example:
|
|
1197
1198
|
'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',
|
|
1198
1199
|
},
|
|
1200
|
+
cli: {
|
|
1201
|
+
method: 'vms update',
|
|
1202
|
+
example: "nirvana compute:vms update \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
1203
|
+
},
|
|
1199
1204
|
http: {
|
|
1200
1205
|
example:
|
|
1201
1206
|
'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 "instance_type": "n1-standard-8",\n "name": "my-vm",\n "public_ip_enabled": true,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1202
1207
|
},
|
|
1203
|
-
typescript: {
|
|
1204
|
-
method: 'client.compute.vms.update',
|
|
1205
|
-
example:
|
|
1206
|
-
"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);",
|
|
1207
|
-
},
|
|
1208
1208
|
},
|
|
1209
1209
|
},
|
|
1210
1210
|
{
|
|
@@ -1221,24 +1221,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1221
1221
|
markdown:
|
|
1222
1222
|
"## 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```",
|
|
1223
1223
|
perLanguage: {
|
|
1224
|
-
|
|
1225
|
-
method: 'vms
|
|
1226
|
-
example:
|
|
1224
|
+
typescript: {
|
|
1225
|
+
method: 'client.compute.vms.delete',
|
|
1226
|
+
example:
|
|
1227
|
+
"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);",
|
|
1227
1228
|
},
|
|
1228
1229
|
go: {
|
|
1229
1230
|
method: 'client.Compute.VMs.Delete',
|
|
1230
1231
|
example:
|
|
1231
1232
|
'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',
|
|
1232
1233
|
},
|
|
1234
|
+
cli: {
|
|
1235
|
+
method: 'vms delete',
|
|
1236
|
+
example: "nirvana compute:vms delete \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
1237
|
+
},
|
|
1233
1238
|
http: {
|
|
1234
1239
|
example:
|
|
1235
1240
|
'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1236
1241
|
},
|
|
1237
|
-
typescript: {
|
|
1238
|
-
method: 'client.compute.vms.delete',
|
|
1239
|
-
example:
|
|
1240
|
-
"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);",
|
|
1241
|
-
},
|
|
1242
1242
|
},
|
|
1243
1243
|
},
|
|
1244
1244
|
{
|
|
@@ -1255,24 +1255,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1255
1255
|
markdown:
|
|
1256
1256
|
"## 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; instance_type?: 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'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; instance_type?: 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'`\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 - `instance_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 vm of client.compute.vms.list({ project_id: 'project_id' })) {\n console.log(vm);\n}\n```",
|
|
1257
1257
|
perLanguage: {
|
|
1258
|
-
|
|
1259
|
-
method: 'vms
|
|
1260
|
-
example:
|
|
1258
|
+
typescript: {
|
|
1259
|
+
method: 'client.compute.vms.list',
|
|
1260
|
+
example:
|
|
1261
|
+
"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}",
|
|
1261
1262
|
},
|
|
1262
1263
|
go: {
|
|
1263
1264
|
method: 'client.Compute.VMs.List',
|
|
1264
1265
|
example:
|
|
1265
1266
|
'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',
|
|
1266
1267
|
},
|
|
1268
|
+
cli: {
|
|
1269
|
+
method: 'vms list',
|
|
1270
|
+
example: "nirvana compute:vms list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
1271
|
+
},
|
|
1267
1272
|
http: {
|
|
1268
1273
|
example:
|
|
1269
1274
|
'curl https://api.nirvanalabs.io/v1/compute/vms \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1270
1275
|
},
|
|
1271
|
-
typescript: {
|
|
1272
|
-
method: 'client.compute.vms.list',
|
|
1273
|
-
example:
|
|
1274
|
-
"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}",
|
|
1275
|
-
},
|
|
1276
1276
|
},
|
|
1277
1277
|
},
|
|
1278
1278
|
{
|
|
@@ -1289,24 +1289,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1289
1289
|
markdown:
|
|
1290
1290
|
"## 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```",
|
|
1291
1291
|
perLanguage: {
|
|
1292
|
-
|
|
1293
|
-
method: 'vms
|
|
1294
|
-
example:
|
|
1292
|
+
typescript: {
|
|
1293
|
+
method: 'client.compute.vms.restart',
|
|
1294
|
+
example:
|
|
1295
|
+
"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);",
|
|
1295
1296
|
},
|
|
1296
1297
|
go: {
|
|
1297
1298
|
method: 'client.Compute.VMs.Restart',
|
|
1298
1299
|
example:
|
|
1299
1300
|
'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',
|
|
1300
1301
|
},
|
|
1302
|
+
cli: {
|
|
1303
|
+
method: 'vms restart',
|
|
1304
|
+
example: "nirvana compute:vms restart \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
1305
|
+
},
|
|
1301
1306
|
http: {
|
|
1302
1307
|
example:
|
|
1303
1308
|
'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/restart \\\n -X POST \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1304
1309
|
},
|
|
1305
|
-
typescript: {
|
|
1306
|
-
method: 'client.compute.vms.restart',
|
|
1307
|
-
example:
|
|
1308
|
-
"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);",
|
|
1309
|
-
},
|
|
1310
1310
|
},
|
|
1311
1311
|
},
|
|
1312
1312
|
{
|
|
@@ -1335,24 +1335,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1335
1335
|
markdown:
|
|
1336
1336
|
"## create\n\n`client.compute.vms.availability.create(boot_volume: { size: number; type: 'nvme' | 'abs'; tags?: string[]; }, name: string, os_image_name: string, project_id: string, public_ip_enabled: boolean, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1', ssh_key: { public_key: string; }, subnet_id: string, cpu_config?: { vcpu?: number; }, data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[], instance_type?: string, memory_config?: { size?: number; }, 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- `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'`\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 use to access the VM.\n\n- `subnet_id: string`\n ID of the subnet to use for the VM.\n\n- `cpu_config?: { vcpu?: number; }`\n CPU configuration for the VM.\n - `vcpu?: number`\n Number of virtual CPUs.\n\n- `data_volumes?: { name: string; size: number; type: 'nvme' | 'abs'; tags?: string[]; }[]`\n Data volumes for the VM.\n\n- `instance_type?: string`\n Instance type name.\n\n- `memory_config?: { size?: number; }`\n Memory configuration for the VM.\n - `size?: number`\n Size of the memory in GB.\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 name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: { public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2' },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n})\n```",
|
|
1337
1337
|
perLanguage: {
|
|
1338
|
-
|
|
1339
|
-
method: 'availability
|
|
1338
|
+
typescript: {
|
|
1339
|
+
method: 'client.compute.vms.availability.create',
|
|
1340
1340
|
example:
|
|
1341
|
-
"nirvana
|
|
1341
|
+
"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 name: 'my-vm',\n os_image_name: 'ubuntu-noble-2025-10-01',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n public_ip_enabled: true,\n region: 'us-sva-2',\n ssh_key: {\n public_key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2',\n },\n subnet_id: '123e4567-e89b-12d3-a456-426614174000',\n});",
|
|
1342
1342
|
},
|
|
1343
1343
|
go: {
|
|
1344
1344
|
method: 'client.Compute.VMs.Availability.New',
|
|
1345
1345
|
example:
|
|
1346
1346
|
'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\tName: "my-vm",\n\t\tOSImageName: "ubuntu-noble-2025-10-01",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tPublicIPEnabled: true,\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSSHKey: compute.SSHKeyRequestParam{\n\t\t\tPublicKey: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2",\n\t\t},\n\t\tSubnetID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
1347
1347
|
},
|
|
1348
|
-
|
|
1348
|
+
cli: {
|
|
1349
|
+
method: 'availability create',
|
|
1349
1350
|
example:
|
|
1350
|
-
|
|
1351
|
+
"nirvana compute:vms:availability create \\\n --api-key 'My API Key' \\\n --boot-volume '{size: 100, type: abs}' \\\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-sva-2 \\\n --ssh-key '{public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2}' \\\n --subnet-id 123e4567-e89b-12d3-a456-426614174000",
|
|
1351
1352
|
},
|
|
1352
|
-
|
|
1353
|
-
method: 'client.compute.vms.availability.create',
|
|
1353
|
+
http: {
|
|
1354
1354
|
example:
|
|
1355
|
-
|
|
1355
|
+
'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 "name": "my-vm",\n "os_image_name": "ubuntu-noble-2025-10-01",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "public_ip_enabled": true,\n "region": "us-sva-2",\n "ssh_key": {\n "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"\n },\n "subnet_id": "123e4567-e89b-12d3-a456-426614174000",\n "instance_type": "n1-standard-8",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1356
1356
|
},
|
|
1357
1357
|
},
|
|
1358
1358
|
},
|
|
@@ -1376,24 +1376,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1376
1376
|
markdown:
|
|
1377
1377
|
"## update\n\n`client.compute.vms.availability.update(vm_id: string, cpu_config?: { vcpu?: number; }, instance_type?: string, 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- `instance_type?: string`\n Instance type name.\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```",
|
|
1378
1378
|
perLanguage: {
|
|
1379
|
-
|
|
1380
|
-
method: 'availability
|
|
1381
|
-
example:
|
|
1379
|
+
typescript: {
|
|
1380
|
+
method: 'client.compute.vms.availability.update',
|
|
1381
|
+
example:
|
|
1382
|
+
"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');",
|
|
1382
1383
|
},
|
|
1383
1384
|
go: {
|
|
1384
1385
|
method: 'client.Compute.VMs.Availability.Update',
|
|
1385
1386
|
example:
|
|
1386
1387
|
'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',
|
|
1387
1388
|
},
|
|
1389
|
+
cli: {
|
|
1390
|
+
method: 'availability update',
|
|
1391
|
+
example: "nirvana compute:vms:availability update \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
1392
|
+
},
|
|
1388
1393
|
http: {
|
|
1389
1394
|
example:
|
|
1390
1395
|
'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 "instance_type": "n1-standard-8",\n "name": "my-vm",\n "public_ip_enabled": true,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1391
1396
|
},
|
|
1392
|
-
typescript: {
|
|
1393
|
-
method: 'client.compute.vms.availability.update',
|
|
1394
|
-
example:
|
|
1395
|
-
"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');",
|
|
1396
|
-
},
|
|
1397
1397
|
},
|
|
1398
1398
|
},
|
|
1399
1399
|
{
|
|
@@ -1410,24 +1410,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1410
1410
|
markdown:
|
|
1411
1411
|
"## 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'; 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'`\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```",
|
|
1412
1412
|
perLanguage: {
|
|
1413
|
-
|
|
1414
|
-
method: 'volumes
|
|
1415
|
-
example:
|
|
1413
|
+
typescript: {
|
|
1414
|
+
method: 'client.compute.vms.volumes.list',
|
|
1415
|
+
example:
|
|
1416
|
+
"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}",
|
|
1416
1417
|
},
|
|
1417
1418
|
go: {
|
|
1418
1419
|
method: 'client.Compute.VMs.Volumes.List',
|
|
1419
1420
|
example:
|
|
1420
1421
|
'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',
|
|
1421
1422
|
},
|
|
1423
|
+
cli: {
|
|
1424
|
+
method: 'volumes list',
|
|
1425
|
+
example: "nirvana compute:vms:volumes list \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
1426
|
+
},
|
|
1422
1427
|
http: {
|
|
1423
1428
|
example:
|
|
1424
1429
|
'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1425
1430
|
},
|
|
1426
|
-
typescript: {
|
|
1427
|
-
method: 'client.compute.vms.volumes.list',
|
|
1428
|
-
example:
|
|
1429
|
-
"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}",
|
|
1430
|
-
},
|
|
1431
1431
|
},
|
|
1432
1432
|
},
|
|
1433
1433
|
{
|
|
@@ -1443,24 +1443,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1443
1443
|
markdown:
|
|
1444
1444
|
"## 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```",
|
|
1445
1445
|
perLanguage: {
|
|
1446
|
-
|
|
1447
|
-
method: '
|
|
1448
|
-
example:
|
|
1446
|
+
typescript: {
|
|
1447
|
+
method: 'client.compute.vms.osImages.list',
|
|
1448
|
+
example:
|
|
1449
|
+
"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}",
|
|
1449
1450
|
},
|
|
1450
1451
|
go: {
|
|
1451
1452
|
method: 'client.Compute.VMs.OSImages.List',
|
|
1452
1453
|
example:
|
|
1453
1454
|
'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',
|
|
1454
1455
|
},
|
|
1456
|
+
cli: {
|
|
1457
|
+
method: 'os_images list',
|
|
1458
|
+
example: "nirvana compute:vms:os-images list \\\n --api-key 'My API Key'",
|
|
1459
|
+
},
|
|
1455
1460
|
http: {
|
|
1456
1461
|
example:
|
|
1457
1462
|
'curl https://api.nirvanalabs.io/v1/compute/vms/os_images \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1458
1463
|
},
|
|
1459
|
-
typescript: {
|
|
1460
|
-
method: 'client.compute.vms.osImages.list',
|
|
1461
|
-
example:
|
|
1462
|
-
"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}",
|
|
1463
|
-
},
|
|
1464
1464
|
},
|
|
1465
1465
|
},
|
|
1466
1466
|
{
|
|
@@ -1485,24 +1485,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1485
1485
|
markdown:
|
|
1486
1486
|
"## create\n\n`client.compute.volumes.create(name: string, project_id: string, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-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'`\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-sva-2',\n size: 100,\n type: 'abs',\n});\n\nconsole.log(operation);\n```",
|
|
1487
1487
|
perLanguage: {
|
|
1488
|
-
|
|
1489
|
-
method: 'volumes
|
|
1488
|
+
typescript: {
|
|
1489
|
+
method: 'client.compute.volumes.create',
|
|
1490
1490
|
example:
|
|
1491
|
-
"nirvana
|
|
1491
|
+
"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-sva-2',\n size: 100,\n type: 'abs',\n});\n\nconsole.log(operation.id);",
|
|
1492
1492
|
},
|
|
1493
1493
|
go: {
|
|
1494
1494
|
method: 'client.Compute.Volumes.New',
|
|
1495
1495
|
example:
|
|
1496
1496
|
'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.RegionNameUsSva2,\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',
|
|
1497
1497
|
},
|
|
1498
|
-
|
|
1498
|
+
cli: {
|
|
1499
|
+
method: 'volumes create',
|
|
1499
1500
|
example:
|
|
1500
|
-
|
|
1501
|
+
"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-sva-2 \\\n --size 100 \\\n --type abs",
|
|
1501
1502
|
},
|
|
1502
|
-
|
|
1503
|
-
method: 'client.compute.volumes.create',
|
|
1503
|
+
http: {
|
|
1504
1504
|
example:
|
|
1505
|
-
|
|
1505
|
+
'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-sva-2",\n "size": 100,\n "type": "abs",\n "tags": [\n "production",\n "ethereum"\n ],\n "vm_id": "123e4567-e89b-12d3-a456-426614174000"\n }\'',
|
|
1506
1506
|
},
|
|
1507
1507
|
},
|
|
1508
1508
|
},
|
|
@@ -1520,24 +1520,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1520
1520
|
markdown:
|
|
1521
1521
|
"## 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'; 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'`\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```",
|
|
1522
1522
|
perLanguage: {
|
|
1523
|
-
|
|
1524
|
-
method: 'volumes
|
|
1525
|
-
example:
|
|
1523
|
+
typescript: {
|
|
1524
|
+
method: 'client.compute.volumes.get',
|
|
1525
|
+
example:
|
|
1526
|
+
"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);",
|
|
1526
1527
|
},
|
|
1527
1528
|
go: {
|
|
1528
1529
|
method: 'client.Compute.Volumes.Get',
|
|
1529
1530
|
example:
|
|
1530
1531
|
'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',
|
|
1531
1532
|
},
|
|
1533
|
+
cli: {
|
|
1534
|
+
method: 'volumes get',
|
|
1535
|
+
example: "nirvana compute:volumes get \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
|
|
1536
|
+
},
|
|
1532
1537
|
http: {
|
|
1533
1538
|
example:
|
|
1534
1539
|
'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1535
1540
|
},
|
|
1536
|
-
typescript: {
|
|
1537
|
-
method: 'client.compute.volumes.get',
|
|
1538
|
-
example:
|
|
1539
|
-
"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);",
|
|
1540
|
-
},
|
|
1541
1541
|
},
|
|
1542
1542
|
},
|
|
1543
1543
|
{
|
|
@@ -1554,24 +1554,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1554
1554
|
markdown:
|
|
1555
1555
|
"## 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```",
|
|
1556
1556
|
perLanguage: {
|
|
1557
|
-
|
|
1558
|
-
method: 'volumes
|
|
1559
|
-
example:
|
|
1557
|
+
typescript: {
|
|
1558
|
+
method: 'client.compute.volumes.update',
|
|
1559
|
+
example:
|
|
1560
|
+
"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);",
|
|
1560
1561
|
},
|
|
1561
1562
|
go: {
|
|
1562
1563
|
method: 'client.Compute.Volumes.Update',
|
|
1563
1564
|
example:
|
|
1564
1565
|
'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',
|
|
1565
1566
|
},
|
|
1567
|
+
cli: {
|
|
1568
|
+
method: 'volumes update',
|
|
1569
|
+
example: "nirvana compute:volumes update \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
|
|
1570
|
+
},
|
|
1566
1571
|
http: {
|
|
1567
1572
|
example:
|
|
1568
1573
|
'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 }\'',
|
|
1569
1574
|
},
|
|
1570
|
-
typescript: {
|
|
1571
|
-
method: 'client.compute.volumes.update',
|
|
1572
|
-
example:
|
|
1573
|
-
"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);",
|
|
1574
|
-
},
|
|
1575
1575
|
},
|
|
1576
1576
|
},
|
|
1577
1577
|
{
|
|
@@ -1588,24 +1588,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1588
1588
|
markdown:
|
|
1589
1589
|
"## 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```",
|
|
1590
1590
|
perLanguage: {
|
|
1591
|
-
|
|
1592
|
-
method: 'volumes
|
|
1593
|
-
example:
|
|
1591
|
+
typescript: {
|
|
1592
|
+
method: 'client.compute.volumes.delete',
|
|
1593
|
+
example:
|
|
1594
|
+
"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);",
|
|
1594
1595
|
},
|
|
1595
1596
|
go: {
|
|
1596
1597
|
method: 'client.Compute.Volumes.Delete',
|
|
1597
1598
|
example:
|
|
1598
1599
|
'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',
|
|
1599
1600
|
},
|
|
1601
|
+
cli: {
|
|
1602
|
+
method: 'volumes delete',
|
|
1603
|
+
example: "nirvana compute:volumes delete \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
|
|
1604
|
+
},
|
|
1600
1605
|
http: {
|
|
1601
1606
|
example:
|
|
1602
1607
|
'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1603
1608
|
},
|
|
1604
|
-
typescript: {
|
|
1605
|
-
method: 'client.compute.volumes.delete',
|
|
1606
|
-
example:
|
|
1607
|
-
"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);",
|
|
1608
|
-
},
|
|
1609
1609
|
},
|
|
1610
1610
|
},
|
|
1611
1611
|
{
|
|
@@ -1622,24 +1622,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1622
1622
|
markdown:
|
|
1623
1623
|
"## 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'; 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'`\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```",
|
|
1624
1624
|
perLanguage: {
|
|
1625
|
-
|
|
1626
|
-
method: 'volumes
|
|
1627
|
-
example:
|
|
1625
|
+
typescript: {
|
|
1626
|
+
method: 'client.compute.volumes.list',
|
|
1627
|
+
example:
|
|
1628
|
+
"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}",
|
|
1628
1629
|
},
|
|
1629
1630
|
go: {
|
|
1630
1631
|
method: 'client.Compute.Volumes.List',
|
|
1631
1632
|
example:
|
|
1632
1633
|
'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',
|
|
1633
1634
|
},
|
|
1635
|
+
cli: {
|
|
1636
|
+
method: 'volumes list',
|
|
1637
|
+
example: "nirvana compute:volumes list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
1638
|
+
},
|
|
1634
1639
|
http: {
|
|
1635
1640
|
example:
|
|
1636
1641
|
'curl https://api.nirvanalabs.io/v1/compute/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1637
1642
|
},
|
|
1638
|
-
typescript: {
|
|
1639
|
-
method: 'client.compute.volumes.list',
|
|
1640
|
-
example:
|
|
1641
|
-
"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}",
|
|
1642
|
-
},
|
|
1643
1643
|
},
|
|
1644
1644
|
},
|
|
1645
1645
|
{
|
|
@@ -1656,24 +1656,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1656
1656
|
markdown:
|
|
1657
1657
|
"## 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```",
|
|
1658
1658
|
perLanguage: {
|
|
1659
|
-
|
|
1660
|
-
method: 'volumes
|
|
1659
|
+
typescript: {
|
|
1660
|
+
method: 'client.compute.volumes.attach',
|
|
1661
1661
|
example:
|
|
1662
|
-
"nirvana
|
|
1662
|
+
"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);",
|
|
1663
1663
|
},
|
|
1664
1664
|
go: {
|
|
1665
1665
|
method: 'client.Compute.Volumes.Attach',
|
|
1666
1666
|
example:
|
|
1667
1667
|
'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',
|
|
1668
1668
|
},
|
|
1669
|
-
|
|
1669
|
+
cli: {
|
|
1670
|
+
method: 'volumes attach',
|
|
1670
1671
|
example:
|
|
1671
|
-
|
|
1672
|
+
"nirvana compute:volumes attach \\\n --api-key 'My API Key' \\\n --volume-id volume_id \\\n --vm-id 123e4567-e89b-12d3-a456-426614174000",
|
|
1672
1673
|
},
|
|
1673
|
-
|
|
1674
|
-
method: 'client.compute.volumes.attach',
|
|
1674
|
+
http: {
|
|
1675
1675
|
example:
|
|
1676
|
-
|
|
1676
|
+
'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 }\'',
|
|
1677
1677
|
},
|
|
1678
1678
|
},
|
|
1679
1679
|
},
|
|
@@ -1691,24 +1691,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1691
1691
|
markdown:
|
|
1692
1692
|
"## 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```",
|
|
1693
1693
|
perLanguage: {
|
|
1694
|
-
|
|
1695
|
-
method: 'volumes
|
|
1696
|
-
example:
|
|
1694
|
+
typescript: {
|
|
1695
|
+
method: 'client.compute.volumes.detach',
|
|
1696
|
+
example:
|
|
1697
|
+
"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);",
|
|
1697
1698
|
},
|
|
1698
1699
|
go: {
|
|
1699
1700
|
method: 'client.Compute.Volumes.Detach',
|
|
1700
1701
|
example:
|
|
1701
1702
|
'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',
|
|
1702
1703
|
},
|
|
1704
|
+
cli: {
|
|
1705
|
+
method: 'volumes detach',
|
|
1706
|
+
example: "nirvana compute:volumes detach \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
|
|
1707
|
+
},
|
|
1703
1708
|
http: {
|
|
1704
1709
|
example:
|
|
1705
1710
|
'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID/detach \\\n -X POST \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1706
1711
|
},
|
|
1707
|
-
typescript: {
|
|
1708
|
-
method: 'client.compute.volumes.detach',
|
|
1709
|
-
example:
|
|
1710
|
-
"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);",
|
|
1711
|
-
},
|
|
1712
1712
|
},
|
|
1713
1713
|
},
|
|
1714
1714
|
{
|
|
@@ -1731,24 +1731,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1731
1731
|
markdown:
|
|
1732
1732
|
"## create\n\n`client.compute.volumes.availability.create(name: string, project_id: string, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-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'`\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-sva-2',\n size: 100,\n type: 'abs',\n})\n```",
|
|
1733
1733
|
perLanguage: {
|
|
1734
|
-
|
|
1735
|
-
method: 'availability
|
|
1734
|
+
typescript: {
|
|
1735
|
+
method: 'client.compute.volumes.availability.create',
|
|
1736
1736
|
example:
|
|
1737
|
-
"nirvana
|
|
1737
|
+
"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-sva-2',\n size: 100,\n type: 'abs',\n});",
|
|
1738
1738
|
},
|
|
1739
1739
|
go: {
|
|
1740
1740
|
method: 'client.Compute.Volumes.Availability.New',
|
|
1741
1741
|
example:
|
|
1742
1742
|
'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.RegionNameUsSva2,\n\t\tSize: 100,\n\t\tType: compute.VolumeTypeABS,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
1743
1743
|
},
|
|
1744
|
-
|
|
1744
|
+
cli: {
|
|
1745
|
+
method: 'availability create',
|
|
1745
1746
|
example:
|
|
1746
|
-
|
|
1747
|
+
"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-sva-2 \\\n --size 100 \\\n --type abs",
|
|
1747
1748
|
},
|
|
1748
|
-
|
|
1749
|
-
method: 'client.compute.volumes.availability.create',
|
|
1749
|
+
http: {
|
|
1750
1750
|
example:
|
|
1751
|
-
|
|
1751
|
+
'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-sva-2",\n "size": 100,\n "type": "abs",\n "tags": [\n "production",\n "ethereum"\n ],\n "vm_id": "123e4567-e89b-12d3-a456-426614174000"\n }\'',
|
|
1752
1752
|
},
|
|
1753
1753
|
},
|
|
1754
1754
|
},
|
|
@@ -1764,24 +1764,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1764
1764
|
markdown:
|
|
1765
1765
|
"## 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```",
|
|
1766
1766
|
perLanguage: {
|
|
1767
|
-
|
|
1768
|
-
method: 'availability
|
|
1767
|
+
typescript: {
|
|
1768
|
+
method: 'client.compute.volumes.availability.update',
|
|
1769
1769
|
example:
|
|
1770
|
-
"nirvana
|
|
1770
|
+
"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');",
|
|
1771
1771
|
},
|
|
1772
1772
|
go: {
|
|
1773
1773
|
method: 'client.Compute.Volumes.Availability.Update',
|
|
1774
1774
|
example:
|
|
1775
1775
|
'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',
|
|
1776
1776
|
},
|
|
1777
|
-
|
|
1777
|
+
cli: {
|
|
1778
|
+
method: 'availability update',
|
|
1778
1779
|
example:
|
|
1779
|
-
|
|
1780
|
+
"nirvana compute:volumes:availability update \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
|
|
1780
1781
|
},
|
|
1781
|
-
|
|
1782
|
-
method: 'client.compute.volumes.availability.update',
|
|
1782
|
+
http: {
|
|
1783
1783
|
example:
|
|
1784
|
-
|
|
1784
|
+
'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 }\'',
|
|
1785
1785
|
},
|
|
1786
1786
|
},
|
|
1787
1787
|
},
|
|
@@ -1805,24 +1805,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1805
1805
|
markdown:
|
|
1806
1806
|
"## create\n\n`client.networking.vpcs.create(name: string, project_id: string, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-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'`\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-sva-2',\n subnet_name: 'my-subnet',\n});\n\nconsole.log(operation);\n```",
|
|
1807
1807
|
perLanguage: {
|
|
1808
|
-
|
|
1809
|
-
method: 'vpcs
|
|
1808
|
+
typescript: {
|
|
1809
|
+
method: 'client.networking.vpcs.create',
|
|
1810
1810
|
example:
|
|
1811
|
-
"nirvana
|
|
1811
|
+
"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-sva-2',\n subnet_name: 'my-subnet',\n});\n\nconsole.log(operation.id);",
|
|
1812
1812
|
},
|
|
1813
1813
|
go: {
|
|
1814
1814
|
method: 'client.Networking.VPCs.New',
|
|
1815
1815
|
example:
|
|
1816
1816
|
'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.RegionNameUsSva2,\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',
|
|
1817
1817
|
},
|
|
1818
|
-
|
|
1818
|
+
cli: {
|
|
1819
|
+
method: 'vpcs create',
|
|
1819
1820
|
example:
|
|
1820
|
-
|
|
1821
|
+
"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-sva-2 \\\n --subnet-name my-subnet",
|
|
1821
1822
|
},
|
|
1822
|
-
|
|
1823
|
-
method: 'client.networking.vpcs.create',
|
|
1823
|
+
http: {
|
|
1824
1824
|
example:
|
|
1825
|
-
|
|
1825
|
+
'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-sva-2",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1826
1826
|
},
|
|
1827
1827
|
},
|
|
1828
1828
|
},
|
|
@@ -1840,24 +1840,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1840
1840
|
markdown:
|
|
1841
1841
|
"## 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'; 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'`\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```",
|
|
1842
1842
|
perLanguage: {
|
|
1843
|
-
|
|
1844
|
-
method: 'vpcs
|
|
1845
|
-
example:
|
|
1843
|
+
typescript: {
|
|
1844
|
+
method: 'client.networking.vpcs.get',
|
|
1845
|
+
example:
|
|
1846
|
+
"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);",
|
|
1846
1847
|
},
|
|
1847
1848
|
go: {
|
|
1848
1849
|
method: 'client.Networking.VPCs.Get',
|
|
1849
1850
|
example:
|
|
1850
1851
|
'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',
|
|
1851
1852
|
},
|
|
1853
|
+
cli: {
|
|
1854
|
+
method: 'vpcs get',
|
|
1855
|
+
example: "nirvana networking:vpcs get \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
|
|
1856
|
+
},
|
|
1852
1857
|
http: {
|
|
1853
1858
|
example:
|
|
1854
1859
|
'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1855
1860
|
},
|
|
1856
|
-
typescript: {
|
|
1857
|
-
method: 'client.networking.vpcs.get',
|
|
1858
|
-
example:
|
|
1859
|
-
"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);",
|
|
1860
|
-
},
|
|
1861
1861
|
},
|
|
1862
1862
|
},
|
|
1863
1863
|
{
|
|
@@ -1874,24 +1874,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1874
1874
|
markdown:
|
|
1875
1875
|
"## 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```",
|
|
1876
1876
|
perLanguage: {
|
|
1877
|
-
|
|
1878
|
-
method: 'vpcs
|
|
1879
|
-
example:
|
|
1877
|
+
typescript: {
|
|
1878
|
+
method: 'client.networking.vpcs.update',
|
|
1879
|
+
example:
|
|
1880
|
+
"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);",
|
|
1880
1881
|
},
|
|
1881
1882
|
go: {
|
|
1882
1883
|
method: 'client.Networking.VPCs.Update',
|
|
1883
1884
|
example:
|
|
1884
1885
|
'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',
|
|
1885
1886
|
},
|
|
1887
|
+
cli: {
|
|
1888
|
+
method: 'vpcs update',
|
|
1889
|
+
example: "nirvana networking:vpcs update \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
|
|
1890
|
+
},
|
|
1886
1891
|
http: {
|
|
1887
1892
|
example:
|
|
1888
1893
|
'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 }\'',
|
|
1889
1894
|
},
|
|
1890
|
-
typescript: {
|
|
1891
|
-
method: 'client.networking.vpcs.update',
|
|
1892
|
-
example:
|
|
1893
|
-
"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);",
|
|
1894
|
-
},
|
|
1895
1895
|
},
|
|
1896
1896
|
},
|
|
1897
1897
|
{
|
|
@@ -1908,24 +1908,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1908
1908
|
markdown:
|
|
1909
1909
|
"## 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```",
|
|
1910
1910
|
perLanguage: {
|
|
1911
|
-
|
|
1912
|
-
method: 'vpcs
|
|
1913
|
-
example:
|
|
1911
|
+
typescript: {
|
|
1912
|
+
method: 'client.networking.vpcs.delete',
|
|
1913
|
+
example:
|
|
1914
|
+
"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);",
|
|
1914
1915
|
},
|
|
1915
1916
|
go: {
|
|
1916
1917
|
method: 'client.Networking.VPCs.Delete',
|
|
1917
1918
|
example:
|
|
1918
1919
|
'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',
|
|
1919
1920
|
},
|
|
1921
|
+
cli: {
|
|
1922
|
+
method: 'vpcs delete',
|
|
1923
|
+
example: "nirvana networking:vpcs delete \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
|
|
1924
|
+
},
|
|
1920
1925
|
http: {
|
|
1921
1926
|
example:
|
|
1922
1927
|
'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1923
1928
|
},
|
|
1924
|
-
typescript: {
|
|
1925
|
-
method: 'client.networking.vpcs.delete',
|
|
1926
|
-
example:
|
|
1927
|
-
"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);",
|
|
1928
|
-
},
|
|
1929
1929
|
},
|
|
1930
1930
|
},
|
|
1931
1931
|
{
|
|
@@ -1942,24 +1942,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1942
1942
|
markdown:
|
|
1943
1943
|
"## 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'; 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'`\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```",
|
|
1944
1944
|
perLanguage: {
|
|
1945
|
-
|
|
1946
|
-
method: 'vpcs
|
|
1947
|
-
example:
|
|
1945
|
+
typescript: {
|
|
1946
|
+
method: 'client.networking.vpcs.list',
|
|
1947
|
+
example:
|
|
1948
|
+
"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}",
|
|
1948
1949
|
},
|
|
1949
1950
|
go: {
|
|
1950
1951
|
method: 'client.Networking.VPCs.List',
|
|
1951
1952
|
example:
|
|
1952
1953
|
'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',
|
|
1953
1954
|
},
|
|
1955
|
+
cli: {
|
|
1956
|
+
method: 'vpcs list',
|
|
1957
|
+
example: "nirvana networking:vpcs list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
1958
|
+
},
|
|
1954
1959
|
http: {
|
|
1955
1960
|
example:
|
|
1956
1961
|
'curl https://api.nirvanalabs.io/v1/networking/vpcs \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1957
1962
|
},
|
|
1958
|
-
typescript: {
|
|
1959
|
-
method: 'client.networking.vpcs.list',
|
|
1960
|
-
example:
|
|
1961
|
-
"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}",
|
|
1962
|
-
},
|
|
1963
1963
|
},
|
|
1964
1964
|
},
|
|
1965
1965
|
{
|
|
@@ -1980,24 +1980,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1980
1980
|
markdown:
|
|
1981
1981
|
"## create\n\n`client.networking.vpcs.availability.create(name: string, project_id: string, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-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'`\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-sva-2',\n subnet_name: 'my-subnet',\n})\n```",
|
|
1982
1982
|
perLanguage: {
|
|
1983
|
-
|
|
1984
|
-
method: 'availability
|
|
1983
|
+
typescript: {
|
|
1984
|
+
method: 'client.networking.vpcs.availability.create',
|
|
1985
1985
|
example:
|
|
1986
|
-
"nirvana
|
|
1986
|
+
"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-sva-2',\n subnet_name: 'my-subnet',\n});",
|
|
1987
1987
|
},
|
|
1988
1988
|
go: {
|
|
1989
1989
|
method: 'client.Networking.VPCs.Availability.New',
|
|
1990
1990
|
example:
|
|
1991
1991
|
'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.RegionNameUsSva2,\n\t\tSubnetName: "my-subnet",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
1992
1992
|
},
|
|
1993
|
-
|
|
1993
|
+
cli: {
|
|
1994
|
+
method: 'availability create',
|
|
1994
1995
|
example:
|
|
1995
|
-
|
|
1996
|
+
"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-sva-2 \\\n --subnet-name my-subnet",
|
|
1996
1997
|
},
|
|
1997
|
-
|
|
1998
|
-
method: 'client.networking.vpcs.availability.create',
|
|
1998
|
+
http: {
|
|
1999
1999
|
example:
|
|
2000
|
-
|
|
2000
|
+
'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-sva-2",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2001
2001
|
},
|
|
2002
2002
|
},
|
|
2003
2003
|
},
|
|
@@ -2013,24 +2013,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2013
2013
|
markdown:
|
|
2014
2014
|
"## 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```",
|
|
2015
2015
|
perLanguage: {
|
|
2016
|
-
|
|
2017
|
-
method: 'availability
|
|
2016
|
+
typescript: {
|
|
2017
|
+
method: 'client.networking.vpcs.availability.update',
|
|
2018
2018
|
example:
|
|
2019
|
-
"nirvana
|
|
2019
|
+
"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');",
|
|
2020
2020
|
},
|
|
2021
2021
|
go: {
|
|
2022
2022
|
method: 'client.Networking.VPCs.Availability.Update',
|
|
2023
2023
|
example:
|
|
2024
2024
|
'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',
|
|
2025
2025
|
},
|
|
2026
|
-
|
|
2026
|
+
cli: {
|
|
2027
|
+
method: 'availability update',
|
|
2027
2028
|
example:
|
|
2028
|
-
|
|
2029
|
+
"nirvana networking:vpcs:availability update \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
|
|
2029
2030
|
},
|
|
2030
|
-
|
|
2031
|
-
method: 'client.networking.vpcs.availability.update',
|
|
2031
|
+
http: {
|
|
2032
2032
|
example:
|
|
2033
|
-
|
|
2033
|
+
'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 }\'',
|
|
2034
2034
|
},
|
|
2035
2035
|
},
|
|
2036
2036
|
},
|
|
@@ -2056,24 +2056,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2056
2056
|
markdown:
|
|
2057
2057
|
"## 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```",
|
|
2058
2058
|
perLanguage: {
|
|
2059
|
-
|
|
2060
|
-
method: '
|
|
2059
|
+
typescript: {
|
|
2060
|
+
method: 'client.networking.firewallRules.create',
|
|
2061
2061
|
example:
|
|
2062
|
-
"nirvana
|
|
2062
|
+
"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);",
|
|
2063
2063
|
},
|
|
2064
2064
|
go: {
|
|
2065
2065
|
method: 'client.Networking.FirewallRules.New',
|
|
2066
2066
|
example:
|
|
2067
2067
|
'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',
|
|
2068
2068
|
},
|
|
2069
|
-
|
|
2069
|
+
cli: {
|
|
2070
|
+
method: 'firewall_rules create',
|
|
2070
2071
|
example:
|
|
2071
|
-
|
|
2072
|
+
"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",
|
|
2072
2073
|
},
|
|
2073
|
-
|
|
2074
|
-
method: 'client.networking.firewallRules.create',
|
|
2074
|
+
http: {
|
|
2075
2075
|
example:
|
|
2076
|
-
|
|
2076
|
+
'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 }\'',
|
|
2077
2077
|
},
|
|
2078
2078
|
},
|
|
2079
2079
|
},
|
|
@@ -2091,24 +2091,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2091
2091
|
markdown:
|
|
2092
2092
|
"## 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```",
|
|
2093
2093
|
perLanguage: {
|
|
2094
|
-
|
|
2095
|
-
method: '
|
|
2094
|
+
typescript: {
|
|
2095
|
+
method: 'client.networking.firewallRules.get',
|
|
2096
2096
|
example:
|
|
2097
|
-
"nirvana
|
|
2097
|
+
"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);",
|
|
2098
2098
|
},
|
|
2099
2099
|
go: {
|
|
2100
2100
|
method: 'client.Networking.FirewallRules.Get',
|
|
2101
2101
|
example:
|
|
2102
2102
|
'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',
|
|
2103
2103
|
},
|
|
2104
|
-
|
|
2104
|
+
cli: {
|
|
2105
|
+
method: 'firewall_rules get',
|
|
2105
2106
|
example:
|
|
2106
|
-
|
|
2107
|
+
"nirvana networking:firewall-rules get \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id \\\n --firewall-rule-id firewall_rule_id",
|
|
2107
2108
|
},
|
|
2108
|
-
|
|
2109
|
-
method: 'client.networking.firewallRules.get',
|
|
2109
|
+
http: {
|
|
2110
2110
|
example:
|
|
2111
|
-
|
|
2111
|
+
'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules/$FIREWALL_RULE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2112
2112
|
},
|
|
2113
2113
|
},
|
|
2114
2114
|
},
|
|
@@ -2135,24 +2135,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2135
2135
|
markdown:
|
|
2136
2136
|
"## 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```",
|
|
2137
2137
|
perLanguage: {
|
|
2138
|
-
|
|
2139
|
-
method: '
|
|
2138
|
+
typescript: {
|
|
2139
|
+
method: 'client.networking.firewallRules.update',
|
|
2140
2140
|
example:
|
|
2141
|
-
"nirvana
|
|
2141
|
+
"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);",
|
|
2142
2142
|
},
|
|
2143
2143
|
go: {
|
|
2144
2144
|
method: 'client.Networking.FirewallRules.Update',
|
|
2145
2145
|
example:
|
|
2146
2146
|
'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',
|
|
2147
2147
|
},
|
|
2148
|
-
|
|
2148
|
+
cli: {
|
|
2149
|
+
method: 'firewall_rules update',
|
|
2149
2150
|
example:
|
|
2150
|
-
|
|
2151
|
+
"nirvana networking:firewall-rules update \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id \\\n --firewall-rule-id firewall_rule_id",
|
|
2151
2152
|
},
|
|
2152
|
-
|
|
2153
|
-
method: 'client.networking.firewallRules.update',
|
|
2153
|
+
http: {
|
|
2154
2154
|
example:
|
|
2155
|
-
|
|
2155
|
+
'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 }\'',
|
|
2156
2156
|
},
|
|
2157
2157
|
},
|
|
2158
2158
|
},
|
|
@@ -2170,24 +2170,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2170
2170
|
markdown:
|
|
2171
2171
|
"## 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```",
|
|
2172
2172
|
perLanguage: {
|
|
2173
|
-
|
|
2174
|
-
method: '
|
|
2173
|
+
typescript: {
|
|
2174
|
+
method: 'client.networking.firewallRules.delete',
|
|
2175
2175
|
example:
|
|
2176
|
-
"nirvana
|
|
2176
|
+
"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);",
|
|
2177
2177
|
},
|
|
2178
2178
|
go: {
|
|
2179
2179
|
method: 'client.Networking.FirewallRules.Delete',
|
|
2180
2180
|
example:
|
|
2181
2181
|
'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',
|
|
2182
2182
|
},
|
|
2183
|
-
|
|
2183
|
+
cli: {
|
|
2184
|
+
method: 'firewall_rules delete',
|
|
2184
2185
|
example:
|
|
2185
|
-
|
|
2186
|
+
"nirvana networking:firewall-rules delete \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id \\\n --firewall-rule-id firewall_rule_id",
|
|
2186
2187
|
},
|
|
2187
|
-
|
|
2188
|
-
method: 'client.networking.firewallRules.delete',
|
|
2188
|
+
http: {
|
|
2189
2189
|
example:
|
|
2190
|
-
|
|
2190
|
+
'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"',
|
|
2191
2191
|
},
|
|
2192
2192
|
},
|
|
2193
2193
|
},
|
|
@@ -2205,24 +2205,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2205
2205
|
markdown:
|
|
2206
2206
|
"## 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```",
|
|
2207
2207
|
perLanguage: {
|
|
2208
|
-
|
|
2209
|
-
method: '
|
|
2210
|
-
example:
|
|
2208
|
+
typescript: {
|
|
2209
|
+
method: 'client.networking.firewallRules.list',
|
|
2210
|
+
example:
|
|
2211
|
+
"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}",
|
|
2211
2212
|
},
|
|
2212
2213
|
go: {
|
|
2213
2214
|
method: 'client.Networking.FirewallRules.List',
|
|
2214
2215
|
example:
|
|
2215
2216
|
'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',
|
|
2216
2217
|
},
|
|
2218
|
+
cli: {
|
|
2219
|
+
method: 'firewall_rules list',
|
|
2220
|
+
example: "nirvana networking:firewall-rules list \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
|
|
2221
|
+
},
|
|
2217
2222
|
http: {
|
|
2218
2223
|
example:
|
|
2219
2224
|
'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2220
2225
|
},
|
|
2221
|
-
typescript: {
|
|
2222
|
-
method: 'client.networking.firewallRules.list',
|
|
2223
|
-
example:
|
|
2224
|
-
"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}",
|
|
2225
|
-
},
|
|
2226
2226
|
},
|
|
2227
2227
|
},
|
|
2228
2228
|
{
|
|
@@ -2248,24 +2248,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2248
2248
|
markdown:
|
|
2249
2249
|
"## 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', 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'`\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-sva-2',\n});\n\nconsole.log(operation);\n```",
|
|
2250
2250
|
perLanguage: {
|
|
2251
|
-
|
|
2252
|
-
method: 'connections
|
|
2251
|
+
typescript: {
|
|
2252
|
+
method: 'client.networking.connect.connections.create',
|
|
2253
2253
|
example:
|
|
2254
|
-
"nirvana
|
|
2254
|
+
"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-sva-2',\n});\n\nconsole.log(operation.id);",
|
|
2255
2255
|
},
|
|
2256
2256
|
go: {
|
|
2257
2257
|
method: 'client.Networking.Connect.Connections.New',
|
|
2258
2258
|
example:
|
|
2259
2259
|
'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.RegionNameUsSva2,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
2260
2260
|
},
|
|
2261
|
-
|
|
2261
|
+
cli: {
|
|
2262
|
+
method: 'connections create',
|
|
2262
2263
|
example:
|
|
2263
|
-
|
|
2264
|
+
"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-sva-2",
|
|
2264
2265
|
},
|
|
2265
|
-
|
|
2266
|
-
method: 'client.networking.connect.connections.create',
|
|
2266
|
+
http: {
|
|
2267
2267
|
example:
|
|
2268
|
-
|
|
2268
|
+
'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-sva-2",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2269
2269
|
},
|
|
2270
2270
|
},
|
|
2271
2271
|
},
|
|
@@ -2283,24 +2283,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2283
2283
|
markdown:
|
|
2284
2284
|
"## 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'; 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'`\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```",
|
|
2285
2285
|
perLanguage: {
|
|
2286
|
-
|
|
2287
|
-
method: 'connections
|
|
2286
|
+
typescript: {
|
|
2287
|
+
method: 'client.networking.connect.connections.get',
|
|
2288
2288
|
example:
|
|
2289
|
-
"nirvana
|
|
2289
|
+
"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);",
|
|
2290
2290
|
},
|
|
2291
2291
|
go: {
|
|
2292
2292
|
method: 'client.Networking.Connect.Connections.Get',
|
|
2293
2293
|
example:
|
|
2294
2294
|
'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',
|
|
2295
2295
|
},
|
|
2296
|
-
|
|
2296
|
+
cli: {
|
|
2297
|
+
method: 'connections get',
|
|
2297
2298
|
example:
|
|
2298
|
-
|
|
2299
|
+
"nirvana networking:connect:connections get \\\n --api-key 'My API Key' \\\n --connection-id connection_id",
|
|
2299
2300
|
},
|
|
2300
|
-
|
|
2301
|
-
method: 'client.networking.connect.connections.get',
|
|
2301
|
+
http: {
|
|
2302
2302
|
example:
|
|
2303
|
-
|
|
2303
|
+
'curl https://api.nirvanalabs.io/v1/networking/connect/connections/$CONNECTION_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2304
2304
|
},
|
|
2305
2305
|
},
|
|
2306
2306
|
},
|
|
@@ -2318,24 +2318,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2318
2318
|
markdown:
|
|
2319
2319
|
"## 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```",
|
|
2320
2320
|
perLanguage: {
|
|
2321
|
-
|
|
2322
|
-
method: 'connections
|
|
2321
|
+
typescript: {
|
|
2322
|
+
method: 'client.networking.connect.connections.update',
|
|
2323
2323
|
example:
|
|
2324
|
-
"nirvana
|
|
2324
|
+
"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);",
|
|
2325
2325
|
},
|
|
2326
2326
|
go: {
|
|
2327
2327
|
method: 'client.Networking.Connect.Connections.Update',
|
|
2328
2328
|
example:
|
|
2329
2329
|
'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',
|
|
2330
2330
|
},
|
|
2331
|
-
|
|
2331
|
+
cli: {
|
|
2332
|
+
method: 'connections update',
|
|
2332
2333
|
example:
|
|
2333
|
-
|
|
2334
|
+
"nirvana networking:connect:connections update \\\n --api-key 'My API Key' \\\n --connection-id connection_id",
|
|
2334
2335
|
},
|
|
2335
|
-
|
|
2336
|
-
method: 'client.networking.connect.connections.update',
|
|
2336
|
+
http: {
|
|
2337
2337
|
example:
|
|
2338
|
-
|
|
2338
|
+
'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 }\'',
|
|
2339
2339
|
},
|
|
2340
2340
|
},
|
|
2341
2341
|
},
|
|
@@ -2353,24 +2353,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2353
2353
|
markdown:
|
|
2354
2354
|
"## 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```",
|
|
2355
2355
|
perLanguage: {
|
|
2356
|
-
|
|
2357
|
-
method: 'connections
|
|
2356
|
+
typescript: {
|
|
2357
|
+
method: 'client.networking.connect.connections.delete',
|
|
2358
2358
|
example:
|
|
2359
|
-
"nirvana
|
|
2359
|
+
"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);",
|
|
2360
2360
|
},
|
|
2361
2361
|
go: {
|
|
2362
2362
|
method: 'client.Networking.Connect.Connections.Delete',
|
|
2363
2363
|
example:
|
|
2364
2364
|
'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',
|
|
2365
2365
|
},
|
|
2366
|
-
|
|
2366
|
+
cli: {
|
|
2367
|
+
method: 'connections delete',
|
|
2367
2368
|
example:
|
|
2368
|
-
|
|
2369
|
+
"nirvana networking:connect:connections delete \\\n --api-key 'My API Key' \\\n --connection-id connection_id",
|
|
2369
2370
|
},
|
|
2370
|
-
|
|
2371
|
-
method: 'client.networking.connect.connections.delete',
|
|
2371
|
+
http: {
|
|
2372
2372
|
example:
|
|
2373
|
-
|
|
2373
|
+
'curl https://api.nirvanalabs.io/v1/networking/connect/connections/$CONNECTION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2374
2374
|
},
|
|
2375
2375
|
},
|
|
2376
2376
|
},
|
|
@@ -2388,24 +2388,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2388
2388
|
markdown:
|
|
2389
2389
|
"## 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'; 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'`\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```",
|
|
2390
2390
|
perLanguage: {
|
|
2391
|
-
|
|
2392
|
-
method: 'connections
|
|
2391
|
+
typescript: {
|
|
2392
|
+
method: 'client.networking.connect.connections.list',
|
|
2393
2393
|
example:
|
|
2394
|
-
"nirvana
|
|
2394
|
+
"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}",
|
|
2395
2395
|
},
|
|
2396
2396
|
go: {
|
|
2397
2397
|
method: 'client.Networking.Connect.Connections.List',
|
|
2398
2398
|
example:
|
|
2399
2399
|
'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',
|
|
2400
2400
|
},
|
|
2401
|
-
|
|
2401
|
+
cli: {
|
|
2402
|
+
method: 'connections list',
|
|
2402
2403
|
example:
|
|
2403
|
-
|
|
2404
|
+
"nirvana networking:connect:connections list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
2404
2405
|
},
|
|
2405
|
-
|
|
2406
|
-
method: 'client.networking.connect.connections.list',
|
|
2406
|
+
http: {
|
|
2407
2407
|
example:
|
|
2408
|
-
|
|
2408
|
+
'curl https://api.nirvanalabs.io/v1/networking/connect/connections \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2409
2409
|
},
|
|
2410
2410
|
},
|
|
2411
2411
|
},
|
|
@@ -2423,24 +2423,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2423
2423
|
markdown:
|
|
2424
2424
|
"## 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'; provider: string; provider_region: string; }`\n Routes supported for Connect.\n\n - `nirvana_region: 'us-sva-1' | 'us-sva-2' | 'us-chi-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```",
|
|
2425
2425
|
perLanguage: {
|
|
2426
|
-
|
|
2427
|
-
method: 'routes
|
|
2428
|
-
example:
|
|
2426
|
+
typescript: {
|
|
2427
|
+
method: 'client.networking.connect.routes.list',
|
|
2428
|
+
example:
|
|
2429
|
+
"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}",
|
|
2429
2430
|
},
|
|
2430
2431
|
go: {
|
|
2431
2432
|
method: 'client.Networking.Connect.Routes.List',
|
|
2432
2433
|
example:
|
|
2433
2434
|
'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',
|
|
2434
2435
|
},
|
|
2436
|
+
cli: {
|
|
2437
|
+
method: 'routes list',
|
|
2438
|
+
example: "nirvana networking:connect:routes list \\\n --api-key 'My API Key'",
|
|
2439
|
+
},
|
|
2435
2440
|
http: {
|
|
2436
2441
|
example:
|
|
2437
2442
|
'curl https://api.nirvanalabs.io/v1/networking/connect/routes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2438
2443
|
},
|
|
2439
|
-
typescript: {
|
|
2440
|
-
method: 'client.networking.connect.routes.list',
|
|
2441
|
-
example:
|
|
2442
|
-
"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}",
|
|
2443
|
-
},
|
|
2444
2444
|
},
|
|
2445
2445
|
},
|
|
2446
2446
|
{
|
|
@@ -2463,24 +2463,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2463
2463
|
markdown:
|
|
2464
2464
|
"## 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```",
|
|
2465
2465
|
perLanguage: {
|
|
2466
|
-
|
|
2467
|
-
method: 'flex
|
|
2466
|
+
typescript: {
|
|
2467
|
+
method: 'client.rpcNodes.flex.create',
|
|
2468
2468
|
example:
|
|
2469
|
-
"nirvana
|
|
2469
|
+
"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);",
|
|
2470
2470
|
},
|
|
2471
2471
|
go: {
|
|
2472
2472
|
method: 'client.RPCNodes.Flex.New',
|
|
2473
2473
|
example:
|
|
2474
2474
|
'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',
|
|
2475
2475
|
},
|
|
2476
|
-
|
|
2476
|
+
cli: {
|
|
2477
|
+
method: 'flex create',
|
|
2477
2478
|
example:
|
|
2478
|
-
|
|
2479
|
+
"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",
|
|
2479
2480
|
},
|
|
2480
|
-
|
|
2481
|
-
method: 'client.rpcNodes.flex.create',
|
|
2481
|
+
http: {
|
|
2482
2482
|
example:
|
|
2483
|
-
|
|
2483
|
+
'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 }\'',
|
|
2484
2484
|
},
|
|
2485
2485
|
},
|
|
2486
2486
|
},
|
|
@@ -2498,24 +2498,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2498
2498
|
markdown:
|
|
2499
2499
|
"## 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```",
|
|
2500
2500
|
perLanguage: {
|
|
2501
|
-
|
|
2502
|
-
method: 'flex
|
|
2503
|
-
example:
|
|
2501
|
+
typescript: {
|
|
2502
|
+
method: 'client.rpcNodes.flex.get',
|
|
2503
|
+
example:
|
|
2504
|
+
"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);",
|
|
2504
2505
|
},
|
|
2505
2506
|
go: {
|
|
2506
2507
|
method: 'client.RPCNodes.Flex.Get',
|
|
2507
2508
|
example:
|
|
2508
2509
|
'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',
|
|
2509
2510
|
},
|
|
2511
|
+
cli: {
|
|
2512
|
+
method: 'flex get',
|
|
2513
|
+
example: "nirvana rpc-nodes:flex get \\\n --api-key 'My API Key' \\\n --node-id node_id",
|
|
2514
|
+
},
|
|
2510
2515
|
http: {
|
|
2511
2516
|
example:
|
|
2512
2517
|
'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/$NODE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2513
2518
|
},
|
|
2514
|
-
typescript: {
|
|
2515
|
-
method: 'client.rpcNodes.flex.get',
|
|
2516
|
-
example:
|
|
2517
|
-
"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);",
|
|
2518
|
-
},
|
|
2519
2519
|
},
|
|
2520
2520
|
},
|
|
2521
2521
|
{
|
|
@@ -2532,24 +2532,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2532
2532
|
markdown:
|
|
2533
2533
|
"## 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```",
|
|
2534
2534
|
perLanguage: {
|
|
2535
|
-
|
|
2536
|
-
method: 'flex
|
|
2537
|
-
example:
|
|
2535
|
+
typescript: {
|
|
2536
|
+
method: 'client.rpcNodes.flex.update',
|
|
2537
|
+
example:
|
|
2538
|
+
"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);",
|
|
2538
2539
|
},
|
|
2539
2540
|
go: {
|
|
2540
2541
|
method: 'client.RPCNodes.Flex.Update',
|
|
2541
2542
|
example:
|
|
2542
2543
|
'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',
|
|
2543
2544
|
},
|
|
2545
|
+
cli: {
|
|
2546
|
+
method: 'flex update',
|
|
2547
|
+
example: "nirvana rpc-nodes:flex update \\\n --api-key 'My API Key' \\\n --node-id node_id",
|
|
2548
|
+
},
|
|
2544
2549
|
http: {
|
|
2545
2550
|
example:
|
|
2546
2551
|
'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 }\'',
|
|
2547
2552
|
},
|
|
2548
|
-
typescript: {
|
|
2549
|
-
method: 'client.rpcNodes.flex.update',
|
|
2550
|
-
example:
|
|
2551
|
-
"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);",
|
|
2552
|
-
},
|
|
2553
2553
|
},
|
|
2554
2554
|
},
|
|
2555
2555
|
{
|
|
@@ -2564,24 +2564,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2564
2564
|
markdown:
|
|
2565
2565
|
"## 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```",
|
|
2566
2566
|
perLanguage: {
|
|
2567
|
-
|
|
2568
|
-
method: 'flex
|
|
2569
|
-
example:
|
|
2567
|
+
typescript: {
|
|
2568
|
+
method: 'client.rpcNodes.flex.delete',
|
|
2569
|
+
example:
|
|
2570
|
+
"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');",
|
|
2570
2571
|
},
|
|
2571
2572
|
go: {
|
|
2572
2573
|
method: 'client.RPCNodes.Flex.Delete',
|
|
2573
2574
|
example:
|
|
2574
2575
|
'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',
|
|
2575
2576
|
},
|
|
2577
|
+
cli: {
|
|
2578
|
+
method: 'flex delete',
|
|
2579
|
+
example: "nirvana rpc-nodes:flex delete \\\n --api-key 'My API Key' \\\n --node-id node_id",
|
|
2580
|
+
},
|
|
2576
2581
|
http: {
|
|
2577
2582
|
example:
|
|
2578
2583
|
'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/$NODE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2579
2584
|
},
|
|
2580
|
-
typescript: {
|
|
2581
|
-
method: 'client.rpcNodes.flex.delete',
|
|
2582
|
-
example:
|
|
2583
|
-
"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');",
|
|
2584
|
-
},
|
|
2585
2585
|
},
|
|
2586
2586
|
},
|
|
2587
2587
|
{
|
|
@@ -2598,24 +2598,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2598
2598
|
markdown:
|
|
2599
2599
|
"## 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```",
|
|
2600
2600
|
perLanguage: {
|
|
2601
|
-
|
|
2602
|
-
method: 'flex
|
|
2603
|
-
example:
|
|
2601
|
+
typescript: {
|
|
2602
|
+
method: 'client.rpcNodes.flex.list',
|
|
2603
|
+
example:
|
|
2604
|
+
"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}",
|
|
2604
2605
|
},
|
|
2605
2606
|
go: {
|
|
2606
2607
|
method: 'client.RPCNodes.Flex.List',
|
|
2607
2608
|
example:
|
|
2608
2609
|
'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',
|
|
2609
2610
|
},
|
|
2611
|
+
cli: {
|
|
2612
|
+
method: 'flex list',
|
|
2613
|
+
example: "nirvana rpc-nodes:flex list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
2614
|
+
},
|
|
2610
2615
|
http: {
|
|
2611
2616
|
example:
|
|
2612
2617
|
'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2613
2618
|
},
|
|
2614
|
-
typescript: {
|
|
2615
|
-
method: 'client.rpcNodes.flex.list',
|
|
2616
|
-
example:
|
|
2617
|
-
"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}",
|
|
2618
|
-
},
|
|
2619
2619
|
},
|
|
2620
2620
|
},
|
|
2621
2621
|
{
|
|
@@ -2631,24 +2631,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2631
2631
|
markdown:
|
|
2632
2632
|
"## 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```",
|
|
2633
2633
|
perLanguage: {
|
|
2634
|
-
|
|
2635
|
-
method: 'blockchains
|
|
2636
|
-
example:
|
|
2634
|
+
typescript: {
|
|
2635
|
+
method: 'client.rpcNodes.flex.blockchains.list',
|
|
2636
|
+
example:
|
|
2637
|
+
"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}",
|
|
2637
2638
|
},
|
|
2638
2639
|
go: {
|
|
2639
2640
|
method: 'client.RPCNodes.Flex.Blockchains.List',
|
|
2640
2641
|
example:
|
|
2641
2642
|
'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',
|
|
2642
2643
|
},
|
|
2644
|
+
cli: {
|
|
2645
|
+
method: 'blockchains list',
|
|
2646
|
+
example: "nirvana rpc-nodes:flex:blockchains list \\\n --api-key 'My API Key'",
|
|
2647
|
+
},
|
|
2643
2648
|
http: {
|
|
2644
2649
|
example:
|
|
2645
2650
|
'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/blockchains \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2646
2651
|
},
|
|
2647
|
-
typescript: {
|
|
2648
|
-
method: 'client.rpcNodes.flex.blockchains.list',
|
|
2649
|
-
example:
|
|
2650
|
-
"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}",
|
|
2651
|
-
},
|
|
2652
2652
|
},
|
|
2653
2653
|
},
|
|
2654
2654
|
{
|
|
@@ -2665,24 +2665,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2665
2665
|
markdown:
|
|
2666
2666
|
"## 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```",
|
|
2667
2667
|
perLanguage: {
|
|
2668
|
-
|
|
2669
|
-
method: 'dedicated
|
|
2670
|
-
example:
|
|
2668
|
+
typescript: {
|
|
2669
|
+
method: 'client.rpcNodes.dedicated.get',
|
|
2670
|
+
example:
|
|
2671
|
+
"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);",
|
|
2671
2672
|
},
|
|
2672
2673
|
go: {
|
|
2673
2674
|
method: 'client.RPCNodes.Dedicated.Get',
|
|
2674
2675
|
example:
|
|
2675
2676
|
'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',
|
|
2676
2677
|
},
|
|
2678
|
+
cli: {
|
|
2679
|
+
method: 'dedicated get',
|
|
2680
|
+
example: "nirvana rpc-nodes:dedicated get \\\n --api-key 'My API Key' \\\n --node-id node_id",
|
|
2681
|
+
},
|
|
2677
2682
|
http: {
|
|
2678
2683
|
example:
|
|
2679
2684
|
'curl https://api.nirvanalabs.io/v1/rpc_nodes/dedicated/$NODE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2680
2685
|
},
|
|
2681
|
-
typescript: {
|
|
2682
|
-
method: 'client.rpcNodes.dedicated.get',
|
|
2683
|
-
example:
|
|
2684
|
-
"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);",
|
|
2685
|
-
},
|
|
2686
2686
|
},
|
|
2687
2687
|
},
|
|
2688
2688
|
{
|
|
@@ -2699,24 +2699,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2699
2699
|
markdown:
|
|
2700
2700
|
"## 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```",
|
|
2701
2701
|
perLanguage: {
|
|
2702
|
-
|
|
2703
|
-
method: 'dedicated
|
|
2702
|
+
typescript: {
|
|
2703
|
+
method: 'client.rpcNodes.dedicated.list',
|
|
2704
2704
|
example:
|
|
2705
|
-
"nirvana
|
|
2705
|
+
"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}",
|
|
2706
2706
|
},
|
|
2707
2707
|
go: {
|
|
2708
2708
|
method: 'client.RPCNodes.Dedicated.List',
|
|
2709
2709
|
example:
|
|
2710
2710
|
'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',
|
|
2711
2711
|
},
|
|
2712
|
-
|
|
2712
|
+
cli: {
|
|
2713
|
+
method: 'dedicated list',
|
|
2713
2714
|
example:
|
|
2714
|
-
|
|
2715
|
+
"nirvana rpc-nodes:dedicated list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
2715
2716
|
},
|
|
2716
|
-
|
|
2717
|
-
method: 'client.rpcNodes.dedicated.list',
|
|
2717
|
+
http: {
|
|
2718
2718
|
example:
|
|
2719
|
-
|
|
2719
|
+
'curl https://api.nirvanalabs.io/v1/rpc_nodes/dedicated \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2720
2720
|
},
|
|
2721
2721
|
},
|
|
2722
2722
|
},
|
|
@@ -2733,24 +2733,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2733
2733
|
markdown:
|
|
2734
2734
|
"## 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```",
|
|
2735
2735
|
perLanguage: {
|
|
2736
|
-
|
|
2737
|
-
method: 'blockchains
|
|
2738
|
-
example:
|
|
2736
|
+
typescript: {
|
|
2737
|
+
method: 'client.rpcNodes.dedicated.blockchains.list',
|
|
2738
|
+
example:
|
|
2739
|
+
"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}",
|
|
2739
2740
|
},
|
|
2740
2741
|
go: {
|
|
2741
2742
|
method: 'client.RPCNodes.Dedicated.Blockchains.List',
|
|
2742
2743
|
example:
|
|
2743
2744
|
'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',
|
|
2744
2745
|
},
|
|
2746
|
+
cli: {
|
|
2747
|
+
method: 'blockchains list',
|
|
2748
|
+
example: "nirvana rpc-nodes:dedicated:blockchains list \\\n --api-key 'My API Key'",
|
|
2749
|
+
},
|
|
2745
2750
|
http: {
|
|
2746
2751
|
example:
|
|
2747
2752
|
'curl https://api.nirvanalabs.io/v1/rpc_nodes/dedicated/blockchains \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2748
2753
|
},
|
|
2749
|
-
typescript: {
|
|
2750
|
-
method: 'client.rpcNodes.dedicated.blockchains.list',
|
|
2751
|
-
example:
|
|
2752
|
-
"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}",
|
|
2753
|
-
},
|
|
2754
2754
|
},
|
|
2755
2755
|
},
|
|
2756
2756
|
{
|
|
@@ -2773,24 +2773,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2773
2773
|
markdown:
|
|
2774
2774
|
"## create\n\n`client.nks.clusters.create(name: string, project_id: string, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-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'`\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-sva-2',\n vpc_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation);\n```",
|
|
2775
2775
|
perLanguage: {
|
|
2776
|
-
|
|
2777
|
-
method: 'clusters
|
|
2776
|
+
typescript: {
|
|
2777
|
+
method: 'client.nks.clusters.create',
|
|
2778
2778
|
example:
|
|
2779
|
-
"nirvana
|
|
2779
|
+
"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-sva-2',\n vpc_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);",
|
|
2780
2780
|
},
|
|
2781
2781
|
go: {
|
|
2782
2782
|
method: 'client.NKS.Clusters.New',
|
|
2783
2783
|
example:
|
|
2784
2784
|
'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.RegionNameUsSva2,\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',
|
|
2785
2785
|
},
|
|
2786
|
-
|
|
2786
|
+
cli: {
|
|
2787
|
+
method: 'clusters create',
|
|
2787
2788
|
example:
|
|
2788
|
-
|
|
2789
|
+
"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-sva-2 \\\n --vpc-id 123e4567-e89b-12d3-a456-426614174000",
|
|
2789
2790
|
},
|
|
2790
|
-
|
|
2791
|
-
method: 'client.nks.clusters.create',
|
|
2791
|
+
http: {
|
|
2792
2792
|
example:
|
|
2793
|
-
|
|
2793
|
+
'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-sva-2",\n "vpc_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2794
2794
|
},
|
|
2795
2795
|
},
|
|
2796
2796
|
},
|
|
@@ -2808,24 +2808,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2808
2808
|
markdown:
|
|
2809
2809
|
"## 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'; 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'`\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```",
|
|
2810
2810
|
perLanguage: {
|
|
2811
|
-
|
|
2812
|
-
method: 'clusters
|
|
2813
|
-
example:
|
|
2811
|
+
typescript: {
|
|
2812
|
+
method: 'client.nks.clusters.get',
|
|
2813
|
+
example:
|
|
2814
|
+
"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);",
|
|
2814
2815
|
},
|
|
2815
2816
|
go: {
|
|
2816
2817
|
method: 'client.NKS.Clusters.Get',
|
|
2817
2818
|
example:
|
|
2818
2819
|
'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',
|
|
2819
2820
|
},
|
|
2821
|
+
cli: {
|
|
2822
|
+
method: 'clusters get',
|
|
2823
|
+
example: "nirvana nks:clusters get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2824
|
+
},
|
|
2820
2825
|
http: {
|
|
2821
2826
|
example:
|
|
2822
2827
|
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2823
2828
|
},
|
|
2824
|
-
typescript: {
|
|
2825
|
-
method: 'client.nks.clusters.get',
|
|
2826
|
-
example:
|
|
2827
|
-
"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);",
|
|
2828
|
-
},
|
|
2829
2829
|
},
|
|
2830
2830
|
},
|
|
2831
2831
|
{
|
|
@@ -2842,24 +2842,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2842
2842
|
markdown:
|
|
2843
2843
|
"## 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'; 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'`\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```",
|
|
2844
2844
|
perLanguage: {
|
|
2845
|
-
|
|
2846
|
-
method: 'clusters
|
|
2847
|
-
example:
|
|
2845
|
+
typescript: {
|
|
2846
|
+
method: 'client.nks.clusters.update',
|
|
2847
|
+
example:
|
|
2848
|
+
"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);",
|
|
2848
2849
|
},
|
|
2849
2850
|
go: {
|
|
2850
2851
|
method: 'client.NKS.Clusters.Update',
|
|
2851
2852
|
example:
|
|
2852
2853
|
'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',
|
|
2853
2854
|
},
|
|
2855
|
+
cli: {
|
|
2856
|
+
method: 'clusters update',
|
|
2857
|
+
example: "nirvana nks:clusters update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2858
|
+
},
|
|
2854
2859
|
http: {
|
|
2855
2860
|
example:
|
|
2856
2861
|
'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 }\'',
|
|
2857
2862
|
},
|
|
2858
|
-
typescript: {
|
|
2859
|
-
method: 'client.nks.clusters.update',
|
|
2860
|
-
example:
|
|
2861
|
-
"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);",
|
|
2862
|
-
},
|
|
2863
2863
|
},
|
|
2864
2864
|
},
|
|
2865
2865
|
{
|
|
@@ -2876,24 +2876,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2876
2876
|
markdown:
|
|
2877
2877
|
"## 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```",
|
|
2878
2878
|
perLanguage: {
|
|
2879
|
-
|
|
2880
|
-
method: 'clusters
|
|
2881
|
-
example:
|
|
2879
|
+
typescript: {
|
|
2880
|
+
method: 'client.nks.clusters.delete',
|
|
2881
|
+
example:
|
|
2882
|
+
"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);",
|
|
2882
2883
|
},
|
|
2883
2884
|
go: {
|
|
2884
2885
|
method: 'client.NKS.Clusters.Delete',
|
|
2885
2886
|
example:
|
|
2886
2887
|
'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',
|
|
2887
2888
|
},
|
|
2889
|
+
cli: {
|
|
2890
|
+
method: 'clusters delete',
|
|
2891
|
+
example: "nirvana nks:clusters delete \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2892
|
+
},
|
|
2888
2893
|
http: {
|
|
2889
2894
|
example:
|
|
2890
2895
|
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2891
2896
|
},
|
|
2892
|
-
typescript: {
|
|
2893
|
-
method: 'client.nks.clusters.delete',
|
|
2894
|
-
example:
|
|
2895
|
-
"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);",
|
|
2896
|
-
},
|
|
2897
2897
|
},
|
|
2898
2898
|
},
|
|
2899
2899
|
{
|
|
@@ -2910,24 +2910,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2910
2910
|
markdown:
|
|
2911
2911
|
"## 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'; 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'`\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```",
|
|
2912
2912
|
perLanguage: {
|
|
2913
|
-
|
|
2914
|
-
method: 'clusters
|
|
2915
|
-
example:
|
|
2913
|
+
typescript: {
|
|
2914
|
+
method: 'client.nks.clusters.list',
|
|
2915
|
+
example:
|
|
2916
|
+
"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}",
|
|
2916
2917
|
},
|
|
2917
2918
|
go: {
|
|
2918
2919
|
method: 'client.NKS.Clusters.List',
|
|
2919
2920
|
example:
|
|
2920
2921
|
'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',
|
|
2921
2922
|
},
|
|
2923
|
+
cli: {
|
|
2924
|
+
method: 'clusters list',
|
|
2925
|
+
example: "nirvana nks:clusters list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
2926
|
+
},
|
|
2922
2927
|
http: {
|
|
2923
2928
|
example:
|
|
2924
2929
|
'curl https://api.nirvanalabs.io/v1/nks/clusters \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2925
2930
|
},
|
|
2926
|
-
typescript: {
|
|
2927
|
-
method: 'client.nks.clusters.list',
|
|
2928
|
-
example:
|
|
2929
|
-
"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}",
|
|
2930
|
-
},
|
|
2931
2931
|
},
|
|
2932
2932
|
},
|
|
2933
2933
|
{
|
|
@@ -2948,24 +2948,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2948
2948
|
markdown:
|
|
2949
2949
|
"## create\n\n`client.nks.clusters.availability.create(name: string, project_id: string, region: 'us-sva-1' | 'us-sva-2' | 'us-chi-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'`\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-sva-2',\n vpc_id: '123e4567-e89b-12d3-a456-426614174000',\n})\n```",
|
|
2950
2950
|
perLanguage: {
|
|
2951
|
-
|
|
2952
|
-
method: 'availability
|
|
2951
|
+
typescript: {
|
|
2952
|
+
method: 'client.nks.clusters.availability.create',
|
|
2953
2953
|
example:
|
|
2954
|
-
"nirvana
|
|
2954
|
+
"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-sva-2',\n vpc_id: '123e4567-e89b-12d3-a456-426614174000',\n});",
|
|
2955
2955
|
},
|
|
2956
2956
|
go: {
|
|
2957
2957
|
method: 'client.NKS.Clusters.Availability.New',
|
|
2958
2958
|
example:
|
|
2959
2959
|
'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.RegionNameUsSva2,\n\t\tVPCID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
2960
2960
|
},
|
|
2961
|
-
|
|
2961
|
+
cli: {
|
|
2962
|
+
method: 'availability create',
|
|
2962
2963
|
example:
|
|
2963
|
-
|
|
2964
|
+
"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-sva-2 \\\n --vpc-id 123e4567-e89b-12d3-a456-426614174000",
|
|
2964
2965
|
},
|
|
2965
|
-
|
|
2966
|
-
method: 'client.nks.clusters.availability.create',
|
|
2966
|
+
http: {
|
|
2967
2967
|
example:
|
|
2968
|
-
|
|
2968
|
+
'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-sva-2",\n "vpc_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2969
2969
|
},
|
|
2970
2970
|
},
|
|
2971
2971
|
},
|
|
@@ -2981,24 +2981,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2981
2981
|
markdown:
|
|
2982
2982
|
"## 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```",
|
|
2983
2983
|
perLanguage: {
|
|
2984
|
-
|
|
2985
|
-
method: 'availability
|
|
2984
|
+
typescript: {
|
|
2985
|
+
method: 'client.nks.clusters.availability.update',
|
|
2986
2986
|
example:
|
|
2987
|
-
"nirvana
|
|
2987
|
+
"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');",
|
|
2988
2988
|
},
|
|
2989
2989
|
go: {
|
|
2990
2990
|
method: 'client.NKS.Clusters.Availability.Update',
|
|
2991
2991
|
example:
|
|
2992
2992
|
'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',
|
|
2993
2993
|
},
|
|
2994
|
-
|
|
2994
|
+
cli: {
|
|
2995
|
+
method: 'availability update',
|
|
2995
2996
|
example:
|
|
2996
|
-
|
|
2997
|
+
"nirvana nks:clusters:availability update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2997
2998
|
},
|
|
2998
|
-
|
|
2999
|
-
method: 'client.nks.clusters.availability.update',
|
|
2999
|
+
http: {
|
|
3000
3000
|
example:
|
|
3001
|
-
|
|
3001
|
+
'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 }\'',
|
|
3002
3002
|
},
|
|
3003
3003
|
},
|
|
3004
3004
|
},
|
|
@@ -3016,24 +3016,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3016
3016
|
markdown:
|
|
3017
3017
|
"## get\n\n`client.nks.clusters.persistentVolumeClaims.get(cluster_id: string, persistent_volume_claim_id: string): { id: string; cluster_id: string; created_at: string; name: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/persistent_volume_claims/{persistent_volume_claim_id}`\n\nGet details about an NKS persistent volume claim\n\n### Parameters\n\n- `cluster_id: string`\n\n- `persistent_volume_claim_id: string`\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS persistent volume claim details.\n\n - `id: string`\n - `cluster_id: string`\n - `created_at: string`\n - `name: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst persistentVolumeClaim = await client.nks.clusters.persistentVolumeClaims.get('persistent_volume_claim_id', { cluster_id: 'cluster_id' });\n\nconsole.log(persistentVolumeClaim);\n```",
|
|
3018
3018
|
perLanguage: {
|
|
3019
|
-
|
|
3020
|
-
method: '
|
|
3019
|
+
typescript: {
|
|
3020
|
+
method: 'client.nks.clusters.persistentVolumeClaims.get',
|
|
3021
3021
|
example:
|
|
3022
|
-
"nirvana
|
|
3022
|
+
"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 persistentVolumeClaim = await client.nks.clusters.persistentVolumeClaims.get(\n 'persistent_volume_claim_id',\n { cluster_id: 'cluster_id' },\n);\n\nconsole.log(persistentVolumeClaim.id);",
|
|
3023
3023
|
},
|
|
3024
3024
|
go: {
|
|
3025
3025
|
method: 'client.NKS.Clusters.PersistentVolumeClaims.Get',
|
|
3026
3026
|
example:
|
|
3027
3027
|
'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\tpersistentVolumeClaim, err := client.NKS.Clusters.PersistentVolumeClaims.Get(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"persistent_volume_claim_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", persistentVolumeClaim.ID)\n}\n',
|
|
3028
3028
|
},
|
|
3029
|
-
|
|
3029
|
+
cli: {
|
|
3030
|
+
method: 'persistent_volume_claims get',
|
|
3030
3031
|
example:
|
|
3031
|
-
|
|
3032
|
+
"nirvana nks:clusters:persistent-volume-claims get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --persistent-volume-claim-id persistent_volume_claim_id",
|
|
3032
3033
|
},
|
|
3033
|
-
|
|
3034
|
-
method: 'client.nks.clusters.persistentVolumeClaims.get',
|
|
3034
|
+
http: {
|
|
3035
3035
|
example:
|
|
3036
|
-
|
|
3036
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/persistent_volume_claims/$PERSISTENT_VOLUME_CLAIM_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3037
3037
|
},
|
|
3038
3038
|
},
|
|
3039
3039
|
},
|
|
@@ -3051,24 +3051,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3051
3051
|
markdown:
|
|
3052
3052
|
"## list\n\n`client.nks.clusters.persistentVolumeClaims.list(cluster_id: string, cursor?: string, limit?: number): { id: string; cluster_id: string; created_at: string; name: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/persistent_volume_claims`\n\nList all persistent volume claims in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\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; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS persistent volume claim details.\n\n - `id: string`\n - `cluster_id: string`\n - `created_at: string`\n - `name: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const persistentVolumeClaim of client.nks.clusters.persistentVolumeClaims.list('cluster_id')) {\n console.log(persistentVolumeClaim);\n}\n```",
|
|
3053
3053
|
perLanguage: {
|
|
3054
|
-
|
|
3055
|
-
method: '
|
|
3054
|
+
typescript: {
|
|
3055
|
+
method: 'client.nks.clusters.persistentVolumeClaims.list',
|
|
3056
3056
|
example:
|
|
3057
|
-
"nirvana
|
|
3057
|
+
"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 persistentVolumeClaim of client.nks.clusters.persistentVolumeClaims.list(\n 'cluster_id',\n)) {\n console.log(persistentVolumeClaim.id);\n}",
|
|
3058
3058
|
},
|
|
3059
3059
|
go: {
|
|
3060
3060
|
method: 'client.NKS.Clusters.PersistentVolumeClaims.List',
|
|
3061
3061
|
example:
|
|
3062
3062
|
'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.PersistentVolumeClaims.List(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterPersistentVolumeClaimListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
3063
3063
|
},
|
|
3064
|
-
|
|
3064
|
+
cli: {
|
|
3065
|
+
method: 'persistent_volume_claims list',
|
|
3065
3066
|
example:
|
|
3066
|
-
|
|
3067
|
+
"nirvana nks:clusters:persistent-volume-claims list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
3067
3068
|
},
|
|
3068
|
-
|
|
3069
|
-
method: 'client.nks.clusters.persistentVolumeClaims.list',
|
|
3069
|
+
http: {
|
|
3070
3070
|
example:
|
|
3071
|
-
|
|
3071
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/persistent_volume_claims \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3072
3072
|
},
|
|
3073
3073
|
},
|
|
3074
3074
|
},
|
|
@@ -3085,24 +3085,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3085
3085
|
markdown:
|
|
3086
3086
|
"## 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```",
|
|
3087
3087
|
perLanguage: {
|
|
3088
|
-
|
|
3089
|
-
method: 'kubeconfig
|
|
3088
|
+
typescript: {
|
|
3089
|
+
method: 'client.nks.clusters.kubeconfig.get',
|
|
3090
3090
|
example:
|
|
3091
|
-
"nirvana
|
|
3091
|
+
"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);",
|
|
3092
3092
|
},
|
|
3093
3093
|
go: {
|
|
3094
3094
|
method: 'client.NKS.Clusters.Kubeconfig.Get',
|
|
3095
3095
|
example:
|
|
3096
3096
|
'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',
|
|
3097
3097
|
},
|
|
3098
|
-
|
|
3098
|
+
cli: {
|
|
3099
|
+
method: 'kubeconfig get',
|
|
3099
3100
|
example:
|
|
3100
|
-
|
|
3101
|
+
"nirvana nks:clusters:kubeconfig get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
3101
3102
|
},
|
|
3102
|
-
|
|
3103
|
-
method: 'client.nks.clusters.kubeconfig.get',
|
|
3103
|
+
http: {
|
|
3104
3104
|
example:
|
|
3105
|
-
|
|
3105
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/kubeconfig \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3106
3106
|
},
|
|
3107
3107
|
},
|
|
3108
3108
|
},
|
|
@@ -3120,24 +3120,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3120
3120
|
markdown:
|
|
3121
3121
|
"## get\n\n`client.nks.clusters.controllers.get(cluster_id: string, controller_id: string): { id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/controllers/{controller_id}`\n\nGet details about an NKS controller\n\n### Parameters\n\n- `cluster_id: string`\n\n- `controller_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }`\n NKS controller details.\n\n - `id: string`\n - `created_at: string`\n - `instance_type: string`\n - `name: string`\n - `private_ip: string`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst nksController = await client.nks.clusters.controllers.get('controller_id', { cluster_id: 'cluster_id' });\n\nconsole.log(nksController);\n```",
|
|
3122
3122
|
perLanguage: {
|
|
3123
|
-
|
|
3124
|
-
method: 'controllers
|
|
3123
|
+
typescript: {
|
|
3124
|
+
method: 'client.nks.clusters.controllers.get',
|
|
3125
3125
|
example:
|
|
3126
|
-
"nirvana
|
|
3126
|
+
"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);",
|
|
3127
3127
|
},
|
|
3128
3128
|
go: {
|
|
3129
3129
|
method: 'client.NKS.Clusters.Controllers.Get',
|
|
3130
3130
|
example:
|
|
3131
3131
|
'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',
|
|
3132
3132
|
},
|
|
3133
|
-
|
|
3133
|
+
cli: {
|
|
3134
|
+
method: 'controllers get',
|
|
3134
3135
|
example:
|
|
3135
|
-
|
|
3136
|
+
"nirvana nks:clusters:controllers get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --controller-id controller_id",
|
|
3136
3137
|
},
|
|
3137
|
-
|
|
3138
|
-
method: 'client.nks.clusters.controllers.get',
|
|
3138
|
+
http: {
|
|
3139
3139
|
example:
|
|
3140
|
-
|
|
3140
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers/$CONTROLLER_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3141
3141
|
},
|
|
3142
3142
|
},
|
|
3143
3143
|
},
|
|
@@ -3155,24 +3155,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3155
3155
|
markdown:
|
|
3156
3156
|
"## list\n\n`client.nks.clusters.controllers.list(cluster_id: string, cursor?: string, limit?: number): { id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/controllers`\n\nList all controllers in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }`\n NKS controller details.\n\n - `id: string`\n - `created_at: string`\n - `instance_type: string`\n - `name: string`\n - `private_ip: string`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const nksController of client.nks.clusters.controllers.list('cluster_id')) {\n console.log(nksController);\n}\n```",
|
|
3157
3157
|
perLanguage: {
|
|
3158
|
-
|
|
3159
|
-
method: 'controllers
|
|
3158
|
+
typescript: {
|
|
3159
|
+
method: 'client.nks.clusters.controllers.list',
|
|
3160
3160
|
example:
|
|
3161
|
-
"nirvana
|
|
3161
|
+
"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}",
|
|
3162
3162
|
},
|
|
3163
3163
|
go: {
|
|
3164
3164
|
method: 'client.NKS.Clusters.Controllers.List',
|
|
3165
3165
|
example:
|
|
3166
3166
|
'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',
|
|
3167
3167
|
},
|
|
3168
|
-
|
|
3168
|
+
cli: {
|
|
3169
|
+
method: 'controllers list',
|
|
3169
3170
|
example:
|
|
3170
|
-
|
|
3171
|
+
"nirvana nks:clusters:controllers list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
3171
3172
|
},
|
|
3172
|
-
|
|
3173
|
-
method: 'client.nks.clusters.controllers.list',
|
|
3173
|
+
http: {
|
|
3174
3174
|
example:
|
|
3175
|
-
|
|
3175
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3176
3176
|
},
|
|
3177
3177
|
},
|
|
3178
3178
|
},
|
|
@@ -3190,24 +3190,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3190
3190
|
markdown:
|
|
3191
3191
|
"## 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```",
|
|
3192
3192
|
perLanguage: {
|
|
3193
|
-
|
|
3194
|
-
method: 'volumes
|
|
3193
|
+
typescript: {
|
|
3194
|
+
method: 'client.nks.clusters.controllers.volumes.get',
|
|
3195
3195
|
example:
|
|
3196
|
-
"nirvana
|
|
3196
|
+
"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);",
|
|
3197
3197
|
},
|
|
3198
3198
|
go: {
|
|
3199
3199
|
method: 'client.NKS.Clusters.Controllers.Volumes.Get',
|
|
3200
3200
|
example:
|
|
3201
3201
|
'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',
|
|
3202
3202
|
},
|
|
3203
|
-
|
|
3203
|
+
cli: {
|
|
3204
|
+
method: 'volumes get',
|
|
3204
3205
|
example:
|
|
3205
|
-
|
|
3206
|
+
"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",
|
|
3206
3207
|
},
|
|
3207
|
-
|
|
3208
|
-
method: 'client.nks.clusters.controllers.volumes.get',
|
|
3208
|
+
http: {
|
|
3209
3209
|
example:
|
|
3210
|
-
|
|
3210
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers/$CONTROLLER_ID/volumes/$VOLUME_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3211
3211
|
},
|
|
3212
3212
|
},
|
|
3213
3213
|
},
|
|
@@ -3225,24 +3225,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3225
3225
|
markdown:
|
|
3226
3226
|
"## 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```",
|
|
3227
3227
|
perLanguage: {
|
|
3228
|
-
|
|
3229
|
-
method: 'volumes
|
|
3228
|
+
typescript: {
|
|
3229
|
+
method: 'client.nks.clusters.controllers.volumes.list',
|
|
3230
3230
|
example:
|
|
3231
|
-
"nirvana
|
|
3231
|
+
"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}",
|
|
3232
3232
|
},
|
|
3233
3233
|
go: {
|
|
3234
3234
|
method: 'client.NKS.Clusters.Controllers.Volumes.List',
|
|
3235
3235
|
example:
|
|
3236
3236
|
'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',
|
|
3237
3237
|
},
|
|
3238
|
-
|
|
3238
|
+
cli: {
|
|
3239
|
+
method: 'volumes list',
|
|
3239
3240
|
example:
|
|
3240
|
-
|
|
3241
|
+
"nirvana nks:clusters:controllers:volumes list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --controller-id controller_id",
|
|
3241
3242
|
},
|
|
3242
|
-
|
|
3243
|
-
method: 'client.nks.clusters.controllers.volumes.list',
|
|
3243
|
+
http: {
|
|
3244
3244
|
example:
|
|
3245
|
-
|
|
3245
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers/$CONTROLLER_ID/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3246
3246
|
},
|
|
3247
3247
|
},
|
|
3248
3248
|
},
|
|
@@ -3260,24 +3260,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3260
3260
|
markdown:
|
|
3261
3261
|
"## 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; public_ip: string; public_ip_enabled: boolean; service_name: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/load_balancers/{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; public_ip: string; public_ip_enabled: boolean; service_name: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }`\n NKS load balancer details.\n\n - `id: string`\n - `cluster_id: string`\n - `created_at: string`\n - `namespace: string`\n - `private_ip: string`\n - `public_ip: string`\n - `public_ip_enabled: boolean`\n - `service_name: string`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst nksLoadBalancer = await client.nks.clusters.loadBalancers.get('load_balancer_id', { cluster_id: 'cluster_id' });\n\nconsole.log(nksLoadBalancer);\n```",
|
|
3262
3262
|
perLanguage: {
|
|
3263
|
-
|
|
3264
|
-
method: '
|
|
3263
|
+
typescript: {
|
|
3264
|
+
method: 'client.nks.clusters.loadBalancers.get',
|
|
3265
3265
|
example:
|
|
3266
|
-
"nirvana
|
|
3266
|
+
"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);",
|
|
3267
3267
|
},
|
|
3268
3268
|
go: {
|
|
3269
3269
|
method: 'client.NKS.Clusters.LoadBalancers.Get',
|
|
3270
3270
|
example:
|
|
3271
3271
|
'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',
|
|
3272
3272
|
},
|
|
3273
|
-
|
|
3273
|
+
cli: {
|
|
3274
|
+
method: 'load_balancers get',
|
|
3274
3275
|
example:
|
|
3275
|
-
|
|
3276
|
+
"nirvana nks:clusters:load-balancers get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --load-balancer-id load_balancer_id",
|
|
3276
3277
|
},
|
|
3277
|
-
|
|
3278
|
-
method: 'client.nks.clusters.loadBalancers.get',
|
|
3278
|
+
http: {
|
|
3279
3279
|
example:
|
|
3280
|
-
|
|
3280
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/load_balancers/$LOAD_BALANCER_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3281
3281
|
},
|
|
3282
3282
|
},
|
|
3283
3283
|
},
|
|
@@ -3295,24 +3295,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3295
3295
|
markdown:
|
|
3296
3296
|
"## update\n\n`client.nks.clusters.loadBalancers.update(cluster_id: string, load_balancer_id: string, public_ip_enabled: boolean): { 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}/load_balancers/{load_balancer_id}`\n\nUpdate an NKS load balancer\n\n### Parameters\n\n- `cluster_id: string`\n\n- `load_balancer_id: string`\n\n- `public_ip_enabled: boolean`\n Whether to enable a public IP for this load balancer.\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.loadBalancers.update('load_balancer_id', { cluster_id: 'cluster_id', public_ip_enabled: true });\n\nconsole.log(operation);\n```",
|
|
3297
3297
|
perLanguage: {
|
|
3298
|
-
|
|
3299
|
-
method: '
|
|
3298
|
+
typescript: {
|
|
3299
|
+
method: 'client.nks.clusters.loadBalancers.update',
|
|
3300
3300
|
example:
|
|
3301
|
-
"nirvana
|
|
3301
|
+
"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.loadBalancers.update('load_balancer_id', {\n cluster_id: 'cluster_id',\n public_ip_enabled: true,\n});\n\nconsole.log(operation.id);",
|
|
3302
3302
|
},
|
|
3303
3303
|
go: {
|
|
3304
3304
|
method: 'client.NKS.Clusters.LoadBalancers.Update',
|
|
3305
3305
|
example:
|
|
3306
3306
|
'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.LoadBalancers.Update(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"load_balancer_id",\n\t\tnks.ClusterLoadBalancerUpdateParams{\n\t\t\tPublicIPEnabled: true,\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',
|
|
3307
3307
|
},
|
|
3308
|
-
|
|
3308
|
+
cli: {
|
|
3309
|
+
method: 'load_balancers update',
|
|
3309
3310
|
example:
|
|
3310
|
-
|
|
3311
|
+
"nirvana nks:clusters:load-balancers update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --load-balancer-id load_balancer_id \\\n --public-ip-enabled",
|
|
3311
3312
|
},
|
|
3312
|
-
|
|
3313
|
-
method: 'client.nks.clusters.loadBalancers.update',
|
|
3313
|
+
http: {
|
|
3314
3314
|
example:
|
|
3315
|
-
|
|
3315
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/load_balancers/$LOAD_BALANCER_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "public_ip_enabled": true\n }\'',
|
|
3316
3316
|
},
|
|
3317
3317
|
},
|
|
3318
3318
|
},
|
|
@@ -3330,24 +3330,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3330
3330
|
markdown:
|
|
3331
3331
|
"## list\n\n`client.nks.clusters.loadBalancers.list(cluster_id: string, cursor?: string, limit?: number): { id: string; cluster_id: string; created_at: string; namespace: string; private_ip: string; public_ip: string; public_ip_enabled: boolean; service_name: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/load_balancers`\n\nList all load balancers in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\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; public_ip: string; public_ip_enabled: boolean; service_name: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }`\n NKS load balancer details.\n\n - `id: string`\n - `cluster_id: string`\n - `created_at: string`\n - `namespace: string`\n - `private_ip: string`\n - `public_ip: string`\n - `public_ip_enabled: boolean`\n - `service_name: string`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const nksLoadBalancer of client.nks.clusters.loadBalancers.list('cluster_id')) {\n console.log(nksLoadBalancer);\n}\n```",
|
|
3332
3332
|
perLanguage: {
|
|
3333
|
-
|
|
3334
|
-
method: '
|
|
3333
|
+
typescript: {
|
|
3334
|
+
method: 'client.nks.clusters.loadBalancers.list',
|
|
3335
3335
|
example:
|
|
3336
|
-
"nirvana
|
|
3336
|
+
"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}",
|
|
3337
3337
|
},
|
|
3338
3338
|
go: {
|
|
3339
3339
|
method: 'client.NKS.Clusters.LoadBalancers.List',
|
|
3340
3340
|
example:
|
|
3341
3341
|
'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',
|
|
3342
3342
|
},
|
|
3343
|
-
|
|
3343
|
+
cli: {
|
|
3344
|
+
method: 'load_balancers list',
|
|
3344
3345
|
example:
|
|
3345
|
-
|
|
3346
|
+
"nirvana nks:clusters:load-balancers list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
3346
3347
|
},
|
|
3347
|
-
|
|
3348
|
-
method: 'client.nks.clusters.loadBalancers.list',
|
|
3348
|
+
http: {
|
|
3349
3349
|
example:
|
|
3350
|
-
|
|
3350
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/load_balancers \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3351
3351
|
},
|
|
3352
3352
|
},
|
|
3353
3353
|
},
|
|
@@ -3371,24 +3371,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3371
3371
|
markdown:
|
|
3372
3372
|
"## create\n\n`client.nks.clusters.pools.create(cluster_id: string, name: string, node_config: { boot_volume: nks_node_pool_boot_volume; instance_type: string; labels?: string[]; }, node_count: number, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/nks/clusters/{cluster_id}/pools`\n\nCreate a node pool in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `name: string`\n Name of the node pool.\n\n- `node_config: { boot_volume: { size: number; type: volume_type; }; instance_type: string; labels?: string[]; }`\n Node configuration.\n - `boot_volume: { size: number; type: 'nvme' | 'abs'; }`\n Boot volume configuration.\n - `instance_type: string`\n Instance type name used for worker nodes.\n - `labels?: string[]`\n Kubernetes labels to apply to each node in the pool. Each entry is \"key=value\".\nKeys under kubernetes.io, k8s.io, and nirvanalabs.io prefixes are reserved.\n\n- `node_count: number`\n Number of nodes. Must be between 1 and 100.\n\n- `tags?: string[]`\n Tags to attach to the node pool.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.nks.clusters.pools.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n},\n node_count: 3,\n});\n\nconsole.log(operation);\n```",
|
|
3373
3373
|
perLanguage: {
|
|
3374
|
-
|
|
3375
|
-
method: 'pools
|
|
3374
|
+
typescript: {
|
|
3375
|
+
method: 'client.nks.clusters.pools.create',
|
|
3376
3376
|
example:
|
|
3377
|
-
"nirvana
|
|
3377
|
+
"import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n },\n node_count: 3,\n});\n\nconsole.log(operation.id);",
|
|
3378
3378
|
},
|
|
3379
3379
|
go: {
|
|
3380
3380
|
method: 'client.NKS.Clusters.Pools.New',
|
|
3381
3381
|
example:
|
|
3382
3382
|
'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.NKS.Clusters.Pools.New(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterPoolNewParams{\n\t\t\tName: "my-node-pool",\n\t\t\tNodeConfig: nks.NKSNodePoolNodeConfigParam{\n\t\t\t\tBootVolume: nks.NKSNodePoolBootVolumeParam{\n\t\t\t\t\tSize: 100,\n\t\t\t\t\tType: compute.VolumeTypeABS,\n\t\t\t\t},\n\t\t\t\tInstanceType: "n1-standard-8",\n\t\t\t},\n\t\t\tNodeCount: 3,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
3383
3383
|
},
|
|
3384
|
-
|
|
3384
|
+
cli: {
|
|
3385
|
+
method: 'pools create',
|
|
3385
3386
|
example:
|
|
3386
|
-
|
|
3387
|
+
"nirvana nks:clusters:pools create \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --name my-node-pool \\\n --node-config '{boot_volume: {size: 100, type: abs}, instance_type: n1-standard-8}' \\\n --node-count 3",
|
|
3387
3388
|
},
|
|
3388
|
-
|
|
3389
|
-
method: 'client.nks.clusters.pools.create',
|
|
3389
|
+
http: {
|
|
3390
3390
|
example:
|
|
3391
|
-
|
|
3391
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_config": {\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "instance_type": "n1-standard-8"\n },\n "node_count": 3,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
3392
3392
|
},
|
|
3393
3393
|
},
|
|
3394
3394
|
},
|
|
@@ -3406,24 +3406,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3406
3406
|
markdown:
|
|
3407
3407
|
"## get\n\n`client.nks.clusters.pools.get(cluster_id: string, pool_id: string): { id: string; cluster_id: string; created_at: string; name: string; node_config: nks_node_pool_node_config_response; node_count: number; status: resource_status; tags: string[]; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}`\n\nGet details about an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response; instance_type: string; labels: string[]; }; node_count: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }`\n NKS node pool details.\n\n - `id: string`\n - `cluster_id: string`\n - `created_at: string`\n - `name: string`\n - `node_config: { boot_volume: { size: number; type: volume_type; }; instance_type: string; labels: string[]; }`\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```",
|
|
3408
3408
|
perLanguage: {
|
|
3409
|
-
|
|
3410
|
-
method: 'pools
|
|
3409
|
+
typescript: {
|
|
3410
|
+
method: 'client.nks.clusters.pools.get',
|
|
3411
3411
|
example:
|
|
3412
|
-
"nirvana
|
|
3412
|
+
"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);",
|
|
3413
3413
|
},
|
|
3414
3414
|
go: {
|
|
3415
3415
|
method: 'client.NKS.Clusters.Pools.Get',
|
|
3416
3416
|
example:
|
|
3417
3417
|
'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',
|
|
3418
3418
|
},
|
|
3419
|
-
|
|
3419
|
+
cli: {
|
|
3420
|
+
method: 'pools get',
|
|
3420
3421
|
example:
|
|
3421
|
-
|
|
3422
|
+
"nirvana nks:clusters:pools get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
|
|
3422
3423
|
},
|
|
3423
|
-
|
|
3424
|
-
method: 'client.nks.clusters.pools.get',
|
|
3424
|
+
http: {
|
|
3425
3425
|
example:
|
|
3426
|
-
|
|
3426
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3427
3427
|
},
|
|
3428
3428
|
},
|
|
3429
3429
|
},
|
|
@@ -3448,24 +3448,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3448
3448
|
markdown:
|
|
3449
3449
|
"## update\n\n`client.nks.clusters.pools.update(cluster_id: string, pool_id: string, name?: string, node_config?: { labels?: 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_config?: { labels?: string[]; }`\n Partial node configuration update.\n - `labels?: string[]`\n Kubernetes labels to apply to each node in the pool. Each entry is \"key=value\".\nWhen provided, the list fully replaces the current labels on the pool and on live nodes.\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```",
|
|
3450
3450
|
perLanguage: {
|
|
3451
|
-
|
|
3452
|
-
method: 'pools
|
|
3451
|
+
typescript: {
|
|
3452
|
+
method: 'client.nks.clusters.pools.update',
|
|
3453
3453
|
example:
|
|
3454
|
-
"nirvana
|
|
3454
|
+
"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);",
|
|
3455
3455
|
},
|
|
3456
3456
|
go: {
|
|
3457
3457
|
method: 'client.NKS.Clusters.Pools.Update',
|
|
3458
3458
|
example:
|
|
3459
3459
|
'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',
|
|
3460
3460
|
},
|
|
3461
|
-
|
|
3461
|
+
cli: {
|
|
3462
|
+
method: 'pools update',
|
|
3462
3463
|
example:
|
|
3463
|
-
|
|
3464
|
+
"nirvana nks:clusters:pools update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
|
|
3464
3465
|
},
|
|
3465
|
-
|
|
3466
|
-
method: 'client.nks.clusters.pools.update',
|
|
3466
|
+
http: {
|
|
3467
3467
|
example:
|
|
3468
|
-
|
|
3468
|
+
'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 }\'',
|
|
3469
3469
|
},
|
|
3470
3470
|
},
|
|
3471
3471
|
},
|
|
@@ -3483,24 +3483,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3483
3483
|
markdown:
|
|
3484
3484
|
"## 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```",
|
|
3485
3485
|
perLanguage: {
|
|
3486
|
-
|
|
3487
|
-
method: 'pools
|
|
3486
|
+
typescript: {
|
|
3487
|
+
method: 'client.nks.clusters.pools.delete',
|
|
3488
3488
|
example:
|
|
3489
|
-
"nirvana
|
|
3489
|
+
"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);",
|
|
3490
3490
|
},
|
|
3491
3491
|
go: {
|
|
3492
3492
|
method: 'client.NKS.Clusters.Pools.Delete',
|
|
3493
3493
|
example:
|
|
3494
3494
|
'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',
|
|
3495
3495
|
},
|
|
3496
|
-
|
|
3496
|
+
cli: {
|
|
3497
|
+
method: 'pools delete',
|
|
3497
3498
|
example:
|
|
3498
|
-
|
|
3499
|
+
"nirvana nks:clusters:pools delete \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
|
|
3499
3500
|
},
|
|
3500
|
-
|
|
3501
|
-
method: 'client.nks.clusters.pools.delete',
|
|
3501
|
+
http: {
|
|
3502
3502
|
example:
|
|
3503
|
-
|
|
3503
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3504
3504
|
},
|
|
3505
3505
|
},
|
|
3506
3506
|
},
|
|
@@ -3518,24 +3518,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3518
3518
|
markdown:
|
|
3519
3519
|
"## list\n\n`client.nks.clusters.pools.list(cluster_id: string, cursor?: string, limit?: number): { id: string; cluster_id: string; created_at: string; name: string; node_config: nks_node_pool_node_config_response; node_count: number; status: resource_status; tags: string[]; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools`\n\nList all node pools in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response; instance_type: string; labels: string[]; }; node_count: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }`\n NKS node pool details.\n\n - `id: string`\n - `cluster_id: string`\n - `created_at: string`\n - `name: string`\n - `node_config: { boot_volume: { size: number; type: volume_type; }; instance_type: string; labels: string[]; }`\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```",
|
|
3520
3520
|
perLanguage: {
|
|
3521
|
-
|
|
3522
|
-
method: 'pools
|
|
3523
|
-
example:
|
|
3521
|
+
typescript: {
|
|
3522
|
+
method: 'client.nks.clusters.pools.list',
|
|
3523
|
+
example:
|
|
3524
|
+
"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}",
|
|
3524
3525
|
},
|
|
3525
3526
|
go: {
|
|
3526
3527
|
method: 'client.NKS.Clusters.Pools.List',
|
|
3527
3528
|
example:
|
|
3528
3529
|
'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',
|
|
3529
3530
|
},
|
|
3531
|
+
cli: {
|
|
3532
|
+
method: 'pools list',
|
|
3533
|
+
example: "nirvana nks:clusters:pools list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
3534
|
+
},
|
|
3530
3535
|
http: {
|
|
3531
3536
|
example:
|
|
3532
3537
|
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3533
3538
|
},
|
|
3534
|
-
typescript: {
|
|
3535
|
-
method: 'client.nks.clusters.pools.list',
|
|
3536
|
-
example:
|
|
3537
|
-
"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}",
|
|
3538
|
-
},
|
|
3539
3539
|
},
|
|
3540
3540
|
},
|
|
3541
3541
|
{
|
|
@@ -3556,24 +3556,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3556
3556
|
markdown:
|
|
3557
3557
|
"## create\n\n`client.nks.clusters.pools.availability.create(cluster_id: string, name: string, node_config: { boot_volume: nks_node_pool_boot_volume; instance_type: string; labels?: string[]; }, node_count: number, tags?: string[]): void`\n\n**post** `/v1/nks/clusters/{cluster_id}/pools/availability`\n\nCheck if a node pool can be created in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `name: string`\n Name of the node pool.\n\n- `node_config: { boot_volume: { size: number; type: volume_type; }; instance_type: string; labels?: string[]; }`\n Node configuration.\n - `boot_volume: { size: number; type: 'nvme' | 'abs'; }`\n Boot volume configuration.\n - `instance_type: string`\n Instance type name used for worker nodes.\n - `labels?: string[]`\n Kubernetes labels to apply to each node in the pool. Each entry is \"key=value\".\nKeys under kubernetes.io, k8s.io, and nirvanalabs.io prefixes are reserved.\n\n- `node_count: number`\n Number of nodes. Must be between 1 and 100.\n\n- `tags?: string[]`\n Tags to attach to the node pool.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.nks.clusters.pools.availability.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n},\n node_count: 3,\n})\n```",
|
|
3558
3558
|
perLanguage: {
|
|
3559
|
-
|
|
3560
|
-
method: 'availability
|
|
3559
|
+
typescript: {
|
|
3560
|
+
method: 'client.nks.clusters.pools.availability.create',
|
|
3561
3561
|
example:
|
|
3562
|
-
"nirvana
|
|
3562
|
+
"import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.pools.availability.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n },\n node_count: 3,\n});",
|
|
3563
3563
|
},
|
|
3564
3564
|
go: {
|
|
3565
3565
|
method: 'client.NKS.Clusters.Pools.Availability.New',
|
|
3566
3566
|
example:
|
|
3567
3567
|
'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.NKS.Clusters.Pools.Availability.New(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterPoolAvailabilityNewParams{\n\t\t\tName: "my-node-pool",\n\t\t\tNodeConfig: nks.NKSNodePoolNodeConfigParam{\n\t\t\t\tBootVolume: nks.NKSNodePoolBootVolumeParam{\n\t\t\t\t\tSize: 100,\n\t\t\t\t\tType: compute.VolumeTypeABS,\n\t\t\t\t},\n\t\t\t\tInstanceType: "n1-standard-8",\n\t\t\t},\n\t\t\tNodeCount: 3,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
3568
3568
|
},
|
|
3569
|
-
|
|
3569
|
+
cli: {
|
|
3570
|
+
method: 'availability create',
|
|
3570
3571
|
example:
|
|
3571
|
-
|
|
3572
|
+
"nirvana nks:clusters:pools:availability create \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --name my-node-pool \\\n --node-config '{boot_volume: {size: 100, type: abs}, instance_type: n1-standard-8}' \\\n --node-count 3",
|
|
3572
3573
|
},
|
|
3573
|
-
|
|
3574
|
-
method: 'client.nks.clusters.pools.availability.create',
|
|
3574
|
+
http: {
|
|
3575
3575
|
example:
|
|
3576
|
-
|
|
3576
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_config": {\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "instance_type": "n1-standard-8"\n },\n "node_count": 3,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
3577
3577
|
},
|
|
3578
3578
|
},
|
|
3579
3579
|
},
|
|
@@ -3596,24 +3596,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3596
3596
|
markdown:
|
|
3597
3597
|
"## update\n\n`client.nks.clusters.pools.availability.update(cluster_id: string, pool_id: string, name?: string, node_config?: { labels?: 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_config?: { labels?: string[]; }`\n Partial node configuration update.\n - `labels?: string[]`\n Kubernetes labels to apply to each node in the pool. Each entry is \"key=value\".\nWhen provided, the list fully replaces the current labels on the pool and on live nodes.\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```",
|
|
3598
3598
|
perLanguage: {
|
|
3599
|
-
|
|
3600
|
-
method: 'availability
|
|
3599
|
+
typescript: {
|
|
3600
|
+
method: 'client.nks.clusters.pools.availability.update',
|
|
3601
3601
|
example:
|
|
3602
|
-
"nirvana
|
|
3602
|
+
"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' });",
|
|
3603
3603
|
},
|
|
3604
3604
|
go: {
|
|
3605
3605
|
method: 'client.NKS.Clusters.Pools.Availability.Update',
|
|
3606
3606
|
example:
|
|
3607
3607
|
'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',
|
|
3608
3608
|
},
|
|
3609
|
-
|
|
3609
|
+
cli: {
|
|
3610
|
+
method: 'availability update',
|
|
3610
3611
|
example:
|
|
3611
|
-
|
|
3612
|
+
"nirvana nks:clusters:pools:availability update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
|
|
3612
3613
|
},
|
|
3613
|
-
|
|
3614
|
-
method: 'client.nks.clusters.pools.availability.update',
|
|
3614
|
+
http: {
|
|
3615
3615
|
example:
|
|
3616
|
-
|
|
3616
|
+
'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 }\'',
|
|
3617
3617
|
},
|
|
3618
3618
|
},
|
|
3619
3619
|
},
|
|
@@ -3631,24 +3631,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3631
3631
|
markdown:
|
|
3632
3632
|
"## 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```",
|
|
3633
3633
|
perLanguage: {
|
|
3634
|
-
|
|
3635
|
-
method: 'nodes
|
|
3634
|
+
typescript: {
|
|
3635
|
+
method: 'client.nks.clusters.pools.nodes.get',
|
|
3636
3636
|
example:
|
|
3637
|
-
"nirvana
|
|
3637
|
+
"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);",
|
|
3638
3638
|
},
|
|
3639
3639
|
go: {
|
|
3640
3640
|
method: 'client.NKS.Clusters.Pools.Nodes.Get',
|
|
3641
3641
|
example:
|
|
3642
3642
|
'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',
|
|
3643
3643
|
},
|
|
3644
|
-
|
|
3644
|
+
cli: {
|
|
3645
|
+
method: 'nodes get',
|
|
3645
3646
|
example:
|
|
3646
|
-
|
|
3647
|
+
"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",
|
|
3647
3648
|
},
|
|
3648
|
-
|
|
3649
|
-
method: 'client.nks.clusters.pools.nodes.get',
|
|
3649
|
+
http: {
|
|
3650
3650
|
example:
|
|
3651
|
-
|
|
3651
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3652
3652
|
},
|
|
3653
3653
|
},
|
|
3654
3654
|
},
|
|
@@ -3666,24 +3666,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3666
3666
|
markdown:
|
|
3667
3667
|
"## 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```",
|
|
3668
3668
|
perLanguage: {
|
|
3669
|
-
|
|
3670
|
-
method: 'nodes
|
|
3669
|
+
typescript: {
|
|
3670
|
+
method: 'client.nks.clusters.pools.nodes.delete',
|
|
3671
3671
|
example:
|
|
3672
|
-
"nirvana
|
|
3672
|
+
"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);",
|
|
3673
3673
|
},
|
|
3674
3674
|
go: {
|
|
3675
3675
|
method: 'client.NKS.Clusters.Pools.Nodes.Delete',
|
|
3676
3676
|
example:
|
|
3677
3677
|
'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',
|
|
3678
3678
|
},
|
|
3679
|
-
|
|
3679
|
+
cli: {
|
|
3680
|
+
method: 'nodes delete',
|
|
3680
3681
|
example:
|
|
3681
|
-
|
|
3682
|
+
"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",
|
|
3682
3683
|
},
|
|
3683
|
-
|
|
3684
|
-
method: 'client.nks.clusters.pools.nodes.delete',
|
|
3684
|
+
http: {
|
|
3685
3685
|
example:
|
|
3686
|
-
|
|
3686
|
+
'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"',
|
|
3687
3687
|
},
|
|
3688
3688
|
},
|
|
3689
3689
|
},
|
|
@@ -3701,24 +3701,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3701
3701
|
markdown:
|
|
3702
3702
|
"## 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```",
|
|
3703
3703
|
perLanguage: {
|
|
3704
|
-
|
|
3705
|
-
method: 'nodes
|
|
3704
|
+
typescript: {
|
|
3705
|
+
method: 'client.nks.clusters.pools.nodes.list',
|
|
3706
3706
|
example:
|
|
3707
|
-
"nirvana
|
|
3707
|
+
"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}",
|
|
3708
3708
|
},
|
|
3709
3709
|
go: {
|
|
3710
3710
|
method: 'client.NKS.Clusters.Pools.Nodes.List',
|
|
3711
3711
|
example:
|
|
3712
3712
|
'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',
|
|
3713
3713
|
},
|
|
3714
|
-
|
|
3714
|
+
cli: {
|
|
3715
|
+
method: 'nodes list',
|
|
3715
3716
|
example:
|
|
3716
|
-
|
|
3717
|
+
"nirvana nks:clusters:pools:nodes list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
|
|
3717
3718
|
},
|
|
3718
|
-
|
|
3719
|
-
method: 'client.nks.clusters.pools.nodes.list',
|
|
3719
|
+
http: {
|
|
3720
3720
|
example:
|
|
3721
|
-
|
|
3721
|
+
'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3722
3722
|
},
|
|
3723
3723
|
},
|
|
3724
3724
|
},
|
|
@@ -3736,24 +3736,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3736
3736
|
markdown:
|
|
3737
3737
|
"## 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```",
|
|
3738
3738
|
perLanguage: {
|
|
3739
|
-
|
|
3740
|
-
method: 'volumes
|
|
3739
|
+
typescript: {
|
|
3740
|
+
method: 'client.nks.clusters.pools.nodes.volumes.get',
|
|
3741
3741
|
example:
|
|
3742
|
-
"nirvana
|
|
3742
|
+
"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);",
|
|
3743
3743
|
},
|
|
3744
3744
|
go: {
|
|
3745
3745
|
method: 'client.NKS.Clusters.Pools.Nodes.Volumes.Get',
|
|
3746
3746
|
example:
|
|
3747
3747
|
'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',
|
|
3748
3748
|
},
|
|
3749
|
-
|
|
3749
|
+
cli: {
|
|
3750
|
+
method: 'volumes get',
|
|
3750
3751
|
example:
|
|
3751
|
-
|
|
3752
|
+
"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",
|
|
3752
3753
|
},
|
|
3753
|
-
|
|
3754
|
-
method: 'client.nks.clusters.pools.nodes.volumes.get',
|
|
3754
|
+
http: {
|
|
3755
3755
|
example:
|
|
3756
|
-
|
|
3756
|
+
'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"',
|
|
3757
3757
|
},
|
|
3758
3758
|
},
|
|
3759
3759
|
},
|
|
@@ -3777,24 +3777,24 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
3777
3777
|
markdown:
|
|
3778
3778
|
"## 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```",
|
|
3779
3779
|
perLanguage: {
|
|
3780
|
-
|
|
3781
|
-
method: 'volumes
|
|
3780
|
+
typescript: {
|
|
3781
|
+
method: 'client.nks.clusters.pools.nodes.volumes.list',
|
|
3782
3782
|
example:
|
|
3783
|
-
"nirvana
|
|
3783
|
+
"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}",
|
|
3784
3784
|
},
|
|
3785
3785
|
go: {
|
|
3786
3786
|
method: 'client.NKS.Clusters.Pools.Nodes.Volumes.List',
|
|
3787
3787
|
example:
|
|
3788
3788
|
'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',
|
|
3789
3789
|
},
|
|
3790
|
-
|
|
3790
|
+
cli: {
|
|
3791
|
+
method: 'volumes list',
|
|
3791
3792
|
example:
|
|
3792
|
-
|
|
3793
|
+
"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",
|
|
3793
3794
|
},
|
|
3794
|
-
|
|
3795
|
-
method: 'client.nks.clusters.pools.nodes.volumes.list',
|
|
3795
|
+
http: {
|
|
3796
3796
|
example:
|
|
3797
|
-
|
|
3797
|
+
'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"',
|
|
3798
3798
|
},
|
|
3799
3799
|
},
|
|
3800
3800
|
},
|