@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/local-docs-search.mjs
CHANGED
|
@@ -15,21 +15,21 @@ const EMBEDDED_METHODS = [
|
|
|
15
15
|
response: '{ id: string; email: string; first_name: string; last_name: string; }',
|
|
16
16
|
markdown: "## get\n\n`client.user.get(): { id: string; email: string; first_name: string; last_name: string; }`\n\n**get** `/v1/user`\n\nGet details about an authenticated user\n\n### Returns\n\n- `{ id: string; email: string; first_name: string; last_name: string; }`\n User details.\n\n - `id: string`\n - `email: string`\n - `first_name: string`\n - `last_name: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst user = await client.user.get();\n\nconsole.log(user);\n```",
|
|
17
17
|
perLanguage: {
|
|
18
|
-
|
|
19
|
-
method: 'user
|
|
20
|
-
example: "nirvana
|
|
18
|
+
typescript: {
|
|
19
|
+
method: 'client.user.get',
|
|
20
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst user = await client.user.get();\n\nconsole.log(user.id);",
|
|
21
21
|
},
|
|
22
22
|
go: {
|
|
23
23
|
method: 'client.User.Get',
|
|
24
24
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tuser, err := client.User.Get(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", user.ID)\n}\n',
|
|
25
25
|
},
|
|
26
|
+
cli: {
|
|
27
|
+
method: 'user get',
|
|
28
|
+
example: "nirvana user get \\\n --api-key 'My API Key'",
|
|
29
|
+
},
|
|
26
30
|
http: {
|
|
27
31
|
example: 'curl https://api.nirvanalabs.io/v1/user \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
28
32
|
},
|
|
29
|
-
typescript: {
|
|
30
|
-
method: 'client.user.get',
|
|
31
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst user = await client.user.get();\n\nconsole.log(user.id);",
|
|
32
|
-
},
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
{
|
|
@@ -43,21 +43,21 @@ const EMBEDDED_METHODS = [
|
|
|
43
43
|
response: '{ source_ip_rule: { allowed: string[]; blocked: string[]; }; created_at?: string; updated_at?: string; }',
|
|
44
44
|
markdown: "## get\n\n`client.user.security.get(): { source_ip_rule: source_ip_rule_response; created_at?: string; updated_at?: string; }`\n\n**get** `/v1/user/security`\n\nGet the current user's security settings\n\n### Returns\n\n- `{ source_ip_rule: { allowed: string[]; blocked: string[]; }; created_at?: string; updated_at?: string; }`\n User security settings response.\n\n - `source_ip_rule: { allowed: string[]; blocked: string[]; }`\n - `created_at?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst userSecurity = await client.user.security.get();\n\nconsole.log(userSecurity);\n```",
|
|
45
45
|
perLanguage: {
|
|
46
|
-
|
|
47
|
-
method: 'security
|
|
48
|
-
example: "nirvana
|
|
46
|
+
typescript: {
|
|
47
|
+
method: 'client.user.security.get',
|
|
48
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst userSecurity = await client.user.security.get();\n\nconsole.log(userSecurity.source_ip_rule);",
|
|
49
49
|
},
|
|
50
50
|
go: {
|
|
51
51
|
method: 'client.User.Security.Get',
|
|
52
52
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tuserSecurity, err := client.User.Security.Get(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", userSecurity.SourceIPRule)\n}\n',
|
|
53
53
|
},
|
|
54
|
+
cli: {
|
|
55
|
+
method: 'security get',
|
|
56
|
+
example: "nirvana user:security get \\\n --api-key 'My API Key'",
|
|
57
|
+
},
|
|
54
58
|
http: {
|
|
55
59
|
example: 'curl https://api.nirvanalabs.io/v1/user/security \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
56
60
|
},
|
|
57
|
-
typescript: {
|
|
58
|
-
method: 'client.user.security.get',
|
|
59
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst userSecurity = await client.user.security.get();\n\nconsole.log(userSecurity.source_ip_rule);",
|
|
60
|
-
},
|
|
61
61
|
},
|
|
62
62
|
},
|
|
63
63
|
{
|
|
@@ -72,21 +72,21 @@ const EMBEDDED_METHODS = [
|
|
|
72
72
|
response: '{ source_ip_rule: { allowed: string[]; blocked: string[]; }; created_at?: string; updated_at?: string; }',
|
|
73
73
|
markdown: "## update\n\n`client.user.security.update(source_ip_rule?: { allowed?: string[]; blocked?: string[]; }): { source_ip_rule: source_ip_rule_response; created_at?: string; updated_at?: string; }`\n\n**patch** `/v1/user/security`\n\nUpdate the current user's security settings\n\n### Parameters\n\n- `source_ip_rule?: { allowed?: string[]; blocked?: string[]; }`\n IP filter rules.\n - `allowed?: string[]`\n List of IPv4 CIDR addresses to allow.\n - `blocked?: string[]`\n List of IPv4 CIDR addresses to deny.\n\n### Returns\n\n- `{ source_ip_rule: { allowed: string[]; blocked: string[]; }; created_at?: string; updated_at?: string; }`\n User security settings response.\n\n - `source_ip_rule: { allowed: string[]; blocked: string[]; }`\n - `created_at?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst userSecurity = await client.user.security.update();\n\nconsole.log(userSecurity);\n```",
|
|
74
74
|
perLanguage: {
|
|
75
|
-
|
|
76
|
-
method: 'security
|
|
77
|
-
example: "nirvana
|
|
75
|
+
typescript: {
|
|
76
|
+
method: 'client.user.security.update',
|
|
77
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst userSecurity = await client.user.security.update();\n\nconsole.log(userSecurity.source_ip_rule);",
|
|
78
78
|
},
|
|
79
79
|
go: {
|
|
80
80
|
method: 'client.User.Security.Update',
|
|
81
81
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/user"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tuserSecurity, err := client.User.Security.Update(context.TODO(), user.SecurityUpdateParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", userSecurity.SourceIPRule)\n}\n',
|
|
82
82
|
},
|
|
83
|
+
cli: {
|
|
84
|
+
method: 'security update',
|
|
85
|
+
example: "nirvana user:security update \\\n --api-key 'My API Key'",
|
|
86
|
+
},
|
|
83
87
|
http: {
|
|
84
88
|
example: "curl https://api.nirvanalabs.io/v1/user/security \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $NIRVANA_LABS_API_KEY\" \\\n -d '{}'",
|
|
85
89
|
},
|
|
86
|
-
typescript: {
|
|
87
|
-
method: 'client.user.security.update',
|
|
88
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst userSecurity = await client.user.security.update();\n\nconsole.log(userSecurity.source_ip_rule);",
|
|
89
|
-
},
|
|
90
90
|
},
|
|
91
91
|
},
|
|
92
92
|
{
|
|
@@ -109,21 +109,21 @@ const EMBEDDED_METHODS = [
|
|
|
109
109
|
response: "{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }",
|
|
110
110
|
markdown: "## create\n\n`client.apiKeys.create(expires_at: string, name: string, permissions: { permission: 'read' | 'edit'; resource_type: string; }[], project_ids: string[], source_ip_rule?: { allowed?: string[]; blocked?: string[]; }, starts_at?: string, tags?: string[]): { id: string; created_at: string; expires_at: string; name: string; permissions: api_key_permission[]; project_ids: string[]; source_ip_rule: source_ip_rule_response; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n\n**post** `/v1/api_keys`\n\nCreate a new API key\n\n### Parameters\n\n- `expires_at: string`\n When the API Key expires and is no longer valid.\n\n- `name: string`\n API Key name.\n\n- `permissions: { permission: 'read' | 'edit'; resource_type: string; }[]`\n Scoped permissions for this API key. At least one is required.\n\n- `project_ids: string[]`\n Project IDs this API key is scoped to. At least one is required.\n\n- `source_ip_rule?: { allowed?: string[]; blocked?: string[]; }`\n IP filter rules.\n - `allowed?: string[]`\n List of IPv4 CIDR addresses to allow.\n - `blocked?: string[]`\n List of IPv4 CIDR addresses to deny.\n\n- `starts_at?: string`\n When the API Key starts to be valid.\n\n- `tags?: string[]`\n Tags to attach to the API Key.\n\n### Returns\n\n- `{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n API Key response.\n\n - `id: string`\n - `created_at: string`\n - `expires_at: string`\n - `name: string`\n - `permissions: { permission: 'read' | 'edit'; resource_type: string; }[]`\n - `project_ids: string[]`\n - `source_ip_rule: { allowed: string[]; blocked: string[]; }`\n - `status: 'active' | 'inactive' | 'expired'`\n - `tags: string[]`\n - `updated_at: string`\n - `key?: string`\n - `starts_at?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst apiKey = await client.apiKeys.create({\n expires_at: '2025-12-31T23:59:59Z',\n name: 'My API Key',\n permissions: [{ permission: 'edit', resource_type: 'vm' }],\n project_ids: ['123e4567-e89b-12d3-a456-426614174000', '123e4567-e89b-12d3-a456-426614174001'],\n});\n\nconsole.log(apiKey);\n```",
|
|
111
111
|
perLanguage: {
|
|
112
|
-
|
|
113
|
-
method: '
|
|
114
|
-
example: "nirvana
|
|
112
|
+
typescript: {
|
|
113
|
+
method: 'client.apiKeys.create',
|
|
114
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst apiKey = await client.apiKeys.create({\n expires_at: '2025-12-31T23:59:59Z',\n name: 'My API Key',\n permissions: [{ permission: 'edit', resource_type: 'vm' }],\n project_ids: ['123e4567-e89b-12d3-a456-426614174000', '123e4567-e89b-12d3-a456-426614174001'],\n});\n\nconsole.log(apiKey.id);",
|
|
115
115
|
},
|
|
116
116
|
go: {
|
|
117
117
|
method: 'client.APIKeys.New',
|
|
118
118
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\t"time"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/api_keys"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tapiKey, err := client.APIKeys.New(context.TODO(), api_keys.APIKeyNewParams{\n\t\tExpiresAt: time.Now(),\n\t\tName: "My API Key",\n\t\tPermissions: []api_keys.APIKeyNewParamsPermission{{\n\t\t\tPermission: api_keys.APIPermissionLevelEdit,\n\t\t\tResourceType: api_keys.APIPermissionResourceTypeVM,\n\t\t}},\n\t\tProjectIDs: []string{"123e4567-e89b-12d3-a456-426614174000", "123e4567-e89b-12d3-a456-426614174001"},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", apiKey.ID)\n}\n',
|
|
119
119
|
},
|
|
120
|
+
cli: {
|
|
121
|
+
method: 'api_keys create',
|
|
122
|
+
example: "nirvana api-keys create \\\n --api-key 'My API Key' \\\n --expires-at \"'2025-12-31T23:59:59Z'\" \\\n --name 'My API Key' \\\n --permission '{permission: edit, resource_type: vm}' \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --project-id 123e4567-e89b-12d3-a456-426614174001",
|
|
123
|
+
},
|
|
120
124
|
http: {
|
|
121
125
|
example: 'curl https://api.nirvanalabs.io/v1/api_keys \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "expires_at": "2025-12-31T23:59:59Z",\n "name": "My API Key",\n "permissions": [\n {\n "permission": "edit",\n "resource_type": "vm"\n }\n ],\n "project_ids": [\n "123e4567-e89b-12d3-a456-426614174000",\n "123e4567-e89b-12d3-a456-426614174001"\n ],\n "starts_at": "2025-01-01T00:00:00Z",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
122
126
|
},
|
|
123
|
-
typescript: {
|
|
124
|
-
method: 'client.apiKeys.create',
|
|
125
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst apiKey = await client.apiKeys.create({\n expires_at: '2025-12-31T23:59:59Z',\n name: 'My API Key',\n permissions: [{ permission: 'edit', resource_type: 'vm' }],\n project_ids: ['123e4567-e89b-12d3-a456-426614174000', '123e4567-e89b-12d3-a456-426614174001'],\n});\n\nconsole.log(apiKey.id);",
|
|
126
|
-
},
|
|
127
127
|
},
|
|
128
128
|
},
|
|
129
129
|
{
|
|
@@ -138,21 +138,21 @@ const EMBEDDED_METHODS = [
|
|
|
138
138
|
response: "{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }",
|
|
139
139
|
markdown: "## get\n\n`client.apiKeys.get(api_key_id: string): { id: string; created_at: string; expires_at: string; name: string; permissions: api_key_permission[]; project_ids: string[]; source_ip_rule: source_ip_rule_response; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n\n**get** `/v1/api_keys/{api_key_id}`\n\nGet details about an API key\n\n### Parameters\n\n- `api_key_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n API Key response.\n\n - `id: string`\n - `created_at: string`\n - `expires_at: string`\n - `name: string`\n - `permissions: { permission: 'read' | 'edit'; resource_type: string; }[]`\n - `project_ids: string[]`\n - `source_ip_rule: { allowed: string[]; blocked: string[]; }`\n - `status: 'active' | 'inactive' | 'expired'`\n - `tags: string[]`\n - `updated_at: string`\n - `key?: string`\n - `starts_at?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst apiKey = await client.apiKeys.get('api_key_id');\n\nconsole.log(apiKey);\n```",
|
|
140
140
|
perLanguage: {
|
|
141
|
-
|
|
142
|
-
method: '
|
|
143
|
-
example: "nirvana
|
|
141
|
+
typescript: {
|
|
142
|
+
method: 'client.apiKeys.get',
|
|
143
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst apiKey = await client.apiKeys.get('api_key_id');\n\nconsole.log(apiKey.id);",
|
|
144
144
|
},
|
|
145
145
|
go: {
|
|
146
146
|
method: 'client.APIKeys.Get',
|
|
147
147
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tapiKey, err := client.APIKeys.Get(context.TODO(), "api_key_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", apiKey.ID)\n}\n',
|
|
148
148
|
},
|
|
149
|
+
cli: {
|
|
150
|
+
method: 'api_keys get',
|
|
151
|
+
example: "nirvana api-keys get \\\n --api-key 'My API Key' \\\n --api-key-id api_key_id",
|
|
152
|
+
},
|
|
149
153
|
http: {
|
|
150
154
|
example: 'curl https://api.nirvanalabs.io/v1/api_keys/$API_KEY_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
151
155
|
},
|
|
152
|
-
typescript: {
|
|
153
|
-
method: 'client.apiKeys.get',
|
|
154
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst apiKey = await client.apiKeys.get('api_key_id');\n\nconsole.log(apiKey.id);",
|
|
155
|
-
},
|
|
156
156
|
},
|
|
157
157
|
},
|
|
158
158
|
{
|
|
@@ -174,21 +174,21 @@ const EMBEDDED_METHODS = [
|
|
|
174
174
|
response: "{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }",
|
|
175
175
|
markdown: "## update\n\n`client.apiKeys.update(api_key_id: string, name?: string, permissions?: { permission: 'read' | 'edit'; resource_type: string; }[], project_ids?: string[], source_ip_rule?: { allowed?: string[]; blocked?: string[]; }, tags?: string[]): { id: string; created_at: string; expires_at: string; name: string; permissions: api_key_permission[]; project_ids: string[]; source_ip_rule: source_ip_rule_response; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n\n**patch** `/v1/api_keys/{api_key_id}`\n\nUpdate an existing API key\n\n### Parameters\n\n- `api_key_id: string`\n\n- `name?: string`\n API Key name.\n\n- `permissions?: { permission: 'read' | 'edit'; resource_type: string; }[]`\n Scoped permissions for this API key. When provided, replaces the entire set. At least one is required.\n\n- `project_ids?: string[]`\n Project IDs this API key is scoped to. When provided, replaces the entire set. At least one is required.\n\n- `source_ip_rule?: { allowed?: string[]; blocked?: string[]; }`\n IP filter rules.\n - `allowed?: string[]`\n List of IPv4 CIDR addresses to allow.\n - `blocked?: string[]`\n List of IPv4 CIDR addresses to deny.\n\n- `tags?: string[]`\n Tags to attach to the API Key.\n\n### Returns\n\n- `{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n API Key response.\n\n - `id: string`\n - `created_at: string`\n - `expires_at: string`\n - `name: string`\n - `permissions: { permission: 'read' | 'edit'; resource_type: string; }[]`\n - `project_ids: string[]`\n - `source_ip_rule: { allowed: string[]; blocked: string[]; }`\n - `status: 'active' | 'inactive' | 'expired'`\n - `tags: string[]`\n - `updated_at: string`\n - `key?: string`\n - `starts_at?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst apiKey = await client.apiKeys.update('api_key_id');\n\nconsole.log(apiKey);\n```",
|
|
176
176
|
perLanguage: {
|
|
177
|
-
|
|
178
|
-
method: '
|
|
179
|
-
example: "nirvana
|
|
177
|
+
typescript: {
|
|
178
|
+
method: 'client.apiKeys.update',
|
|
179
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst apiKey = await client.apiKeys.update('api_key_id');\n\nconsole.log(apiKey.id);",
|
|
180
180
|
},
|
|
181
181
|
go: {
|
|
182
182
|
method: 'client.APIKeys.Update',
|
|
183
183
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/api_keys"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tapiKey, err := client.APIKeys.Update(\n\t\tcontext.TODO(),\n\t\t"api_key_id",\n\t\tapi_keys.APIKeyUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", apiKey.ID)\n}\n',
|
|
184
184
|
},
|
|
185
|
+
cli: {
|
|
186
|
+
method: 'api_keys update',
|
|
187
|
+
example: "nirvana api-keys update \\\n --api-key 'My API Key' \\\n --api-key-id api_key_id",
|
|
188
|
+
},
|
|
185
189
|
http: {
|
|
186
190
|
example: 'curl https://api.nirvanalabs.io/v1/api_keys/$API_KEY_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Updated API Key",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
187
191
|
},
|
|
188
|
-
typescript: {
|
|
189
|
-
method: 'client.apiKeys.update',
|
|
190
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst apiKey = await client.apiKeys.update('api_key_id');\n\nconsole.log(apiKey.id);",
|
|
191
|
-
},
|
|
192
192
|
},
|
|
193
193
|
},
|
|
194
194
|
{
|
|
@@ -202,21 +202,21 @@ const EMBEDDED_METHODS = [
|
|
|
202
202
|
params: ['api_key_id: string;'],
|
|
203
203
|
markdown: "## delete\n\n`client.apiKeys.delete(api_key_id: string): void`\n\n**delete** `/v1/api_keys/{api_key_id}`\n\nDelete an API key\n\n### Parameters\n\n- `api_key_id: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.apiKeys.delete('api_key_id')\n```",
|
|
204
204
|
perLanguage: {
|
|
205
|
-
|
|
206
|
-
method: '
|
|
207
|
-
example: "nirvana
|
|
205
|
+
typescript: {
|
|
206
|
+
method: 'client.apiKeys.delete',
|
|
207
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.apiKeys.delete('api_key_id');",
|
|
208
208
|
},
|
|
209
209
|
go: {
|
|
210
210
|
method: 'client.APIKeys.Delete',
|
|
211
211
|
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.APIKeys.Delete(context.TODO(), "api_key_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
212
212
|
},
|
|
213
|
+
cli: {
|
|
214
|
+
method: 'api_keys delete',
|
|
215
|
+
example: "nirvana api-keys delete \\\n --api-key 'My API Key' \\\n --api-key-id api_key_id",
|
|
216
|
+
},
|
|
213
217
|
http: {
|
|
214
218
|
example: 'curl https://api.nirvanalabs.io/v1/api_keys/$API_KEY_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
215
219
|
},
|
|
216
|
-
typescript: {
|
|
217
|
-
method: 'client.apiKeys.delete',
|
|
218
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.apiKeys.delete('api_key_id');",
|
|
219
|
-
},
|
|
220
220
|
},
|
|
221
221
|
},
|
|
222
222
|
{
|
|
@@ -231,21 +231,21 @@ const EMBEDDED_METHODS = [
|
|
|
231
231
|
response: "{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }",
|
|
232
232
|
markdown: "## list\n\n`client.apiKeys.list(cursor?: string, limit?: number): { id: string; created_at: string; expires_at: string; name: string; permissions: api_key_permission[]; project_ids: string[]; source_ip_rule: source_ip_rule_response; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n\n**get** `/v1/api_keys`\n\nList all API keys\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; expires_at: string; name: string; permissions: { permission: api_permission_level; resource_type: api_permission_resource_type; }[]; project_ids: string[]; source_ip_rule: { allowed: string[]; blocked: string[]; }; status: 'active' | 'inactive' | 'expired'; tags: string[]; updated_at: string; key?: string; starts_at?: string; }`\n API Key response.\n\n - `id: string`\n - `created_at: string`\n - `expires_at: string`\n - `name: string`\n - `permissions: { permission: 'read' | 'edit'; resource_type: string; }[]`\n - `project_ids: string[]`\n - `source_ip_rule: { allowed: string[]; blocked: string[]; }`\n - `status: 'active' | 'inactive' | 'expired'`\n - `tags: string[]`\n - `updated_at: string`\n - `key?: string`\n - `starts_at?: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const apiKey of client.apiKeys.list()) {\n console.log(apiKey);\n}\n```",
|
|
233
233
|
perLanguage: {
|
|
234
|
-
|
|
235
|
-
method: '
|
|
236
|
-
example: "nirvana
|
|
234
|
+
typescript: {
|
|
235
|
+
method: 'client.apiKeys.list',
|
|
236
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const apiKey of client.apiKeys.list()) {\n console.log(apiKey.id);\n}",
|
|
237
237
|
},
|
|
238
238
|
go: {
|
|
239
239
|
method: 'client.APIKeys.List',
|
|
240
240
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/api_keys"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.APIKeys.List(context.TODO(), api_keys.APIKeyListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
241
241
|
},
|
|
242
|
+
cli: {
|
|
243
|
+
method: 'api_keys list',
|
|
244
|
+
example: "nirvana api-keys list \\\n --api-key 'My API Key'",
|
|
245
|
+
},
|
|
242
246
|
http: {
|
|
243
247
|
example: 'curl https://api.nirvanalabs.io/v1/api_keys \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
244
248
|
},
|
|
245
|
-
typescript: {
|
|
246
|
-
method: 'client.apiKeys.list',
|
|
247
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const apiKey of client.apiKeys.list()) {\n console.log(apiKey.id);\n}",
|
|
248
|
-
},
|
|
249
249
|
},
|
|
250
250
|
},
|
|
251
251
|
{
|
|
@@ -260,21 +260,21 @@ const EMBEDDED_METHODS = [
|
|
|
260
260
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
261
261
|
markdown: "## get\n\n`client.operations.get(operation_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**get** `/v1/operations/{operation_id}`\n\nGet details about a specific operation\n\n### Parameters\n\n- `operation_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.operations.get('operation_id');\n\nconsole.log(operation);\n```",
|
|
262
262
|
perLanguage: {
|
|
263
|
-
|
|
264
|
-
method: 'operations
|
|
265
|
-
example: "nirvana
|
|
263
|
+
typescript: {
|
|
264
|
+
method: 'client.operations.get',
|
|
265
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.operations.get('operation_id');\n\nconsole.log(operation.id);",
|
|
266
266
|
},
|
|
267
267
|
go: {
|
|
268
268
|
method: 'client.Operations.Get',
|
|
269
269
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Operations.Get(context.TODO(), "operation_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
270
270
|
},
|
|
271
|
+
cli: {
|
|
272
|
+
method: 'operations get',
|
|
273
|
+
example: "nirvana operations get \\\n --api-key 'My API Key' \\\n --operation-id operation_id",
|
|
274
|
+
},
|
|
271
275
|
http: {
|
|
272
276
|
example: 'curl https://api.nirvanalabs.io/v1/operations/$OPERATION_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
273
277
|
},
|
|
274
|
-
typescript: {
|
|
275
|
-
method: 'client.operations.get',
|
|
276
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.operations.get('operation_id');\n\nconsole.log(operation.id);",
|
|
277
|
-
},
|
|
278
278
|
},
|
|
279
279
|
},
|
|
280
280
|
{
|
|
@@ -289,21 +289,21 @@ const EMBEDDED_METHODS = [
|
|
|
289
289
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
290
290
|
markdown: "## list\n\n`client.operations.list(project_id: string, cursor?: string, limit?: number): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**get** `/v1/operations`\n\nList all operations\n\n### Parameters\n\n- `project_id: string`\n Project ID of resources to request\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const operation of client.operations.list({ project_id: 'project_id' })) {\n console.log(operation);\n}\n```",
|
|
291
291
|
perLanguage: {
|
|
292
|
-
|
|
293
|
-
method: 'operations
|
|
294
|
-
example: "nirvana
|
|
292
|
+
typescript: {
|
|
293
|
+
method: 'client.operations.list',
|
|
294
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const operation of client.operations.list({ project_id: 'project_id' })) {\n console.log(operation.id);\n}",
|
|
295
295
|
},
|
|
296
296
|
go: {
|
|
297
297
|
method: 'client.Operations.List',
|
|
298
298
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/operations"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Operations.List(context.TODO(), operations.OperationListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
299
299
|
},
|
|
300
|
+
cli: {
|
|
301
|
+
method: 'operations list',
|
|
302
|
+
example: "nirvana operations list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
303
|
+
},
|
|
300
304
|
http: {
|
|
301
305
|
example: 'curl https://api.nirvanalabs.io/v1/operations \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
302
306
|
},
|
|
303
|
-
typescript: {
|
|
304
|
-
method: 'client.operations.list',
|
|
305
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const operation of client.operations.list({ project_id: 'project_id' })) {\n console.log(operation.id);\n}",
|
|
306
|
-
},
|
|
307
307
|
},
|
|
308
308
|
},
|
|
309
309
|
{
|
|
@@ -318,21 +318,21 @@ const EMBEDDED_METHODS = [
|
|
|
318
318
|
response: "{ 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; }",
|
|
319
319
|
markdown: "## 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```",
|
|
320
320
|
perLanguage: {
|
|
321
|
-
|
|
322
|
-
method: 'organizations
|
|
323
|
-
example: "nirvana
|
|
321
|
+
typescript: {
|
|
322
|
+
method: 'client.organizations.create',
|
|
323
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organization = await client.organizations.create({ name: 'My Organization' });\n\nconsole.log(organization.id);",
|
|
324
324
|
},
|
|
325
325
|
go: {
|
|
326
326
|
method: 'client.Organizations.New',
|
|
327
327
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/organizations"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\torganization, err := client.Organizations.New(context.TODO(), organizations.OrganizationNewParams{\n\t\tName: "My Organization",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", organization.ID)\n}\n',
|
|
328
328
|
},
|
|
329
|
+
cli: {
|
|
330
|
+
method: 'organizations create',
|
|
331
|
+
example: "nirvana organizations create \\\n --api-key 'My API Key' \\\n --name 'My Organization'",
|
|
332
|
+
},
|
|
329
333
|
http: {
|
|
330
334
|
example: 'curl https://api.nirvanalabs.io/v1/organizations \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Organization"\n }\'',
|
|
331
335
|
},
|
|
332
|
-
typescript: {
|
|
333
|
-
method: 'client.organizations.create',
|
|
334
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organization = await client.organizations.create({ name: 'My Organization' });\n\nconsole.log(organization.id);",
|
|
335
|
-
},
|
|
336
336
|
},
|
|
337
337
|
},
|
|
338
338
|
{
|
|
@@ -347,21 +347,21 @@ const EMBEDDED_METHODS = [
|
|
|
347
347
|
response: "{ 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; }",
|
|
348
348
|
markdown: "## 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```",
|
|
349
349
|
perLanguage: {
|
|
350
|
-
|
|
351
|
-
method: 'organizations
|
|
352
|
-
example: "nirvana
|
|
350
|
+
typescript: {
|
|
351
|
+
method: 'client.organizations.get',
|
|
352
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organization = await client.organizations.get('organization_id');\n\nconsole.log(organization.id);",
|
|
353
353
|
},
|
|
354
354
|
go: {
|
|
355
355
|
method: 'client.Organizations.Get',
|
|
356
356
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\torganization, err := client.Organizations.Get(context.TODO(), "organization_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", organization.ID)\n}\n',
|
|
357
357
|
},
|
|
358
|
+
cli: {
|
|
359
|
+
method: 'organizations get',
|
|
360
|
+
example: "nirvana organizations get \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
|
|
361
|
+
},
|
|
358
362
|
http: {
|
|
359
363
|
example: 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
360
364
|
},
|
|
361
|
-
typescript: {
|
|
362
|
-
method: 'client.organizations.get',
|
|
363
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organization = await client.organizations.get('organization_id');\n\nconsole.log(organization.id);",
|
|
364
|
-
},
|
|
365
365
|
},
|
|
366
366
|
},
|
|
367
367
|
{
|
|
@@ -376,21 +376,21 @@ const EMBEDDED_METHODS = [
|
|
|
376
376
|
response: "{ 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; }",
|
|
377
377
|
markdown: "## 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```",
|
|
378
378
|
perLanguage: {
|
|
379
|
-
|
|
380
|
-
method: 'organizations
|
|
381
|
-
example: "nirvana
|
|
379
|
+
typescript: {
|
|
380
|
+
method: 'client.organizations.update',
|
|
381
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organization = await client.organizations.update('organization_id');\n\nconsole.log(organization.id);",
|
|
382
382
|
},
|
|
383
383
|
go: {
|
|
384
384
|
method: 'client.Organizations.Update',
|
|
385
385
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/organizations"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\torganization, err := client.Organizations.Update(\n\t\tcontext.TODO(),\n\t\t"organization_id",\n\t\torganizations.OrganizationUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", organization.ID)\n}\n',
|
|
386
386
|
},
|
|
387
|
+
cli: {
|
|
388
|
+
method: 'organizations update',
|
|
389
|
+
example: "nirvana organizations update \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
|
|
390
|
+
},
|
|
387
391
|
http: {
|
|
388
392
|
example: 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Updated Organization"\n }\'',
|
|
389
393
|
},
|
|
390
|
-
typescript: {
|
|
391
|
-
method: 'client.organizations.update',
|
|
392
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organization = await client.organizations.update('organization_id');\n\nconsole.log(organization.id);",
|
|
393
|
-
},
|
|
394
394
|
},
|
|
395
395
|
},
|
|
396
396
|
{
|
|
@@ -405,21 +405,21 @@ const EMBEDDED_METHODS = [
|
|
|
405
405
|
response: "{ 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; }",
|
|
406
406
|
markdown: "## 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```",
|
|
407
407
|
perLanguage: {
|
|
408
|
-
|
|
409
|
-
method: 'organizations
|
|
410
|
-
example: "nirvana
|
|
408
|
+
typescript: {
|
|
409
|
+
method: 'client.organizations.list',
|
|
410
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const organization of client.organizations.list()) {\n console.log(organization.id);\n}",
|
|
411
411
|
},
|
|
412
412
|
go: {
|
|
413
413
|
method: 'client.Organizations.List',
|
|
414
414
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/organizations"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Organizations.List(context.TODO(), organizations.OrganizationListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
415
415
|
},
|
|
416
|
+
cli: {
|
|
417
|
+
method: 'organizations list',
|
|
418
|
+
example: "nirvana organizations list \\\n --api-key 'My API Key'",
|
|
419
|
+
},
|
|
416
420
|
http: {
|
|
417
421
|
example: 'curl https://api.nirvanalabs.io/v1/organizations \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
418
422
|
},
|
|
419
|
-
typescript: {
|
|
420
|
-
method: 'client.organizations.list',
|
|
421
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const organization of client.organizations.list()) {\n console.log(organization.id);\n}",
|
|
422
|
-
},
|
|
423
423
|
},
|
|
424
424
|
},
|
|
425
425
|
{
|
|
@@ -433,21 +433,21 @@ const EMBEDDED_METHODS = [
|
|
|
433
433
|
params: ['organization_id: string;'],
|
|
434
434
|
markdown: "## leave\n\n`client.organizations.leave(organization_id: string): void`\n\n**post** `/v1/organizations/{organization_id}/leave`\n\nLeave an Organization\n\n### Parameters\n\n- `organization_id: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.organizations.leave('organization_id')\n```",
|
|
435
435
|
perLanguage: {
|
|
436
|
-
|
|
437
|
-
method: 'organizations
|
|
438
|
-
example: "nirvana
|
|
436
|
+
typescript: {
|
|
437
|
+
method: 'client.organizations.leave',
|
|
438
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.organizations.leave('organization_id');",
|
|
439
439
|
},
|
|
440
440
|
go: {
|
|
441
441
|
method: 'client.Organizations.Leave',
|
|
442
442
|
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Organizations.Leave(context.TODO(), "organization_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
443
443
|
},
|
|
444
|
+
cli: {
|
|
445
|
+
method: 'organizations leave',
|
|
446
|
+
example: "nirvana organizations leave \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
|
|
447
|
+
},
|
|
444
448
|
http: {
|
|
445
449
|
example: 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/leave \\\n -X POST \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
446
450
|
},
|
|
447
|
-
typescript: {
|
|
448
|
-
method: 'client.organizations.leave',
|
|
449
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.organizations.leave('organization_id');",
|
|
450
|
-
},
|
|
451
451
|
},
|
|
452
452
|
},
|
|
453
453
|
{
|
|
@@ -462,21 +462,21 @@ const EMBEDDED_METHODS = [
|
|
|
462
462
|
response: "{ id: string; created_at: string; organization_id: string; role: 'owner' | 'member'; updated_at: string; user_id: string; }",
|
|
463
463
|
markdown: "## get\n\n`client.organizations.memberships.get(organization_id: string, membership_id: string): { id: string; created_at: string; organization_id: string; role: 'owner' | 'member'; updated_at: string; user_id: string; }`\n\n**get** `/v1/organizations/{organization_id}/memberships/{membership_id}`\n\nGet details about an organization membership\n\n### Parameters\n\n- `organization_id: string`\n\n- `membership_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; organization_id: string; role: 'owner' | 'member'; updated_at: string; user_id: string; }`\n Organization membership details.\n\n - `id: string`\n - `created_at: string`\n - `organization_id: string`\n - `role: 'owner' | 'member'`\n - `updated_at: string`\n - `user_id: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst organizationMembership = await client.organizations.memberships.get('membership_id', { organization_id: 'organization_id' });\n\nconsole.log(organizationMembership);\n```",
|
|
464
464
|
perLanguage: {
|
|
465
|
-
|
|
466
|
-
method: 'memberships
|
|
467
|
-
example: "nirvana
|
|
465
|
+
typescript: {
|
|
466
|
+
method: 'client.organizations.memberships.get',
|
|
467
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organizationMembership = await client.organizations.memberships.get('membership_id', {\n organization_id: 'organization_id',\n});\n\nconsole.log(organizationMembership.id);",
|
|
468
468
|
},
|
|
469
469
|
go: {
|
|
470
470
|
method: 'client.Organizations.Memberships.Get',
|
|
471
471
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\torganizationMembership, err := client.Organizations.Memberships.Get(\n\t\tcontext.TODO(),\n\t\t"organization_id",\n\t\t"membership_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", organizationMembership.ID)\n}\n',
|
|
472
472
|
},
|
|
473
|
+
cli: {
|
|
474
|
+
method: 'memberships get',
|
|
475
|
+
example: "nirvana organizations:memberships get \\\n --api-key 'My API Key' \\\n --organization-id organization_id \\\n --membership-id membership_id",
|
|
476
|
+
},
|
|
473
477
|
http: {
|
|
474
478
|
example: 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/memberships/$MEMBERSHIP_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
475
479
|
},
|
|
476
|
-
typescript: {
|
|
477
|
-
method: 'client.organizations.memberships.get',
|
|
478
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst organizationMembership = await client.organizations.memberships.get('membership_id', {\n organization_id: 'organization_id',\n});\n\nconsole.log(organizationMembership.id);",
|
|
479
|
-
},
|
|
480
480
|
},
|
|
481
481
|
},
|
|
482
482
|
{
|
|
@@ -491,21 +491,21 @@ const EMBEDDED_METHODS = [
|
|
|
491
491
|
response: "{ id: string; created_at: string; organization_id: string; role: 'owner' | 'member'; updated_at: string; user_id: string; }",
|
|
492
492
|
markdown: "## list\n\n`client.organizations.memberships.list(organization_id: string, cursor?: string, limit?: number): { id: string; created_at: string; organization_id: string; role: 'owner' | 'member'; updated_at: string; user_id: string; }`\n\n**get** `/v1/organizations/{organization_id}/memberships`\n\nList all memberships for an organization\n\n### Parameters\n\n- `organization_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; organization_id: string; role: 'owner' | 'member'; updated_at: string; user_id: string; }`\n Organization membership details.\n\n - `id: string`\n - `created_at: string`\n - `organization_id: string`\n - `role: 'owner' | 'member'`\n - `updated_at: string`\n - `user_id: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const organizationMembership of client.organizations.memberships.list('organization_id')) {\n console.log(organizationMembership);\n}\n```",
|
|
493
493
|
perLanguage: {
|
|
494
|
-
|
|
495
|
-
method: 'memberships
|
|
496
|
-
example: "nirvana
|
|
494
|
+
typescript: {
|
|
495
|
+
method: 'client.organizations.memberships.list',
|
|
496
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const organizationMembership of client.organizations.memberships.list(\n 'organization_id',\n)) {\n console.log(organizationMembership.id);\n}",
|
|
497
497
|
},
|
|
498
498
|
go: {
|
|
499
499
|
method: 'client.Organizations.Memberships.List',
|
|
500
500
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/organizations"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Organizations.Memberships.List(\n\t\tcontext.TODO(),\n\t\t"organization_id",\n\t\torganizations.MembershipListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
501
501
|
},
|
|
502
|
+
cli: {
|
|
503
|
+
method: 'memberships list',
|
|
504
|
+
example: "nirvana organizations:memberships list \\\n --api-key 'My API Key' \\\n --organization-id organization_id",
|
|
505
|
+
},
|
|
502
506
|
http: {
|
|
503
507
|
example: 'curl https://api.nirvanalabs.io/v1/organizations/$ORGANIZATION_ID/memberships \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
504
508
|
},
|
|
505
|
-
typescript: {
|
|
506
|
-
method: 'client.organizations.memberships.list',
|
|
507
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const organizationMembership of client.organizations.memberships.list(\n 'organization_id',\n)) {\n console.log(organizationMembership.id);\n}",
|
|
508
|
-
},
|
|
509
509
|
},
|
|
510
510
|
},
|
|
511
511
|
{
|
|
@@ -520,21 +520,21 @@ const EMBEDDED_METHODS = [
|
|
|
520
520
|
response: "{ 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; }; }",
|
|
521
521
|
markdown: "## 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```",
|
|
522
522
|
perLanguage: {
|
|
523
|
-
|
|
524
|
-
method: 'quotas
|
|
525
|
-
example: "nirvana
|
|
523
|
+
typescript: {
|
|
524
|
+
method: 'client.quotas.get',
|
|
525
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst quota = await client.quotas.get('us-sva-1');\n\nconsole.log(quota.compute);",
|
|
526
526
|
},
|
|
527
527
|
go: {
|
|
528
528
|
method: 'client.Quotas.Get',
|
|
529
529
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\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',
|
|
530
530
|
},
|
|
531
|
+
cli: {
|
|
532
|
+
method: 'quotas get',
|
|
533
|
+
example: "nirvana quotas get \\\n --api-key 'My API Key' \\\n --region us-sva-1",
|
|
534
|
+
},
|
|
531
535
|
http: {
|
|
532
536
|
example: 'curl https://api.nirvanalabs.io/v1/quotas/$REGION \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
533
537
|
},
|
|
534
|
-
typescript: {
|
|
535
|
-
method: 'client.quotas.get',
|
|
536
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst quota = await client.quotas.get('us-sva-1');\n\nconsole.log(quota.compute);",
|
|
537
|
-
},
|
|
538
538
|
},
|
|
539
539
|
},
|
|
540
540
|
{
|
|
@@ -548,21 +548,21 @@ const EMBEDDED_METHODS = [
|
|
|
548
548
|
response: '{ 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; }; }',
|
|
549
549
|
markdown: "## 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```",
|
|
550
550
|
perLanguage: {
|
|
551
|
-
|
|
552
|
-
method: 'quotas
|
|
553
|
-
example: "nirvana
|
|
551
|
+
typescript: {
|
|
552
|
+
method: 'client.quotas.list',
|
|
553
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst quotaList = await client.quotas.list();\n\nconsole.log(quotaList.items);",
|
|
554
554
|
},
|
|
555
555
|
go: {
|
|
556
556
|
method: 'client.Quotas.List',
|
|
557
557
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\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',
|
|
558
558
|
},
|
|
559
|
+
cli: {
|
|
560
|
+
method: 'quotas list',
|
|
561
|
+
example: "nirvana quotas list \\\n --api-key 'My API Key'",
|
|
562
|
+
},
|
|
559
563
|
http: {
|
|
560
564
|
example: 'curl https://api.nirvanalabs.io/v1/quotas \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
561
565
|
},
|
|
562
|
-
typescript: {
|
|
563
|
-
method: 'client.quotas.list',
|
|
564
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst quotaList = await client.quotas.list();\n\nconsole.log(quotaList.items);",
|
|
565
|
-
},
|
|
566
566
|
},
|
|
567
567
|
},
|
|
568
568
|
{
|
|
@@ -577,21 +577,21 @@ const EMBEDDED_METHODS = [
|
|
|
577
577
|
response: '{ 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; }; }',
|
|
578
578
|
markdown: "## get\n\n`client.auditLogs.get(audit_log_id: string): { id: string; action: string; actor: audit_log_actor; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: 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```",
|
|
579
579
|
perLanguage: {
|
|
580
|
-
|
|
581
|
-
method: '
|
|
582
|
-
example: "nirvana
|
|
580
|
+
typescript: {
|
|
581
|
+
method: 'client.auditLogs.get',
|
|
582
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst auditLog = await client.auditLogs.get('audit_log_id');\n\nconsole.log(auditLog.id);",
|
|
583
583
|
},
|
|
584
584
|
go: {
|
|
585
585
|
method: 'client.AuditLogs.Get',
|
|
586
586
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tauditLog, err := client.AuditLogs.Get(context.TODO(), "audit_log_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", auditLog.ID)\n}\n',
|
|
587
587
|
},
|
|
588
|
+
cli: {
|
|
589
|
+
method: 'audit_logs get',
|
|
590
|
+
example: "nirvana audit-logs get \\\n --api-key 'My API Key' \\\n --audit-log-id audit_log_id",
|
|
591
|
+
},
|
|
588
592
|
http: {
|
|
589
593
|
example: 'curl https://api.nirvanalabs.io/v1/audit_logs/$AUDIT_LOG_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
590
594
|
},
|
|
591
|
-
typescript: {
|
|
592
|
-
method: 'client.auditLogs.get',
|
|
593
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst auditLog = await client.auditLogs.get('audit_log_id');\n\nconsole.log(auditLog.id);",
|
|
594
|
-
},
|
|
595
595
|
},
|
|
596
596
|
},
|
|
597
597
|
{
|
|
@@ -606,21 +606,21 @@ const EMBEDDED_METHODS = [
|
|
|
606
606
|
response: '{ 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; }; }',
|
|
607
607
|
markdown: "## list\n\n`client.auditLogs.list(cursor?: string, limit?: number): { id: string; action: string; actor: audit_log_actor; client_ip: string; created_at: string; method: string; path: string; status_code: number; user_agent: string; target?: 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```",
|
|
608
608
|
perLanguage: {
|
|
609
|
-
|
|
610
|
-
method: '
|
|
611
|
-
example: "nirvana
|
|
609
|
+
typescript: {
|
|
610
|
+
method: 'client.auditLogs.list',
|
|
611
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const auditLog of client.auditLogs.list()) {\n console.log(auditLog.id);\n}",
|
|
612
612
|
},
|
|
613
613
|
go: {
|
|
614
614
|
method: 'client.AuditLogs.List',
|
|
615
615
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/audit_logs"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.AuditLogs.List(context.TODO(), audit_logs.AuditLogListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
616
616
|
},
|
|
617
|
+
cli: {
|
|
618
|
+
method: 'audit_logs list',
|
|
619
|
+
example: "nirvana audit-logs list \\\n --api-key 'My API Key'",
|
|
620
|
+
},
|
|
617
621
|
http: {
|
|
618
622
|
example: 'curl https://api.nirvanalabs.io/v1/audit_logs \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
619
623
|
},
|
|
620
|
-
typescript: {
|
|
621
|
-
method: 'client.auditLogs.list',
|
|
622
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const auditLog of client.auditLogs.list()) {\n console.log(auditLog.id);\n}",
|
|
623
|
-
},
|
|
624
624
|
},
|
|
625
625
|
},
|
|
626
626
|
{
|
|
@@ -635,21 +635,21 @@ const EMBEDDED_METHODS = [
|
|
|
635
635
|
response: '{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }',
|
|
636
636
|
markdown: "## create\n\n`client.projects.create(name: string, tags?: string[]): { id: string; created_at: string; name: string; resources: project_resources; tags: string[]; updated_at: string; }`\n\n**post** `/v1/projects`\n\nCreate a new project\n\n### Parameters\n\n- `name: string`\n Project name.\n\n- `tags?: string[]`\n Tags to attach to the Project.\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }`\n Project response.\n\n - `id: string`\n - `created_at: string`\n - `name: string`\n - `resources: { blockchain: { rpc_nodes_dedicated: number; rpc_nodes_flex: number; }; cloud: { connect_connections: number; nks_clusters: number; nks_node_pools: number; vms: number; volumes: number; vpcs: number; }; }`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst project = await client.projects.create({ name: 'My Project' });\n\nconsole.log(project);\n```",
|
|
637
637
|
perLanguage: {
|
|
638
|
-
|
|
639
|
-
method: 'projects
|
|
640
|
-
example: "nirvana
|
|
638
|
+
typescript: {
|
|
639
|
+
method: 'client.projects.create',
|
|
640
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.projects.create({ name: 'My Project' });\n\nconsole.log(project.id);",
|
|
641
641
|
},
|
|
642
642
|
go: {
|
|
643
643
|
method: 'client.Projects.New',
|
|
644
644
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/projects"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tproject, err := client.Projects.New(context.TODO(), projects.ProjectNewParams{\n\t\tName: "My Project",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", project.ID)\n}\n',
|
|
645
645
|
},
|
|
646
|
+
cli: {
|
|
647
|
+
method: 'projects create',
|
|
648
|
+
example: "nirvana projects create \\\n --api-key 'My API Key' \\\n --name 'My Project'",
|
|
649
|
+
},
|
|
646
650
|
http: {
|
|
647
651
|
example: 'curl https://api.nirvanalabs.io/v1/projects \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Project",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
648
652
|
},
|
|
649
|
-
typescript: {
|
|
650
|
-
method: 'client.projects.create',
|
|
651
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.projects.create({ name: 'My Project' });\n\nconsole.log(project.id);",
|
|
652
|
-
},
|
|
653
653
|
},
|
|
654
654
|
},
|
|
655
655
|
{
|
|
@@ -664,21 +664,21 @@ const EMBEDDED_METHODS = [
|
|
|
664
664
|
response: '{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }',
|
|
665
665
|
markdown: "## get\n\n`client.projects.get(project_id: string): { id: string; created_at: string; name: string; resources: project_resources; tags: string[]; updated_at: string; }`\n\n**get** `/v1/projects/{project_id}`\n\nGet details about a project\n\n### Parameters\n\n- `project_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }`\n Project response.\n\n - `id: string`\n - `created_at: string`\n - `name: string`\n - `resources: { blockchain: { rpc_nodes_dedicated: number; rpc_nodes_flex: number; }; cloud: { connect_connections: number; nks_clusters: number; nks_node_pools: number; vms: number; volumes: number; vpcs: number; }; }`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst project = await client.projects.get('project_id');\n\nconsole.log(project);\n```",
|
|
666
666
|
perLanguage: {
|
|
667
|
-
|
|
668
|
-
method: 'projects
|
|
669
|
-
example: "nirvana
|
|
667
|
+
typescript: {
|
|
668
|
+
method: 'client.projects.get',
|
|
669
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.projects.get('project_id');\n\nconsole.log(project.id);",
|
|
670
670
|
},
|
|
671
671
|
go: {
|
|
672
672
|
method: 'client.Projects.Get',
|
|
673
673
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tproject, err := client.Projects.Get(context.TODO(), "project_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", project.ID)\n}\n',
|
|
674
674
|
},
|
|
675
|
+
cli: {
|
|
676
|
+
method: 'projects get',
|
|
677
|
+
example: "nirvana projects get \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
678
|
+
},
|
|
675
679
|
http: {
|
|
676
680
|
example: 'curl https://api.nirvanalabs.io/v1/projects/$PROJECT_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
677
681
|
},
|
|
678
|
-
typescript: {
|
|
679
|
-
method: 'client.projects.get',
|
|
680
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.projects.get('project_id');\n\nconsole.log(project.id);",
|
|
681
|
-
},
|
|
682
682
|
},
|
|
683
683
|
},
|
|
684
684
|
{
|
|
@@ -693,21 +693,21 @@ const EMBEDDED_METHODS = [
|
|
|
693
693
|
response: '{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }',
|
|
694
694
|
markdown: "## update\n\n`client.projects.update(project_id: string, name?: string, tags?: string[]): { id: string; created_at: string; name: string; resources: project_resources; tags: string[]; updated_at: string; }`\n\n**patch** `/v1/projects/{project_id}`\n\nUpdate an existing project\n\n### Parameters\n\n- `project_id: string`\n\n- `name?: string`\n Project name.\n\n- `tags?: string[]`\n Tags to attach to the Project.\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }`\n Project response.\n\n - `id: string`\n - `created_at: string`\n - `name: string`\n - `resources: { blockchain: { rpc_nodes_dedicated: number; rpc_nodes_flex: number; }; cloud: { connect_connections: number; nks_clusters: number; nks_node_pools: number; vms: number; volumes: number; vpcs: number; }; }`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst project = await client.projects.update('project_id');\n\nconsole.log(project);\n```",
|
|
695
695
|
perLanguage: {
|
|
696
|
-
|
|
697
|
-
method: 'projects
|
|
698
|
-
example: "nirvana
|
|
696
|
+
typescript: {
|
|
697
|
+
method: 'client.projects.update',
|
|
698
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.projects.update('project_id');\n\nconsole.log(project.id);",
|
|
699
699
|
},
|
|
700
700
|
go: {
|
|
701
701
|
method: 'client.Projects.Update',
|
|
702
702
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/projects"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\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',
|
|
703
703
|
},
|
|
704
|
+
cli: {
|
|
705
|
+
method: 'projects update',
|
|
706
|
+
example: "nirvana projects update \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
707
|
+
},
|
|
704
708
|
http: {
|
|
705
709
|
example: 'curl https://api.nirvanalabs.io/v1/projects/$PROJECT_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "My Updated Project",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
706
710
|
},
|
|
707
|
-
typescript: {
|
|
708
|
-
method: 'client.projects.update',
|
|
709
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.projects.update('project_id');\n\nconsole.log(project.id);",
|
|
710
|
-
},
|
|
711
711
|
},
|
|
712
712
|
},
|
|
713
713
|
{
|
|
@@ -721,21 +721,21 @@ const EMBEDDED_METHODS = [
|
|
|
721
721
|
params: ['project_id: string;'],
|
|
722
722
|
markdown: "## delete\n\n`client.projects.delete(project_id: string): void`\n\n**delete** `/v1/projects/{project_id}`\n\nDelete a project\n\n### Parameters\n\n- `project_id: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.projects.delete('project_id')\n```",
|
|
723
723
|
perLanguage: {
|
|
724
|
-
|
|
725
|
-
method: 'projects
|
|
726
|
-
example: "nirvana
|
|
724
|
+
typescript: {
|
|
725
|
+
method: 'client.projects.delete',
|
|
726
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.projects.delete('project_id');",
|
|
727
727
|
},
|
|
728
728
|
go: {
|
|
729
729
|
method: 'client.Projects.Delete',
|
|
730
730
|
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Projects.Delete(context.TODO(), "project_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
731
731
|
},
|
|
732
|
+
cli: {
|
|
733
|
+
method: 'projects delete',
|
|
734
|
+
example: "nirvana projects delete \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
735
|
+
},
|
|
732
736
|
http: {
|
|
733
737
|
example: 'curl https://api.nirvanalabs.io/v1/projects/$PROJECT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
734
738
|
},
|
|
735
|
-
typescript: {
|
|
736
|
-
method: 'client.projects.delete',
|
|
737
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.projects.delete('project_id');",
|
|
738
|
-
},
|
|
739
739
|
},
|
|
740
740
|
},
|
|
741
741
|
{
|
|
@@ -750,21 +750,21 @@ const EMBEDDED_METHODS = [
|
|
|
750
750
|
response: '{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }',
|
|
751
751
|
markdown: "## list\n\n`client.projects.list(cursor?: string, limit?: number): { id: string; created_at: string; name: string; resources: project_resources; tags: string[]; updated_at: string; }`\n\n**get** `/v1/projects`\n\nList all projects\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; resources: { blockchain: project_blockchain_resources; cloud: project_cloud_resources; }; tags: string[]; updated_at: string; }`\n Project response.\n\n - `id: string`\n - `created_at: string`\n - `name: string`\n - `resources: { blockchain: { rpc_nodes_dedicated: number; rpc_nodes_flex: number; }; cloud: { connect_connections: number; nks_clusters: number; nks_node_pools: number; vms: number; volumes: number; vpcs: number; }; }`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const project of client.projects.list()) {\n console.log(project);\n}\n```",
|
|
752
752
|
perLanguage: {
|
|
753
|
-
|
|
754
|
-
method: 'projects
|
|
755
|
-
example: "nirvana
|
|
753
|
+
typescript: {
|
|
754
|
+
method: 'client.projects.list',
|
|
755
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const project of client.projects.list()) {\n console.log(project.id);\n}",
|
|
756
756
|
},
|
|
757
757
|
go: {
|
|
758
758
|
method: 'client.Projects.List',
|
|
759
759
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/projects"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Projects.List(context.TODO(), projects.ProjectListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
760
760
|
},
|
|
761
|
+
cli: {
|
|
762
|
+
method: 'projects list',
|
|
763
|
+
example: "nirvana projects list \\\n --api-key 'My API Key'",
|
|
764
|
+
},
|
|
761
765
|
http: {
|
|
762
766
|
example: 'curl https://api.nirvanalabs.io/v1/projects \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
763
767
|
},
|
|
764
|
-
typescript: {
|
|
765
|
-
method: 'client.projects.list',
|
|
766
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const project of client.projects.list()) {\n console.log(project.id);\n}",
|
|
767
|
-
},
|
|
768
768
|
},
|
|
769
769
|
},
|
|
770
770
|
{
|
|
@@ -779,21 +779,21 @@ const EMBEDDED_METHODS = [
|
|
|
779
779
|
response: "{ availability: 'live' | 'preview' | 'maintenance' | 'sunset'; compute: { vms: boolean; }; name: string; networking: { connect: boolean; vpcs: boolean; }; nks: { clusters: boolean; }; storage: { abs: boolean; local_nvme: boolean; }; }",
|
|
780
780
|
markdown: "## get\n\n`client.regions.get(name: string): { availability: region_availability; compute: object; name: string; networking: object; nks: object; storage: object; }`\n\n**get** `/v1/regions/{name}`\n\nGet a region by name\n\n### Parameters\n\n- `name: string`\n\n### Returns\n\n- `{ availability: 'live' | 'preview' | 'maintenance' | 'sunset'; compute: { vms: boolean; }; name: string; networking: { connect: boolean; vpcs: boolean; }; nks: { clusters: boolean; }; storage: { abs: boolean; local_nvme: boolean; }; }`\n Region response with product availability.\n\n - `availability: 'live' | 'preview' | 'maintenance' | 'sunset'`\n - `compute: { vms: boolean; }`\n - `name: string`\n - `networking: { connect: boolean; vpcs: boolean; }`\n - `nks: { clusters: boolean; }`\n - `storage: { abs: boolean; local_nvme: boolean; }`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst region = await client.regions.get('us-sva-2');\n\nconsole.log(region);\n```",
|
|
781
781
|
perLanguage: {
|
|
782
|
-
|
|
783
|
-
method: 'regions
|
|
784
|
-
example: "nirvana
|
|
782
|
+
typescript: {
|
|
783
|
+
method: 'client.regions.get',
|
|
784
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst region = await client.regions.get('us-sva-2');\n\nconsole.log(region.availability);",
|
|
785
785
|
},
|
|
786
786
|
go: {
|
|
787
787
|
method: 'client.Regions.Get',
|
|
788
788
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tregion, err := client.Regions.Get(context.TODO(), "us-sva-2")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", region.Availability)\n}\n',
|
|
789
789
|
},
|
|
790
|
+
cli: {
|
|
791
|
+
method: 'regions get',
|
|
792
|
+
example: "nirvana regions get \\\n --api-key 'My API Key' \\\n --name us-sva-2",
|
|
793
|
+
},
|
|
790
794
|
http: {
|
|
791
795
|
example: 'curl https://api.nirvanalabs.io/v1/regions/$NAME \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
792
796
|
},
|
|
793
|
-
typescript: {
|
|
794
|
-
method: 'client.regions.get',
|
|
795
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst region = await client.regions.get('us-sva-2');\n\nconsole.log(region.availability);",
|
|
796
|
-
},
|
|
797
797
|
},
|
|
798
798
|
},
|
|
799
799
|
{
|
|
@@ -808,21 +808,21 @@ const EMBEDDED_METHODS = [
|
|
|
808
808
|
response: "{ availability: 'live' | 'preview' | 'maintenance' | 'sunset'; compute: { vms: boolean; }; name: string; networking: { connect: boolean; vpcs: boolean; }; nks: { clusters: boolean; }; storage: { abs: boolean; local_nvme: boolean; }; }",
|
|
809
809
|
markdown: "## list\n\n`client.regions.list(cursor?: string, limit?: number): { availability: region_availability; compute: object; name: string; networking: object; nks: object; storage: object; }`\n\n**get** `/v1/regions`\n\nList all regions\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ availability: 'live' | 'preview' | 'maintenance' | 'sunset'; compute: { vms: boolean; }; name: string; networking: { connect: boolean; vpcs: boolean; }; nks: { clusters: boolean; }; storage: { abs: boolean; local_nvme: boolean; }; }`\n Region response with product availability.\n\n - `availability: 'live' | 'preview' | 'maintenance' | 'sunset'`\n - `compute: { vms: boolean; }`\n - `name: string`\n - `networking: { connect: boolean; vpcs: boolean; }`\n - `nks: { clusters: boolean; }`\n - `storage: { abs: boolean; local_nvme: boolean; }`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const region of client.regions.list()) {\n console.log(region);\n}\n```",
|
|
810
810
|
perLanguage: {
|
|
811
|
-
|
|
812
|
-
method: 'regions
|
|
813
|
-
example: "nirvana
|
|
811
|
+
typescript: {
|
|
812
|
+
method: 'client.regions.list',
|
|
813
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const region of client.regions.list()) {\n console.log(region.availability);\n}",
|
|
814
814
|
},
|
|
815
815
|
go: {
|
|
816
816
|
method: 'client.Regions.List',
|
|
817
817
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/regions"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Regions.List(context.TODO(), regions.RegionListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
818
818
|
},
|
|
819
|
+
cli: {
|
|
820
|
+
method: 'regions list',
|
|
821
|
+
example: "nirvana regions list \\\n --api-key 'My API Key'",
|
|
822
|
+
},
|
|
819
823
|
http: {
|
|
820
824
|
example: 'curl https://api.nirvanalabs.io/v1/regions \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
821
825
|
},
|
|
822
|
-
typescript: {
|
|
823
|
-
method: 'client.regions.list',
|
|
824
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const region of client.regions.list()) {\n console.log(region.availability);\n}",
|
|
825
|
-
},
|
|
826
826
|
},
|
|
827
827
|
},
|
|
828
828
|
{
|
|
@@ -837,21 +837,21 @@ const EMBEDDED_METHODS = [
|
|
|
837
837
|
response: "{ 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; }",
|
|
838
838
|
markdown: "## 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```",
|
|
839
839
|
perLanguage: {
|
|
840
|
-
|
|
841
|
-
method: '
|
|
842
|
-
example: "nirvana
|
|
840
|
+
typescript: {
|
|
841
|
+
method: 'client.instanceTypes.get',
|
|
842
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst instanceType = await client.instanceTypes.get('n1-standard-8', { region: 'us-sva-2' });\n\nconsole.log(instanceType.network_bandwidth_gbps);",
|
|
843
843
|
},
|
|
844
844
|
go: {
|
|
845
845
|
method: 'client.InstanceTypes.Get',
|
|
846
846
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/instance_types"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\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',
|
|
847
847
|
},
|
|
848
|
+
cli: {
|
|
849
|
+
method: 'instance_types get',
|
|
850
|
+
example: "nirvana instance-types get \\\n --api-key 'My API Key' \\\n --region us-sva-2 \\\n --name n1-standard-8",
|
|
851
|
+
},
|
|
848
852
|
http: {
|
|
849
853
|
example: 'curl https://api.nirvanalabs.io/v1/instance_types/$REGION/$NAME \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
850
854
|
},
|
|
851
|
-
typescript: {
|
|
852
|
-
method: 'client.instanceTypes.get',
|
|
853
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst instanceType = await client.instanceTypes.get('n1-standard-8', { region: 'us-sva-2' });\n\nconsole.log(instanceType.network_bandwidth_gbps);",
|
|
854
|
-
},
|
|
855
855
|
},
|
|
856
856
|
},
|
|
857
857
|
{
|
|
@@ -866,21 +866,21 @@ const EMBEDDED_METHODS = [
|
|
|
866
866
|
response: "{ 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; }",
|
|
867
867
|
markdown: "## 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```",
|
|
868
868
|
perLanguage: {
|
|
869
|
-
|
|
870
|
-
method: '
|
|
871
|
-
example: "nirvana
|
|
869
|
+
typescript: {
|
|
870
|
+
method: 'client.instanceTypes.list',
|
|
871
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const instanceType of client.instanceTypes.list()) {\n console.log(instanceType.network_bandwidth_gbps);\n}",
|
|
872
872
|
},
|
|
873
873
|
go: {
|
|
874
874
|
method: 'client.InstanceTypes.List',
|
|
875
875
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/instance_types"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.InstanceTypes.List(context.TODO(), instance_types.InstanceTypeListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
876
876
|
},
|
|
877
|
+
cli: {
|
|
878
|
+
method: 'instance_types list',
|
|
879
|
+
example: "nirvana instance-types list \\\n --api-key 'My API Key'",
|
|
880
|
+
},
|
|
877
881
|
http: {
|
|
878
882
|
example: 'curl https://api.nirvanalabs.io/v1/instance_types \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
879
883
|
},
|
|
880
|
-
typescript: {
|
|
881
|
-
method: 'client.instanceTypes.list',
|
|
882
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const instanceType of client.instanceTypes.list()) {\n console.log(instanceType.network_bandwidth_gbps);\n}",
|
|
883
|
-
},
|
|
884
884
|
},
|
|
885
885
|
},
|
|
886
886
|
{
|
|
@@ -909,21 +909,21 @@ const EMBEDDED_METHODS = [
|
|
|
909
909
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
910
910
|
markdown: "## 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```",
|
|
911
911
|
perLanguage: {
|
|
912
|
-
|
|
913
|
-
method: 'vms
|
|
914
|
-
example: "nirvana
|
|
912
|
+
typescript: {
|
|
913
|
+
method: 'client.compute.vms.create',
|
|
914
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.create({\n boot_volume: { size: 100, type: 'abs' },\n 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);",
|
|
915
915
|
},
|
|
916
916
|
go: {
|
|
917
917
|
method: 'client.Compute.VMs.New',
|
|
918
918
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.VMs.New(context.TODO(), compute.VMNewParams{\n\t\tBootVolume: compute.VMNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\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',
|
|
919
919
|
},
|
|
920
|
+
cli: {
|
|
921
|
+
method: 'vms create',
|
|
922
|
+
example: "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",
|
|
923
|
+
},
|
|
920
924
|
http: {
|
|
921
925
|
example: 'curl https://api.nirvanalabs.io/v1/compute/vms \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "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 }\'',
|
|
922
926
|
},
|
|
923
|
-
typescript: {
|
|
924
|
-
method: 'client.compute.vms.create',
|
|
925
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.create({\n boot_volume: { size: 100, type: 'abs' },\n 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);",
|
|
926
|
-
},
|
|
927
927
|
},
|
|
928
928
|
},
|
|
929
929
|
{
|
|
@@ -938,21 +938,21 @@ const EMBEDDED_METHODS = [
|
|
|
938
938
|
response: "{ id: string; boot_volume_id: string; cpu_config: { vcpu: number; }; created_at: string; data_volume_ids: string[]; memory_config: { size: number; }; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; 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; }",
|
|
939
939
|
markdown: "## get\n\n`client.compute.vms.get(vm_id: string): { id: string; boot_volume_id: string; cpu_config: cpu_config; created_at: string; data_volume_ids: string[]; memory_config: memory_config; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: region_name; status: resource_status; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; 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```",
|
|
940
940
|
perLanguage: {
|
|
941
|
-
|
|
942
|
-
method: 'vms
|
|
943
|
-
example: "nirvana
|
|
941
|
+
typescript: {
|
|
942
|
+
method: 'client.compute.vms.get',
|
|
943
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst vm = await client.compute.vms.get('vm_id');\n\nconsole.log(vm.id);",
|
|
944
944
|
},
|
|
945
945
|
go: {
|
|
946
946
|
method: 'client.Compute.VMs.Get',
|
|
947
947
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tvm, err := client.Compute.VMs.Get(context.TODO(), "vm_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", vm.ID)\n}\n',
|
|
948
948
|
},
|
|
949
|
+
cli: {
|
|
950
|
+
method: 'vms get',
|
|
951
|
+
example: "nirvana compute:vms get \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
952
|
+
},
|
|
949
953
|
http: {
|
|
950
954
|
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
951
955
|
},
|
|
952
|
-
typescript: {
|
|
953
|
-
method: 'client.compute.vms.get',
|
|
954
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst vm = await client.compute.vms.get('vm_id');\n\nconsole.log(vm.id);",
|
|
955
|
-
},
|
|
956
956
|
},
|
|
957
957
|
},
|
|
958
958
|
{
|
|
@@ -975,21 +975,21 @@ const EMBEDDED_METHODS = [
|
|
|
975
975
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
976
976
|
markdown: "## 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```",
|
|
977
977
|
perLanguage: {
|
|
978
|
-
|
|
979
|
-
method: 'vms
|
|
980
|
-
example: "nirvana
|
|
978
|
+
typescript: {
|
|
979
|
+
method: 'client.compute.vms.update',
|
|
980
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.update('vm_id');\n\nconsole.log(operation.id);",
|
|
981
981
|
},
|
|
982
982
|
go: {
|
|
983
983
|
method: 'client.Compute.VMs.Update',
|
|
984
984
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/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',
|
|
985
985
|
},
|
|
986
|
+
cli: {
|
|
987
|
+
method: 'vms update',
|
|
988
|
+
example: "nirvana compute:vms update \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
989
|
+
},
|
|
986
990
|
http: {
|
|
987
991
|
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "instance_type": "n1-standard-8",\n "name": "my-vm",\n "public_ip_enabled": true,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
988
992
|
},
|
|
989
|
-
typescript: {
|
|
990
|
-
method: 'client.compute.vms.update',
|
|
991
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.update('vm_id');\n\nconsole.log(operation.id);",
|
|
992
|
-
},
|
|
993
993
|
},
|
|
994
994
|
},
|
|
995
995
|
{
|
|
@@ -1004,21 +1004,21 @@ const EMBEDDED_METHODS = [
|
|
|
1004
1004
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1005
1005
|
markdown: "## delete\n\n`client.compute.vms.delete(vm_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/compute/vms/{vm_id}`\n\nDelete a VM\n\n### Parameters\n\n- `vm_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.vms.delete('vm_id');\n\nconsole.log(operation);\n```",
|
|
1006
1006
|
perLanguage: {
|
|
1007
|
-
|
|
1008
|
-
method: 'vms
|
|
1009
|
-
example: "nirvana
|
|
1007
|
+
typescript: {
|
|
1008
|
+
method: 'client.compute.vms.delete',
|
|
1009
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.delete('vm_id');\n\nconsole.log(operation.id);",
|
|
1010
1010
|
},
|
|
1011
1011
|
go: {
|
|
1012
1012
|
method: 'client.Compute.VMs.Delete',
|
|
1013
1013
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.VMs.Delete(context.TODO(), "vm_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1014
1014
|
},
|
|
1015
|
+
cli: {
|
|
1016
|
+
method: 'vms delete',
|
|
1017
|
+
example: "nirvana compute:vms delete \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
1018
|
+
},
|
|
1015
1019
|
http: {
|
|
1016
1020
|
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1017
1021
|
},
|
|
1018
|
-
typescript: {
|
|
1019
|
-
method: 'client.compute.vms.delete',
|
|
1020
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.delete('vm_id');\n\nconsole.log(operation.id);",
|
|
1021
|
-
},
|
|
1022
1022
|
},
|
|
1023
1023
|
},
|
|
1024
1024
|
{
|
|
@@ -1033,21 +1033,21 @@ const EMBEDDED_METHODS = [
|
|
|
1033
1033
|
response: "{ id: string; boot_volume_id: string; cpu_config: { vcpu: number; }; created_at: string; data_volume_ids: string[]; memory_config: { size: number; }; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; 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; }",
|
|
1034
1034
|
markdown: "## list\n\n`client.compute.vms.list(project_id: string, cursor?: string, limit?: number): { id: string; boot_volume_id: string; cpu_config: cpu_config; created_at: string; data_volume_ids: string[]; memory_config: memory_config; name: string; private_ip: string; project_id: string; public_ip: string; public_ip_enabled: boolean; region: region_name; status: resource_status; subnet_id: string; tags: string[]; updated_at: string; vpc_id: string; vpc_name: string; 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```",
|
|
1035
1035
|
perLanguage: {
|
|
1036
|
-
|
|
1037
|
-
method: 'vms
|
|
1038
|
-
example: "nirvana
|
|
1036
|
+
typescript: {
|
|
1037
|
+
method: 'client.compute.vms.list',
|
|
1038
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const vm of client.compute.vms.list({ project_id: 'project_id' })) {\n console.log(vm.id);\n}",
|
|
1039
1039
|
},
|
|
1040
1040
|
go: {
|
|
1041
1041
|
method: 'client.Compute.VMs.List',
|
|
1042
1042
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Compute.VMs.List(context.TODO(), compute.VMListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
1043
1043
|
},
|
|
1044
|
+
cli: {
|
|
1045
|
+
method: 'vms list',
|
|
1046
|
+
example: "nirvana compute:vms list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
1047
|
+
},
|
|
1044
1048
|
http: {
|
|
1045
1049
|
example: 'curl https://api.nirvanalabs.io/v1/compute/vms \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1046
1050
|
},
|
|
1047
|
-
typescript: {
|
|
1048
|
-
method: 'client.compute.vms.list',
|
|
1049
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const vm of client.compute.vms.list({ project_id: 'project_id' })) {\n console.log(vm.id);\n}",
|
|
1050
|
-
},
|
|
1051
1051
|
},
|
|
1052
1052
|
},
|
|
1053
1053
|
{
|
|
@@ -1062,21 +1062,21 @@ const EMBEDDED_METHODS = [
|
|
|
1062
1062
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1063
1063
|
markdown: "## restart\n\n`client.compute.vms.restart(vm_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/compute/vms/{vm_id}/restart`\n\nRestart a VM\n\n### Parameters\n\n- `vm_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.vms.restart('vm_id');\n\nconsole.log(operation);\n```",
|
|
1064
1064
|
perLanguage: {
|
|
1065
|
-
|
|
1066
|
-
method: 'vms
|
|
1067
|
-
example: "nirvana
|
|
1065
|
+
typescript: {
|
|
1066
|
+
method: 'client.compute.vms.restart',
|
|
1067
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.restart('vm_id');\n\nconsole.log(operation.id);",
|
|
1068
1068
|
},
|
|
1069
1069
|
go: {
|
|
1070
1070
|
method: 'client.Compute.VMs.Restart',
|
|
1071
1071
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.VMs.Restart(context.TODO(), "vm_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1072
1072
|
},
|
|
1073
|
+
cli: {
|
|
1074
|
+
method: 'vms restart',
|
|
1075
|
+
example: "nirvana compute:vms restart \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
1076
|
+
},
|
|
1073
1077
|
http: {
|
|
1074
1078
|
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/restart \\\n -X POST \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1075
1079
|
},
|
|
1076
|
-
typescript: {
|
|
1077
|
-
method: 'client.compute.vms.restart',
|
|
1078
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.vms.restart('vm_id');\n\nconsole.log(operation.id);",
|
|
1079
|
-
},
|
|
1080
1080
|
},
|
|
1081
1081
|
},
|
|
1082
1082
|
{
|
|
@@ -1104,21 +1104,21 @@ const EMBEDDED_METHODS = [
|
|
|
1104
1104
|
],
|
|
1105
1105
|
markdown: "## 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```",
|
|
1106
1106
|
perLanguage: {
|
|
1107
|
-
|
|
1108
|
-
method: 'availability
|
|
1109
|
-
example: "nirvana
|
|
1107
|
+
typescript: {
|
|
1108
|
+
method: 'client.compute.vms.availability.create',
|
|
1109
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.vms.availability.create({\n boot_volume: { size: 100, type: 'abs' },\n 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});",
|
|
1110
1110
|
},
|
|
1111
1111
|
go: {
|
|
1112
1112
|
method: 'client.Compute.VMs.Availability.New',
|
|
1113
1113
|
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Compute.VMs.Availability.New(context.TODO(), compute.VMAvailabilityNewParams{\n\t\tBootVolume: compute.VMAvailabilityNewParamsBootVolume{\n\t\t\tSize: 100,\n\t\t\tType: compute.VolumeTypeABS,\n\t\t},\n\t\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',
|
|
1114
1114
|
},
|
|
1115
|
+
cli: {
|
|
1116
|
+
method: 'availability create',
|
|
1117
|
+
example: "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",
|
|
1118
|
+
},
|
|
1115
1119
|
http: {
|
|
1116
1120
|
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "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 }\'',
|
|
1117
1121
|
},
|
|
1118
|
-
typescript: {
|
|
1119
|
-
method: 'client.compute.vms.availability.create',
|
|
1120
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.vms.availability.create({\n boot_volume: { size: 100, type: 'abs' },\n 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});",
|
|
1121
|
-
},
|
|
1122
1122
|
},
|
|
1123
1123
|
},
|
|
1124
1124
|
{
|
|
@@ -1140,21 +1140,21 @@ const EMBEDDED_METHODS = [
|
|
|
1140
1140
|
],
|
|
1141
1141
|
markdown: "## 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```",
|
|
1142
1142
|
perLanguage: {
|
|
1143
|
-
|
|
1144
|
-
method: 'availability
|
|
1145
|
-
example: "nirvana
|
|
1143
|
+
typescript: {
|
|
1144
|
+
method: 'client.compute.vms.availability.update',
|
|
1145
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.vms.availability.update('vm_id');",
|
|
1146
1146
|
},
|
|
1147
1147
|
go: {
|
|
1148
1148
|
method: 'client.Compute.VMs.Availability.Update',
|
|
1149
1149
|
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Compute.VMs.Availability.Update(\n\t\tcontext.TODO(),\n\t\t"vm_id",\n\t\tcompute.VMAvailabilityUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
1150
1150
|
},
|
|
1151
|
+
cli: {
|
|
1152
|
+
method: 'availability update',
|
|
1153
|
+
example: "nirvana compute:vms:availability update \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
1154
|
+
},
|
|
1151
1155
|
http: {
|
|
1152
1156
|
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "instance_type": "n1-standard-8",\n "name": "my-vm",\n "public_ip_enabled": true,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1153
1157
|
},
|
|
1154
|
-
typescript: {
|
|
1155
|
-
method: 'client.compute.vms.availability.update',
|
|
1156
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.vms.availability.update('vm_id');",
|
|
1157
|
-
},
|
|
1158
1158
|
},
|
|
1159
1159
|
},
|
|
1160
1160
|
{
|
|
@@ -1169,21 +1169,21 @@ const EMBEDDED_METHODS = [
|
|
|
1169
1169
|
response: "{ 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; }",
|
|
1170
1170
|
markdown: "## list\n\n`client.compute.vms.volumes.list(vm_id: string, cursor?: string, limit?: number): { id: string; created_at: string; kind: volume_kind; name: string; project_id: string; region: region_name; size: number; status: resource_status; tags: string[]; type: volume_type; updated_at: string; vm_id: string; vm_name: string; }`\n\n**get** `/v1/compute/vms/{vm_id}/volumes`\n\nList VM's Volumes\n\n### Parameters\n\n- `vm_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; 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```",
|
|
1171
1171
|
perLanguage: {
|
|
1172
|
-
|
|
1173
|
-
method: 'volumes
|
|
1174
|
-
example: "nirvana
|
|
1172
|
+
typescript: {
|
|
1173
|
+
method: 'client.compute.vms.volumes.list',
|
|
1174
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const volume of client.compute.vms.volumes.list('vm_id')) {\n console.log(volume.id);\n}",
|
|
1175
1175
|
},
|
|
1176
1176
|
go: {
|
|
1177
1177
|
method: 'client.Compute.VMs.Volumes.List',
|
|
1178
1178
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Compute.VMs.Volumes.List(\n\t\tcontext.TODO(),\n\t\t"vm_id",\n\t\tcompute.VMVolumeListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
1179
1179
|
},
|
|
1180
|
+
cli: {
|
|
1181
|
+
method: 'volumes list',
|
|
1182
|
+
example: "nirvana compute:vms:volumes list \\\n --api-key 'My API Key' \\\n --vm-id vm_id",
|
|
1183
|
+
},
|
|
1180
1184
|
http: {
|
|
1181
1185
|
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/$VM_ID/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1182
1186
|
},
|
|
1183
|
-
typescript: {
|
|
1184
|
-
method: 'client.compute.vms.volumes.list',
|
|
1185
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const volume of client.compute.vms.volumes.list('vm_id')) {\n console.log(volume.id);\n}",
|
|
1186
|
-
},
|
|
1187
1187
|
},
|
|
1188
1188
|
},
|
|
1189
1189
|
{
|
|
@@ -1198,21 +1198,21 @@ const EMBEDDED_METHODS = [
|
|
|
1198
1198
|
response: '{ created_at: string; display_name: string; name: string; }',
|
|
1199
1199
|
markdown: "## list\n\n`client.compute.vms.osImages.list(cursor?: string, limit?: number): { created_at: string; display_name: string; name: string; }`\n\n**get** `/v1/compute/vms/os_images`\n\nList all OS Images\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ created_at: string; display_name: string; name: string; }`\n OS Image details.\n\n - `created_at: string`\n - `display_name: string`\n - `name: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const osImage of client.compute.vms.osImages.list()) {\n console.log(osImage);\n}\n```",
|
|
1200
1200
|
perLanguage: {
|
|
1201
|
-
|
|
1202
|
-
method: '
|
|
1203
|
-
example: "nirvana
|
|
1201
|
+
typescript: {
|
|
1202
|
+
method: 'client.compute.vms.osImages.list',
|
|
1203
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const osImage of client.compute.vms.osImages.list()) {\n console.log(osImage.created_at);\n}",
|
|
1204
1204
|
},
|
|
1205
1205
|
go: {
|
|
1206
1206
|
method: 'client.Compute.VMs.OSImages.List',
|
|
1207
1207
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Compute.VMs.OSImages.List(context.TODO(), compute.VMOSImageListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
1208
1208
|
},
|
|
1209
|
+
cli: {
|
|
1210
|
+
method: 'os_images list',
|
|
1211
|
+
example: "nirvana compute:vms:os-images list \\\n --api-key 'My API Key'",
|
|
1212
|
+
},
|
|
1209
1213
|
http: {
|
|
1210
1214
|
example: 'curl https://api.nirvanalabs.io/v1/compute/vms/os_images \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1211
1215
|
},
|
|
1212
|
-
typescript: {
|
|
1213
|
-
method: 'client.compute.vms.osImages.list',
|
|
1214
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const osImage of client.compute.vms.osImages.list()) {\n console.log(osImage.created_at);\n}",
|
|
1215
|
-
},
|
|
1216
1216
|
},
|
|
1217
1217
|
},
|
|
1218
1218
|
{
|
|
@@ -1235,21 +1235,21 @@ const EMBEDDED_METHODS = [
|
|
|
1235
1235
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1236
1236
|
markdown: "## 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```",
|
|
1237
1237
|
perLanguage: {
|
|
1238
|
-
|
|
1239
|
-
method: 'volumes
|
|
1240
|
-
example: "nirvana
|
|
1238
|
+
typescript: {
|
|
1239
|
+
method: 'client.compute.volumes.create',
|
|
1240
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.create({\n name: 'my-data-volume',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n size: 100,\n type: 'abs',\n});\n\nconsole.log(operation.id);",
|
|
1241
1241
|
},
|
|
1242
1242
|
go: {
|
|
1243
1243
|
method: 'client.Compute.Volumes.New',
|
|
1244
1244
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.Volumes.New(context.TODO(), compute.VolumeNewParams{\n\t\tName: "my-data-volume",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tRegion: shared.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',
|
|
1245
1245
|
},
|
|
1246
|
+
cli: {
|
|
1247
|
+
method: 'volumes create',
|
|
1248
|
+
example: "nirvana compute:volumes create \\\n --api-key 'My API Key' \\\n --name my-data-volume \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-sva-2 \\\n --size 100 \\\n --type abs",
|
|
1249
|
+
},
|
|
1246
1250
|
http: {
|
|
1247
1251
|
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "size": 100,\n "type": "abs",\n "tags": [\n "production",\n "ethereum"\n ],\n "vm_id": "123e4567-e89b-12d3-a456-426614174000"\n }\'',
|
|
1248
1252
|
},
|
|
1249
|
-
typescript: {
|
|
1250
|
-
method: 'client.compute.volumes.create',
|
|
1251
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.create({\n name: 'my-data-volume',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n size: 100,\n type: 'abs',\n});\n\nconsole.log(operation.id);",
|
|
1252
|
-
},
|
|
1253
1253
|
},
|
|
1254
1254
|
},
|
|
1255
1255
|
{
|
|
@@ -1264,21 +1264,21 @@ const EMBEDDED_METHODS = [
|
|
|
1264
1264
|
response: "{ 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; }",
|
|
1265
1265
|
markdown: "## get\n\n`client.compute.volumes.get(volume_id: string): { id: string; created_at: string; kind: volume_kind; name: string; project_id: string; region: region_name; size: number; status: resource_status; tags: string[]; type: volume_type; updated_at: string; vm_id: string; vm_name: string; }`\n\n**get** `/v1/compute/volumes/{volume_id}`\n\nGet a Volume.\n\n### Parameters\n\n- `volume_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; 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```",
|
|
1266
1266
|
perLanguage: {
|
|
1267
|
-
|
|
1268
|
-
method: 'volumes
|
|
1269
|
-
example: "nirvana
|
|
1267
|
+
typescript: {
|
|
1268
|
+
method: 'client.compute.volumes.get',
|
|
1269
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst volume = await client.compute.volumes.get('volume_id');\n\nconsole.log(volume.id);",
|
|
1270
1270
|
},
|
|
1271
1271
|
go: {
|
|
1272
1272
|
method: 'client.Compute.Volumes.Get',
|
|
1273
1273
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tvolume, err := client.Compute.Volumes.Get(context.TODO(), "volume_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", volume.ID)\n}\n',
|
|
1274
1274
|
},
|
|
1275
|
+
cli: {
|
|
1276
|
+
method: 'volumes get',
|
|
1277
|
+
example: "nirvana compute:volumes get \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
|
|
1278
|
+
},
|
|
1275
1279
|
http: {
|
|
1276
1280
|
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1277
1281
|
},
|
|
1278
|
-
typescript: {
|
|
1279
|
-
method: 'client.compute.volumes.get',
|
|
1280
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst volume = await client.compute.volumes.get('volume_id');\n\nconsole.log(volume.id);",
|
|
1281
|
-
},
|
|
1282
1282
|
},
|
|
1283
1283
|
},
|
|
1284
1284
|
{
|
|
@@ -1293,21 +1293,21 @@ const EMBEDDED_METHODS = [
|
|
|
1293
1293
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1294
1294
|
markdown: "## update\n\n`client.compute.volumes.update(volume_id: string, name?: string, size?: number, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**patch** `/v1/compute/volumes/{volume_id}`\n\nUpdate a Volume. Boot or data volumes can be updated.\n\n### Parameters\n\n- `volume_id: string`\n\n- `name?: string`\n Name of the Volume.\n\n- `size?: number`\n Size of the Volume in GB.\n\n- `tags?: string[]`\n Tags to attach to the Volume.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.volumes.update('volume_id');\n\nconsole.log(operation);\n```",
|
|
1295
1295
|
perLanguage: {
|
|
1296
|
-
|
|
1297
|
-
method: 'volumes
|
|
1298
|
-
example: "nirvana
|
|
1296
|
+
typescript: {
|
|
1297
|
+
method: 'client.compute.volumes.update',
|
|
1298
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.update('volume_id');\n\nconsole.log(operation.id);",
|
|
1299
1299
|
},
|
|
1300
1300
|
go: {
|
|
1301
1301
|
method: 'client.Compute.Volumes.Update',
|
|
1302
1302
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.Volumes.Update(\n\t\tcontext.TODO(),\n\t\t"volume_id",\n\t\tcompute.VolumeUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1303
1303
|
},
|
|
1304
|
+
cli: {
|
|
1305
|
+
method: 'volumes update',
|
|
1306
|
+
example: "nirvana compute:volumes update \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
|
|
1307
|
+
},
|
|
1304
1308
|
http: {
|
|
1305
1309
|
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "size": 100,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1306
1310
|
},
|
|
1307
|
-
typescript: {
|
|
1308
|
-
method: 'client.compute.volumes.update',
|
|
1309
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.update('volume_id');\n\nconsole.log(operation.id);",
|
|
1310
|
-
},
|
|
1311
1311
|
},
|
|
1312
1312
|
},
|
|
1313
1313
|
{
|
|
@@ -1322,21 +1322,21 @@ const EMBEDDED_METHODS = [
|
|
|
1322
1322
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1323
1323
|
markdown: "## delete\n\n`client.compute.volumes.delete(volume_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/compute/volumes/{volume_id}`\n\nDelete a Volume. Boot or data volumes can be deleted.\n\n### Parameters\n\n- `volume_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.volumes.delete('volume_id');\n\nconsole.log(operation);\n```",
|
|
1324
1324
|
perLanguage: {
|
|
1325
|
-
|
|
1326
|
-
method: 'volumes
|
|
1327
|
-
example: "nirvana
|
|
1325
|
+
typescript: {
|
|
1326
|
+
method: 'client.compute.volumes.delete',
|
|
1327
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.delete('volume_id');\n\nconsole.log(operation.id);",
|
|
1328
1328
|
},
|
|
1329
1329
|
go: {
|
|
1330
1330
|
method: 'client.Compute.Volumes.Delete',
|
|
1331
1331
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.Volumes.Delete(context.TODO(), "volume_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1332
1332
|
},
|
|
1333
|
+
cli: {
|
|
1334
|
+
method: 'volumes delete',
|
|
1335
|
+
example: "nirvana compute:volumes delete \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
|
|
1336
|
+
},
|
|
1333
1337
|
http: {
|
|
1334
1338
|
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1335
1339
|
},
|
|
1336
|
-
typescript: {
|
|
1337
|
-
method: 'client.compute.volumes.delete',
|
|
1338
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.delete('volume_id');\n\nconsole.log(operation.id);",
|
|
1339
|
-
},
|
|
1340
1340
|
},
|
|
1341
1341
|
},
|
|
1342
1342
|
{
|
|
@@ -1351,21 +1351,21 @@ const EMBEDDED_METHODS = [
|
|
|
1351
1351
|
response: "{ 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; }",
|
|
1352
1352
|
markdown: "## list\n\n`client.compute.volumes.list(project_id: string, cursor?: string, limit?: number): { id: string; created_at: string; kind: volume_kind; name: string; project_id: string; region: region_name; size: number; status: resource_status; tags: string[]; type: volume_type; updated_at: string; vm_id: string; vm_name: string; }`\n\n**get** `/v1/compute/volumes`\n\nList all volumes\n\n### Parameters\n\n- `project_id: string`\n Project ID of resources to request\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; 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```",
|
|
1353
1353
|
perLanguage: {
|
|
1354
|
-
|
|
1355
|
-
method: 'volumes
|
|
1356
|
-
example: "nirvana
|
|
1354
|
+
typescript: {
|
|
1355
|
+
method: 'client.compute.volumes.list',
|
|
1356
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const volume of client.compute.volumes.list({ project_id: 'project_id' })) {\n console.log(volume.id);\n}",
|
|
1357
1357
|
},
|
|
1358
1358
|
go: {
|
|
1359
1359
|
method: 'client.Compute.Volumes.List',
|
|
1360
1360
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Compute.Volumes.List(context.TODO(), compute.VolumeListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
1361
1361
|
},
|
|
1362
|
+
cli: {
|
|
1363
|
+
method: 'volumes list',
|
|
1364
|
+
example: "nirvana compute:volumes list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
1365
|
+
},
|
|
1362
1366
|
http: {
|
|
1363
1367
|
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1364
1368
|
},
|
|
1365
|
-
typescript: {
|
|
1366
|
-
method: 'client.compute.volumes.list',
|
|
1367
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const volume of client.compute.volumes.list({ project_id: 'project_id' })) {\n console.log(volume.id);\n}",
|
|
1368
|
-
},
|
|
1369
1369
|
},
|
|
1370
1370
|
},
|
|
1371
1371
|
{
|
|
@@ -1380,21 +1380,21 @@ const EMBEDDED_METHODS = [
|
|
|
1380
1380
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1381
1381
|
markdown: "## attach\n\n`client.compute.volumes.attach(volume_id: string, vm_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/compute/volumes/{volume_id}/attach`\n\nAttach a volume to a VM\n\n### Parameters\n\n- `volume_id: string`\n\n- `vm_id: string`\n ID of the VM to attach the Volume to.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.volumes.attach('volume_id', { vm_id: '123e4567-e89b-12d3-a456-426614174000' });\n\nconsole.log(operation);\n```",
|
|
1382
1382
|
perLanguage: {
|
|
1383
|
-
|
|
1384
|
-
method: 'volumes
|
|
1385
|
-
example: "nirvana
|
|
1383
|
+
typescript: {
|
|
1384
|
+
method: 'client.compute.volumes.attach',
|
|
1385
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.attach('volume_id', {\n vm_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);",
|
|
1386
1386
|
},
|
|
1387
1387
|
go: {
|
|
1388
1388
|
method: 'client.Compute.Volumes.Attach',
|
|
1389
1389
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.Volumes.Attach(\n\t\tcontext.TODO(),\n\t\t"volume_id",\n\t\tcompute.VolumeAttachParams{\n\t\t\tVMID: "123e4567-e89b-12d3-a456-426614174000",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1390
1390
|
},
|
|
1391
|
+
cli: {
|
|
1392
|
+
method: 'volumes attach',
|
|
1393
|
+
example: "nirvana compute:volumes attach \\\n --api-key 'My API Key' \\\n --volume-id volume_id \\\n --vm-id 123e4567-e89b-12d3-a456-426614174000",
|
|
1394
|
+
},
|
|
1391
1395
|
http: {
|
|
1392
1396
|
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID/attach \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "vm_id": "123e4567-e89b-12d3-a456-426614174000"\n }\'',
|
|
1393
1397
|
},
|
|
1394
|
-
typescript: {
|
|
1395
|
-
method: 'client.compute.volumes.attach',
|
|
1396
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.attach('volume_id', {\n vm_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);",
|
|
1397
|
-
},
|
|
1398
1398
|
},
|
|
1399
1399
|
},
|
|
1400
1400
|
{
|
|
@@ -1409,21 +1409,21 @@ const EMBEDDED_METHODS = [
|
|
|
1409
1409
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1410
1410
|
markdown: "## detach\n\n`client.compute.volumes.detach(volume_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/compute/volumes/{volume_id}/detach`\n\nDetach a volume from a VM\n\n### Parameters\n\n- `volume_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.compute.volumes.detach('volume_id');\n\nconsole.log(operation);\n```",
|
|
1411
1411
|
perLanguage: {
|
|
1412
|
-
|
|
1413
|
-
method: 'volumes
|
|
1414
|
-
example: "nirvana
|
|
1412
|
+
typescript: {
|
|
1413
|
+
method: 'client.compute.volumes.detach',
|
|
1414
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.detach('volume_id');\n\nconsole.log(operation.id);",
|
|
1415
1415
|
},
|
|
1416
1416
|
go: {
|
|
1417
1417
|
method: 'client.Compute.Volumes.Detach',
|
|
1418
1418
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Compute.Volumes.Detach(context.TODO(), "volume_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1419
1419
|
},
|
|
1420
|
+
cli: {
|
|
1421
|
+
method: 'volumes detach',
|
|
1422
|
+
example: "nirvana compute:volumes detach \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
|
|
1423
|
+
},
|
|
1420
1424
|
http: {
|
|
1421
1425
|
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID/detach \\\n -X POST \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1422
1426
|
},
|
|
1423
|
-
typescript: {
|
|
1424
|
-
method: 'client.compute.volumes.detach',
|
|
1425
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.compute.volumes.detach('volume_id');\n\nconsole.log(operation.id);",
|
|
1426
|
-
},
|
|
1427
1427
|
},
|
|
1428
1428
|
},
|
|
1429
1429
|
{
|
|
@@ -1445,21 +1445,21 @@ const EMBEDDED_METHODS = [
|
|
|
1445
1445
|
],
|
|
1446
1446
|
markdown: "## 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```",
|
|
1447
1447
|
perLanguage: {
|
|
1448
|
-
|
|
1449
|
-
method: 'availability
|
|
1450
|
-
example: "nirvana
|
|
1448
|
+
typescript: {
|
|
1449
|
+
method: 'client.compute.volumes.availability.create',
|
|
1450
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.volumes.availability.create({\n name: 'my-data-volume',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n size: 100,\n type: 'abs',\n});",
|
|
1451
1451
|
},
|
|
1452
1452
|
go: {
|
|
1453
1453
|
method: 'client.Compute.Volumes.Availability.New',
|
|
1454
1454
|
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Compute.Volumes.Availability.New(context.TODO(), compute.VolumeAvailabilityNewParams{\n\t\tName: "my-data-volume",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tRegion: shared.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',
|
|
1455
1455
|
},
|
|
1456
|
+
cli: {
|
|
1457
|
+
method: 'availability create',
|
|
1458
|
+
example: "nirvana compute:volumes:availability create \\\n --api-key 'My API Key' \\\n --name my-data-volume \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-sva-2 \\\n --size 100 \\\n --type abs",
|
|
1459
|
+
},
|
|
1456
1460
|
http: {
|
|
1457
1461
|
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "size": 100,\n "type": "abs",\n "tags": [\n "production",\n "ethereum"\n ],\n "vm_id": "123e4567-e89b-12d3-a456-426614174000"\n }\'',
|
|
1458
1462
|
},
|
|
1459
|
-
typescript: {
|
|
1460
|
-
method: 'client.compute.volumes.availability.create',
|
|
1461
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.volumes.availability.create({\n name: 'my-data-volume',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n size: 100,\n type: 'abs',\n});",
|
|
1462
|
-
},
|
|
1463
1463
|
},
|
|
1464
1464
|
},
|
|
1465
1465
|
{
|
|
@@ -1473,21 +1473,21 @@ const EMBEDDED_METHODS = [
|
|
|
1473
1473
|
params: ['volume_id: string;', 'name?: string;', 'size?: number;', 'tags?: string[];'],
|
|
1474
1474
|
markdown: "## update\n\n`client.compute.volumes.availability.update(volume_id: string, name?: string, size?: number, tags?: string[]): void`\n\n**patch** `/v1/compute/volumes/{volume_id}/availability`\n\nCheck Volume Update Availability\n\n### Parameters\n\n- `volume_id: string`\n\n- `name?: string`\n Name of the Volume.\n\n- `size?: number`\n Size of the Volume in GB.\n\n- `tags?: string[]`\n Tags to attach to the Volume.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.compute.volumes.availability.update('volume_id')\n```",
|
|
1475
1475
|
perLanguage: {
|
|
1476
|
-
|
|
1477
|
-
method: 'availability
|
|
1478
|
-
example: "nirvana
|
|
1476
|
+
typescript: {
|
|
1477
|
+
method: 'client.compute.volumes.availability.update',
|
|
1478
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.volumes.availability.update('volume_id');",
|
|
1479
1479
|
},
|
|
1480
1480
|
go: {
|
|
1481
1481
|
method: 'client.Compute.Volumes.Availability.Update',
|
|
1482
1482
|
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Compute.Volumes.Availability.Update(\n\t\tcontext.TODO(),\n\t\t"volume_id",\n\t\tcompute.VolumeAvailabilityUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
1483
1483
|
},
|
|
1484
|
+
cli: {
|
|
1485
|
+
method: 'availability update',
|
|
1486
|
+
example: "nirvana compute:volumes:availability update \\\n --api-key 'My API Key' \\\n --volume-id volume_id",
|
|
1487
|
+
},
|
|
1484
1488
|
http: {
|
|
1485
1489
|
example: 'curl https://api.nirvanalabs.io/v1/compute/volumes/$VOLUME_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-data-volume",\n "size": 100,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1486
1490
|
},
|
|
1487
|
-
typescript: {
|
|
1488
|
-
method: 'client.compute.volumes.availability.update',
|
|
1489
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.compute.volumes.availability.update('volume_id');",
|
|
1490
|
-
},
|
|
1491
1491
|
},
|
|
1492
1492
|
},
|
|
1493
1493
|
{
|
|
@@ -1508,21 +1508,21 @@ const EMBEDDED_METHODS = [
|
|
|
1508
1508
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1509
1509
|
markdown: "## 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```",
|
|
1510
1510
|
perLanguage: {
|
|
1511
|
-
|
|
1512
|
-
method: 'vpcs
|
|
1513
|
-
example: "nirvana
|
|
1511
|
+
typescript: {
|
|
1512
|
+
method: 'client.networking.vpcs.create',
|
|
1513
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.vpcs.create({\n name: 'my-vpc',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n subnet_name: 'my-subnet',\n});\n\nconsole.log(operation.id);",
|
|
1514
1514
|
},
|
|
1515
1515
|
go: {
|
|
1516
1516
|
method: 'client.Networking.VPCs.New',
|
|
1517
1517
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.VPCs.New(context.TODO(), networking.VPCNewParams{\n\t\tName: "my-vpc",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tRegion: shared.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',
|
|
1518
1518
|
},
|
|
1519
|
+
cli: {
|
|
1520
|
+
method: 'vpcs create',
|
|
1521
|
+
example: "nirvana networking:vpcs create \\\n --api-key 'My API Key' \\\n --name my-vpc \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-sva-2 \\\n --subnet-name my-subnet",
|
|
1522
|
+
},
|
|
1519
1523
|
http: {
|
|
1520
1524
|
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1521
1525
|
},
|
|
1522
|
-
typescript: {
|
|
1523
|
-
method: 'client.networking.vpcs.create',
|
|
1524
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.vpcs.create({\n name: 'my-vpc',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n subnet_name: 'my-subnet',\n});\n\nconsole.log(operation.id);",
|
|
1525
|
-
},
|
|
1526
1526
|
},
|
|
1527
1527
|
},
|
|
1528
1528
|
{
|
|
@@ -1536,22 +1536,22 @@ const EMBEDDED_METHODS = [
|
|
|
1536
1536
|
params: ['vpc_id: string;'],
|
|
1537
1537
|
response: "{ id: string; created_at: string; firewall_rule_ids: string[]; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; 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; }",
|
|
1538
1538
|
markdown: "## get\n\n`client.networking.vpcs.get(vpc_id: string): { id: string; created_at: string; firewall_rule_ids: string[]; name: string; project_id: string; region: region_name; status: resource_status; subnet: subnet; tags: string[]; updated_at: string; }`\n\n**get** `/v1/networking/vpcs/{vpc_id}`\n\nGet details about a VPC\n\n### Parameters\n\n- `vpc_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; firewall_rule_ids: string[]; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; 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```",
|
|
1539
|
-
perLanguage: {
|
|
1540
|
-
|
|
1541
|
-
method: 'vpcs
|
|
1542
|
-
example: "nirvana
|
|
1539
|
+
perLanguage: {
|
|
1540
|
+
typescript: {
|
|
1541
|
+
method: 'client.networking.vpcs.get',
|
|
1542
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst vpc = await client.networking.vpcs.get('vpc_id');\n\nconsole.log(vpc.id);",
|
|
1543
1543
|
},
|
|
1544
1544
|
go: {
|
|
1545
1545
|
method: 'client.Networking.VPCs.Get',
|
|
1546
1546
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tvpc, err := client.Networking.VPCs.Get(context.TODO(), "vpc_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", vpc.ID)\n}\n',
|
|
1547
1547
|
},
|
|
1548
|
+
cli: {
|
|
1549
|
+
method: 'vpcs get',
|
|
1550
|
+
example: "nirvana networking:vpcs get \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
|
|
1551
|
+
},
|
|
1548
1552
|
http: {
|
|
1549
1553
|
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1550
1554
|
},
|
|
1551
|
-
typescript: {
|
|
1552
|
-
method: 'client.networking.vpcs.get',
|
|
1553
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst vpc = await client.networking.vpcs.get('vpc_id');\n\nconsole.log(vpc.id);",
|
|
1554
|
-
},
|
|
1555
1555
|
},
|
|
1556
1556
|
},
|
|
1557
1557
|
{
|
|
@@ -1566,21 +1566,21 @@ const EMBEDDED_METHODS = [
|
|
|
1566
1566
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1567
1567
|
markdown: "## update\n\n`client.networking.vpcs.update(vpc_id: string, name?: string, subnet_name?: string, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**patch** `/v1/networking/vpcs/{vpc_id}`\n\nUpdate a VPC\n\n### Parameters\n\n- `vpc_id: string`\n\n- `name?: string`\n Name of the VPC.\n\n- `subnet_name?: string`\n Name of the subnet to create.\n\n- `tags?: string[]`\n Tags to attach to the VPC.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.vpcs.update('vpc_id');\n\nconsole.log(operation);\n```",
|
|
1568
1568
|
perLanguage: {
|
|
1569
|
-
|
|
1570
|
-
method: 'vpcs
|
|
1571
|
-
example: "nirvana
|
|
1569
|
+
typescript: {
|
|
1570
|
+
method: 'client.networking.vpcs.update',
|
|
1571
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.vpcs.update('vpc_id');\n\nconsole.log(operation.id);",
|
|
1572
1572
|
},
|
|
1573
1573
|
go: {
|
|
1574
1574
|
method: 'client.Networking.VPCs.Update',
|
|
1575
1575
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.VPCs.Update(\n\t\tcontext.TODO(),\n\t\t"vpc_id",\n\t\tnetworking.VPCUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1576
1576
|
},
|
|
1577
|
+
cli: {
|
|
1578
|
+
method: 'vpcs update',
|
|
1579
|
+
example: "nirvana networking:vpcs update \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
|
|
1580
|
+
},
|
|
1577
1581
|
http: {
|
|
1578
1582
|
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1579
1583
|
},
|
|
1580
|
-
typescript: {
|
|
1581
|
-
method: 'client.networking.vpcs.update',
|
|
1582
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.vpcs.update('vpc_id');\n\nconsole.log(operation.id);",
|
|
1583
|
-
},
|
|
1584
1584
|
},
|
|
1585
1585
|
},
|
|
1586
1586
|
{
|
|
@@ -1595,21 +1595,21 @@ const EMBEDDED_METHODS = [
|
|
|
1595
1595
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1596
1596
|
markdown: "## delete\n\n`client.networking.vpcs.delete(vpc_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/networking/vpcs/{vpc_id}`\n\nDelete a VPC\n\n### Parameters\n\n- `vpc_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.vpcs.delete('vpc_id');\n\nconsole.log(operation);\n```",
|
|
1597
1597
|
perLanguage: {
|
|
1598
|
-
|
|
1599
|
-
method: 'vpcs
|
|
1600
|
-
example: "nirvana
|
|
1598
|
+
typescript: {
|
|
1599
|
+
method: 'client.networking.vpcs.delete',
|
|
1600
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.vpcs.delete('vpc_id');\n\nconsole.log(operation.id);",
|
|
1601
1601
|
},
|
|
1602
1602
|
go: {
|
|
1603
1603
|
method: 'client.Networking.VPCs.Delete',
|
|
1604
1604
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.VPCs.Delete(context.TODO(), "vpc_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1605
1605
|
},
|
|
1606
|
+
cli: {
|
|
1607
|
+
method: 'vpcs delete',
|
|
1608
|
+
example: "nirvana networking:vpcs delete \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
|
|
1609
|
+
},
|
|
1606
1610
|
http: {
|
|
1607
1611
|
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1608
1612
|
},
|
|
1609
|
-
typescript: {
|
|
1610
|
-
method: 'client.networking.vpcs.delete',
|
|
1611
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.vpcs.delete('vpc_id');\n\nconsole.log(operation.id);",
|
|
1612
|
-
},
|
|
1613
1613
|
},
|
|
1614
1614
|
},
|
|
1615
1615
|
{
|
|
@@ -1624,21 +1624,21 @@ const EMBEDDED_METHODS = [
|
|
|
1624
1624
|
response: "{ id: string; created_at: string; firewall_rule_ids: string[]; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; 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; }",
|
|
1625
1625
|
markdown: "## list\n\n`client.networking.vpcs.list(project_id: string, cursor?: string, limit?: number): { id: string; created_at: string; firewall_rule_ids: string[]; name: string; project_id: string; region: region_name; status: resource_status; subnet: subnet; tags: string[]; updated_at: string; }`\n\n**get** `/v1/networking/vpcs`\n\nList all VPCs\n\n### Parameters\n\n- `project_id: string`\n Project ID of resources to request\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; firewall_rule_ids: string[]; name: string; project_id: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; 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```",
|
|
1626
1626
|
perLanguage: {
|
|
1627
|
-
|
|
1628
|
-
method: 'vpcs
|
|
1629
|
-
example: "nirvana
|
|
1627
|
+
typescript: {
|
|
1628
|
+
method: 'client.networking.vpcs.list',
|
|
1629
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const vpc of client.networking.vpcs.list({ project_id: 'project_id' })) {\n console.log(vpc.id);\n}",
|
|
1630
1630
|
},
|
|
1631
1631
|
go: {
|
|
1632
1632
|
method: 'client.Networking.VPCs.List',
|
|
1633
1633
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Networking.VPCs.List(context.TODO(), networking.VPCListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
1634
1634
|
},
|
|
1635
|
+
cli: {
|
|
1636
|
+
method: 'vpcs list',
|
|
1637
|
+
example: "nirvana networking:vpcs list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
1638
|
+
},
|
|
1635
1639
|
http: {
|
|
1636
1640
|
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1637
1641
|
},
|
|
1638
|
-
typescript: {
|
|
1639
|
-
method: 'client.networking.vpcs.list',
|
|
1640
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const vpc of client.networking.vpcs.list({ project_id: 'project_id' })) {\n console.log(vpc.id);\n}",
|
|
1641
|
-
},
|
|
1642
1642
|
},
|
|
1643
1643
|
},
|
|
1644
1644
|
{
|
|
@@ -1658,21 +1658,21 @@ const EMBEDDED_METHODS = [
|
|
|
1658
1658
|
],
|
|
1659
1659
|
markdown: "## 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```",
|
|
1660
1660
|
perLanguage: {
|
|
1661
|
-
|
|
1662
|
-
method: 'availability
|
|
1663
|
-
example: "nirvana
|
|
1661
|
+
typescript: {
|
|
1662
|
+
method: 'client.networking.vpcs.availability.create',
|
|
1663
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.networking.vpcs.availability.create({\n name: 'my-vpc',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n subnet_name: 'my-subnet',\n});",
|
|
1664
1664
|
},
|
|
1665
1665
|
go: {
|
|
1666
1666
|
method: 'client.Networking.VPCs.Availability.New',
|
|
1667
1667
|
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Networking.VPCs.Availability.New(context.TODO(), networking.VPCAvailabilityNewParams{\n\t\tName: "my-vpc",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tSubnetName: "my-subnet",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
1668
1668
|
},
|
|
1669
|
+
cli: {
|
|
1670
|
+
method: 'availability create',
|
|
1671
|
+
example: "nirvana networking:vpcs:availability create \\\n --api-key 'My API Key' \\\n --name my-vpc \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-sva-2 \\\n --subnet-name my-subnet",
|
|
1672
|
+
},
|
|
1669
1673
|
http: {
|
|
1670
1674
|
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1671
1675
|
},
|
|
1672
|
-
typescript: {
|
|
1673
|
-
method: 'client.networking.vpcs.availability.create',
|
|
1674
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.networking.vpcs.availability.create({\n name: 'my-vpc',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n subnet_name: 'my-subnet',\n});",
|
|
1675
|
-
},
|
|
1676
1676
|
},
|
|
1677
1677
|
},
|
|
1678
1678
|
{
|
|
@@ -1686,21 +1686,21 @@ const EMBEDDED_METHODS = [
|
|
|
1686
1686
|
params: ['vpc_id: string;', 'name?: string;', 'subnet_name?: string;', 'tags?: string[];'],
|
|
1687
1687
|
markdown: "## update\n\n`client.networking.vpcs.availability.update(vpc_id: string, name?: string, subnet_name?: string, tags?: string[]): void`\n\n**patch** `/v1/networking/vpcs/{vpc_id}/availability`\n\nCheck if a VPC can be updated\n\n### Parameters\n\n- `vpc_id: string`\n\n- `name?: string`\n Name of the VPC.\n\n- `subnet_name?: string`\n Name of the subnet to create.\n\n- `tags?: string[]`\n Tags to attach to the VPC.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.networking.vpcs.availability.update('vpc_id')\n```",
|
|
1688
1688
|
perLanguage: {
|
|
1689
|
-
|
|
1690
|
-
method: 'availability
|
|
1691
|
-
example: "nirvana
|
|
1689
|
+
typescript: {
|
|
1690
|
+
method: 'client.networking.vpcs.availability.update',
|
|
1691
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.networking.vpcs.availability.update('vpc_id');",
|
|
1692
1692
|
},
|
|
1693
1693
|
go: {
|
|
1694
1694
|
method: 'client.Networking.VPCs.Availability.Update',
|
|
1695
1695
|
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Networking.VPCs.Availability.Update(\n\t\tcontext.TODO(),\n\t\t"vpc_id",\n\t\tnetworking.VPCAvailabilityUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
1696
1696
|
},
|
|
1697
|
+
cli: {
|
|
1698
|
+
method: 'availability update',
|
|
1699
|
+
example: "nirvana networking:vpcs:availability update \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
|
|
1700
|
+
},
|
|
1697
1701
|
http: {
|
|
1698
1702
|
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-vpc",\n "subnet_name": "my-subnet",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1699
1703
|
},
|
|
1700
|
-
typescript: {
|
|
1701
|
-
method: 'client.networking.vpcs.availability.update',
|
|
1702
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.networking.vpcs.availability.update('vpc_id');",
|
|
1703
|
-
},
|
|
1704
1704
|
},
|
|
1705
1705
|
},
|
|
1706
1706
|
{
|
|
@@ -1723,21 +1723,21 @@ const EMBEDDED_METHODS = [
|
|
|
1723
1723
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1724
1724
|
markdown: "## create\n\n`client.networking.firewallRules.create(vpc_id: string, destination_address: string, destination_ports: string[], name: string, protocol: 'tcp' | 'udp', source_address: string, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**post** `/v1/networking/vpcs/{vpc_id}/firewall_rules`\n\nCreate a firewall rule\n\n### Parameters\n\n- `vpc_id: string`\n\n- `destination_address: string`\n Destination address of the Firewall Rule. Either VPC CIDR or VM in VPC. Must be in network-aligned/canonical form.\n\n- `destination_ports: string[]`\n Destination ports of the Firewall Rule.\n\n- `name: string`\n Name of the Firewall Rule.\n\n- `protocol: 'tcp' | 'udp'`\n Protocol of the Firewall Rule.\n\n- `source_address: string`\n Source address of the Firewall Rule. Address of 0.0.0.0 requires a CIDR mask of 0. Must be in network-aligned/canonical form.\n\n- `tags?: string[]`\n Tags to attach to the Firewall Rule.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.firewallRules.create('vpc_id', {\n destination_address: '10.0.0.0/25',\n destination_ports: ['22', '80', '443'],\n name: 'my-firewall-rule',\n protocol: 'tcp',\n source_address: '0.0.0.0/0',\n});\n\nconsole.log(operation);\n```",
|
|
1725
1725
|
perLanguage: {
|
|
1726
|
-
|
|
1727
|
-
method: '
|
|
1728
|
-
example: "nirvana
|
|
1726
|
+
typescript: {
|
|
1727
|
+
method: 'client.networking.firewallRules.create',
|
|
1728
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.firewallRules.create('vpc_id', {\n destination_address: '10.0.0.0/25',\n destination_ports: ['22', '80', '443'],\n name: 'my-firewall-rule',\n protocol: 'tcp',\n source_address: '0.0.0.0/0',\n});\n\nconsole.log(operation.id);",
|
|
1729
1729
|
},
|
|
1730
1730
|
go: {
|
|
1731
1731
|
method: 'client.Networking.FirewallRules.New',
|
|
1732
1732
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.FirewallRules.New(\n\t\tcontext.TODO(),\n\t\t"vpc_id",\n\t\tnetworking.FirewallRuleNewParams{\n\t\t\tDestinationAddress: "10.0.0.0/25",\n\t\t\tDestinationPorts: []string{"22", "80", "443"},\n\t\t\tName: "my-firewall-rule",\n\t\t\tProtocol: networking.FirewallRuleNewParamsProtocolTcp,\n\t\t\tSourceAddress: "0.0.0.0/0",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1733
1733
|
},
|
|
1734
|
+
cli: {
|
|
1735
|
+
method: 'firewall_rules create',
|
|
1736
|
+
example: "nirvana networking:firewall-rules create \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id \\\n --destination-address 10.0.0.0/25 \\\n --destination-port \"'22'\" \\\n --destination-port \"'80'\" \\\n --destination-port \"'443'\" \\\n --name my-firewall-rule \\\n --protocol tcp \\\n --source-address 0.0.0.0/0",
|
|
1737
|
+
},
|
|
1734
1738
|
http: {
|
|
1735
1739
|
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "destination_address": "10.0.0.0/25",\n "destination_ports": [\n "22",\n "80",\n "443"\n ],\n "name": "my-firewall-rule",\n "protocol": "tcp",\n "source_address": "0.0.0.0/0",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1736
1740
|
},
|
|
1737
|
-
typescript: {
|
|
1738
|
-
method: 'client.networking.firewallRules.create',
|
|
1739
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.firewallRules.create('vpc_id', {\n destination_address: '10.0.0.0/25',\n destination_ports: ['22', '80', '443'],\n name: 'my-firewall-rule',\n protocol: 'tcp',\n source_address: '0.0.0.0/0',\n});\n\nconsole.log(operation.id);",
|
|
1740
|
-
},
|
|
1741
1741
|
},
|
|
1742
1742
|
},
|
|
1743
1743
|
{
|
|
@@ -1752,21 +1752,21 @@ const EMBEDDED_METHODS = [
|
|
|
1752
1752
|
response: "{ id: string; created_at: string; destination_address: string; destination_ports: string[]; name: string; protocol: 'tcp' | 'udp'; source_address: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }",
|
|
1753
1753
|
markdown: "## get\n\n`client.networking.firewallRules.get(vpc_id: string, firewall_rule_id: string): { id: string; created_at: string; destination_address: string; destination_ports: string[]; name: string; protocol: 'tcp' | 'udp'; source_address: string; status: resource_status; tags: string[]; updated_at: string; vpc_id: string; }`\n\n**get** `/v1/networking/vpcs/{vpc_id}/firewall_rules/{firewall_rule_id}`\n\nGet details about a firewall rule\n\n### Parameters\n\n- `vpc_id: string`\n\n- `firewall_rule_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; destination_address: string; destination_ports: string[]; name: string; protocol: 'tcp' | 'udp'; source_address: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }`\n Firewall rule details.\n\n - `id: string`\n - `created_at: string`\n - `destination_address: string`\n - `destination_ports: string[]`\n - `name: string`\n - `protocol: 'tcp' | 'udp'`\n - `source_address: string`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `tags: string[]`\n - `updated_at: string`\n - `vpc_id: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst firewallRule = await client.networking.firewallRules.get('firewall_rule_id', { vpc_id: 'vpc_id' });\n\nconsole.log(firewallRule);\n```",
|
|
1754
1754
|
perLanguage: {
|
|
1755
|
-
|
|
1756
|
-
method: '
|
|
1757
|
-
example: "nirvana
|
|
1755
|
+
typescript: {
|
|
1756
|
+
method: 'client.networking.firewallRules.get',
|
|
1757
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst firewallRule = await client.networking.firewallRules.get('firewall_rule_id', {\n vpc_id: 'vpc_id',\n});\n\nconsole.log(firewallRule.id);",
|
|
1758
1758
|
},
|
|
1759
1759
|
go: {
|
|
1760
1760
|
method: 'client.Networking.FirewallRules.Get',
|
|
1761
1761
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tfirewallRule, err := client.Networking.FirewallRules.Get(\n\t\tcontext.TODO(),\n\t\t"vpc_id",\n\t\t"firewall_rule_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", firewallRule.ID)\n}\n',
|
|
1762
1762
|
},
|
|
1763
|
+
cli: {
|
|
1764
|
+
method: 'firewall_rules get',
|
|
1765
|
+
example: "nirvana networking:firewall-rules get \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id \\\n --firewall-rule-id firewall_rule_id",
|
|
1766
|
+
},
|
|
1763
1767
|
http: {
|
|
1764
1768
|
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules/$FIREWALL_RULE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1765
1769
|
},
|
|
1766
|
-
typescript: {
|
|
1767
|
-
method: 'client.networking.firewallRules.get',
|
|
1768
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst firewallRule = await client.networking.firewallRules.get('firewall_rule_id', {\n vpc_id: 'vpc_id',\n});\n\nconsole.log(firewallRule.id);",
|
|
1769
|
-
},
|
|
1770
1770
|
},
|
|
1771
1771
|
},
|
|
1772
1772
|
{
|
|
@@ -1790,21 +1790,21 @@ const EMBEDDED_METHODS = [
|
|
|
1790
1790
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1791
1791
|
markdown: "## update\n\n`client.networking.firewallRules.update(vpc_id: string, firewall_rule_id: string, destination_address?: string, destination_ports?: string[], name?: string, protocol?: 'tcp' | 'udp', source_address?: string, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**patch** `/v1/networking/vpcs/{vpc_id}/firewall_rules/{firewall_rule_id}`\n\nUpdate a firewall rule\n\n### Parameters\n\n- `vpc_id: string`\n\n- `firewall_rule_id: string`\n\n- `destination_address?: string`\n Destination address of the Firewall Rule. Either VPC CIDR or VM in VPC. Must be in network-aligned/canonical form.\n\n- `destination_ports?: string[]`\n Destination ports of the Firewall Rule.\n\n- `name?: string`\n Name of the Firewall Rule.\n\n- `protocol?: 'tcp' | 'udp'`\n Protocol of the Firewall Rule.\n\n- `source_address?: string`\n Source address of the Firewall Rule. Address of 0.0.0.0 requires a CIDR mask of 0. Must be in network-aligned/canonical form.\n\n- `tags?: string[]`\n Tags to attach to the Firewall Rule.\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.firewallRules.update('firewall_rule_id', { vpc_id: 'vpc_id' });\n\nconsole.log(operation);\n```",
|
|
1792
1792
|
perLanguage: {
|
|
1793
|
-
|
|
1794
|
-
method: '
|
|
1795
|
-
example: "nirvana
|
|
1793
|
+
typescript: {
|
|
1794
|
+
method: 'client.networking.firewallRules.update',
|
|
1795
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.firewallRules.update('firewall_rule_id', {\n vpc_id: 'vpc_id',\n});\n\nconsole.log(operation.id);",
|
|
1796
1796
|
},
|
|
1797
1797
|
go: {
|
|
1798
1798
|
method: 'client.Networking.FirewallRules.Update',
|
|
1799
1799
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.FirewallRules.Update(\n\t\tcontext.TODO(),\n\t\t"vpc_id",\n\t\t"firewall_rule_id",\n\t\tnetworking.FirewallRuleUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1800
1800
|
},
|
|
1801
|
+
cli: {
|
|
1802
|
+
method: 'firewall_rules update',
|
|
1803
|
+
example: "nirvana networking:firewall-rules update \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id \\\n --firewall-rule-id firewall_rule_id",
|
|
1804
|
+
},
|
|
1801
1805
|
http: {
|
|
1802
1806
|
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules/$FIREWALL_RULE_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "destination_address": "10.0.0.0/25",\n "destination_ports": [\n "22",\n "80",\n "443"\n ],\n "name": "my-firewall-rule",\n "protocol": "tcp",\n "source_address": "0.0.0.0/0",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1803
1807
|
},
|
|
1804
|
-
typescript: {
|
|
1805
|
-
method: 'client.networking.firewallRules.update',
|
|
1806
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.firewallRules.update('firewall_rule_id', {\n vpc_id: 'vpc_id',\n});\n\nconsole.log(operation.id);",
|
|
1807
|
-
},
|
|
1808
1808
|
},
|
|
1809
1809
|
},
|
|
1810
1810
|
{
|
|
@@ -1819,21 +1819,21 @@ const EMBEDDED_METHODS = [
|
|
|
1819
1819
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1820
1820
|
markdown: "## delete\n\n`client.networking.firewallRules.delete(vpc_id: string, firewall_rule_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/networking/vpcs/{vpc_id}/firewall_rules/{firewall_rule_id}`\n\nDelete a firewall rule\n\n### Parameters\n\n- `vpc_id: string`\n\n- `firewall_rule_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.firewallRules.delete('firewall_rule_id', { vpc_id: 'vpc_id' });\n\nconsole.log(operation);\n```",
|
|
1821
1821
|
perLanguage: {
|
|
1822
|
-
|
|
1823
|
-
method: '
|
|
1824
|
-
example: "nirvana
|
|
1822
|
+
typescript: {
|
|
1823
|
+
method: 'client.networking.firewallRules.delete',
|
|
1824
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.firewallRules.delete('firewall_rule_id', {\n vpc_id: 'vpc_id',\n});\n\nconsole.log(operation.id);",
|
|
1825
1825
|
},
|
|
1826
1826
|
go: {
|
|
1827
1827
|
method: 'client.Networking.FirewallRules.Delete',
|
|
1828
1828
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.FirewallRules.Delete(\n\t\tcontext.TODO(),\n\t\t"vpc_id",\n\t\t"firewall_rule_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1829
1829
|
},
|
|
1830
|
+
cli: {
|
|
1831
|
+
method: 'firewall_rules delete',
|
|
1832
|
+
example: "nirvana networking:firewall-rules delete \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id \\\n --firewall-rule-id firewall_rule_id",
|
|
1833
|
+
},
|
|
1830
1834
|
http: {
|
|
1831
1835
|
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules/$FIREWALL_RULE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1832
1836
|
},
|
|
1833
|
-
typescript: {
|
|
1834
|
-
method: 'client.networking.firewallRules.delete',
|
|
1835
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.firewallRules.delete('firewall_rule_id', {\n vpc_id: 'vpc_id',\n});\n\nconsole.log(operation.id);",
|
|
1836
|
-
},
|
|
1837
1837
|
},
|
|
1838
1838
|
},
|
|
1839
1839
|
{
|
|
@@ -1848,21 +1848,21 @@ const EMBEDDED_METHODS = [
|
|
|
1848
1848
|
response: "{ id: string; created_at: string; destination_address: string; destination_ports: string[]; name: string; protocol: 'tcp' | 'udp'; source_address: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }",
|
|
1849
1849
|
markdown: "## list\n\n`client.networking.firewallRules.list(vpc_id: string, cursor?: string, limit?: number): { id: string; created_at: string; destination_address: string; destination_ports: string[]; name: string; protocol: 'tcp' | 'udp'; source_address: string; status: resource_status; tags: string[]; updated_at: string; vpc_id: string; }`\n\n**get** `/v1/networking/vpcs/{vpc_id}/firewall_rules`\n\nList all firewall rules\n\n### Parameters\n\n- `vpc_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; destination_address: string; destination_ports: string[]; name: string; protocol: 'tcp' | 'udp'; source_address: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }`\n Firewall rule details.\n\n - `id: string`\n - `created_at: string`\n - `destination_address: string`\n - `destination_ports: string[]`\n - `name: string`\n - `protocol: 'tcp' | 'udp'`\n - `source_address: string`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `tags: string[]`\n - `updated_at: string`\n - `vpc_id: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const firewallRule of client.networking.firewallRules.list('vpc_id')) {\n console.log(firewallRule);\n}\n```",
|
|
1850
1850
|
perLanguage: {
|
|
1851
|
-
|
|
1852
|
-
method: '
|
|
1853
|
-
example: "nirvana
|
|
1851
|
+
typescript: {
|
|
1852
|
+
method: 'client.networking.firewallRules.list',
|
|
1853
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const firewallRule of client.networking.firewallRules.list('vpc_id')) {\n console.log(firewallRule.id);\n}",
|
|
1854
1854
|
},
|
|
1855
1855
|
go: {
|
|
1856
1856
|
method: 'client.Networking.FirewallRules.List',
|
|
1857
1857
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Networking.FirewallRules.List(\n\t\tcontext.TODO(),\n\t\t"vpc_id",\n\t\tnetworking.FirewallRuleListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
1858
1858
|
},
|
|
1859
|
+
cli: {
|
|
1860
|
+
method: 'firewall_rules list',
|
|
1861
|
+
example: "nirvana networking:firewall-rules list \\\n --api-key 'My API Key' \\\n --vpc-id vpc_id",
|
|
1862
|
+
},
|
|
1859
1863
|
http: {
|
|
1860
1864
|
example: 'curl https://api.nirvanalabs.io/v1/networking/vpcs/$VPC_ID/firewall_rules \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1861
1865
|
},
|
|
1862
|
-
typescript: {
|
|
1863
|
-
method: 'client.networking.firewallRules.list',
|
|
1864
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const firewallRule of client.networking.firewallRules.list('vpc_id')) {\n console.log(firewallRule.id);\n}",
|
|
1865
|
-
},
|
|
1866
1866
|
},
|
|
1867
1867
|
},
|
|
1868
1868
|
{
|
|
@@ -1886,21 +1886,21 @@ const EMBEDDED_METHODS = [
|
|
|
1886
1886
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1887
1887
|
markdown: "## create\n\n`client.networking.connect.connections.create(bandwidth_mbps: 50 | 200 | 500 | 1000 | 2000, cidrs: string[], name: string, project_id: string, provider_cidrs: string[], region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1', 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```",
|
|
1888
1888
|
perLanguage: {
|
|
1889
|
-
|
|
1890
|
-
method: 'connections
|
|
1891
|
-
example: "nirvana
|
|
1889
|
+
typescript: {
|
|
1890
|
+
method: 'client.networking.connect.connections.create',
|
|
1891
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.connect.connections.create({\n bandwidth_mbps: 50,\n cidrs: ['10.0.0.0/16'],\n name: 'my-connect-connection',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n provider_cidrs: ['172.16.0.0/16'],\n region: 'us-sva-2',\n});\n\nconsole.log(operation.id);",
|
|
1892
1892
|
},
|
|
1893
1893
|
go: {
|
|
1894
1894
|
method: 'client.Networking.Connect.Connections.New',
|
|
1895
1895
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.Connect.Connections.New(context.TODO(), networking.ConnectConnectionNewParams{\n\t\tBandwidthMbps: 50,\n\t\tCIDRs: []string{"10.0.0.0/16"},\n\t\tName: "my-connect-connection",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tProviderCIDRs: []string{"172.16.0.0/16"},\n\t\tRegion: shared.RegionNameUsSva2,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1896
1896
|
},
|
|
1897
|
+
cli: {
|
|
1898
|
+
method: 'connections create',
|
|
1899
|
+
example: "nirvana networking:connect:connections create \\\n --api-key 'My API Key' \\\n --bandwidth-mbps 50 \\\n --cidr 10.0.0.0/16 \\\n --name my-connect-connection \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --provider-cidr 172.16.0.0/16 \\\n --region us-sva-2",
|
|
1900
|
+
},
|
|
1897
1901
|
http: {
|
|
1898
1902
|
example: 'curl https://api.nirvanalabs.io/v1/networking/connect/connections \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "bandwidth_mbps": 50,\n "cidrs": [\n "10.0.0.0/16"\n ],\n "name": "my-connect-connection",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "provider_cidrs": [\n "172.16.0.0/16"\n ],\n "region": "us-sva-2",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1899
1903
|
},
|
|
1900
|
-
typescript: {
|
|
1901
|
-
method: 'client.networking.connect.connections.create',
|
|
1902
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.connect.connections.create({\n bandwidth_mbps: 50,\n cidrs: ['10.0.0.0/16'],\n name: 'my-connect-connection',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n provider_cidrs: ['172.16.0.0/16'],\n region: 'us-sva-2',\n});\n\nconsole.log(operation.id);",
|
|
1903
|
-
},
|
|
1904
1904
|
},
|
|
1905
1905
|
},
|
|
1906
1906
|
{
|
|
@@ -1915,21 +1915,21 @@ const EMBEDDED_METHODS = [
|
|
|
1915
1915
|
response: "{ id: string; asn: number; aws: { region: string; }; bandwidth_mbps: 50 | 200 | 500 | 1000 | 2000; cidrs: string[]; created_at: string; name: string; project_id: string; provider_asn: number; provider_cidrs: string[]; provider_router_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; router_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }",
|
|
1916
1916
|
markdown: "## get\n\n`client.networking.connect.connections.get(connection_id: string): { id: string; asn: number; aws: connect_connection_aws_config; bandwidth_mbps: connect_bandwidth_mbps; cidrs: string[]; created_at: string; name: string; project_id: string; provider_asn: number; provider_cidrs: string[]; provider_router_ip: string; region: region_name; router_ip: string; status: resource_status; tags: string[]; updated_at: string; }`\n\n**get** `/v1/networking/connect/connections/{connection_id}`\n\nGet Connect Connection details\n\n### Parameters\n\n- `connection_id: string`\n\n### Returns\n\n- `{ id: string; asn: number; aws: { region: string; }; bandwidth_mbps: 50 | 200 | 500 | 1000 | 2000; cidrs: string[]; created_at: string; name: string; project_id: string; provider_asn: number; provider_cidrs: string[]; provider_router_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; 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```",
|
|
1917
1917
|
perLanguage: {
|
|
1918
|
-
|
|
1919
|
-
method: 'connections
|
|
1920
|
-
example: "nirvana
|
|
1918
|
+
typescript: {
|
|
1919
|
+
method: 'client.networking.connect.connections.get',
|
|
1920
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst connectConnection = await client.networking.connect.connections.get('connection_id');\n\nconsole.log(connectConnection.id);",
|
|
1921
1921
|
},
|
|
1922
1922
|
go: {
|
|
1923
1923
|
method: 'client.Networking.Connect.Connections.Get',
|
|
1924
1924
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tconnectConnection, err := client.Networking.Connect.Connections.Get(context.TODO(), "connection_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", connectConnection.ID)\n}\n',
|
|
1925
1925
|
},
|
|
1926
|
+
cli: {
|
|
1927
|
+
method: 'connections get',
|
|
1928
|
+
example: "nirvana networking:connect:connections get \\\n --api-key 'My API Key' \\\n --connection-id connection_id",
|
|
1929
|
+
},
|
|
1926
1930
|
http: {
|
|
1927
1931
|
example: 'curl https://api.nirvanalabs.io/v1/networking/connect/connections/$CONNECTION_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1928
1932
|
},
|
|
1929
|
-
typescript: {
|
|
1930
|
-
method: 'client.networking.connect.connections.get',
|
|
1931
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst connectConnection = await client.networking.connect.connections.get('connection_id');\n\nconsole.log(connectConnection.id);",
|
|
1932
|
-
},
|
|
1933
1933
|
},
|
|
1934
1934
|
},
|
|
1935
1935
|
{
|
|
@@ -1944,21 +1944,21 @@ const EMBEDDED_METHODS = [
|
|
|
1944
1944
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1945
1945
|
markdown: "## update\n\n`client.networking.connect.connections.update(connection_id: string, name?: string, tags?: string[]): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**patch** `/v1/networking/connect/connections/{connection_id}`\n\nUpdate Connect Connection details\n\n### Parameters\n\n- `connection_id: string`\n\n- `name?: string`\n Name of the Connect Connection.\n\n- `tags?: string[]`\n Tags to attach to the Connect Connection\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.connect.connections.update('connection_id');\n\nconsole.log(operation);\n```",
|
|
1946
1946
|
perLanguage: {
|
|
1947
|
-
|
|
1948
|
-
method: 'connections
|
|
1949
|
-
example: "nirvana
|
|
1947
|
+
typescript: {
|
|
1948
|
+
method: 'client.networking.connect.connections.update',
|
|
1949
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.connect.connections.update('connection_id');\n\nconsole.log(operation.id);",
|
|
1950
1950
|
},
|
|
1951
1951
|
go: {
|
|
1952
1952
|
method: 'client.Networking.Connect.Connections.Update',
|
|
1953
1953
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.Connect.Connections.Update(\n\t\tcontext.TODO(),\n\t\t"connection_id",\n\t\tnetworking.ConnectConnectionUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1954
1954
|
},
|
|
1955
|
+
cli: {
|
|
1956
|
+
method: 'connections update',
|
|
1957
|
+
example: "nirvana networking:connect:connections update \\\n --api-key 'My API Key' \\\n --connection-id connection_id",
|
|
1958
|
+
},
|
|
1955
1959
|
http: {
|
|
1956
1960
|
example: 'curl https://api.nirvanalabs.io/v1/networking/connect/connections/$CONNECTION_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-connect-connection",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
1957
1961
|
},
|
|
1958
|
-
typescript: {
|
|
1959
|
-
method: 'client.networking.connect.connections.update',
|
|
1960
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.connect.connections.update('connection_id');\n\nconsole.log(operation.id);",
|
|
1961
|
-
},
|
|
1962
1962
|
},
|
|
1963
1963
|
},
|
|
1964
1964
|
{
|
|
@@ -1973,21 +1973,21 @@ const EMBEDDED_METHODS = [
|
|
|
1973
1973
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
1974
1974
|
markdown: "## delete\n\n`client.networking.connect.connections.delete(connection_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/networking/connect/connections/{connection_id}`\n\nDelete Connect Connection\n\n### Parameters\n\n- `connection_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.networking.connect.connections.delete('connection_id');\n\nconsole.log(operation);\n```",
|
|
1975
1975
|
perLanguage: {
|
|
1976
|
-
|
|
1977
|
-
method: 'connections
|
|
1978
|
-
example: "nirvana
|
|
1976
|
+
typescript: {
|
|
1977
|
+
method: 'client.networking.connect.connections.delete',
|
|
1978
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.connect.connections.delete('connection_id');\n\nconsole.log(operation.id);",
|
|
1979
1979
|
},
|
|
1980
1980
|
go: {
|
|
1981
1981
|
method: 'client.Networking.Connect.Connections.Delete',
|
|
1982
1982
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.Networking.Connect.Connections.Delete(context.TODO(), "connection_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
1983
1983
|
},
|
|
1984
|
+
cli: {
|
|
1985
|
+
method: 'connections delete',
|
|
1986
|
+
example: "nirvana networking:connect:connections delete \\\n --api-key 'My API Key' \\\n --connection-id connection_id",
|
|
1987
|
+
},
|
|
1984
1988
|
http: {
|
|
1985
1989
|
example: 'curl https://api.nirvanalabs.io/v1/networking/connect/connections/$CONNECTION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
1986
1990
|
},
|
|
1987
|
-
typescript: {
|
|
1988
|
-
method: 'client.networking.connect.connections.delete',
|
|
1989
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.networking.connect.connections.delete('connection_id');\n\nconsole.log(operation.id);",
|
|
1990
|
-
},
|
|
1991
1991
|
},
|
|
1992
1992
|
},
|
|
1993
1993
|
{
|
|
@@ -2002,21 +2002,21 @@ const EMBEDDED_METHODS = [
|
|
|
2002
2002
|
response: "{ id: string; asn: number; aws: { region: string; }; bandwidth_mbps: 50 | 200 | 500 | 1000 | 2000; cidrs: string[]; created_at: string; name: string; project_id: string; provider_asn: number; provider_cidrs: string[]; provider_router_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; router_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }",
|
|
2003
2003
|
markdown: "## list\n\n`client.networking.connect.connections.list(project_id: string, cursor?: string, limit?: number): { id: string; asn: number; aws: connect_connection_aws_config; bandwidth_mbps: connect_bandwidth_mbps; cidrs: string[]; created_at: string; name: string; project_id: string; provider_asn: number; provider_cidrs: string[]; provider_router_ip: string; region: region_name; router_ip: string; status: resource_status; tags: string[]; updated_at: string; }`\n\n**get** `/v1/networking/connect/connections`\n\nList all Connect Connections\n\n### Parameters\n\n- `project_id: string`\n Project ID of resources to request\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; asn: number; aws: { region: string; }; bandwidth_mbps: 50 | 200 | 500 | 1000 | 2000; cidrs: string[]; created_at: string; name: string; project_id: string; provider_asn: number; provider_cidrs: string[]; provider_router_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; 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```",
|
|
2004
2004
|
perLanguage: {
|
|
2005
|
-
|
|
2006
|
-
method: 'connections
|
|
2007
|
-
example: "nirvana
|
|
2005
|
+
typescript: {
|
|
2006
|
+
method: 'client.networking.connect.connections.list',
|
|
2007
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const connectConnection of client.networking.connect.connections.list({\n project_id: 'project_id',\n})) {\n console.log(connectConnection.id);\n}",
|
|
2008
2008
|
},
|
|
2009
2009
|
go: {
|
|
2010
2010
|
method: 'client.Networking.Connect.Connections.List',
|
|
2011
2011
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Networking.Connect.Connections.List(context.TODO(), networking.ConnectConnectionListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2012
2012
|
},
|
|
2013
|
+
cli: {
|
|
2014
|
+
method: 'connections list',
|
|
2015
|
+
example: "nirvana networking:connect:connections list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
2016
|
+
},
|
|
2013
2017
|
http: {
|
|
2014
2018
|
example: 'curl https://api.nirvanalabs.io/v1/networking/connect/connections \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2015
2019
|
},
|
|
2016
|
-
typescript: {
|
|
2017
|
-
method: 'client.networking.connect.connections.list',
|
|
2018
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const connectConnection of client.networking.connect.connections.list({\n project_id: 'project_id',\n})) {\n console.log(connectConnection.id);\n}",
|
|
2019
|
-
},
|
|
2020
2020
|
},
|
|
2021
2021
|
},
|
|
2022
2022
|
{
|
|
@@ -2031,21 +2031,21 @@ const EMBEDDED_METHODS = [
|
|
|
2031
2031
|
response: "{ nirvana_region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; provider: string; provider_region: string; }",
|
|
2032
2032
|
markdown: "## list\n\n`client.networking.connect.routes.list(cursor?: string, limit?: number): { nirvana_region: region_name; provider: string; provider_region: string; }`\n\n**get** `/v1/networking/connect/routes`\n\nList all supported routes with regions for Connect.\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ nirvana_region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; 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```",
|
|
2033
2033
|
perLanguage: {
|
|
2034
|
-
|
|
2035
|
-
method: 'routes
|
|
2036
|
-
example: "nirvana
|
|
2034
|
+
typescript: {
|
|
2035
|
+
method: 'client.networking.connect.routes.list',
|
|
2036
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const connectRoute of client.networking.connect.routes.list()) {\n console.log(connectRoute.provider);\n}",
|
|
2037
2037
|
},
|
|
2038
2038
|
go: {
|
|
2039
2039
|
method: 'client.Networking.Connect.Routes.List',
|
|
2040
2040
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/networking"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Networking.Connect.Routes.List(context.TODO(), networking.ConnectRouteListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2041
2041
|
},
|
|
2042
|
+
cli: {
|
|
2043
|
+
method: 'routes list',
|
|
2044
|
+
example: "nirvana networking:connect:routes list \\\n --api-key 'My API Key'",
|
|
2045
|
+
},
|
|
2042
2046
|
http: {
|
|
2043
2047
|
example: 'curl https://api.nirvanalabs.io/v1/networking/connect/routes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2044
2048
|
},
|
|
2045
|
-
typescript: {
|
|
2046
|
-
method: 'client.networking.connect.routes.list',
|
|
2047
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const connectRoute of client.networking.connect.routes.list()) {\n console.log(connectRoute.provider);\n}",
|
|
2048
|
-
},
|
|
2049
2049
|
},
|
|
2050
2050
|
},
|
|
2051
2051
|
{
|
|
@@ -2066,21 +2066,21 @@ const EMBEDDED_METHODS = [
|
|
|
2066
2066
|
response: '{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }',
|
|
2067
2067
|
markdown: "## create\n\n`client.rpcNodes.flex.create(blockchain: string, name: string, network: string, project_id: string, tags?: string[]): { id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n\n**post** `/v1/rpc_nodes/flex`\n\nCreate a new RPC Node Flex\n\n### Parameters\n\n- `blockchain: string`\n Blockchain.\n\n- `name: string`\n Name of the RPC Node Flex.\n\n- `network: string`\n Network type (e.g., mainnet, testnet).\n\n- `project_id: string`\n Project ID to associate with the RPC Node Flex.\n\n- `tags?: string[]`\n Tags to attach to the RPC Node Flex (optional, max 50).\n\n### Returns\n\n- `{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n RPC Node Flex details.\n\n - `id: string`\n - `blockchain: string`\n - `created_at: string`\n - `endpoint: string`\n - `name: string`\n - `network: string`\n - `project_id: string`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst flex = await client.rpcNodes.flex.create({\n blockchain: 'ethereum',\n name: 'my-ethereum-node',\n network: 'mainnet',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(flex);\n```",
|
|
2068
2068
|
perLanguage: {
|
|
2069
|
-
|
|
2070
|
-
method: 'flex
|
|
2071
|
-
example: "nirvana
|
|
2069
|
+
typescript: {
|
|
2070
|
+
method: 'client.rpcNodes.flex.create',
|
|
2071
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst flex = await client.rpcNodes.flex.create({\n blockchain: 'ethereum',\n name: 'my-ethereum-node',\n network: 'mainnet',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(flex.id);",
|
|
2072
2072
|
},
|
|
2073
2073
|
go: {
|
|
2074
2074
|
method: 'client.RPCNodes.Flex.New',
|
|
2075
2075
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/rpc_nodes"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tflex, err := client.RPCNodes.Flex.New(context.TODO(), rpc_nodes.FlexNewParams{\n\t\tBlockchain: "ethereum",\n\t\tName: "my-ethereum-node",\n\t\tNetwork: "mainnet",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", flex.ID)\n}\n',
|
|
2076
2076
|
},
|
|
2077
|
+
cli: {
|
|
2078
|
+
method: 'flex create',
|
|
2079
|
+
example: "nirvana rpc-nodes:flex create \\\n --api-key 'My API Key' \\\n --blockchain ethereum \\\n --name my-ethereum-node \\\n --network mainnet \\\n --project-id 123e4567-e89b-12d3-a456-426614174000",
|
|
2080
|
+
},
|
|
2077
2081
|
http: {
|
|
2078
2082
|
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "blockchain": "ethereum",\n "name": "my-ethereum-node",\n "network": "mainnet",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2079
2083
|
},
|
|
2080
|
-
typescript: {
|
|
2081
|
-
method: 'client.rpcNodes.flex.create',
|
|
2082
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst flex = await client.rpcNodes.flex.create({\n blockchain: 'ethereum',\n name: 'my-ethereum-node',\n network: 'mainnet',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(flex.id);",
|
|
2083
|
-
},
|
|
2084
2084
|
},
|
|
2085
2085
|
},
|
|
2086
2086
|
{
|
|
@@ -2095,21 +2095,21 @@ const EMBEDDED_METHODS = [
|
|
|
2095
2095
|
response: '{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }',
|
|
2096
2096
|
markdown: "## get\n\n`client.rpcNodes.flex.get(node_id: string): { id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n\n**get** `/v1/rpc_nodes/flex/{node_id}`\n\nGet details about an RPC Node Flex\n\n### Parameters\n\n- `node_id: string`\n\n### Returns\n\n- `{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n RPC Node Flex details.\n\n - `id: string`\n - `blockchain: string`\n - `created_at: string`\n - `endpoint: string`\n - `name: string`\n - `network: string`\n - `project_id: string`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst flex = await client.rpcNodes.flex.get('node_id');\n\nconsole.log(flex);\n```",
|
|
2097
2097
|
perLanguage: {
|
|
2098
|
-
|
|
2099
|
-
method: 'flex
|
|
2100
|
-
example: "nirvana
|
|
2098
|
+
typescript: {
|
|
2099
|
+
method: 'client.rpcNodes.flex.get',
|
|
2100
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst flex = await client.rpcNodes.flex.get('node_id');\n\nconsole.log(flex.id);",
|
|
2101
2101
|
},
|
|
2102
2102
|
go: {
|
|
2103
2103
|
method: 'client.RPCNodes.Flex.Get',
|
|
2104
2104
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tflex, err := client.RPCNodes.Flex.Get(context.TODO(), "node_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", flex.ID)\n}\n',
|
|
2105
2105
|
},
|
|
2106
|
+
cli: {
|
|
2107
|
+
method: 'flex get',
|
|
2108
|
+
example: "nirvana rpc-nodes:flex get \\\n --api-key 'My API Key' \\\n --node-id node_id",
|
|
2109
|
+
},
|
|
2106
2110
|
http: {
|
|
2107
2111
|
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/$NODE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2108
2112
|
},
|
|
2109
|
-
typescript: {
|
|
2110
|
-
method: 'client.rpcNodes.flex.get',
|
|
2111
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst flex = await client.rpcNodes.flex.get('node_id');\n\nconsole.log(flex.id);",
|
|
2112
|
-
},
|
|
2113
2113
|
},
|
|
2114
2114
|
},
|
|
2115
2115
|
{
|
|
@@ -2124,21 +2124,21 @@ const EMBEDDED_METHODS = [
|
|
|
2124
2124
|
response: '{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }',
|
|
2125
2125
|
markdown: "## update\n\n`client.rpcNodes.flex.update(node_id: string, name?: string, tags?: string[]): { id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n\n**patch** `/v1/rpc_nodes/flex/{node_id}`\n\nUpdate an existing RPC Node Flex\n\n### Parameters\n\n- `node_id: string`\n\n- `name?: string`\n Name of the RPC Node Flex.\n\n- `tags?: string[]`\n Tags to attach to the RPC Node Flex (optional, max 50).\n\n### Returns\n\n- `{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n RPC Node Flex details.\n\n - `id: string`\n - `blockchain: string`\n - `created_at: string`\n - `endpoint: string`\n - `name: string`\n - `network: string`\n - `project_id: string`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst flex = await client.rpcNodes.flex.update('node_id');\n\nconsole.log(flex);\n```",
|
|
2126
2126
|
perLanguage: {
|
|
2127
|
-
|
|
2128
|
-
method: 'flex
|
|
2129
|
-
example: "nirvana
|
|
2127
|
+
typescript: {
|
|
2128
|
+
method: 'client.rpcNodes.flex.update',
|
|
2129
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst flex = await client.rpcNodes.flex.update('node_id');\n\nconsole.log(flex.id);",
|
|
2130
2130
|
},
|
|
2131
2131
|
go: {
|
|
2132
2132
|
method: 'client.RPCNodes.Flex.Update',
|
|
2133
2133
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/rpc_nodes"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tflex, err := client.RPCNodes.Flex.Update(\n\t\tcontext.TODO(),\n\t\t"node_id",\n\t\trpc_nodes.FlexUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", flex.ID)\n}\n',
|
|
2134
2134
|
},
|
|
2135
|
+
cli: {
|
|
2136
|
+
method: 'flex update',
|
|
2137
|
+
example: "nirvana rpc-nodes:flex update \\\n --api-key 'My API Key' \\\n --node-id node_id",
|
|
2138
|
+
},
|
|
2135
2139
|
http: {
|
|
2136
2140
|
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/$NODE_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-ethereum-node",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2137
2141
|
},
|
|
2138
|
-
typescript: {
|
|
2139
|
-
method: 'client.rpcNodes.flex.update',
|
|
2140
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst flex = await client.rpcNodes.flex.update('node_id');\n\nconsole.log(flex.id);",
|
|
2141
|
-
},
|
|
2142
2142
|
},
|
|
2143
2143
|
},
|
|
2144
2144
|
{
|
|
@@ -2152,21 +2152,21 @@ const EMBEDDED_METHODS = [
|
|
|
2152
2152
|
params: ['node_id: string;'],
|
|
2153
2153
|
markdown: "## delete\n\n`client.rpcNodes.flex.delete(node_id: string): void`\n\n**delete** `/v1/rpc_nodes/flex/{node_id}`\n\nDelete an RPC Node Flex\n\n### Parameters\n\n- `node_id: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.rpcNodes.flex.delete('node_id')\n```",
|
|
2154
2154
|
perLanguage: {
|
|
2155
|
-
|
|
2156
|
-
method: 'flex
|
|
2157
|
-
example: "nirvana
|
|
2155
|
+
typescript: {
|
|
2156
|
+
method: 'client.rpcNodes.flex.delete',
|
|
2157
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.rpcNodes.flex.delete('node_id');",
|
|
2158
2158
|
},
|
|
2159
2159
|
go: {
|
|
2160
2160
|
method: 'client.RPCNodes.Flex.Delete',
|
|
2161
2161
|
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.RPCNodes.Flex.Delete(context.TODO(), "node_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
2162
2162
|
},
|
|
2163
|
+
cli: {
|
|
2164
|
+
method: 'flex delete',
|
|
2165
|
+
example: "nirvana rpc-nodes:flex delete \\\n --api-key 'My API Key' \\\n --node-id node_id",
|
|
2166
|
+
},
|
|
2163
2167
|
http: {
|
|
2164
2168
|
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/$NODE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2165
2169
|
},
|
|
2166
|
-
typescript: {
|
|
2167
|
-
method: 'client.rpcNodes.flex.delete',
|
|
2168
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.rpcNodes.flex.delete('node_id');",
|
|
2169
|
-
},
|
|
2170
2170
|
},
|
|
2171
2171
|
},
|
|
2172
2172
|
{
|
|
@@ -2181,21 +2181,21 @@ const EMBEDDED_METHODS = [
|
|
|
2181
2181
|
response: '{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }',
|
|
2182
2182
|
markdown: "## list\n\n`client.rpcNodes.flex.list(project_id: string, cursor?: string, limit?: number): { id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n\n**get** `/v1/rpc_nodes/flex`\n\nList all RPC Node Flex you created\n\n### Parameters\n\n- `project_id: string`\n Project ID of resources to request\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n RPC Node Flex details.\n\n - `id: string`\n - `blockchain: string`\n - `created_at: string`\n - `endpoint: string`\n - `name: string`\n - `network: string`\n - `project_id: string`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const flex of client.rpcNodes.flex.list({ project_id: 'project_id' })) {\n console.log(flex);\n}\n```",
|
|
2183
2183
|
perLanguage: {
|
|
2184
|
-
|
|
2185
|
-
method: 'flex
|
|
2186
|
-
example: "nirvana
|
|
2184
|
+
typescript: {
|
|
2185
|
+
method: 'client.rpcNodes.flex.list',
|
|
2186
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const flex of client.rpcNodes.flex.list({ project_id: 'project_id' })) {\n console.log(flex.id);\n}",
|
|
2187
2187
|
},
|
|
2188
2188
|
go: {
|
|
2189
2189
|
method: 'client.RPCNodes.Flex.List',
|
|
2190
2190
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/rpc_nodes"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.RPCNodes.Flex.List(context.TODO(), rpc_nodes.FlexListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2191
2191
|
},
|
|
2192
|
+
cli: {
|
|
2193
|
+
method: 'flex list',
|
|
2194
|
+
example: "nirvana rpc-nodes:flex list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
2195
|
+
},
|
|
2192
2196
|
http: {
|
|
2193
2197
|
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2194
2198
|
},
|
|
2195
|
-
typescript: {
|
|
2196
|
-
method: 'client.rpcNodes.flex.list',
|
|
2197
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const flex of client.rpcNodes.flex.list({ project_id: 'project_id' })) {\n console.log(flex.id);\n}",
|
|
2198
|
-
},
|
|
2199
2199
|
},
|
|
2200
2200
|
},
|
|
2201
2201
|
{
|
|
@@ -2210,21 +2210,21 @@ const EMBEDDED_METHODS = [
|
|
|
2210
2210
|
response: '{ blockchain: string; network: string; }',
|
|
2211
2211
|
markdown: "## list\n\n`client.rpcNodes.flex.blockchains.list(cursor?: string, limit?: number): { blockchain: string; network: string; }`\n\n**get** `/v1/rpc_nodes/flex/blockchains`\n\nList all Flex Blockchains\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ blockchain: string; network: string; }`\n Blockchain supported by the RPC Node Flex.\n\n - `blockchain: string`\n - `network: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const flexBlockchain of client.rpcNodes.flex.blockchains.list()) {\n console.log(flexBlockchain);\n}\n```",
|
|
2212
2212
|
perLanguage: {
|
|
2213
|
-
|
|
2214
|
-
method: 'blockchains
|
|
2215
|
-
example: "nirvana
|
|
2213
|
+
typescript: {
|
|
2214
|
+
method: 'client.rpcNodes.flex.blockchains.list',
|
|
2215
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const flexBlockchain of client.rpcNodes.flex.blockchains.list()) {\n console.log(flexBlockchain.blockchain);\n}",
|
|
2216
2216
|
},
|
|
2217
2217
|
go: {
|
|
2218
2218
|
method: 'client.RPCNodes.Flex.Blockchains.List',
|
|
2219
2219
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/rpc_nodes"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.RPCNodes.Flex.Blockchains.List(context.TODO(), rpc_nodes.FlexBlockchainListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2220
2220
|
},
|
|
2221
|
+
cli: {
|
|
2222
|
+
method: 'blockchains list',
|
|
2223
|
+
example: "nirvana rpc-nodes:flex:blockchains list \\\n --api-key 'My API Key'",
|
|
2224
|
+
},
|
|
2221
2225
|
http: {
|
|
2222
2226
|
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/flex/blockchains \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2223
2227
|
},
|
|
2224
|
-
typescript: {
|
|
2225
|
-
method: 'client.rpcNodes.flex.blockchains.list',
|
|
2226
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const flexBlockchain of client.rpcNodes.flex.blockchains.list()) {\n console.log(flexBlockchain.blockchain);\n}",
|
|
2227
|
-
},
|
|
2228
2228
|
},
|
|
2229
2229
|
},
|
|
2230
2230
|
{
|
|
@@ -2239,21 +2239,21 @@ const EMBEDDED_METHODS = [
|
|
|
2239
2239
|
response: '{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }',
|
|
2240
2240
|
markdown: "## get\n\n`client.rpcNodes.dedicated.get(node_id: string): { id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n\n**get** `/v1/rpc_nodes/dedicated/{node_id}`\n\nGet details about an RPC Node Dedicated\n\n### Parameters\n\n- `node_id: string`\n\n### Returns\n\n- `{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n RPC Node Dedicated details.\n\n - `id: string`\n - `blockchain: string`\n - `created_at: string`\n - `endpoint: string`\n - `name: string`\n - `network: string`\n - `project_id: string`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst dedicated = await client.rpcNodes.dedicated.get('node_id');\n\nconsole.log(dedicated);\n```",
|
|
2241
2241
|
perLanguage: {
|
|
2242
|
-
|
|
2243
|
-
method: 'dedicated
|
|
2244
|
-
example: "nirvana
|
|
2242
|
+
typescript: {
|
|
2243
|
+
method: 'client.rpcNodes.dedicated.get',
|
|
2244
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst dedicated = await client.rpcNodes.dedicated.get('node_id');\n\nconsole.log(dedicated.id);",
|
|
2245
2245
|
},
|
|
2246
2246
|
go: {
|
|
2247
2247
|
method: 'client.RPCNodes.Dedicated.Get',
|
|
2248
2248
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdedicated, err := client.RPCNodes.Dedicated.Get(context.TODO(), "node_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dedicated.ID)\n}\n',
|
|
2249
2249
|
},
|
|
2250
|
+
cli: {
|
|
2251
|
+
method: 'dedicated get',
|
|
2252
|
+
example: "nirvana rpc-nodes:dedicated get \\\n --api-key 'My API Key' \\\n --node-id node_id",
|
|
2253
|
+
},
|
|
2250
2254
|
http: {
|
|
2251
2255
|
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/dedicated/$NODE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2252
2256
|
},
|
|
2253
|
-
typescript: {
|
|
2254
|
-
method: 'client.rpcNodes.dedicated.get',
|
|
2255
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst dedicated = await client.rpcNodes.dedicated.get('node_id');\n\nconsole.log(dedicated.id);",
|
|
2256
|
-
},
|
|
2257
2257
|
},
|
|
2258
2258
|
},
|
|
2259
2259
|
{
|
|
@@ -2268,21 +2268,21 @@ const EMBEDDED_METHODS = [
|
|
|
2268
2268
|
response: '{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }',
|
|
2269
2269
|
markdown: "## list\n\n`client.rpcNodes.dedicated.list(project_id: string, cursor?: string, limit?: number): { id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n\n**get** `/v1/rpc_nodes/dedicated`\n\nList all RPC Node Dedicated you created\n\n### Parameters\n\n- `project_id: string`\n Project ID of resources to request\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; blockchain: string; created_at: string; endpoint: string; name: string; network: string; project_id: string; tags: string[]; updated_at: string; }`\n RPC Node Dedicated details.\n\n - `id: string`\n - `blockchain: string`\n - `created_at: string`\n - `endpoint: string`\n - `name: string`\n - `network: string`\n - `project_id: string`\n - `tags: string[]`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const dedicated of client.rpcNodes.dedicated.list({ project_id: 'project_id' })) {\n console.log(dedicated);\n}\n```",
|
|
2270
2270
|
perLanguage: {
|
|
2271
|
-
|
|
2272
|
-
method: 'dedicated
|
|
2273
|
-
example: "nirvana
|
|
2271
|
+
typescript: {
|
|
2272
|
+
method: 'client.rpcNodes.dedicated.list',
|
|
2273
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const dedicated of client.rpcNodes.dedicated.list({ project_id: 'project_id' })) {\n console.log(dedicated.id);\n}",
|
|
2274
2274
|
},
|
|
2275
2275
|
go: {
|
|
2276
2276
|
method: 'client.RPCNodes.Dedicated.List',
|
|
2277
2277
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/rpc_nodes"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.RPCNodes.Dedicated.List(context.TODO(), rpc_nodes.DedicatedListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2278
2278
|
},
|
|
2279
|
+
cli: {
|
|
2280
|
+
method: 'dedicated list',
|
|
2281
|
+
example: "nirvana rpc-nodes:dedicated list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
2282
|
+
},
|
|
2279
2283
|
http: {
|
|
2280
2284
|
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/dedicated \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2281
2285
|
},
|
|
2282
|
-
typescript: {
|
|
2283
|
-
method: 'client.rpcNodes.dedicated.list',
|
|
2284
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const dedicated of client.rpcNodes.dedicated.list({ project_id: 'project_id' })) {\n console.log(dedicated.id);\n}",
|
|
2285
|
-
},
|
|
2286
2286
|
},
|
|
2287
2287
|
},
|
|
2288
2288
|
{
|
|
@@ -2297,21 +2297,21 @@ const EMBEDDED_METHODS = [
|
|
|
2297
2297
|
response: '{ blockchain: string; network: string; }',
|
|
2298
2298
|
markdown: "## list\n\n`client.rpcNodes.dedicated.blockchains.list(cursor?: string, limit?: number): { blockchain: string; network: string; }`\n\n**get** `/v1/rpc_nodes/dedicated/blockchains`\n\nList all Dedicated Blockchains\n\n### Parameters\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ blockchain: string; network: string; }`\n Blockchain supported by the RPC Node Dedicated.\n\n - `blockchain: string`\n - `network: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const dedicatedBlockchain of client.rpcNodes.dedicated.blockchains.list()) {\n console.log(dedicatedBlockchain);\n}\n```",
|
|
2299
2299
|
perLanguage: {
|
|
2300
|
-
|
|
2301
|
-
method: 'blockchains
|
|
2302
|
-
example: "nirvana
|
|
2300
|
+
typescript: {
|
|
2301
|
+
method: 'client.rpcNodes.dedicated.blockchains.list',
|
|
2302
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const dedicatedBlockchain of client.rpcNodes.dedicated.blockchains.list()) {\n console.log(dedicatedBlockchain.blockchain);\n}",
|
|
2303
2303
|
},
|
|
2304
2304
|
go: {
|
|
2305
2305
|
method: 'client.RPCNodes.Dedicated.Blockchains.List',
|
|
2306
2306
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/rpc_nodes"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.RPCNodes.Dedicated.Blockchains.List(context.TODO(), rpc_nodes.DedicatedBlockchainListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2307
2307
|
},
|
|
2308
|
+
cli: {
|
|
2309
|
+
method: 'blockchains list',
|
|
2310
|
+
example: "nirvana rpc-nodes:dedicated:blockchains list \\\n --api-key 'My API Key'",
|
|
2311
|
+
},
|
|
2308
2312
|
http: {
|
|
2309
2313
|
example: 'curl https://api.nirvanalabs.io/v1/rpc_nodes/dedicated/blockchains \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2310
2314
|
},
|
|
2311
|
-
typescript: {
|
|
2312
|
-
method: 'client.rpcNodes.dedicated.blockchains.list',
|
|
2313
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const dedicatedBlockchain of client.rpcNodes.dedicated.blockchains.list()) {\n console.log(dedicatedBlockchain.blockchain);\n}",
|
|
2314
|
-
},
|
|
2315
2315
|
},
|
|
2316
2316
|
},
|
|
2317
2317
|
{
|
|
@@ -2332,21 +2332,21 @@ const EMBEDDED_METHODS = [
|
|
|
2332
2332
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
2333
2333
|
markdown: "## 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```",
|
|
2334
2334
|
perLanguage: {
|
|
2335
|
-
|
|
2336
|
-
method: 'clusters
|
|
2337
|
-
example: "nirvana
|
|
2335
|
+
typescript: {
|
|
2336
|
+
method: 'client.nks.clusters.create',
|
|
2337
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.create({\n name: 'my-cluster',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n vpc_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);",
|
|
2338
2338
|
},
|
|
2339
2339
|
go: {
|
|
2340
2340
|
method: 'client.NKS.Clusters.New',
|
|
2341
2341
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.NKS.Clusters.New(context.TODO(), nks.ClusterNewParams{\n\t\tName: "my-cluster",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tRegion: shared.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',
|
|
2342
2342
|
},
|
|
2343
|
+
cli: {
|
|
2344
|
+
method: 'clusters create',
|
|
2345
|
+
example: "nirvana nks:clusters create \\\n --api-key 'My API Key' \\\n --name my-cluster \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-sva-2 \\\n --vpc-id 123e4567-e89b-12d3-a456-426614174000",
|
|
2346
|
+
},
|
|
2343
2347
|
http: {
|
|
2344
2348
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-cluster",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "vpc_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2345
2349
|
},
|
|
2346
|
-
typescript: {
|
|
2347
|
-
method: 'client.nks.clusters.create',
|
|
2348
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.create({\n name: 'my-cluster',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n vpc_id: '123e4567-e89b-12d3-a456-426614174000',\n});\n\nconsole.log(operation.id);",
|
|
2349
|
-
},
|
|
2350
2350
|
},
|
|
2351
2351
|
},
|
|
2352
2352
|
{
|
|
@@ -2361,21 +2361,21 @@ const EMBEDDED_METHODS = [
|
|
|
2361
2361
|
response: "{ id: string; created_at: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }",
|
|
2362
2362
|
markdown: "## get\n\n`client.nks.clusters.get(cluster_id: string): { id: string; created_at: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: region_name; status: resource_status; tags: string[]; updated_at: string; vpc_id: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}`\n\nGet details about an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; 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```",
|
|
2363
2363
|
perLanguage: {
|
|
2364
|
-
|
|
2365
|
-
method: 'clusters
|
|
2366
|
-
example: "nirvana
|
|
2364
|
+
typescript: {
|
|
2365
|
+
method: 'client.nks.clusters.get',
|
|
2366
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksCluster = await client.nks.clusters.get('cluster_id');\n\nconsole.log(nksCluster.id);",
|
|
2367
2367
|
},
|
|
2368
2368
|
go: {
|
|
2369
2369
|
method: 'client.NKS.Clusters.Get',
|
|
2370
2370
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksCluster, err := client.NKS.Clusters.Get(context.TODO(), "cluster_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksCluster.ID)\n}\n',
|
|
2371
2371
|
},
|
|
2372
|
+
cli: {
|
|
2373
|
+
method: 'clusters get',
|
|
2374
|
+
example: "nirvana nks:clusters get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2375
|
+
},
|
|
2372
2376
|
http: {
|
|
2373
2377
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2374
2378
|
},
|
|
2375
|
-
typescript: {
|
|
2376
|
-
method: 'client.nks.clusters.get',
|
|
2377
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksCluster = await client.nks.clusters.get('cluster_id');\n\nconsole.log(nksCluster.id);",
|
|
2378
|
-
},
|
|
2379
2379
|
},
|
|
2380
2380
|
},
|
|
2381
2381
|
{
|
|
@@ -2390,21 +2390,21 @@ const EMBEDDED_METHODS = [
|
|
|
2390
2390
|
response: "{ id: string; created_at: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }",
|
|
2391
2391
|
markdown: "## update\n\n`client.nks.clusters.update(cluster_id: string, name?: string, tags?: string[]): { id: string; created_at: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: region_name; status: resource_status; tags: string[]; updated_at: string; vpc_id: string; }`\n\n**patch** `/v1/nks/clusters/{cluster_id}`\n\nUpdate an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `name?: string`\n Name of the Cluster.\n\n- `tags?: string[]`\n Tags to attach to the Cluster.\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; 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```",
|
|
2392
2392
|
perLanguage: {
|
|
2393
|
-
|
|
2394
|
-
method: 'clusters
|
|
2395
|
-
example: "nirvana
|
|
2393
|
+
typescript: {
|
|
2394
|
+
method: 'client.nks.clusters.update',
|
|
2395
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksCluster = await client.nks.clusters.update('cluster_id');\n\nconsole.log(nksCluster.id);",
|
|
2396
2396
|
},
|
|
2397
2397
|
go: {
|
|
2398
2398
|
method: 'client.NKS.Clusters.Update',
|
|
2399
2399
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksCluster, err := client.NKS.Clusters.Update(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksCluster.ID)\n}\n',
|
|
2400
2400
|
},
|
|
2401
|
+
cli: {
|
|
2402
|
+
method: 'clusters update',
|
|
2403
|
+
example: "nirvana nks:clusters update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2404
|
+
},
|
|
2401
2405
|
http: {
|
|
2402
2406
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-cluster",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2403
2407
|
},
|
|
2404
|
-
typescript: {
|
|
2405
|
-
method: 'client.nks.clusters.update',
|
|
2406
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksCluster = await client.nks.clusters.update('cluster_id');\n\nconsole.log(nksCluster.id);",
|
|
2407
|
-
},
|
|
2408
2408
|
},
|
|
2409
2409
|
},
|
|
2410
2410
|
{
|
|
@@ -2419,21 +2419,21 @@ const EMBEDDED_METHODS = [
|
|
|
2419
2419
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
2420
2420
|
markdown: "## delete\n\n`client.nks.clusters.delete(cluster_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/nks/clusters/{cluster_id}`\n\nDelete an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.nks.clusters.delete('cluster_id');\n\nconsole.log(operation);\n```",
|
|
2421
2421
|
perLanguage: {
|
|
2422
|
-
|
|
2423
|
-
method: 'clusters
|
|
2424
|
-
example: "nirvana
|
|
2422
|
+
typescript: {
|
|
2423
|
+
method: 'client.nks.clusters.delete',
|
|
2424
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.delete('cluster_id');\n\nconsole.log(operation.id);",
|
|
2425
2425
|
},
|
|
2426
2426
|
go: {
|
|
2427
2427
|
method: 'client.NKS.Clusters.Delete',
|
|
2428
2428
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.NKS.Clusters.Delete(context.TODO(), "cluster_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
2429
2429
|
},
|
|
2430
|
+
cli: {
|
|
2431
|
+
method: 'clusters delete',
|
|
2432
|
+
example: "nirvana nks:clusters delete \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2433
|
+
},
|
|
2430
2434
|
http: {
|
|
2431
2435
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2432
2436
|
},
|
|
2433
|
-
typescript: {
|
|
2434
|
-
method: 'client.nks.clusters.delete',
|
|
2435
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.delete('cluster_id');\n\nconsole.log(operation.id);",
|
|
2436
|
-
},
|
|
2437
2437
|
},
|
|
2438
2438
|
},
|
|
2439
2439
|
{
|
|
@@ -2448,21 +2448,21 @@ const EMBEDDED_METHODS = [
|
|
|
2448
2448
|
response: "{ id: string; created_at: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; vpc_id: string; }",
|
|
2449
2449
|
markdown: "## list\n\n`client.nks.clusters.list(project_id: string, cursor?: string, limit?: number): { id: string; created_at: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: region_name; status: resource_status; tags: string[]; updated_at: string; vpc_id: string; }`\n\n**get** `/v1/nks/clusters`\n\nList all NKS clusters\n\n### Parameters\n\n- `project_id: string`\n Project ID of resources to request\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; pool_ids: string[]; private_ip: string; project_id: string; public_ip: string; region: 'us-sva-1' | 'us-sva-2' | 'us-chi-1'; 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```",
|
|
2450
2450
|
perLanguage: {
|
|
2451
|
-
|
|
2452
|
-
method: 'clusters
|
|
2453
|
-
example: "nirvana
|
|
2451
|
+
typescript: {
|
|
2452
|
+
method: 'client.nks.clusters.list',
|
|
2453
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksCluster of client.nks.clusters.list({ project_id: 'project_id' })) {\n console.log(nksCluster.id);\n}",
|
|
2454
2454
|
},
|
|
2455
2455
|
go: {
|
|
2456
2456
|
method: 'client.NKS.Clusters.List',
|
|
2457
2457
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.List(context.TODO(), nks.ClusterListParams{\n\t\tProjectID: "project_id",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2458
2458
|
},
|
|
2459
|
+
cli: {
|
|
2460
|
+
method: 'clusters list',
|
|
2461
|
+
example: "nirvana nks:clusters list \\\n --api-key 'My API Key' \\\n --project-id project_id",
|
|
2462
|
+
},
|
|
2459
2463
|
http: {
|
|
2460
2464
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2461
2465
|
},
|
|
2462
|
-
typescript: {
|
|
2463
|
-
method: 'client.nks.clusters.list',
|
|
2464
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksCluster of client.nks.clusters.list({ project_id: 'project_id' })) {\n console.log(nksCluster.id);\n}",
|
|
2465
|
-
},
|
|
2466
2466
|
},
|
|
2467
2467
|
},
|
|
2468
2468
|
{
|
|
@@ -2482,21 +2482,21 @@ const EMBEDDED_METHODS = [
|
|
|
2482
2482
|
],
|
|
2483
2483
|
markdown: "## 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```",
|
|
2484
2484
|
perLanguage: {
|
|
2485
|
-
|
|
2486
|
-
method: 'availability
|
|
2487
|
-
example: "nirvana
|
|
2485
|
+
typescript: {
|
|
2486
|
+
method: 'client.nks.clusters.availability.create',
|
|
2487
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.availability.create({\n name: 'my-cluster',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n vpc_id: '123e4567-e89b-12d3-a456-426614174000',\n});",
|
|
2488
2488
|
},
|
|
2489
2489
|
go: {
|
|
2490
2490
|
method: 'client.NKS.Clusters.Availability.New',
|
|
2491
2491
|
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n\t"github.com/nirvana-labs/nirvana-go/shared"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.NKS.Clusters.Availability.New(context.TODO(), nks.ClusterAvailabilityNewParams{\n\t\tName: "my-cluster",\n\t\tProjectID: "123e4567-e89b-12d3-a456-426614174000",\n\t\tRegion: shared.RegionNameUsSva2,\n\t\tVPCID: "123e4567-e89b-12d3-a456-426614174000",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
2492
2492
|
},
|
|
2493
|
+
cli: {
|
|
2494
|
+
method: 'availability create',
|
|
2495
|
+
example: "nirvana nks:clusters:availability create \\\n --api-key 'My API Key' \\\n --name my-cluster \\\n --project-id 123e4567-e89b-12d3-a456-426614174000 \\\n --region us-sva-2 \\\n --vpc-id 123e4567-e89b-12d3-a456-426614174000",
|
|
2496
|
+
},
|
|
2493
2497
|
http: {
|
|
2494
2498
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-cluster",\n "project_id": "123e4567-e89b-12d3-a456-426614174000",\n "region": "us-sva-2",\n "vpc_id": "123e4567-e89b-12d3-a456-426614174000",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2495
2499
|
},
|
|
2496
|
-
typescript: {
|
|
2497
|
-
method: 'client.nks.clusters.availability.create',
|
|
2498
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.availability.create({\n name: 'my-cluster',\n project_id: '123e4567-e89b-12d3-a456-426614174000',\n region: 'us-sva-2',\n vpc_id: '123e4567-e89b-12d3-a456-426614174000',\n});",
|
|
2499
|
-
},
|
|
2500
2500
|
},
|
|
2501
2501
|
},
|
|
2502
2502
|
{
|
|
@@ -2510,21 +2510,21 @@ const EMBEDDED_METHODS = [
|
|
|
2510
2510
|
params: ['cluster_id: string;', 'name?: string;', 'tags?: string[];'],
|
|
2511
2511
|
markdown: "## update\n\n`client.nks.clusters.availability.update(cluster_id: string, name?: string, tags?: string[]): void`\n\n**patch** `/v1/nks/clusters/{cluster_id}/availability`\n\nCheck if an NKS cluster can be updated\n\n### Parameters\n\n- `cluster_id: string`\n\n- `name?: string`\n Name of the Cluster.\n\n- `tags?: string[]`\n Tags to attach to the Cluster.\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nawait client.nks.clusters.availability.update('cluster_id')\n```",
|
|
2512
2512
|
perLanguage: {
|
|
2513
|
-
|
|
2514
|
-
method: 'availability
|
|
2515
|
-
example: "nirvana
|
|
2513
|
+
typescript: {
|
|
2514
|
+
method: 'client.nks.clusters.availability.update',
|
|
2515
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.availability.update('cluster_id');",
|
|
2516
2516
|
},
|
|
2517
2517
|
go: {
|
|
2518
2518
|
method: 'client.NKS.Clusters.Availability.Update',
|
|
2519
2519
|
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.NKS.Clusters.Availability.Update(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterAvailabilityUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
2520
2520
|
},
|
|
2521
|
+
cli: {
|
|
2522
|
+
method: 'availability update',
|
|
2523
|
+
example: "nirvana nks:clusters:availability update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2524
|
+
},
|
|
2521
2525
|
http: {
|
|
2522
2526
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-cluster",\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2523
2527
|
},
|
|
2524
|
-
typescript: {
|
|
2525
|
-
method: 'client.nks.clusters.availability.update',
|
|
2526
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.availability.update('cluster_id');",
|
|
2527
|
-
},
|
|
2528
2528
|
},
|
|
2529
2529
|
},
|
|
2530
2530
|
{
|
|
@@ -2539,21 +2539,21 @@ const EMBEDDED_METHODS = [
|
|
|
2539
2539
|
response: "{ id: string; cluster_id: string; created_at: string; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
2540
2540
|
markdown: "## 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```",
|
|
2541
2541
|
perLanguage: {
|
|
2542
|
-
|
|
2543
|
-
method: '
|
|
2544
|
-
example: "nirvana
|
|
2542
|
+
typescript: {
|
|
2543
|
+
method: 'client.nks.clusters.persistentVolumeClaims.get',
|
|
2544
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst persistentVolumeClaim = await client.nks.clusters.persistentVolumeClaims.get(\n 'persistent_volume_claim_id',\n { cluster_id: 'cluster_id' },\n);\n\nconsole.log(persistentVolumeClaim.id);",
|
|
2545
2545
|
},
|
|
2546
2546
|
go: {
|
|
2547
2547
|
method: 'client.NKS.Clusters.PersistentVolumeClaims.Get',
|
|
2548
2548
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\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',
|
|
2549
2549
|
},
|
|
2550
|
+
cli: {
|
|
2551
|
+
method: 'persistent_volume_claims get',
|
|
2552
|
+
example: "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",
|
|
2553
|
+
},
|
|
2550
2554
|
http: {
|
|
2551
2555
|
example: '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"',
|
|
2552
2556
|
},
|
|
2553
|
-
typescript: {
|
|
2554
|
-
method: 'client.nks.clusters.persistentVolumeClaims.get',
|
|
2555
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst persistentVolumeClaim = await client.nks.clusters.persistentVolumeClaims.get(\n 'persistent_volume_claim_id',\n { cluster_id: 'cluster_id' },\n);\n\nconsole.log(persistentVolumeClaim.id);",
|
|
2556
|
-
},
|
|
2557
2557
|
},
|
|
2558
2558
|
},
|
|
2559
2559
|
{
|
|
@@ -2568,21 +2568,21 @@ const EMBEDDED_METHODS = [
|
|
|
2568
2568
|
response: "{ id: string; cluster_id: string; created_at: string; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
2569
2569
|
markdown: "## list\n\n`client.nks.clusters.persistentVolumeClaims.list(cluster_id: string, cursor?: string, limit?: number): { id: string; cluster_id: string; created_at: string; name: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/persistent_volume_claims`\n\nList all persistent volume claims in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\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```",
|
|
2570
2570
|
perLanguage: {
|
|
2571
|
-
|
|
2572
|
-
method: '
|
|
2573
|
-
example: "nirvana
|
|
2571
|
+
typescript: {
|
|
2572
|
+
method: 'client.nks.clusters.persistentVolumeClaims.list',
|
|
2573
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const persistentVolumeClaim of client.nks.clusters.persistentVolumeClaims.list(\n 'cluster_id',\n)) {\n console.log(persistentVolumeClaim.id);\n}",
|
|
2574
2574
|
},
|
|
2575
2575
|
go: {
|
|
2576
2576
|
method: 'client.NKS.Clusters.PersistentVolumeClaims.List',
|
|
2577
2577
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.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',
|
|
2578
2578
|
},
|
|
2579
|
+
cli: {
|
|
2580
|
+
method: 'persistent_volume_claims list',
|
|
2581
|
+
example: "nirvana nks:clusters:persistent-volume-claims list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2582
|
+
},
|
|
2579
2583
|
http: {
|
|
2580
2584
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/persistent_volume_claims \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2581
2585
|
},
|
|
2582
|
-
typescript: {
|
|
2583
|
-
method: 'client.nks.clusters.persistentVolumeClaims.list',
|
|
2584
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const persistentVolumeClaim of client.nks.clusters.persistentVolumeClaims.list(\n 'cluster_id',\n)) {\n console.log(persistentVolumeClaim.id);\n}",
|
|
2585
|
-
},
|
|
2586
2586
|
},
|
|
2587
2587
|
},
|
|
2588
2588
|
{
|
|
@@ -2597,21 +2597,21 @@ const EMBEDDED_METHODS = [
|
|
|
2597
2597
|
response: '{ kubeconfig: string; }',
|
|
2598
2598
|
markdown: "## get\n\n`client.nks.clusters.kubeconfig.get(cluster_id: string): { kubeconfig: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/kubeconfig`\n\nGet the kubeconfig for an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n### Returns\n\n- `{ kubeconfig: string; }`\n Kubeconfig for an NKS Cluster.\n\n - `kubeconfig: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst kubeconfig = await client.nks.clusters.kubeconfig.get('cluster_id');\n\nconsole.log(kubeconfig);\n```",
|
|
2599
2599
|
perLanguage: {
|
|
2600
|
-
|
|
2601
|
-
method: 'kubeconfig
|
|
2602
|
-
example: "nirvana
|
|
2600
|
+
typescript: {
|
|
2601
|
+
method: 'client.nks.clusters.kubeconfig.get',
|
|
2602
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst kubeconfig = await client.nks.clusters.kubeconfig.get('cluster_id');\n\nconsole.log(kubeconfig.kubeconfig);",
|
|
2603
2603
|
},
|
|
2604
2604
|
go: {
|
|
2605
2605
|
method: 'client.NKS.Clusters.Kubeconfig.Get',
|
|
2606
2606
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tkubeconfig, err := client.NKS.Clusters.Kubeconfig.Get(context.TODO(), "cluster_id")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", kubeconfig.Kubeconfig)\n}\n',
|
|
2607
2607
|
},
|
|
2608
|
+
cli: {
|
|
2609
|
+
method: 'kubeconfig get',
|
|
2610
|
+
example: "nirvana nks:clusters:kubeconfig get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2611
|
+
},
|
|
2608
2612
|
http: {
|
|
2609
2613
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/kubeconfig \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2610
2614
|
},
|
|
2611
|
-
typescript: {
|
|
2612
|
-
method: 'client.nks.clusters.kubeconfig.get',
|
|
2613
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst kubeconfig = await client.nks.clusters.kubeconfig.get('cluster_id');\n\nconsole.log(kubeconfig.kubeconfig);",
|
|
2614
|
-
},
|
|
2615
2615
|
},
|
|
2616
2616
|
},
|
|
2617
2617
|
{
|
|
@@ -2626,21 +2626,21 @@ const EMBEDDED_METHODS = [
|
|
|
2626
2626
|
response: "{ id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
2627
2627
|
markdown: "## 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```",
|
|
2628
2628
|
perLanguage: {
|
|
2629
|
-
|
|
2630
|
-
method: 'controllers
|
|
2631
|
-
example: "nirvana
|
|
2629
|
+
typescript: {
|
|
2630
|
+
method: 'client.nks.clusters.controllers.get',
|
|
2631
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksController = await client.nks.clusters.controllers.get('controller_id', {\n cluster_id: 'cluster_id',\n});\n\nconsole.log(nksController.id);",
|
|
2632
2632
|
},
|
|
2633
2633
|
go: {
|
|
2634
2634
|
method: 'client.NKS.Clusters.Controllers.Get',
|
|
2635
2635
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksController, err := client.NKS.Clusters.Controllers.Get(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"controller_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksController.ID)\n}\n',
|
|
2636
2636
|
},
|
|
2637
|
+
cli: {
|
|
2638
|
+
method: 'controllers get',
|
|
2639
|
+
example: "nirvana nks:clusters:controllers get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --controller-id controller_id",
|
|
2640
|
+
},
|
|
2637
2641
|
http: {
|
|
2638
2642
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers/$CONTROLLER_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2639
2643
|
},
|
|
2640
|
-
typescript: {
|
|
2641
|
-
method: 'client.nks.clusters.controllers.get',
|
|
2642
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksController = await client.nks.clusters.controllers.get('controller_id', {\n cluster_id: 'cluster_id',\n});\n\nconsole.log(nksController.id);",
|
|
2643
|
-
},
|
|
2644
2644
|
},
|
|
2645
2645
|
},
|
|
2646
2646
|
{
|
|
@@ -2655,21 +2655,21 @@ const EMBEDDED_METHODS = [
|
|
|
2655
2655
|
response: "{ id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
2656
2656
|
markdown: "## list\n\n`client.nks.clusters.controllers.list(cluster_id: string, cursor?: string, limit?: number): { id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/controllers`\n\nList all controllers in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; instance_type: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }`\n NKS controller details.\n\n - `id: string`\n - `created_at: string`\n - `instance_type: string`\n - `name: string`\n - `private_ip: string`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const nksController of client.nks.clusters.controllers.list('cluster_id')) {\n console.log(nksController);\n}\n```",
|
|
2657
2657
|
perLanguage: {
|
|
2658
|
-
|
|
2659
|
-
method: 'controllers
|
|
2660
|
-
example: "nirvana
|
|
2658
|
+
typescript: {
|
|
2659
|
+
method: 'client.nks.clusters.controllers.list',
|
|
2660
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksController of client.nks.clusters.controllers.list('cluster_id')) {\n console.log(nksController.id);\n}",
|
|
2661
2661
|
},
|
|
2662
2662
|
go: {
|
|
2663
2663
|
method: 'client.NKS.Clusters.Controllers.List',
|
|
2664
2664
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.Controllers.List(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterControllerListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2665
2665
|
},
|
|
2666
|
+
cli: {
|
|
2667
|
+
method: 'controllers list',
|
|
2668
|
+
example: "nirvana nks:clusters:controllers list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2669
|
+
},
|
|
2666
2670
|
http: {
|
|
2667
2671
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2668
2672
|
},
|
|
2669
|
-
typescript: {
|
|
2670
|
-
method: 'client.nks.clusters.controllers.list',
|
|
2671
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksController of client.nks.clusters.controllers.list('cluster_id')) {\n console.log(nksController.id);\n}",
|
|
2672
|
-
},
|
|
2673
2673
|
},
|
|
2674
2674
|
},
|
|
2675
2675
|
{
|
|
@@ -2684,21 +2684,21 @@ const EMBEDDED_METHODS = [
|
|
|
2684
2684
|
response: "{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
2685
2685
|
markdown: "## get\n\n`client.nks.clusters.controllers.volumes.get(cluster_id: string, controller_id: string, volume_id: string): { id: string; created_at: string; kind: volume_kind; name: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/controllers/{controller_id}/volumes/{volume_id}`\n\nGet details about a volume attached to an NKS controller\n\n### Parameters\n\n- `cluster_id: string`\n\n- `controller_id: string`\n\n- `volume_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS controller volume details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'boot' | 'data'`\n - `name: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst nksControllerVolume = await client.nks.clusters.controllers.volumes.get('volume_id', { cluster_id: 'cluster_id', controller_id: 'controller_id' });\n\nconsole.log(nksControllerVolume);\n```",
|
|
2686
2686
|
perLanguage: {
|
|
2687
|
-
|
|
2688
|
-
method: 'volumes
|
|
2689
|
-
example: "nirvana
|
|
2687
|
+
typescript: {
|
|
2688
|
+
method: 'client.nks.clusters.controllers.volumes.get',
|
|
2689
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksControllerVolume = await client.nks.clusters.controllers.volumes.get('volume_id', {\n cluster_id: 'cluster_id',\n controller_id: 'controller_id',\n});\n\nconsole.log(nksControllerVolume.id);",
|
|
2690
2690
|
},
|
|
2691
2691
|
go: {
|
|
2692
2692
|
method: 'client.NKS.Clusters.Controllers.Volumes.Get',
|
|
2693
2693
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksControllerVolume, err := client.NKS.Clusters.Controllers.Volumes.Get(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"controller_id",\n\t\t"volume_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksControllerVolume.ID)\n}\n',
|
|
2694
2694
|
},
|
|
2695
|
+
cli: {
|
|
2696
|
+
method: 'volumes get',
|
|
2697
|
+
example: "nirvana nks:clusters:controllers:volumes get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --controller-id controller_id \\\n --volume-id volume_id",
|
|
2698
|
+
},
|
|
2695
2699
|
http: {
|
|
2696
2700
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers/$CONTROLLER_ID/volumes/$VOLUME_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2697
2701
|
},
|
|
2698
|
-
typescript: {
|
|
2699
|
-
method: 'client.nks.clusters.controllers.volumes.get',
|
|
2700
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksControllerVolume = await client.nks.clusters.controllers.volumes.get('volume_id', {\n cluster_id: 'cluster_id',\n controller_id: 'controller_id',\n});\n\nconsole.log(nksControllerVolume.id);",
|
|
2701
|
-
},
|
|
2702
2702
|
},
|
|
2703
2703
|
},
|
|
2704
2704
|
{
|
|
@@ -2713,21 +2713,21 @@ const EMBEDDED_METHODS = [
|
|
|
2713
2713
|
response: "{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
2714
2714
|
markdown: "## list\n\n`client.nks.clusters.controllers.volumes.list(cluster_id: string, controller_id: string, cursor?: string, limit?: number): { id: string; created_at: string; kind: volume_kind; name: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/controllers/{controller_id}/volumes`\n\nList all volumes attached to an NKS controller\n\n### Parameters\n\n- `cluster_id: string`\n\n- `controller_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS controller volume details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'boot' | 'data'`\n - `name: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const nksControllerVolume of client.nks.clusters.controllers.volumes.list('controller_id', { cluster_id: 'cluster_id' })) {\n console.log(nksControllerVolume);\n}\n```",
|
|
2715
2715
|
perLanguage: {
|
|
2716
|
-
|
|
2717
|
-
method: 'volumes
|
|
2718
|
-
example: "nirvana
|
|
2716
|
+
typescript: {
|
|
2717
|
+
method: 'client.nks.clusters.controllers.volumes.list',
|
|
2718
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksControllerVolume of client.nks.clusters.controllers.volumes.list(\n 'controller_id',\n { cluster_id: 'cluster_id' },\n)) {\n console.log(nksControllerVolume.id);\n}",
|
|
2719
2719
|
},
|
|
2720
2720
|
go: {
|
|
2721
2721
|
method: 'client.NKS.Clusters.Controllers.Volumes.List',
|
|
2722
2722
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.Controllers.Volumes.List(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"controller_id",\n\t\tnks.ClusterControllerVolumeListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2723
2723
|
},
|
|
2724
|
+
cli: {
|
|
2725
|
+
method: 'volumes list',
|
|
2726
|
+
example: "nirvana nks:clusters:controllers:volumes list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --controller-id controller_id",
|
|
2727
|
+
},
|
|
2724
2728
|
http: {
|
|
2725
2729
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/controllers/$CONTROLLER_ID/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2726
2730
|
},
|
|
2727
|
-
typescript: {
|
|
2728
|
-
method: 'client.nks.clusters.controllers.volumes.list',
|
|
2729
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksControllerVolume of client.nks.clusters.controllers.volumes.list(\n 'controller_id',\n { cluster_id: 'cluster_id' },\n)) {\n console.log(nksControllerVolume.id);\n}",
|
|
2730
|
-
},
|
|
2731
2731
|
},
|
|
2732
2732
|
},
|
|
2733
2733
|
{
|
|
@@ -2742,21 +2742,21 @@ const EMBEDDED_METHODS = [
|
|
|
2742
2742
|
response: "{ id: string; cluster_id: string; created_at: string; namespace: string; private_ip: string; public_ip: string; public_ip_enabled: boolean; service_name: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
2743
2743
|
markdown: "## get\n\n`client.nks.clusters.loadBalancers.get(cluster_id: string, load_balancer_id: string): { id: string; cluster_id: string; created_at: string; namespace: string; private_ip: string; 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```",
|
|
2744
2744
|
perLanguage: {
|
|
2745
|
-
|
|
2746
|
-
method: '
|
|
2747
|
-
example: "nirvana
|
|
2745
|
+
typescript: {
|
|
2746
|
+
method: 'client.nks.clusters.loadBalancers.get',
|
|
2747
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksLoadBalancer = await client.nks.clusters.loadBalancers.get('load_balancer_id', {\n cluster_id: 'cluster_id',\n});\n\nconsole.log(nksLoadBalancer.id);",
|
|
2748
2748
|
},
|
|
2749
2749
|
go: {
|
|
2750
2750
|
method: 'client.NKS.Clusters.LoadBalancers.Get',
|
|
2751
2751
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksLoadBalancer, err := client.NKS.Clusters.LoadBalancers.Get(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"load_balancer_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksLoadBalancer.ID)\n}\n',
|
|
2752
2752
|
},
|
|
2753
|
+
cli: {
|
|
2754
|
+
method: 'load_balancers get',
|
|
2755
|
+
example: "nirvana nks:clusters:load-balancers get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --load-balancer-id load_balancer_id",
|
|
2756
|
+
},
|
|
2753
2757
|
http: {
|
|
2754
2758
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/load_balancers/$LOAD_BALANCER_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2755
2759
|
},
|
|
2756
|
-
typescript: {
|
|
2757
|
-
method: 'client.nks.clusters.loadBalancers.get',
|
|
2758
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksLoadBalancer = await client.nks.clusters.loadBalancers.get('load_balancer_id', {\n cluster_id: 'cluster_id',\n});\n\nconsole.log(nksLoadBalancer.id);",
|
|
2759
|
-
},
|
|
2760
2760
|
},
|
|
2761
2761
|
},
|
|
2762
2762
|
{
|
|
@@ -2771,21 +2771,21 @@ const EMBEDDED_METHODS = [
|
|
|
2771
2771
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
2772
2772
|
markdown: "## 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```",
|
|
2773
2773
|
perLanguage: {
|
|
2774
|
-
|
|
2775
|
-
method: '
|
|
2776
|
-
example: "nirvana
|
|
2774
|
+
typescript: {
|
|
2775
|
+
method: 'client.nks.clusters.loadBalancers.update',
|
|
2776
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.loadBalancers.update('load_balancer_id', {\n cluster_id: 'cluster_id',\n public_ip_enabled: true,\n});\n\nconsole.log(operation.id);",
|
|
2777
2777
|
},
|
|
2778
2778
|
go: {
|
|
2779
2779
|
method: 'client.NKS.Clusters.LoadBalancers.Update',
|
|
2780
2780
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.NKS.Clusters.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',
|
|
2781
2781
|
},
|
|
2782
|
+
cli: {
|
|
2783
|
+
method: 'load_balancers update',
|
|
2784
|
+
example: "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",
|
|
2785
|
+
},
|
|
2782
2786
|
http: {
|
|
2783
2787
|
example: '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 }\'',
|
|
2784
2788
|
},
|
|
2785
|
-
typescript: {
|
|
2786
|
-
method: 'client.nks.clusters.loadBalancers.update',
|
|
2787
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.loadBalancers.update('load_balancer_id', {\n cluster_id: 'cluster_id',\n public_ip_enabled: true,\n});\n\nconsole.log(operation.id);",
|
|
2788
|
-
},
|
|
2789
2789
|
},
|
|
2790
2790
|
},
|
|
2791
2791
|
{
|
|
@@ -2800,21 +2800,21 @@ const EMBEDDED_METHODS = [
|
|
|
2800
2800
|
response: "{ id: string; cluster_id: string; created_at: string; namespace: string; private_ip: string; public_ip: string; public_ip_enabled: boolean; service_name: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
2801
2801
|
markdown: "## list\n\n`client.nks.clusters.loadBalancers.list(cluster_id: string, cursor?: string, limit?: number): { id: string; cluster_id: string; created_at: string; namespace: string; private_ip: string; public_ip: string; public_ip_enabled: boolean; service_name: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/load_balancers`\n\nList all load balancers in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\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```",
|
|
2802
2802
|
perLanguage: {
|
|
2803
|
-
|
|
2804
|
-
method: '
|
|
2805
|
-
example: "nirvana
|
|
2803
|
+
typescript: {
|
|
2804
|
+
method: 'client.nks.clusters.loadBalancers.list',
|
|
2805
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksLoadBalancer of client.nks.clusters.loadBalancers.list('cluster_id')) {\n console.log(nksLoadBalancer.id);\n}",
|
|
2806
2806
|
},
|
|
2807
2807
|
go: {
|
|
2808
2808
|
method: 'client.NKS.Clusters.LoadBalancers.List',
|
|
2809
2809
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.LoadBalancers.List(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterLoadBalancerListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2810
2810
|
},
|
|
2811
|
+
cli: {
|
|
2812
|
+
method: 'load_balancers list',
|
|
2813
|
+
example: "nirvana nks:clusters:load-balancers list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2814
|
+
},
|
|
2811
2815
|
http: {
|
|
2812
2816
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/load_balancers \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2813
2817
|
},
|
|
2814
|
-
typescript: {
|
|
2815
|
-
method: 'client.nks.clusters.loadBalancers.list',
|
|
2816
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksLoadBalancer of client.nks.clusters.loadBalancers.list('cluster_id')) {\n console.log(nksLoadBalancer.id);\n}",
|
|
2817
|
-
},
|
|
2818
2818
|
},
|
|
2819
2819
|
},
|
|
2820
2820
|
{
|
|
@@ -2835,21 +2835,21 @@ const EMBEDDED_METHODS = [
|
|
|
2835
2835
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
2836
2836
|
markdown: "## 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```",
|
|
2837
2837
|
perLanguage: {
|
|
2838
|
-
|
|
2839
|
-
method: 'pools
|
|
2840
|
-
example: "nirvana
|
|
2838
|
+
typescript: {
|
|
2839
|
+
method: 'client.nks.clusters.pools.create',
|
|
2840
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n },\n node_count: 3,\n});\n\nconsole.log(operation.id);",
|
|
2841
2841
|
},
|
|
2842
2842
|
go: {
|
|
2843
2843
|
method: 'client.NKS.Clusters.Pools.New',
|
|
2844
2844
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.NKS.Clusters.Pools.New(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterPoolNewParams{\n\t\t\tName: "my-node-pool",\n\t\t\tNodeConfig: nks.NKSNodePoolNodeConfigParam{\n\t\t\t\tBootVolume: nks.NKSNodePoolBootVolumeParam{\n\t\t\t\t\tSize: 100,\n\t\t\t\t\tType: compute.VolumeTypeABS,\n\t\t\t\t},\n\t\t\t\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',
|
|
2845
2845
|
},
|
|
2846
|
+
cli: {
|
|
2847
|
+
method: 'pools create',
|
|
2848
|
+
example: "nirvana nks:clusters:pools create \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --name my-node-pool \\\n --node-config '{boot_volume: {size: 100, type: abs}, instance_type: n1-standard-8}' \\\n --node-count 3",
|
|
2849
|
+
},
|
|
2846
2850
|
http: {
|
|
2847
2851
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_config": {\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "instance_type": "n1-standard-8"\n },\n "node_count": 3,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2848
2852
|
},
|
|
2849
|
-
typescript: {
|
|
2850
|
-
method: 'client.nks.clusters.pools.create',
|
|
2851
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n },\n node_count: 3,\n});\n\nconsole.log(operation.id);",
|
|
2852
|
-
},
|
|
2853
2853
|
},
|
|
2854
2854
|
},
|
|
2855
2855
|
{
|
|
@@ -2864,21 +2864,21 @@ const EMBEDDED_METHODS = [
|
|
|
2864
2864
|
response: "{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response; instance_type: string; labels: string[]; }; node_count: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }",
|
|
2865
2865
|
markdown: "## get\n\n`client.nks.clusters.pools.get(cluster_id: string, pool_id: string): { id: string; cluster_id: string; created_at: string; name: string; node_config: nks_node_pool_node_config_response; node_count: number; status: resource_status; tags: string[]; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}`\n\nGet details about an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response; 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```",
|
|
2866
2866
|
perLanguage: {
|
|
2867
|
-
|
|
2868
|
-
method: 'pools
|
|
2869
|
-
example: "nirvana
|
|
2867
|
+
typescript: {
|
|
2868
|
+
method: 'client.nks.clusters.pools.get',
|
|
2869
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksNodePool = await client.nks.clusters.pools.get('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(nksNodePool.id);",
|
|
2870
2870
|
},
|
|
2871
2871
|
go: {
|
|
2872
2872
|
method: 'client.NKS.Clusters.Pools.Get',
|
|
2873
2873
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksNodePool, err := client.NKS.Clusters.Pools.Get(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksNodePool.ID)\n}\n',
|
|
2874
2874
|
},
|
|
2875
|
+
cli: {
|
|
2876
|
+
method: 'pools get',
|
|
2877
|
+
example: "nirvana nks:clusters:pools get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
|
|
2878
|
+
},
|
|
2875
2879
|
http: {
|
|
2876
2880
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2877
2881
|
},
|
|
2878
|
-
typescript: {
|
|
2879
|
-
method: 'client.nks.clusters.pools.get',
|
|
2880
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksNodePool = await client.nks.clusters.pools.get('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(nksNodePool.id);",
|
|
2881
|
-
},
|
|
2882
2882
|
},
|
|
2883
2883
|
},
|
|
2884
2884
|
{
|
|
@@ -2900,21 +2900,21 @@ const EMBEDDED_METHODS = [
|
|
|
2900
2900
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
2901
2901
|
markdown: "## 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```",
|
|
2902
2902
|
perLanguage: {
|
|
2903
|
-
|
|
2904
|
-
method: 'pools
|
|
2905
|
-
example: "nirvana
|
|
2903
|
+
typescript: {
|
|
2904
|
+
method: 'client.nks.clusters.pools.update',
|
|
2905
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.update('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(operation.id);",
|
|
2906
2906
|
},
|
|
2907
2907
|
go: {
|
|
2908
2908
|
method: 'client.NKS.Clusters.Pools.Update',
|
|
2909
2909
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.NKS.Clusters.Pools.Update(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t\tnks.ClusterPoolUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
2910
2910
|
},
|
|
2911
|
+
cli: {
|
|
2912
|
+
method: 'pools update',
|
|
2913
|
+
example: "nirvana nks:clusters:pools update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
|
|
2914
|
+
},
|
|
2911
2915
|
http: {
|
|
2912
2916
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_count": 5,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
2913
2917
|
},
|
|
2914
|
-
typescript: {
|
|
2915
|
-
method: 'client.nks.clusters.pools.update',
|
|
2916
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.update('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(operation.id);",
|
|
2917
|
-
},
|
|
2918
2918
|
},
|
|
2919
2919
|
},
|
|
2920
2920
|
{
|
|
@@ -2929,21 +2929,21 @@ const EMBEDDED_METHODS = [
|
|
|
2929
2929
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
2930
2930
|
markdown: "## delete\n\n`client.nks.clusters.pools.delete(cluster_id: string, pool_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}`\n\nDelete an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.nks.clusters.pools.delete('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(operation);\n```",
|
|
2931
2931
|
perLanguage: {
|
|
2932
|
-
|
|
2933
|
-
method: 'pools
|
|
2934
|
-
example: "nirvana
|
|
2932
|
+
typescript: {
|
|
2933
|
+
method: 'client.nks.clusters.pools.delete',
|
|
2934
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.delete('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(operation.id);",
|
|
2935
2935
|
},
|
|
2936
2936
|
go: {
|
|
2937
2937
|
method: 'client.NKS.Clusters.Pools.Delete',
|
|
2938
2938
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.NKS.Clusters.Pools.Delete(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
2939
2939
|
},
|
|
2940
|
+
cli: {
|
|
2941
|
+
method: 'pools delete',
|
|
2942
|
+
example: "nirvana nks:clusters:pools delete \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
|
|
2943
|
+
},
|
|
2940
2944
|
http: {
|
|
2941
2945
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2942
2946
|
},
|
|
2943
|
-
typescript: {
|
|
2944
|
-
method: 'client.nks.clusters.pools.delete',
|
|
2945
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.delete('pool_id', { cluster_id: 'cluster_id' });\n\nconsole.log(operation.id);",
|
|
2946
|
-
},
|
|
2947
2947
|
},
|
|
2948
2948
|
},
|
|
2949
2949
|
{
|
|
@@ -2958,21 +2958,21 @@ const EMBEDDED_METHODS = [
|
|
|
2958
2958
|
response: "{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response; instance_type: string; labels: string[]; }; node_count: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; tags: string[]; updated_at: string; }",
|
|
2959
2959
|
markdown: "## list\n\n`client.nks.clusters.pools.list(cluster_id: string, cursor?: string, limit?: number): { id: string; cluster_id: string; created_at: string; name: string; node_config: nks_node_pool_node_config_response; node_count: number; status: resource_status; tags: string[]; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools`\n\nList all node pools in an NKS cluster\n\n### Parameters\n\n- `cluster_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; cluster_id: string; created_at: string; name: string; node_config: { boot_volume: nks_node_pool_boot_volume_response; instance_type: string; labels: string[]; }; 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```",
|
|
2960
2960
|
perLanguage: {
|
|
2961
|
-
|
|
2962
|
-
method: 'pools
|
|
2963
|
-
example: "nirvana
|
|
2961
|
+
typescript: {
|
|
2962
|
+
method: 'client.nks.clusters.pools.list',
|
|
2963
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksNodePool of client.nks.clusters.pools.list('cluster_id')) {\n console.log(nksNodePool.id);\n}",
|
|
2964
2964
|
},
|
|
2965
2965
|
go: {
|
|
2966
2966
|
method: 'client.NKS.Clusters.Pools.List',
|
|
2967
2967
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.Pools.List(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterPoolListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
2968
2968
|
},
|
|
2969
|
+
cli: {
|
|
2970
|
+
method: 'pools list',
|
|
2971
|
+
example: "nirvana nks:clusters:pools list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id",
|
|
2972
|
+
},
|
|
2969
2973
|
http: {
|
|
2970
2974
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
2971
2975
|
},
|
|
2972
|
-
typescript: {
|
|
2973
|
-
method: 'client.nks.clusters.pools.list',
|
|
2974
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksNodePool of client.nks.clusters.pools.list('cluster_id')) {\n console.log(nksNodePool.id);\n}",
|
|
2975
|
-
},
|
|
2976
2976
|
},
|
|
2977
2977
|
},
|
|
2978
2978
|
{
|
|
@@ -2992,21 +2992,21 @@ const EMBEDDED_METHODS = [
|
|
|
2992
2992
|
],
|
|
2993
2993
|
markdown: "## 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```",
|
|
2994
2994
|
perLanguage: {
|
|
2995
|
-
|
|
2996
|
-
method: 'availability
|
|
2997
|
-
example: "nirvana
|
|
2995
|
+
typescript: {
|
|
2996
|
+
method: 'client.nks.clusters.pools.availability.create',
|
|
2997
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.pools.availability.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n },\n node_count: 3,\n});",
|
|
2998
2998
|
},
|
|
2999
2999
|
go: {
|
|
3000
3000
|
method: 'client.NKS.Clusters.Pools.Availability.New',
|
|
3001
3001
|
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/compute"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.NKS.Clusters.Pools.Availability.New(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\tnks.ClusterPoolAvailabilityNewParams{\n\t\t\tName: "my-node-pool",\n\t\t\tNodeConfig: nks.NKSNodePoolNodeConfigParam{\n\t\t\t\tBootVolume: nks.NKSNodePoolBootVolumeParam{\n\t\t\t\t\tSize: 100,\n\t\t\t\t\tType: compute.VolumeTypeABS,\n\t\t\t\t},\n\t\t\t\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',
|
|
3002
3002
|
},
|
|
3003
|
+
cli: {
|
|
3004
|
+
method: 'availability create',
|
|
3005
|
+
example: "nirvana nks:clusters:pools:availability create \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --name my-node-pool \\\n --node-config '{boot_volume: {size: 100, type: abs}, instance_type: n1-standard-8}' \\\n --node-count 3",
|
|
3006
|
+
},
|
|
3003
3007
|
http: {
|
|
3004
3008
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/availability \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_config": {\n "boot_volume": {\n "size": 100,\n "type": "abs"\n },\n "instance_type": "n1-standard-8"\n },\n "node_count": 3,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
3005
3009
|
},
|
|
3006
|
-
typescript: {
|
|
3007
|
-
method: 'client.nks.clusters.pools.availability.create',
|
|
3008
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.pools.availability.create('cluster_id', {\n name: 'my-node-pool',\n node_config: {\n boot_volume: { size: 100, type: 'abs' },\n instance_type: 'n1-standard-8',\n },\n node_count: 3,\n});",
|
|
3009
|
-
},
|
|
3010
3010
|
},
|
|
3011
3011
|
},
|
|
3012
3012
|
{
|
|
@@ -3027,21 +3027,21 @@ const EMBEDDED_METHODS = [
|
|
|
3027
3027
|
],
|
|
3028
3028
|
markdown: "## 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```",
|
|
3029
3029
|
perLanguage: {
|
|
3030
|
-
|
|
3031
|
-
method: 'availability
|
|
3032
|
-
example: "nirvana
|
|
3030
|
+
typescript: {
|
|
3031
|
+
method: 'client.nks.clusters.pools.availability.update',
|
|
3032
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.pools.availability.update('pool_id', { cluster_id: 'cluster_id' });",
|
|
3033
3033
|
},
|
|
3034
3034
|
go: {
|
|
3035
3035
|
method: 'client.NKS.Clusters.Pools.Availability.Update',
|
|
3036
3036
|
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.NKS.Clusters.Pools.Availability.Update(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t\tnks.ClusterPoolAvailabilityUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
3037
3037
|
},
|
|
3038
|
+
cli: {
|
|
3039
|
+
method: 'availability update',
|
|
3040
|
+
example: "nirvana nks:clusters:pools:availability update \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
|
|
3041
|
+
},
|
|
3038
3042
|
http: {
|
|
3039
3043
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/availability \\\n -X PATCH \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \\\n -d \'{\n "name": "my-node-pool",\n "node_count": 5,\n "tags": [\n "production",\n "ethereum"\n ]\n }\'',
|
|
3040
3044
|
},
|
|
3041
|
-
typescript: {
|
|
3042
|
-
method: 'client.nks.clusters.pools.availability.update',
|
|
3043
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.nks.clusters.pools.availability.update('pool_id', { cluster_id: 'cluster_id' });",
|
|
3044
|
-
},
|
|
3045
3045
|
},
|
|
3046
3046
|
},
|
|
3047
3047
|
{
|
|
@@ -3056,21 +3056,21 @@ const EMBEDDED_METHODS = [
|
|
|
3056
3056
|
response: "{ id: string; created_at: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
3057
3057
|
markdown: "## get\n\n`client.nks.clusters.pools.nodes.get(cluster_id: string, pool_id: string, node_id: string): { id: string; created_at: string; name: string; private_ip: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes/{node_id}`\n\nGet details about an NKS node\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n- `node_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }`\n NKS node details.\n\n - `id: string`\n - `created_at: string`\n - `name: string`\n - `private_ip: string`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst nksNode = await client.nks.clusters.pools.nodes.get('node_id', { cluster_id: 'cluster_id', pool_id: 'pool_id' });\n\nconsole.log(nksNode);\n```",
|
|
3058
3058
|
perLanguage: {
|
|
3059
|
-
|
|
3060
|
-
method: 'nodes
|
|
3061
|
-
example: "nirvana
|
|
3059
|
+
typescript: {
|
|
3060
|
+
method: 'client.nks.clusters.pools.nodes.get',
|
|
3061
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksNode = await client.nks.clusters.pools.nodes.get('node_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n});\n\nconsole.log(nksNode.id);",
|
|
3062
3062
|
},
|
|
3063
3063
|
go: {
|
|
3064
3064
|
method: 'client.NKS.Clusters.Pools.Nodes.Get',
|
|
3065
3065
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksNode, err := client.NKS.Clusters.Pools.Nodes.Get(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t\t"node_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksNode.ID)\n}\n',
|
|
3066
3066
|
},
|
|
3067
|
+
cli: {
|
|
3068
|
+
method: 'nodes get',
|
|
3069
|
+
example: "nirvana nks:clusters:pools:nodes get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id \\\n --node-id node_id",
|
|
3070
|
+
},
|
|
3067
3071
|
http: {
|
|
3068
3072
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3069
3073
|
},
|
|
3070
|
-
typescript: {
|
|
3071
|
-
method: 'client.nks.clusters.pools.nodes.get',
|
|
3072
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksNode = await client.nks.clusters.pools.nodes.get('node_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n});\n\nconsole.log(nksNode.id);",
|
|
3073
|
-
},
|
|
3074
3074
|
},
|
|
3075
3075
|
},
|
|
3076
3076
|
{
|
|
@@ -3085,21 +3085,21 @@ const EMBEDDED_METHODS = [
|
|
|
3085
3085
|
response: "{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }",
|
|
3086
3086
|
markdown: "## delete\n\n`client.nks.clusters.pools.nodes.delete(cluster_id: string, pool_id: string, node_id: string): { id: string; created_at: string; kind: operation_kind; project_id: string; resource_id: string; status: operation_status; type: operation_type; updated_at: string; }`\n\n**delete** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes/{node_id}`\n\nDelete a single node from an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n- `node_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'; project_id: string; resource_id: string; status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'; type: 'create' | 'update' | 'delete' | 'restart'; updated_at: string; }`\n Operation details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'vm' | 'volume' | 'vpc' | 'firewall_rule' | 'nks_cluster' | 'nks_node_pool'`\n - `project_id: string`\n - `resource_id: string`\n - `status: 'pending' | 'running' | 'done' | 'failed' | 'unknown'`\n - `type: 'create' | 'update' | 'delete' | 'restart'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst operation = await client.nks.clusters.pools.nodes.delete('node_id', { cluster_id: 'cluster_id', pool_id: 'pool_id' });\n\nconsole.log(operation);\n```",
|
|
3087
3087
|
perLanguage: {
|
|
3088
|
-
|
|
3089
|
-
method: 'nodes
|
|
3090
|
-
example: "nirvana
|
|
3088
|
+
typescript: {
|
|
3089
|
+
method: 'client.nks.clusters.pools.nodes.delete',
|
|
3090
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.nodes.delete('node_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n});\n\nconsole.log(operation.id);",
|
|
3091
3091
|
},
|
|
3092
3092
|
go: {
|
|
3093
3093
|
method: 'client.NKS.Clusters.Pools.Nodes.Delete',
|
|
3094
3094
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\toperation, err := client.NKS.Clusters.Pools.Nodes.Delete(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t\t"node_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", operation.ID)\n}\n',
|
|
3095
3095
|
},
|
|
3096
|
+
cli: {
|
|
3097
|
+
method: 'nodes delete',
|
|
3098
|
+
example: "nirvana nks:clusters:pools:nodes delete \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id \\\n --node-id node_id",
|
|
3099
|
+
},
|
|
3096
3100
|
http: {
|
|
3097
3101
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3098
3102
|
},
|
|
3099
|
-
typescript: {
|
|
3100
|
-
method: 'client.nks.clusters.pools.nodes.delete',
|
|
3101
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst operation = await client.nks.clusters.pools.nodes.delete('node_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n});\n\nconsole.log(operation.id);",
|
|
3102
|
-
},
|
|
3103
3103
|
},
|
|
3104
3104
|
},
|
|
3105
3105
|
{
|
|
@@ -3114,21 +3114,21 @@ const EMBEDDED_METHODS = [
|
|
|
3114
3114
|
response: "{ id: string; created_at: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }",
|
|
3115
3115
|
markdown: "## list\n\n`client.nks.clusters.pools.nodes.list(cluster_id: string, pool_id: string, cursor?: string, limit?: number): { id: string; created_at: string; name: string; private_ip: string; status: resource_status; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes`\n\nList all nodes in an NKS node pool\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; name: string; private_ip: string; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; updated_at: string; }`\n NKS node details.\n\n - `id: string`\n - `created_at: string`\n - `name: string`\n - `private_ip: string`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const nksNode of client.nks.clusters.pools.nodes.list('pool_id', { cluster_id: 'cluster_id' })) {\n console.log(nksNode);\n}\n```",
|
|
3116
3116
|
perLanguage: {
|
|
3117
|
-
|
|
3118
|
-
method: 'nodes
|
|
3119
|
-
example: "nirvana
|
|
3117
|
+
typescript: {
|
|
3118
|
+
method: 'client.nks.clusters.pools.nodes.list',
|
|
3119
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksNode of client.nks.clusters.pools.nodes.list('pool_id', {\n cluster_id: 'cluster_id',\n})) {\n console.log(nksNode.id);\n}",
|
|
3120
3120
|
},
|
|
3121
3121
|
go: {
|
|
3122
3122
|
method: 'client.NKS.Clusters.Pools.Nodes.List',
|
|
3123
3123
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.Pools.Nodes.List(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t\tnks.ClusterPoolNodeListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
3124
3124
|
},
|
|
3125
|
+
cli: {
|
|
3126
|
+
method: 'nodes list',
|
|
3127
|
+
example: "nirvana nks:clusters:pools:nodes list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id",
|
|
3128
|
+
},
|
|
3125
3129
|
http: {
|
|
3126
3130
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3127
3131
|
},
|
|
3128
|
-
typescript: {
|
|
3129
|
-
method: 'client.nks.clusters.pools.nodes.list',
|
|
3130
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksNode of client.nks.clusters.pools.nodes.list('pool_id', {\n cluster_id: 'cluster_id',\n})) {\n console.log(nksNode.id);\n}",
|
|
3131
|
-
},
|
|
3132
3132
|
},
|
|
3133
3133
|
},
|
|
3134
3134
|
{
|
|
@@ -3143,21 +3143,21 @@ const EMBEDDED_METHODS = [
|
|
|
3143
3143
|
response: "{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
3144
3144
|
markdown: "## get\n\n`client.nks.clusters.pools.nodes.volumes.get(cluster_id: string, pool_id: string, node_id: string, volume_id: string): { id: string; created_at: string; kind: volume_kind; name: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes/{node_id}/volumes/{volume_id}`\n\nGet details about a volume attached to an NKS node\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n- `node_id: string`\n\n- `volume_id: string`\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS node volume details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'boot' | 'data'`\n - `name: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\nconst nksNodeVolume = await client.nks.clusters.pools.nodes.volumes.get('volume_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n node_id: 'node_id',\n});\n\nconsole.log(nksNodeVolume);\n```",
|
|
3145
3145
|
perLanguage: {
|
|
3146
|
-
|
|
3147
|
-
method: 'volumes
|
|
3148
|
-
example: "nirvana
|
|
3146
|
+
typescript: {
|
|
3147
|
+
method: 'client.nks.clusters.pools.nodes.volumes.get',
|
|
3148
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksNodeVolume = await client.nks.clusters.pools.nodes.volumes.get('volume_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n node_id: 'node_id',\n});\n\nconsole.log(nksNodeVolume.id);",
|
|
3149
3149
|
},
|
|
3150
3150
|
go: {
|
|
3151
3151
|
method: 'client.NKS.Clusters.Pools.Nodes.Volumes.Get',
|
|
3152
3152
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tnksNodeVolume, err := client.NKS.Clusters.Pools.Nodes.Volumes.Get(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t\t"node_id",\n\t\t"volume_id",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", nksNodeVolume.ID)\n}\n',
|
|
3153
3153
|
},
|
|
3154
|
+
cli: {
|
|
3155
|
+
method: 'volumes get',
|
|
3156
|
+
example: "nirvana nks:clusters:pools:nodes:volumes get \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id \\\n --node-id node_id \\\n --volume-id volume_id",
|
|
3157
|
+
},
|
|
3154
3158
|
http: {
|
|
3155
3159
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID/volumes/$VOLUME_ID \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3156
3160
|
},
|
|
3157
|
-
typescript: {
|
|
3158
|
-
method: 'client.nks.clusters.pools.nodes.volumes.get',
|
|
3159
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\nconst nksNodeVolume = await client.nks.clusters.pools.nodes.volumes.get('volume_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n node_id: 'node_id',\n});\n\nconsole.log(nksNodeVolume.id);",
|
|
3160
|
-
},
|
|
3161
3161
|
},
|
|
3162
3162
|
},
|
|
3163
3163
|
{
|
|
@@ -3178,21 +3178,21 @@ const EMBEDDED_METHODS = [
|
|
|
3178
3178
|
response: "{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }",
|
|
3179
3179
|
markdown: "## list\n\n`client.nks.clusters.pools.nodes.volumes.list(cluster_id: string, pool_id: string, node_id: string, cursor?: string, limit?: number): { id: string; created_at: string; kind: volume_kind; name: string; size: number; status: resource_status; type: volume_type; updated_at: string; }`\n\n**get** `/v1/nks/clusters/{cluster_id}/pools/{pool_id}/nodes/{node_id}/volumes`\n\nList all volumes attached to an NKS node\n\n### Parameters\n\n- `cluster_id: string`\n\n- `pool_id: string`\n\n- `node_id: string`\n\n- `cursor?: string`\n Pagination cursor returned by a previous request\n\n- `limit?: number`\n Maximum number of items to return\n\n### Returns\n\n- `{ id: string; created_at: string; kind: 'boot' | 'data'; name: string; size: number; status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'; type: 'nvme' | 'abs'; updated_at: string; }`\n NKS node volume details.\n\n - `id: string`\n - `created_at: string`\n - `kind: 'boot' | 'data'`\n - `name: string`\n - `size: number`\n - `status: 'pending' | 'creating' | 'updating' | 'ready' | 'deleting' | 'deleted' | 'error'`\n - `type: 'nvme' | 'abs'`\n - `updated_at: string`\n\n### Example\n\n```typescript\nimport NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs();\n\n// Automatically fetches more pages as needed.\nfor await (const nksNodeVolume of client.nks.clusters.pools.nodes.volumes.list('node_id', { cluster_id: 'cluster_id', pool_id: 'pool_id' })) {\n console.log(nksNodeVolume);\n}\n```",
|
|
3180
3180
|
perLanguage: {
|
|
3181
|
-
|
|
3182
|
-
method: 'volumes
|
|
3183
|
-
example: "nirvana
|
|
3181
|
+
typescript: {
|
|
3182
|
+
method: 'client.nks.clusters.pools.nodes.volumes.list',
|
|
3183
|
+
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksNodeVolume of client.nks.clusters.pools.nodes.volumes.list('node_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n})) {\n console.log(nksNodeVolume.id);\n}",
|
|
3184
3184
|
},
|
|
3185
3185
|
go: {
|
|
3186
3186
|
method: 'client.NKS.Clusters.Pools.Nodes.Volumes.List',
|
|
3187
3187
|
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/nirvana-labs/nirvana-go"\n\t"github.com/nirvana-labs/nirvana-go/nks"\n\t"github.com/nirvana-labs/nirvana-go/option"\n)\n\nfunc main() {\n\tclient := nirvana.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.NKS.Clusters.Pools.Nodes.Volumes.List(\n\t\tcontext.TODO(),\n\t\t"cluster_id",\n\t\t"pool_id",\n\t\t"node_id",\n\t\tnks.ClusterPoolNodeVolumeListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
3188
3188
|
},
|
|
3189
|
+
cli: {
|
|
3190
|
+
method: 'volumes list',
|
|
3191
|
+
example: "nirvana nks:clusters:pools:nodes:volumes list \\\n --api-key 'My API Key' \\\n --cluster-id cluster_id \\\n --pool-id pool_id \\\n --node-id node_id",
|
|
3192
|
+
},
|
|
3189
3193
|
http: {
|
|
3190
3194
|
example: 'curl https://api.nirvanalabs.io/v1/nks/clusters/$CLUSTER_ID/pools/$POOL_ID/nodes/$NODE_ID/volumes \\\n -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"',
|
|
3191
3195
|
},
|
|
3192
|
-
typescript: {
|
|
3193
|
-
method: 'client.nks.clusters.pools.nodes.volumes.list',
|
|
3194
|
-
example: "import NirvanaLabs from '@nirvana-labs/nirvana';\n\nconst client = new NirvanaLabs({\n apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const nksNodeVolume of client.nks.clusters.pools.nodes.volumes.list('node_id', {\n cluster_id: 'cluster_id',\n pool_id: 'pool_id',\n})) {\n console.log(nksNodeVolume.id);\n}",
|
|
3195
|
-
},
|
|
3196
3196
|
},
|
|
3197
3197
|
},
|
|
3198
3198
|
];
|