@scaleway/sdk 2.58.0 → 2.60.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.
Files changed (98) hide show
  1. package/dist/api/applesilicon/v1alpha1/api.gen.cjs +117 -0
  2. package/dist/api/applesilicon/v1alpha1/api.gen.d.ts +54 -1
  3. package/dist/api/applesilicon/v1alpha1/api.gen.js +120 -3
  4. package/dist/api/applesilicon/v1alpha1/content.gen.cjs +4 -0
  5. package/dist/api/applesilicon/v1alpha1/content.gen.d.ts +5 -1
  6. package/dist/api/applesilicon/v1alpha1/content.gen.js +4 -0
  7. package/dist/api/applesilicon/v1alpha1/index.gen.cjs +3 -0
  8. package/dist/api/applesilicon/v1alpha1/index.gen.d.ts +2 -2
  9. package/dist/api/applesilicon/v1alpha1/index.gen.js +5 -2
  10. package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +60 -0
  11. package/dist/api/applesilicon/v1alpha1/marshalling.gen.d.ts +6 -1
  12. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +60 -0
  13. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +100 -0
  14. package/dist/api/audit_trail/v1alpha1/index.gen.d.ts +1 -1
  15. package/dist/api/audit_trail/v1alpha1/marshalling.gen.cjs +12 -0
  16. package/dist/api/audit_trail/v1alpha1/marshalling.gen.js +12 -0
  17. package/dist/api/audit_trail/v1alpha1/types.gen.d.ts +9 -0
  18. package/dist/api/edge_services/v1alpha1/types.gen.d.ts +4 -4
  19. package/dist/api/iam/v1alpha1/api.gen.cjs +54 -0
  20. package/dist/api/iam/v1alpha1/api.gen.d.ts +26 -1
  21. package/dist/api/iam/v1alpha1/api.gen.js +55 -1
  22. package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
  23. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +23 -0
  24. package/dist/api/iam/v1alpha1/marshalling.gen.d.ts +4 -1
  25. package/dist/api/iam/v1alpha1/marshalling.gen.js +23 -0
  26. package/dist/api/iam/v1alpha1/types.gen.d.ts +29 -1
  27. package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +8 -0
  28. package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +7 -0
  29. package/dist/api/iam/v1alpha1/validation-rules.gen.js +9 -1
  30. package/dist/api/index.gen.d.ts +2 -1
  31. package/dist/api/interlink/index.gen.cjs +4 -0
  32. package/dist/api/interlink/index.gen.d.ts +5 -0
  33. package/dist/api/interlink/index.gen.js +4 -0
  34. package/dist/api/interlink/v1beta1/api.gen.cjs +405 -0
  35. package/dist/api/interlink/v1beta1/api.gen.d.ts +208 -0
  36. package/dist/api/interlink/v1beta1/api.gen.js +405 -0
  37. package/dist/api/interlink/v1beta1/index.gen.cjs +6 -0
  38. package/dist/api/interlink/v1beta1/index.gen.d.ts +3 -0
  39. package/dist/api/interlink/v1beta1/index.gen.js +6 -0
  40. package/dist/api/interlink/v1beta1/marshalling.gen.cjs +180 -0
  41. package/dist/api/interlink/v1beta1/marshalling.gen.d.ts +16 -0
  42. package/dist/api/interlink/v1beta1/marshalling.gen.js +180 -0
  43. package/dist/api/interlink/v1beta1/types.gen.d.ts +455 -0
  44. package/dist/api/interlink/v1beta1/validation-rules.gen.cjs +107 -0
  45. package/dist/api/interlink/v1beta1/validation-rules.gen.d.ts +93 -0
  46. package/dist/api/interlink/v1beta1/validation-rules.gen.js +107 -0
  47. package/dist/api/ipam/v1/api.gen.cjs +1 -0
  48. package/dist/api/ipam/v1/api.gen.js +1 -0
  49. package/dist/api/ipam/v1/types.gen.d.ts +12 -10
  50. package/dist/api/k8s/v1/api.gen.cjs +22 -20
  51. package/dist/api/k8s/v1/api.gen.d.ts +22 -20
  52. package/dist/api/k8s/v1/api.gen.js +22 -20
  53. package/dist/api/k8s/v1/marshalling.gen.cjs +2 -5
  54. package/dist/api/k8s/v1/marshalling.gen.js +2 -5
  55. package/dist/api/k8s/v1/types.gen.d.ts +65 -49
  56. package/dist/api/lb/v1/types.gen.d.ts +6 -6
  57. package/dist/api/marketplace/v2/types.gen.d.ts +5 -2
  58. package/dist/api/mongodb/v1alpha1/api.gen.cjs +13 -1
  59. package/dist/api/mongodb/v1alpha1/api.gen.d.ts +8 -1
  60. package/dist/api/mongodb/v1alpha1/api.gen.js +13 -1
  61. package/dist/api/mongodb/v1alpha1/index.gen.d.ts +1 -1
  62. package/dist/api/mongodb/v1alpha1/types.gen.d.ts +11 -0
  63. package/dist/api/mongodb/v1alpha1/validation-rules.gen.cjs +8 -0
  64. package/dist/api/mongodb/v1alpha1/validation-rules.gen.d.ts +7 -0
  65. package/dist/api/mongodb/v1alpha1/validation-rules.gen.js +8 -0
  66. package/dist/api/secret/v1beta1/marshalling.gen.cjs +1 -0
  67. package/dist/api/secret/v1beta1/marshalling.gen.js +1 -0
  68. package/dist/api/secret/v1beta1/types.gen.d.ts +2 -0
  69. package/dist/api/vpcgw/index.gen.cjs +2 -0
  70. package/dist/api/vpcgw/index.gen.d.ts +1 -0
  71. package/dist/api/vpcgw/index.gen.js +3 -1
  72. package/dist/api/vpcgw/v2/api.gen.cjs +518 -0
  73. package/dist/api/vpcgw/v2/api.gen.d.ts +267 -0
  74. package/dist/api/vpcgw/v2/api.gen.js +518 -0
  75. package/dist/api/vpcgw/v2/content.gen.cjs +15 -0
  76. package/dist/api/vpcgw/v2/content.gen.d.ts +5 -0
  77. package/dist/api/vpcgw/v2/content.gen.js +15 -0
  78. package/dist/api/vpcgw/v2/index.gen.cjs +7 -0
  79. package/dist/api/vpcgw/v2/index.gen.d.ts +3 -0
  80. package/dist/api/vpcgw/v2/index.gen.js +7 -0
  81. package/dist/api/vpcgw/v2/marshalling.gen.cjs +259 -0
  82. package/dist/api/vpcgw/v2/marshalling.gen.d.ts +22 -0
  83. package/dist/api/vpcgw/v2/marshalling.gen.js +259 -0
  84. package/dist/api/vpcgw/v2/types.gen.d.ts +452 -0
  85. package/dist/api/webhosting/v1/api.gen.cjs +20 -0
  86. package/dist/api/webhosting/v1/api.gen.d.ts +8 -1
  87. package/dist/api/webhosting/v1/api.gen.js +21 -1
  88. package/dist/api/webhosting/v1/index.gen.d.ts +1 -1
  89. package/dist/api/webhosting/v1/marshalling.gen.cjs +30 -2
  90. package/dist/api/webhosting/v1/marshalling.gen.d.ts +2 -1
  91. package/dist/api/webhosting/v1/marshalling.gen.js +31 -3
  92. package/dist/api/webhosting/v1/types.gen.d.ts +50 -2
  93. package/dist/index.cjs +26 -24
  94. package/dist/index.js +26 -24
  95. package/dist/scw/constants.cjs +1 -1
  96. package/dist/scw/constants.d.ts +2 -2
  97. package/dist/scw/constants.js +1 -1
  98. package/package.json +2 -2
