Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions packages_generated/vpc/src/v2/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import type {
DeleteSubnetsRequest,
DeleteSubnetsResponse,
DeleteVPCRequest,
EnableCustomRoutesPropagationRequest,
EnableDHCPRequest,
EnableRoutingRequest,
GetAclRequest,
Expand Down Expand Up @@ -312,6 +313,25 @@ export class API extends ParentAPI {
unmarshalVPC,
)

/**
* Enable custom routes propagation on a VPC. Enable custom routes propagation on an existing VPC. Note that you will not be able to deactivate it afterwards.
*
* @param request - The request {@link EnableCustomRoutesPropagationRequest}
* @returns A Promise of VPC
*/
enableCustomRoutesPropagation = (
request: Readonly<EnableCustomRoutesPropagationRequest>,
) =>
this.client.fetch<VPC>(
{
body: '{}',
headers: jsonContentHeaders,
method: 'POST',
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam('vpcId', request.vpcId)}/enable-custom-routes-propagation`,
},
unmarshalVPC,
)

protected pageOfListSubnets = (request: Readonly<ListSubnetsRequest> = {}) =>
this.client.fetch<ListSubnetsResponse>(
{
Expand Down
1 change: 1 addition & 0 deletions packages_generated/vpc/src/v2/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type {
DeleteSubnetsRequest,
DeleteSubnetsResponse,
DeleteVPCRequest,
EnableCustomRoutesPropagationRequest,
EnableDHCPRequest,
EnableRoutingRequest,
GetAclRequest,
Expand Down
1 change: 1 addition & 0 deletions packages_generated/vpc/src/v2/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export const unmarshalVPC = (data: unknown): VPC => {

return {
createdAt: unmarshalDate(data.created_at),
customRoutesPropagationEnabled: data.custom_routes_propagation_enabled,
id: data.id,
isDefault: data.is_default,
name: data.name,
Expand Down
15 changes: 15 additions & 0 deletions packages_generated/vpc/src/v2/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ export interface VPC {
* Defines whether the VPC routes traffic between its Private Networks.
*/
routingEnabled: boolean
/**
* Defines whether the VPC advertises custom routes between its Private Networks.
*/
customRoutesPropagationEnabled: boolean
}

export type AddSubnetsRequest = {
Expand Down Expand Up @@ -391,6 +395,17 @@ export type DeleteVPCRequest = {
vpcId: string
}

export type EnableCustomRoutesPropagationRequest = {
/**
* Region to target. If none is passed will use default region from the config.
*/
region?: ScwRegion
/**
* VPC ID.
*/
vpcId: string
}

export type EnableDHCPRequest = {
/**
* Region to target. If none is passed will use default region from the config.
Expand Down
Loading