diff --git a/packages/clients/src/api/mongodb/v1alpha1/api.gen.ts b/packages/clients/src/api/mongodb/v1alpha1/api.gen.ts index c8ea6f183..6f4f0f539 100644 --- a/packages/clients/src/api/mongodb/v1alpha1/api.gen.ts +++ b/packages/clients/src/api/mongodb/v1alpha1/api.gen.ts @@ -34,6 +34,7 @@ import type { CreateInstanceRequest, CreateSnapshotRequest, CreateUserRequest, + DeleteEndpointRequest, DeleteInstanceRequest, DeleteSnapshotRequest, GetInstanceCertificateRequest, @@ -521,4 +522,18 @@ export class API extends ParentAPI { }, unmarshalUser, ) + + /** + * Delete a Database Instance endpoint. Delete the endpoint of a Database + * Instance. You must specify the `endpoint_id` parameter of the endpoint you + * want to delete. Note that you might need to update any environment + * configurations that point to the deleted endpoint. + * + * @param request - The request {@link DeleteEndpointRequest} + */ + deleteEndpoint = (request: Readonly) => + this.client.fetch({ + method: 'DELETE', + path: `/mongodb/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/endpoints/${validatePathParam('endpointId', request.endpointId)}`, + }) } diff --git a/packages/clients/src/api/mongodb/v1alpha1/index.gen.ts b/packages/clients/src/api/mongodb/v1alpha1/index.gen.ts index 734c25891..34d98a87f 100644 --- a/packages/clients/src/api/mongodb/v1alpha1/index.gen.ts +++ b/packages/clients/src/api/mongodb/v1alpha1/index.gen.ts @@ -7,6 +7,7 @@ export type { CreateInstanceRequestVolumeDetails, CreateSnapshotRequest, CreateUserRequest, + DeleteEndpointRequest, DeleteInstanceRequest, DeleteSnapshotRequest, Endpoint, diff --git a/packages/clients/src/api/mongodb/v1alpha1/types.gen.ts b/packages/clients/src/api/mongodb/v1alpha1/types.gen.ts index 95d958daf..231378fb3 100644 --- a/packages/clients/src/api/mongodb/v1alpha1/types.gen.ts +++ b/packages/clients/src/api/mongodb/v1alpha1/types.gen.ts @@ -314,6 +314,16 @@ export type CreateUserRequest = { password: string } +export type DeleteEndpointRequest = { + /** + * Region to target. If none is passed will use default region from the + * config. + */ + region?: Region + /** UUID of the Endpoint to delete. */ + endpointId: string +} + export type DeleteInstanceRequest = { /** * Region to target. If none is passed will use default region from the