@scaleway/sdk 2.0.0-alpha.13 → 2.0.0-alpha.15
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/api/account/index.js +4 -0
- package/dist/api/account/v2/api.gen.js +147 -0
- package/dist/api/account/v2/index.gen.js +4 -0
- package/dist/api/account/v2/marshalling.gen.js +39 -0
- package/dist/api/account/v3/api.gen.js +129 -0
- package/dist/api/account/v3/index.gen.js +6 -0
- package/dist/api/account/v3/marshalling.gen.js +39 -0
- package/dist/api/account/v3/validation-rules.gen.js +39 -0
- package/dist/api/applesilicon/index.js +2 -0
- package/dist/api/applesilicon/v1alpha1/api.gen.js +220 -0
- package/dist/api/applesilicon/v1alpha1/content.gen.js +7 -0
- package/dist/api/applesilicon/v1alpha1/index.gen.js +5 -0
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +113 -0
- package/dist/api/baremetal/index.js +2 -0
- package/dist/api/baremetal/v1/api.gen.js +523 -0
- package/dist/api/baremetal/v1/api.utils.js +27 -0
- package/dist/api/baremetal/v1/content.gen.js +13 -0
- package/dist/api/baremetal/v1/index.js +5 -0
- package/dist/api/baremetal/v1/marshalling.gen.js +406 -0
- package/dist/api/baremetal/v1/validation-rules.gen.js +109 -0
- package/dist/api/billing/index.js +2 -0
- package/dist/api/billing/v2alpha1/api.gen.js +80 -0
- package/dist/api/billing/v2alpha1/index.gen.js +4 -0
- package/dist/api/billing/v2alpha1/marshalling.gen.js +53 -0
- package/dist/api/block/index.js +2 -0
- package/dist/api/block/v1alpha1/api.gen.js +249 -0
- package/dist/api/block/v1alpha1/content.gen.js +13 -0
- package/dist/api/block/v1alpha1/index.gen.js +7 -0
- package/dist/api/block/v1alpha1/marshalling.gen.js +182 -0
- package/dist/api/block/v1alpha1/validation-rules.gen.js +52 -0
- package/dist/api/cockpit/index.js +2 -0
- package/dist/api/cockpit/v1beta1/api.gen.js +543 -0
- package/dist/api/cockpit/v1beta1/content.gen.js +7 -0
- package/dist/api/cockpit/v1beta1/index.gen.js +5 -0
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +271 -0
- package/dist/api/container/index.js +2 -0
- package/dist/api/container/v1beta1/api.gen.js +549 -0
- package/dist/api/container/v1beta1/content.gen.js +22 -0
- package/dist/api/container/v1beta1/index.gen.js +7 -0
- package/dist/api/container/v1beta1/marshalling.gen.js +358 -0
- package/dist/api/container/v1beta1/validation-rules.gen.js +44 -0
- package/dist/api/document_db/index.js +2 -0
- package/dist/api/document_db/v1beta1/api.gen.js +830 -0
- package/dist/api/document_db/v1beta1/content.gen.js +19 -0
- package/dist/api/document_db/v1beta1/index.gen.js +7 -0
- package/dist/api/document_db/v1beta1/marshalling.gen.js +636 -0
- package/dist/api/document_db/v1beta1/validation-rules.gen.js +10 -0
- package/dist/api/domain/index.js +2 -0
- package/dist/api/domain/v2beta1/api.gen.js +867 -0
- package/dist/api/domain/v2beta1/content.gen.js +28 -0
- package/dist/api/domain/v2beta1/index.gen.js +5 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +1172 -0
- package/dist/api/flexibleip/index.js +2 -0
- package/dist/api/flexibleip/v1alpha1/api.gen.js +195 -0
- package/dist/api/flexibleip/v1alpha1/content.gen.js +10 -0
- package/dist/api/flexibleip/v1alpha1/index.gen.js +7 -0
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +97 -0
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +14 -0
- package/dist/api/function/index.js +2 -0
- package/dist/api/function/v1beta1/api.gen.js +560 -0
- package/dist/api/function/v1beta1/content.gen.js +22 -0
- package/dist/api/function/v1beta1/index.gen.js +7 -0
- package/dist/api/function/v1beta1/marshalling.gen.js +396 -0
- package/dist/api/function/v1beta1/validation-rules.gen.js +44 -0
- package/dist/api/iam/index.js +2 -0
- package/dist/api/iam/v1alpha1/api.gen.js +783 -0
- package/dist/api/iam/v1alpha1/index.gen.js +6 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +384 -0
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +207 -0
- package/dist/api/instance/index.js +2 -0
- package/dist/api/instance/v1/api.gen.js +1003 -0
- package/dist/api/instance/v1/api.utils.js +369 -0
- package/dist/api/instance/v1/content.gen.js +31 -0
- package/dist/api/instance/v1/index.js +2 -0
- package/dist/api/instance/v1/marshalling.gen.js +1415 -0
- package/dist/api/instance/v1/marshalling.utils.js +63 -0
- package/dist/api/iot/index.js +2 -0
- package/dist/api/iot/v1/api.gen.js +573 -0
- package/dist/api/iot/v1/content.gen.js +7 -0
- package/dist/api/iot/v1/index.gen.js +5 -0
- package/dist/api/iot/v1/marshalling.gen.js +439 -0
- package/dist/api/ipam/index.js +2 -0
- package/dist/api/ipam/v1/api.gen.js +113 -0
- package/dist/api/ipam/v1/index.gen.js +6 -0
- package/dist/api/ipam/v1/marshalling.gen.js +77 -0
- package/dist/api/ipam/v1/validation-rules.gen.js +11 -0
- package/dist/api/ipfs/index.js +2 -0
- package/dist/api/ipfs/v1alpha1/api.gen.js +314 -0
- package/dist/api/ipfs/v1alpha1/content.gen.js +10 -0
- package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +180 -0
- package/dist/api/k8s/index.js +2 -0
- package/dist/api/k8s/v1/api.gen.js +454 -0
- package/dist/api/k8s/v1/api.utils.js +13 -0
- package/dist/api/k8s/v1/content.gen.js +13 -0
- package/dist/api/k8s/v1/index.js +4 -0
- package/dist/api/k8s/v1/marshalling.gen.js +421 -0
- package/dist/api/k8s/v1/validation-rules.gen.js +101 -0
- package/dist/api/lb/index.js +2 -0
- package/dist/api/lb/v1/api.gen.js +1669 -0
- package/dist/api/lb/v1/api.utils.js +81 -0
- package/dist/api/lb/v1/content.gen.js +16 -0
- package/dist/api/lb/v1/index.js +2 -0
- package/dist/api/lb/v1/marshalling.gen.js +1039 -0
- package/dist/api/marketplace/index.js +4 -0
- package/dist/api/marketplace/v1/api.gen.js +60 -0
- package/dist/api/marketplace/v1/index.gen.js +4 -0
- package/dist/api/marketplace/v1/marshalling.gen.js +92 -0
- package/dist/api/marketplace/v2/api.gen.js +162 -0
- package/dist/api/marketplace/v2/index.gen.js +4 -0
- package/dist/api/marketplace/v2/marshalling.gen.js +94 -0
- package/dist/api/mnq/index.js +4 -0
- package/dist/api/mnq/v1alpha1/api.gen.js +197 -0
- package/dist/api/mnq/v1alpha1/index.gen.js +4 -0
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +126 -0
- package/dist/api/mnq/v1beta1/api.gen.js +529 -0
- package/dist/api/mnq/v1beta1/index.gen.js +6 -0
- package/dist/api/mnq/v1beta1/marshalling.gen.js +212 -0
- package/dist/api/mnq/v1beta1/validation-rules.gen.js +77 -0
- package/dist/api/rdb/index.js +2 -0
- package/dist/api/rdb/v1/api.gen.js +972 -0
- package/dist/api/rdb/v1/content.gen.js +22 -0
- package/dist/api/rdb/v1/index.gen.js +7 -0
- package/dist/api/rdb/v1/marshalling.gen.js +694 -0
- package/dist/api/rdb/v1/validation-rules.gen.js +10 -0
- package/dist/api/redis/index.js +2 -0
- package/dist/api/redis/v1/api.gen.js +389 -0
- package/dist/api/redis/v1/content.gen.js +7 -0
- package/dist/api/redis/v1/index.gen.js +5 -0
- package/dist/api/redis/v1/marshalling.gen.js +283 -0
- package/dist/api/registry/index.js +2 -0
- package/dist/api/registry/v1/api.gen.js +252 -0
- package/dist/api/registry/v1/content.gen.js +13 -0
- package/dist/api/registry/v1/index.gen.js +5 -0
- package/dist/api/registry/v1/marshalling.gen.js +108 -0
- package/dist/api/secret/index.js +2 -0
- package/dist/api/secret/v1alpha1/api.gen.js +415 -0
- package/dist/api/secret/v1alpha1/index.gen.js +4 -0
- package/dist/api/secret/v1alpha1/marshalling.gen.js +150 -0
- package/dist/api/tem/index.js +2 -0
- package/dist/api/tem/v1alpha1/api.gen.js +229 -0
- package/dist/api/tem/v1alpha1/content.gen.js +10 -0
- package/dist/api/tem/v1alpha1/index.gen.js +5 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.js +168 -0
- package/dist/api/test/index.js +2 -0
- package/dist/api/test/v1/api.gen.js +152 -0
- package/dist/api/test/v1/content.gen.js +7 -0
- package/dist/api/test/v1/index.gen.js +5 -0
- package/dist/api/test/v1/marshalling.gen.js +81 -0
- package/dist/api/vpc/index.js +4 -0
- package/dist/api/vpc/v1/api.gen.js +110 -0
- package/dist/api/vpc/v1/index.gen.js +4 -0
- package/dist/api/vpc/v1/marshalling.gen.js +44 -0
- package/dist/api/vpc/v2/api.gen.js +276 -0
- package/dist/api/vpc/v2/index.gen.js +4 -0
- package/dist/api/vpc/v2/marshalling.gen.js +137 -0
- package/dist/api/vpcgw/index.js +2 -0
- package/dist/api/vpcgw/v1/api.gen.js +669 -0
- package/dist/api/vpcgw/v1/content.gen.js +10 -0
- package/dist/api/vpcgw/v1/index.gen.js +5 -0
- package/dist/api/vpcgw/v1/marshalling.gen.js +359 -0
- package/dist/api/webhosting/index.js +2 -0
- package/dist/api/webhosting/v1alpha1/api.gen.js +158 -0
- package/dist/api/webhosting/v1alpha1/content.gen.js +7 -0
- package/dist/api/webhosting/v1alpha1/index.gen.js +7 -0
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +146 -0
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +14 -0
- package/dist/helpers/is-browser.js +5 -0
- package/dist/helpers/is-response.js +10 -0
- package/dist/helpers/json.js +11 -0
- package/dist/helpers/marshalling.js +130 -0
- package/dist/index.cjs +26484 -0
- package/dist/index.d.ts +31184 -0
- package/dist/index.js +71 -0
- package/dist/internal/async/interval-retrier.js +105 -0
- package/dist/internal/async/sleep.js +13 -0
- package/dist/internal/interceptors/composer.js +46 -0
- package/dist/internal/interceptors/helpers.js +32 -0
- package/dist/internal/logger/console-logger.js +38 -0
- package/dist/internal/logger/index.js +41 -0
- package/dist/internal/logger/level-resolver.js +13 -0
- package/dist/internal/validations/string-validation.js +38 -0
- package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js +13 -0
- package/dist/scw/api.js +12 -0
- package/dist/scw/auth.js +68 -0
- package/dist/scw/client-ini-factory.js +174 -0
- package/dist/scw/client-ini-profile.js +54 -0
- package/dist/scw/client-settings.js +78 -0
- package/dist/scw/client.js +98 -0
- package/dist/scw/constants.js +4 -0
- package/dist/scw/custom-marshalling.js +131 -0
- package/dist/scw/errors/error-parser.js +107 -0
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +36 -0
- package/dist/scw/errors/non-standard/unknown-resource-mapper.js +27 -0
- package/dist/scw/errors/scw-error.js +66 -0
- package/dist/scw/errors/standard/already-exists-error.js +26 -0
- package/dist/scw/errors/standard/denied-authentication-error.js +52 -0
- package/dist/scw/errors/standard/index.js +13 -0
- package/dist/scw/errors/standard/invalid-arguments-error.js +67 -0
- package/dist/scw/errors/standard/out-of-stock-error.js +22 -0
- package/dist/scw/errors/standard/permissions-denied-error.js +48 -0
- package/dist/scw/errors/standard/precondition-failed-error.js +42 -0
- package/dist/scw/errors/standard/quotas-exceeded-error.js +68 -0
- package/dist/scw/errors/standard/resource-expired-error.js +26 -0
- package/dist/scw/errors/standard/resource-locked-error.js +25 -0
- package/dist/scw/errors/standard/resource-not-found-error.js +25 -0
- package/dist/scw/errors/standard/too-many-requests-error.js +70 -0
- package/dist/scw/errors/standard/transient-state-error.js +26 -0
- package/dist/scw/errors/types.js +23 -0
- package/dist/scw/fetch/build-fetcher.js +72 -0
- package/dist/scw/fetch/http-dumper.js +54 -0
- package/dist/scw/fetch/http-interceptors.js +99 -0
- package/dist/scw/fetch/resource-paginator.js +84 -0
- package/dist/scw/fetch/response-parser.js +72 -0
- package/package.json +2 -2
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
|
+
import { isJSONObject } from '../../../helpers/json.js';
|
|
3
|
+
import { unmarshalDate, unmarshalArrayOfObject } from '../../../helpers/marshalling.js';
|
|
4
|
+
|
|
5
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
6
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
7
|
+
const unmarshalNamespace = data => {
|
|
8
|
+
if (!isJSONObject(data)) {
|
|
9
|
+
throw new TypeError(`Unmarshalling the type 'Namespace' failed as data isn't a dictionary.`);
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
createdAt: unmarshalDate(data.created_at),
|
|
13
|
+
endpoint: data.endpoint,
|
|
14
|
+
id: data.id,
|
|
15
|
+
name: data.name,
|
|
16
|
+
projectId: data.project_id,
|
|
17
|
+
protocol: data.protocol,
|
|
18
|
+
region: data.region,
|
|
19
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
const unmarshalPermissions = data => {
|
|
23
|
+
if (!isJSONObject(data)) {
|
|
24
|
+
throw new TypeError(`Unmarshalling the type 'Permissions' failed as data isn't a dictionary.`);
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
canManage: data.can_manage,
|
|
28
|
+
canPublish: data.can_publish,
|
|
29
|
+
canReceive: data.can_receive
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
const unmarshalCredentialNATSCredsFile = data => {
|
|
33
|
+
if (!isJSONObject(data)) {
|
|
34
|
+
throw new TypeError(`Unmarshalling the type 'CredentialNATSCredsFile' failed as data isn't a dictionary.`);
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
content: data.content
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
const unmarshalCredentialSQSSNSCreds = data => {
|
|
41
|
+
if (!isJSONObject(data)) {
|
|
42
|
+
throw new TypeError(`Unmarshalling the type 'CredentialSQSSNSCreds' failed as data isn't a dictionary.`);
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
accessKey: data.access_key,
|
|
46
|
+
permissions: data.permissions ? unmarshalPermissions(data.permissions) : undefined,
|
|
47
|
+
secretKey: data.secret_key
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
const unmarshalCredential = data => {
|
|
51
|
+
if (!isJSONObject(data)) {
|
|
52
|
+
throw new TypeError(`Unmarshalling the type 'Credential' failed as data isn't a dictionary.`);
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
id: data.id,
|
|
56
|
+
name: data.name,
|
|
57
|
+
namespaceId: data.namespace_id,
|
|
58
|
+
natsCredentials: data.nats_credentials ? unmarshalCredentialNATSCredsFile(data.nats_credentials) : undefined,
|
|
59
|
+
protocol: data.protocol,
|
|
60
|
+
sqsSnsCredentials: data.sqs_sns_credentials ? unmarshalCredentialSQSSNSCreds(data.sqs_sns_credentials) : undefined
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
const unmarshalCredentialSummarySQSSNSCreds = data => {
|
|
64
|
+
if (!isJSONObject(data)) {
|
|
65
|
+
throw new TypeError(`Unmarshalling the type 'CredentialSummarySQSSNSCreds' failed as data isn't a dictionary.`);
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
accessKey: data.access_key,
|
|
69
|
+
permissions: data.permissions ? unmarshalPermissions(data.permissions) : undefined
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
const unmarshalCredentialSummary = data => {
|
|
73
|
+
if (!isJSONObject(data)) {
|
|
74
|
+
throw new TypeError(`Unmarshalling the type 'CredentialSummary' failed as data isn't a dictionary.`);
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
id: data.id,
|
|
78
|
+
name: data.name,
|
|
79
|
+
namespaceId: data.namespace_id,
|
|
80
|
+
protocol: data.protocol,
|
|
81
|
+
sqsSnsCredentials: data.sqs_sns_credentials ? unmarshalCredentialSummarySQSSNSCreds(data.sqs_sns_credentials) : undefined
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
const unmarshalListCredentialsResponse = data => {
|
|
85
|
+
if (!isJSONObject(data)) {
|
|
86
|
+
throw new TypeError(`Unmarshalling the type 'ListCredentialsResponse' failed as data isn't a dictionary.`);
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
credentials: unmarshalArrayOfObject(data.credentials, unmarshalCredentialSummary),
|
|
90
|
+
totalCount: data.total_count
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
const unmarshalListNamespacesResponse = data => {
|
|
94
|
+
if (!isJSONObject(data)) {
|
|
95
|
+
throw new TypeError(`Unmarshalling the type 'ListNamespacesResponse' failed as data isn't a dictionary.`);
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
namespaces: unmarshalArrayOfObject(data.namespaces, unmarshalNamespace),
|
|
99
|
+
totalCount: data.total_count
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
const marshalPermissions = (request, defaults) => ({
|
|
103
|
+
can_manage: request.canManage,
|
|
104
|
+
can_publish: request.canPublish,
|
|
105
|
+
can_receive: request.canReceive
|
|
106
|
+
});
|
|
107
|
+
const marshalCreateCredentialRequest = (request, defaults) => ({
|
|
108
|
+
name: request.name || randomName('mnq'),
|
|
109
|
+
namespace_id: request.namespaceId,
|
|
110
|
+
permissions: request.permissions !== undefined ? marshalPermissions(request.permissions) : undefined
|
|
111
|
+
});
|
|
112
|
+
const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
113
|
+
name: request.name || randomName('mnq'),
|
|
114
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
115
|
+
protocol: request.protocol
|
|
116
|
+
});
|
|
117
|
+
const marshalUpdateCredentialRequest = (request, defaults) => ({
|
|
118
|
+
name: request.name,
|
|
119
|
+
permissions: request.permissions !== undefined ? marshalPermissions(request.permissions) : undefined
|
|
120
|
+
});
|
|
121
|
+
const marshalUpdateNamespaceRequest = (request, defaults) => ({
|
|
122
|
+
name: request.name,
|
|
123
|
+
namespace_id: request.namespaceId
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
export { marshalCreateCredentialRequest, marshalCreateNamespaceRequest, marshalUpdateCredentialRequest, marshalUpdateNamespaceRequest, unmarshalCredential, unmarshalListCredentialsResponse, unmarshalListNamespacesResponse, unmarshalNamespace };
|
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
import { API as API$1 } from '../../../scw/api.js';
|
|
2
|
+
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
3
|
+
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
|
+
import { marshalNatsApiCreateNatsAccountRequest, unmarshalNatsAccount, marshalNatsApiUpdateNatsAccountRequest, unmarshalListNatsAccountsResponse, marshalNatsApiCreateNatsCredentialsRequest, unmarshalNatsCredentials, unmarshalListNatsCredentialsResponse, marshalSnsApiActivateSnsRequest, unmarshalSnsInfo, marshalSnsApiDeactivateSnsRequest, marshalSnsApiCreateSnsCredentialsRequest, unmarshalSnsCredentials, marshalSnsApiUpdateSnsCredentialsRequest, unmarshalListSnsCredentialsResponse, marshalSqsApiActivateSqsRequest, unmarshalSqsInfo, marshalSqsApiDeactivateSqsRequest, marshalSqsApiCreateSqsCredentialsRequest, unmarshalSqsCredentials, marshalSqsApiUpdateSqsCredentialsRequest, unmarshalListSqsCredentialsResponse } from './marshalling.gen.js';
|
|
5
|
+
|
|
6
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
7
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
8
|
+
const jsonContentHeaders = {
|
|
9
|
+
'Content-Type': 'application/json; charset=utf-8'
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Messaging and Queuing NATS API.
|
|
14
|
+
*
|
|
15
|
+
* This API allows you to manage Scaleway Messaging and Queueing NATS accounts.
|
|
16
|
+
*/
|
|
17
|
+
class NatsAPI extends API$1 {
|
|
18
|
+
/** Lists the available regions of the API. */
|
|
19
|
+
static LOCALITIES = ['fr-par'];
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Create a NATS account. Create a NATS account associated with a Project.
|
|
23
|
+
*
|
|
24
|
+
* @param request - The request {@link NatsApiCreateNatsAccountRequest}
|
|
25
|
+
* @returns A Promise of NatsAccount
|
|
26
|
+
*/
|
|
27
|
+
createNatsAccount = (() => {
|
|
28
|
+
var _this = this;
|
|
29
|
+
return function (request) {
|
|
30
|
+
if (request === void 0) {
|
|
31
|
+
request = {};
|
|
32
|
+
}
|
|
33
|
+
return _this.client.fetch({
|
|
34
|
+
body: JSON.stringify(marshalNatsApiCreateNatsAccountRequest(request, _this.client.settings)),
|
|
35
|
+
headers: jsonContentHeaders,
|
|
36
|
+
method: 'POST',
|
|
37
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/nats-accounts`
|
|
38
|
+
}, unmarshalNatsAccount);
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Delete a NATS account. Delete a NATS account, specified by its NATS account
|
|
44
|
+
* ID. Note that deleting a NATS account is irreversible, and any credentials,
|
|
45
|
+
* streams, consumer and stored messages belonging to this NATS account will
|
|
46
|
+
* also be deleted.
|
|
47
|
+
*
|
|
48
|
+
* @param request - The request {@link NatsApiDeleteNatsAccountRequest}
|
|
49
|
+
*/
|
|
50
|
+
deleteNatsAccount = request => this.client.fetch({
|
|
51
|
+
method: 'DELETE',
|
|
52
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nats-accounts/${validatePathParam('natsAccountId', request.natsAccountId)}`
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Update the name of a NATS account. Update the name of a NATS account,
|
|
57
|
+
* specified by its NATS account ID.
|
|
58
|
+
*
|
|
59
|
+
* @param request - The request {@link NatsApiUpdateNatsAccountRequest}
|
|
60
|
+
* @returns A Promise of NatsAccount
|
|
61
|
+
*/
|
|
62
|
+
updateNatsAccount = request => this.client.fetch({
|
|
63
|
+
body: JSON.stringify(marshalNatsApiUpdateNatsAccountRequest(request, this.client.settings)),
|
|
64
|
+
headers: jsonContentHeaders,
|
|
65
|
+
method: 'PATCH',
|
|
66
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nats-accounts/${validatePathParam('natsAccountId', request.natsAccountId)}`
|
|
67
|
+
}, unmarshalNatsAccount);
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Get a NATS account. Retrieve information about an existing NATS account
|
|
71
|
+
* identified by its NATS account ID. Its full details, including name and
|
|
72
|
+
* endpoint, are returned in the response.
|
|
73
|
+
*
|
|
74
|
+
* @param request - The request {@link NatsApiGetNatsAccountRequest}
|
|
75
|
+
* @returns A Promise of NatsAccount
|
|
76
|
+
*/
|
|
77
|
+
getNatsAccount = request => this.client.fetch({
|
|
78
|
+
method: 'GET',
|
|
79
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nats-accounts/${validatePathParam('natsAccountId', request.natsAccountId)}`
|
|
80
|
+
}, unmarshalNatsAccount);
|
|
81
|
+
pageOfListNatsAccounts = (() => {
|
|
82
|
+
var _this2 = this;
|
|
83
|
+
return function (request) {
|
|
84
|
+
if (request === void 0) {
|
|
85
|
+
request = {};
|
|
86
|
+
}
|
|
87
|
+
return _this2.client.fetch({
|
|
88
|
+
method: 'GET',
|
|
89
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this2.client.settings.defaultRegion)}/nats-accounts`,
|
|
90
|
+
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this2.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
91
|
+
}, unmarshalListNatsAccountsResponse);
|
|
92
|
+
};
|
|
93
|
+
})();
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* List NATS accounts. List all NATS accounts in the specified region, for a
|
|
97
|
+
* Scaleway Organization or Project. By default, the NATS accounts returned in
|
|
98
|
+
* the list are ordered by creation date in ascending order, though this can
|
|
99
|
+
* be modified via the `order_by` field.
|
|
100
|
+
*
|
|
101
|
+
* @param request - The request {@link NatsApiListNatsAccountsRequest}
|
|
102
|
+
* @returns A Promise of ListNatsAccountsResponse
|
|
103
|
+
*/
|
|
104
|
+
listNatsAccounts = (() => {
|
|
105
|
+
var _this3 = this;
|
|
106
|
+
return function (request) {
|
|
107
|
+
if (request === void 0) {
|
|
108
|
+
request = {};
|
|
109
|
+
}
|
|
110
|
+
return enrichForPagination('natsAccounts', _this3.pageOfListNatsAccounts, request);
|
|
111
|
+
};
|
|
112
|
+
})();
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Create NATS credentials. Create a set of credentials for a NATS account,
|
|
116
|
+
* specified by its NATS account ID.
|
|
117
|
+
*
|
|
118
|
+
* @param request - The request {@link NatsApiCreateNatsCredentialsRequest}
|
|
119
|
+
* @returns A Promise of NatsCredentials
|
|
120
|
+
*/
|
|
121
|
+
createNatsCredentials = request => this.client.fetch({
|
|
122
|
+
body: JSON.stringify(marshalNatsApiCreateNatsCredentialsRequest(request, this.client.settings)),
|
|
123
|
+
headers: jsonContentHeaders,
|
|
124
|
+
method: 'POST',
|
|
125
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nats-credentials`
|
|
126
|
+
}, unmarshalNatsCredentials);
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Delete NATS credentials. Delete a set of credentials, specified by their
|
|
130
|
+
* credentials ID. Deleting credentials is irreversible and cannot be undone.
|
|
131
|
+
* The credentials can no longer be used to access the NATS account, and
|
|
132
|
+
* active connections using this credentials will be closed.
|
|
133
|
+
*
|
|
134
|
+
* @param request - The request {@link NatsApiDeleteNatsCredentialsRequest}
|
|
135
|
+
*/
|
|
136
|
+
deleteNatsCredentials = request => this.client.fetch({
|
|
137
|
+
method: 'DELETE',
|
|
138
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nats-credentials/${validatePathParam('natsCredentialsId', request.natsCredentialsId)}`
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Get NATS credentials. Retrieve an existing set of credentials, identified
|
|
143
|
+
* by the `nats_credentials_id`. The credentials themselves are NOT returned,
|
|
144
|
+
* only their metadata (NATS account ID, credentials name, etc), are returned
|
|
145
|
+
* in the response.
|
|
146
|
+
*
|
|
147
|
+
* @param request - The request {@link NatsApiGetNatsCredentialsRequest}
|
|
148
|
+
* @returns A Promise of NatsCredentials
|
|
149
|
+
*/
|
|
150
|
+
getNatsCredentials = request => this.client.fetch({
|
|
151
|
+
method: 'GET',
|
|
152
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/nats-credentials/${validatePathParam('natsCredentialsId', request.natsCredentialsId)}`
|
|
153
|
+
}, unmarshalNatsCredentials);
|
|
154
|
+
pageOfListNatsCredentials = (() => {
|
|
155
|
+
var _this4 = this;
|
|
156
|
+
return function (request) {
|
|
157
|
+
if (request === void 0) {
|
|
158
|
+
request = {};
|
|
159
|
+
}
|
|
160
|
+
return _this4.client.fetch({
|
|
161
|
+
method: 'GET',
|
|
162
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this4.client.settings.defaultRegion)}/nats-credentials`,
|
|
163
|
+
urlParams: urlParams(['nats_account_id', request.natsAccountId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize])
|
|
164
|
+
}, unmarshalListNatsCredentialsResponse);
|
|
165
|
+
};
|
|
166
|
+
})();
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* List NATS credentials. List existing credentials in the specified NATS
|
|
170
|
+
* account. The response contains only the metadata for the credentials, not
|
|
171
|
+
* the credentials themselves, which are only returned after a **Create
|
|
172
|
+
* Credentials** call.
|
|
173
|
+
*
|
|
174
|
+
* @param request - The request {@link NatsApiListNatsCredentialsRequest}
|
|
175
|
+
* @returns A Promise of ListNatsCredentialsResponse
|
|
176
|
+
*/
|
|
177
|
+
listNatsCredentials = (() => {
|
|
178
|
+
var _this5 = this;
|
|
179
|
+
return function (request) {
|
|
180
|
+
if (request === void 0) {
|
|
181
|
+
request = {};
|
|
182
|
+
}
|
|
183
|
+
return enrichForPagination('natsCredentials', _this5.pageOfListNatsCredentials, request);
|
|
184
|
+
};
|
|
185
|
+
})();
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Messaging and Queuing SNS API.
|
|
190
|
+
*
|
|
191
|
+
* This API allows you to manage Scaleway Messaging and Queueing SNS brokers.
|
|
192
|
+
*/
|
|
193
|
+
class SnsAPI extends API$1 {
|
|
194
|
+
/** Lists the available regions of the API. */
|
|
195
|
+
static LOCALITIES = ['fr-par'];
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Activate SNS. Activate SNS for the specified Project ID. SNS must be
|
|
199
|
+
* activated before any usage. Activating SNS does not trigger any billing,
|
|
200
|
+
* and you can deactivate at any time.
|
|
201
|
+
*
|
|
202
|
+
* @param request - The request {@link SnsApiActivateSnsRequest}
|
|
203
|
+
* @returns A Promise of SnsInfo
|
|
204
|
+
*/
|
|
205
|
+
activateSns = (() => {
|
|
206
|
+
var _this6 = this;
|
|
207
|
+
return function (request) {
|
|
208
|
+
if (request === void 0) {
|
|
209
|
+
request = {};
|
|
210
|
+
}
|
|
211
|
+
return _this6.client.fetch({
|
|
212
|
+
body: JSON.stringify(marshalSnsApiActivateSnsRequest(request, _this6.client.settings)),
|
|
213
|
+
headers: jsonContentHeaders,
|
|
214
|
+
method: 'POST',
|
|
215
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this6.client.settings.defaultRegion)}/activate-sns`
|
|
216
|
+
}, unmarshalSnsInfo);
|
|
217
|
+
};
|
|
218
|
+
})();
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Get SNS info. Retrieve the SNS information of the specified Project ID.
|
|
222
|
+
* Informations include the activation status and the SNS API endpoint URL.
|
|
223
|
+
*
|
|
224
|
+
* @param request - The request {@link SnsApiGetSnsInfoRequest}
|
|
225
|
+
* @returns A Promise of SnsInfo
|
|
226
|
+
*/
|
|
227
|
+
getSnsInfo = (() => {
|
|
228
|
+
var _this7 = this;
|
|
229
|
+
return function (request) {
|
|
230
|
+
if (request === void 0) {
|
|
231
|
+
request = {};
|
|
232
|
+
}
|
|
233
|
+
return _this7.client.fetch({
|
|
234
|
+
method: 'GET',
|
|
235
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this7.client.settings.defaultRegion)}/sns-info`,
|
|
236
|
+
urlParams: urlParams(['project_id', request.projectId ?? _this7.client.settings.defaultProjectId])
|
|
237
|
+
}, unmarshalSnsInfo);
|
|
238
|
+
};
|
|
239
|
+
})();
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Deactivate SNS. Deactivate SNS for the specified Project ID.You must delete
|
|
243
|
+
* all topics and credentials before this call or you need to set the
|
|
244
|
+
* force_delete parameter.
|
|
245
|
+
*
|
|
246
|
+
* @param request - The request {@link SnsApiDeactivateSnsRequest}
|
|
247
|
+
* @returns A Promise of SnsInfo
|
|
248
|
+
*/
|
|
249
|
+
deactivateSns = (() => {
|
|
250
|
+
var _this8 = this;
|
|
251
|
+
return function (request) {
|
|
252
|
+
if (request === void 0) {
|
|
253
|
+
request = {};
|
|
254
|
+
}
|
|
255
|
+
return _this8.client.fetch({
|
|
256
|
+
body: JSON.stringify(marshalSnsApiDeactivateSnsRequest(request, _this8.client.settings)),
|
|
257
|
+
headers: jsonContentHeaders,
|
|
258
|
+
method: 'POST',
|
|
259
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this8.client.settings.defaultRegion)}/deactivate-sns`
|
|
260
|
+
}, unmarshalSnsInfo);
|
|
261
|
+
};
|
|
262
|
+
})();
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Create SNS credentials. Create a set of credentials for SNS, specified by a
|
|
266
|
+
* Project ID. Credentials give the bearer access to topics, and the level of
|
|
267
|
+
* permissions can be defined granularly.
|
|
268
|
+
*
|
|
269
|
+
* @param request - The request {@link SnsApiCreateSnsCredentialsRequest}
|
|
270
|
+
* @returns A Promise of SnsCredentials
|
|
271
|
+
*/
|
|
272
|
+
createSnsCredentials = (() => {
|
|
273
|
+
var _this9 = this;
|
|
274
|
+
return function (request) {
|
|
275
|
+
if (request === void 0) {
|
|
276
|
+
request = {};
|
|
277
|
+
}
|
|
278
|
+
return _this9.client.fetch({
|
|
279
|
+
body: JSON.stringify(marshalSnsApiCreateSnsCredentialsRequest(request, _this9.client.settings)),
|
|
280
|
+
headers: jsonContentHeaders,
|
|
281
|
+
method: 'POST',
|
|
282
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this9.client.settings.defaultRegion)}/sns-credentials`
|
|
283
|
+
}, unmarshalSnsCredentials);
|
|
284
|
+
};
|
|
285
|
+
})();
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Delete SNS credentials. Delete a set of SNS credentials, specified by their
|
|
289
|
+
* credentials ID. Deleting credentials is irreversible and cannot be undone.
|
|
290
|
+
* The credentials can then no longer be used to access SNS.
|
|
291
|
+
*
|
|
292
|
+
* @param request - The request {@link SnsApiDeleteSnsCredentialsRequest}
|
|
293
|
+
*/
|
|
294
|
+
deleteSnsCredentials = request => this.client.fetch({
|
|
295
|
+
method: 'DELETE',
|
|
296
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/sns-credentials/${validatePathParam('snsCredentialsId', request.snsCredentialsId)}`
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Update SNS credentials. Update a set of SNS credentials. You can update the
|
|
301
|
+
* credentials' name, or their permissions.
|
|
302
|
+
*
|
|
303
|
+
* @param request - The request {@link SnsApiUpdateSnsCredentialsRequest}
|
|
304
|
+
* @returns A Promise of SnsCredentials
|
|
305
|
+
*/
|
|
306
|
+
updateSnsCredentials = request => this.client.fetch({
|
|
307
|
+
body: JSON.stringify(marshalSnsApiUpdateSnsCredentialsRequest(request, this.client.settings)),
|
|
308
|
+
headers: jsonContentHeaders,
|
|
309
|
+
method: 'PATCH',
|
|
310
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/sns-credentials/${validatePathParam('snsCredentialsId', request.snsCredentialsId)}`
|
|
311
|
+
}, unmarshalSnsCredentials);
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Get SNS credentials. Retrieve an existing set of credentials, identified by
|
|
315
|
+
* the `credentials_id`. The credentials themselves, as well as their metadata
|
|
316
|
+
* (name, project ID etc), are returned in the response.
|
|
317
|
+
*
|
|
318
|
+
* @param request - The request {@link SnsApiGetSnsCredentialsRequest}
|
|
319
|
+
* @returns A Promise of SnsCredentials
|
|
320
|
+
*/
|
|
321
|
+
getSnsCredentials = request => this.client.fetch({
|
|
322
|
+
method: 'GET',
|
|
323
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/sns-credentials/${validatePathParam('snsCredentialsId', request.snsCredentialsId)}`
|
|
324
|
+
}, unmarshalSnsCredentials);
|
|
325
|
+
pageOfListSnsCredentials = (() => {
|
|
326
|
+
var _this10 = this;
|
|
327
|
+
return function (request) {
|
|
328
|
+
if (request === void 0) {
|
|
329
|
+
request = {};
|
|
330
|
+
}
|
|
331
|
+
return _this10.client.fetch({
|
|
332
|
+
method: 'GET',
|
|
333
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this10.client.settings.defaultRegion)}/sns-credentials`,
|
|
334
|
+
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this10.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
335
|
+
}, unmarshalListSnsCredentialsResponse);
|
|
336
|
+
};
|
|
337
|
+
})();
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* List SNS credentials. List existing SNS credentials in the specified
|
|
341
|
+
* region. The response contains only the metadata for the credentials, not
|
|
342
|
+
* the credentials themselves.
|
|
343
|
+
*
|
|
344
|
+
* @param request - The request {@link SnsApiListSnsCredentialsRequest}
|
|
345
|
+
* @returns A Promise of ListSnsCredentialsResponse
|
|
346
|
+
*/
|
|
347
|
+
listSnsCredentials = (() => {
|
|
348
|
+
var _this11 = this;
|
|
349
|
+
return function (request) {
|
|
350
|
+
if (request === void 0) {
|
|
351
|
+
request = {};
|
|
352
|
+
}
|
|
353
|
+
return enrichForPagination('snsCredentials', _this11.pageOfListSnsCredentials, request);
|
|
354
|
+
};
|
|
355
|
+
})();
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Messaging and Queuing SQS API.
|
|
360
|
+
*
|
|
361
|
+
* This API allows you to manage Scaleway Messaging and Queueing SQS brokers.
|
|
362
|
+
*/
|
|
363
|
+
class SqsAPI extends API$1 {
|
|
364
|
+
/** Lists the available regions of the API. */
|
|
365
|
+
static LOCALITIES = ['fr-par'];
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Activate SQS. Activate SQS for the specified Project ID. SQS must be
|
|
369
|
+
* activated before any usage such as creating credentials and queues.
|
|
370
|
+
* Activating SQS does not trigger any billing, and you can deactivate at any
|
|
371
|
+
* time.
|
|
372
|
+
*
|
|
373
|
+
* @param request - The request {@link SqsApiActivateSqsRequest}
|
|
374
|
+
* @returns A Promise of SqsInfo
|
|
375
|
+
*/
|
|
376
|
+
activateSqs = (() => {
|
|
377
|
+
var _this12 = this;
|
|
378
|
+
return function (request) {
|
|
379
|
+
if (request === void 0) {
|
|
380
|
+
request = {};
|
|
381
|
+
}
|
|
382
|
+
return _this12.client.fetch({
|
|
383
|
+
body: JSON.stringify(marshalSqsApiActivateSqsRequest(request, _this12.client.settings)),
|
|
384
|
+
headers: jsonContentHeaders,
|
|
385
|
+
method: 'POST',
|
|
386
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this12.client.settings.defaultRegion)}/activate-sqs`
|
|
387
|
+
}, unmarshalSqsInfo);
|
|
388
|
+
};
|
|
389
|
+
})();
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Get SQS info. Retrieve the SQS information of the specified Project ID.
|
|
393
|
+
* Informations include the activation status and the SQS API endpoint URL.
|
|
394
|
+
*
|
|
395
|
+
* @param request - The request {@link SqsApiGetSqsInfoRequest}
|
|
396
|
+
* @returns A Promise of SqsInfo
|
|
397
|
+
*/
|
|
398
|
+
getSqsInfo = (() => {
|
|
399
|
+
var _this13 = this;
|
|
400
|
+
return function (request) {
|
|
401
|
+
if (request === void 0) {
|
|
402
|
+
request = {};
|
|
403
|
+
}
|
|
404
|
+
return _this13.client.fetch({
|
|
405
|
+
method: 'GET',
|
|
406
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this13.client.settings.defaultRegion)}/sqs-info`,
|
|
407
|
+
urlParams: urlParams(['project_id', request.projectId ?? _this13.client.settings.defaultProjectId])
|
|
408
|
+
}, unmarshalSqsInfo);
|
|
409
|
+
};
|
|
410
|
+
})();
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Deactivate SQS. Deactivate SQS for the specified Project ID. You must
|
|
414
|
+
* delete all queues and credentials before this call or you need to set the
|
|
415
|
+
* force_delete parameter.
|
|
416
|
+
*
|
|
417
|
+
* @param request - The request {@link SqsApiDeactivateSqsRequest}
|
|
418
|
+
* @returns A Promise of SqsInfo
|
|
419
|
+
*/
|
|
420
|
+
deactivateSqs = (() => {
|
|
421
|
+
var _this14 = this;
|
|
422
|
+
return function (request) {
|
|
423
|
+
if (request === void 0) {
|
|
424
|
+
request = {};
|
|
425
|
+
}
|
|
426
|
+
return _this14.client.fetch({
|
|
427
|
+
body: JSON.stringify(marshalSqsApiDeactivateSqsRequest(request, _this14.client.settings)),
|
|
428
|
+
headers: jsonContentHeaders,
|
|
429
|
+
method: 'POST',
|
|
430
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this14.client.settings.defaultRegion)}/deactivate-sqs`
|
|
431
|
+
}, unmarshalSqsInfo);
|
|
432
|
+
};
|
|
433
|
+
})();
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Create SQS credentials. Create a set of credentials for SQS, specified by a
|
|
437
|
+
* Project ID. Credentials give the bearer access to queues, and the level of
|
|
438
|
+
* permissions can be defined granularly.
|
|
439
|
+
*
|
|
440
|
+
* @param request - The request {@link SqsApiCreateSqsCredentialsRequest}
|
|
441
|
+
* @returns A Promise of SqsCredentials
|
|
442
|
+
*/
|
|
443
|
+
createSqsCredentials = (() => {
|
|
444
|
+
var _this15 = this;
|
|
445
|
+
return function (request) {
|
|
446
|
+
if (request === void 0) {
|
|
447
|
+
request = {};
|
|
448
|
+
}
|
|
449
|
+
return _this15.client.fetch({
|
|
450
|
+
body: JSON.stringify(marshalSqsApiCreateSqsCredentialsRequest(request, _this15.client.settings)),
|
|
451
|
+
headers: jsonContentHeaders,
|
|
452
|
+
method: 'POST',
|
|
453
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this15.client.settings.defaultRegion)}/sqs-credentials`
|
|
454
|
+
}, unmarshalSqsCredentials);
|
|
455
|
+
};
|
|
456
|
+
})();
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Delete SQS credentials. Delete a set of SQS credentials, specified by their
|
|
460
|
+
* credentials ID. Deleting credentials is irreversible and cannot be undone.
|
|
461
|
+
* The credentials can then no longer be used to access SQS.
|
|
462
|
+
*
|
|
463
|
+
* @param request - The request {@link SqsApiDeleteSqsCredentialsRequest}
|
|
464
|
+
*/
|
|
465
|
+
deleteSqsCredentials = request => this.client.fetch({
|
|
466
|
+
method: 'DELETE',
|
|
467
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/sqs-credentials/${validatePathParam('sqsCredentialsId', request.sqsCredentialsId)}`
|
|
468
|
+
});
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Update SQS credentials. Update a set of SQS credentials. You can update the
|
|
472
|
+
* credentials' name, or their permissions.
|
|
473
|
+
*
|
|
474
|
+
* @param request - The request {@link SqsApiUpdateSqsCredentialsRequest}
|
|
475
|
+
* @returns A Promise of SqsCredentials
|
|
476
|
+
*/
|
|
477
|
+
updateSqsCredentials = request => this.client.fetch({
|
|
478
|
+
body: JSON.stringify(marshalSqsApiUpdateSqsCredentialsRequest(request, this.client.settings)),
|
|
479
|
+
headers: jsonContentHeaders,
|
|
480
|
+
method: 'PATCH',
|
|
481
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/sqs-credentials/${validatePathParam('sqsCredentialsId', request.sqsCredentialsId)}`
|
|
482
|
+
}, unmarshalSqsCredentials);
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Get SQS credentials. Retrieve an existing set of credentials, identified by
|
|
486
|
+
* the `credentials_id`. The credentials themselves, as well as their metadata
|
|
487
|
+
* (name, project ID etc), are returned in the response.
|
|
488
|
+
*
|
|
489
|
+
* @param request - The request {@link SqsApiGetSqsCredentialsRequest}
|
|
490
|
+
* @returns A Promise of SqsCredentials
|
|
491
|
+
*/
|
|
492
|
+
getSqsCredentials = request => this.client.fetch({
|
|
493
|
+
method: 'GET',
|
|
494
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/sqs-credentials/${validatePathParam('sqsCredentialsId', request.sqsCredentialsId)}`
|
|
495
|
+
}, unmarshalSqsCredentials);
|
|
496
|
+
pageOfListSqsCredentials = (() => {
|
|
497
|
+
var _this16 = this;
|
|
498
|
+
return function (request) {
|
|
499
|
+
if (request === void 0) {
|
|
500
|
+
request = {};
|
|
501
|
+
}
|
|
502
|
+
return _this16.client.fetch({
|
|
503
|
+
method: 'GET',
|
|
504
|
+
path: `/mnq/v1beta1/regions/${validatePathParam('region', request.region ?? _this16.client.settings.defaultRegion)}/sqs-credentials`,
|
|
505
|
+
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this16.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
506
|
+
}, unmarshalListSqsCredentialsResponse);
|
|
507
|
+
};
|
|
508
|
+
})();
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* List SQS credentials. List existing SQS credentials in the specified
|
|
512
|
+
* region. The response contains only the metadata for the credentials, not
|
|
513
|
+
* the credentials themselves.
|
|
514
|
+
*
|
|
515
|
+
* @param request - The request {@link SqsApiListSqsCredentialsRequest}
|
|
516
|
+
* @returns A Promise of ListSqsCredentialsResponse
|
|
517
|
+
*/
|
|
518
|
+
listSqsCredentials = (() => {
|
|
519
|
+
var _this17 = this;
|
|
520
|
+
return function (request) {
|
|
521
|
+
if (request === void 0) {
|
|
522
|
+
request = {};
|
|
523
|
+
}
|
|
524
|
+
return enrichForPagination('sqsCredentials', _this17.pageOfListSqsCredentials, request);
|
|
525
|
+
};
|
|
526
|
+
})();
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
export { NatsAPI, SnsAPI, SqsAPI };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { NatsAPI, SnsAPI, SqsAPI } from './api.gen.js';
|
|
2
|
+
import * as validationRules_gen from './validation-rules.gen.js';
|
|
3
|
+
export { validationRules_gen as ValidationRules };
|
|
4
|
+
|
|
5
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
6
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|