Skip to content

Commit

Permalink
feat(vpc/v2): add ListSubnets docs (#1293)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored May 24, 2024
1 parent 7900a3b commit 76da78e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/clients/src/api/vpc/v2/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,18 @@ export class API extends ParentAPI {
unmarshalListSubnetsResponse,
)

/**
* List subnets. List any Private Network's subnets. See ListPrivateNetworks
* to list a specific Private Network's subnets.
*
* @param request - The request {@link ListSubnetsRequest}
* @returns A Promise of ListSubnetsResponse
*/
listSubnets = (request: Readonly<ListSubnetsRequest> = {}) =>
enrichForPagination('subnets', this.pageOfListSubnets, request)

/**
* Set the subnets of a Private Network. Set subnets for an existing Private
* Set a Private Network's subnets. Set subnets for an existing Private
* Network. Note that the method is PUT and not PATCH. Any existing subnets
* will be removed in favor of the new specified set of subnets.
*
Expand Down
16 changes: 16 additions & 0 deletions packages/clients/src/api/vpc/v2/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,28 @@ export type ListSubnetsRequest = {
* config.
*/
region?: Region
/** Sort order of the returned subnets. */
orderBy?: ListSubnetsRequestOrderBy
/** Page number to return, from the paginated results. */
page?: number
/** Maximum number of Private Networks to return per page. */
pageSize?: number
/**
* Organization ID to filter for. Only subnets belonging to this Organization
* will be returned.
*/
organizationId?: string
/**
* Project ID to filter for. Only subnets belonging to this Project will be
* returned.
*/
projectId?: string
/**
* Subnet IDs to filter for. Only subnets matching the specified IDs will be
* returned.
*/
subnetIds?: string[]
/** VPC ID to filter for. Only subnets belonging to this VPC will be returned. */
vpcId?: string
}

Expand Down

0 comments on commit 76da78e

Please sign in to comment.