@scaleway/sdk 1.14.0 → 1.16.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/dist/api/account/v2/api.gen.js +77 -60
- package/dist/api/applesilicon/v1alpha1/api.gen.js +174 -152
- package/dist/api/baremetal/v1/api.gen.js +434 -378
- package/dist/api/baremetal/v1/api.utils.js +19 -22
- package/dist/api/billing/v2alpha1/api.gen.js +21 -17
- package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
- package/dist/api/container/v1beta1/api.gen.js +384 -337
- package/dist/api/domain/v2beta1/api.gen.js +754 -668
- package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
- package/dist/api/function/v1beta1/api.gen.js +467 -407
- package/dist/api/iam/v1alpha1/api.gen.js +641 -557
- package/dist/api/instance/v1/api.gen.js +803 -677
- package/dist/api/instance/v1/api.utils.js +337 -325
- package/dist/api/instance/v1/content.gen.js +4 -1
- package/dist/api/instance/v1/index.js +1 -1
- package/dist/api/instance/v1/marshalling.gen.js +27 -4
- package/dist/api/iot/v1/api.gen.js +508 -452
- package/dist/api/ipfs/index.js +2 -0
- package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
- package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
- package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
- package/dist/api/k8s/v1/api.gen.js +403 -342
- package/dist/api/k8s/v1/api.utils.js +7 -10
- package/dist/api/k8s/v1/marshalling.gen.js +19 -1
- package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
- package/dist/api/lb/v1/api.gen.js +1501 -1363
- package/dist/api/lb/v1/api.utils.js +71 -75
- package/dist/api/lb/v1/marshalling.gen.js +6 -0
- package/dist/api/marketplace/v1/api.gen.js +35 -32
- package/dist/api/marketplace/v2/api.gen.js +117 -102
- package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
- package/dist/api/rdb/v1/api.gen.js +897 -819
- package/dist/api/redis/v1/api.gen.js +358 -333
- package/dist/api/redis/v1/marshalling.gen.js +1 -0
- package/dist/api/registry/v1/api.gen.js +211 -189
- package/dist/api/secret/v1alpha1/api.gen.js +295 -246
- package/dist/api/secret/v1alpha1/marshalling.gen.js +10 -1
- package/dist/api/tem/v1alpha1/api.gen.js +182 -147
- package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
- package/dist/api/test/v1/api.gen.js +116 -104
- package/dist/api/vpc/v1/api.gen.js +74 -65
- package/dist/api/vpc/v2/api.gen.js +200 -178
- package/dist/api/vpc/v2/marshalling.gen.js +1 -0
- package/dist/api/vpcgw/v1/api.gen.js +575 -501
- package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
- package/dist/api/webhosting/v1alpha1/content.gen.js +1 -1
- package/dist/index.cjs +924 -453
- package/dist/index.d.ts +2152 -1558
- package/dist/index.js +28 -26
- package/dist/internal/logger/console-logger.js +4 -5
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/scw-error.js +2 -2
- package/package.json +2 -2
|
@@ -11,11 +11,9 @@ const jsonContentHeaders = {
|
|
|
11
11
|
|
|
12
12
|
/** IAM API. */
|
|
13
13
|
class API extends API$1 {
|
|
14
|
-
|
|
15
|
-
var _this;
|
|
16
|
-
|
|
17
|
-
_this = this;
|
|
18
|
-
this.pageOfListSSHKeys = function (request) {
|
|
14
|
+
pageOfListSSHKeys = (() => {
|
|
15
|
+
var _this = this;
|
|
16
|
+
return function (request) {
|
|
19
17
|
if (request === void 0) {
|
|
20
18
|
request = {};
|
|
21
19
|
}
|
|
@@ -25,495 +23,562 @@ class API extends API$1 {
|
|
|
25
23
|
urlParams: urlParams(['disabled', request.disabled], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
26
24
|
}, unmarshalListSSHKeysResponse);
|
|
27
25
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
})();
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* List SSH keys. List SSH keys. By default, the SSH keys listed are ordered
|
|
30
|
+
* by creation date in ascending order. This can be modified via the
|
|
31
|
+
* `order_by` field. You can define additional parameters for your query such
|
|
32
|
+
* as `organization_id`, `name`, `project_id` and `disabled`.
|
|
33
|
+
*
|
|
34
|
+
* @param request - The request {@link ListSSHKeysRequest}
|
|
35
|
+
* @returns A Promise of ListSSHKeysResponse
|
|
36
|
+
*/
|
|
37
|
+
listSSHKeys = (() => {
|
|
38
|
+
var _this2 = this;
|
|
39
|
+
return function (request) {
|
|
38
40
|
if (request === void 0) {
|
|
39
41
|
request = {};
|
|
40
42
|
}
|
|
41
|
-
return enrichForPagination('sshKeys',
|
|
43
|
+
return enrichForPagination('sshKeys', _this2.pageOfListSSHKeys, request);
|
|
42
44
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
45
|
+
})();
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Create an SSH key. Add a new SSH key to a Scaleway Project. You must
|
|
49
|
+
* specify the `name`, `public_key` and `project_id`.
|
|
50
|
+
*
|
|
51
|
+
* @param request - The request {@link CreateSSHKeyRequest}
|
|
52
|
+
* @returns A Promise of SSHKey
|
|
53
|
+
*/
|
|
54
|
+
createSSHKey = request => this.client.fetch({
|
|
55
|
+
body: JSON.stringify(marshalCreateSSHKeyRequest(request, this.client.settings)),
|
|
56
|
+
headers: jsonContentHeaders,
|
|
57
|
+
method: 'POST',
|
|
58
|
+
path: `/iam/v1alpha1/ssh-keys`
|
|
59
|
+
}, unmarshalSSHKey);
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Get an SSH key. Retrieve information about a given SSH key, specified by
|
|
63
|
+
* the `ssh_key_id` parameter. The SSH key's full details, including `id`,
|
|
64
|
+
* `name`, `public_key`, and `project_id` are returned in the response.
|
|
65
|
+
*
|
|
66
|
+
* @param request - The request {@link GetSSHKeyRequest}
|
|
67
|
+
* @returns A Promise of SSHKey
|
|
68
|
+
*/
|
|
69
|
+
getSSHKey = request => this.client.fetch({
|
|
70
|
+
method: 'GET',
|
|
71
|
+
path: `/iam/v1alpha1/ssh-keys/${validatePathParam('sshKeyId', request.sshKeyId)}`
|
|
72
|
+
}, unmarshalSSHKey);
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Update an SSH key. Update the parameters of an SSH key, including `name`
|
|
76
|
+
* and `disable`.
|
|
77
|
+
*
|
|
78
|
+
* @param request - The request {@link UpdateSSHKeyRequest}
|
|
79
|
+
* @returns A Promise of SSHKey
|
|
80
|
+
*/
|
|
81
|
+
updateSSHKey = request => this.client.fetch({
|
|
82
|
+
body: JSON.stringify(marshalUpdateSSHKeyRequest(request, this.client.settings)),
|
|
83
|
+
headers: jsonContentHeaders,
|
|
84
|
+
method: 'PATCH',
|
|
85
|
+
path: `/iam/v1alpha1/ssh-keys/${validatePathParam('sshKeyId', request.sshKeyId)}`
|
|
86
|
+
}, unmarshalSSHKey);
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Delete an SSH key. Delete a given SSH key, specified by the `ssh_key_id`.
|
|
90
|
+
* Deleting an SSH is permanent, and cannot be undone. Note that you might
|
|
91
|
+
* need to update any configurations that used the SSH key.
|
|
92
|
+
*
|
|
93
|
+
* @param request - The request {@link DeleteSSHKeyRequest}
|
|
94
|
+
*/
|
|
95
|
+
deleteSSHKey = request => this.client.fetch({
|
|
96
|
+
method: 'DELETE',
|
|
97
|
+
path: `/iam/v1alpha1/ssh-keys/${validatePathParam('sshKeyId', request.sshKeyId)}`
|
|
98
|
+
});
|
|
99
|
+
pageOfListUsers = (() => {
|
|
100
|
+
var _this3 = this;
|
|
101
|
+
return function (request) {
|
|
93
102
|
if (request === void 0) {
|
|
94
103
|
request = {};
|
|
95
104
|
}
|
|
96
|
-
return
|
|
105
|
+
return _this3.client.fetch({
|
|
97
106
|
method: 'GET',
|
|
98
107
|
path: `/iam/v1alpha1/users`,
|
|
99
|
-
urlParams: urlParams(['mfa', request.mfa], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId ??
|
|
108
|
+
urlParams: urlParams(['mfa', request.mfa], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId ?? _this3.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize], ['user_ids', request.userIds])
|
|
100
109
|
}, unmarshalListUsersResponse);
|
|
101
110
|
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
})();
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* List users of an Organization. List the users of an Organization. By
|
|
115
|
+
* default, the users listed are ordered by creation date in ascending order.
|
|
116
|
+
* This can be modified via the `order_by` field. You must define the
|
|
117
|
+
* `organization_id` in the query path of your request. You can also define
|
|
118
|
+
* additional parameters for your query such as `user_ids`.
|
|
119
|
+
*
|
|
120
|
+
* @param request - The request {@link ListUsersRequest}
|
|
121
|
+
* @returns A Promise of ListUsersResponse
|
|
122
|
+
*/
|
|
123
|
+
listUsers = (() => {
|
|
124
|
+
var _this4 = this;
|
|
125
|
+
return function (request) {
|
|
113
126
|
if (request === void 0) {
|
|
114
127
|
request = {};
|
|
115
128
|
}
|
|
116
|
-
return enrichForPagination('users',
|
|
129
|
+
return enrichForPagination('users', _this4.pageOfListUsers, request);
|
|
117
130
|
};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
131
|
+
})();
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Get a given user. Retrieve information about a user, specified by the
|
|
135
|
+
* `user_id` parameter. The user's full details, including `id`, `email`,
|
|
136
|
+
* `organization_id`, `status` and `mfa` are returned in the response.
|
|
137
|
+
*
|
|
138
|
+
* @param request - The request {@link GetUserRequest}
|
|
139
|
+
* @returns A Promise of User
|
|
140
|
+
*/
|
|
141
|
+
getUser = request => this.client.fetch({
|
|
142
|
+
method: 'GET',
|
|
143
|
+
path: `/iam/v1alpha1/users/${validatePathParam('userId', request.userId)}`
|
|
144
|
+
}, unmarshalUser);
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Delete a guest user from an Organization. Remove a user from an
|
|
148
|
+
* Organization in which they are a guest. You must define the `user_id` in
|
|
149
|
+
* your request. Note that removing a user from an Organization automatically
|
|
150
|
+
* deletes their API keys, and any policies directly attached to them become
|
|
151
|
+
* orphaned.
|
|
152
|
+
*
|
|
153
|
+
* @param request - The request {@link DeleteUserRequest}
|
|
154
|
+
*/
|
|
155
|
+
deleteUser = request => this.client.fetch({
|
|
156
|
+
method: 'DELETE',
|
|
157
|
+
path: `/iam/v1alpha1/users/${validatePathParam('userId', request.userId)}`
|
|
158
|
+
});
|
|
159
|
+
pageOfListApplications = (() => {
|
|
160
|
+
var _this5 = this;
|
|
161
|
+
return function (request) {
|
|
144
162
|
if (request === void 0) {
|
|
145
163
|
request = {};
|
|
146
164
|
}
|
|
147
|
-
return
|
|
165
|
+
return _this5.client.fetch({
|
|
148
166
|
method: 'GET',
|
|
149
167
|
path: `/iam/v1alpha1/applications`,
|
|
150
|
-
urlParams: urlParams(['application_ids', request.applicationIds], ['editable', request.editable], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId ??
|
|
168
|
+
urlParams: urlParams(['application_ids', request.applicationIds], ['editable', request.editable], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId ?? _this5.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this5.client.settings.defaultPageSize])
|
|
151
169
|
}, unmarshalListApplicationsResponse);
|
|
152
170
|
};
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
171
|
+
})();
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* List applications of an Organization. List the applications of an
|
|
175
|
+
* Organization. By default, the applications listed are ordered by creation
|
|
176
|
+
* date in ascending order. This can be modified via the `order_by` field. You
|
|
177
|
+
* must define the `organization_id` in the query path of your request. You
|
|
178
|
+
* can also define additional parameters for your query such as
|
|
179
|
+
* `application_ids`.
|
|
180
|
+
*
|
|
181
|
+
* @param request - The request {@link ListApplicationsRequest}
|
|
182
|
+
* @returns A Promise of ListApplicationsResponse
|
|
183
|
+
*/
|
|
184
|
+
listApplications = (() => {
|
|
185
|
+
var _this6 = this;
|
|
186
|
+
return function (request) {
|
|
165
187
|
if (request === void 0) {
|
|
166
188
|
request = {};
|
|
167
189
|
}
|
|
168
|
-
return enrichForPagination('applications',
|
|
190
|
+
return enrichForPagination('applications', _this6.pageOfListApplications, request);
|
|
169
191
|
};
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
192
|
+
})();
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Create a new application. Create a new application. You must define the
|
|
196
|
+
* `name` parameter in the request.
|
|
197
|
+
*
|
|
198
|
+
* @param request - The request {@link CreateApplicationRequest}
|
|
199
|
+
* @returns A Promise of Application
|
|
200
|
+
*/
|
|
201
|
+
createApplication = request => this.client.fetch({
|
|
202
|
+
body: JSON.stringify(marshalCreateApplicationRequest(request, this.client.settings)),
|
|
203
|
+
headers: jsonContentHeaders,
|
|
204
|
+
method: 'POST',
|
|
205
|
+
path: `/iam/v1alpha1/applications`
|
|
206
|
+
}, unmarshalApplication);
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Get a given application. Retrieve information about an application,
|
|
210
|
+
* specified by the `application_id` parameter. The application's full
|
|
211
|
+
* details, including `id`, `email`, `organization_id`, `status` and
|
|
212
|
+
* `two_factor_enabled` are returned in the response.
|
|
213
|
+
*
|
|
214
|
+
* @param request - The request {@link GetApplicationRequest}
|
|
215
|
+
* @returns A Promise of Application
|
|
216
|
+
*/
|
|
217
|
+
getApplication = request => this.client.fetch({
|
|
218
|
+
method: 'GET',
|
|
219
|
+
path: `/iam/v1alpha1/applications/${validatePathParam('applicationId', request.applicationId)}`
|
|
220
|
+
}, unmarshalApplication);
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Update an application. Update the parameters of an application, including
|
|
224
|
+
* `name` and `description`.
|
|
225
|
+
*
|
|
226
|
+
* @param request - The request {@link UpdateApplicationRequest}
|
|
227
|
+
* @returns A Promise of Application
|
|
228
|
+
*/
|
|
229
|
+
updateApplication = request => this.client.fetch({
|
|
230
|
+
body: JSON.stringify(marshalUpdateApplicationRequest(request, this.client.settings)),
|
|
231
|
+
headers: jsonContentHeaders,
|
|
232
|
+
method: 'PATCH',
|
|
233
|
+
path: `/iam/v1alpha1/applications/${validatePathParam('applicationId', request.applicationId)}`
|
|
234
|
+
}, unmarshalApplication);
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Delete an application. Delete an application. Note that this action is
|
|
238
|
+
* irreversible and will automatically delete the application's API keys.
|
|
239
|
+
* Policies attached to users and applications via this group will no longer
|
|
240
|
+
* apply.
|
|
241
|
+
*
|
|
242
|
+
* @param request - The request {@link DeleteApplicationRequest}
|
|
243
|
+
*/
|
|
244
|
+
deleteApplication = request => this.client.fetch({
|
|
245
|
+
method: 'DELETE',
|
|
246
|
+
path: `/iam/v1alpha1/applications/${validatePathParam('applicationId', request.applicationId)}`
|
|
247
|
+
});
|
|
248
|
+
pageOfListGroups = (() => {
|
|
249
|
+
var _this7 = this;
|
|
250
|
+
return function (request) {
|
|
222
251
|
if (request === void 0) {
|
|
223
252
|
request = {};
|
|
224
253
|
}
|
|
225
|
-
return
|
|
254
|
+
return _this7.client.fetch({
|
|
226
255
|
method: 'GET',
|
|
227
256
|
path: `/iam/v1alpha1/groups`,
|
|
228
|
-
urlParams: urlParams(['application_ids', request.applicationIds], ['group_ids', request.groupIds], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ??
|
|
257
|
+
urlParams: urlParams(['application_ids', request.applicationIds], ['group_ids', request.groupIds], ['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize], ['user_ids', request.userIds])
|
|
229
258
|
}, unmarshalListGroupsResponse);
|
|
230
259
|
};
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
260
|
+
})();
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* List groups. List groups. By default, the groups listed are ordered by
|
|
264
|
+
* creation date in ascending order. This can be modified via the `order_by`
|
|
265
|
+
* field. You can define additional parameters to filter your query. Use
|
|
266
|
+
* `user_ids` or `application_ids` to list all groups certain users or
|
|
267
|
+
* applications belong to.
|
|
268
|
+
*
|
|
269
|
+
* @param request - The request {@link ListGroupsRequest}
|
|
270
|
+
* @returns A Promise of ListGroupsResponse
|
|
271
|
+
*/
|
|
272
|
+
listGroups = (() => {
|
|
273
|
+
var _this8 = this;
|
|
274
|
+
return function (request) {
|
|
242
275
|
if (request === void 0) {
|
|
243
276
|
request = {};
|
|
244
277
|
}
|
|
245
|
-
return enrichForPagination('groups',
|
|
278
|
+
return enrichForPagination('groups', _this8.pageOfListGroups, request);
|
|
246
279
|
};
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
280
|
+
})();
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Create a group. Create a new group. You must define the `name` and
|
|
284
|
+
* `organization_id` parameters in the request.
|
|
285
|
+
*
|
|
286
|
+
* @param request - The request {@link CreateGroupRequest}
|
|
287
|
+
* @returns A Promise of Group
|
|
288
|
+
*/
|
|
289
|
+
createGroup = request => this.client.fetch({
|
|
290
|
+
body: JSON.stringify(marshalCreateGroupRequest(request, this.client.settings)),
|
|
291
|
+
headers: jsonContentHeaders,
|
|
292
|
+
method: 'POST',
|
|
293
|
+
path: `/iam/v1alpha1/groups`
|
|
294
|
+
}, unmarshalGroup);
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Get a group. Retrive information about a given group, specified by the
|
|
298
|
+
* `group_id` parameter. The group's full details, including `user_ids` and
|
|
299
|
+
* `application_ids` are returned in the response.
|
|
300
|
+
*
|
|
301
|
+
* @param request - The request {@link GetGroupRequest}
|
|
302
|
+
* @returns A Promise of Group
|
|
303
|
+
*/
|
|
304
|
+
getGroup = request => this.client.fetch({
|
|
305
|
+
method: 'GET',
|
|
306
|
+
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}`
|
|
307
|
+
}, unmarshalGroup);
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Update a group. Update the parameters of group, including `name` and
|
|
311
|
+
* `description`.
|
|
312
|
+
*
|
|
313
|
+
* @param request - The request {@link UpdateGroupRequest}
|
|
314
|
+
* @returns A Promise of Group
|
|
315
|
+
*/
|
|
316
|
+
updateGroup = request => this.client.fetch({
|
|
317
|
+
body: JSON.stringify(marshalUpdateGroupRequest(request, this.client.settings)),
|
|
318
|
+
headers: jsonContentHeaders,
|
|
319
|
+
method: 'PATCH',
|
|
320
|
+
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}`
|
|
321
|
+
}, unmarshalGroup);
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Overwrite users and applications of a group. Overwrite users and
|
|
325
|
+
* applications configuration in a group. Any information that you add using
|
|
326
|
+
* this command will overwrite the previous configuration.
|
|
327
|
+
*
|
|
328
|
+
* @param request - The request {@link SetGroupMembersRequest}
|
|
329
|
+
* @returns A Promise of Group
|
|
330
|
+
*/
|
|
331
|
+
setGroupMembers = request => this.client.fetch({
|
|
332
|
+
body: JSON.stringify(marshalSetGroupMembersRequest(request, this.client.settings)),
|
|
333
|
+
headers: jsonContentHeaders,
|
|
334
|
+
method: 'PUT',
|
|
335
|
+
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}/members`
|
|
336
|
+
}, unmarshalGroup);
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Add a user or an application to a group. Add a user or an application to a
|
|
340
|
+
* group. You can specify a `user_id` and and `application_id` in the body of
|
|
341
|
+
* your request. Note that you can only add one of each per request.
|
|
342
|
+
*
|
|
343
|
+
* @param request - The request {@link AddGroupMemberRequest}
|
|
344
|
+
* @returns A Promise of Group
|
|
345
|
+
*/
|
|
346
|
+
addGroupMember = request => this.client.fetch({
|
|
347
|
+
body: JSON.stringify(marshalAddGroupMemberRequest(request, this.client.settings)),
|
|
348
|
+
headers: jsonContentHeaders,
|
|
349
|
+
method: 'POST',
|
|
350
|
+
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}/add-member`
|
|
351
|
+
}, unmarshalGroup);
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Add multiple users and applications to a group. Add multiple users and
|
|
355
|
+
* applications to a group in a single call. You can specify an array of
|
|
356
|
+
* `user_id`s and `application_id`s. Note that any existing users and
|
|
357
|
+
* applications in the group will remain. To add new users/applications and
|
|
358
|
+
* delete pre-existing ones, use the [Overwrite users and applications of a
|
|
359
|
+
* group](#path-groups-overwrite-users-and-applications-of-a-group) method.
|
|
360
|
+
*
|
|
361
|
+
* @param request - The request {@link AddGroupMembersRequest}
|
|
362
|
+
* @returns A Promise of Group
|
|
363
|
+
*/
|
|
364
|
+
addGroupMembers = request => this.client.fetch({
|
|
365
|
+
body: JSON.stringify(marshalAddGroupMembersRequest(request, this.client.settings)),
|
|
366
|
+
headers: jsonContentHeaders,
|
|
367
|
+
method: 'POST',
|
|
368
|
+
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}/add-members`
|
|
369
|
+
}, unmarshalGroup);
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Remove a user or an application from a group. Remove a user or an
|
|
373
|
+
* application from a group. You can specify a `user_id` and and
|
|
374
|
+
* `application_id` in the body of your request. Note that you can only remove
|
|
375
|
+
* one of each per request. Removing a user from a group means that any
|
|
376
|
+
* permissions given to them via the group (i.e. from an attached policy) will
|
|
377
|
+
* no longer apply. Be sure you want to remove these permissions from the user
|
|
378
|
+
* before proceeding.
|
|
379
|
+
*
|
|
380
|
+
* @param request - The request {@link RemoveGroupMemberRequest}
|
|
381
|
+
* @returns A Promise of Group
|
|
382
|
+
*/
|
|
383
|
+
removeGroupMember = request => this.client.fetch({
|
|
384
|
+
body: JSON.stringify(marshalRemoveGroupMemberRequest(request, this.client.settings)),
|
|
385
|
+
headers: jsonContentHeaders,
|
|
386
|
+
method: 'POST',
|
|
387
|
+
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}/remove-member`
|
|
388
|
+
}, unmarshalGroup);
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Delete a group. Delete a group. Note that this action is irreversible and
|
|
392
|
+
* could delete permissions for group members. Policies attached to users and
|
|
393
|
+
* applications via this group will no longer apply.
|
|
394
|
+
*
|
|
395
|
+
* @param request - The request {@link DeleteGroupRequest}
|
|
396
|
+
*/
|
|
397
|
+
deleteGroup = request => this.client.fetch({
|
|
398
|
+
method: 'DELETE',
|
|
399
|
+
path: `/iam/v1alpha1/groups/${validatePathParam('groupId', request.groupId)}`
|
|
400
|
+
});
|
|
401
|
+
pageOfListPolicies = (() => {
|
|
402
|
+
var _this9 = this;
|
|
403
|
+
return function (request) {
|
|
360
404
|
if (request === void 0) {
|
|
361
405
|
request = {};
|
|
362
406
|
}
|
|
363
|
-
return
|
|
407
|
+
return _this9.client.fetch({
|
|
364
408
|
method: 'GET',
|
|
365
409
|
path: `/iam/v1alpha1/policies`,
|
|
366
|
-
urlParams: urlParams(['application_ids', request.applicationIds], ['editable', request.editable], ['group_ids', request.groupIds], ['no_principal', request.noPrincipal], ['order_by', request.orderBy ?? 'policy_name_asc'], ['organization_id', request.organizationId ??
|
|
410
|
+
urlParams: urlParams(['application_ids', request.applicationIds], ['editable', request.editable], ['group_ids', request.groupIds], ['no_principal', request.noPrincipal], ['order_by', request.orderBy ?? 'policy_name_asc'], ['organization_id', request.organizationId ?? _this9.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this9.client.settings.defaultPageSize], ['policy_name', request.policyName], ['user_ids', request.userIds])
|
|
367
411
|
}, unmarshalListPoliciesResponse);
|
|
368
412
|
};
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
413
|
+
})();
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* List policies of an Organization. List the policies of an Organization. By
|
|
417
|
+
* default, the policies listed are ordered by creation date in ascending
|
|
418
|
+
* order. This can be modified via the `order_by` field. You must define the
|
|
419
|
+
* `organization_id` in the query path of your request. You can also define
|
|
420
|
+
* additional parameters to filter your query, such as `user_ids`,
|
|
421
|
+
* `groups_ids`, `application_ids`, and `policy_name`.
|
|
422
|
+
*
|
|
423
|
+
* @param request - The request {@link ListPoliciesRequest}
|
|
424
|
+
* @returns A Promise of ListPoliciesResponse
|
|
425
|
+
*/
|
|
426
|
+
listPolicies = (() => {
|
|
427
|
+
var _this10 = this;
|
|
428
|
+
return function (request) {
|
|
381
429
|
if (request === void 0) {
|
|
382
430
|
request = {};
|
|
383
431
|
}
|
|
384
|
-
return enrichForPagination('policies',
|
|
432
|
+
return enrichForPagination('policies', _this10.pageOfListPolicies, request);
|
|
385
433
|
};
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
434
|
+
})();
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Create a new policy. Create a new application. You must define the `name`
|
|
438
|
+
* parameter in the request. You can specify parameters such as `user_id`,
|
|
439
|
+
* `groups_id`, `application_id`, `no_principal`, `rules` and its child
|
|
440
|
+
* attributes.
|
|
441
|
+
*
|
|
442
|
+
* @param request - The request {@link CreatePolicyRequest}
|
|
443
|
+
* @returns A Promise of Policy
|
|
444
|
+
*/
|
|
445
|
+
createPolicy = request => this.client.fetch({
|
|
446
|
+
body: JSON.stringify(marshalCreatePolicyRequest(request, this.client.settings)),
|
|
447
|
+
headers: jsonContentHeaders,
|
|
448
|
+
method: 'POST',
|
|
449
|
+
path: `/iam/v1alpha1/policies`
|
|
450
|
+
}, unmarshalPolicy);
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Get an existing policy. Retrieve information about a policy, speficified by
|
|
454
|
+
* the `policy_id` parameter. The policy's full details, including `id`,
|
|
455
|
+
* `name`, `organization_id`, `nb_rules` and `nb_scopes`, `nb_permission_sets`
|
|
456
|
+
* are returned in the response.
|
|
457
|
+
*
|
|
458
|
+
* @param request - The request {@link GetPolicyRequest}
|
|
459
|
+
* @returns A Promise of Policy
|
|
460
|
+
*/
|
|
461
|
+
getPolicy = request => this.client.fetch({
|
|
462
|
+
method: 'GET',
|
|
463
|
+
path: `/iam/v1alpha1/policies/${validatePathParam('policyId', request.policyId)}`
|
|
464
|
+
}, unmarshalPolicy);
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Update an existing policy. Update the parameters of a policy, including
|
|
468
|
+
* `name`, `description`, `user_id`, `group_id`, `application_id` and
|
|
469
|
+
* `no_principal`.
|
|
470
|
+
*
|
|
471
|
+
* @param request - The request {@link UpdatePolicyRequest}
|
|
472
|
+
* @returns A Promise of Policy
|
|
473
|
+
*/
|
|
474
|
+
updatePolicy = request => this.client.fetch({
|
|
475
|
+
body: JSON.stringify(marshalUpdatePolicyRequest(request, this.client.settings)),
|
|
476
|
+
headers: jsonContentHeaders,
|
|
477
|
+
method: 'PATCH',
|
|
478
|
+
path: `/iam/v1alpha1/policies/${validatePathParam('policyId', request.policyId)}`
|
|
479
|
+
}, unmarshalPolicy);
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Delete a policy. Delete a policy. You must define specify the `policy_id`
|
|
483
|
+
* parameter in your request. Note that when deleting a policy, all
|
|
484
|
+
* permissions it gives to its principal (user, group or application) will be
|
|
485
|
+
* revoked.
|
|
486
|
+
*
|
|
487
|
+
* @param request - The request {@link DeletePolicyRequest}
|
|
488
|
+
*/
|
|
489
|
+
deletePolicy = request => this.client.fetch({
|
|
490
|
+
method: 'DELETE',
|
|
491
|
+
path: `/iam/v1alpha1/policies/${validatePathParam('policyId', request.policyId)}`
|
|
492
|
+
});
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Clone a policy. Clone a policy. You must define specify the `policy_id`
|
|
496
|
+
* parameter in your request.
|
|
497
|
+
*
|
|
498
|
+
* @param request - The request {@link ClonePolicyRequest}
|
|
499
|
+
* @returns A Promise of Policy
|
|
500
|
+
*/
|
|
501
|
+
clonePolicy = request => this.client.fetch({
|
|
502
|
+
body: '{}',
|
|
503
|
+
headers: jsonContentHeaders,
|
|
504
|
+
method: 'POST',
|
|
505
|
+
path: `/iam/v1alpha1/policies/${validatePathParam('policyId', request.policyId)}/clone`
|
|
506
|
+
}, unmarshalPolicy);
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Set rules of a given policy. Overwrite the rules of a given policy. Any
|
|
510
|
+
* information that you add using this command will overwrite the previous
|
|
511
|
+
* configuration. If you include some of the rules you already had in your
|
|
512
|
+
* previous configuration in your new one, but you change their order, the new
|
|
513
|
+
* order of display will apply. While policy rules are ordered, they have no
|
|
514
|
+
* impact on the access logic of IAM because rules are allow-only.
|
|
515
|
+
*
|
|
516
|
+
* @param request - The request {@link SetRulesRequest}
|
|
517
|
+
* @returns A Promise of SetRulesResponse
|
|
518
|
+
*/
|
|
519
|
+
setRules = request => this.client.fetch({
|
|
520
|
+
body: JSON.stringify(marshalSetRulesRequest(request, this.client.settings)),
|
|
521
|
+
headers: jsonContentHeaders,
|
|
522
|
+
method: 'PUT',
|
|
523
|
+
path: `/iam/v1alpha1/rules`
|
|
524
|
+
}, unmarshalSetRulesResponse);
|
|
525
|
+
pageOfListRules = request => this.client.fetch({
|
|
526
|
+
method: 'GET',
|
|
527
|
+
path: `/iam/v1alpha1/rules`,
|
|
528
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['policy_id', request.policyId])
|
|
529
|
+
}, unmarshalListRulesResponse);
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* List rules of a given policy. List the rules of a given policy. By default,
|
|
533
|
+
* the rules listed are ordered by creation date in ascending order. This can
|
|
534
|
+
* be modified via the `order_by` field. You must define the `policy_id` in
|
|
535
|
+
* the query path of your request.
|
|
536
|
+
*
|
|
537
|
+
* @param request - The request {@link ListRulesRequest}
|
|
538
|
+
* @returns A Promise of ListRulesResponse
|
|
539
|
+
*/
|
|
540
|
+
listRules = request => enrichForPagination('rules', this.pageOfListRules, request);
|
|
541
|
+
pageOfListPermissionSets = (() => {
|
|
542
|
+
var _this11 = this;
|
|
543
|
+
return function (request) {
|
|
486
544
|
if (request === void 0) {
|
|
487
545
|
request = {};
|
|
488
546
|
}
|
|
489
|
-
return
|
|
547
|
+
return _this11.client.fetch({
|
|
490
548
|
method: 'GET',
|
|
491
549
|
path: `/iam/v1alpha1/permission-sets`,
|
|
492
|
-
urlParams: urlParams(['order_by', request.orderBy ?? 'name_asc'], ['organization_id', request.organizationId ??
|
|
550
|
+
urlParams: urlParams(['order_by', request.orderBy ?? 'name_asc'], ['organization_id', request.organizationId ?? _this11.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this11.client.settings.defaultPageSize])
|
|
493
551
|
}, unmarshalListPermissionSetsResponse);
|
|
494
552
|
};
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
553
|
+
})();
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* List permission sets. List permission sets available for given
|
|
557
|
+
* Organization. You must define the `organization_id` in the query path of
|
|
558
|
+
* your request.
|
|
559
|
+
*
|
|
560
|
+
* @param request - The request {@link ListPermissionSetsRequest}
|
|
561
|
+
* @returns A Promise of ListPermissionSetsResponse
|
|
562
|
+
*/
|
|
563
|
+
listPermissionSets = (() => {
|
|
564
|
+
var _this12 = this;
|
|
565
|
+
return function (request) {
|
|
504
566
|
if (request === void 0) {
|
|
505
567
|
request = {};
|
|
506
568
|
}
|
|
507
|
-
return enrichForPagination('permissionSets',
|
|
569
|
+
return enrichForPagination('permissionSets', _this12.pageOfListPermissionSets, request);
|
|
508
570
|
};
|
|
509
|
-
|
|
571
|
+
})();
|
|
572
|
+
pageOfListAPIKeys = (() => {
|
|
573
|
+
var _this13 = this;
|
|
574
|
+
return function (request) {
|
|
510
575
|
if (request === void 0) {
|
|
511
576
|
request = {};
|
|
512
577
|
}
|
|
513
|
-
return
|
|
578
|
+
return _this13.client.fetch({
|
|
514
579
|
method: 'GET',
|
|
515
580
|
path: `/iam/v1alpha1/api-keys`,
|
|
516
|
-
urlParams: urlParams(['access_key', request.accessKey], ['bearer_id', request.bearerId], ['bearer_type', request.bearerType ?? 'unknown_bearer_type'], ['description', request.description], ['editable', request.editable], ['expired', request.expired], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId ??
|
|
581
|
+
urlParams: urlParams(['access_key', request.accessKey], ['bearer_id', request.bearerId], ['bearer_type', request.bearerType ?? 'unknown_bearer_type'], ['description', request.description], ['editable', request.editable], ['expired', request.expired], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId ?? _this13.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this13.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
|
|
517
582
|
param: 'application_id',
|
|
518
583
|
value: request.applicationId
|
|
519
584
|
}, {
|
|
@@ -522,148 +587,167 @@ class API extends API$1 {
|
|
|
522
587
|
}])))
|
|
523
588
|
}, unmarshalListAPIKeysResponse);
|
|
524
589
|
};
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
590
|
+
})();
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* List API keys. List API keys. By default, the API keys listed are ordered
|
|
594
|
+
* by creation date in ascending order. This can be modified via the
|
|
595
|
+
* `order_by` field. You can define additional parameters for your query such
|
|
596
|
+
* as `editable`, `expired`, `access_key` and `bearer_id`.
|
|
597
|
+
*
|
|
598
|
+
* @param request - The request {@link ListAPIKeysRequest}
|
|
599
|
+
* @returns A Promise of ListAPIKeysResponse
|
|
600
|
+
*/
|
|
601
|
+
listAPIKeys = (() => {
|
|
602
|
+
var _this14 = this;
|
|
603
|
+
return function (request) {
|
|
535
604
|
if (request === void 0) {
|
|
536
605
|
request = {};
|
|
537
606
|
}
|
|
538
|
-
return enrichForPagination('apiKeys',
|
|
607
|
+
return enrichForPagination('apiKeys', _this14.pageOfListAPIKeys, request);
|
|
539
608
|
};
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
609
|
+
})();
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Create an API key. Create an API key. You must specify the `application_id`
|
|
613
|
+
* or the `user_id` and the description. You can also specify the
|
|
614
|
+
* `default_project_id` which is the Project ID of your preferred Project, to
|
|
615
|
+
* use with Object Storage. The `access_key` and `secret_key` values are
|
|
616
|
+
* returned in the response. Note that he secret key is only showed once. Make
|
|
617
|
+
* sure that you copy and store both keys somewhere safe.
|
|
618
|
+
*
|
|
619
|
+
* @param request - The request {@link CreateAPIKeyRequest}
|
|
620
|
+
* @returns A Promise of APIKey
|
|
621
|
+
*/
|
|
622
|
+
createAPIKey = request => this.client.fetch({
|
|
623
|
+
body: JSON.stringify(marshalCreateAPIKeyRequest(request, this.client.settings)),
|
|
624
|
+
headers: jsonContentHeaders,
|
|
625
|
+
method: 'POST',
|
|
626
|
+
path: `/iam/v1alpha1/api-keys`
|
|
627
|
+
}, unmarshalAPIKey);
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Get an API key. Retrive information about an API key, specified by the
|
|
631
|
+
* `access_key` parameter. The API key's details, including either the
|
|
632
|
+
* `user_id` or `application_id` of its bearer are returned in the response.
|
|
633
|
+
* Note that the string value for the `secret_key` is nullable, and therefore
|
|
634
|
+
* is not displayed in the response. The `secret_key` value is only displayed
|
|
635
|
+
* upon API key creation.
|
|
636
|
+
*
|
|
637
|
+
* @param request - The request {@link GetAPIKeyRequest}
|
|
638
|
+
* @returns A Promise of APIKey
|
|
639
|
+
*/
|
|
640
|
+
getAPIKey = request => this.client.fetch({
|
|
641
|
+
method: 'GET',
|
|
642
|
+
path: `/iam/v1alpha1/api-keys/${validatePathParam('accessKey', request.accessKey)}`
|
|
643
|
+
}, unmarshalAPIKey);
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Update an API key. Update the parameters of an API key, including
|
|
647
|
+
* `default_project_id` and `description`.
|
|
648
|
+
*
|
|
649
|
+
* @param request - The request {@link UpdateAPIKeyRequest}
|
|
650
|
+
* @returns A Promise of APIKey
|
|
651
|
+
*/
|
|
652
|
+
updateAPIKey = request => this.client.fetch({
|
|
653
|
+
body: JSON.stringify(marshalUpdateAPIKeyRequest(request, this.client.settings)),
|
|
654
|
+
headers: jsonContentHeaders,
|
|
655
|
+
method: 'PATCH',
|
|
656
|
+
path: `/iam/v1alpha1/api-keys/${validatePathParam('accessKey', request.accessKey)}`
|
|
657
|
+
}, unmarshalAPIKey);
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Delete an API key. Delete an API key. Note that this action is irreversible
|
|
661
|
+
* and cannot be undone. Make sure you update any configurations using the API
|
|
662
|
+
* keys you delete.
|
|
663
|
+
*
|
|
664
|
+
* @param request - The request {@link DeleteAPIKeyRequest}
|
|
665
|
+
*/
|
|
666
|
+
deleteAPIKey = request => this.client.fetch({
|
|
667
|
+
method: 'DELETE',
|
|
668
|
+
path: `/iam/v1alpha1/api-keys/${validatePathParam('accessKey', request.accessKey)}`
|
|
669
|
+
});
|
|
670
|
+
pageOfListQuota = (() => {
|
|
671
|
+
var _this15 = this;
|
|
672
|
+
return function (request) {
|
|
597
673
|
if (request === void 0) {
|
|
598
674
|
request = {};
|
|
599
675
|
}
|
|
600
|
-
return
|
|
676
|
+
return _this15.client.fetch({
|
|
601
677
|
method: 'GET',
|
|
602
678
|
path: `/iam/v1alpha1/quota`,
|
|
603
|
-
urlParams: urlParams(['order_by', request.orderBy ?? 'name_asc'], ['organization_id', request.organizationId ??
|
|
679
|
+
urlParams: urlParams(['order_by', request.orderBy ?? 'name_asc'], ['organization_id', request.organizationId ?? _this15.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this15.client.settings.defaultPageSize])
|
|
604
680
|
}, unmarshalListQuotaResponse);
|
|
605
681
|
};
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
682
|
+
})();
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* List all quotas in the Organization. List all product and features quota
|
|
686
|
+
* for an Organization, with their associated limits. By default, the quota
|
|
687
|
+
* listed are ordered by creation date in ascending order. This can be
|
|
688
|
+
* modified via the `order_by` field. You must define the `organization_id` in
|
|
689
|
+
* the query path of your request.
|
|
690
|
+
*
|
|
691
|
+
* @param request - The request {@link ListQuotaRequest}
|
|
692
|
+
* @returns A Promise of ListQuotaResponse
|
|
693
|
+
*/
|
|
694
|
+
listQuota = (() => {
|
|
695
|
+
var _this16 = this;
|
|
696
|
+
return function (request) {
|
|
617
697
|
if (request === void 0) {
|
|
618
698
|
request = {};
|
|
619
699
|
}
|
|
620
|
-
return enrichForPagination('quota',
|
|
700
|
+
return enrichForPagination('quota', _this16.pageOfListQuota, request);
|
|
621
701
|
};
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
702
|
+
})();
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* Get a quota in the Organization. Retrieve information about a resource
|
|
706
|
+
* quota, speficified by the `quotum_name` parameter. The quota's `limit`, or
|
|
707
|
+
* whether it is unlimited, is returned in the response.
|
|
708
|
+
*
|
|
709
|
+
* @param request - The request {@link GetQuotumRequest}
|
|
710
|
+
* @returns A Promise of Quotum
|
|
711
|
+
*/
|
|
712
|
+
getQuotum = request => this.client.fetch({
|
|
713
|
+
method: 'GET',
|
|
714
|
+
path: `/iam/v1alpha1/quota/${validatePathParam('quotumName', request.quotumName)}`,
|
|
715
|
+
urlParams: urlParams(['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId])
|
|
716
|
+
}, unmarshalQuotum);
|
|
717
|
+
pageOfListJWTs = request => this.client.fetch({
|
|
718
|
+
method: 'GET',
|
|
719
|
+
path: `/iam/v1alpha1/jwts`,
|
|
720
|
+
urlParams: urlParams(['audience_id', request.audienceId], ['expired', request.expired], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
721
|
+
}, unmarshalListJWTsResponse);
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* List JWTs.
|
|
725
|
+
*
|
|
726
|
+
* @param request - The request {@link ListJWTsRequest}
|
|
727
|
+
* @returns A Promise of ListJWTsResponse
|
|
728
|
+
*/
|
|
729
|
+
listJWTs = request => enrichForPagination('jwts', this.pageOfListJWTs, request);
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Get a JWT.
|
|
733
|
+
*
|
|
734
|
+
* @param request - The request {@link GetJWTRequest}
|
|
735
|
+
* @returns A Promise of JWT
|
|
736
|
+
*/
|
|
737
|
+
getJWT = request => this.client.fetch({
|
|
738
|
+
method: 'GET',
|
|
739
|
+
path: `/iam/v1alpha1/jwts/${validatePathParam('jti', request.jti)}`
|
|
740
|
+
}, unmarshalJWT);
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Delete a JWT.
|
|
744
|
+
*
|
|
745
|
+
* @param request - The request {@link DeleteJWTRequest}
|
|
746
|
+
*/
|
|
747
|
+
deleteJWT = request => this.client.fetch({
|
|
748
|
+
method: 'DELETE',
|
|
749
|
+
path: `/iam/v1alpha1/jwts/${validatePathParam('jti', request.jti)}`
|
|
750
|
+
});
|
|
667
751
|
}
|
|
668
752
|
|
|
669
753
|
export { API };
|