@vantage-sh/vantage-client 0.1.0 → 2.0.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/README.md +201 -80
- package/dist/index.d.mts +20895 -0
- package/dist/index.d.ts +20895 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +38 -43
- package/.swagger-codegen/VERSION +0 -1
- package/.swagger-codegen-ignore +0 -23
- package/.travis.yml +0 -4
- package/babel.config.json +0 -10
- package/docs/Cost.md +0 -11
- package/docs/Costs.md +0 -11
- package/docs/CostsApi.md +0 -168
- package/docs/PingApi.md +0 -51
- package/docs/Price.md +0 -14
- package/docs/Prices.md +0 -9
- package/docs/PricesApi.md +0 -328
- package/docs/Product.md +0 -13
- package/docs/Products.md +0 -9
- package/docs/Provider.md +0 -10
- package/docs/Providers.md +0 -9
- package/docs/Report.md +0 -13
- package/docs/Reports.md +0 -9
- package/docs/Service.md +0 -11
- package/docs/Services.md +0 -9
- package/lib/Vantage/ApiClient.js +0 -645
- package/lib/Vantage/Vantage/CostsApi.js +0 -183
- package/lib/Vantage/Vantage/PingApi.js +0 -71
- package/lib/Vantage/Vantage/PricesApi.js +0 -325
- package/lib/Vantage/index.js +0 -133
- package/lib/Vantage/model/Cost.js +0 -81
- package/lib/Vantage/model/Costs.js +0 -82
- package/lib/Vantage/model/Price.js +0 -102
- package/lib/Vantage/model/Prices.js +0 -68
- package/lib/Vantage/model/Product.js +0 -95
- package/lib/Vantage/model/Products.js +0 -68
- package/lib/Vantage/model/Provider.js +0 -73
- package/lib/Vantage/model/Providers.js +0 -68
- package/lib/Vantage/model/Report.js +0 -95
- package/lib/Vantage/model/Reports.js +0 -68
- package/lib/Vantage/model/Service.js +0 -80
- package/lib/Vantage/model/Services.js +0 -68
- package/mocha.opts +0 -1
- package/test/Vantage/Vantage/CostsApi.spec.js +0 -164
- package/test/Vantage/Vantage/PingApi.spec.js +0 -61
- package/test/Vantage/Vantage/PricesApi.spec.js +0 -280
- package/test/Vantage/model/Cost.spec.js +0 -71
- package/test/Vantage/model/Costs.spec.js +0 -71
- package/test/Vantage/model/Price.spec.js +0 -89
- package/test/Vantage/model/Prices.spec.js +0 -59
- package/test/Vantage/model/Product.spec.js +0 -83
- package/test/Vantage/model/Products.spec.js +0 -59
- package/test/Vantage/model/Provider.spec.js +0 -65
- package/test/Vantage/model/Providers.spec.js +0 -59
- package/test/Vantage/model/Report.spec.js +0 -83
- package/test/Vantage/model/Reports.spec.js +0 -59
- package/test/Vantage/model/Service.spec.js +0 -71
- package/test/Vantage/model/Services.spec.js +0 -59
- package/test/assert-equals.js +0 -81
- package/vantage-sh-vantage-client-0.1.0-beta7.tgz +0 -0
package/docs/CostsApi.md
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
# Vantage.CostsApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *https://api.vantage.sh*
|
|
4
|
-
|
|
5
|
-
Method | HTTP request | Description
|
|
6
|
-
------------- | ------------- | -------------
|
|
7
|
-
[**getCosts**](CostsApi.md#getCosts) | **GET** /v1/reports/{report_id}/costs |
|
|
8
|
-
[**getReport**](CostsApi.md#getReport) | **GET** /v1/reports/{report_id} |
|
|
9
|
-
[**getReports**](CostsApi.md#getReports) | **GET** /v1/reports |
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<a name="getCosts"></a>
|
|
13
|
-
# **getCosts**
|
|
14
|
-
> Costs getCosts(reportId, opts)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Return available Costs for the specified Cost Report and optional time period. If no time period is specified it will return all available costs for the report.
|
|
19
|
-
|
|
20
|
-
### Example
|
|
21
|
-
```javascript
|
|
22
|
-
import {Vantage} from 'vantage';
|
|
23
|
-
let defaultClient = Vantage.ApiClient.instance;
|
|
24
|
-
|
|
25
|
-
// Configure OAuth2 access token for authorization: oauth2
|
|
26
|
-
let oauth2 = defaultClient.authentications['oauth2'];
|
|
27
|
-
oauth2.accessToken = 'YOUR ACCESS TOKEN';
|
|
28
|
-
|
|
29
|
-
let apiInstance = new Vantage.CostsApi();
|
|
30
|
-
|
|
31
|
-
let reportId = "reportId_example"; // String |
|
|
32
|
-
|
|
33
|
-
let opts = {
|
|
34
|
-
'startDate': "startDate_example", // String | Query costs by the first date you would like to filter from. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00.
|
|
35
|
-
'endDate': "endDate_example", // String | Query costs by the last date you would like to filter to. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00.
|
|
36
|
-
'page': 2, // Number | The page of results to return.
|
|
37
|
-
'limit': 500 // Number | The amount of results to return. The maximum is 1000
|
|
38
|
-
};
|
|
39
|
-
apiInstance.getCosts(reportId, opts).then((data) => {
|
|
40
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
41
|
-
}, (error) => {
|
|
42
|
-
console.error(error);
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Parameters
|
|
48
|
-
|
|
49
|
-
Name | Type | Description | Notes
|
|
50
|
-
------------- | ------------- | ------------- | -------------
|
|
51
|
-
**reportId** | **String**| |
|
|
52
|
-
**startDate** | **String**| Query costs by the first date you would like to filter from. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00. | [optional]
|
|
53
|
-
**endDate** | **String**| Query costs by the last date you would like to filter to. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T19:20:48+00:00. | [optional]
|
|
54
|
-
**page** | **Number**| The page of results to return. | [optional]
|
|
55
|
-
**limit** | **Number**| The amount of results to return. The maximum is 1000 | [optional]
|
|
56
|
-
|
|
57
|
-
### Return type
|
|
58
|
-
|
|
59
|
-
[**Costs**](Costs.md)
|
|
60
|
-
|
|
61
|
-
### Authorization
|
|
62
|
-
|
|
63
|
-
[oauth2](../README.md#oauth2)
|
|
64
|
-
|
|
65
|
-
### HTTP request headers
|
|
66
|
-
|
|
67
|
-
- **Content-Type**: Not defined
|
|
68
|
-
- **Accept**: application/json
|
|
69
|
-
|
|
70
|
-
<a name="getReport"></a>
|
|
71
|
-
# **getReport**
|
|
72
|
-
> Report getReport(reportId)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
Return a Cost Report.
|
|
77
|
-
|
|
78
|
-
### Example
|
|
79
|
-
```javascript
|
|
80
|
-
import {Vantage} from 'vantage';
|
|
81
|
-
let defaultClient = Vantage.ApiClient.instance;
|
|
82
|
-
|
|
83
|
-
// Configure OAuth2 access token for authorization: oauth2
|
|
84
|
-
let oauth2 = defaultClient.authentications['oauth2'];
|
|
85
|
-
oauth2.accessToken = 'YOUR ACCESS TOKEN';
|
|
86
|
-
|
|
87
|
-
let apiInstance = new Vantage.CostsApi();
|
|
88
|
-
|
|
89
|
-
let reportId = "reportId_example"; // String |
|
|
90
|
-
|
|
91
|
-
apiInstance.getReport(reportId).then((data) => {
|
|
92
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
93
|
-
}, (error) => {
|
|
94
|
-
console.error(error);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### Parameters
|
|
100
|
-
|
|
101
|
-
Name | Type | Description | Notes
|
|
102
|
-
------------- | ------------- | ------------- | -------------
|
|
103
|
-
**reportId** | **String**| |
|
|
104
|
-
|
|
105
|
-
### Return type
|
|
106
|
-
|
|
107
|
-
[**Report**](Report.md)
|
|
108
|
-
|
|
109
|
-
### Authorization
|
|
110
|
-
|
|
111
|
-
[oauth2](../README.md#oauth2)
|
|
112
|
-
|
|
113
|
-
### HTTP request headers
|
|
114
|
-
|
|
115
|
-
- **Content-Type**: Not defined
|
|
116
|
-
- **Accept**: application/json
|
|
117
|
-
|
|
118
|
-
<a name="getReports"></a>
|
|
119
|
-
# **getReports**
|
|
120
|
-
> Reports getReports(opts)
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
Return all Cost Reports.
|
|
125
|
-
|
|
126
|
-
### Example
|
|
127
|
-
```javascript
|
|
128
|
-
import {Vantage} from 'vantage';
|
|
129
|
-
let defaultClient = Vantage.ApiClient.instance;
|
|
130
|
-
|
|
131
|
-
// Configure OAuth2 access token for authorization: oauth2
|
|
132
|
-
let oauth2 = defaultClient.authentications['oauth2'];
|
|
133
|
-
oauth2.accessToken = 'YOUR ACCESS TOKEN';
|
|
134
|
-
|
|
135
|
-
let apiInstance = new Vantage.CostsApi();
|
|
136
|
-
|
|
137
|
-
let opts = {
|
|
138
|
-
'page': 56, // Number | The page of results to return.
|
|
139
|
-
'limit': 56 // Number | The amount of results to return. The maximum is 1000
|
|
140
|
-
};
|
|
141
|
-
apiInstance.getReports(opts).then((data) => {
|
|
142
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
143
|
-
}, (error) => {
|
|
144
|
-
console.error(error);
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Parameters
|
|
150
|
-
|
|
151
|
-
Name | Type | Description | Notes
|
|
152
|
-
------------- | ------------- | ------------- | -------------
|
|
153
|
-
**page** | **Number**| The page of results to return. | [optional]
|
|
154
|
-
**limit** | **Number**| The amount of results to return. The maximum is 1000 | [optional]
|
|
155
|
-
|
|
156
|
-
### Return type
|
|
157
|
-
|
|
158
|
-
[**Reports**](Reports.md)
|
|
159
|
-
|
|
160
|
-
### Authorization
|
|
161
|
-
|
|
162
|
-
[oauth2](../README.md#oauth2)
|
|
163
|
-
|
|
164
|
-
### HTTP request headers
|
|
165
|
-
|
|
166
|
-
- **Content-Type**: Not defined
|
|
167
|
-
- **Accept**: application/json
|
|
168
|
-
|
package/docs/PingApi.md
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Vantage.PingApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *https://api.vantage.sh*
|
|
4
|
-
|
|
5
|
-
Method | HTTP request | Description
|
|
6
|
-
------------- | ------------- | -------------
|
|
7
|
-
[**ping**](PingApi.md#ping) | **GET** /v1/ping |
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<a name="ping"></a>
|
|
11
|
-
# **ping**
|
|
12
|
-
> Object ping()
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
This is a health check endpoint that can be used to determine Vantage API healthiness. It will return 200 if everything is running smoothly.
|
|
17
|
-
|
|
18
|
-
### Example
|
|
19
|
-
```javascript
|
|
20
|
-
import {Vantage} from 'vantage';
|
|
21
|
-
let defaultClient = Vantage.ApiClient.instance;
|
|
22
|
-
|
|
23
|
-
// Configure OAuth2 access token for authorization: oauth2
|
|
24
|
-
let oauth2 = defaultClient.authentications['oauth2'];
|
|
25
|
-
oauth2.accessToken = 'YOUR ACCESS TOKEN';
|
|
26
|
-
|
|
27
|
-
let apiInstance = new Vantage.PingApi();
|
|
28
|
-
apiInstance.ping().then((data) => {
|
|
29
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
30
|
-
}, (error) => {
|
|
31
|
-
console.error(error);
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Parameters
|
|
37
|
-
This endpoint does not need any parameter.
|
|
38
|
-
|
|
39
|
-
### Return type
|
|
40
|
-
|
|
41
|
-
**Object**
|
|
42
|
-
|
|
43
|
-
### Authorization
|
|
44
|
-
|
|
45
|
-
[oauth2](../README.md#oauth2)
|
|
46
|
-
|
|
47
|
-
### HTTP request headers
|
|
48
|
-
|
|
49
|
-
- **Content-Type**: Not defined
|
|
50
|
-
- **Accept**: application/json
|
|
51
|
-
|
package/docs/Price.md
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Vantage.Price
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
Name | Type | Description | Notes
|
|
5
|
-
------------ | ------------- | ------------- | -------------
|
|
6
|
-
**id** | **String** | | [optional]
|
|
7
|
-
**unit** | **String** | The unit in which the amount is billed. | [optional]
|
|
8
|
-
**region** | **String** | The region the price is specific to. | [optional]
|
|
9
|
-
**rateType** | **String** | The part of the product the price applies to. (compute, transfer, etc..) | [optional]
|
|
10
|
-
**currency** | **String** | The currency of the amount. | [optional]
|
|
11
|
-
**amount** | **Number** | The amount of money this specific product price costs. | [optional]
|
|
12
|
-
**details** | **Object** | Service specific metadata. | [optional]
|
|
13
|
-
|
|
14
|
-
|
package/docs/Prices.md
DELETED
package/docs/PricesApi.md
DELETED
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
# Vantage.PricesApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *https://api.vantage.sh*
|
|
4
|
-
|
|
5
|
-
Method | HTTP request | Description
|
|
6
|
-
------------- | ------------- | -------------
|
|
7
|
-
[**getPrice**](PricesApi.md#getPrice) | **GET** /v1/products/{product_id}/prices/{id} |
|
|
8
|
-
[**getPrices**](PricesApi.md#getPrices) | **GET** /v1/products/{product_id}/prices |
|
|
9
|
-
[**getProduct**](PricesApi.md#getProduct) | **GET** /v1/products/{id} |
|
|
10
|
-
[**getProducts**](PricesApi.md#getProducts) | **GET** /v1/products |
|
|
11
|
-
[**getProviders**](PricesApi.md#getProviders) | **GET** /v1/providers |
|
|
12
|
-
[**getServices**](PricesApi.md#getServices) | **GET** /v1/services |
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<a name="getPrice"></a>
|
|
16
|
-
# **getPrice**
|
|
17
|
-
> Price getPrice(productId, id)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Returns a price
|
|
22
|
-
|
|
23
|
-
### Example
|
|
24
|
-
```javascript
|
|
25
|
-
import {Vantage} from 'vantage';
|
|
26
|
-
let defaultClient = Vantage.ApiClient.instance;
|
|
27
|
-
|
|
28
|
-
// Configure OAuth2 access token for authorization: oauth2
|
|
29
|
-
let oauth2 = defaultClient.authentications['oauth2'];
|
|
30
|
-
oauth2.accessToken = 'YOUR ACCESS TOKEN';
|
|
31
|
-
|
|
32
|
-
let apiInstance = new Vantage.PricesApi();
|
|
33
|
-
|
|
34
|
-
let productId = "productId_example"; // String |
|
|
35
|
-
|
|
36
|
-
let id = "id_example"; // String |
|
|
37
|
-
|
|
38
|
-
apiInstance.getPrice(productId, id).then((data) => {
|
|
39
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
40
|
-
}, (error) => {
|
|
41
|
-
console.error(error);
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Parameters
|
|
47
|
-
|
|
48
|
-
Name | Type | Description | Notes
|
|
49
|
-
------------- | ------------- | ------------- | -------------
|
|
50
|
-
**productId** | **String**| |
|
|
51
|
-
**id** | **String**| |
|
|
52
|
-
|
|
53
|
-
### Return type
|
|
54
|
-
|
|
55
|
-
[**Price**](Price.md)
|
|
56
|
-
|
|
57
|
-
### Authorization
|
|
58
|
-
|
|
59
|
-
[oauth2](../README.md#oauth2)
|
|
60
|
-
|
|
61
|
-
### HTTP request headers
|
|
62
|
-
|
|
63
|
-
- **Content-Type**: Not defined
|
|
64
|
-
- **Accept**: application/json
|
|
65
|
-
|
|
66
|
-
<a name="getPrices"></a>
|
|
67
|
-
# **getPrices**
|
|
68
|
-
> Prices getPrices(productId, opts)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
Return available Prices across all Regions for a Product.
|
|
73
|
-
|
|
74
|
-
### Example
|
|
75
|
-
```javascript
|
|
76
|
-
import {Vantage} from 'vantage';
|
|
77
|
-
let defaultClient = Vantage.ApiClient.instance;
|
|
78
|
-
|
|
79
|
-
// Configure OAuth2 access token for authorization: oauth2
|
|
80
|
-
let oauth2 = defaultClient.authentications['oauth2'];
|
|
81
|
-
oauth2.accessToken = 'YOUR ACCESS TOKEN';
|
|
82
|
-
|
|
83
|
-
let apiInstance = new Vantage.PricesApi();
|
|
84
|
-
|
|
85
|
-
let productId = "productId_example"; // String |
|
|
86
|
-
|
|
87
|
-
let opts = {
|
|
88
|
-
'page': 2, // Number | The page of results to return.
|
|
89
|
-
'limit': 500 // Number | The amount of results to return. The maximum is 1000
|
|
90
|
-
};
|
|
91
|
-
apiInstance.getPrices(productId, opts).then((data) => {
|
|
92
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
93
|
-
}, (error) => {
|
|
94
|
-
console.error(error);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### Parameters
|
|
100
|
-
|
|
101
|
-
Name | Type | Description | Notes
|
|
102
|
-
------------- | ------------- | ------------- | -------------
|
|
103
|
-
**productId** | **String**| |
|
|
104
|
-
**page** | **Number**| The page of results to return. | [optional]
|
|
105
|
-
**limit** | **Number**| The amount of results to return. The maximum is 1000 | [optional]
|
|
106
|
-
|
|
107
|
-
### Return type
|
|
108
|
-
|
|
109
|
-
[**Prices**](Prices.md)
|
|
110
|
-
|
|
111
|
-
### Authorization
|
|
112
|
-
|
|
113
|
-
[oauth2](../README.md#oauth2)
|
|
114
|
-
|
|
115
|
-
### HTTP request headers
|
|
116
|
-
|
|
117
|
-
- **Content-Type**: Not defined
|
|
118
|
-
- **Accept**: application/json
|
|
119
|
-
|
|
120
|
-
<a name="getProduct"></a>
|
|
121
|
-
# **getProduct**
|
|
122
|
-
> Product getProduct(id)
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
Return a product
|
|
127
|
-
|
|
128
|
-
### Example
|
|
129
|
-
```javascript
|
|
130
|
-
import {Vantage} from 'vantage';
|
|
131
|
-
let defaultClient = Vantage.ApiClient.instance;
|
|
132
|
-
|
|
133
|
-
// Configure OAuth2 access token for authorization: oauth2
|
|
134
|
-
let oauth2 = defaultClient.authentications['oauth2'];
|
|
135
|
-
oauth2.accessToken = 'YOUR ACCESS TOKEN';
|
|
136
|
-
|
|
137
|
-
let apiInstance = new Vantage.PricesApi();
|
|
138
|
-
|
|
139
|
-
let id = "id_example"; // String |
|
|
140
|
-
|
|
141
|
-
apiInstance.getProduct(id).then((data) => {
|
|
142
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
143
|
-
}, (error) => {
|
|
144
|
-
console.error(error);
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Parameters
|
|
150
|
-
|
|
151
|
-
Name | Type | Description | Notes
|
|
152
|
-
------------- | ------------- | ------------- | -------------
|
|
153
|
-
**id** | **String**| |
|
|
154
|
-
|
|
155
|
-
### Return type
|
|
156
|
-
|
|
157
|
-
[**Product**](Product.md)
|
|
158
|
-
|
|
159
|
-
### Authorization
|
|
160
|
-
|
|
161
|
-
[oauth2](../README.md#oauth2)
|
|
162
|
-
|
|
163
|
-
### HTTP request headers
|
|
164
|
-
|
|
165
|
-
- **Content-Type**: Not defined
|
|
166
|
-
- **Accept**: application/json
|
|
167
|
-
|
|
168
|
-
<a name="getProducts"></a>
|
|
169
|
-
# **getProducts**
|
|
170
|
-
> Products getProducts(opts)
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
Return available Products for a Service. For example, with a Provider of AWS and a Service of EC2, Products will be a list of all EC2 Instances. By default, this endpoint returns all Products across all Services and Providers but has optional query parameters for filtering listed below.
|
|
175
|
-
|
|
176
|
-
### Example
|
|
177
|
-
```javascript
|
|
178
|
-
import {Vantage} from 'vantage';
|
|
179
|
-
let defaultClient = Vantage.ApiClient.instance;
|
|
180
|
-
|
|
181
|
-
// Configure OAuth2 access token for authorization: oauth2
|
|
182
|
-
let oauth2 = defaultClient.authentications['oauth2'];
|
|
183
|
-
oauth2.accessToken = 'YOUR ACCESS TOKEN';
|
|
184
|
-
|
|
185
|
-
let apiInstance = new Vantage.PricesApi();
|
|
186
|
-
|
|
187
|
-
let opts = {
|
|
188
|
-
'providerId': "providerId_example", // String | Query by Provider to list all Products across all Services for a Provider. e.g. aws
|
|
189
|
-
'serviceId': "serviceId_example", // String | Query by Service to list all Products for a specific provider service. e.g. aws-ec2
|
|
190
|
-
'name': "name_example", // String | Query by name of the Product to see a list of products which match that name. e.g. m5a.16xlarge
|
|
191
|
-
'page': 2, // Number | The page of results to return.
|
|
192
|
-
'limit': 500 // Number | The amount of results to return. The maximum is 1000
|
|
193
|
-
};
|
|
194
|
-
apiInstance.getProducts(opts).then((data) => {
|
|
195
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
196
|
-
}, (error) => {
|
|
197
|
-
console.error(error);
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
### Parameters
|
|
203
|
-
|
|
204
|
-
Name | Type | Description | Notes
|
|
205
|
-
------------- | ------------- | ------------- | -------------
|
|
206
|
-
**providerId** | **String**| Query by Provider to list all Products across all Services for a Provider. e.g. aws | [optional]
|
|
207
|
-
**serviceId** | **String**| Query by Service to list all Products for a specific provider service. e.g. aws-ec2 | [optional]
|
|
208
|
-
**name** | **String**| Query by name of the Product to see a list of products which match that name. e.g. m5a.16xlarge | [optional]
|
|
209
|
-
**page** | **Number**| The page of results to return. | [optional]
|
|
210
|
-
**limit** | **Number**| The amount of results to return. The maximum is 1000 | [optional]
|
|
211
|
-
|
|
212
|
-
### Return type
|
|
213
|
-
|
|
214
|
-
[**Products**](Products.md)
|
|
215
|
-
|
|
216
|
-
### Authorization
|
|
217
|
-
|
|
218
|
-
[oauth2](../README.md#oauth2)
|
|
219
|
-
|
|
220
|
-
### HTTP request headers
|
|
221
|
-
|
|
222
|
-
- **Content-Type**: Not defined
|
|
223
|
-
- **Accept**: application/json
|
|
224
|
-
|
|
225
|
-
<a name="getProviders"></a>
|
|
226
|
-
# **getProviders**
|
|
227
|
-
> Providers getProviders(opts)
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
Providers are cloud infrastructure and service providers from which all cloud prices are derived. You can think of example Providers as being AWS, GCP, Cloudflare or Datadog. Currently, Vantage only supports a single provider of AWS but over time more will be added. Use this endpoint to retrieve a provider id for other API calls.
|
|
232
|
-
|
|
233
|
-
### Example
|
|
234
|
-
```javascript
|
|
235
|
-
import {Vantage} from 'vantage';
|
|
236
|
-
let defaultClient = Vantage.ApiClient.instance;
|
|
237
|
-
|
|
238
|
-
// Configure OAuth2 access token for authorization: oauth2
|
|
239
|
-
let oauth2 = defaultClient.authentications['oauth2'];
|
|
240
|
-
oauth2.accessToken = 'YOUR ACCESS TOKEN';
|
|
241
|
-
|
|
242
|
-
let apiInstance = new Vantage.PricesApi();
|
|
243
|
-
|
|
244
|
-
let opts = {
|
|
245
|
-
'page': 2, // Number | The page of results to return.
|
|
246
|
-
'limit': 500 // Number | The amount of results to return. The maximum is 1000
|
|
247
|
-
};
|
|
248
|
-
apiInstance.getProviders(opts).then((data) => {
|
|
249
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
250
|
-
}, (error) => {
|
|
251
|
-
console.error(error);
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
### Parameters
|
|
257
|
-
|
|
258
|
-
Name | Type | Description | Notes
|
|
259
|
-
------------- | ------------- | ------------- | -------------
|
|
260
|
-
**page** | **Number**| The page of results to return. | [optional]
|
|
261
|
-
**limit** | **Number**| The amount of results to return. The maximum is 1000 | [optional]
|
|
262
|
-
|
|
263
|
-
### Return type
|
|
264
|
-
|
|
265
|
-
[**Providers**](Providers.md)
|
|
266
|
-
|
|
267
|
-
### Authorization
|
|
268
|
-
|
|
269
|
-
[oauth2](../README.md#oauth2)
|
|
270
|
-
|
|
271
|
-
### HTTP request headers
|
|
272
|
-
|
|
273
|
-
- **Content-Type**: Not defined
|
|
274
|
-
- **Accept**: application/json
|
|
275
|
-
|
|
276
|
-
<a name="getServices"></a>
|
|
277
|
-
# **getServices**
|
|
278
|
-
> Services getServices(opts)
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
Return all Services. Examples of Services are EC2 for AWS. This endpoint will return all Services by default but you have the ability to filter Services by Provider using the optional query parameter documented below.
|
|
283
|
-
|
|
284
|
-
### Example
|
|
285
|
-
```javascript
|
|
286
|
-
import {Vantage} from 'vantage';
|
|
287
|
-
let defaultClient = Vantage.ApiClient.instance;
|
|
288
|
-
|
|
289
|
-
// Configure OAuth2 access token for authorization: oauth2
|
|
290
|
-
let oauth2 = defaultClient.authentications['oauth2'];
|
|
291
|
-
oauth2.accessToken = 'YOUR ACCESS TOKEN';
|
|
292
|
-
|
|
293
|
-
let apiInstance = new Vantage.PricesApi();
|
|
294
|
-
|
|
295
|
-
let opts = {
|
|
296
|
-
'providerId': "providerId_example", // String | Query services for a specific provider. e.g. aws
|
|
297
|
-
'page': 2, // Number | The page of results to return.
|
|
298
|
-
'limit': 500 // Number | The amount of results to return. The maximum is 1000
|
|
299
|
-
};
|
|
300
|
-
apiInstance.getServices(opts).then((data) => {
|
|
301
|
-
console.log('API called successfully. Returned data: ' + data);
|
|
302
|
-
}, (error) => {
|
|
303
|
-
console.error(error);
|
|
304
|
-
});
|
|
305
|
-
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
### Parameters
|
|
309
|
-
|
|
310
|
-
Name | Type | Description | Notes
|
|
311
|
-
------------- | ------------- | ------------- | -------------
|
|
312
|
-
**providerId** | **String**| Query services for a specific provider. e.g. aws | [optional]
|
|
313
|
-
**page** | **Number**| The page of results to return. | [optional]
|
|
314
|
-
**limit** | **Number**| The amount of results to return. The maximum is 1000 | [optional]
|
|
315
|
-
|
|
316
|
-
### Return type
|
|
317
|
-
|
|
318
|
-
[**Services**](Services.md)
|
|
319
|
-
|
|
320
|
-
### Authorization
|
|
321
|
-
|
|
322
|
-
[oauth2](../README.md#oauth2)
|
|
323
|
-
|
|
324
|
-
### HTTP request headers
|
|
325
|
-
|
|
326
|
-
- **Content-Type**: Not defined
|
|
327
|
-
- **Accept**: application/json
|
|
328
|
-
|
package/docs/Product.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Vantage.Product
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
Name | Type | Description | Notes
|
|
5
|
-
------------ | ------------- | ------------- | -------------
|
|
6
|
-
**id** | **String** | | [optional]
|
|
7
|
-
**category** | **String** | The category of the cloud product | [optional]
|
|
8
|
-
**name** | **String** | The common name of the product. | [optional]
|
|
9
|
-
**serviceId** | **String** | A unique slug for the service the product belongs to. | [optional]
|
|
10
|
-
**providerId** | **String** | A unique slug for the provider the product belongs to. | [optional]
|
|
11
|
-
**details** | **Object** | An object of metadata about the product. | [optional]
|
|
12
|
-
|
|
13
|
-
|
package/docs/Products.md
DELETED
package/docs/Provider.md
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Vantage.Provider
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
Name | Type | Description | Notes
|
|
5
|
-
------------ | ------------- | ------------- | -------------
|
|
6
|
-
**id** | **String** | | [optional]
|
|
7
|
-
**name** | **String** | The common name of the provider. | [optional]
|
|
8
|
-
**description** | **String** | The full descriptive name of the provider. | [optional]
|
|
9
|
-
|
|
10
|
-
|
package/docs/Providers.md
DELETED
package/docs/Report.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Vantage.Report
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
Name | Type | Description | Notes
|
|
5
|
-
------------ | ------------- | ------------- | -------------
|
|
6
|
-
**id** | **String** | | [optional]
|
|
7
|
-
**title** | **String** | The title of the cost report. | [optional]
|
|
8
|
-
**earliestCostDate** | **String** | The date and time, in UTC, the report was created. ISO 8601 Formatted - 2021-01-01 or 2021-01-01T00:00:00Z. | [optional]
|
|
9
|
-
**latestCostDate** | **String** | The date and time, in UTC, the report was created. ISO 8601 Formatted - 2021-07-31 or 2021-07-31T00:00:00Z. | [optional]
|
|
10
|
-
**createdAt** | **String** | The date and time, in UTC, the report was created. ISO 8601 Formatted - 2021-07-15 or 2021-07-15T00:00:00Z. | [optional]
|
|
11
|
-
**workspace** | **String** | The name of the workspace the report is a part of. | [optional]
|
|
12
|
-
|
|
13
|
-
|
package/docs/Reports.md
DELETED
package/docs/Service.md
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Vantage.Service
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
Name | Type | Description | Notes
|
|
5
|
-
------------ | ------------- | ------------- | -------------
|
|
6
|
-
**id** | **String** | | [optional]
|
|
7
|
-
**category** | **String** | The type of cloud service. | [optional]
|
|
8
|
-
**name** | **String** | The common name of the service. Usually an abbreviation. | [optional]
|
|
9
|
-
**description** | **String** | The full name of the service. | [optional]
|
|
10
|
-
|
|
11
|
-
|
package/docs/Services.md
DELETED