@scaleway/sdk 2.60.0 → 2.61.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/container/v1beta1/api.gen.cjs +6 -8
- package/dist/api/container/v1beta1/api.gen.d.ts +6 -8
- package/dist/api/container/v1beta1/api.gen.js +6 -8
- package/dist/api/vpcgw/v2/api.gen.cjs +47 -0
- package/dist/api/vpcgw/v2/api.gen.d.ts +25 -1
- package/dist/api/vpcgw/v2/api.gen.js +48 -1
- package/dist/api/vpcgw/v2/index.gen.d.ts +1 -1
- package/dist/api/vpcgw/v2/marshalling.gen.cjs +31 -0
- package/dist/api/vpcgw/v2/marshalling.gen.d.ts +5 -1
- package/dist/api/vpcgw/v2/marshalling.gen.js +31 -0
- package/dist/api/vpcgw/v2/types.gen.d.ts +37 -0
- package/dist/api/webhosting/v1/types.gen.d.ts +1 -1
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -341,16 +341,15 @@ class API extends api.API {
|
|
|
341
341
|
marshalling_gen.unmarshalListDomainsResponse
|
|
342
342
|
);
|
|
343
343
|
/**
|
|
344
|
-
* List all
|
|
345
|
-
* region.
|
|
344
|
+
* List all custom domains. List all custom domains in a specified region.
|
|
346
345
|
*
|
|
347
346
|
* @param request - The request {@link ListDomainsRequest}
|
|
348
347
|
* @returns A Promise of ListDomainsResponse
|
|
349
348
|
*/
|
|
350
349
|
listDomains = (request) => resourcePaginator.enrichForPagination("domains", this.pageOfListDomains, request);
|
|
351
350
|
/**
|
|
352
|
-
* Get a domain
|
|
353
|
-
*
|
|
351
|
+
* Get a custom domain. Get a custom domain for the container with the
|
|
352
|
+
* specified ID.
|
|
354
353
|
*
|
|
355
354
|
* @param request - The request {@link GetDomainRequest}
|
|
356
355
|
* @returns A Promise of Domain
|
|
@@ -376,8 +375,8 @@ class API extends api.API {
|
|
|
376
375
|
options
|
|
377
376
|
);
|
|
378
377
|
/**
|
|
379
|
-
* Create a domain
|
|
380
|
-
*
|
|
378
|
+
* Create a custom domain. Create a custom domain for the container with the
|
|
379
|
+
* specified ID.
|
|
381
380
|
*
|
|
382
381
|
* @param request - The request {@link CreateDomainRequest}
|
|
383
382
|
* @returns A Promise of Domain
|
|
@@ -394,8 +393,7 @@ class API extends api.API {
|
|
|
394
393
|
marshalling_gen.unmarshalDomain
|
|
395
394
|
);
|
|
396
395
|
/**
|
|
397
|
-
* Delete a domain
|
|
398
|
-
* specific ID.
|
|
396
|
+
* Delete a custom domain. Delete the custom domain with the specific ID.
|
|
399
397
|
*
|
|
400
398
|
* @param request - The request {@link DeleteDomainRequest}
|
|
401
399
|
* @returns A Promise of Domain
|
|
@@ -162,8 +162,7 @@ export declare class API extends ParentAPI {
|
|
|
162
162
|
deleteCron: (request: Readonly<DeleteCronRequest>) => Promise<Cron>;
|
|
163
163
|
protected pageOfListDomains: (request: Readonly<ListDomainsRequest>) => Promise<ListDomainsResponse>;
|
|
164
164
|
/**
|
|
165
|
-
* List all
|
|
166
|
-
* region.
|
|
165
|
+
* List all custom domains. List all custom domains in a specified region.
|
|
167
166
|
*
|
|
168
167
|
* @param request - The request {@link ListDomainsRequest}
|
|
169
168
|
* @returns A Promise of ListDomainsResponse
|
|
@@ -173,8 +172,8 @@ export declare class API extends ParentAPI {
|
|
|
173
172
|
[Symbol.asyncIterator]: () => AsyncGenerator<Domain[], void, void>;
|
|
174
173
|
};
|
|
175
174
|
/**
|
|
176
|
-
* Get a domain
|
|
177
|
-
*
|
|
175
|
+
* Get a custom domain. Get a custom domain for the container with the
|
|
176
|
+
* specified ID.
|
|
178
177
|
*
|
|
179
178
|
* @param request - The request {@link GetDomainRequest}
|
|
180
179
|
* @returns A Promise of Domain
|
|
@@ -189,16 +188,15 @@ export declare class API extends ParentAPI {
|
|
|
189
188
|
*/
|
|
190
189
|
waitForDomain: (request: Readonly<GetDomainRequest>, options?: Readonly<WaitForOptions<Domain>>) => Promise<Domain>;
|
|
191
190
|
/**
|
|
192
|
-
* Create a domain
|
|
193
|
-
*
|
|
191
|
+
* Create a custom domain. Create a custom domain for the container with the
|
|
192
|
+
* specified ID.
|
|
194
193
|
*
|
|
195
194
|
* @param request - The request {@link CreateDomainRequest}
|
|
196
195
|
* @returns A Promise of Domain
|
|
197
196
|
*/
|
|
198
197
|
createDomain: (request: Readonly<CreateDomainRequest>) => Promise<Domain>;
|
|
199
198
|
/**
|
|
200
|
-
* Delete a domain
|
|
201
|
-
* specific ID.
|
|
199
|
+
* Delete a custom domain. Delete the custom domain with the specific ID.
|
|
202
200
|
*
|
|
203
201
|
* @param request - The request {@link DeleteDomainRequest}
|
|
204
202
|
* @returns A Promise of Domain
|
|
@@ -339,16 +339,15 @@ class API extends API$1 {
|
|
|
339
339
|
unmarshalListDomainsResponse
|
|
340
340
|
);
|
|
341
341
|
/**
|
|
342
|
-
* List all
|
|
343
|
-
* region.
|
|
342
|
+
* List all custom domains. List all custom domains in a specified region.
|
|
344
343
|
*
|
|
345
344
|
* @param request - The request {@link ListDomainsRequest}
|
|
346
345
|
* @returns A Promise of ListDomainsResponse
|
|
347
346
|
*/
|
|
348
347
|
listDomains = (request) => enrichForPagination("domains", this.pageOfListDomains, request);
|
|
349
348
|
/**
|
|
350
|
-
* Get a domain
|
|
351
|
-
*
|
|
349
|
+
* Get a custom domain. Get a custom domain for the container with the
|
|
350
|
+
* specified ID.
|
|
352
351
|
*
|
|
353
352
|
* @param request - The request {@link GetDomainRequest}
|
|
354
353
|
* @returns A Promise of Domain
|
|
@@ -374,8 +373,8 @@ class API extends API$1 {
|
|
|
374
373
|
options
|
|
375
374
|
);
|
|
376
375
|
/**
|
|
377
|
-
* Create a domain
|
|
378
|
-
*
|
|
376
|
+
* Create a custom domain. Create a custom domain for the container with the
|
|
377
|
+
* specified ID.
|
|
379
378
|
*
|
|
380
379
|
* @param request - The request {@link CreateDomainRequest}
|
|
381
380
|
* @returns A Promise of Domain
|
|
@@ -392,8 +391,7 @@ class API extends API$1 {
|
|
|
392
391
|
unmarshalDomain
|
|
393
392
|
);
|
|
394
393
|
/**
|
|
395
|
-
* Delete a domain
|
|
396
|
-
* specific ID.
|
|
394
|
+
* Delete a custom domain. Delete the custom domain with the specific ID.
|
|
397
395
|
*
|
|
398
396
|
* @param request - The request {@link DeleteDomainRequest}
|
|
399
397
|
* @returns A Promise of Domain
|
|
@@ -514,5 +514,52 @@ class API extends api.API {
|
|
|
514
514
|
},
|
|
515
515
|
marshalling_gen.unmarshalGateway
|
|
516
516
|
);
|
|
517
|
+
/**
|
|
518
|
+
* Add allowed IP range to SSH bastion. Add an IP range (in CIDR notation) to
|
|
519
|
+
* be allowed to connect to the SSH bastion.
|
|
520
|
+
*
|
|
521
|
+
* @param request - The request {@link AddBastionAllowedIPsRequest}
|
|
522
|
+
* @returns A Promise of AddBastionAllowedIPsResponse
|
|
523
|
+
*/
|
|
524
|
+
addBastionAllowedIPs = (request) => this.client.fetch(
|
|
525
|
+
{
|
|
526
|
+
body: JSON.stringify(
|
|
527
|
+
marshalling_gen.marshalAddBastionAllowedIPsRequest(request, this.client.settings)
|
|
528
|
+
),
|
|
529
|
+
headers: jsonContentHeaders,
|
|
530
|
+
method: "POST",
|
|
531
|
+
path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${marshalling.validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips`
|
|
532
|
+
},
|
|
533
|
+
marshalling_gen.unmarshalAddBastionAllowedIPsResponse
|
|
534
|
+
);
|
|
535
|
+
/**
|
|
536
|
+
* Set all IP ranges allowed for SSH bastion. Set a definitive list of IP
|
|
537
|
+
* ranges (in CIDR notation) allowed to connect to the SSH bastion.
|
|
538
|
+
*
|
|
539
|
+
* @param request - The request {@link SetBastionAllowedIPsRequest}
|
|
540
|
+
* @returns A Promise of SetBastionAllowedIPsResponse
|
|
541
|
+
*/
|
|
542
|
+
setBastionAllowedIPs = (request) => this.client.fetch(
|
|
543
|
+
{
|
|
544
|
+
body: JSON.stringify(
|
|
545
|
+
marshalling_gen.marshalSetBastionAllowedIPsRequest(request, this.client.settings)
|
|
546
|
+
),
|
|
547
|
+
headers: jsonContentHeaders,
|
|
548
|
+
method: "PUT",
|
|
549
|
+
path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${marshalling.validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips`
|
|
550
|
+
},
|
|
551
|
+
marshalling_gen.unmarshalSetBastionAllowedIPsResponse
|
|
552
|
+
);
|
|
553
|
+
/**
|
|
554
|
+
* Delete allowed IP range from SSH bastion. Delete an IP range (defined in
|
|
555
|
+
* CIDR notation) from SSH bastion, so that it is no longer allowed to
|
|
556
|
+
* connect.
|
|
557
|
+
*
|
|
558
|
+
* @param request - The request {@link DeleteBastionAllowedIPsRequest}
|
|
559
|
+
*/
|
|
560
|
+
deleteBastionAllowedIPs = (request) => this.client.fetch({
|
|
561
|
+
method: "DELETE",
|
|
562
|
+
path: `/vpc-gw/v2/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${marshalling.validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips/${marshalling.validatePathParam("ipRange", request.ipRange)}`
|
|
563
|
+
});
|
|
517
564
|
}
|
|
518
565
|
exports.API = API;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { WaitForOptions, Zone } from '../../../bridge';
|
|
3
|
-
import type { CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePatRuleRequest, Gateway, GatewayNetwork, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPatRuleRequest, IP, ListGatewayNetworksRequest, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysResponse, ListIPsRequest, ListIPsResponse, ListPatRulesRequest, ListPatRulesResponse, PatRule, RefreshSSHKeysRequest, SetPatRulesRequest, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest } from './types.gen';
|
|
3
|
+
import type { AddBastionAllowedIPsRequest, AddBastionAllowedIPsResponse, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, DeleteBastionAllowedIPsRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePatRuleRequest, Gateway, GatewayNetwork, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPatRuleRequest, IP, ListGatewayNetworksRequest, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysResponse, ListIPsRequest, ListIPsResponse, ListPatRulesRequest, ListPatRulesResponse, PatRule, RefreshSSHKeysRequest, SetBastionAllowedIPsRequest, SetBastionAllowedIPsResponse, SetPatRulesRequest, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Public Gateways API.
|
|
6
6
|
*
|
|
@@ -264,4 +264,28 @@ export declare class API extends ParentAPI {
|
|
|
264
264
|
* @returns A Promise of Gateway
|
|
265
265
|
*/
|
|
266
266
|
refreshSSHKeys: (request: Readonly<RefreshSSHKeysRequest>) => Promise<Gateway>;
|
|
267
|
+
/**
|
|
268
|
+
* Add allowed IP range to SSH bastion. Add an IP range (in CIDR notation) to
|
|
269
|
+
* be allowed to connect to the SSH bastion.
|
|
270
|
+
*
|
|
271
|
+
* @param request - The request {@link AddBastionAllowedIPsRequest}
|
|
272
|
+
* @returns A Promise of AddBastionAllowedIPsResponse
|
|
273
|
+
*/
|
|
274
|
+
addBastionAllowedIPs: (request: Readonly<AddBastionAllowedIPsRequest>) => Promise<AddBastionAllowedIPsResponse>;
|
|
275
|
+
/**
|
|
276
|
+
* Set all IP ranges allowed for SSH bastion. Set a definitive list of IP
|
|
277
|
+
* ranges (in CIDR notation) allowed to connect to the SSH bastion.
|
|
278
|
+
*
|
|
279
|
+
* @param request - The request {@link SetBastionAllowedIPsRequest}
|
|
280
|
+
* @returns A Promise of SetBastionAllowedIPsResponse
|
|
281
|
+
*/
|
|
282
|
+
setBastionAllowedIPs: (request: Readonly<SetBastionAllowedIPsRequest>) => Promise<SetBastionAllowedIPsResponse>;
|
|
283
|
+
/**
|
|
284
|
+
* Delete allowed IP range from SSH bastion. Delete an IP range (defined in
|
|
285
|
+
* CIDR notation) from SSH bastion, so that it is no longer allowed to
|
|
286
|
+
* connect.
|
|
287
|
+
*
|
|
288
|
+
* @param request - The request {@link DeleteBastionAllowedIPsRequest}
|
|
289
|
+
*/
|
|
290
|
+
deleteBastionAllowedIPs: (request: Readonly<DeleteBastionAllowedIPsRequest>) => Promise<void>;
|
|
267
291
|
}
|
|
@@ -4,7 +4,7 @@ import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
|
|
|
4
4
|
import "../../../vendor/base64/index.js";
|
|
5
5
|
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
6
6
|
import { GATEWAY_TRANSIENT_STATUSES, GATEWAY_NETWORK_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
7
|
-
import { unmarshalListGatewaysResponse, unmarshalGateway, marshalCreateGatewayRequest, marshalUpdateGatewayRequest, marshalUpgradeGatewayRequest, unmarshalListGatewayNetworksResponse, unmarshalGatewayNetwork, marshalCreateGatewayNetworkRequest, marshalUpdateGatewayNetworkRequest, unmarshalListPatRulesResponse, unmarshalPatRule, marshalCreatePatRuleRequest, marshalUpdatePatRuleRequest, marshalSetPatRulesRequest, unmarshalSetPatRulesResponse, unmarshalListGatewayTypesResponse, unmarshalListIPsResponse, unmarshalIP, marshalCreateIPRequest, marshalUpdateIPRequest } from "./marshalling.gen.js";
|
|
7
|
+
import { unmarshalListGatewaysResponse, unmarshalGateway, marshalCreateGatewayRequest, marshalUpdateGatewayRequest, marshalUpgradeGatewayRequest, unmarshalListGatewayNetworksResponse, unmarshalGatewayNetwork, marshalCreateGatewayNetworkRequest, marshalUpdateGatewayNetworkRequest, unmarshalListPatRulesResponse, unmarshalPatRule, marshalCreatePatRuleRequest, marshalUpdatePatRuleRequest, marshalSetPatRulesRequest, unmarshalSetPatRulesResponse, unmarshalListGatewayTypesResponse, unmarshalListIPsResponse, unmarshalIP, marshalCreateIPRequest, marshalUpdateIPRequest, marshalAddBastionAllowedIPsRequest, unmarshalAddBastionAllowedIPsResponse, marshalSetBastionAllowedIPsRequest, unmarshalSetBastionAllowedIPsResponse } from "./marshalling.gen.js";
|
|
8
8
|
const jsonContentHeaders = {
|
|
9
9
|
"Content-Type": "application/json; charset=utf-8"
|
|
10
10
|
};
|
|
@@ -512,6 +512,53 @@ class API extends API$1 {
|
|
|
512
512
|
},
|
|
513
513
|
unmarshalGateway
|
|
514
514
|
);
|
|
515
|
+
/**
|
|
516
|
+
* Add allowed IP range to SSH bastion. Add an IP range (in CIDR notation) to
|
|
517
|
+
* be allowed to connect to the SSH bastion.
|
|
518
|
+
*
|
|
519
|
+
* @param request - The request {@link AddBastionAllowedIPsRequest}
|
|
520
|
+
* @returns A Promise of AddBastionAllowedIPsResponse
|
|
521
|
+
*/
|
|
522
|
+
addBastionAllowedIPs = (request) => this.client.fetch(
|
|
523
|
+
{
|
|
524
|
+
body: JSON.stringify(
|
|
525
|
+
marshalAddBastionAllowedIPsRequest(request, this.client.settings)
|
|
526
|
+
),
|
|
527
|
+
headers: jsonContentHeaders,
|
|
528
|
+
method: "POST",
|
|
529
|
+
path: `/vpc-gw/v2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips`
|
|
530
|
+
},
|
|
531
|
+
unmarshalAddBastionAllowedIPsResponse
|
|
532
|
+
);
|
|
533
|
+
/**
|
|
534
|
+
* Set all IP ranges allowed for SSH bastion. Set a definitive list of IP
|
|
535
|
+
* ranges (in CIDR notation) allowed to connect to the SSH bastion.
|
|
536
|
+
*
|
|
537
|
+
* @param request - The request {@link SetBastionAllowedIPsRequest}
|
|
538
|
+
* @returns A Promise of SetBastionAllowedIPsResponse
|
|
539
|
+
*/
|
|
540
|
+
setBastionAllowedIPs = (request) => this.client.fetch(
|
|
541
|
+
{
|
|
542
|
+
body: JSON.stringify(
|
|
543
|
+
marshalSetBastionAllowedIPsRequest(request, this.client.settings)
|
|
544
|
+
),
|
|
545
|
+
headers: jsonContentHeaders,
|
|
546
|
+
method: "PUT",
|
|
547
|
+
path: `/vpc-gw/v2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips`
|
|
548
|
+
},
|
|
549
|
+
unmarshalSetBastionAllowedIPsResponse
|
|
550
|
+
);
|
|
551
|
+
/**
|
|
552
|
+
* Delete allowed IP range from SSH bastion. Delete an IP range (defined in
|
|
553
|
+
* CIDR notation) from SSH bastion, so that it is no longer allowed to
|
|
554
|
+
* connect.
|
|
555
|
+
*
|
|
556
|
+
* @param request - The request {@link DeleteBastionAllowedIPsRequest}
|
|
557
|
+
*/
|
|
558
|
+
deleteBastionAllowedIPs = (request) => this.client.fetch({
|
|
559
|
+
method: "DELETE",
|
|
560
|
+
path: `/vpc-gw/v2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips/${validatePathParam("ipRange", request.ipRange)}`
|
|
561
|
+
});
|
|
515
562
|
}
|
|
516
563
|
export {
|
|
517
564
|
API
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
|
-
export type { CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePatRuleRequest, Gateway, GatewayNetwork, GatewayNetworkStatus, GatewayStatus, GatewayType, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPatRuleRequest, IP, ListGatewayNetworksRequest, ListGatewayNetworksRequestOrderBy, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysRequestOrderBy, ListGatewaysResponse, ListIPsRequest, ListIPsRequestOrderBy, ListIPsResponse, ListPatRulesRequest, ListPatRulesRequestOrderBy, ListPatRulesResponse, PatRule, PatRuleProtocol, RefreshSSHKeysRequest, SetPatRulesRequest, SetPatRulesRequestRule, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest, } from './types.gen';
|
|
3
|
+
export type { AddBastionAllowedIPsRequest, AddBastionAllowedIPsResponse, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, DeleteBastionAllowedIPsRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePatRuleRequest, Gateway, GatewayNetwork, GatewayNetworkStatus, GatewayStatus, GatewayType, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPatRuleRequest, IP, ListGatewayNetworksRequest, ListGatewayNetworksRequestOrderBy, ListGatewayNetworksResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListGatewaysRequest, ListGatewaysRequestOrderBy, ListGatewaysResponse, ListIPsRequest, ListIPsRequestOrderBy, ListIPsResponse, ListPatRulesRequest, ListPatRulesRequestOrderBy, ListPatRulesResponse, PatRule, PatRuleProtocol, RefreshSSHKeysRequest, SetBastionAllowedIPsRequest, SetBastionAllowedIPsResponse, SetPatRulesRequest, SetPatRulesRequestRule, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest, } from './types.gen';
|
|
@@ -51,6 +51,7 @@ const unmarshalGateway = (data) => {
|
|
|
51
51
|
}
|
|
52
52
|
return {
|
|
53
53
|
bandwidth: data.bandwidth,
|
|
54
|
+
bastionAllowedIps: data.bastion_allowed_ips,
|
|
54
55
|
bastionEnabled: data.bastion_enabled,
|
|
55
56
|
bastionPort: data.bastion_port,
|
|
56
57
|
canUpgradeTo: data.can_upgrade_to,
|
|
@@ -92,6 +93,16 @@ const unmarshalPatRule = (data) => {
|
|
|
92
93
|
zone: data.zone
|
|
93
94
|
};
|
|
94
95
|
};
|
|
96
|
+
const unmarshalAddBastionAllowedIPsResponse = (data) => {
|
|
97
|
+
if (!json.isJSONObject(data)) {
|
|
98
|
+
throw new TypeError(
|
|
99
|
+
`Unmarshalling the type 'AddBastionAllowedIPsResponse' failed as data isn't a dictionary.`
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
ipRanges: data.ip_ranges
|
|
104
|
+
};
|
|
105
|
+
};
|
|
95
106
|
const unmarshalListGatewayNetworksResponse = (data) => {
|
|
96
107
|
if (!json.isJSONObject(data)) {
|
|
97
108
|
throw new TypeError(
|
|
@@ -161,6 +172,16 @@ const unmarshalListPatRulesResponse = (data) => {
|
|
|
161
172
|
totalCount: data.total_count
|
|
162
173
|
};
|
|
163
174
|
};
|
|
175
|
+
const unmarshalSetBastionAllowedIPsResponse = (data) => {
|
|
176
|
+
if (!json.isJSONObject(data)) {
|
|
177
|
+
throw new TypeError(
|
|
178
|
+
`Unmarshalling the type 'SetBastionAllowedIPsResponse' failed as data isn't a dictionary.`
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
return {
|
|
182
|
+
ipRanges: data.ip_ranges
|
|
183
|
+
};
|
|
184
|
+
};
|
|
164
185
|
const unmarshalSetPatRulesResponse = (data) => {
|
|
165
186
|
if (!json.isJSONObject(data)) {
|
|
166
187
|
throw new TypeError(
|
|
@@ -171,6 +192,9 @@ const unmarshalSetPatRulesResponse = (data) => {
|
|
|
171
192
|
patRules: marshalling.unmarshalArrayOfObject(data.pat_rules, unmarshalPatRule)
|
|
172
193
|
};
|
|
173
194
|
};
|
|
195
|
+
const marshalAddBastionAllowedIPsRequest = (request, defaults) => ({
|
|
196
|
+
ip_range: request.ipRange
|
|
197
|
+
});
|
|
174
198
|
const marshalCreateGatewayNetworkRequest = (request, defaults) => ({
|
|
175
199
|
enable_masquerade: request.enableMasquerade,
|
|
176
200
|
gateway_id: request.gatewayId,
|
|
@@ -199,6 +223,9 @@ const marshalCreatePatRuleRequest = (request, defaults) => ({
|
|
|
199
223
|
protocol: request.protocol,
|
|
200
224
|
public_port: request.publicPort
|
|
201
225
|
});
|
|
226
|
+
const marshalSetBastionAllowedIPsRequest = (request, defaults) => ({
|
|
227
|
+
ip_ranges: request.ipRanges
|
|
228
|
+
});
|
|
202
229
|
const marshalSetPatRulesRequestRule = (request, defaults) => ({
|
|
203
230
|
private_ip: request.privateIp,
|
|
204
231
|
private_port: request.privatePort,
|
|
@@ -237,16 +264,19 @@ const marshalUpdatePatRuleRequest = (request, defaults) => ({
|
|
|
237
264
|
const marshalUpgradeGatewayRequest = (request, defaults) => ({
|
|
238
265
|
type: request.type
|
|
239
266
|
});
|
|
267
|
+
exports.marshalAddBastionAllowedIPsRequest = marshalAddBastionAllowedIPsRequest;
|
|
240
268
|
exports.marshalCreateGatewayNetworkRequest = marshalCreateGatewayNetworkRequest;
|
|
241
269
|
exports.marshalCreateGatewayRequest = marshalCreateGatewayRequest;
|
|
242
270
|
exports.marshalCreateIPRequest = marshalCreateIPRequest;
|
|
243
271
|
exports.marshalCreatePatRuleRequest = marshalCreatePatRuleRequest;
|
|
272
|
+
exports.marshalSetBastionAllowedIPsRequest = marshalSetBastionAllowedIPsRequest;
|
|
244
273
|
exports.marshalSetPatRulesRequest = marshalSetPatRulesRequest;
|
|
245
274
|
exports.marshalUpdateGatewayNetworkRequest = marshalUpdateGatewayNetworkRequest;
|
|
246
275
|
exports.marshalUpdateGatewayRequest = marshalUpdateGatewayRequest;
|
|
247
276
|
exports.marshalUpdateIPRequest = marshalUpdateIPRequest;
|
|
248
277
|
exports.marshalUpdatePatRuleRequest = marshalUpdatePatRuleRequest;
|
|
249
278
|
exports.marshalUpgradeGatewayRequest = marshalUpgradeGatewayRequest;
|
|
279
|
+
exports.unmarshalAddBastionAllowedIPsResponse = unmarshalAddBastionAllowedIPsResponse;
|
|
250
280
|
exports.unmarshalGateway = unmarshalGateway;
|
|
251
281
|
exports.unmarshalGatewayNetwork = unmarshalGatewayNetwork;
|
|
252
282
|
exports.unmarshalIP = unmarshalIP;
|
|
@@ -256,4 +286,5 @@ exports.unmarshalListGatewaysResponse = unmarshalListGatewaysResponse;
|
|
|
256
286
|
exports.unmarshalListIPsResponse = unmarshalListIPsResponse;
|
|
257
287
|
exports.unmarshalListPatRulesResponse = unmarshalListPatRulesResponse;
|
|
258
288
|
exports.unmarshalPatRule = unmarshalPatRule;
|
|
289
|
+
exports.unmarshalSetBastionAllowedIPsResponse = unmarshalSetBastionAllowedIPsResponse;
|
|
259
290
|
exports.unmarshalSetPatRulesResponse = unmarshalSetPatRulesResponse;
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, Gateway, GatewayNetwork, IP, ListGatewayNetworksResponse, ListGatewayTypesResponse, ListGatewaysResponse, ListIPsResponse, ListPatRulesResponse, PatRule, SetPatRulesRequest, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest } from './types.gen';
|
|
2
|
+
import type { AddBastionAllowedIPsRequest, AddBastionAllowedIPsResponse, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, Gateway, GatewayNetwork, IP, ListGatewayNetworksResponse, ListGatewayTypesResponse, ListGatewaysResponse, ListIPsResponse, ListPatRulesResponse, PatRule, SetBastionAllowedIPsRequest, SetBastionAllowedIPsResponse, SetPatRulesRequest, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest } from './types.gen';
|
|
3
3
|
export declare const unmarshalGatewayNetwork: (data: unknown) => GatewayNetwork;
|
|
4
4
|
export declare const unmarshalIP: (data: unknown) => IP;
|
|
5
5
|
export declare const unmarshalGateway: (data: unknown) => Gateway;
|
|
6
6
|
export declare const unmarshalPatRule: (data: unknown) => PatRule;
|
|
7
|
+
export declare const unmarshalAddBastionAllowedIPsResponse: (data: unknown) => AddBastionAllowedIPsResponse;
|
|
7
8
|
export declare const unmarshalListGatewayNetworksResponse: (data: unknown) => ListGatewayNetworksResponse;
|
|
8
9
|
export declare const unmarshalListGatewayTypesResponse: (data: unknown) => ListGatewayTypesResponse;
|
|
9
10
|
export declare const unmarshalListGatewaysResponse: (data: unknown) => ListGatewaysResponse;
|
|
10
11
|
export declare const unmarshalListIPsResponse: (data: unknown) => ListIPsResponse;
|
|
11
12
|
export declare const unmarshalListPatRulesResponse: (data: unknown) => ListPatRulesResponse;
|
|
13
|
+
export declare const unmarshalSetBastionAllowedIPsResponse: (data: unknown) => SetBastionAllowedIPsResponse;
|
|
12
14
|
export declare const unmarshalSetPatRulesResponse: (data: unknown) => SetPatRulesResponse;
|
|
15
|
+
export declare const marshalAddBastionAllowedIPsRequest: (request: AddBastionAllowedIPsRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
13
16
|
export declare const marshalCreateGatewayNetworkRequest: (request: CreateGatewayNetworkRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
14
17
|
export declare const marshalCreateGatewayRequest: (request: CreateGatewayRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
15
18
|
export declare const marshalCreateIPRequest: (request: CreateIPRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
16
19
|
export declare const marshalCreatePatRuleRequest: (request: CreatePatRuleRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
20
|
+
export declare const marshalSetBastionAllowedIPsRequest: (request: SetBastionAllowedIPsRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
17
21
|
export declare const marshalSetPatRulesRequest: (request: SetPatRulesRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
18
22
|
export declare const marshalUpdateGatewayNetworkRequest: (request: UpdateGatewayNetworkRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
19
23
|
export declare const marshalUpdateGatewayRequest: (request: UpdateGatewayRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -49,6 +49,7 @@ const unmarshalGateway = (data) => {
|
|
|
49
49
|
}
|
|
50
50
|
return {
|
|
51
51
|
bandwidth: data.bandwidth,
|
|
52
|
+
bastionAllowedIps: data.bastion_allowed_ips,
|
|
52
53
|
bastionEnabled: data.bastion_enabled,
|
|
53
54
|
bastionPort: data.bastion_port,
|
|
54
55
|
canUpgradeTo: data.can_upgrade_to,
|
|
@@ -90,6 +91,16 @@ const unmarshalPatRule = (data) => {
|
|
|
90
91
|
zone: data.zone
|
|
91
92
|
};
|
|
92
93
|
};
|
|
94
|
+
const unmarshalAddBastionAllowedIPsResponse = (data) => {
|
|
95
|
+
if (!isJSONObject(data)) {
|
|
96
|
+
throw new TypeError(
|
|
97
|
+
`Unmarshalling the type 'AddBastionAllowedIPsResponse' failed as data isn't a dictionary.`
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
ipRanges: data.ip_ranges
|
|
102
|
+
};
|
|
103
|
+
};
|
|
93
104
|
const unmarshalListGatewayNetworksResponse = (data) => {
|
|
94
105
|
if (!isJSONObject(data)) {
|
|
95
106
|
throw new TypeError(
|
|
@@ -159,6 +170,16 @@ const unmarshalListPatRulesResponse = (data) => {
|
|
|
159
170
|
totalCount: data.total_count
|
|
160
171
|
};
|
|
161
172
|
};
|
|
173
|
+
const unmarshalSetBastionAllowedIPsResponse = (data) => {
|
|
174
|
+
if (!isJSONObject(data)) {
|
|
175
|
+
throw new TypeError(
|
|
176
|
+
`Unmarshalling the type 'SetBastionAllowedIPsResponse' failed as data isn't a dictionary.`
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
ipRanges: data.ip_ranges
|
|
181
|
+
};
|
|
182
|
+
};
|
|
162
183
|
const unmarshalSetPatRulesResponse = (data) => {
|
|
163
184
|
if (!isJSONObject(data)) {
|
|
164
185
|
throw new TypeError(
|
|
@@ -169,6 +190,9 @@ const unmarshalSetPatRulesResponse = (data) => {
|
|
|
169
190
|
patRules: unmarshalArrayOfObject(data.pat_rules, unmarshalPatRule)
|
|
170
191
|
};
|
|
171
192
|
};
|
|
193
|
+
const marshalAddBastionAllowedIPsRequest = (request, defaults) => ({
|
|
194
|
+
ip_range: request.ipRange
|
|
195
|
+
});
|
|
172
196
|
const marshalCreateGatewayNetworkRequest = (request, defaults) => ({
|
|
173
197
|
enable_masquerade: request.enableMasquerade,
|
|
174
198
|
gateway_id: request.gatewayId,
|
|
@@ -197,6 +221,9 @@ const marshalCreatePatRuleRequest = (request, defaults) => ({
|
|
|
197
221
|
protocol: request.protocol,
|
|
198
222
|
public_port: request.publicPort
|
|
199
223
|
});
|
|
224
|
+
const marshalSetBastionAllowedIPsRequest = (request, defaults) => ({
|
|
225
|
+
ip_ranges: request.ipRanges
|
|
226
|
+
});
|
|
200
227
|
const marshalSetPatRulesRequestRule = (request, defaults) => ({
|
|
201
228
|
private_ip: request.privateIp,
|
|
202
229
|
private_port: request.privatePort,
|
|
@@ -236,16 +263,19 @@ const marshalUpgradeGatewayRequest = (request, defaults) => ({
|
|
|
236
263
|
type: request.type
|
|
237
264
|
});
|
|
238
265
|
export {
|
|
266
|
+
marshalAddBastionAllowedIPsRequest,
|
|
239
267
|
marshalCreateGatewayNetworkRequest,
|
|
240
268
|
marshalCreateGatewayRequest,
|
|
241
269
|
marshalCreateIPRequest,
|
|
242
270
|
marshalCreatePatRuleRequest,
|
|
271
|
+
marshalSetBastionAllowedIPsRequest,
|
|
243
272
|
marshalSetPatRulesRequest,
|
|
244
273
|
marshalUpdateGatewayNetworkRequest,
|
|
245
274
|
marshalUpdateGatewayRequest,
|
|
246
275
|
marshalUpdateIPRequest,
|
|
247
276
|
marshalUpdatePatRuleRequest,
|
|
248
277
|
marshalUpgradeGatewayRequest,
|
|
278
|
+
unmarshalAddBastionAllowedIPsResponse,
|
|
249
279
|
unmarshalGateway,
|
|
250
280
|
unmarshalGatewayNetwork,
|
|
251
281
|
unmarshalIP,
|
|
@@ -255,5 +285,6 @@ export {
|
|
|
255
285
|
unmarshalListIPsResponse,
|
|
256
286
|
unmarshalListPatRulesResponse,
|
|
257
287
|
unmarshalPatRule,
|
|
288
|
+
unmarshalSetBastionAllowedIPsResponse,
|
|
258
289
|
unmarshalSetPatRulesResponse
|
|
259
290
|
};
|
|
@@ -110,6 +110,8 @@ export interface Gateway {
|
|
|
110
110
|
smtpEnabled: boolean;
|
|
111
111
|
/** Defines whether the gateway uses non-IPAM IP configurations. */
|
|
112
112
|
isLegacy: boolean;
|
|
113
|
+
/** Ranges of IP addresses allowed to connect to the gateway's SSH bastion. */
|
|
114
|
+
bastionAllowedIps: string[];
|
|
113
115
|
/** Zone of the gateway. */
|
|
114
116
|
zone: Zone;
|
|
115
117
|
}
|
|
@@ -146,6 +148,18 @@ export interface SetPatRulesRequestRule {
|
|
|
146
148
|
/** Protocol the rule should apply to. */
|
|
147
149
|
protocol: PatRuleProtocol;
|
|
148
150
|
}
|
|
151
|
+
export type AddBastionAllowedIPsRequest = {
|
|
152
|
+
/** Zone to target. If none is passed will use default zone from the config. */
|
|
153
|
+
zone?: Zone;
|
|
154
|
+
/** ID of the gateway to add the allowed IP range to. */
|
|
155
|
+
gatewayId: string;
|
|
156
|
+
/** IP range allowed to connect to the SSH bastion. */
|
|
157
|
+
ipRange: string;
|
|
158
|
+
};
|
|
159
|
+
export interface AddBastionAllowedIPsResponse {
|
|
160
|
+
/** Ranges of IP addresses allowed to connect to the gateway's SSH bastion. */
|
|
161
|
+
ipRanges: string[];
|
|
162
|
+
}
|
|
149
163
|
export type CreateGatewayNetworkRequest = {
|
|
150
164
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
151
165
|
zone?: Zone;
|
|
@@ -202,6 +216,14 @@ export type CreatePatRuleRequest = {
|
|
|
202
216
|
/** Protocol the rule should apply to. */
|
|
203
217
|
protocol?: PatRuleProtocol;
|
|
204
218
|
};
|
|
219
|
+
export type DeleteBastionAllowedIPsRequest = {
|
|
220
|
+
/** Zone to target. If none is passed will use default zone from the config. */
|
|
221
|
+
zone?: Zone;
|
|
222
|
+
/** ID of the gateway on which to delete the allowed IP range. */
|
|
223
|
+
gatewayId: string;
|
|
224
|
+
/** IP range to delete from SSH bastion's list of allowed IPs. */
|
|
225
|
+
ipRange: string;
|
|
226
|
+
};
|
|
205
227
|
export type DeleteGatewayNetworkRequest = {
|
|
206
228
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
207
229
|
zone?: Zone;
|
|
@@ -376,6 +398,21 @@ export type RefreshSSHKeysRequest = {
|
|
|
376
398
|
/** ID of the gateway to refresh SSH keys on. */
|
|
377
399
|
gatewayId: string;
|
|
378
400
|
};
|
|
401
|
+
export type SetBastionAllowedIPsRequest = {
|
|
402
|
+
/** Zone to target. If none is passed will use default zone from the config. */
|
|
403
|
+
zone?: Zone;
|
|
404
|
+
/** ID of the gateway on which to set the allowed IP range. */
|
|
405
|
+
gatewayId: string;
|
|
406
|
+
/**
|
|
407
|
+
* New list of IP ranges (each range in CIDR notation) allowed to connect to
|
|
408
|
+
* the SSH bastion.
|
|
409
|
+
*/
|
|
410
|
+
ipRanges?: string[];
|
|
411
|
+
};
|
|
412
|
+
export interface SetBastionAllowedIPsResponse {
|
|
413
|
+
/** Ranges of IP addresses allowed to connect to the gateway's SSH bastion. */
|
|
414
|
+
ipRanges: string[];
|
|
415
|
+
}
|
|
379
416
|
export type SetPatRulesRequest = {
|
|
380
417
|
/** Zone to target. If none is passed will use default zone from the config. */
|
|
381
418
|
zone?: Zone;
|
|
@@ -13,7 +13,7 @@ export type ListMailAccountsRequestOrderBy = 'username_asc' | 'username_desc' |
|
|
|
13
13
|
export type ListOffersRequestOrderBy = 'price_asc';
|
|
14
14
|
export type ListWebsitesRequestOrderBy = 'domain_asc' | 'domain_desc';
|
|
15
15
|
export type NameserverStatus = 'unknown_status' | 'valid' | 'invalid';
|
|
16
|
-
export type OfferOptionName = 'unknown_name' | 'domain_count' | 'email_count' | 'storage_gb' | 'vcpu_count' | 'ram_gb' | 'backup' | 'dedicated_ip' | 'email_storage_gb' | 'database_count';
|
|
16
|
+
export type OfferOptionName = 'unknown_name' | 'domain_count' | 'email_count' | 'storage_gb' | 'vcpu_count' | 'ram_gb' | 'backup' | 'dedicated_ip' | 'email_storage_gb' | 'database_count' | 'support';
|
|
17
17
|
export type OfferOptionWarning = 'unknown_warning' | 'quota_exceeded_warning' | 'usage_low_warning';
|
|
18
18
|
export type PlatformPlatformGroup = 'unknown_group' | 'default' | 'premium';
|
|
19
19
|
export interface PlatformControlPanelUrls {
|
package/dist/scw/constants.cjs
CHANGED
package/dist/scw/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "v2.
|
|
2
|
-
export declare const userAgent = "scaleway-sdk-js/v2.
|
|
1
|
+
export declare const version = "v2.60.0";
|
|
2
|
+
export declare const userAgent = "scaleway-sdk-js/v2.60.0";
|
package/dist/scw/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.61.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Scaleway SDK.",
|
|
6
6
|
"keywords": [
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"bundledDependencies": [
|
|
40
40
|
"@scaleway/random-name"
|
|
41
41
|
],
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "a7748ad8f96c3ac72d7520f904c841f3fc43b5fe"
|
|
43
43
|
}
|