Skip to content

Commit 8ec5042

Browse files
authored
feat(mongodb): add support for generated instance name (#1513)
1 parent f030f54 commit 8ec5042

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/clients/src/api/mongodb/v1alpha1/marshalling.gen.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
3+
import randomName from '@scaleway/random-name'
34
import {
45
isJSONObject,
56
resolveOneOf,
@@ -392,7 +393,7 @@ export const marshalCreateInstanceRequest = (
392393
request.endpoints !== undefined
393394
? request.endpoints.map(elt => marshalEndpointSpec(elt, defaults))
394395
: undefined,
395-
name: request.name,
396+
name: request.name || randomName('mgdb'),
396397
node_number: request.nodeNumber,
397398
node_type: request.nodeType,
398399
password: request.password,

packages/clients/src/api/mongodb/v1alpha1/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export type CreateInstanceRequest = {
267267
/** The Project ID on which the Database Instance will be created. */
268268
projectId?: string
269269
/** Name of the Database Instance. */
270-
name: string
270+
name?: string
271271
/** Version of the MongoDB™ engine. */
272272
version: string
273273
/** Tags to apply to the Database Instance. */

0 commit comments

Comments
 (0)