@scaleway/sdk-iam 1.5.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1185 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const sdkClient = require("@scaleway/sdk-client");
4
- const marshalling_gen = require("./marshalling.gen.cjs");
5
- const jsonContentHeaders = {
6
- "Content-Type": "application/json; charset=utf-8"
7
- };
8
- class API extends sdkClient.API {
9
- pageOfListSSHKeys = (request = {}) => this.client.fetch(
10
- {
11
- method: "GET",
12
- path: `/iam/v1alpha1/ssh-keys`,
13
- urlParams: sdkClient.urlParams(
14
- ["disabled", request.disabled],
15
- ["name", request.name],
16
- ["order_by", request.orderBy],
17
- ["organization_id", request.organizationId],
18
- ["page", request.page],
19
- [
20
- "page_size",
21
- request.pageSize ?? this.client.settings.defaultPageSize
22
- ],
23
- ["project_id", request.projectId]
24
- )
25
- },
26
- marshalling_gen.unmarshalListSSHKeysResponse
27
- );
28
- /**
29
- * List SSH keys. List SSH keys. By default, the SSH keys listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You can define additional parameters for your query such as `organization_id`, `name`, `project_id` and `disabled`.
30
- *
31
- * @param request - The request {@link ListSSHKeysRequest}
32
- * @returns A Promise of ListSSHKeysResponse
33
- */
34
- listSSHKeys = (request = {}) => sdkClient.enrichForPagination("sshKeys", this.pageOfListSSHKeys, request);
35
- /**
36
- * Create an SSH key. Add a new SSH key to a Scaleway Project. You must specify the `name`, `public_key` and `project_id`.
37
- *
38
- * @param request - The request {@link CreateSSHKeyRequest}
39
- * @returns A Promise of SSHKey
40
- */
41
- createSSHKey = (request) => this.client.fetch(
42
- {
43
- body: JSON.stringify(
44
- marshalling_gen.marshalCreateSSHKeyRequest(request, this.client.settings)
45
- ),
46
- headers: jsonContentHeaders,
47
- method: "POST",
48
- path: `/iam/v1alpha1/ssh-keys`
49
- },
50
- marshalling_gen.unmarshalSSHKey
51
- );
52
- /**
53
- * Get an SSH key. Retrieve information about a given SSH key, specified by the `ssh_key_id` parameter. The SSH key's full details, including `id`, `name`, `public_key`, and `project_id` are returned in the response.
54
- *
55
- * @param request - The request {@link GetSSHKeyRequest}
56
- * @returns A Promise of SSHKey
57
- */
58
- getSSHKey = (request) => this.client.fetch(
59
- {
60
- method: "GET",
61
- path: `/iam/v1alpha1/ssh-keys/${sdkClient.validatePathParam("sshKeyId", request.sshKeyId)}`
62
- },
63
- marshalling_gen.unmarshalSSHKey
64
- );
65
- /**
66
- * Update an SSH key. Update the parameters of an SSH key, including `name` and `disable`.
67
- *
68
- * @param request - The request {@link UpdateSSHKeyRequest}
69
- * @returns A Promise of SSHKey
70
- */
71
- updateSSHKey = (request) => this.client.fetch(
72
- {
73
- body: JSON.stringify(
74
- marshalling_gen.marshalUpdateSSHKeyRequest(request, this.client.settings)
75
- ),
76
- headers: jsonContentHeaders,
77
- method: "PATCH",
78
- path: `/iam/v1alpha1/ssh-keys/${sdkClient.validatePathParam("sshKeyId", request.sshKeyId)}`
79
- },
80
- marshalling_gen.unmarshalSSHKey
81
- );
82
- /**
83
- * Delete an SSH key. Delete a given SSH key, specified by the `ssh_key_id`. Deleting an SSH is permanent, and cannot be undone. Note that you might need to update any configurations that used the SSH key.
84
- *
85
- * @param request - The request {@link DeleteSSHKeyRequest}
86
- */
87
- deleteSSHKey = (request) => this.client.fetch({
88
- method: "DELETE",
89
- path: `/iam/v1alpha1/ssh-keys/${sdkClient.validatePathParam("sshKeyId", request.sshKeyId)}`
90
- });
91
- pageOfListUsers = (request = {}) => this.client.fetch(
92
- {
93
- method: "GET",
94
- path: `/iam/v1alpha1/users`,
95
- urlParams: sdkClient.urlParams(
96
- ["mfa", request.mfa],
97
- ["order_by", request.orderBy],
98
- [
99
- "organization_id",
100
- request.organizationId ?? this.client.settings.defaultOrganizationId
101
- ],
102
- ["page", request.page],
103
- [
104
- "page_size",
105
- request.pageSize ?? this.client.settings.defaultPageSize
106
- ],
107
- ["tag", request.tag],
108
- ["type", request.type],
109
- ["user_ids", request.userIds]
110
- )
111
- },
112
- marshalling_gen.unmarshalListUsersResponse
113
- );
114
- /**
115
- * List users of an Organization. List the users of an Organization. By default, the users listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You must define the `organization_id` in the query path of your request. You can also define additional parameters for your query such as `user_ids`.
116
- *
117
- * @param request - The request {@link ListUsersRequest}
118
- * @returns A Promise of ListUsersResponse
119
- */
120
- listUsers = (request = {}) => sdkClient.enrichForPagination("users", this.pageOfListUsers, request);
121
- /**
122
- * Get a given user. Retrieve information about a user, specified by the `user_id` parameter. The user's full details, including `id`, `email`, `organization_id`, `status` and `mfa` are returned in the response.
123
- *
124
- * @param request - The request {@link GetUserRequest}
125
- * @returns A Promise of User
126
- */
127
- getUser = (request) => this.client.fetch(
128
- {
129
- method: "GET",
130
- path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}`
131
- },
132
- marshalling_gen.unmarshalUser
133
- );
134
- /**
135
- * Update a user. Update the parameters of a user, including `tags`.
136
- *
137
- * @param request - The request {@link UpdateUserRequest}
138
- * @returns A Promise of User
139
- */
140
- updateUser = (request) => this.client.fetch(
141
- {
142
- body: JSON.stringify(
143
- marshalling_gen.marshalUpdateUserRequest(request, this.client.settings)
144
- ),
145
- headers: jsonContentHeaders,
146
- method: "PATCH",
147
- path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}`
148
- },
149
- marshalling_gen.unmarshalUser
150
- );
151
- /**
152
- * Delete a guest user from an Organization. Remove a user from an Organization in which they are a guest. You must define the `user_id` in your request. Note that removing a user from an Organization automatically deletes their API keys, and any policies directly attached to them become orphaned.
153
- *
154
- * @param request - The request {@link DeleteUserRequest}
155
- */
156
- deleteUser = (request) => this.client.fetch({
157
- method: "DELETE",
158
- path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}`
159
- });
160
- /**
161
- * Create a new user. Create a new user. You must define the `organization_id` in your request. If you are adding a member, enter the member's details. If you are adding a guest, you must define the `email` and not add the member attribute.
162
- *
163
- * @param request - The request {@link CreateUserRequest}
164
- * @returns A Promise of User
165
- */
166
- createUser = (request = {}) => this.client.fetch(
167
- {
168
- body: JSON.stringify(
169
- marshalling_gen.marshalCreateUserRequest(request, this.client.settings)
170
- ),
171
- headers: jsonContentHeaders,
172
- method: "POST",
173
- path: `/iam/v1alpha1/users`
174
- },
175
- marshalling_gen.unmarshalUser
176
- );
177
- /**
178
- * Update an user's username.. Update an user's username.
179
- *
180
- * @param request - The request {@link UpdateUserUsernameRequest}
181
- * @returns A Promise of User
182
- */
183
- updateUserUsername = (request) => this.client.fetch(
184
- {
185
- body: JSON.stringify(
186
- marshalling_gen.marshalUpdateUserUsernameRequest(request, this.client.settings)
187
- ),
188
- headers: jsonContentHeaders,
189
- method: "POST",
190
- path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}/update-username`
191
- },
192
- marshalling_gen.unmarshalUser
193
- );
194
- /**
195
- * Update an user's password.. Update an user's password.
196
- *
197
- * @param request - The request {@link UpdateUserPasswordRequest}
198
- * @returns A Promise of User
199
- */
200
- updateUserPassword = (request) => this.client.fetch(
201
- {
202
- body: JSON.stringify(
203
- marshalling_gen.marshalUpdateUserPasswordRequest(request, this.client.settings)
204
- ),
205
- headers: jsonContentHeaders,
206
- method: "POST",
207
- path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}/update-password`
208
- },
209
- marshalling_gen.unmarshalUser
210
- );
211
- /**
212
- * Create a MFA OTP.. Create a MFA OTP.
213
- *
214
- * @param request - The request {@link CreateUserMFAOTPRequest}
215
- * @returns A Promise of MFAOTP
216
- */
217
- createUserMFAOTP = (request) => this.client.fetch(
218
- {
219
- body: "{}",
220
- headers: jsonContentHeaders,
221
- method: "POST",
222
- path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}/mfa-otp`
223
- },
224
- marshalling_gen.unmarshalMFAOTP
225
- );
226
- /**
227
- * Validate a MFA OTP.. Validate a MFA OTP.
228
- *
229
- * @param request - The request {@link ValidateUserMFAOTPRequest}
230
- * @returns A Promise of ValidateUserMFAOTPResponse
231
- */
232
- validateUserMFAOTP = (request) => this.client.fetch(
233
- {
234
- body: JSON.stringify(
235
- marshalling_gen.marshalValidateUserMFAOTPRequest(request, this.client.settings)
236
- ),
237
- headers: jsonContentHeaders,
238
- method: "POST",
239
- path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}/validate-mfa-otp`
240
- },
241
- marshalling_gen.unmarshalValidateUserMFAOTPResponse
242
- );
243
- /**
244
- * Delete a MFA OTP.. Delete a MFA OTP.
245
- *
246
- * @param request - The request {@link DeleteUserMFAOTPRequest}
247
- */
248
- deleteUserMFAOTP = (request) => this.client.fetch({
249
- body: "{}",
250
- headers: jsonContentHeaders,
251
- method: "DELETE",
252
- path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}/mfa-otp`
253
- });
254
- /**
255
- * Lock a member. Lock a member. A locked member cannot log in or use API keys until the locked status is removed.
256
- *
257
- * @param request - The request {@link LockUserRequest}
258
- * @returns A Promise of User
259
- */
260
- lockUser = (request) => this.client.fetch(
261
- {
262
- body: "{}",
263
- headers: jsonContentHeaders,
264
- method: "POST",
265
- path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}/lock`
266
- },
267
- marshalling_gen.unmarshalUser
268
- );
269
- /**
270
- * Unlock a member.
271
- *
272
- * @param request - The request {@link UnlockUserRequest}
273
- * @returns A Promise of User
274
- */
275
- unlockUser = (request) => this.client.fetch(
276
- {
277
- body: "{}",
278
- headers: jsonContentHeaders,
279
- method: "POST",
280
- path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}/unlock`
281
- },
282
- marshalling_gen.unmarshalUser
283
- );
284
- /**
285
- * List grace periods of a member. List the grace periods of a member.
286
- *
287
- * @param request - The request {@link ListGracePeriodsRequest}
288
- * @returns A Promise of ListGracePeriodsResponse
289
- */
290
- listGracePeriods = (request = {}) => this.client.fetch(
291
- {
292
- method: "GET",
293
- path: `/iam/v1alpha1/grace-periods`,
294
- urlParams: sdkClient.urlParams(["user_id", request.userId])
295
- },
296
- marshalling_gen.unmarshalListGracePeriodsResponse
297
- );
298
- getUserConnections = (request) => this.client.fetch(
299
- {
300
- method: "GET",
301
- path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}/connections`
302
- },
303
- marshalling_gen.unmarshalGetUserConnectionsResponse
304
- );
305
- initiateUserConnection = (request) => this.client.fetch(
306
- {
307
- body: "{}",
308
- headers: jsonContentHeaders,
309
- method: "POST",
310
- path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}/initiate-connection`
311
- },
312
- marshalling_gen.unmarshalInitiateUserConnectionResponse
313
- );
314
- joinUserConnection = (request) => this.client.fetch({
315
- body: JSON.stringify(
316
- marshalling_gen.marshalJoinUserConnectionRequest(request, this.client.settings)
317
- ),
318
- headers: jsonContentHeaders,
319
- method: "POST",
320
- path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}/join-connection`
321
- });
322
- removeUserConnection = (request) => this.client.fetch({
323
- body: JSON.stringify(
324
- marshalling_gen.marshalRemoveUserConnectionRequest(request, this.client.settings)
325
- ),
326
- headers: jsonContentHeaders,
327
- method: "POST",
328
- path: `/iam/v1alpha1/users/${sdkClient.validatePathParam("userId", request.userId)}/remove-connection`
329
- });
330
- pageOfListApplications = (request = {}) => this.client.fetch(
331
- {
332
- method: "GET",
333
- path: `/iam/v1alpha1/applications`,
334
- urlParams: sdkClient.urlParams(
335
- ["application_ids", request.applicationIds],
336
- ["editable", request.editable],
337
- ["name", request.name],
338
- ["order_by", request.orderBy],
339
- [
340
- "organization_id",
341
- request.organizationId ?? this.client.settings.defaultOrganizationId
342
- ],
343
- ["page", request.page],
344
- [
345
- "page_size",
346
- request.pageSize ?? this.client.settings.defaultPageSize
347
- ],
348
- ["tag", request.tag]
349
- )
350
- },
351
- marshalling_gen.unmarshalListApplicationsResponse
352
- );
353
- /**
354
- * List applications of an Organization. List the applications of an Organization. By default, the applications listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You must define the `organization_id` in the query path of your request. You can also define additional parameters for your query such as `application_ids`.
355
- *
356
- * @param request - The request {@link ListApplicationsRequest}
357
- * @returns A Promise of ListApplicationsResponse
358
- */
359
- listApplications = (request = {}) => sdkClient.enrichForPagination("applications", this.pageOfListApplications, request);
360
- /**
361
- * Create a new application. Create a new application. You must define the `name` parameter in the request.
362
- *
363
- * @param request - The request {@link CreateApplicationRequest}
364
- * @returns A Promise of Application
365
- */
366
- createApplication = (request) => this.client.fetch(
367
- {
368
- body: JSON.stringify(
369
- marshalling_gen.marshalCreateApplicationRequest(request, this.client.settings)
370
- ),
371
- headers: jsonContentHeaders,
372
- method: "POST",
373
- path: `/iam/v1alpha1/applications`
374
- },
375
- marshalling_gen.unmarshalApplication
376
- );
377
- /**
378
- * Get a given application. Retrieve information about an application, specified by the `application_id` parameter. The application's full details, including `id`, `email`, `organization_id`, `status` and `two_factor_enabled` are returned in the response.
379
- *
380
- * @param request - The request {@link GetApplicationRequest}
381
- * @returns A Promise of Application
382
- */
383
- getApplication = (request) => this.client.fetch(
384
- {
385
- method: "GET",
386
- path: `/iam/v1alpha1/applications/${sdkClient.validatePathParam("applicationId", request.applicationId)}`
387
- },
388
- marshalling_gen.unmarshalApplication
389
- );
390
- /**
391
- * Update an application. Update the parameters of an application, including `name` and `description`.
392
- *
393
- * @param request - The request {@link UpdateApplicationRequest}
394
- * @returns A Promise of Application
395
- */
396
- updateApplication = (request) => this.client.fetch(
397
- {
398
- body: JSON.stringify(
399
- marshalling_gen.marshalUpdateApplicationRequest(request, this.client.settings)
400
- ),
401
- headers: jsonContentHeaders,
402
- method: "PATCH",
403
- path: `/iam/v1alpha1/applications/${sdkClient.validatePathParam("applicationId", request.applicationId)}`
404
- },
405
- marshalling_gen.unmarshalApplication
406
- );
407
- /**
408
- * Delete an application. Delete an application. Note that this action is irreversible and will automatically delete the application's API keys. Policies attached to users and applications via this group will no longer apply.
409
- *
410
- * @param request - The request {@link DeleteApplicationRequest}
411
- */
412
- deleteApplication = (request) => this.client.fetch({
413
- method: "DELETE",
414
- path: `/iam/v1alpha1/applications/${sdkClient.validatePathParam("applicationId", request.applicationId)}`
415
- });
416
- pageOfListGroups = (request = {}) => this.client.fetch(
417
- {
418
- method: "GET",
419
- path: `/iam/v1alpha1/groups`,
420
- urlParams: sdkClient.urlParams(
421
- ["application_ids", request.applicationIds],
422
- ["group_ids", request.groupIds],
423
- ["name", request.name],
424
- ["order_by", request.orderBy],
425
- [
426
- "organization_id",
427
- request.organizationId ?? this.client.settings.defaultOrganizationId
428
- ],
429
- ["page", request.page],
430
- [
431
- "page_size",
432
- request.pageSize ?? this.client.settings.defaultPageSize
433
- ],
434
- ["tag", request.tag],
435
- ["user_ids", request.userIds]
436
- )
437
- },
438
- marshalling_gen.unmarshalListGroupsResponse
439
- );
440
- /**
441
- * List groups. List groups. By default, the groups listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You can define additional parameters to filter your query. Use `user_ids` or `application_ids` to list all groups certain users or applications belong to.
442
- *
443
- * @param request - The request {@link ListGroupsRequest}
444
- * @returns A Promise of ListGroupsResponse
445
- */
446
- listGroups = (request = {}) => sdkClient.enrichForPagination("groups", this.pageOfListGroups, request);
447
- /**
448
- * Create a group. Create a new group. You must define the `name` and `organization_id` parameters in the request.
449
- *
450
- * @param request - The request {@link CreateGroupRequest}
451
- * @returns A Promise of Group
452
- */
453
- createGroup = (request) => this.client.fetch(
454
- {
455
- body: JSON.stringify(
456
- marshalling_gen.marshalCreateGroupRequest(request, this.client.settings)
457
- ),
458
- headers: jsonContentHeaders,
459
- method: "POST",
460
- path: `/iam/v1alpha1/groups`
461
- },
462
- marshalling_gen.unmarshalGroup
463
- );
464
- /**
465
- * Get a group. Retrieve information about a given group, specified by the `group_id` parameter. The group's full details, including `user_ids` and `application_ids` are returned in the response.
466
- *
467
- * @param request - The request {@link GetGroupRequest}
468
- * @returns A Promise of Group
469
- */
470
- getGroup = (request) => this.client.fetch(
471
- {
472
- method: "GET",
473
- path: `/iam/v1alpha1/groups/${sdkClient.validatePathParam("groupId", request.groupId)}`
474
- },
475
- marshalling_gen.unmarshalGroup
476
- );
477
- /**
478
- * Update a group. Update the parameters of group, including `name` and `description`.
479
- *
480
- * @param request - The request {@link UpdateGroupRequest}
481
- * @returns A Promise of Group
482
- */
483
- updateGroup = (request) => this.client.fetch(
484
- {
485
- body: JSON.stringify(
486
- marshalling_gen.marshalUpdateGroupRequest(request, this.client.settings)
487
- ),
488
- headers: jsonContentHeaders,
489
- method: "PATCH",
490
- path: `/iam/v1alpha1/groups/${sdkClient.validatePathParam("groupId", request.groupId)}`
491
- },
492
- marshalling_gen.unmarshalGroup
493
- );
494
- /**
495
- * Overwrite users and applications of a group. Overwrite users and applications configuration in a group. Any information that you add using this command will overwrite the previous configuration.
496
- *
497
- * @param request - The request {@link SetGroupMembersRequest}
498
- * @returns A Promise of Group
499
- */
500
- setGroupMembers = (request) => this.client.fetch(
501
- {
502
- body: JSON.stringify(
503
- marshalling_gen.marshalSetGroupMembersRequest(request, this.client.settings)
504
- ),
505
- headers: jsonContentHeaders,
506
- method: "PUT",
507
- path: `/iam/v1alpha1/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/members`
508
- },
509
- marshalling_gen.unmarshalGroup
510
- );
511
- /**
512
- * Add a user or an application to a group. Add a user or an application to a group. You can specify a `user_id` and `application_id` in the body of your request. Note that you can only add one of each per request.
513
- *
514
- * @param request - The request {@link AddGroupMemberRequest}
515
- * @returns A Promise of Group
516
- */
517
- addGroupMember = (request) => this.client.fetch(
518
- {
519
- body: JSON.stringify(
520
- marshalling_gen.marshalAddGroupMemberRequest(request, this.client.settings)
521
- ),
522
- headers: jsonContentHeaders,
523
- method: "POST",
524
- path: `/iam/v1alpha1/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/add-member`
525
- },
526
- marshalling_gen.unmarshalGroup
527
- );
528
- /**
529
- * Add multiple users and applications to a group. Add multiple users and applications to a group in a single call. You can specify an array of `user_id`s and `application_id`s. Note that any existing users and applications in the group will remain. To add new users/applications and delete pre-existing ones, use the [Overwrite users and applications of a group](#path-groups-overwrite-users-and-applications-of-a-group) method.
530
- *
531
- * @param request - The request {@link AddGroupMembersRequest}
532
- * @returns A Promise of Group
533
- */
534
- addGroupMembers = (request) => this.client.fetch(
535
- {
536
- body: JSON.stringify(
537
- marshalling_gen.marshalAddGroupMembersRequest(request, this.client.settings)
538
- ),
539
- headers: jsonContentHeaders,
540
- method: "POST",
541
- path: `/iam/v1alpha1/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/add-members`
542
- },
543
- marshalling_gen.unmarshalGroup
544
- );
545
- /**
546
- * Remove a user or an application from a group. Remove a user or an application from a group. You can specify a `user_id` and `application_id` in the body of your request. Note that you can only remove one of each per request. Removing a user from a group means that any permissions given to them via the group (i.e. from an attached policy) will no longer apply. Be sure you want to remove these permissions from the user before proceeding.
547
- *
548
- * @param request - The request {@link RemoveGroupMemberRequest}
549
- * @returns A Promise of Group
550
- */
551
- removeGroupMember = (request) => this.client.fetch(
552
- {
553
- body: JSON.stringify(
554
- marshalling_gen.marshalRemoveGroupMemberRequest(request, this.client.settings)
555
- ),
556
- headers: jsonContentHeaders,
557
- method: "POST",
558
- path: `/iam/v1alpha1/groups/${sdkClient.validatePathParam("groupId", request.groupId)}/remove-member`
559
- },
560
- marshalling_gen.unmarshalGroup
561
- );
562
- /**
563
- * Delete a group. Delete a group. Note that this action is irreversible and could delete permissions for group members. Policies attached to users and applications via this group will no longer apply.
564
- *
565
- * @param request - The request {@link DeleteGroupRequest}
566
- */
567
- deleteGroup = (request) => this.client.fetch({
568
- method: "DELETE",
569
- path: `/iam/v1alpha1/groups/${sdkClient.validatePathParam("groupId", request.groupId)}`
570
- });
571
- pageOfListPolicies = (request = {}) => this.client.fetch(
572
- {
573
- method: "GET",
574
- path: `/iam/v1alpha1/policies`,
575
- urlParams: sdkClient.urlParams(
576
- ["application_ids", request.applicationIds],
577
- ["editable", request.editable],
578
- ["group_ids", request.groupIds],
579
- ["no_principal", request.noPrincipal],
580
- ["order_by", request.orderBy],
581
- [
582
- "organization_id",
583
- request.organizationId ?? this.client.settings.defaultOrganizationId
584
- ],
585
- ["page", request.page],
586
- [
587
- "page_size",
588
- request.pageSize ?? this.client.settings.defaultPageSize
589
- ],
590
- ["policy_ids", request.policyIds],
591
- ["policy_name", request.policyName],
592
- ["tag", request.tag],
593
- ["user_ids", request.userIds]
594
- )
595
- },
596
- marshalling_gen.unmarshalListPoliciesResponse
597
- );
598
- /**
599
- * List policies of an Organization. List the policies of an Organization. By default, the policies listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You must define the `organization_id` in the query path of your request. You can also define additional parameters to filter your query, such as `user_ids`, `groups_ids`, `application_ids`, and `policy_name`.
600
- *
601
- * @param request - The request {@link ListPoliciesRequest}
602
- * @returns A Promise of ListPoliciesResponse
603
- */
604
- listPolicies = (request = {}) => sdkClient.enrichForPagination("policies", this.pageOfListPolicies, request);
605
- /**
606
- * Create a new policy. Create a new application. You must define the `name` parameter in the request. You can specify parameters such as `user_id`, `groups_id`, `application_id`, `no_principal`, `rules` and its child attributes.
607
- *
608
- * @param request - The request {@link CreatePolicyRequest}
609
- * @returns A Promise of Policy
610
- */
611
- createPolicy = (request) => this.client.fetch(
612
- {
613
- body: JSON.stringify(
614
- marshalling_gen.marshalCreatePolicyRequest(request, this.client.settings)
615
- ),
616
- headers: jsonContentHeaders,
617
- method: "POST",
618
- path: `/iam/v1alpha1/policies`
619
- },
620
- marshalling_gen.unmarshalPolicy
621
- );
622
- /**
623
- * Get an existing policy. Retrieve information about a policy, speficified by the `policy_id` parameter. The policy's full details, including `id`, `name`, `organization_id`, `nb_rules` and `nb_scopes`, `nb_permission_sets` are returned in the response.
624
- *
625
- * @param request - The request {@link GetPolicyRequest}
626
- * @returns A Promise of Policy
627
- */
628
- getPolicy = (request) => this.client.fetch(
629
- {
630
- method: "GET",
631
- path: `/iam/v1alpha1/policies/${sdkClient.validatePathParam("policyId", request.policyId)}`
632
- },
633
- marshalling_gen.unmarshalPolicy
634
- );
635
- /**
636
- * Update an existing policy. Update the parameters of a policy, including `name`, `description`, `user_id`, `group_id`, `application_id` and `no_principal`.
637
- *
638
- * @param request - The request {@link UpdatePolicyRequest}
639
- * @returns A Promise of Policy
640
- */
641
- updatePolicy = (request) => this.client.fetch(
642
- {
643
- body: JSON.stringify(
644
- marshalling_gen.marshalUpdatePolicyRequest(request, this.client.settings)
645
- ),
646
- headers: jsonContentHeaders,
647
- method: "PATCH",
648
- path: `/iam/v1alpha1/policies/${sdkClient.validatePathParam("policyId", request.policyId)}`
649
- },
650
- marshalling_gen.unmarshalPolicy
651
- );
652
- /**
653
- * Delete a policy. Delete a policy. You must define specify the `policy_id` parameter in your request. Note that when deleting a policy, all permissions it gives to its principal (user, group or application) will be revoked.
654
- *
655
- * @param request - The request {@link DeletePolicyRequest}
656
- */
657
- deletePolicy = (request) => this.client.fetch({
658
- method: "DELETE",
659
- path: `/iam/v1alpha1/policies/${sdkClient.validatePathParam("policyId", request.policyId)}`
660
- });
661
- /**
662
- * Clone a policy. Clone a policy. You must define specify the `policy_id` parameter in your request.
663
- *
664
- * @param request - The request {@link ClonePolicyRequest}
665
- * @returns A Promise of Policy
666
- */
667
- clonePolicy = (request) => this.client.fetch(
668
- {
669
- body: "{}",
670
- headers: jsonContentHeaders,
671
- method: "POST",
672
- path: `/iam/v1alpha1/policies/${sdkClient.validatePathParam("policyId", request.policyId)}/clone`
673
- },
674
- marshalling_gen.unmarshalPolicy
675
- );
676
- /**
677
- * Set rules of a given policy. Overwrite the rules of a given policy. Any information that you add using this command will overwrite the previous configuration. If you include some of the rules you already had in your previous configuration in your new one, but you change their order, the new order of display will apply. While policy rules are ordered, they have no impact on the access logic of IAM because rules are allow-only.
678
- *
679
- * @param request - The request {@link SetRulesRequest}
680
- * @returns A Promise of SetRulesResponse
681
- */
682
- setRules = (request) => this.client.fetch(
683
- {
684
- body: JSON.stringify(
685
- marshalling_gen.marshalSetRulesRequest(request, this.client.settings)
686
- ),
687
- headers: jsonContentHeaders,
688
- method: "PUT",
689
- path: `/iam/v1alpha1/rules`
690
- },
691
- marshalling_gen.unmarshalSetRulesResponse
692
- );
693
- pageOfListRules = (request) => this.client.fetch(
694
- {
695
- method: "GET",
696
- path: `/iam/v1alpha1/rules`,
697
- urlParams: sdkClient.urlParams(
698
- ["page", request.page],
699
- [
700
- "page_size",
701
- request.pageSize ?? this.client.settings.defaultPageSize
702
- ],
703
- ["policy_id", request.policyId]
704
- )
705
- },
706
- marshalling_gen.unmarshalListRulesResponse
707
- );
708
- /**
709
- * List rules of a given policy. List the rules of a given policy. By default, the rules listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You must define the `policy_id` in the query path of your request.
710
- *
711
- * @param request - The request {@link ListRulesRequest}
712
- * @returns A Promise of ListRulesResponse
713
- */
714
- listRules = (request) => sdkClient.enrichForPagination("rules", this.pageOfListRules, request);
715
- pageOfListPermissionSets = (request = {}) => this.client.fetch(
716
- {
717
- method: "GET",
718
- path: `/iam/v1alpha1/permission-sets`,
719
- urlParams: sdkClient.urlParams(
720
- ["order_by", request.orderBy],
721
- [
722
- "organization_id",
723
- request.organizationId ?? this.client.settings.defaultOrganizationId
724
- ],
725
- ["page", request.page],
726
- [
727
- "page_size",
728
- request.pageSize ?? this.client.settings.defaultPageSize
729
- ]
730
- )
731
- },
732
- marshalling_gen.unmarshalListPermissionSetsResponse
733
- );
734
- /**
735
- * List permission sets. List permission sets available for given Organization. You must define the `organization_id` in the query path of your request.
736
- *
737
- * @param request - The request {@link ListPermissionSetsRequest}
738
- * @returns A Promise of ListPermissionSetsResponse
739
- */
740
- listPermissionSets = (request = {}) => sdkClient.enrichForPagination(
741
- "permissionSets",
742
- this.pageOfListPermissionSets,
743
- request
744
- );
745
- pageOfListAPIKeys = (request = {}) => this.client.fetch(
746
- {
747
- method: "GET",
748
- path: `/iam/v1alpha1/api-keys`,
749
- urlParams: sdkClient.urlParams(
750
- ["access_key", request.accessKey],
751
- ["access_keys", request.accessKeys],
752
- ["bearer_id", request.bearerId],
753
- ["bearer_type", request.bearerType],
754
- ["description", request.description],
755
- ["editable", request.editable],
756
- ["expired", request.expired],
757
- ["order_by", request.orderBy],
758
- [
759
- "organization_id",
760
- request.organizationId ?? this.client.settings.defaultOrganizationId
761
- ],
762
- ["page", request.page],
763
- [
764
- "page_size",
765
- request.pageSize ?? this.client.settings.defaultPageSize
766
- ],
767
- ...Object.entries(
768
- sdkClient.resolveOneOf([
769
- { param: "application_id", value: request.applicationId },
770
- { param: "user_id", value: request.userId }
771
- ])
772
- )
773
- )
774
- },
775
- marshalling_gen.unmarshalListAPIKeysResponse
776
- );
777
- /**
778
- * List API keys. List API keys. By default, the API keys listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You can define additional parameters for your query such as `editable`, `expired`, `access_key` and `bearer_id`.
779
- *
780
- * @param request - The request {@link ListAPIKeysRequest}
781
- * @returns A Promise of ListAPIKeysResponse
782
- */
783
- listAPIKeys = (request = {}) => sdkClient.enrichForPagination("apiKeys", this.pageOfListAPIKeys, request);
784
- /**
785
- * Create an API key. Create an API key. You must specify the `application_id` or the `user_id` and the description. You can also specify the `default_project_id`, which is the Project ID of your preferred Project, to use with Object Storage. The `access_key` and `secret_key` values are returned in the response. Note that the secret key is only shown once. Make sure that you copy and store both keys somewhere safe.
786
- *
787
- * @param request - The request {@link CreateAPIKeyRequest}
788
- * @returns A Promise of APIKey
789
- */
790
- createAPIKey = (request) => this.client.fetch(
791
- {
792
- body: JSON.stringify(
793
- marshalling_gen.marshalCreateAPIKeyRequest(request, this.client.settings)
794
- ),
795
- headers: jsonContentHeaders,
796
- method: "POST",
797
- path: `/iam/v1alpha1/api-keys`
798
- },
799
- marshalling_gen.unmarshalAPIKey
800
- );
801
- /**
802
- * Get an API key. Retrieve information about an API key, specified by the `access_key` parameter. The API key's details, including either the `user_id` or `application_id` of its bearer are returned in the response. Note that the string value for the `secret_key` is nullable, and therefore is not displayed in the response. The `secret_key` value is only displayed upon API key creation.
803
- *
804
- * @param request - The request {@link GetAPIKeyRequest}
805
- * @returns A Promise of APIKey
806
- */
807
- getAPIKey = (request) => this.client.fetch(
808
- {
809
- method: "GET",
810
- path: `/iam/v1alpha1/api-keys/${sdkClient.validatePathParam("accessKey", request.accessKey)}`
811
- },
812
- marshalling_gen.unmarshalAPIKey
813
- );
814
- /**
815
- * Update an API key. Update the parameters of an API key, including `default_project_id` and `description`.
816
- *
817
- * @param request - The request {@link UpdateAPIKeyRequest}
818
- * @returns A Promise of APIKey
819
- */
820
- updateAPIKey = (request) => this.client.fetch(
821
- {
822
- body: JSON.stringify(
823
- marshalling_gen.marshalUpdateAPIKeyRequest(request, this.client.settings)
824
- ),
825
- headers: jsonContentHeaders,
826
- method: "PATCH",
827
- path: `/iam/v1alpha1/api-keys/${sdkClient.validatePathParam("accessKey", request.accessKey)}`
828
- },
829
- marshalling_gen.unmarshalAPIKey
830
- );
831
- /**
832
- * Delete an API key. Delete an API key. Note that this action is irreversible and cannot be undone. Make sure you update any configurations using the API keys you delete.
833
- *
834
- * @param request - The request {@link DeleteAPIKeyRequest}
835
- */
836
- deleteAPIKey = (request) => this.client.fetch({
837
- method: "DELETE",
838
- path: `/iam/v1alpha1/api-keys/${sdkClient.validatePathParam("accessKey", request.accessKey)}`
839
- });
840
- pageOfListQuota = (request = {}) => this.client.fetch(
841
- {
842
- method: "GET",
843
- path: `/iam/v1alpha1/quota`,
844
- urlParams: sdkClient.urlParams(
845
- ["order_by", request.orderBy],
846
- [
847
- "organization_id",
848
- request.organizationId ?? this.client.settings.defaultOrganizationId
849
- ],
850
- ["page", request.page],
851
- [
852
- "page_size",
853
- request.pageSize ?? this.client.settings.defaultPageSize
854
- ],
855
- ["quotum_names", request.quotumNames]
856
- )
857
- },
858
- marshalling_gen.unmarshalListQuotaResponse
859
- );
860
- /**
861
- * List all quotas in the Organization. List all product and features quota for an Organization, with their associated limits. By default, the quota listed are ordered by creation date in ascending order. This can be modified via the `order_by` field. You must define the `organization_id` in the query path of your request.
862
- *
863
- * @param request - The request {@link ListQuotaRequest}
864
- * @returns A Promise of ListQuotaResponse
865
- */
866
- listQuota = (request = {}) => sdkClient.enrichForPagination("quota", this.pageOfListQuota, request);
867
- /**
868
- * Get a quota in the Organization. Retrieve information about a resource quota, specified by the `quotum_name` parameter. The quota's `limit`, or whether it is unlimited, is returned in the response.
869
- *
870
- * @param request - The request {@link GetQuotumRequest}
871
- * @returns A Promise of Quotum
872
- */
873
- getQuotum = (request) => this.client.fetch(
874
- {
875
- method: "GET",
876
- path: `/iam/v1alpha1/quota/${sdkClient.validatePathParam("quotumName", request.quotumName)}`,
877
- urlParams: sdkClient.urlParams([
878
- "organization_id",
879
- request.organizationId ?? this.client.settings.defaultOrganizationId
880
- ])
881
- },
882
- marshalling_gen.unmarshalQuotum
883
- );
884
- pageOfListJWTs = (request) => this.client.fetch(
885
- {
886
- method: "GET",
887
- path: `/iam/v1alpha1/jwts`,
888
- urlParams: sdkClient.urlParams(
889
- ["audience_id", request.audienceId],
890
- ["expired", request.expired],
891
- ["order_by", request.orderBy],
892
- ["page", request.page],
893
- [
894
- "page_size",
895
- request.pageSize ?? this.client.settings.defaultPageSize
896
- ]
897
- )
898
- },
899
- marshalling_gen.unmarshalListJWTsResponse
900
- );
901
- /**
902
- * List JWTs.
903
- *
904
- * @param request - The request {@link ListJWTsRequest}
905
- * @returns A Promise of ListJWTsResponse
906
- */
907
- listJWTs = (request) => sdkClient.enrichForPagination("jwts", this.pageOfListJWTs, request);
908
- /**
909
- * Create a JWT.
910
- *
911
- * @param request - The request {@link CreateJWTRequest}
912
- * @returns A Promise of EncodedJWT
913
- */
914
- createJWT = (request) => this.client.fetch(
915
- {
916
- body: JSON.stringify(
917
- marshalling_gen.marshalCreateJWTRequest(request, this.client.settings)
918
- ),
919
- headers: jsonContentHeaders,
920
- method: "POST",
921
- path: `/iam/v1alpha1/jwts`
922
- },
923
- marshalling_gen.unmarshalEncodedJWT
924
- );
925
- /**
926
- * Get a JWT.
927
- *
928
- * @param request - The request {@link GetJWTRequest}
929
- * @returns A Promise of JWT
930
- */
931
- getJWT = (request) => this.client.fetch(
932
- {
933
- method: "GET",
934
- path: `/iam/v1alpha1/jwts/${sdkClient.validatePathParam("jti", request.jti)}`
935
- },
936
- marshalling_gen.unmarshalJWT
937
- );
938
- /**
939
- * Delete a JWT.
940
- *
941
- * @param request - The request {@link DeleteJWTRequest}
942
- */
943
- deleteJWT = (request) => this.client.fetch({
944
- method: "DELETE",
945
- path: `/iam/v1alpha1/jwts/${sdkClient.validatePathParam("jti", request.jti)}`
946
- });
947
- pageOfListLogs = (request = {}) => this.client.fetch(
948
- {
949
- method: "GET",
950
- path: `/iam/v1alpha1/logs`,
951
- urlParams: sdkClient.urlParams(
952
- ["action", request.action],
953
- ["created_after", request.createdAfter],
954
- ["created_before", request.createdBefore],
955
- ["order_by", request.orderBy],
956
- [
957
- "organization_id",
958
- request.organizationId ?? this.client.settings.defaultOrganizationId
959
- ],
960
- ["page", request.page],
961
- [
962
- "page_size",
963
- request.pageSize ?? this.client.settings.defaultPageSize
964
- ],
965
- ["resource_type", request.resourceType],
966
- ["search", request.search]
967
- )
968
- },
969
- marshalling_gen.unmarshalListLogsResponse
970
- );
971
- /**
972
- * List logs. List logs available for given Organization. You must define the `organization_id` in the query path of your request.
973
- *
974
- * @param request - The request {@link ListLogsRequest}
975
- * @returns A Promise of ListLogsResponse
976
- */
977
- listLogs = (request = {}) => sdkClient.enrichForPagination("logs", this.pageOfListLogs, request);
978
- /**
979
- * Get a log. Retrieve information about a log, specified by the `log_id` parameter. The log's full details, including `id`, `ip`, `user_agent`, `action`, `bearer_id`, `resource_type` and `resource_id` are returned in the response.
980
- *
981
- * @param request - The request {@link GetLogRequest}
982
- * @returns A Promise of Log
983
- */
984
- getLog = (request) => this.client.fetch(
985
- {
986
- method: "GET",
987
- path: `/iam/v1alpha1/logs/${sdkClient.validatePathParam("logId", request.logId)}`
988
- },
989
- marshalling_gen.unmarshalLog
990
- );
991
- /**
992
- * Get security settings of an Organization. Retrieve information about the security settings of an Organization, specified by the `organization_id` parameter.
993
- *
994
- * @param request - The request {@link GetOrganizationSecuritySettingsRequest}
995
- * @returns A Promise of OrganizationSecuritySettings
996
- */
997
- getOrganizationSecuritySettings = (request = {}) => this.client.fetch(
998
- {
999
- method: "GET",
1000
- path: `/iam/v1alpha1/organizations/${sdkClient.validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/security-settings`
1001
- },
1002
- marshalling_gen.unmarshalOrganizationSecuritySettings
1003
- );
1004
- /**
1005
- * Update the security settings of an Organization.
1006
- *
1007
- * @param request - The request {@link UpdateOrganizationSecuritySettingsRequest}
1008
- * @returns A Promise of OrganizationSecuritySettings
1009
- */
1010
- updateOrganizationSecuritySettings = (request = {}) => this.client.fetch(
1011
- {
1012
- body: JSON.stringify(
1013
- marshalling_gen.marshalUpdateOrganizationSecuritySettingsRequest(
1014
- request,
1015
- this.client.settings
1016
- )
1017
- ),
1018
- headers: jsonContentHeaders,
1019
- method: "PATCH",
1020
- path: `/iam/v1alpha1/organizations/${sdkClient.validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/security-settings`
1021
- },
1022
- marshalling_gen.unmarshalOrganizationSecuritySettings
1023
- );
1024
- /**
1025
- * Set your Organization's alias.. This will fail if an alias has already been defined. Please contact support if you need to change your Organization's alias.
1026
- *
1027
- * @param request - The request {@link SetOrganizationAliasRequest}
1028
- * @returns A Promise of Organization
1029
- */
1030
- setOrganizationAlias = (request) => this.client.fetch(
1031
- {
1032
- body: JSON.stringify(
1033
- marshalling_gen.marshalSetOrganizationAliasRequest(request, this.client.settings)
1034
- ),
1035
- headers: jsonContentHeaders,
1036
- method: "PUT",
1037
- path: `/iam/v1alpha1/organizations/${sdkClient.validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/alias`
1038
- },
1039
- marshalling_gen.unmarshalOrganization
1040
- );
1041
- /**
1042
- * Get your Organization's IAM information.
1043
- *
1044
- * @param request - The request {@link GetOrganizationRequest}
1045
- * @returns A Promise of Organization
1046
- */
1047
- getOrganization = (request = {}) => this.client.fetch(
1048
- {
1049
- method: "GET",
1050
- path: `/iam/v1alpha1/organizations/${sdkClient.validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}`
1051
- },
1052
- marshalling_gen.unmarshalOrganization
1053
- );
1054
- /**
1055
- * Set your Organization's allowed login methods.. Set your Organization's allowed login methods.
1056
- *
1057
- * @param request - The request {@link UpdateOrganizationLoginMethodsRequest}
1058
- * @returns A Promise of Organization
1059
- */
1060
- updateOrganizationLoginMethods = (request = {}) => this.client.fetch(
1061
- {
1062
- body: JSON.stringify(
1063
- marshalling_gen.marshalUpdateOrganizationLoginMethodsRequest(
1064
- request,
1065
- this.client.settings
1066
- )
1067
- ),
1068
- headers: jsonContentHeaders,
1069
- method: "PATCH",
1070
- path: `/iam/v1alpha1/organizations/${sdkClient.validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/login-methods`
1071
- },
1072
- marshalling_gen.unmarshalOrganization
1073
- );
1074
- /**
1075
- * Get SAML Identity Provider configuration of an Organization.
1076
- *
1077
- * @param request - The request {@link GetOrganizationSamlRequest}
1078
- * @returns A Promise of Saml
1079
- */
1080
- getOrganizationSaml = (request = {}) => this.client.fetch(
1081
- {
1082
- method: "GET",
1083
- path: `/iam/v1alpha1/organizations/${sdkClient.validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/saml`
1084
- },
1085
- marshalling_gen.unmarshalSaml
1086
- );
1087
- /**
1088
- * Enable SAML Identity Provider for an Organization.
1089
- *
1090
- * @param request - The request {@link EnableOrganizationSamlRequest}
1091
- * @returns A Promise of Saml
1092
- */
1093
- enableOrganizationSaml = (request = {}) => this.client.fetch(
1094
- {
1095
- body: "{}",
1096
- headers: jsonContentHeaders,
1097
- method: "POST",
1098
- path: `/iam/v1alpha1/organizations/${sdkClient.validatePathParam("organizationId", request.organizationId ?? this.client.settings.defaultOrganizationId)}/saml`
1099
- },
1100
- marshalling_gen.unmarshalSaml
1101
- );
1102
- /**
1103
- * Update SAML Identity Provider configuration.
1104
- *
1105
- * @param request - The request {@link UpdateSamlRequest}
1106
- * @returns A Promise of Saml
1107
- */
1108
- updateSaml = (request) => this.client.fetch(
1109
- {
1110
- body: JSON.stringify(
1111
- marshalling_gen.marshalUpdateSamlRequest(request, this.client.settings)
1112
- ),
1113
- headers: jsonContentHeaders,
1114
- method: "PATCH",
1115
- path: `/iam/v1alpha1/saml/${sdkClient.validatePathParam("samlId", request.samlId)}`
1116
- },
1117
- marshalling_gen.unmarshalSaml
1118
- );
1119
- /**
1120
- * Disable SAML Identity Provider for an Organization.
1121
- *
1122
- * @param request - The request {@link DeleteSamlRequest}
1123
- */
1124
- deleteSaml = (request) => this.client.fetch({
1125
- method: "DELETE",
1126
- path: `/iam/v1alpha1/saml/${sdkClient.validatePathParam("samlId", request.samlId)}`
1127
- });
1128
- /**
1129
- * Parse SAML xml metadata file.
1130
- *
1131
- * @param request - The request {@link ParseSamlMetadataRequest}
1132
- * @returns A Promise of ParseSamlMetadataResponse
1133
- */
1134
- parseSamlMetadata = async (request) => this.client.fetch(
1135
- {
1136
- body: JSON.stringify(
1137
- await marshalling_gen.marshalParseSamlMetadataRequest(request, this.client.settings)
1138
- ),
1139
- headers: jsonContentHeaders,
1140
- method: "POST",
1141
- path: `/iam/v1alpha1/parse-saml-metadata`
1142
- },
1143
- marshalling_gen.unmarshalParseSamlMetadataResponse
1144
- );
1145
- /**
1146
- * List SAML certificates.
1147
- *
1148
- * @param request - The request {@link ListSamlCertificatesRequest}
1149
- * @returns A Promise of ListSamlCertificatesResponse
1150
- */
1151
- listSamlCertificates = (request) => this.client.fetch(
1152
- {
1153
- method: "GET",
1154
- path: `/iam/v1alpha1/saml/${sdkClient.validatePathParam("samlId", request.samlId)}/certificates`
1155
- },
1156
- marshalling_gen.unmarshalListSamlCertificatesResponse
1157
- );
1158
- /**
1159
- * Add a SAML certificate.
1160
- *
1161
- * @param request - The request {@link AddSamlCertificateRequest}
1162
- * @returns A Promise of SamlCertificate
1163
- */
1164
- addSamlCertificate = (request) => this.client.fetch(
1165
- {
1166
- body: JSON.stringify(
1167
- marshalling_gen.marshalAddSamlCertificateRequest(request, this.client.settings)
1168
- ),
1169
- headers: jsonContentHeaders,
1170
- method: "POST",
1171
- path: `/iam/v1alpha1/saml/${sdkClient.validatePathParam("samlId", request.samlId)}/certificates`
1172
- },
1173
- marshalling_gen.unmarshalSamlCertificate
1174
- );
1175
- /**
1176
- * Delete a SAML certificate.
1177
- *
1178
- * @param request - The request {@link DeleteSamlCertificateRequest}
1179
- */
1180
- deleteSamlCertificate = (request) => this.client.fetch({
1181
- method: "DELETE",
1182
- path: `/iam/v1alpha1/saml-certificates/${sdkClient.validatePathParam("certificateId", request.certificateId)}`
1183
- });
1184
- }
1185
- exports.API = API;