File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
packages/clients/src/api/vpc/v2 Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ export class API extends ParentAPI {
7474 request . pageSize ?? this . client . settings . defaultPageSize ,
7575 ] ,
7676 [ 'project_id' , request . projectId ] ,
77+ [ 'routing_enabled' , request . routingEnabled ] ,
7778 [ 'tags' , request . tags ] ,
7879 ) ,
7980 } ,
@@ -95,7 +96,7 @@ export class API extends ParentAPI {
9596 * @param request - The request {@link CreateVPCRequest}
9697 * @returns A Promise of VPC
9798 */
98- createVPC = ( request : Readonly < CreateVPCRequest > = { } ) =>
99+ createVPC = ( request : Readonly < CreateVPCRequest > ) =>
99100 this . client . fetch < VPC > (
100101 {
101102 body : JSON . stringify (
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ export const unmarshalVPC = (data: unknown): VPC => {
8080 privateNetworkCount : data . private_network_count ,
8181 projectId : data . project_id ,
8282 region : data . region ,
83+ routingEnabled : data . routing_enabled ,
8384 tags : data . tags ,
8485 updatedAt : unmarshalDate ( data . updated_at ) ,
8586 } as VPC
@@ -180,6 +181,7 @@ export const marshalCreateVPCRequest = (
180181 request : CreateVPCRequest ,
181182 defaults : DefaultValues ,
182183) : Record < string , unknown > => ( {
184+ enable_routing : request . enableRouting ,
183185 name : request . name || randomName ( 'vpc' ) ,
184186 project_id : request . projectId ?? defaults . defaultProjectId ,
185187 tags : request . tags ,
Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ export interface VPC {
7171 updatedAt ?: Date
7272 /** Number of Private Networks within this VPC. */
7373 privateNetworkCount : number
74+ /** Defines whether the VPC routes traffic between its Private Networks. */
75+ routingEnabled : boolean
7476}
7577
7678export type AddSubnetsRequest = {
@@ -119,6 +121,8 @@ export type CreateVPCRequest = {
119121 projectId ?: string
120122 /** Tags for the VPC. */
121123 tags ?: string [ ]
124+ /** Enable routing between Private Networks in the VPC. */
125+ enableRouting : boolean
122126}
123127
124128export type DeletePrivateNetworkRequest = {
@@ -278,6 +282,11 @@ export type ListVPCsRequest = {
278282 * Project.
279283 */
280284 isDefault ?: boolean
285+ /**
286+ * Defines whether to filter only for VPCs which route traffic between their
287+ * Private Networks.
288+ */
289+ routingEnabled ?: boolean
281290}
282291
283292export interface ListVPCsResponse {
You can’t perform that action at this time.
0 commit comments