@nirvana-labs/nirvana 1.91.3 → 1.91.5
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/CHANGELOG.md +14 -0
- package/bin/migration-config.json +37 -0
- package/client.d.mts +2 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -0
- package/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/compute/vms/availability.d.mts +1 -1
- package/resources/compute/vms/availability.d.ts +1 -1
- package/resources/compute/vms/availability.js +1 -1
- package/resources/compute/vms/availability.mjs +1 -1
- package/resources/compute/vms/cost.d.mts +149 -0
- package/resources/compute/vms/cost.d.mts.map +1 -0
- package/resources/compute/vms/cost.d.ts +149 -0
- package/resources/compute/vms/cost.d.ts.map +1 -0
- package/resources/compute/vms/cost.js +47 -0
- package/resources/compute/vms/cost.js.map +1 -0
- package/resources/compute/vms/cost.mjs +43 -0
- package/resources/compute/vms/cost.mjs.map +1 -0
- package/resources/compute/vms/index.d.mts +1 -0
- package/resources/compute/vms/index.d.mts.map +1 -1
- package/resources/compute/vms/index.d.ts +1 -0
- package/resources/compute/vms/index.d.ts.map +1 -1
- package/resources/compute/vms/index.js +3 -1
- package/resources/compute/vms/index.js.map +1 -1
- package/resources/compute/vms/index.mjs +1 -0
- package/resources/compute/vms/index.mjs.map +1 -1
- package/resources/compute/vms/vms.d.mts +5 -1
- package/resources/compute/vms/vms.d.mts.map +1 -1
- package/resources/compute/vms/vms.d.ts +5 -1
- package/resources/compute/vms/vms.d.ts.map +1 -1
- package/resources/compute/vms/vms.js +5 -1
- package/resources/compute/vms/vms.js.map +1 -1
- package/resources/compute/vms/vms.mjs +5 -1
- package/resources/compute/vms/vms.mjs.map +1 -1
- package/resources/compute/volumes/cost.d.mts +81 -0
- package/resources/compute/volumes/cost.d.mts.map +1 -0
- package/resources/compute/volumes/cost.d.ts +81 -0
- package/resources/compute/volumes/cost.d.ts.map +1 -0
- package/resources/compute/volumes/cost.js +40 -0
- package/resources/compute/volumes/cost.js.map +1 -0
- package/resources/compute/volumes/cost.mjs +36 -0
- package/resources/compute/volumes/cost.mjs.map +1 -0
- package/resources/compute/volumes/index.d.mts +1 -0
- package/resources/compute/volumes/index.d.mts.map +1 -1
- package/resources/compute/volumes/index.d.ts +1 -0
- package/resources/compute/volumes/index.d.ts.map +1 -1
- package/resources/compute/volumes/index.js +3 -1
- package/resources/compute/volumes/index.js.map +1 -1
- package/resources/compute/volumes/index.mjs +1 -0
- package/resources/compute/volumes/index.mjs.map +1 -1
- package/resources/compute/volumes/volumes.d.mts +4 -0
- package/resources/compute/volumes/volumes.d.mts.map +1 -1
- package/resources/compute/volumes/volumes.d.ts +4 -0
- package/resources/compute/volumes/volumes.d.ts.map +1 -1
- package/resources/compute/volumes/volumes.js +4 -0
- package/resources/compute/volumes/volumes.js.map +1 -1
- package/resources/compute/volumes/volumes.mjs +4 -0
- package/resources/compute/volumes/volumes.mjs.map +1 -1
- package/resources/networking/connect/connect.d.mts +2 -2
- package/resources/networking/connect/connect.d.mts.map +1 -1
- package/resources/networking/connect/connect.d.ts +2 -2
- package/resources/networking/connect/connect.d.ts.map +1 -1
- package/resources/networking/connect/connect.js +2 -2
- package/resources/networking/connect/connect.js.map +1 -1
- package/resources/networking/connect/connect.mjs +2 -2
- package/resources/networking/connect/connect.mjs.map +1 -1
- package/resources/networking/connect/connections/connections.d.mts +136 -0
- package/resources/networking/connect/connections/connections.d.mts.map +1 -0
- package/resources/networking/connect/connections/connections.d.ts +136 -0
- package/resources/networking/connect/connections/connections.d.ts.map +1 -0
- package/resources/networking/connect/connections/connections.js +96 -0
- package/resources/networking/connect/connections/connections.js.map +1 -0
- package/resources/networking/connect/connections/connections.mjs +91 -0
- package/resources/networking/connect/connections/connections.mjs.map +1 -0
- package/resources/networking/connect/connections/cost.d.mts +85 -0
- package/resources/networking/connect/connections/cost.d.mts.map +1 -0
- package/resources/networking/connect/connections/cost.d.ts +85 -0
- package/resources/networking/connect/connections/cost.d.ts.map +1 -0
- package/resources/networking/connect/connections/cost.js +47 -0
- package/resources/networking/connect/connections/cost.js.map +1 -0
- package/resources/networking/connect/connections/cost.mjs +43 -0
- package/resources/networking/connect/connections/cost.mjs.map +1 -0
- package/resources/networking/connect/connections/index.d.mts +3 -0
- package/resources/networking/connect/connections/index.d.mts.map +1 -0
- package/resources/networking/connect/connections/index.d.ts +3 -0
- package/resources/networking/connect/connections/index.d.ts.map +1 -0
- package/resources/networking/connect/connections/index.js +9 -0
- package/resources/networking/connect/connections/index.js.map +1 -0
- package/resources/networking/connect/connections/index.mjs +4 -0
- package/resources/networking/connect/connections/index.mjs.map +1 -0
- package/resources/networking/connect/connections.d.mts +1 -131
- package/resources/networking/connect/connections.d.mts.map +1 -1
- package/resources/networking/connect/connections.d.ts +1 -131
- package/resources/networking/connect/connections.d.ts.map +1 -1
- package/resources/networking/connect/connections.js +2 -84
- package/resources/networking/connect/connections.js.map +1 -1
- package/resources/networking/connect/connections.mjs +1 -82
- package/resources/networking/connect/connections.mjs.map +1 -1
- package/resources/networking/connect/index.d.mts +1 -1
- package/resources/networking/connect/index.d.mts.map +1 -1
- package/resources/networking/connect/index.d.ts +1 -1
- package/resources/networking/connect/index.d.ts.map +1 -1
- package/resources/networking/connect/index.js +2 -2
- package/resources/networking/connect/index.js.map +1 -1
- package/resources/networking/connect/index.mjs +1 -1
- package/resources/networking/connect/index.mjs.map +1 -1
- package/resources/networking/vpcs/cost.d.mts +71 -0
- package/resources/networking/vpcs/cost.d.mts.map +1 -0
- package/resources/networking/vpcs/cost.d.ts +71 -0
- package/resources/networking/vpcs/cost.d.ts.map +1 -0
- package/resources/networking/vpcs/cost.js +39 -0
- package/resources/networking/vpcs/cost.js.map +1 -0
- package/resources/networking/vpcs/cost.mjs +35 -0
- package/resources/networking/vpcs/cost.mjs.map +1 -0
- package/resources/networking/vpcs/index.d.mts +1 -0
- package/resources/networking/vpcs/index.d.mts.map +1 -1
- package/resources/networking/vpcs/index.d.ts +1 -0
- package/resources/networking/vpcs/index.d.ts.map +1 -1
- package/resources/networking/vpcs/index.js +3 -1
- package/resources/networking/vpcs/index.js.map +1 -1
- package/resources/networking/vpcs/index.mjs +1 -0
- package/resources/networking/vpcs/index.mjs.map +1 -1
- package/resources/networking/vpcs/vpcs.d.mts +4 -0
- package/resources/networking/vpcs/vpcs.d.mts.map +1 -1
- package/resources/networking/vpcs/vpcs.d.ts +4 -0
- package/resources/networking/vpcs/vpcs.d.ts.map +1 -1
- package/resources/networking/vpcs/vpcs.js +4 -0
- package/resources/networking/vpcs/vpcs.js.map +1 -1
- package/resources/networking/vpcs/vpcs.mjs +4 -0
- package/resources/networking/vpcs/vpcs.mjs.map +1 -1
- package/resources/nks/clusters/clusters.d.mts +4 -0
- package/resources/nks/clusters/clusters.d.mts.map +1 -1
- package/resources/nks/clusters/clusters.d.ts +4 -0
- package/resources/nks/clusters/clusters.d.ts.map +1 -1
- package/resources/nks/clusters/clusters.js +4 -0
- package/resources/nks/clusters/clusters.js.map +1 -1
- package/resources/nks/clusters/clusters.mjs +4 -0
- package/resources/nks/clusters/clusters.mjs.map +1 -1
- package/resources/nks/clusters/cost.d.mts +81 -0
- package/resources/nks/clusters/cost.d.mts.map +1 -0
- package/resources/nks/clusters/cost.d.ts +81 -0
- package/resources/nks/clusters/cost.d.ts.map +1 -0
- package/resources/nks/clusters/cost.js +41 -0
- package/resources/nks/clusters/cost.js.map +1 -0
- package/resources/nks/clusters/cost.mjs +37 -0
- package/resources/nks/clusters/cost.mjs.map +1 -0
- package/resources/nks/clusters/index.d.mts +1 -0
- package/resources/nks/clusters/index.d.mts.map +1 -1
- package/resources/nks/clusters/index.d.ts +1 -0
- package/resources/nks/clusters/index.d.ts.map +1 -1
- package/resources/nks/clusters/index.js +3 -1
- package/resources/nks/clusters/index.js.map +1 -1
- package/resources/nks/clusters/index.mjs +1 -0
- package/resources/nks/clusters/index.mjs.map +1 -1
- package/resources/nks/clusters/pools/cost.d.mts +97 -0
- package/resources/nks/clusters/pools/cost.d.mts.map +1 -0
- package/resources/nks/clusters/pools/cost.d.ts +97 -0
- package/resources/nks/clusters/pools/cost.d.ts.map +1 -0
- package/resources/nks/clusters/pools/cost.js +51 -0
- package/resources/nks/clusters/pools/cost.js.map +1 -0
- package/resources/nks/clusters/pools/cost.mjs +47 -0
- package/resources/nks/clusters/pools/cost.mjs.map +1 -0
- package/resources/nks/clusters/pools/index.d.mts +1 -0
- package/resources/nks/clusters/pools/index.d.mts.map +1 -1
- package/resources/nks/clusters/pools/index.d.ts +1 -0
- package/resources/nks/clusters/pools/index.d.ts.map +1 -1
- package/resources/nks/clusters/pools/index.js +3 -1
- package/resources/nks/clusters/pools/index.js.map +1 -1
- package/resources/nks/clusters/pools/index.mjs +1 -0
- package/resources/nks/clusters/pools/index.mjs.map +1 -1
- package/resources/nks/clusters/pools/pools.d.mts +4 -0
- package/resources/nks/clusters/pools/pools.d.mts.map +1 -1
- package/resources/nks/clusters/pools/pools.d.ts +4 -0
- package/resources/nks/clusters/pools/pools.d.ts.map +1 -1
- package/resources/nks/clusters/pools/pools.js +4 -0
- package/resources/nks/clusters/pools/pools.js.map +1 -1
- package/resources/nks/clusters/pools/pools.mjs +4 -0
- package/resources/nks/clusters/pools/pools.mjs.map +1 -1
- package/resources/shared.d.mts +226 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +226 -0
- package/resources/shared.d.ts.map +1 -1
- package/src/client.ts +2 -0
- package/src/resources/compute/api.md +14 -0
- package/src/resources/compute/vms/availability.ts +1 -1
- package/src/resources/compute/vms/cost.ts +180 -0
- package/src/resources/compute/vms/index.ts +1 -0
- package/src/resources/compute/vms/vms.ts +11 -1
- package/src/resources/compute/volumes/cost.ts +104 -0
- package/src/resources/compute/volumes/index.ts +1 -0
- package/src/resources/compute/volumes/volumes.ts +10 -0
- package/src/resources/networking/api.md +19 -5
- package/src/resources/networking/connect/connect.ts +4 -4
- package/src/resources/networking/connect/connections/connections.ts +189 -0
- package/src/resources/networking/connect/connections/cost.ts +111 -0
- package/src/resources/networking/connect/connections/index.ts +9 -0
- package/src/resources/networking/connect/connections.ts +1 -175
- package/src/resources/networking/connect/index.ts +1 -1
- package/src/resources/networking/vpcs/cost.ts +92 -0
- package/src/resources/networking/vpcs/index.ts +1 -0
- package/src/resources/networking/vpcs/vpcs.ts +10 -0
- package/src/resources/nks/api.md +14 -0
- package/src/resources/nks/clusters/clusters.ts +10 -0
- package/src/resources/nks/clusters/cost.ts +104 -0
- package/src/resources/nks/clusters/index.ts +1 -0
- package/src/resources/nks/clusters/pools/cost.ts +124 -0
- package/src/resources/nks/clusters/pools/index.ts +1 -0
- package/src/resources/nks/clusters/pools/pools.ts +10 -0
- package/src/resources/shared.ts +267 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../../core/resource';
|
|
4
|
+
import * as Shared from '../../../shared';
|
|
5
|
+
import * as ConnectAPI from '../connect';
|
|
6
|
+
import { APIPromise } from '../../../../core/api-promise';
|
|
7
|
+
import { RequestOptions } from '../../../../internal/request-options';
|
|
8
|
+
import { path } from '../../../../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
export class Cost extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Return a priced cost quote for the proposed Connect Connection.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const costQuote =
|
|
17
|
+
* await client.networking.connect.connections.cost.create({
|
|
18
|
+
* bandwidth_mbps: 50,
|
|
19
|
+
* cidrs: ['10.0.0.0/16'],
|
|
20
|
+
* name: 'my-connect-connection',
|
|
21
|
+
* project_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
22
|
+
* provider_cidrs: ['172.16.0.0/16'],
|
|
23
|
+
* region: 'us-sva-2',
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
create(body: CostCreateParams, options?: RequestOptions): APIPromise<Shared.CostQuote> {
|
|
28
|
+
return this._client.post('/v1/networking/connect/connections/cost', { body, ...options });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Return a priced cost quote for the proposed Connect Connection update plus a
|
|
33
|
+
* diff against the current state.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const costQuoteUpdate =
|
|
38
|
+
* await client.networking.connect.connections.cost.update(
|
|
39
|
+
* 'connection_id',
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
update(
|
|
44
|
+
connectionID: string,
|
|
45
|
+
body: CostUpdateParams,
|
|
46
|
+
options?: RequestOptions,
|
|
47
|
+
): APIPromise<Shared.CostQuoteUpdate> {
|
|
48
|
+
return this._client.patch(path`/v1/networking/connect/connections/${connectionID}/cost`, {
|
|
49
|
+
body,
|
|
50
|
+
...options,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface CostCreateParams {
|
|
56
|
+
/**
|
|
57
|
+
* Connect Connection speed in Mbps
|
|
58
|
+
*/
|
|
59
|
+
bandwidth_mbps: ConnectAPI.ConnectBandwidthMbps;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* CIDRs for the Connect Connection. Must be in network-aligned/canonical form.
|
|
63
|
+
*/
|
|
64
|
+
cidrs: Array<string>;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Name of the Connect Connection
|
|
68
|
+
*/
|
|
69
|
+
name: string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Project ID the Connect Connection belongs to
|
|
73
|
+
*/
|
|
74
|
+
project_id: string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Provider CIDRs. Must be in network-aligned/canonical form.
|
|
78
|
+
*/
|
|
79
|
+
provider_cidrs: Array<string>;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Region the resource is in.
|
|
83
|
+
*/
|
|
84
|
+
region: Shared.RegionName;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* AWS provider configuration
|
|
88
|
+
*/
|
|
89
|
+
aws?: ConnectAPI.ConnectConnectionAWSConfigRequest;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Tags to attach to the Connect Connection
|
|
93
|
+
*/
|
|
94
|
+
tags?: Array<string>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface CostUpdateParams {
|
|
98
|
+
/**
|
|
99
|
+
* Name of the Connect Connection.
|
|
100
|
+
*/
|
|
101
|
+
name?: string;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Tags to attach to the Connect Connection
|
|
105
|
+
*/
|
|
106
|
+
tags?: Array<string>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export declare namespace Cost {
|
|
110
|
+
export { type CostCreateParams as CostCreateParams, type CostUpdateParams as CostUpdateParams };
|
|
111
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Connections,
|
|
5
|
+
type ConnectionCreateParams,
|
|
6
|
+
type ConnectionUpdateParams,
|
|
7
|
+
type ConnectionListParams,
|
|
8
|
+
} from './connections';
|
|
9
|
+
export { Cost, type CostCreateParams, type CostUpdateParams } from './cost';
|
|
@@ -1,177 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import * as Shared from '../../shared';
|
|
5
|
-
import * as OperationsAPI from '../../operations/operations';
|
|
6
|
-
import * as ConnectAPI from './connect';
|
|
7
|
-
import { ConnectConnectionsCursor } from './connect';
|
|
8
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
9
|
-
import { Cursor, type CursorParams, PagePromise } from '../../../core/pagination';
|
|
10
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
11
|
-
import { path } from '../../../internal/utils/path';
|
|
12
|
-
|
|
13
|
-
export class Connections extends APIResource {
|
|
14
|
-
/**
|
|
15
|
-
* Create a Connect Connection
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* const operation =
|
|
20
|
-
* await client.networking.connect.connections.create({
|
|
21
|
-
* bandwidth_mbps: 50,
|
|
22
|
-
* cidrs: ['10.0.0.0/16'],
|
|
23
|
-
* name: 'my-connect-connection',
|
|
24
|
-
* project_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
25
|
-
* provider_cidrs: ['172.16.0.0/16'],
|
|
26
|
-
* region: 'us-sva-2',
|
|
27
|
-
* });
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
create(body: ConnectionCreateParams, options?: RequestOptions): APIPromise<OperationsAPI.Operation> {
|
|
31
|
-
return this._client.post('/v1/networking/connect/connections', { body, ...options });
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Get Connect Connection details
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```ts
|
|
39
|
-
* const connectConnection =
|
|
40
|
-
* await client.networking.connect.connections.get(
|
|
41
|
-
* 'connection_id',
|
|
42
|
-
* );
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
get(connectionID: string, options?: RequestOptions): APIPromise<ConnectAPI.ConnectConnection> {
|
|
46
|
-
return this._client.get(path`/v1/networking/connect/connections/${connectionID}`, options);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Update Connect Connection details
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```ts
|
|
54
|
-
* const operation =
|
|
55
|
-
* await client.networking.connect.connections.update(
|
|
56
|
-
* 'connection_id',
|
|
57
|
-
* );
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
update(
|
|
61
|
-
connectionID: string,
|
|
62
|
-
body: ConnectionUpdateParams,
|
|
63
|
-
options?: RequestOptions,
|
|
64
|
-
): APIPromise<OperationsAPI.Operation> {
|
|
65
|
-
return this._client.patch(path`/v1/networking/connect/connections/${connectionID}`, { body, ...options });
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Delete Connect Connection
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```ts
|
|
73
|
-
* const operation =
|
|
74
|
-
* await client.networking.connect.connections.delete(
|
|
75
|
-
* 'connection_id',
|
|
76
|
-
* );
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
delete(connectionID: string, options?: RequestOptions): APIPromise<OperationsAPI.Operation> {
|
|
80
|
-
return this._client.delete(path`/v1/networking/connect/connections/${connectionID}`, options);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* List all Connect Connections
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```ts
|
|
88
|
-
* // Automatically fetches more pages as needed.
|
|
89
|
-
* for await (const connectConnection of client.networking.connect.connections.list(
|
|
90
|
-
* { project_id: 'project_id' },
|
|
91
|
-
* )) {
|
|
92
|
-
* // ...
|
|
93
|
-
* }
|
|
94
|
-
* ```
|
|
95
|
-
*/
|
|
96
|
-
list(
|
|
97
|
-
query: ConnectionListParams,
|
|
98
|
-
options?: RequestOptions,
|
|
99
|
-
): PagePromise<ConnectConnectionsCursor, ConnectAPI.ConnectConnection> {
|
|
100
|
-
return this._client.getAPIList(
|
|
101
|
-
'/v1/networking/connect/connections',
|
|
102
|
-
Cursor<ConnectAPI.ConnectConnection>,
|
|
103
|
-
{ query, ...options },
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export interface ConnectionCreateParams {
|
|
109
|
-
/**
|
|
110
|
-
* Connect Connection speed in Mbps
|
|
111
|
-
*/
|
|
112
|
-
bandwidth_mbps: ConnectAPI.ConnectBandwidthMbps;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* CIDRs for the Connect Connection. Must be in network-aligned/canonical form.
|
|
116
|
-
*/
|
|
117
|
-
cidrs: Array<string>;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Name of the Connect Connection
|
|
121
|
-
*/
|
|
122
|
-
name: string;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Project ID the Connect Connection belongs to
|
|
126
|
-
*/
|
|
127
|
-
project_id: string;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Provider CIDRs. Must be in network-aligned/canonical form.
|
|
131
|
-
*/
|
|
132
|
-
provider_cidrs: Array<string>;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Region the resource is in.
|
|
136
|
-
*/
|
|
137
|
-
region: Shared.RegionName;
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* AWS provider configuration
|
|
141
|
-
*/
|
|
142
|
-
aws?: ConnectAPI.ConnectConnectionAWSConfigRequest;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Tags to attach to the Connect Connection
|
|
146
|
-
*/
|
|
147
|
-
tags?: Array<string>;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export interface ConnectionUpdateParams {
|
|
151
|
-
/**
|
|
152
|
-
* Name of the Connect Connection.
|
|
153
|
-
*/
|
|
154
|
-
name?: string;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Tags to attach to the Connect Connection
|
|
158
|
-
*/
|
|
159
|
-
tags?: Array<string>;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export interface ConnectionListParams extends CursorParams {
|
|
163
|
-
/**
|
|
164
|
-
* Project ID of resources to request
|
|
165
|
-
*/
|
|
166
|
-
project_id: string;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
export declare namespace Connections {
|
|
170
|
-
export {
|
|
171
|
-
type ConnectionCreateParams as ConnectionCreateParams,
|
|
172
|
-
type ConnectionUpdateParams as ConnectionUpdateParams,
|
|
173
|
-
type ConnectionListParams as ConnectionListParams,
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export { type ConnectConnectionsCursor };
|
|
3
|
+
export * from './connections/index';
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as Shared from '../../shared';
|
|
5
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
+
import { path } from '../../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class Cost extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Return a priced cost quote for the proposed VPC.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const costQuote = await client.networking.vpcs.cost.create({
|
|
16
|
+
* name: 'my-vpc',
|
|
17
|
+
* project_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
18
|
+
* region: 'us-sva-2',
|
|
19
|
+
* subnet_name: 'my-subnet',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
create(body: CostCreateParams, options?: RequestOptions): APIPromise<Shared.CostQuote> {
|
|
24
|
+
return this._client.post('/v1/networking/vpcs/cost', { body, ...options });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Return a priced cost quote for the proposed VPC update plus a diff against the
|
|
29
|
+
* current state.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const costQuoteUpdate =
|
|
34
|
+
* await client.networking.vpcs.cost.update('vpc_id');
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
update(
|
|
38
|
+
vpcID: string,
|
|
39
|
+
body: CostUpdateParams,
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): APIPromise<Shared.CostQuoteUpdate> {
|
|
42
|
+
return this._client.patch(path`/v1/networking/vpcs/${vpcID}/cost`, { body, ...options });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface CostCreateParams {
|
|
47
|
+
/**
|
|
48
|
+
* Name of the VPC.
|
|
49
|
+
*/
|
|
50
|
+
name: string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Project ID the VPC belongs to.
|
|
54
|
+
*/
|
|
55
|
+
project_id: string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Region the resource is in.
|
|
59
|
+
*/
|
|
60
|
+
region: Shared.RegionName;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Name of the subnet to create.
|
|
64
|
+
*/
|
|
65
|
+
subnet_name: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Tags to attach to the VPC.
|
|
69
|
+
*/
|
|
70
|
+
tags?: Array<string>;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface CostUpdateParams {
|
|
74
|
+
/**
|
|
75
|
+
* Name of the VPC.
|
|
76
|
+
*/
|
|
77
|
+
name?: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Name of the subnet to create.
|
|
81
|
+
*/
|
|
82
|
+
subnet_name?: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Tags to attach to the VPC.
|
|
86
|
+
*/
|
|
87
|
+
tags?: Array<string>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export declare namespace Cost {
|
|
91
|
+
export { type CostCreateParams as CostCreateParams, type CostUpdateParams as CostUpdateParams };
|
|
92
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
export { Availability, type AvailabilityCreateParams, type AvailabilityUpdateParams } from './availability';
|
|
4
|
+
export { Cost, type CostCreateParams, type CostUpdateParams } from './cost';
|
|
4
5
|
export {
|
|
5
6
|
VPCs,
|
|
6
7
|
type Subnet,
|
|
@@ -5,6 +5,8 @@ import * as Shared from '../../shared';
|
|
|
5
5
|
import * as OperationsAPI from '../../operations/operations';
|
|
6
6
|
import * as AvailabilityAPI from './availability';
|
|
7
7
|
import { Availability, AvailabilityCreateParams, AvailabilityUpdateParams } from './availability';
|
|
8
|
+
import * as CostAPI from './cost';
|
|
9
|
+
import { Cost, CostCreateParams, CostUpdateParams } from './cost';
|
|
8
10
|
import { APIPromise } from '../../../core/api-promise';
|
|
9
11
|
import { Cursor, type CursorParams, PagePromise } from '../../../core/pagination';
|
|
10
12
|
import { RequestOptions } from '../../../internal/request-options';
|
|
@@ -12,6 +14,7 @@ import { path } from '../../../internal/utils/path';
|
|
|
12
14
|
|
|
13
15
|
export class VPCs extends APIResource {
|
|
14
16
|
availability: AvailabilityAPI.Availability = new AvailabilityAPI.Availability(this._client);
|
|
17
|
+
cost: CostAPI.Cost = new CostAPI.Cost(this._client);
|
|
15
18
|
|
|
16
19
|
/**
|
|
17
20
|
* Create a VPC
|
|
@@ -240,6 +243,7 @@ export interface VPCListParams extends CursorParams {
|
|
|
240
243
|
}
|
|
241
244
|
|
|
242
245
|
VPCs.Availability = Availability;
|
|
246
|
+
VPCs.Cost = Cost;
|
|
243
247
|
|
|
244
248
|
export declare namespace VPCs {
|
|
245
249
|
export {
|
|
@@ -257,4 +261,10 @@ export declare namespace VPCs {
|
|
|
257
261
|
type AvailabilityCreateParams as AvailabilityCreateParams,
|
|
258
262
|
type AvailabilityUpdateParams as AvailabilityUpdateParams,
|
|
259
263
|
};
|
|
264
|
+
|
|
265
|
+
export {
|
|
266
|
+
Cost as Cost,
|
|
267
|
+
type CostCreateParams as CostCreateParams,
|
|
268
|
+
type CostUpdateParams as CostUpdateParams,
|
|
269
|
+
};
|
|
260
270
|
}
|
package/src/resources/nks/api.md
CHANGED
|
@@ -32,6 +32,13 @@ Methods:
|
|
|
32
32
|
- <code title="post /v1/nks/clusters/availability">client.nks.clusters.availability.<a href="./src/resources/nks/clusters/availability.ts">create</a>({ ...params }) -> void</code>
|
|
33
33
|
- <code title="patch /v1/nks/clusters/{cluster_id}/availability">client.nks.clusters.availability.<a href="./src/resources/nks/clusters/availability.ts">update</a>(clusterID, { ...params }) -> void</code>
|
|
34
34
|
|
|
35
|
+
### Cost
|
|
36
|
+
|
|
37
|
+
Methods:
|
|
38
|
+
|
|
39
|
+
- <code title="post /v1/nks/clusters/cost">client.nks.clusters.cost.<a href="./src/resources/nks/clusters/cost.ts">create</a>({ ...params }) -> CostQuote</code>
|
|
40
|
+
- <code title="patch /v1/nks/clusters/{cluster_id}/cost">client.nks.clusters.cost.<a href="./src/resources/nks/clusters/cost.ts">update</a>(clusterID, { ...params }) -> CostQuoteUpdate</code>
|
|
41
|
+
|
|
35
42
|
### PersistentVolumeClaims
|
|
36
43
|
|
|
37
44
|
Types:
|
|
@@ -117,6 +124,13 @@ Methods:
|
|
|
117
124
|
- <code title="post /v1/nks/clusters/{cluster_id}/pools/availability">client.nks.clusters.pools.availability.<a href="./src/resources/nks/clusters/pools/availability.ts">create</a>(clusterID, { ...params }) -> void</code>
|
|
118
125
|
- <code title="patch /v1/nks/clusters/{cluster_id}/pools/{pool_id}/availability">client.nks.clusters.pools.availability.<a href="./src/resources/nks/clusters/pools/availability.ts">update</a>(poolID, { ...params }) -> void</code>
|
|
119
126
|
|
|
127
|
+
#### Cost
|
|
128
|
+
|
|
129
|
+
Methods:
|
|
130
|
+
|
|
131
|
+
- <code title="post /v1/nks/clusters/{cluster_id}/pools/cost">client.nks.clusters.pools.cost.<a href="./src/resources/nks/clusters/pools/cost.ts">create</a>(clusterID, { ...params }) -> CostQuote</code>
|
|
132
|
+
- <code title="patch /v1/nks/clusters/{cluster_id}/pools/{pool_id}/cost">client.nks.clusters.pools.cost.<a href="./src/resources/nks/clusters/pools/cost.ts">update</a>(poolID, { ...params }) -> CostQuoteUpdate</code>
|
|
133
|
+
|
|
120
134
|
#### Nodes
|
|
121
135
|
|
|
122
136
|
Types:
|
|
@@ -5,6 +5,8 @@ import * as Shared from '../../shared';
|
|
|
5
5
|
import * as OperationsAPI from '../../operations/operations';
|
|
6
6
|
import * as AvailabilityAPI from './availability';
|
|
7
7
|
import { Availability, AvailabilityCreateParams, AvailabilityUpdateParams } from './availability';
|
|
8
|
+
import * as CostAPI from './cost';
|
|
9
|
+
import { Cost, CostCreateParams, CostUpdateParams } from './cost';
|
|
8
10
|
import * as KubeconfigAPI from './kubeconfig';
|
|
9
11
|
import { Kubeconfig, KubeconfigResource } from './kubeconfig';
|
|
10
12
|
import * as LoadBalancersAPI from './load-balancers';
|
|
@@ -58,6 +60,7 @@ import { path } from '../../../internal/utils/path';
|
|
|
58
60
|
|
|
59
61
|
export class Clusters extends APIResource {
|
|
60
62
|
availability: AvailabilityAPI.Availability = new AvailabilityAPI.Availability(this._client);
|
|
63
|
+
cost: CostAPI.Cost = new CostAPI.Cost(this._client);
|
|
61
64
|
persistentVolumeClaims: PersistentVolumeClaimsAPI.PersistentVolumeClaims =
|
|
62
65
|
new PersistentVolumeClaimsAPI.PersistentVolumeClaims(this._client);
|
|
63
66
|
kubeconfig: KubeconfigAPI.KubeconfigResource = new KubeconfigAPI.KubeconfigResource(this._client);
|
|
@@ -296,6 +299,7 @@ export interface ClusterListParams extends CursorParams {
|
|
|
296
299
|
}
|
|
297
300
|
|
|
298
301
|
Clusters.Availability = Availability;
|
|
302
|
+
Clusters.Cost = Cost;
|
|
299
303
|
Clusters.PersistentVolumeClaims = PersistentVolumeClaims;
|
|
300
304
|
Clusters.KubeconfigResource = KubeconfigResource;
|
|
301
305
|
Clusters.Controllers = Controllers;
|
|
@@ -318,6 +322,12 @@ export declare namespace Clusters {
|
|
|
318
322
|
type AvailabilityUpdateParams as AvailabilityUpdateParams,
|
|
319
323
|
};
|
|
320
324
|
|
|
325
|
+
export {
|
|
326
|
+
Cost as Cost,
|
|
327
|
+
type CostCreateParams as CostCreateParams,
|
|
328
|
+
type CostUpdateParams as CostUpdateParams,
|
|
329
|
+
};
|
|
330
|
+
|
|
321
331
|
export {
|
|
322
332
|
PersistentVolumeClaims as PersistentVolumeClaims,
|
|
323
333
|
type PersistentVolumeClaim as PersistentVolumeClaim,
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as Shared from '../../shared';
|
|
5
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
6
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
+
import { path } from '../../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class Cost extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Return a priced cost quote for the proposed NKS cluster.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const costQuote = await client.nks.clusters.cost.create({
|
|
16
|
+
* autoscaling: true,
|
|
17
|
+
* kubernetes_version: 'v1.34.4',
|
|
18
|
+
* name: 'my-cluster',
|
|
19
|
+
* project_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
20
|
+
* region: 'us-sva-2',
|
|
21
|
+
* vpc_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
create(body: CostCreateParams, options?: RequestOptions): APIPromise<Shared.CostQuote> {
|
|
26
|
+
return this._client.post('/v1/nks/clusters/cost', { body, ...options });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Return a priced cost quote for the proposed NKS cluster update plus a diff
|
|
31
|
+
* against the current state.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const costQuoteUpdate =
|
|
36
|
+
* await client.nks.clusters.cost.update('cluster_id');
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
update(
|
|
40
|
+
clusterID: string,
|
|
41
|
+
body: CostUpdateParams,
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): APIPromise<Shared.CostQuoteUpdate> {
|
|
44
|
+
return this._client.patch(path`/v1/nks/clusters/${clusterID}/cost`, { body, ...options });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface CostCreateParams {
|
|
49
|
+
/**
|
|
50
|
+
* Whether to enable autoscaling for the Cluster.
|
|
51
|
+
*/
|
|
52
|
+
autoscaling: boolean;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Kubernetes version for the Cluster.
|
|
56
|
+
*/
|
|
57
|
+
kubernetes_version: string;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Name of the Cluster.
|
|
61
|
+
*/
|
|
62
|
+
name: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Project ID to create the Cluster in.
|
|
66
|
+
*/
|
|
67
|
+
project_id: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Region the resource is in.
|
|
71
|
+
*/
|
|
72
|
+
region: Shared.RegionName;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* ID of the VPC to use for the Cluster.
|
|
76
|
+
*/
|
|
77
|
+
vpc_id: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Tags to attach to the Cluster.
|
|
81
|
+
*/
|
|
82
|
+
tags?: Array<string>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface CostUpdateParams {
|
|
86
|
+
/**
|
|
87
|
+
* Whether to enable autoscaling for the Cluster.
|
|
88
|
+
*/
|
|
89
|
+
autoscaling?: boolean;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Name of the Cluster.
|
|
93
|
+
*/
|
|
94
|
+
name?: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Tags to attach to the Cluster.
|
|
98
|
+
*/
|
|
99
|
+
tags?: Array<string>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export declare namespace Cost {
|
|
103
|
+
export { type CostCreateParams as CostCreateParams, type CostUpdateParams as CostUpdateParams };
|
|
104
|
+
}
|
|
@@ -18,6 +18,7 @@ export {
|
|
|
18
18
|
type ControllerListParams,
|
|
19
19
|
type NKSControllersCursor,
|
|
20
20
|
} from './controllers/index';
|
|
21
|
+
export { Cost, type CostCreateParams, type CostUpdateParams } from './cost';
|
|
21
22
|
export { KubeconfigResource, type Kubeconfig } from './kubeconfig';
|
|
22
23
|
export {
|
|
23
24
|
LoadBalancers,
|