@@ -9,7 +9,7 @@ export type ListPermissionSetsRequestOrderBy = 'name_asc' | 'name_desc' | 'creat
9
9
  export type ListPoliciesRequestOrderBy = 'policy_name_asc' | 'policy_name_desc' | 'created_at_asc' | 'created_at_desc';
10
10
  export type ListQuotaRequestOrderBy = 'name_asc' | 'name_desc';
11
11
  export type ListSSHKeysRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc' | 'name_asc' | 'name_desc';
12
- export type ListUsersRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc' | 'email_asc' | 'email_desc' | 'last_login_asc' | 'last_login_desc';
12
+ export type ListUsersRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc' | 'email_asc' | 'email_desc' | 'last_login_asc' | 'last_login_desc' | 'username_asc' | 'username_desc';
13
13
  export type LogAction = 'unknown_action' | 'created' | 'updated' | 'deleted';
14
14
  export type LogResourceType = 'unknown_resource_type' | 'api_key' | 'user' | 'application' | 'group' | 'policy';
15
15
  export type PermissionSetScopeType = 'unknown_scope_type' | 'projects' | 'organization' | 'account_root_user';
@@ -555,6 +555,10 @@ export type GetLogRequest = {
555
555
  /** ID of the log. */
556
556
  logId: string;
557
557
  };
