@scaleway/sdk 3.0.0-alpha.0 → 3.1.1
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/dist/index.gen.d.ts +362 -0
- package/dist/index.gen.js +323 -0
- package/package.json +71 -25
- package/README.md +0 -46
- package/dist/api/account/index.js +0 -4
- package/dist/api/account/v2/api.gen.js +0 -147
- package/dist/api/account/v2/index.gen.js +0 -4
- package/dist/api/account/v2/marshalling.gen.js +0 -39
- package/dist/api/account/v3/api.gen.js +0 -129
- package/dist/api/account/v3/index.gen.js +0 -6
- package/dist/api/account/v3/marshalling.gen.js +0 -39
- package/dist/api/account/v3/validation-rules.gen.js +0 -39
- package/dist/api/applesilicon/index.js +0 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.js +0 -220
- package/dist/api/applesilicon/v1alpha1/content.gen.js +0 -7
- package/dist/api/applesilicon/v1alpha1/index.gen.js +0 -5
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +0 -113
- package/dist/api/baremetal/index.js +0 -2
- package/dist/api/baremetal/v1/api.gen.js +0 -523
- package/dist/api/baremetal/v1/api.utils.js +0 -27
- package/dist/api/baremetal/v1/content.gen.js +0 -13
- package/dist/api/baremetal/v1/index.js +0 -5
- package/dist/api/baremetal/v1/marshalling.gen.js +0 -395
- package/dist/api/baremetal/v1/validation-rules.gen.js +0 -109
- package/dist/api/billing/index.js +0 -2
- package/dist/api/billing/v2alpha1/api.gen.js +0 -80
- package/dist/api/billing/v2alpha1/index.gen.js +0 -4
- package/dist/api/billing/v2alpha1/marshalling.gen.js +0 -53
- package/dist/api/block/index.js +0 -2
- package/dist/api/block/v1alpha1/api.gen.js +0 -245
- package/dist/api/block/v1alpha1/content.gen.js +0 -13
- package/dist/api/block/v1alpha1/index.gen.js +0 -7
- package/dist/api/block/v1alpha1/marshalling.gen.js +0 -175
- package/dist/api/block/v1alpha1/validation-rules.gen.js +0 -42
- package/dist/api/cockpit/index.js +0 -2
- package/dist/api/cockpit/v1beta1/api.gen.js +0 -448
- package/dist/api/cockpit/v1beta1/content.gen.js +0 -7
- package/dist/api/cockpit/v1beta1/index.gen.js +0 -5
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +0 -220
- package/dist/api/container/index.js +0 -2
- package/dist/api/container/v1beta1/api.gen.js +0 -549
- package/dist/api/container/v1beta1/content.gen.js +0 -22
- package/dist/api/container/v1beta1/index.gen.js +0 -5
- package/dist/api/container/v1beta1/marshalling.gen.js +0 -330
- package/dist/api/document_db/index.js +0 -2
- package/dist/api/document_db/v1beta1/api.gen.js +0 -830
- package/dist/api/document_db/v1beta1/content.gen.js +0 -19
- package/dist/api/document_db/v1beta1/index.gen.js +0 -7
- package/dist/api/document_db/v1beta1/marshalling.gen.js +0 -580
- package/dist/api/document_db/v1beta1/validation-rules.gen.js +0 -10
- package/dist/api/domain/index.js +0 -2
- package/dist/api/domain/v2beta1/api.gen.js +0 -875
- package/dist/api/domain/v2beta1/content.gen.js +0 -28
- package/dist/api/domain/v2beta1/index.gen.js +0 -7
- package/dist/api/domain/v2beta1/marshalling.gen.js +0 -958
- package/dist/api/flexibleip/index.js +0 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +0 -203
- package/dist/api/flexibleip/v1alpha1/content.gen.js +0 -10
- package/dist/api/flexibleip/v1alpha1/index.gen.js +0 -7
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -97
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +0 -14
- package/dist/api/function/index.js +0 -2
- package/dist/api/function/v1beta1/api.gen.js +0 -560
- package/dist/api/function/v1beta1/content.gen.js +0 -22
- package/dist/api/function/v1beta1/index.gen.js +0 -5
- package/dist/api/function/v1beta1/marshalling.gen.js +0 -368
- package/dist/api/iam/index.js +0 -2
- package/dist/api/iam/v1alpha1/api.gen.js +0 -799
- package/dist/api/iam/v1alpha1/index.gen.js +0 -6
- package/dist/api/iam/v1alpha1/marshalling.gen.js +0 -373
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +0 -207
- package/dist/api/instance/index.js +0 -2
- package/dist/api/instance/v1/api.gen.js +0 -1003
- package/dist/api/instance/v1/api.utils.js +0 -369
- package/dist/api/instance/v1/content.gen.js +0 -31
- package/dist/api/instance/v1/index.js +0 -2
- package/dist/api/instance/v1/marshalling.gen.js +0 -1206
- package/dist/api/instance/v1/marshalling.utils.js +0 -63
- package/dist/api/iot/index.js +0 -2
- package/dist/api/iot/v1/api.gen.js +0 -581
- package/dist/api/iot/v1/content.gen.js +0 -7
- package/dist/api/iot/v1/index.gen.js +0 -5
- package/dist/api/iot/v1/marshalling.gen.js +0 -388
- package/dist/api/ipfs/index.js +0 -2
- package/dist/api/ipfs/v1alpha1/api.gen.js +0 -197
- package/dist/api/ipfs/v1alpha1/content.gen.js +0 -7
- package/dist/api/ipfs/v1alpha1/index.gen.js +0 -5
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -121
- package/dist/api/k8s/index.js +0 -2
- package/dist/api/k8s/v1/api.gen.js +0 -454
- package/dist/api/k8s/v1/api.utils.js +0 -13
- package/dist/api/k8s/v1/content.gen.js +0 -13
- package/dist/api/k8s/v1/index.js +0 -4
- package/dist/api/k8s/v1/marshalling.gen.js +0 -333
- package/dist/api/k8s/v1/validation-rules.gen.js +0 -101
- package/dist/api/lb/index.js +0 -2
- package/dist/api/lb/v1/api.gen.js +0 -1669
- package/dist/api/lb/v1/api.utils.js +0 -81
- package/dist/api/lb/v1/content.gen.js +0 -16
- package/dist/api/lb/v1/index.js +0 -2
- package/dist/api/lb/v1/marshalling.gen.js +0 -923
- package/dist/api/marketplace/index.js +0 -4
- package/dist/api/marketplace/v1/api.gen.js +0 -60
- package/dist/api/marketplace/v1/index.gen.js +0 -4
- package/dist/api/marketplace/v1/marshalling.gen.js +0 -92
- package/dist/api/marketplace/v2/api.gen.js +0 -162
- package/dist/api/marketplace/v2/index.gen.js +0 -4
- package/dist/api/marketplace/v2/marshalling.gen.js +0 -94
- package/dist/api/mnq/index.js +0 -2
- package/dist/api/mnq/v1alpha1/api.gen.js +0 -205
- package/dist/api/mnq/v1alpha1/index.gen.js +0 -4
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +0 -121
- package/dist/api/rdb/index.js +0 -2
- package/dist/api/rdb/v1/api.gen.js +0 -972
- package/dist/api/rdb/v1/content.gen.js +0 -22
- package/dist/api/rdb/v1/index.gen.js +0 -7
- package/dist/api/rdb/v1/marshalling.gen.js +0 -636
- package/dist/api/rdb/v1/validation-rules.gen.js +0 -10
- package/dist/api/redis/index.js +0 -2
- package/dist/api/redis/v1/api.gen.js +0 -389
- package/dist/api/redis/v1/content.gen.js +0 -7
- package/dist/api/redis/v1/index.gen.js +0 -5
- package/dist/api/redis/v1/marshalling.gen.js +0 -259
- package/dist/api/registry/index.js +0 -2
- package/dist/api/registry/v1/api.gen.js +0 -252
- package/dist/api/registry/v1/content.gen.js +0 -13
- package/dist/api/registry/v1/index.gen.js +0 -5
- package/dist/api/registry/v1/marshalling.gen.js +0 -106
- package/dist/api/secret/index.js +0 -2
- package/dist/api/secret/v1alpha1/api.gen.js +0 -415
- package/dist/api/secret/v1alpha1/index.gen.js +0 -4
- package/dist/api/secret/v1alpha1/marshalling.gen.js +0 -143
- package/dist/api/tem/index.js +0 -2
- package/dist/api/tem/v1alpha1/api.gen.js +0 -229
- package/dist/api/tem/v1alpha1/content.gen.js +0 -10
- package/dist/api/tem/v1alpha1/index.gen.js +0 -5
- package/dist/api/tem/v1alpha1/marshalling.gen.js +0 -159
- package/dist/api/test/index.js +0 -2
- package/dist/api/test/v1/api.gen.js +0 -152
- package/dist/api/test/v1/content.gen.js +0 -7
- package/dist/api/test/v1/index.gen.js +0 -5
- package/dist/api/test/v1/marshalling.gen.js +0 -79
- package/dist/api/vpc/index.js +0 -4
- package/dist/api/vpc/v1/api.gen.js +0 -110
- package/dist/api/vpc/v1/index.gen.js +0 -4
- package/dist/api/vpc/v1/marshalling.gen.js +0 -44
- package/dist/api/vpc/v2/api.gen.js +0 -276
- package/dist/api/vpc/v2/index.gen.js +0 -4
- package/dist/api/vpc/v2/marshalling.gen.js +0 -135
- package/dist/api/vpcgw/index.js +0 -2
- package/dist/api/vpcgw/v1/api.gen.js +0 -669
- package/dist/api/vpcgw/v1/content.gen.js +0 -10
- package/dist/api/vpcgw/v1/index.gen.js +0 -5
- package/dist/api/vpcgw/v1/marshalling.gen.js +0 -336
- package/dist/api/webhosting/index.js +0 -2
- package/dist/api/webhosting/v1alpha1/api.gen.js +0 -210
- package/dist/api/webhosting/v1alpha1/content.gen.js +0 -7
- package/dist/api/webhosting/v1alpha1/index.gen.js +0 -7
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +0 -173
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +0 -23
- package/dist/helpers/is-browser.js +0 -5
- package/dist/helpers/is-response.js +0 -10
- package/dist/helpers/json.js +0 -11
- package/dist/helpers/marshalling.js +0 -130
- package/dist/index.cjs +0 -24364
- package/dist/index.d.ts +0 -27584
- package/dist/index.js +0 -69
- package/dist/internal/async/interval-retrier.js +0 -105
- package/dist/internal/async/sleep.js +0 -13
- package/dist/internal/interceptors/composer.js +0 -46
- package/dist/internal/interceptors/helpers.js +0 -32
- package/dist/internal/logger/console-logger.js +0 -38
- package/dist/internal/logger/index.js +0 -41
- package/dist/internal/logger/level-resolver.js +0 -13
- package/dist/internal/validations/string-validation.js +0 -38
- package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -13
- package/dist/scw/api.js +0 -12
- package/dist/scw/auth.js +0 -68
- package/dist/scw/client-ini-factory.js +0 -174
- package/dist/scw/client-ini-profile.js +0 -54
- package/dist/scw/client-settings.js +0 -78
- package/dist/scw/client.js +0 -98
- package/dist/scw/constants.js +0 -4
- package/dist/scw/custom-marshalling.js +0 -131
- package/dist/scw/errors/error-parser.js +0 -107
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +0 -36
- package/dist/scw/errors/non-standard/unknown-resource-mapper.js +0 -27
- package/dist/scw/errors/scw-error.js +0 -66
- package/dist/scw/errors/standard/already-exists-error.js +0 -26
- package/dist/scw/errors/standard/denied-authentication-error.js +0 -52
- package/dist/scw/errors/standard/index.js +0 -13
- package/dist/scw/errors/standard/invalid-arguments-error.js +0 -67
- package/dist/scw/errors/standard/out-of-stock-error.js +0 -22
- package/dist/scw/errors/standard/permissions-denied-error.js +0 -48
- package/dist/scw/errors/standard/precondition-failed-error.js +0 -42
- package/dist/scw/errors/standard/quotas-exceeded-error.js +0 -68
- package/dist/scw/errors/standard/resource-expired-error.js +0 -26
- package/dist/scw/errors/standard/resource-locked-error.js +0 -25
- package/dist/scw/errors/standard/resource-not-found-error.js +0 -25
- package/dist/scw/errors/standard/too-many-requests-error.js +0 -70
- package/dist/scw/errors/standard/transient-state-error.js +0 -26
- package/dist/scw/errors/types.js +0 -23
- package/dist/scw/fetch/build-fetcher.js +0 -72
- package/dist/scw/fetch/http-dumper.js +0 -54
- package/dist/scw/fetch/http-interceptors.js +0 -99
- package/dist/scw/fetch/resource-paginator.js +0 -84
- package/dist/scw/fetch/response-parser.js +0 -72
- package/node_modules/@scaleway/random-name/.npmignore +0 -4
- package/node_modules/@scaleway/random-name/CHANGELOG.md +0 -129
- package/node_modules/@scaleway/random-name/LICENSE.md +0 -21
- package/node_modules/@scaleway/random-name/README.md +0 -26
- package/node_modules/@scaleway/random-name/dist/index.d.ts +0 -3
- package/node_modules/@scaleway/random-name/dist/index.js +0 -13
- package/node_modules/@scaleway/random-name/package.json +0 -23
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
const marshalVolumeSummary = (request, defaults) => ({
|
|
2
|
-
id: request.id,
|
|
3
|
-
name: request.name,
|
|
4
|
-
size: request.size,
|
|
5
|
-
volume_type: request.volumeType
|
|
6
|
-
});
|
|
7
|
-
const marshalServerSummary = (request, defaults) => ({
|
|
8
|
-
id: request.id,
|
|
9
|
-
name: request.name
|
|
10
|
-
});
|
|
11
|
-
const marshalBootscript = (request, defaults) => ({
|
|
12
|
-
arch: request.arch,
|
|
13
|
-
bootcmdargs: request.bootcmdargs,
|
|
14
|
-
default: request.default,
|
|
15
|
-
dtb: request.dtb,
|
|
16
|
-
id: request.id,
|
|
17
|
-
initrd: request.initrd,
|
|
18
|
-
kernel: request.kernel,
|
|
19
|
-
organization: request.organization,
|
|
20
|
-
project: request.project,
|
|
21
|
-
public: request.public,
|
|
22
|
-
title: request.title,
|
|
23
|
-
zone: request.zone
|
|
24
|
-
});
|
|
25
|
-
const marshalVolume = (request, defaults) => ({
|
|
26
|
-
creation_date: request.creationDate,
|
|
27
|
-
export_uri: request.exportUri,
|
|
28
|
-
id: request.id,
|
|
29
|
-
modification_date: request.modificationDate,
|
|
30
|
-
name: request.name,
|
|
31
|
-
organization: request.organization,
|
|
32
|
-
project: request.project,
|
|
33
|
-
server: request.server ? marshalServerSummary(request.server) : undefined,
|
|
34
|
-
size: request.size,
|
|
35
|
-
state: request.state,
|
|
36
|
-
tags: request.tags,
|
|
37
|
-
volume_type: request.volumeType,
|
|
38
|
-
zone: request.zone
|
|
39
|
-
});
|
|
40
|
-
const marshalSetImageRequestWithID = (request, defaults) => ({
|
|
41
|
-
arch: request.arch,
|
|
42
|
-
creation_date: request.creationDate,
|
|
43
|
-
default_bootscript: request.defaultBootscript ? marshalBootscript(request.defaultBootscript) : undefined,
|
|
44
|
-
extra_volumes: request.extraVolumes ? Object.entries(request.extraVolumes).reduce((acc, _ref) => {
|
|
45
|
-
let [key, value] = _ref;
|
|
46
|
-
return {
|
|
47
|
-
...acc,
|
|
48
|
-
[key]: marshalVolume(value)
|
|
49
|
-
};
|
|
50
|
-
}, {}) : undefined,
|
|
51
|
-
from_server: request.fromServer,
|
|
52
|
-
modification_date: request.modificationDate,
|
|
53
|
-
id: request.id,
|
|
54
|
-
name: request.name,
|
|
55
|
-
organization: request.organization,
|
|
56
|
-
project: request.project,
|
|
57
|
-
public: request.public,
|
|
58
|
-
root_volume: request.rootVolume ? marshalVolumeSummary(request.rootVolume) : undefined,
|
|
59
|
-
state: request.state,
|
|
60
|
-
tags: request.tags
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
export { marshalSetImageRequestWithID };
|
package/dist/api/iot/index.js
DELETED
|
@@ -1,581 +0,0 @@
|
|
|
1
|
-
import { waitForResource } from '../../../internal/async/interval-retrier.js';
|
|
2
|
-
import { API as API$1 } from '../../../scw/api.js';
|
|
3
|
-
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
4
|
-
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
|
-
import { HUB_TRANSIENT_STATUSES } from './content.gen.js';
|
|
6
|
-
import { unmarshalListHubsResponse, marshalCreateHubRequest, unmarshalHub, marshalUpdateHubRequest, unmarshalGetHubMetricsResponse, marshalSetHubCARequest, unmarshalGetHubCAResponse, unmarshalListDevicesResponse, marshalCreateDeviceRequest, unmarshalCreateDeviceResponse, unmarshalDevice, marshalUpdateDeviceRequest, unmarshalRenewDeviceCertificateResponse, marshalSetDeviceCertificateRequest, unmarshalSetDeviceCertificateResponse, unmarshalGetDeviceCertificateResponse, unmarshalGetDeviceMetricsResponse, unmarshalListRoutesResponse, marshalCreateRouteRequest, unmarshalRoute, marshalUpdateRouteRequest, unmarshalListNetworksResponse, marshalCreateNetworkRequest, unmarshalCreateNetworkResponse, unmarshalNetwork, unmarshalTwinDocument, marshalPutTwinDocumentRequest, marshalPatchTwinDocumentRequest, unmarshalListTwinDocumentsResponse } from './marshalling.gen.js';
|
|
7
|
-
|
|
8
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
9
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
10
|
-
const jsonContentHeaders = {
|
|
11
|
-
'Content-Type': 'application/json; charset=utf-8'
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* IoT Hub API.
|
|
16
|
-
*
|
|
17
|
-
* This API allows you to manage IoT hubs and devices.
|
|
18
|
-
*/
|
|
19
|
-
class API extends API$1 {
|
|
20
|
-
/** Lists the available regions of the API. */
|
|
21
|
-
static LOCALITIES = ['fr-par'];
|
|
22
|
-
pageOfListHubs = (() => {
|
|
23
|
-
var _this = this;
|
|
24
|
-
return function (request) {
|
|
25
|
-
if (request === void 0) {
|
|
26
|
-
request = {};
|
|
27
|
-
}
|
|
28
|
-
return _this.client.fetch({
|
|
29
|
-
method: 'GET',
|
|
30
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/hubs`,
|
|
31
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
32
|
-
}, unmarshalListHubsResponse);
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* List hubs. List all Hubs in the specified zone. By default, returned Hubs
|
|
38
|
-
* are ordered by creation date in ascending order, though this can be
|
|
39
|
-
* modified via the `order_by` field.
|
|
40
|
-
*
|
|
41
|
-
* @param request - The request {@link ListHubsRequest}
|
|
42
|
-
* @returns A Promise of ListHubsResponse
|
|
43
|
-
*/
|
|
44
|
-
listHubs = (() => {
|
|
45
|
-
var _this2 = this;
|
|
46
|
-
return function (request) {
|
|
47
|
-
if (request === void 0) {
|
|
48
|
-
request = {};
|
|
49
|
-
}
|
|
50
|
-
return enrichForPagination('hubs', _this2.pageOfListHubs, request);
|
|
51
|
-
};
|
|
52
|
-
})();
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Create a hub. Create a new Hub in the targeted region, specifying its
|
|
56
|
-
* configuration including name and product plan.
|
|
57
|
-
*
|
|
58
|
-
* @param request - The request {@link CreateHubRequest}
|
|
59
|
-
* @returns A Promise of Hub
|
|
60
|
-
*/
|
|
61
|
-
createHub = (() => {
|
|
62
|
-
var _this3 = this;
|
|
63
|
-
return function (request) {
|
|
64
|
-
if (request === void 0) {
|
|
65
|
-
request = {};
|
|
66
|
-
}
|
|
67
|
-
return _this3.client.fetch({
|
|
68
|
-
body: JSON.stringify(marshalCreateHubRequest(request, _this3.client.settings)),
|
|
69
|
-
headers: jsonContentHeaders,
|
|
70
|
-
method: 'POST',
|
|
71
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/hubs`
|
|
72
|
-
}, unmarshalHub);
|
|
73
|
-
};
|
|
74
|
-
})();
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Get a hub. Retrieve information about an existing IoT Hub, specified by its
|
|
78
|
-
* Hub ID. Its full details, including name, status and endpoint, are returned
|
|
79
|
-
* in the response object.
|
|
80
|
-
*
|
|
81
|
-
* @param request - The request {@link GetHubRequest}
|
|
82
|
-
* @returns A Promise of Hub
|
|
83
|
-
*/
|
|
84
|
-
getHub = request => this.client.fetch({
|
|
85
|
-
method: 'GET',
|
|
86
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hubs/${validatePathParam('hubId', request.hubId)}`
|
|
87
|
-
}, unmarshalHub);
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Waits for {@link Hub} to be in a final state.
|
|
91
|
-
*
|
|
92
|
-
* @param request - The request {@link GetHubRequest}
|
|
93
|
-
* @param options - The waiting options
|
|
94
|
-
* @returns A Promise of Hub
|
|
95
|
-
*/
|
|
96
|
-
waitForHub = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!HUB_TRANSIENT_STATUSES.includes(res.status))), this.getHub, request, options);
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Update a hub. Update the parameters of an existing IoT Hub, specified by
|
|
100
|
-
* its Hub ID.
|
|
101
|
-
*
|
|
102
|
-
* @param request - The request {@link UpdateHubRequest}
|
|
103
|
-
* @returns A Promise of Hub
|
|
104
|
-
*/
|
|
105
|
-
updateHub = request => this.client.fetch({
|
|
106
|
-
body: JSON.stringify(marshalUpdateHubRequest(request, this.client.settings)),
|
|
107
|
-
headers: jsonContentHeaders,
|
|
108
|
-
method: 'PATCH',
|
|
109
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hubs/${validatePathParam('hubId', request.hubId)}`
|
|
110
|
-
}, unmarshalHub);
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Enable a hub. Enable an existing IoT Hub, specified by its Hub ID.
|
|
114
|
-
*
|
|
115
|
-
* @param request - The request {@link EnableHubRequest}
|
|
116
|
-
* @returns A Promise of Hub
|
|
117
|
-
*/
|
|
118
|
-
enableHub = request => this.client.fetch({
|
|
119
|
-
body: '{}',
|
|
120
|
-
headers: jsonContentHeaders,
|
|
121
|
-
method: 'POST',
|
|
122
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hubs/${validatePathParam('hubId', request.hubId)}/enable`
|
|
123
|
-
}, unmarshalHub);
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Disable a hub. Disable an existing IoT Hub, specified by its Hub ID.
|
|
127
|
-
*
|
|
128
|
-
* @param request - The request {@link DisableHubRequest}
|
|
129
|
-
* @returns A Promise of Hub
|
|
130
|
-
*/
|
|
131
|
-
disableHub = request => this.client.fetch({
|
|
132
|
-
body: '{}',
|
|
133
|
-
headers: jsonContentHeaders,
|
|
134
|
-
method: 'POST',
|
|
135
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hubs/${validatePathParam('hubId', request.hubId)}/disable`
|
|
136
|
-
}, unmarshalHub);
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Delete a hub. Delete an existing IoT Hub, specified by its Hub ID. Deleting
|
|
140
|
-
* a Hub is permanent, and cannot be undone.
|
|
141
|
-
*
|
|
142
|
-
* @param request - The request {@link DeleteHubRequest}
|
|
143
|
-
*/
|
|
144
|
-
deleteHub = request => this.client.fetch({
|
|
145
|
-
method: 'DELETE',
|
|
146
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hubs/${validatePathParam('hubId', request.hubId)}`,
|
|
147
|
-
urlParams: urlParams(['delete_devices', request.deleteDevices])
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Get a hub's metrics. Get the metrics of an existing IoT Hub, specified by
|
|
152
|
-
* its Hub ID.
|
|
153
|
-
*
|
|
154
|
-
* @deprecated
|
|
155
|
-
* @param request - The request {@link GetHubMetricsRequest}
|
|
156
|
-
* @returns A Promise of GetHubMetricsResponse
|
|
157
|
-
*/
|
|
158
|
-
getHubMetrics = request => this.client.fetch({
|
|
159
|
-
method: 'GET',
|
|
160
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hubs/${validatePathParam('hubId', request.hubId)}/metrics`,
|
|
161
|
-
urlParams: urlParams(['start_date', request.startDate])
|
|
162
|
-
}, unmarshalGetHubMetricsResponse);
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Set the certificate authority of a hub. Set a particular PEM-encoded
|
|
166
|
-
* certificate, specified by the Hub ID.
|
|
167
|
-
*
|
|
168
|
-
* @param request - The request {@link SetHubCARequest}
|
|
169
|
-
* @returns A Promise of Hub
|
|
170
|
-
*/
|
|
171
|
-
setHubCA = request => this.client.fetch({
|
|
172
|
-
body: JSON.stringify(marshalSetHubCARequest(request, this.client.settings)),
|
|
173
|
-
headers: jsonContentHeaders,
|
|
174
|
-
method: 'POST',
|
|
175
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hubs/${validatePathParam('hubId', request.hubId)}/ca`
|
|
176
|
-
}, unmarshalHub);
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Get the certificate authority of a hub. Get information for a particular
|
|
180
|
-
* PEM-encoded certificate, specified by the Hub ID.
|
|
181
|
-
*
|
|
182
|
-
* @param request - The request {@link GetHubCARequest}
|
|
183
|
-
* @returns A Promise of GetHubCAResponse
|
|
184
|
-
*/
|
|
185
|
-
getHubCA = request => this.client.fetch({
|
|
186
|
-
method: 'GET',
|
|
187
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hubs/${validatePathParam('hubId', request.hubId)}/ca`
|
|
188
|
-
}, unmarshalGetHubCAResponse);
|
|
189
|
-
pageOfListDevices = (() => {
|
|
190
|
-
var _this4 = this;
|
|
191
|
-
return function (request) {
|
|
192
|
-
if (request === void 0) {
|
|
193
|
-
request = {};
|
|
194
|
-
}
|
|
195
|
-
return _this4.client.fetch({
|
|
196
|
-
method: 'GET',
|
|
197
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? _this4.client.settings.defaultRegion)}/devices`,
|
|
198
|
-
urlParams: urlParams(['allow_insecure', request.allowInsecure], ['hub_id', request.hubId], ['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize], ['status', request.status])
|
|
199
|
-
}, unmarshalListDevicesResponse);
|
|
200
|
-
};
|
|
201
|
-
})();
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* List devices. List all devices in the specified region. By default,
|
|
205
|
-
* returned devices are ordered by creation date in ascending order, though
|
|
206
|
-
* this can be modified via the `order_by` field.
|
|
207
|
-
*
|
|
208
|
-
* @param request - The request {@link ListDevicesRequest}
|
|
209
|
-
* @returns A Promise of ListDevicesResponse
|
|
210
|
-
*/
|
|
211
|
-
listDevices = (() => {
|
|
212
|
-
var _this5 = this;
|
|
213
|
-
return function (request) {
|
|
214
|
-
if (request === void 0) {
|
|
215
|
-
request = {};
|
|
216
|
-
}
|
|
217
|
-
return enrichForPagination('devices', _this5.pageOfListDevices, request);
|
|
218
|
-
};
|
|
219
|
-
})();
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Add a device. Attach a device to a given Hub.
|
|
223
|
-
*
|
|
224
|
-
* @param request - The request {@link CreateDeviceRequest}
|
|
225
|
-
* @returns A Promise of CreateDeviceResponse
|
|
226
|
-
*/
|
|
227
|
-
createDevice = request => this.client.fetch({
|
|
228
|
-
body: JSON.stringify(marshalCreateDeviceRequest(request, this.client.settings)),
|
|
229
|
-
headers: jsonContentHeaders,
|
|
230
|
-
method: 'POST',
|
|
231
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices`
|
|
232
|
-
}, unmarshalCreateDeviceResponse);
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* Get a device. Retrieve information about an existing device, specified by
|
|
236
|
-
* its device ID. Its full details, including name, status and ID, are
|
|
237
|
-
* returned in the response object.
|
|
238
|
-
*
|
|
239
|
-
* @param request - The request {@link GetDeviceRequest}
|
|
240
|
-
* @returns A Promise of Device
|
|
241
|
-
*/
|
|
242
|
-
getDevice = request => this.client.fetch({
|
|
243
|
-
method: 'GET',
|
|
244
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}`
|
|
245
|
-
}, unmarshalDevice);
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Update a device. Update the parameters of an existing device, specified by
|
|
249
|
-
* its device ID.
|
|
250
|
-
*
|
|
251
|
-
* @param request - The request {@link UpdateDeviceRequest}
|
|
252
|
-
* @returns A Promise of Device
|
|
253
|
-
*/
|
|
254
|
-
updateDevice = request => this.client.fetch({
|
|
255
|
-
body: JSON.stringify(marshalUpdateDeviceRequest(request, this.client.settings)),
|
|
256
|
-
headers: jsonContentHeaders,
|
|
257
|
-
method: 'PATCH',
|
|
258
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}`
|
|
259
|
-
}, unmarshalDevice);
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Enable a device. Enable a specific device, specified by its device ID.
|
|
263
|
-
*
|
|
264
|
-
* @param request - The request {@link EnableDeviceRequest}
|
|
265
|
-
* @returns A Promise of Device
|
|
266
|
-
*/
|
|
267
|
-
enableDevice = request => this.client.fetch({
|
|
268
|
-
body: '{}',
|
|
269
|
-
headers: jsonContentHeaders,
|
|
270
|
-
method: 'POST',
|
|
271
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}/enable`
|
|
272
|
-
}, unmarshalDevice);
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Disable a device. Disable an existing device, specified by its device ID.
|
|
276
|
-
*
|
|
277
|
-
* @param request - The request {@link DisableDeviceRequest}
|
|
278
|
-
* @returns A Promise of Device
|
|
279
|
-
*/
|
|
280
|
-
disableDevice = request => this.client.fetch({
|
|
281
|
-
body: '{}',
|
|
282
|
-
headers: jsonContentHeaders,
|
|
283
|
-
method: 'POST',
|
|
284
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}/disable`
|
|
285
|
-
}, unmarshalDevice);
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Renew a device certificate. Renew the certificate of an existing device,
|
|
289
|
-
* specified by its device ID.
|
|
290
|
-
*
|
|
291
|
-
* @param request - The request {@link RenewDeviceCertificateRequest}
|
|
292
|
-
* @returns A Promise of RenewDeviceCertificateResponse
|
|
293
|
-
*/
|
|
294
|
-
renewDeviceCertificate = request => this.client.fetch({
|
|
295
|
-
body: '{}',
|
|
296
|
-
headers: jsonContentHeaders,
|
|
297
|
-
method: 'POST',
|
|
298
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}/renew-certificate`
|
|
299
|
-
}, unmarshalRenewDeviceCertificateResponse);
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* Set a custom certificate on a device. Switch the existing certificate of a
|
|
303
|
-
* given device with an EM-encoded custom certificate.
|
|
304
|
-
*
|
|
305
|
-
* @param request - The request {@link SetDeviceCertificateRequest}
|
|
306
|
-
* @returns A Promise of SetDeviceCertificateResponse
|
|
307
|
-
*/
|
|
308
|
-
setDeviceCertificate = request => this.client.fetch({
|
|
309
|
-
body: JSON.stringify(marshalSetDeviceCertificateRequest(request, this.client.settings)),
|
|
310
|
-
headers: jsonContentHeaders,
|
|
311
|
-
method: 'PUT',
|
|
312
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}/certificate`
|
|
313
|
-
}, unmarshalSetDeviceCertificateResponse);
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Get a device's certificate. Get information for a particular PEM-encoded
|
|
317
|
-
* certificate, specified by the device ID. The response returns full details
|
|
318
|
-
* of the device, including its type of certificate.
|
|
319
|
-
*
|
|
320
|
-
* @param request - The request {@link GetDeviceCertificateRequest}
|
|
321
|
-
* @returns A Promise of GetDeviceCertificateResponse
|
|
322
|
-
*/
|
|
323
|
-
getDeviceCertificate = request => this.client.fetch({
|
|
324
|
-
method: 'GET',
|
|
325
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}/certificate`
|
|
326
|
-
}, unmarshalGetDeviceCertificateResponse);
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* Remove a device. Remove a specific device from the specific Hub it is
|
|
330
|
-
* attached to.
|
|
331
|
-
*
|
|
332
|
-
* @param request - The request {@link DeleteDeviceRequest}
|
|
333
|
-
*/
|
|
334
|
-
deleteDevice = request => this.client.fetch({
|
|
335
|
-
method: 'DELETE',
|
|
336
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}`
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* Get a device's metrics. Get the metrics of an existing device, specified by
|
|
341
|
-
* its device ID.
|
|
342
|
-
*
|
|
343
|
-
* @deprecated
|
|
344
|
-
* @param request - The request {@link GetDeviceMetricsRequest}
|
|
345
|
-
* @returns A Promise of GetDeviceMetricsResponse
|
|
346
|
-
*/
|
|
347
|
-
getDeviceMetrics = request => this.client.fetch({
|
|
348
|
-
method: 'GET',
|
|
349
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/devices/${validatePathParam('deviceId', request.deviceId)}/metrics`,
|
|
350
|
-
urlParams: urlParams(['start_date', request.startDate])
|
|
351
|
-
}, unmarshalGetDeviceMetricsResponse);
|
|
352
|
-
pageOfListRoutes = (() => {
|
|
353
|
-
var _this6 = this;
|
|
354
|
-
return function (request) {
|
|
355
|
-
if (request === void 0) {
|
|
356
|
-
request = {};
|
|
357
|
-
}
|
|
358
|
-
return _this6.client.fetch({
|
|
359
|
-
method: 'GET',
|
|
360
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? _this6.client.settings.defaultRegion)}/routes`,
|
|
361
|
-
urlParams: urlParams(['hub_id', request.hubId], ['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this6.client.settings.defaultPageSize])
|
|
362
|
-
}, unmarshalListRoutesResponse);
|
|
363
|
-
};
|
|
364
|
-
})();
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* List routes. List all routes in the specified region. By default, returned
|
|
368
|
-
* routes are ordered by creation date in ascending order, though this can be
|
|
369
|
-
* modified via the `order_by` field.
|
|
370
|
-
*
|
|
371
|
-
* @param request - The request {@link ListRoutesRequest}
|
|
372
|
-
* @returns A Promise of ListRoutesResponse
|
|
373
|
-
*/
|
|
374
|
-
listRoutes = (() => {
|
|
375
|
-
var _this7 = this;
|
|
376
|
-
return function (request) {
|
|
377
|
-
if (request === void 0) {
|
|
378
|
-
request = {};
|
|
379
|
-
}
|
|
380
|
-
return enrichForPagination('routes', _this7.pageOfListRoutes, request);
|
|
381
|
-
};
|
|
382
|
-
})();
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* Create a route. Multiple kinds of routes can be created, such as:
|
|
386
|
-
*
|
|
387
|
-
* - Database Route Create a route that will record subscribed MQTT messages
|
|
388
|
-
* into your database. <b>You need to manage the database by yourself</b>.
|
|
389
|
-
* - REST Route. Create a route that will call a REST API on received subscribed
|
|
390
|
-
* MQTT messages.
|
|
391
|
-
* - S3 Routes. Create a route that will put subscribed MQTT messages into an S3
|
|
392
|
-
* bucket. You need to create the bucket yourself and grant write access.
|
|
393
|
-
* Granting can be done with s3cmd (`s3cmd setacl s3://<my-bucket>
|
|
394
|
-
* --acl-grant=write:555c69c3-87d0-4bf8-80f1-99a2f757d031:555c69c3-87d0-4bf8-80f1-99a2f757d031`).
|
|
395
|
-
*
|
|
396
|
-
* @param request - The request {@link CreateRouteRequest}
|
|
397
|
-
* @returns A Promise of Route
|
|
398
|
-
*/
|
|
399
|
-
createRoute = request => this.client.fetch({
|
|
400
|
-
body: JSON.stringify(marshalCreateRouteRequest(request, this.client.settings)),
|
|
401
|
-
headers: jsonContentHeaders,
|
|
402
|
-
method: 'POST',
|
|
403
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/routes`
|
|
404
|
-
}, unmarshalRoute);
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* Update a route. Update the parameters of an existing route, specified by
|
|
408
|
-
* its route ID.
|
|
409
|
-
*
|
|
410
|
-
* @param request - The request {@link UpdateRouteRequest}
|
|
411
|
-
* @returns A Promise of Route
|
|
412
|
-
*/
|
|
413
|
-
updateRoute = request => this.client.fetch({
|
|
414
|
-
body: JSON.stringify(marshalUpdateRouteRequest(request, this.client.settings)),
|
|
415
|
-
headers: jsonContentHeaders,
|
|
416
|
-
method: 'PATCH',
|
|
417
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam('routeId', request.routeId)}`
|
|
418
|
-
}, unmarshalRoute);
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
* Get a route. Get information for a particular route, specified by the route
|
|
422
|
-
* ID. The response returns full details of the route, including its type, the
|
|
423
|
-
* topic it subscribes to and its configuration.
|
|
424
|
-
*
|
|
425
|
-
* @param request - The request {@link GetRouteRequest}
|
|
426
|
-
* @returns A Promise of Route
|
|
427
|
-
*/
|
|
428
|
-
getRoute = request => this.client.fetch({
|
|
429
|
-
method: 'GET',
|
|
430
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam('routeId', request.routeId)}`
|
|
431
|
-
}, unmarshalRoute);
|
|
432
|
-
|
|
433
|
-
/**
|
|
434
|
-
* Delete a route. Delete an existing route, specified by its route ID.
|
|
435
|
-
* Deleting a route is permanent, and cannot be undone.
|
|
436
|
-
*
|
|
437
|
-
* @param request - The request {@link DeleteRouteRequest}
|
|
438
|
-
*/
|
|
439
|
-
deleteRoute = request => this.client.fetch({
|
|
440
|
-
method: 'DELETE',
|
|
441
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam('routeId', request.routeId)}`
|
|
442
|
-
});
|
|
443
|
-
pageOfListNetworks = (() => {
|
|
444
|
-
var _this8 = this;
|
|
445
|
-
return function (request) {
|
|
446
|
-
if (request === void 0) {
|
|
447
|
-
request = {};
|
|
448
|
-
}
|
|
449
|
-
return _this8.client.fetch({
|
|
450
|
-
method: 'GET',
|
|
451
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? _this8.client.settings.defaultRegion)}/networks`,
|
|
452
|
-
urlParams: urlParams(['hub_id', request.hubId], ['name', request.name], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this8.client.settings.defaultPageSize], ['topic_prefix', request.topicPrefix])
|
|
453
|
-
}, unmarshalListNetworksResponse);
|
|
454
|
-
};
|
|
455
|
-
})();
|
|
456
|
-
|
|
457
|
-
/**
|
|
458
|
-
* List the networks.
|
|
459
|
-
*
|
|
460
|
-
* @param request - The request {@link ListNetworksRequest}
|
|
461
|
-
* @returns A Promise of ListNetworksResponse
|
|
462
|
-
*/
|
|
463
|
-
listNetworks = (() => {
|
|
464
|
-
var _this9 = this;
|
|
465
|
-
return function (request) {
|
|
466
|
-
if (request === void 0) {
|
|
467
|
-
request = {};
|
|
468
|
-
}
|
|
469
|
-
return enrichForPagination('networks', _this9.pageOfListNetworks, request);
|
|
470
|
-
};
|
|
471
|
-
})();
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* Create a new network. Create a new network for an existing hub. Beside the
|
|
475
|
-
* default network, you can add networks for different data providers.
|
|
476
|
-
* Possible network types are Sigfox and REST.
|
|
477
|
-
*
|
|
478
|
-
* @param request - The request {@link CreateNetworkRequest}
|
|
479
|
-
* @returns A Promise of CreateNetworkResponse
|
|
480
|
-
*/
|
|
481
|
-
createNetwork = request => this.client.fetch({
|
|
482
|
-
body: JSON.stringify(marshalCreateNetworkRequest(request, this.client.settings)),
|
|
483
|
-
headers: jsonContentHeaders,
|
|
484
|
-
method: 'POST',
|
|
485
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/networks`
|
|
486
|
-
}, unmarshalCreateNetworkResponse);
|
|
487
|
-
|
|
488
|
-
/**
|
|
489
|
-
* Retrieve a specific network. Retrieve an existing network, specified by its
|
|
490
|
-
* network ID. The response returns full details of the network, including its
|
|
491
|
-
* type, the topic prefix and its endpoint.
|
|
492
|
-
*
|
|
493
|
-
* @param request - The request {@link GetNetworkRequest}
|
|
494
|
-
* @returns A Promise of Network
|
|
495
|
-
*/
|
|
496
|
-
getNetwork = request => this.client.fetch({
|
|
497
|
-
method: 'GET',
|
|
498
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/networks/${validatePathParam('networkId', request.networkId)}`
|
|
499
|
-
}, unmarshalNetwork);
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* Delete a Network. Delete an existing network, specified by its network ID.
|
|
503
|
-
* Deleting a network is permanent, and cannot be undone.
|
|
504
|
-
*
|
|
505
|
-
* @param request - The request {@link DeleteNetworkRequest}
|
|
506
|
-
*/
|
|
507
|
-
deleteNetwork = request => this.client.fetch({
|
|
508
|
-
method: 'DELETE',
|
|
509
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/networks/${validatePathParam('networkId', request.networkId)}`
|
|
510
|
-
});
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* BETA - Get a Cloud Twin Document.
|
|
514
|
-
*
|
|
515
|
-
* @param request - The request {@link GetTwinDocumentRequest}
|
|
516
|
-
* @returns A Promise of TwinDocument
|
|
517
|
-
*/
|
|
518
|
-
getTwinDocument = request => this.client.fetch({
|
|
519
|
-
method: 'GET',
|
|
520
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/twins/${validatePathParam('twinId', request.twinId)}/documents/${validatePathParam('documentName', request.documentName)}`
|
|
521
|
-
}, unmarshalTwinDocument);
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
* BETA - Update a Cloud Twin Document.
|
|
525
|
-
*
|
|
526
|
-
* @param request - The request {@link PutTwinDocumentRequest}
|
|
527
|
-
* @returns A Promise of TwinDocument
|
|
528
|
-
*/
|
|
529
|
-
putTwinDocument = request => this.client.fetch({
|
|
530
|
-
body: JSON.stringify(marshalPutTwinDocumentRequest(request, this.client.settings)),
|
|
531
|
-
headers: jsonContentHeaders,
|
|
532
|
-
method: 'PUT',
|
|
533
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/twins/${validatePathParam('twinId', request.twinId)}/documents/${validatePathParam('documentName', request.documentName)}`
|
|
534
|
-
}, unmarshalTwinDocument);
|
|
535
|
-
|
|
536
|
-
/**
|
|
537
|
-
* BETA - Patch a Cloud Twin Document.
|
|
538
|
-
*
|
|
539
|
-
* @param request - The request {@link PatchTwinDocumentRequest}
|
|
540
|
-
* @returns A Promise of TwinDocument
|
|
541
|
-
*/
|
|
542
|
-
patchTwinDocument = request => this.client.fetch({
|
|
543
|
-
body: JSON.stringify(marshalPatchTwinDocumentRequest(request, this.client.settings)),
|
|
544
|
-
headers: jsonContentHeaders,
|
|
545
|
-
method: 'PATCH',
|
|
546
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/twins/${validatePathParam('twinId', request.twinId)}/documents/${validatePathParam('documentName', request.documentName)}`
|
|
547
|
-
}, unmarshalTwinDocument);
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* BETA - Delete a Cloud Twin Document.
|
|
551
|
-
*
|
|
552
|
-
* @param request - The request {@link DeleteTwinDocumentRequest}
|
|
553
|
-
*/
|
|
554
|
-
deleteTwinDocument = request => this.client.fetch({
|
|
555
|
-
method: 'DELETE',
|
|
556
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/twins/${validatePathParam('twinId', request.twinId)}/documents/${validatePathParam('documentName', request.documentName)}`
|
|
557
|
-
});
|
|
558
|
-
|
|
559
|
-
/**
|
|
560
|
-
* BETA - List the documents of a Cloud Twin.
|
|
561
|
-
*
|
|
562
|
-
* @param request - The request {@link ListTwinDocumentsRequest}
|
|
563
|
-
* @returns A Promise of ListTwinDocumentsResponse
|
|
564
|
-
*/
|
|
565
|
-
listTwinDocuments = request => this.client.fetch({
|
|
566
|
-
method: 'GET',
|
|
567
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/twins/${validatePathParam('twinId', request.twinId)}`
|
|
568
|
-
}, unmarshalListTwinDocumentsResponse);
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
* BETA - Delete all the documents of a Cloud Twin.
|
|
572
|
-
*
|
|
573
|
-
* @param request - The request {@link DeleteTwinDocumentsRequest}
|
|
574
|
-
*/
|
|
575
|
-
deleteTwinDocuments = request => this.client.fetch({
|
|
576
|
-
method: 'DELETE',
|
|
577
|
-
path: `/iot/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/twins/${validatePathParam('twinId', request.twinId)}`
|
|
578
|
-
});
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
export { API };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
2
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3
|
-
|
|
4
|
-
/** Lists transient statutes of the enum {@link HubStatus}. */
|
|
5
|
-
const HUB_TRANSIENT_STATUSES = ['enabling', 'disabling'];
|
|
6
|
-
|
|
7
|
-
export { HUB_TRANSIENT_STATUSES };
|