@nirvana-labs/nirvana 1.91.4 → 1.91.6
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/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 +4 -0
- package/resources/compute/vms/vms.d.mts.map +1 -1
- package/resources/compute/vms/vms.d.ts +4 -0
- package/resources/compute/vms/vms.d.ts.map +1 -1
- package/resources/compute/vms/vms.js +4 -0
- package/resources/compute/vms/vms.js.map +1 -1
- package/resources/compute/vms/vms.mjs +4 -0
- 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/cost.ts +180 -0
- package/src/resources/compute/vms/index.ts +1 -0
- package/src/resources/compute/vms/vms.ts +10 -0
- 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
|
@@ -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 { OSImages, type OSImageListParams } from './os-images';
|
|
5
6
|
export {
|
|
6
7
|
VMs,
|
|
@@ -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 OSImagesAPI from './os-images';
|
|
9
11
|
import { OSImageListParams, OSImages } from './os-images';
|
|
10
12
|
import * as VolumesAPI from './volumes';
|
|
@@ -17,6 +19,7 @@ import { path } from '../../../internal/utils/path';
|
|
|
17
19
|
|
|
18
20
|
export class VMs extends APIResource {
|
|
19
21
|
availability: AvailabilityAPI.Availability = new AvailabilityAPI.Availability(this._client);
|
|
22
|
+
cost: CostAPI.Cost = new CostAPI.Cost(this._client);
|
|
20
23
|
volumes: VolumesAPI.Volumes = new VolumesAPI.Volumes(this._client);
|
|
21
24
|
osImages: OSImagesAPI.OSImages = new OSImagesAPI.OSImages(this._client);
|
|
22
25
|
|
|
@@ -408,6 +411,7 @@ export interface VMListParams extends CursorParams {
|
|
|
408
411
|
}
|
|
409
412
|
|
|
410
413
|
VMs.Availability = Availability;
|
|
414
|
+
VMs.Cost = Cost;
|
|
411
415
|
VMs.Volumes = Volumes;
|
|
412
416
|
VMs.OSImages = OSImages;
|
|
413
417
|
|
|
@@ -431,6 +435,12 @@ export declare namespace VMs {
|
|
|
431
435
|
type AvailabilityUpdateParams as AvailabilityUpdateParams,
|
|
432
436
|
};
|
|
433
437
|
|
|
438
|
+
export {
|
|
439
|
+
Cost as Cost,
|
|
440
|
+
type CostCreateParams as CostCreateParams,
|
|
441
|
+
type CostUpdateParams as CostUpdateParams,
|
|
442
|
+
};
|
|
443
|
+
|
|
434
444
|
export { Volumes as Volumes, type VolumeListParams as VolumeListParams };
|
|
435
445
|
|
|
436
446
|
export { OSImages as OSImages, type OSImageListParams as OSImageListParams };
|
|
@@ -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 * as VolumesAPI from './volumes';
|
|
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 Volume.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const costQuote = await client.compute.volumes.cost.create({
|
|
17
|
+
* name: 'my-data-volume',
|
|
18
|
+
* project_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
19
|
+
* region: 'us-sva-2',
|
|
20
|
+
* size: 100,
|
|
21
|
+
* type: 'abs',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
create(body: CostCreateParams, options?: RequestOptions): APIPromise<Shared.CostQuote> {
|
|
26
|
+
return this._client.post('/v1/compute/volumes/cost', { body, ...options });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Return a priced cost quote for the proposed Volume update plus a diff against
|
|
31
|
+
* the current state.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const costQuoteUpdate =
|
|
36
|
+
* await client.compute.volumes.cost.update('volume_id');
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
update(
|
|
40
|
+
volumeID: string,
|
|
41
|
+
body: CostUpdateParams,
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): APIPromise<Shared.CostQuoteUpdate> {
|
|
44
|
+
return this._client.patch(path`/v1/compute/volumes/${volumeID}/cost`, { body, ...options });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface CostCreateParams {
|
|
49
|
+
/**
|
|
50
|
+
* Name of the Volume.
|
|
51
|
+
*/
|
|
52
|
+
name: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Project ID the Volume belongs to.
|
|
56
|
+
*/
|
|
57
|
+
project_id: string;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Region the resource is in.
|
|
61
|
+
*/
|
|
62
|
+
region: Shared.RegionName;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Size of the Volume in GB.
|
|
66
|
+
*/
|
|
67
|
+
size: number;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Type of the Volume.
|
|
71
|
+
*/
|
|
72
|
+
type: VolumesAPI.VolumeType;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Tags to attach to the Volume.
|
|
76
|
+
*/
|
|
77
|
+
tags?: Array<string>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* ID of the VM the Volume is attached to.
|
|
81
|
+
*/
|
|
82
|
+
vm_id?: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface CostUpdateParams {
|
|
86
|
+
/**
|
|
87
|
+
* Name of the Volume.
|
|
88
|
+
*/
|
|
89
|
+
name?: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Size of the Volume in GB.
|
|
93
|
+
*/
|
|
94
|
+
size?: number;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Tags to attach to the Volume.
|
|
98
|
+
*/
|
|
99
|
+
tags?: Array<string>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export declare namespace Cost {
|
|
103
|
+
export { type CostCreateParams as CostCreateParams, type CostUpdateParams as CostUpdateParams };
|
|
104
|
+
}
|
|
@@ -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
|
Volumes,
|
|
6
7
|
type Volume,
|
|
@@ -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 Volumes 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 Volume. Only data volumes can be created.
|
|
@@ -288,6 +291,7 @@ export interface VolumeAttachParams {
|
|
|
288
291
|
}
|
|
289
292
|
|
|
290
293
|
Volumes.Availability = Availability;
|
|
294
|
+
Volumes.Cost = Cost;
|
|
291
295
|
|
|
292
296
|
export declare namespace Volumes {
|
|
293
297
|
export {
|
|
@@ -307,4 +311,10 @@ export declare namespace Volumes {
|
|
|
307
311
|
type AvailabilityCreateParams as AvailabilityCreateParams,
|
|
308
312
|
type AvailabilityUpdateParams as AvailabilityUpdateParams,
|
|
309
313
|
};
|
|
314
|
+
|
|
315
|
+
export {
|
|
316
|
+
Cost as Cost,
|
|
317
|
+
type CostCreateParams as CostCreateParams,
|
|
318
|
+
type CostUpdateParams as CostUpdateParams,
|
|
319
|
+
};
|
|
310
320
|
}
|
|
@@ -23,6 +23,13 @@ Methods:
|
|
|
23
23
|
- <code title="post /v1/networking/vpcs/availability">client.networking.vpcs.availability.<a href="./src/resources/networking/vpcs/availability.ts">create</a>({ ...params }) -> void</code>
|
|
24
24
|
- <code title="patch /v1/networking/vpcs/{vpc_id}/availability">client.networking.vpcs.availability.<a href="./src/resources/networking/vpcs/availability.ts">update</a>(vpcID, { ...params }) -> void</code>
|
|
25
25
|
|
|
26
|
+
### Cost
|
|
27
|
+
|
|
28
|
+
Methods:
|
|
29
|
+
|
|
30
|
+
- <code title="post /v1/networking/vpcs/cost">client.networking.vpcs.cost.<a href="./src/resources/networking/vpcs/cost.ts">create</a>({ ...params }) -> CostQuote</code>
|
|
31
|
+
- <code title="patch /v1/networking/vpcs/{vpc_id}/cost">client.networking.vpcs.cost.<a href="./src/resources/networking/vpcs/cost.ts">update</a>(vpcID, { ...params }) -> CostQuoteUpdate</code>
|
|
32
|
+
|
|
26
33
|
## FirewallRules
|
|
27
34
|
|
|
28
35
|
Types:
|
|
@@ -54,11 +61,18 @@ Types:
|
|
|
54
61
|
|
|
55
62
|
Methods:
|
|
56
63
|
|
|
57
|
-
- <code title="post /v1/networking/connect/connections">client.networking.connect.connections.<a href="./src/resources/networking/connect/connections.ts">create</a>({ ...params }) -> Operation</code>
|
|
58
|
-
- <code title="get /v1/networking/connect/connections/{connection_id}">client.networking.connect.connections.<a href="./src/resources/networking/connect/connections.ts">get</a>(connectionID) -> ConnectConnection</code>
|
|
59
|
-
- <code title="patch /v1/networking/connect/connections/{connection_id}">client.networking.connect.connections.<a href="./src/resources/networking/connect/connections.ts">update</a>(connectionID, { ...params }) -> Operation</code>
|
|
60
|
-
- <code title="delete /v1/networking/connect/connections/{connection_id}">client.networking.connect.connections.<a href="./src/resources/networking/connect/connections.ts">delete</a>(connectionID) -> Operation</code>
|
|
61
|
-
- <code title="get /v1/networking/connect/connections">client.networking.connect.connections.<a href="./src/resources/networking/connect/connections.ts">list</a>({ ...params }) -> ConnectConnectionsCursor</code>
|
|
64
|
+
- <code title="post /v1/networking/connect/connections">client.networking.connect.connections.<a href="./src/resources/networking/connect/connections/connections.ts">create</a>({ ...params }) -> Operation</code>
|
|
65
|
+
- <code title="get /v1/networking/connect/connections/{connection_id}">client.networking.connect.connections.<a href="./src/resources/networking/connect/connections/connections.ts">get</a>(connectionID) -> ConnectConnection</code>
|
|
66
|
+
- <code title="patch /v1/networking/connect/connections/{connection_id}">client.networking.connect.connections.<a href="./src/resources/networking/connect/connections/connections.ts">update</a>(connectionID, { ...params }) -> Operation</code>
|
|
67
|
+
- <code title="delete /v1/networking/connect/connections/{connection_id}">client.networking.connect.connections.<a href="./src/resources/networking/connect/connections/connections.ts">delete</a>(connectionID) -> Operation</code>
|
|
68
|
+
- <code title="get /v1/networking/connect/connections">client.networking.connect.connections.<a href="./src/resources/networking/connect/connections/connections.ts">list</a>({ ...params }) -> ConnectConnectionsCursor</code>
|
|
69
|
+
|
|
70
|
+
#### Cost
|
|
71
|
+
|
|
72
|
+
Methods:
|
|
73
|
+
|
|
74
|
+
- <code title="post /v1/networking/connect/connections/cost">client.networking.connect.connections.cost.<a href="./src/resources/networking/connect/connections/cost.ts">create</a>({ ...params }) -> CostQuote</code>
|
|
75
|
+
- <code title="patch /v1/networking/connect/connections/{connection_id}/cost">client.networking.connect.connections.cost.<a href="./src/resources/networking/connect/connections/cost.ts">update</a>(connectionID, { ...params }) -> CostQuoteUpdate</code>
|
|
62
76
|
|
|
63
77
|
### Routes
|
|
64
78
|
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as Shared from '../../shared';
|
|
5
|
-
import * as
|
|
5
|
+
import * as RoutesAPI from './routes';
|
|
6
|
+
import { RouteListParams, Routes } from './routes';
|
|
7
|
+
import * as ConnectionsAPI from './connections/connections';
|
|
6
8
|
import {
|
|
7
9
|
ConnectionCreateParams,
|
|
8
10
|
ConnectionListParams,
|
|
9
11
|
ConnectionUpdateParams,
|
|
10
12
|
Connections,
|
|
11
|
-
} from './connections';
|
|
12
|
-
import * as RoutesAPI from './routes';
|
|
13
|
-
import { RouteListParams, Routes } from './routes';
|
|
13
|
+
} from './connections/connections';
|
|
14
14
|
import { Cursor } from '../../../core/pagination';
|
|
15
15
|
|
|
16
16
|
export class Connect extends APIResource {
|
|
@@ -0,0 +1,189 @@
|
|
|
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 OperationsAPI from '../../../operations/operations';
|
|
6
|
+
import * as ConnectAPI from '../connect';
|
|
7
|
+
import { ConnectConnectionsCursor } from '../connect';
|
|
8
|
+
import * as CostAPI from './cost';
|
|
9
|
+
import { Cost, CostCreateParams, CostUpdateParams } from './cost';
|
|
10
|
+
import { APIPromise } from '../../../../core/api-promise';
|
|
11
|
+
import { Cursor, type CursorParams, PagePromise } from '../../../../core/pagination';
|
|
12
|
+
import { RequestOptions } from '../../../../internal/request-options';
|
|
13
|
+
import { path } from '../../../../internal/utils/path';
|
|
14
|
+
|
|
15
|
+
export class Connections extends APIResource {
|
|
16
|
+
cost: CostAPI.Cost = new CostAPI.Cost(this._client);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a Connect Connection
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const operation =
|
|
24
|
+
* await client.networking.connect.connections.create({
|
|
25
|
+
* bandwidth_mbps: 50,
|
|
26
|
+
* cidrs: ['10.0.0.0/16'],
|
|
27
|
+
* name: 'my-connect-connection',
|
|
28
|
+
* project_id: '123e4567-e89b-12d3-a456-426614174000',
|
|
29
|
+
* provider_cidrs: ['172.16.0.0/16'],
|
|
30
|
+
* region: 'us-sva-2',
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
create(body: ConnectionCreateParams, options?: RequestOptions): APIPromise<OperationsAPI.Operation> {
|
|
35
|
+
return this._client.post('/v1/networking/connect/connections', { body, ...options });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Get Connect Connection details
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const connectConnection =
|
|
44
|
+
* await client.networking.connect.connections.get(
|
|
45
|
+
* 'connection_id',
|
|
46
|
+
* );
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
get(connectionID: string, options?: RequestOptions): APIPromise<ConnectAPI.ConnectConnection> {
|
|
50
|
+
return this._client.get(path`/v1/networking/connect/connections/${connectionID}`, options);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Update Connect Connection details
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const operation =
|
|
59
|
+
* await client.networking.connect.connections.update(
|
|
60
|
+
* 'connection_id',
|
|
61
|
+
* );
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
update(
|
|
65
|
+
connectionID: string,
|
|
66
|
+
body: ConnectionUpdateParams,
|
|
67
|
+
options?: RequestOptions,
|
|
68
|
+
): APIPromise<OperationsAPI.Operation> {
|
|
69
|
+
return this._client.patch(path`/v1/networking/connect/connections/${connectionID}`, { body, ...options });
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Delete Connect Connection
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* const operation =
|
|
78
|
+
* await client.networking.connect.connections.delete(
|
|
79
|
+
* 'connection_id',
|
|
80
|
+
* );
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
delete(connectionID: string, options?: RequestOptions): APIPromise<OperationsAPI.Operation> {
|
|
84
|
+
return this._client.delete(path`/v1/networking/connect/connections/${connectionID}`, options);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* List all Connect Connections
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* // Automatically fetches more pages as needed.
|
|
93
|
+
* for await (const connectConnection of client.networking.connect.connections.list(
|
|
94
|
+
* { project_id: 'project_id' },
|
|
95
|
+
* )) {
|
|
96
|
+
* // ...
|
|
97
|
+
* }
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
list(
|
|
101
|
+
query: ConnectionListParams,
|
|
102
|
+
options?: RequestOptions,
|
|
103
|
+
): PagePromise<ConnectConnectionsCursor, ConnectAPI.ConnectConnection> {
|
|
104
|
+
return this._client.getAPIList(
|
|
105
|
+
'/v1/networking/connect/connections',
|
|
106
|
+
Cursor<ConnectAPI.ConnectConnection>,
|
|
107
|
+
{ query, ...options },
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface ConnectionCreateParams {
|
|
113
|
+
/**
|
|
114
|
+
* Connect Connection speed in Mbps
|
|
115
|
+
*/
|
|
116
|
+
bandwidth_mbps: ConnectAPI.ConnectBandwidthMbps;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* CIDRs for the Connect Connection. Must be in network-aligned/canonical form.
|
|
120
|
+
*/
|
|
121
|
+
cidrs: Array<string>;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Name of the Connect Connection
|
|
125
|
+
*/
|
|
126
|
+
name: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Project ID the Connect Connection belongs to
|
|
130
|
+
*/
|
|
131
|
+
project_id: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Provider CIDRs. Must be in network-aligned/canonical form.
|
|
135
|
+
*/
|
|
136
|
+
provider_cidrs: Array<string>;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Region the resource is in.
|
|
140
|
+
*/
|
|
141
|
+
region: Shared.RegionName;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* AWS provider configuration
|
|
145
|
+
*/
|
|
146
|
+
aws?: ConnectAPI.ConnectConnectionAWSConfigRequest;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Tags to attach to the Connect Connection
|
|
150
|
+
*/
|
|
151
|
+
tags?: Array<string>;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface ConnectionUpdateParams {
|
|
155
|
+
/**
|
|
156
|
+
* Name of the Connect Connection.
|
|
157
|
+
*/
|
|
158
|
+
name?: string;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Tags to attach to the Connect Connection
|
|
162
|
+
*/
|
|
163
|
+
tags?: Array<string>;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface ConnectionListParams extends CursorParams {
|
|
167
|
+
/**
|
|
168
|
+
* Project ID of resources to request
|
|
169
|
+
*/
|
|
170
|
+
project_id: string;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
Connections.Cost = Cost;
|
|
174
|
+
|
|
175
|
+
export declare namespace Connections {
|
|
176
|
+
export {
|
|
177
|
+
type ConnectionCreateParams as ConnectionCreateParams,
|
|
178
|
+
type ConnectionUpdateParams as ConnectionUpdateParams,
|
|
179
|
+
type ConnectionListParams as ConnectionListParams,
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
export {
|
|
183
|
+
Cost as Cost,
|
|
184
|
+
type CostCreateParams as CostCreateParams,
|
|
185
|
+
type CostUpdateParams as CostUpdateParams,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export { type ConnectConnectionsCursor };
|
|
@@ -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';
|