Skip to content

Commit 0898216

Browse files
authored
docs(ipam): document expected format of requested IP (#1258)
1 parent 62bdf3b commit 0898216

File tree

2 files changed

+8
-22
lines changed

2 files changed

+8
-22
lines changed

packages/clients/src/api/ipam/v1/api.gen.ts

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ export class API extends ParentAPI {
5353
),
5454
headers: jsonContentHeaders,
5555
method: 'POST',
56-
path: `/ipam/v1/regions/${validatePathParam(
57-
'region',
58-
request.region ?? this.client.settings.defaultRegion,
59-
)}/ips`,
56+
path: `/ipam/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/ips`,
6057
},
6158
unmarshalIP,
6259
)
@@ -72,10 +69,7 @@ export class API extends ParentAPI {
7269
body: '{}',
7370
headers: jsonContentHeaders,
7471
method: 'DELETE',
75-
path: `/ipam/v1/regions/${validatePathParam(
76-
'region',
77-
request.region ?? this.client.settings.defaultRegion,
78-
)}/ips/${validatePathParam('ipId', request.ipId)}`,
72+
path: `/ipam/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam('ipId', request.ipId)}`,
7973
})
8074

8175
/**
@@ -88,10 +82,7 @@ export class API extends ParentAPI {
8882
this.client.fetch<IP>(
8983
{
9084
method: 'GET',
91-
path: `/ipam/v1/regions/${validatePathParam(
92-
'region',
93-
request.region ?? this.client.settings.defaultRegion,
94-
)}/ips/${validatePathParam('ipId', request.ipId)}`,
85+
path: `/ipam/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam('ipId', request.ipId)}`,
9586
},
9687
unmarshalIP,
9788
)
@@ -110,10 +101,7 @@ export class API extends ParentAPI {
110101
),
111102
headers: jsonContentHeaders,
112103
method: 'PATCH',
113-
path: `/ipam/v1/regions/${validatePathParam(
114-
'region',
115-
request.region ?? this.client.settings.defaultRegion,
116-
)}/ips/${validatePathParam('ipId', request.ipId)}`,
104+
path: `/ipam/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam('ipId', request.ipId)}`,
117105
},
118106
unmarshalIP,
119107
)
@@ -122,10 +110,7 @@ export class API extends ParentAPI {
122110
this.client.fetch<ListIPsResponse>(
123111
{
124112
method: 'GET',
125-
path: `/ipam/v1/regions/${validatePathParam(
126-
'region',
127-
request.region ?? this.client.settings.defaultRegion,
128-
)}/ips`,
113+
path: `/ipam/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/ips`,
129114
urlParams: urlParams(
130115
['attached', request.attached],
131116
['is_ipv6', request.isIpv6],

packages/clients/src/api/ipam/v1/types.gen.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@ export type BookIPRequest = {
115115
/** Request an IPv6 instead of an IPv4. */
116116
isIpv6: boolean
117117
/**
118-
* Note that only the Private Network source allows you to pick a specific IP.
119-
* If the requested IP is already booked, then the call will fail.
118+
* The requested address should not include the subnet mask (/suffix). Note
119+
* that only the Private Network source allows you to pick a specific IP. If
120+
* the requested IP is already booked, then the call will fail.
120121
*/
121122
address?: string
122123
/** Tags for the IP. */

0 commit comments

Comments
 (0)