Skip to content

Commit b6f4aad

Browse files
authored
feat(interlink): add support for peer_asn (#1971)
1 parent 61bc600 commit b6f4aad

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

packages/clients/src/api/interlink/v1beta1/marshalling.gen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ export const marshalCreateLinkRequest = (
288288
): Record<string, unknown> => ({
289289
bandwidth_mbps: request.bandwidthMbps,
290290
name: request.name,
291+
peer_asn: request.peerAsn,
291292
pop_id: request.popId,
292293
project_id: request.projectId ?? defaults.defaultProjectId,
293294
tags: request.tags,
@@ -313,6 +314,7 @@ export const marshalUpdateLinkRequest = (
313314
defaults: DefaultValues,
314315
): Record<string, unknown> => ({
315316
name: request.name,
317+
peer_asn: request.peerAsn,
316318
tags: request.tags,
317319
})
318320

packages/clients/src/api/interlink/v1beta1/types.gen.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,10 @@ export type CreateLinkRequest = {
418418
* One-of ('host'): at most one of 'connectionId', 'partnerId' could be set.
419419
*/
420420
partnerId?: string
421+
/**
422+
* For self-hosted links we need the peer AS Number to establish BGP session. If not given, a default one will be assigned.
423+
*/
424+
peerAsn?: number
421425
}
422426

423427
export type CreateRoutingPolicyRequest = {
@@ -857,6 +861,10 @@ export type UpdateLinkRequest = {
857861
* List of tags to apply to the link.
858862
*/
859863
tags?: string[]
864+
/**
865+
* For self-hosted links, AS Number to establish BGP session.
866+
*/
867+
peerAsn?: number
860868
}
861869

862870
export type UpdateRoutingPolicyRequest = {

packages/clients/src/api/interlink/v1beta1/validation-rules.gen.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ export const CreateLinkRequest = {
1717
maxLength: 255,
1818
minLength: 1,
1919
},
20+
peerAsn: {
21+
greaterThanOrEqual: 1,
22+
lessThanOrEqual: 65534,
23+
},
2024
}
2125

2226
export const CreateRoutingPolicyRequest = {
@@ -114,6 +118,10 @@ export const UpdateLinkRequest = {
114118
maxLength: 255,
115119
minLength: 1,
116120
},
121+
peerAsn: {
122+
greaterThanOrEqual: 1,
123+
lessThanOrEqual: 65534,
124+
},
117125
}
118126

119127
export const UpdateRoutingPolicyRequest = {

0 commit comments

Comments
 (0)