558
+ export type GetOrganizationSecuritySettingsRequest = {
559
+ /** ID of the Organization. */
560
+ organizationId?: string;
561
+ };
558
562
  export type GetPolicyRequest = {
559
563
  /** Id of policy to search. */
560
564
  policyId: string;
@@ -843,6 +847,14 @@ export type LockUserRequest = {
843
847
  /** ID of the user to lock. */
844
848
  userId: string;
845
849
  };
850
+ export interface OrganizationSecuritySettings {
851
+ /** Defines whether password renewal is enforced during first login. */
852
+ enforcePasswordRenewal: boolean;
853
+ /** Duration of the grace period to renew password or enable MFA. */
854
+ gracePeriodDuration?: string;
855
+ /** Number of login attempts before the account is locked. */
856
+ loginAttemptsBeforeLocked: number;
857
+ }
846
858
  export type RemoveGroupMemberRequest = {
847
859
  /** ID of the group. */
848
860
  groupId: string;
@@ -909,6 +921,16 @@ export type UpdateGroupRequest = {
909
921
  /** New tags for the group (maximum of 10 tags). */
910
922
  tags?: string[];
911
923
  };
924
+ export type UpdateOrganizationSecuritySettingsRequest = {
925
+ /** ID of the Organization. */
926
+ organizationId?: string;
927
+ /** Defines whether password renewal is enforced during first login. */
928
+ enforcePasswordRenewal?: boolean;
929
+ /** Duration of the grace period to renew password or enable MFA. */
930
+ gracePeriodDuration?: string;
931
+ /** Number of login attempts before the account is locked. */
932
+ loginAttemptsBeforeLocked?: number;
933
+ };
912
934
  export type UpdatePolicyRequest = {
913
935
  /** Id of policy to update. */
914
936
  policyId: string;
@@ -973,3 +995,9 @@ export type UpdateUserRequest = {
973
995
  /** IAM member email. */
974
996
  email?: string;
975
997
  };
998
+ export type UpdateUserUsernameRequest = {
999
+ /** ID of the user to update. */
1000
+ userId: string;
1001
+ /** The new username. */
1002
+ username: string;
1003
+ };
@@ -236,6 +236,13 @@ const UpdateUserPasswordRequest = {
236
236
  minLength: 1
237
237
  }
238
238
  };
239
+ const UpdateUserUsernameRequest = {
240
+ username: {
241
+ maxLength: 64,
242
+ minLength: 2,
243
+ pattern: /^[a-zA-Z0-9._-]+$/
244
+ }
245
+ };
239
246
  exports.CreateAPIKeyRequest = CreateAPIKeyRequest;
240
247
  exports.CreateApplicationRequest = CreateApplicationRequest;
241
248
  exports.CreateGroupRequest = CreateGroupRequest;
@@ -261,3 +268,4 @@ exports.UpdateGroupRequest = UpdateGroupRequest;
261
268
  exports.UpdatePolicyRequest = UpdatePolicyRequest;
262
269
  exports.UpdateSSHKeyRequest = UpdateSSHKeyRequest;
263
270
  exports.UpdateUserPasswordRequest = UpdateUserPasswordRequest;
271
+ exports.UpdateUserUsernameRequest = UpdateUserUsernameRequest;
@@ -234,3 +234,10 @@ export declare const UpdateUserPasswordRequest: {
234
234
  minLength: number;
235
235
  };
236
236
  };
237
+ export declare const UpdateUserUsernameRequest: {
238
+ username: {
239
+ maxLength: number;
240
+ minLength: number;
241
+ pattern: RegExp;
242
+ };
243
+ };
@@ -234,6 +234,13 @@ const UpdateUserPasswordRequest = {
234
234
  minLength: 1
235
235
  }
236
236
  };
237
+ const UpdateUserUsernameRequest = {
238
+ username: {
239
+ maxLength: 64,
240
+ minLength: 2,
241
+ pattern: /^[a-zA-Z0-9._-]+$/
242
+ }
243
+ };
237
244
  export {
238
245
  CreateAPIKeyRequest,
239
246
  CreateApplicationRequest,
@@ -259,5 +266,6 @@ export {
259
266
  UpdateGroupRequest,
260
267
  UpdatePolicyRequest,
261
268
  UpdateSSHKeyRequest,
262
- UpdateUserPasswordRequest
269
+ UpdateUserPasswordRequest,
270
+ UpdateUserUsernameRequest
263
271
  };
@@ -19,6 +19,7 @@ import * as Function from './function/index.gen';
19
19
  import * as Iam from './iam/index.gen';
20
20
  import * as Inference from './inference/index.gen';
21
21
  import * as Instance from './instance/index.gen';
22
+ import * as Interlink from './interlink/index.gen';
22
23
  import * as Iot from './iot/index.gen';
23
24
  import * as Ipam from './ipam/index.gen';
24
25
  import * as Ipfs from './ipfs/index.gen';
@@ -42,4 +43,4 @@ import * as Test from './test/index.gen';
42
43
  import * as Vpc from './vpc/index.gen';
43
44
  import * as Vpcgw from './vpcgw/index.gen';
44
45
  import * as Webhosting from './webhosting/index.gen';
45
- export { Account, Applesilicon, AuditTrail, Baremetal, Billing, Block, Cockpit, Container, Dedibox, DocumentDb, Domain, EdgeServices, Flexibleip, Function, Iam, Inference, Instance, Iot, Ipam, Ipfs, Jobs, K8s, KeyManager, Lb, LlmInference, Marketplace, Mnq, Mongodb, Qaas, Rdb, Redis, Registry, Secret, ServerlessSqldb, Std, Tem, Test, Vpc, Vpcgw, Webhosting, };
46
+ export { Account, Applesilicon, AuditTrail, Baremetal, Billing, Block, Cockpit, Container, Dedibox, DocumentDb, Domain, EdgeServices, Flexibleip, Function, Iam, Inference, Instance, Interlink, Iot, Ipam, Ipfs, Jobs, K8s, KeyManager, Lb, LlmInference, Marketplace, Mnq, Mongodb, Qaas, Rdb, Redis, Registry, Secret, ServerlessSqldb, Std, Tem, Test, Vpc, Vpcgw, Webhosting, };
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const index_gen = require("./v1beta1/index.gen.cjs");
4
+ exports.v1beta1 = index_gen;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file is automatically generated from /scripts/generate.js PLEASE DO NOT
3
+ * EDIT HERE
4
+ */
5
+ export * as v1beta1 from './v1beta1/index.gen';
@@ -0,0 +1,4 @@
1
+ import * as index_gen from "./v1beta1/index.gen.js";
2
+ export {
3
+ index_gen as v1beta1
4
+ };
@@ -0,0 +1,405 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const api = require("../../../scw/api.cjs");
4
+ const marshalling = require("../../../helpers/marshalling.cjs");
5
+ require("../../../vendor/base64/index.cjs");
6
+ const resourcePaginator = require("../../../scw/fetch/resource-paginator.cjs");
7
+ const marshalling_gen = require("./marshalling.gen.cjs");
8
+ const jsonContentHeaders = {
9
+ "Content-Type": "application/json; charset=utf-8"
10
+ };
11
+ class API extends api.API {
12
+ /** Lists the available regions of the API. */
13
+ static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
14
+ pageOfListPartners = (request = {}) => this.client.fetch(
15
+ {
16
+ method: "GET",
17
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/partners`,
18
+ urlParams: marshalling.urlParams(
19
+ ["order_by", request.orderBy],
20
+ ["page", request.page],
21
+ [
22
+ "page_size",
23
+ request.pageSize ?? this.client.settings.defaultPageSize
24
+ ],
25
+ ["pop_ids", request.popIds]
26
+ )
27
+ },
28
+ marshalling_gen.unmarshalListPartnersResponse
29
+ );
30
+ /**
31
+ * List available partners. List all available partners. By default, the
32
+ * partners returned in the list are ordered by name in ascending order,
33
+ * though this can be modified via the `order_by` field.
34
+ *
35
+ * @param request - The request {@link ListPartnersRequest}
36
+ * @returns A Promise of ListPartnersResponse
37
+ */
38
+ listPartners = (request = {}) => resourcePaginator.enrichForPagination("partners", this.pageOfListPartners, request);
39
+ /**
40
+ * Get a partner. Get a partner for the given partner IP. The response object
41
+ * includes information such as the partner's name, email address and portal
42
+ * URL.
43
+ *
44
+ * @param request - The request {@link GetPartnerRequest}
45
+ * @returns A Promise of Partner
46
+ */
47
+ getPartner = (request) => this.client.fetch(
48
+ {
49
+ method: "GET",
50
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/partners/${marshalling.validatePathParam("partnerId", request.partnerId)}`
51
+ },
52
+ marshalling_gen.unmarshalPartner
53
+ );
54
+ pageOfListPops = (request = {}) => this.client.fetch(
55
+ {
56
+ method: "GET",
57
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/pops`,
58
+ urlParams: marshalling.urlParams(
59
+ ["hosting_provider_name", request.hostingProviderName],
60
+ ["link_bandwidth_mbps", request.linkBandwidthMbps],
61
+ ["name", request.name],
62
+ ["order_by", request.orderBy],
63
+ ["page", request.page],
64
+ [
65
+ "page_size",
66
+ request.pageSize ?? this.client.settings.defaultPageSize
67
+ ],
68
+ ["partner_id", request.partnerId]
69
+ )
70
+ },
71
+ marshalling_gen.unmarshalListPopsResponse
72
+ );
73
+ /**
74
+ * List PoPs. List all available PoPs (locations) for a given region. By
75
+ * default, the results are returned in ascending alphabetical order by name.
76
+ *
77
+ * @param request - The request {@link ListPopsRequest}
78
+ * @returns A Promise of ListPopsResponse
79
+ */
80
+ listPops = (request = {}) => resourcePaginator.enrichForPagination("pops", this.pageOfListPops, request);
81
+ /**
82
+ * Get a PoP. Get a PoP for the given PoP ID. The response object includes the
83
+ * PoP's name and information about its physical location.
84
+ *
85
+ * @param request - The request {@link GetPopRequest}
86
+ * @returns A Promise of Pop
87
+ */
88
+ getPop = (request) => this.client.fetch(
89
+ {
90
+ method: "GET",
91
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/pops/${marshalling.validatePathParam("popId", request.popId)}`
92
+ },
93
+ marshalling_gen.unmarshalPop
94
+ );
95
+ pageOfListLinks = (request = {}) => this.client.fetch(
96
+ {
97
+ method: "GET",
98
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links`,
99
+ urlParams: marshalling.urlParams(
100
+ ["bandwidth_mbps", request.bandwidthMbps],
101
+ ["bgp_v4_status", request.bgpV4Status],
102
+ ["bgp_v6_status", request.bgpV6Status],
103
+ ["name", request.name],
104
+ ["order_by", request.orderBy],
105
+ ["organization_id", request.organizationId],
106
+ ["page", request.page],
107
+ [
108
+ "page_size",
109
+ request.pageSize ?? this.client.settings.defaultPageSize
110
+ ],
111
+ ["pairing_key", request.pairingKey],
112
+ ["partner_id", request.partnerId],
113
+ ["pop_id", request.popId],
114
+ ["project_id", request.projectId],
115
+ ["routing_policy_id", request.routingPolicyId],
116
+ ["status", request.status],
117
+ ["tags", request.tags],
118
+ ["vpc_id", request.vpcId]
119
+ )
120
+ },
121
+ marshalling_gen.unmarshalListLinksResponse
122
+ );
123
+ /**
124
+ * List links. List all your links (InterLink connections). A number of
125
+ * filters are available, including Project ID, name, tags and status.
126
+ *
127
+ * @param request - The request {@link ListLinksRequest}
128
+ * @returns A Promise of ListLinksResponse
129
+ */
130
+ listLinks = (request = {}) => resourcePaginator.enrichForPagination("links", this.pageOfListLinks, request);
131
+ /**
132
+ * Get a link. Get a link (InterLink connection) for the given link ID. The
133
+ * response object includes information about the link's various configuration
134
+ * details.
135
+ *
136
+ * @param request - The request {@link GetLinkRequest}
137
+ * @returns A Promise of Link
138
+ */
139
+ getLink = (request) => this.client.fetch(
140
+ {
141
+ method: "GET",
142
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}`
143
+ },
144
+ marshalling_gen.unmarshalLink
145
+ );
146
+ /**
147
+ * Create a link. Create a link (InterLink connection) in a given PoP,
148
+ * specifying its various configuration details. For the moment only hosted
149
+ * links (faciliated by partners) are available, though in the future
150
+ * dedicated and shared links will also be possible.
151
+ *
152
+ * @param request - The request {@link CreateLinkRequest}
153
+ * @returns A Promise of Link
154
+ */
155
+ createLink = (request) => this.client.fetch(
156
+ {
157
+ body: JSON.stringify(
158
+ marshalling_gen.marshalCreateLinkRequest(request, this.client.settings)
159
+ ),
160
+ headers: jsonContentHeaders,
161
+ method: "POST",
162
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links`
163
+ },
164
+ marshalling_gen.unmarshalLink
165
+ );
166
+ /**
167
+ * Update a link. Update an existing link, specified by its link ID. Only its
168
+ * name and tags can be updated.
169
+ *
170
+ * @param request - The request {@link UpdateLinkRequest}
171
+ * @returns A Promise of Link
172
+ */
173
+ updateLink = (request) => this.client.fetch(
174
+ {
175
+ body: JSON.stringify(
176
+ marshalling_gen.marshalUpdateLinkRequest(request, this.client.settings)
177
+ ),
178
+ headers: jsonContentHeaders,
179
+ method: "PATCH",
180
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}`
181
+ },
182
+ marshalling_gen.unmarshalLink
183
+ );
184
+ /**
185
+ * Delete a link. Delete an existing link, specified by its link ID. Note that
186
+ * as well as deleting the link here on the Scaleway side, it is also
187
+ * necessary to request deletion from the partner on their side. Only when
188
+ * this action has been carried out on both sides will the resource be
189
+ * completely deleted.
190
+ *
191
+ * @param request - The request {@link DeleteLinkRequest}
192
+ * @returns A Promise of Link
193
+ */
194
+ deleteLink = (request) => this.client.fetch(
195
+ {
196
+ method: "DELETE",
197
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}`
198
+ },
199
+ marshalling_gen.unmarshalLink
200
+ );
201
+ /**
202
+ * Attach a VPC. Attach a VPC to an existing link. This facilitates
203
+ * communication between the resources in your Scaleway VPC, and your
204
+ * on-premises infrastructure.
205
+ *
206
+ * @param request - The request {@link AttachVpcRequest}
207
+ * @returns A Promise of Link
208
+ */
209
+ attachVpc = (request) => this.client.fetch(
210
+ {
211
+ body: JSON.stringify(
212
+ marshalling_gen.marshalAttachVpcRequest(request, this.client.settings)
213
+ ),
214
+ headers: jsonContentHeaders,
215
+ method: "POST",
216
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}/attach-vpc`
217
+ },
218
+ marshalling_gen.unmarshalLink
219
+ );
220
+ /**
221
+ * Detach a VPC. Detach a VPC from an existing link.
222
+ *
223
+ * @param request - The request {@link DetachVpcRequest}
224
+ * @returns A Promise of Link
225
+ */
226
+ detachVpc = (request) => this.client.fetch(
227
+ {
228
+ body: "{}",
229
+ headers: jsonContentHeaders,
230
+ method: "POST",
231
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}/detach-vpc`
232
+ },
233
+ marshalling_gen.unmarshalLink
234
+ );
235
+ /**
236
+ * Attach a routing policy. Attach a routing policy to an existing link. As
237
+ * all routes across the link are blocked by default, you must attach a
238
+ * routing policy to set IP prefix filters for allowed routes, facilitating
239
+ * traffic flow.
240
+ *
241
+ * @param request - The request {@link AttachRoutingPolicyRequest}
242
+ * @returns A Promise of Link
243
+ */
244
+ attachRoutingPolicy = (request) => this.client.fetch(
245
+ {
246
+ body: JSON.stringify(
247
+ marshalling_gen.marshalAttachRoutingPolicyRequest(request, this.client.settings)
248
+ ),
249
+ headers: jsonContentHeaders,
250
+ method: "POST",
251
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}/attach-routing-policy`
252
+ },
253
+ marshalling_gen.unmarshalLink
254
+ );
255
+ /**
256
+ * Detach a routing policy. Detach a routing policy from an existing link.
257
+ * Without a routing policy, all routes across the link are blocked by
258
+ * default.
259
+ *
260
+ * @param request - The request {@link DetachRoutingPolicyRequest}
261
+ * @returns A Promise of Link
262
+ */
263
+ detachRoutingPolicy = (request) => this.client.fetch(
264
+ {
265
+ body: "{}",
266
+ headers: jsonContentHeaders,
267
+ method: "POST",
268
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}/detach-routing-policy`
269
+ },
270
+ marshalling_gen.unmarshalLink
271
+ );
272
+ /**
273
+ * Enable route propagation. Enable all allowed prefixes (defined in a routing
274
+ * policy) to be announced in the BGP session. This allows traffic to flow
275
+ * between the attached VPC and the on-premises infrastructure along the
276
+ * announced routes. Note that by default, even when route propagation is
277
+ * enabled, all routes are blocked. It is essential to attach a routing policy
278
+ * to define the ranges of routes to announce.
279
+ *
280
+ * @param request - The request {@link EnableRoutePropagationRequest}
281
+ * @returns A Promise of Link
282
+ */
283
+ enableRoutePropagation = (request) => this.client.fetch(
284
+ {
285
+ body: "{}",
286
+ headers: jsonContentHeaders,
287
+ method: "POST",
288
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}/enable-route-propagation`
289
+ },
290
+ marshalling_gen.unmarshalLink
291
+ );
292
+ /**
293
+ * Disable route propagation. Prevent any prefixes from being announced in the
294
+ * BGP session. Traffic will not be able to flow over the InterLink until
295
+ * route propagation is re-enabled.
296
+ *
297
+ * @param request - The request {@link DisableRoutePropagationRequest}
298
+ * @returns A Promise of Link
299
+ */
300
+ disableRoutePropagation = (request) => this.client.fetch(
301
+ {
302
+ body: "{}",
303
+ headers: jsonContentHeaders,
304
+ method: "POST",
305
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/links/${marshalling.validatePathParam("linkId", request.linkId)}/disable-route-propagation`
306
+ },
307
+ marshalling_gen.unmarshalLink
308
+ );
309
+ pageOfListRoutingPolicies = (request = {}) => this.client.fetch(
310
+ {
311
+ method: "GET",
312
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routing-policies`,
313
+ urlParams: marshalling.urlParams(
314
+ ["name", request.name],
315
+ ["order_by", request.orderBy],
316
+ ["organization_id", request.organizationId],
317
+ ["page", request.page],
318
+ [
319
+ "page_size",
320
+ request.pageSize ?? this.client.settings.defaultPageSize
321
+ ],
322
+ ["project_id", request.projectId],
323
+ ["tags", request.tags]
324
+ )
325
+ },
326
+ marshalling_gen.unmarshalListRoutingPoliciesResponse
327
+ );
328
+ /**
329
+ * List routing policies. List all routing policies in a given region. A
330
+ * routing policy can be attached to one or multiple links (InterLink
331
+ * connections).
332
+ *
333
+ * @param request - The request {@link ListRoutingPoliciesRequest}
334
+ * @returns A Promise of ListRoutingPoliciesResponse
335
+ */
336
+ listRoutingPolicies = (request = {}) => resourcePaginator.enrichForPagination(
337
+ "routingPolicies",
338
+ this.pageOfListRoutingPolicies,
339
+ request
340
+ );
341
+ /**
342
+ * Get routing policy. Get a routing policy for the given routing policy ID.
343
+ * The response object gives information including the policy's name, tags and
344
+ * prefix filters.
345
+ *
346
+ * @param request - The request {@link GetRoutingPolicyRequest}
347
+ * @returns A Promise of RoutingPolicy
348
+ */
349
+ getRoutingPolicy = (request) => this.client.fetch(
350
+ {
351
+ method: "GET",
352
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routing-policies/${marshalling.validatePathParam("routingPolicyId", request.routingPolicyId)}`
353
+ },
354
+ marshalling_gen.unmarshalRoutingPolicy
355
+ );
356
+ /**
357
+ * Create a routing policy. Create a routing policy. Routing policies allow
358
+ * you to set IP prefix filters to define the incoming route announcements to
359
+ * accept from the peer, and the outgoing routes to announce to the peer.
360
+ *
361
+ * @param request - The request {@link CreateRoutingPolicyRequest}
362
+ * @returns A Promise of RoutingPolicy
363
+ */
364
+ createRoutingPolicy = (request) => this.client.fetch(
365
+ {
366
+ body: JSON.stringify(
367
+ marshalling_gen.marshalCreateRoutingPolicyRequest(request, this.client.settings)
368
+ ),
369
+ headers: jsonContentHeaders,
370
+ method: "POST",
371
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routing-policies`
372
+ },
373
+ marshalling_gen.unmarshalRoutingPolicy
374
+ );
375
+ /**
376
+ * Update a routing policy. Update an existing routing policy, specified by
377
+ * its routing policy ID. Its name, tags and incoming/outgoing prefix filters
378
+ * can be updated.
379
+ *
380
+ * @param request - The request {@link UpdateRoutingPolicyRequest}
381
+ * @returns A Promise of RoutingPolicy
382
+ */
383
+ updateRoutingPolicy = (request) => this.client.fetch(
384
+ {
385
+ body: JSON.stringify(
386
+ marshalling_gen.marshalUpdateRoutingPolicyRequest(request, this.client.settings)
387
+ ),
388
+ headers: jsonContentHeaders,
389
+ method: "PATCH",
390
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routing-policies/${marshalling.validatePathParam("routingPolicyId", request.routingPolicyId)}`
391
+ },
392
+ marshalling_gen.unmarshalRoutingPolicy
393
+ );
394
+ /**
395
+ * Delete a routing policy. Delete an existing routing policy, specified by
396
+ * its routing policy ID.
397
+ *
398
+ * @param request - The request {@link DeleteRoutingPolicyRequest}
399
+ */
400
+ deleteRoutingPolicy = (request) => this.client.fetch({
401
+ method: "DELETE",
402
+ path: `/interlink/v1beta1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routing-policies/${marshalling.validatePathParam("routingPolicyId", request.routingPolicyId)}`
403
+ });
404
+ }
405
+ exports.API = API;