Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: batch update instances (#16411)
ecmadaoc8a76ee477c4
diff --git a/backend/api/v1/instance_service.go b/backend/api/v1/instance_service.goindex a3bdc50f40..71076c681b 100644--- a/backend/api/v1/instance_service.go+++ b/backend/api/v1/instance_service.go@@ -599,7 +599,7 @@ func (s *InstanceService) SyncInstance(ctx context.Context, request *v1pb.SyncInreturn response, nil}-// SyncInstance syncs the instance.+// BatchSyncInstances syncs multiple instances.func (s *InstanceService) BatchSyncInstances(ctx context.Context, request *v1pb.BatchSyncInstancesRequest) (*v1pb.BatchSyncInstancesResponse, error) {for _, r := range request.Requests {instance, err := getInstanceMessage(ctx, s.store, r.Name)@@ -625,6 +625,19 @@ func (s *InstanceService) BatchSyncInstances(ctx context.Context, request *v1pb.return &v1pb.BatchSyncInstancesResponse{}, nil}+// BatchUpdateInstances update multiple instances.+func (s *InstanceService) BatchUpdateInstances(ctx context.Context, request *v1pb.BatchUpdateInstancesRequest) (*v1pb.BatchUpdateInstancesResponse, error) {+ response := &v1pb.BatchUpdateInstancesResponse{}+ for _, req := range request.GetRequests() {+ updated, err := s.UpdateInstance(ctx, req)+ if err != nil {+ return nil, err+ }+ response.Instances = append(response.Instances, updated)+ }+ return response, nil+}+// AddDataSource adds a data source to an instance.func (s *InstanceService) AddDataSource(ctx context.Context, request *v1pb.AddDataSourceRequest) (*v1pb.Instance, error) {if request.DataSource == nil {diff --git a/frontend/src/components/DatabaseEditEnvironmentDrawer.vue b/frontend/src/components/EditEnvironmentDrawer.vuesimilarity index 94%rename from frontend/src/components/DatabaseEditEnvironmentDrawer.vuerename to frontend/src/components/EditEnvironmentDrawer.vueindex aa04797c4e..91866d6611 100644--- a/frontend/src/components/DatabaseEditEnvironmentDrawer.vue+++ b/frontend/src/components/EditEnvironmentDrawer.vue@@ -30,11 +30,9 @@import { NButton } from "naive-ui";import { computed, ref } from "vue";import { Drawer, DrawerContent, EnvironmentSelect } from "@/components/v2";-import type { ComposedDatabase } from "@/types";defineProps<{show: boolean;- databases: ComposedDatabase[];}>();const emit = defineEmits<{diff --git a/frontend/src/components/Instance/InstanceSyncButton.vue b/frontend/src/components/Instance/InstanceSyncButton.vueindex b5d9a823c0..046f98883e 100644--- a/frontend/src/components/Instance/InstanceSyncButton.vue+++ b/frontend/src/components/Instance/InstanceSyncButton.vue@@ -1,17 +1,16 @@<template><NDropdown- v-if="allowSyncInstance":trigger="'click'":options="syncInstnceOptions":render-label="renderDropdownLabel"- :disabled="disabled || syncingSchema"+ :disabled="!allowSyncInstance || disabled || syncingSchema"@select="syncSchema"><NButtonicon-placement="right":loading="syncingSchema":quaternary="quaternary"- :disabled="disabled"+ :disabled="!allowSyncInstance || disabled":size="size":type="type">diff --git a/frontend/src/components/ProjectDatabasesPanel.vue b/frontend/src/components/ProjectDatabasesPanel.vueindex 790b6c083f..441cf6b861 100644--- a/frontend/src/components/ProjectDatabasesPanel.vue+++ b/frontend/src/components/ProjectDatabasesPanel.vue@@ -25,9 +25,7 @@:project-name="project.name":databases="selectedDatabases"@refresh="() => pagedDatabaseTableRef?.refresh()"- @update-cache="- (databases) => pagedDatabaseTableRef?.updateCache(databases)- "+ @update="(databases) => pagedDatabaseTableRef?.updateCache(databases)"/><PagedDatabaseTableref="pagedDatabaseTableRef"diff --git a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vue b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vueindex 747c6c45a1..bace7f8d64 100644--- a/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vue+++ b/frontend/src/components/v2/Model/DatabaseV1Table/DatabaseOperations.vue@@ -57,9 +57,8 @@@apply="onLabelsApply($event)"/>- <DatabaseEditEnvironmentDrawer+ <EditEnvironmentDrawer:show="state.showEditEnvironmentDrawer"- :databases="databases"@dismiss="state.showEditEnvironmentDrawer = false"@update="onEnvironmentUpdate($event)"/>@@ -120,7 +119,7 @@ import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";import { BBAlert } from "@/bbkit";import SchemaEditorModal from "@/components/AlterSchemaPrepForm/SchemaEditorModal.vue";-import DatabaseEditEnvironmentDrawer from "@/components/DatabaseEditEnvironmentDrawer.vue";+import EditEnvironmentDrawer from "@/components/EditEnvironmentDrawer.vue";import LabelEditorDrawer from "@/components/LabelEditorDrawer.vue";import { TransferDatabaseForm } from "@/components/TransferDatabaseForm";import TransferOutDatabaseForm from "@/components/TransferOutDatabaseForm";@@ -187,7 +186,7 @@ const state = reactive<LocalState>({const emit = defineEmits<{(event: "refresh"): void;- (event: "update-cache", databases: ComposedDatabase[]): void;+ (event: "update", databases: ComposedDatabase[]): void;}>();const { t } = useI18n();@@ -623,7 +622,7 @@ const onLabelsApply = async (labelsList: { [key: string]: string }[]) => {});}));- emit("update-cache", updatedDatabases);+ emit("update", updatedDatabases);pushNotification({module: "bytebase",@@ -645,7 +644,7 @@ const onEnvironmentUpdate = async (environment: string) => {});}),});- emit("update-cache", updatedDatabases);+ emit("update", updatedDatabases);pushNotification({module: "bytebase",diff --git a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vueindex 6567abd21a..f14ef4b8ac 100644--- a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue+++ b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceOperations.vue@@ -34,14 +34,21 @@:selected-instance-list="instanceList.map((ins) => ins.name)"@dismiss="state.showAssignLicenseDrawer = false"/>++ <EditEnvironmentDrawer+ :show="state.showEditEnvironmentDrawer"+ @dismiss="state.showEditEnvironmentDrawer = false"+ @update="onEnvironmentUpdate($event)"+ /></template><script setup lang="tsx">-import { GraduationCapIcon } from "lucide-vue-next";+import { GraduationCapIcon, SquareStackIcon } from "lucide-vue-next";import { NButton } from "naive-ui";import type { VNode } from "vue";import { computed, h, reactive } from "vue";import { useI18n } from "vue-i18n";+import EditEnvironmentDrawer from "@/components/EditEnvironmentDrawer.vue";import InstanceSyncButton from "@/components/Instance/InstanceSyncButton.vue";import InstanceAssignment from "@/components/InstanceAssignment.vue";import {@@ -64,18 +71,24 @@ interface Action {interface LocalState {loading: boolean;showAssignLicenseDrawer: boolean;+ showEditEnvironmentDrawer: boolean;}const props = defineProps<{instanceList: ComposedInstance[];}>();+const emit = defineEmits<{+ (event: "update", instances: ComposedInstance[]): void;+}>();+const { t } = useI18n();const instanceStore = useInstanceV1Store();const subscriptionStore = useSubscriptionV1Store();const state = reactive<LocalState>({loading: false,showAssignLicenseDrawer: false,+ showEditEnvironmentDrawer: false,});const canAssignLicense = computed(() => {@@ -100,15 +113,21 @@ const actions = computed((): Action[] => {},];- if (- hasWorkspacePermissionV2("bb.instances.update") &&- canAssignLicense.value- ) {+ if (hasWorkspacePermissionV2("bb.instances.update")) {list.push({- icon: h(GraduationCapIcon),- text: t("subscription.instance-assignment.assign-license"),- click: () => (state.showAssignLicenseDrawer = true),+ icon: h(SquareStackIcon),+ text: t("database.edit-environment"),+ disabled: props.instanceList.length < 1,+ click: () => (state.showEditEnvironmentDrawer = true),});++ if (canAssignLicense.value) {+ list.push({+ icon: h(GraduationCapIcon),+ text: t("subscription.instance-assignment.assign-license"),+ click: () => (state.showAssignLicenseDrawer = true),+ });+ }}return list;});@@ -124,4 +143,22 @@ const syncSchema = async (enableFullSync: boolean) => {title: t("db.start-to-sync-schema"),});};++const onEnvironmentUpdate = async (environment: string) => {+ const updated = await instanceStore.batchUpdateInstances(+ props.instanceList.map((instance) => ({+ instance: {+ ...instance,+ environment,+ },+ updateMask: ["environment"],+ }))+ );+ emit("update", updated);+ pushNotification({+ module: "bytebase",+ style: "SUCCESS",+ title: t("common.updated"),+ });+};</script>diff --git a/frontend/src/store/modules/v1/instance.ts b/frontend/src/store/modules/v1/instance.tsindex 53c4b0fdfc..cb185e17f3 100644--- a/frontend/src/store/modules/v1/instance.ts+++ b/frontend/src/store/modules/v1/instance.ts@@ -11,7 +11,11 @@ import {} from "@/types";import type { Engine } from "@/types/proto/v1/common";import { State, stateToJSON, engineToJSON } from "@/types/proto/v1/common";-import type { DataSource, Instance } from "@/types/proto/v1/instance_service";+import type {+ DataSource,+ Instance,+ UpdateInstanceRequest,+} from "@/types/proto/v1/instance_service";import { extractInstanceResourceName, hasWorkspacePermissionV2 } from "@/utils";import { useEnvironmentV1Store } from "./environment";@@ -130,6 +134,15 @@ export const useInstanceV1Store = defineStore("instance_v1", () => {requests: instanceNameList.map((name) => ({ name, enableFullSync })),});};++ const batchUpdateInstances = async (requests: UpdateInstanceRequest[]) => {+ const response = await instanceServiceClient.batchUpdateInstances({+ requests,+ });+ const composed = await upsertInstances(response.instances);+ return composed;+ };+const fetchInstanceByName = async (name: string, silent = false) => {const instance = await instanceServiceClient.getInstance({@@ -233,6 +246,7 @@ export const useInstanceV1Store = defineStore("instance_v1", () => {restoreInstance,syncInstance,batchSyncInstances,+ batchUpdateInstances,getInstanceByName,getOrFetchInstanceByName,createDataSource,diff --git a/frontend/src/types/proto/v1/instance_service.ts b/frontend/src/types/proto/v1/instance_service.tsindex c85f8772e9..2d3313881e 100644--- a/frontend/src/types/proto/v1/instance_service.ts+++ b/frontend/src/types/proto/v1/instance_service.ts@@ -242,6 +242,15 @@ export interface BatchSyncInstancesRequest {export interface BatchSyncInstancesResponse {}+export interface BatchUpdateInstancesRequest {+ /** The request message specifying the resources to update. */+ requests: UpdateInstanceRequest[];+}++export interface BatchUpdateInstancesResponse {+ instances: Instance[];+}+export interface AddDataSourceRequest {/*** The name of the instance to add a data source to.@@ -1628,6 +1637,114 @@ export const BatchSyncInstancesResponse: MessageFns<BatchSyncInstancesResponse>},};+function createBaseBatchUpdateInstancesRequest(): BatchUpdateInstancesRequest {+ return { requests: [] };+}++export const BatchUpdateInstancesRequest: MessageFns<BatchUpdateInstancesRequest> = {+ encode(message: BatchUpdateInstancesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {+ for (const v of message.requests) {+ UpdateInstanceRequest.encode(v!, writer.uint32(10).fork()).join();+ }+ return writer;+ },++ decode(input: BinaryReader | Uint8Array, length?: number): BatchUpdateInstancesRequest {+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseBatchUpdateInstancesRequest();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1: {+ if (tag !== 10) {+ break;+ }++ message.requests.push(UpdateInstanceRequest.decode(reader, reader.uint32()));+ continue;+ }+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skip(tag & 7);+ }+ return message;+ },++ toJSON(message: BatchUpdateInstancesRequest): unknown {+ const obj: any = {};+ if (message.requests?.length) {+ obj.requests = message.requests.map((e) => UpdateInstanceRequest.toJSON(e));+ }+ return obj;+ },++ create(base?: DeepPartial<BatchUpdateInstancesRequest>): BatchUpdateInstancesRequest {+ return BatchUpdateInstancesRequest.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<BatchUpdateInstancesRequest>): BatchUpdateInstancesRequest {+ const message = createBaseBatchUpdateInstancesRequest();+ message.requests = object.requests?.map((e) => UpdateInstanceRequest.fromPartial(e)) || [];+ return message;+ },+};++function createBaseBatchUpdateInstancesResponse(): BatchUpdateInstancesResponse {+ return { instances: [] };+}++export const BatchUpdateInstancesResponse: MessageFns<BatchUpdateInstancesResponse> = {+ encode(message: BatchUpdateInstancesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {+ for (const v of message.instances) {+ Instance.encode(v!, writer.uint32(10).fork()).join();+ }+ return writer;+ },++ decode(input: BinaryReader | Uint8Array, length?: number): BatchUpdateInstancesResponse {+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseBatchUpdateInstancesResponse();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1: {+ if (tag !== 10) {+ break;+ }++ message.instances.push(Instance.decode(reader, reader.uint32()));+ continue;+ }+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skip(tag & 7);+ }+ return message;+ },++ toJSON(message: BatchUpdateInstancesResponse): unknown {+ const obj: any = {};+ if (message.instances?.length) {+ obj.instances = message.instances.map((e) => Instance.toJSON(e));+ }+ return obj;+ },++ create(base?: DeepPartial<BatchUpdateInstancesResponse>): BatchUpdateInstancesResponse {+ return BatchUpdateInstancesResponse.fromPartial(base ?? {});+ },+ fromPartial(object: DeepPartial<BatchUpdateInstancesResponse>): BatchUpdateInstancesResponse {+ const message = createBaseBatchUpdateInstancesResponse();+ message.instances = object.instances?.map((e) => Instance.fromPartial(e)) || [];+ return message;+ },+};+function createBaseAddDataSourceRequest(): AddDataSourceRequest {return { name: "", dataSource: undefined, validateOnly: false };}@@ -4153,6 +4270,78 @@ export const InstanceServiceDefinition = {},},},+ batchUpdateInstances: {+ name: "BatchUpdateInstances",+ requestType: BatchUpdateInstancesRequest,+ requestStream: false,+ responseType: BatchUpdateInstancesResponse,+ responseStream: false,+ options: {+ _unknownFields: {+ 800010: [+ new Uint8Array([+ 19,+ 98,+ 98,+ 46,+ 105,+ 110,+ 115,+ 116,+ 97,+ 110,+ 99,+ 101,+ 115,+ 46,+ 117,+ 112,+ 100,+ 97,+ 116,+ 101,+ ]),+ ],+ 800016: [new Uint8Array([1])],+ 800024: [new Uint8Array([1])],+ 578365826: [+ new Uint8Array([+ 30,+ 58,+ 1,+ 42,+ 34,+ 25,+ 47,+ 118,+ 49,+ 47,+ 105,+ 110,+ 115,+ 116,+ 97,+ 110,+ 99,+ 101,+ 115,+ 58,+ 98,+ 97,+ 116,+ 99,+ 104,+ 85,+ 112,+ 100,+ 97,+ 116,+ 101,+ ]),+ ],+ },+ },+ },addDataSource: {name: "AddDataSource",requestType: AddDataSourceRequest,diff --git a/frontend/src/views/DatabaseDashboard.vue b/frontend/src/views/DatabaseDashboard.vueindex fdedc8707d..3bceff4d30 100644--- a/frontend/src/views/DatabaseDashboard.vue+++ b/frontend/src/views/DatabaseDashboard.vue@@ -27,9 +27,7 @@<DatabaseOperations:databases="selectedDatabases"@refresh="() => pagedDatabaseTableRef?.refresh()"- @update-cache="- (databases) => pagedDatabaseTableRef?.updateCache(databases)- "+ @update="(databases) => pagedDatabaseTableRef?.updateCache(databases)"/><PagedDatabaseTableref="pagedDatabaseTableRef"diff --git a/frontend/src/views/InstanceDashboard.vue b/frontend/src/views/InstanceDashboard.vueindex 5f0d842b3f..9fdb2042c5 100644--- a/frontend/src/views/InstanceDashboard.vue+++ b/frontend/src/views/InstanceDashboard.vue@@ -24,8 +24,12 @@</NButton></div><div class="space-y-2">- <InstanceOperations :instance-list="selectedInstanceList" />+ <InstanceOperations+ :instance-list="selectedInstanceList"+ @update="(instances) => pagedInstanceTableRef?.updateCache(instances)"+ /><PagedInstanceTable+ ref="pagedInstanceTableRef"session-key="bb.instance-table":bordered="false":filter="filter"@@ -68,7 +72,7 @@<script lang="tsx" setup>import { PlusIcon } from "lucide-vue-next";import { NButton } from "naive-ui";-import { computed, onMounted, reactive } from "vue";+import { computed, onMounted, reactive, ref } from "vue";import { useI18n } from "vue-i18n";import { useRouter } from "vue-router";import AdvancedSearch from "@/components/AdvancedSearch";@@ -112,6 +116,7 @@ const instanceV1Store = useInstanceV1Store();const uiStateStore = useUIStateStore();const actuatorStore = useActuatorV1Store();const router = useRouter();+const pagedInstanceTableRef = ref<InstanceType<typeof PagedInstanceTable>>();const state = reactive<LocalState>({params: {diff --git a/frontend/src/views/InstanceDetail.vue b/frontend/src/views/InstanceDetail.vueindex 8a66c5e9bb..40748371fe 100644--- a/frontend/src/views/InstanceDetail.vue+++ b/frontend/src/views/InstanceDetail.vue@@ -50,7 +50,7 @@<DatabaseOperations:databases="selectedDatabases"@refresh="() => pagedDatabaseTableRef?.refresh()"- @update-cache="+ @update="(databases) => pagedDatabaseTableRef?.updateCache(databases)"/>diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 84744fd7a8..30d1513370 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -3056,6 +3056,30 @@ paths:application/json:schema:$ref: '#/components/schemas/Status'+ /v1/instances:batchUpdate:+ post:+ tags:+ - InstanceService+ operationId: InstanceService_BatchUpdateInstances+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/BatchUpdateInstancesRequest'+ required: true+ responses:+ "200":+ description: OK+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/BatchUpdateInstancesResponse'+ default:+ description: Default error response+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/Status'/v1/policies:get:tags:@@ -8507,6 +8531,23 @@ components:items:$ref: '#/components/schemas/Database'description: Databases updated.+ BatchUpdateInstancesRequest:+ required:+ - requests+ type: object+ properties:+ requests:+ type: array+ items:+ $ref: '#/components/schemas/UpdateInstanceRequest'+ description: The request message specifying the resources to update.+ BatchUpdateInstancesResponse:+ type: object+ properties:+ instances:+ type: array+ items:+ $ref: '#/components/schemas/Instance'BatchUpdateIssuesStatusRequest:required:- parent@@ -13983,6 +14024,23 @@ components:type: stringdescription: The list of fields to update.format: field-mask+ UpdateInstanceRequest:+ required:+ - instance+ type: object+ properties:+ instance:+ allOf:+ - $ref: '#/components/schemas/Instance'+ description: |-+ The instance to update.++ The instance's `name` field is used to identify the instance to update.+ Format: instances/{instance}+ updateMask:+ type: string+ description: The list of fields to update.+ format: field-maskUpdateWebhookRequest:required:- webhookdiff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex d3bfafe383..694ac9bc7e 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -50,6 +50,8 @@- [AddDataSourceRequest](#bytebase-v1-AddDataSourceRequest)- [BatchSyncInstancesRequest](#bytebase-v1-BatchSyncInstancesRequest)- [BatchSyncInstancesResponse](#bytebase-v1-BatchSyncInstancesResponse)+ - [BatchUpdateInstancesRequest](#bytebase-v1-BatchUpdateInstancesRequest)+ - [BatchUpdateInstancesResponse](#bytebase-v1-BatchUpdateInstancesResponse)- [CreateInstanceRequest](#bytebase-v1-CreateInstanceRequest)- [DataSource](#bytebase-v1-DataSource)- [DataSource.Address](#bytebase-v1-DataSource-Address)@@ -1261,6 +1263,36 @@ When paginating, all other parameters provided to `ListInstanceRoles` must match+<a name="bytebase-v1-BatchUpdateInstancesRequest"></a>++### BatchUpdateInstancesRequest++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| requests | [UpdateInstanceRequest](#bytebase-v1-UpdateInstanceRequest) | repeated | The request message specifying the resources to update. |+++++++<a name="bytebase-v1-BatchUpdateInstancesResponse"></a>++### BatchUpdateInstancesResponse++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| instances | [Instance](#bytebase-v1-Instance) | repeated | |++++++<a name="bytebase-v1-CreateInstanceRequest"></a>### CreateInstanceRequest@@ -1807,6 +1839,7 @@ The instance's `name` field is used to identify the instance to update. Form| SyncInstance | [SyncInstanceRequest](#bytebase-v1-SyncInstanceRequest) | [SyncInstanceResponse](#bytebase-v1-SyncInstanceResponse) | || ListInstanceDatabase | [ListInstanceDatabaseRequest](#bytebase-v1-ListInstanceDatabaseRequest) | [ListInstanceDatabaseResponse](#bytebase-v1-ListInstanceDatabaseResponse) | || BatchSyncInstances | [BatchSyncInstancesRequest](#bytebase-v1-BatchSyncInstancesRequest) | [BatchSyncInstancesResponse](#bytebase-v1-BatchSyncInstancesResponse) | |+| BatchUpdateInstances | [BatchUpdateInstancesRequest](#bytebase-v1-BatchUpdateInstancesRequest) | [BatchUpdateInstancesResponse](#bytebase-v1-BatchUpdateInstancesResponse) | || AddDataSource | [AddDataSourceRequest](#bytebase-v1-AddDataSourceRequest) | [Instance](#bytebase-v1-Instance) | || RemoveDataSource | [RemoveDataSourceRequest](#bytebase-v1-RemoveDataSourceRequest) | [Instance](#bytebase-v1-Instance) | || UpdateDataSource | [UpdateDataSourceRequest](#bytebase-v1-UpdateDataSourceRequest) | [Instance](#bytebase-v1-Instance) | |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 682d76f62e..454d69122f 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -354,6 +354,14 @@<a href="#bytebase.v1.BatchSyncInstancesResponse"><span class="badge">M</span>BatchSyncInstancesResponse</a></li>+ <li>+ <a href="#bytebase.v1.BatchUpdateInstancesRequest"><span class="badge">M</span>BatchUpdateInstancesRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.BatchUpdateInstancesResponse"><span class="badge">M</span>BatchUpdateInstancesResponse</a>+ </li>+<li><a href="#bytebase.v1.CreateInstanceRequest"><span class="badge">M</span>CreateInstanceRequest</a></li>@@ -4160,6 +4168,54 @@ A maximum of 1000 instances can be synced in a batch. </p></td>+ <h3 id="bytebase.v1.BatchUpdateInstancesRequest">BatchUpdateInstancesRequest</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>requests</td>+ <td><a href="#bytebase.v1.UpdateInstanceRequest">UpdateInstanceRequest</a></td>+ <td>repeated</td>+ <td><p>The request message specifying the resources to update. </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.BatchUpdateInstancesResponse">BatchUpdateInstancesResponse</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>instances</td>+ <td><a href="#bytebase.v1.Instance">Instance</a></td>+ <td>repeated</td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.v1.CreateInstanceRequest">CreateInstanceRequest</h3><p></p>@@ -5663,6 +5719,13 @@ Format: instances/{instance} </p></td><td><p></p></td></tr>+ <tr>+ <td>BatchUpdateInstances</td>+ <td><a href="#bytebase.v1.BatchUpdateInstancesRequest">BatchUpdateInstancesRequest</a></td>+ <td><a href="#bytebase.v1.BatchUpdateInstancesResponse">BatchUpdateInstancesResponse</a></td>+ <td><p></p></td>+ </tr>+<tr><td>AddDataSource</td><td><a href="#bytebase.v1.AddDataSourceRequest">AddDataSourceRequest</a></td>@@ -5794,6 +5857,16 @@ Format: instances/{instance} </p></td>+ <tr>+ <td>BatchUpdateInstances</td>+ <td>POST</td>+ <td>/v1/instances:batchUpdate</td>+ <td>*</td>+ </tr>++++<tr><td>AddDataSource</td><td>POST</td>diff --git a/proto/generated-go/v1/instance_service.pb.go b/proto/generated-go/v1/instance_service.pb.goindex fdcf288bee..336af95d47 100644--- a/proto/generated-go/v1/instance_service.pb.go+++ b/proto/generated-go/v1/instance_service.pb.go@@ -126,7 +126,7 @@ func (x DataSourceExternalSecret_SecretType) Number() protoreflect.EnumNumber {// Deprecated: Use DataSourceExternalSecret_SecretType.Descriptor instead.func (DataSourceExternalSecret_SecretType) EnumDescriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{17, 0}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{19, 0}}type DataSourceExternalSecret_AuthType int32@@ -177,7 +177,7 @@ func (x DataSourceExternalSecret_AuthType) Number() protoreflect.EnumNumber {// Deprecated: Use DataSourceExternalSecret_AuthType.Descriptor instead.func (DataSourceExternalSecret_AuthType) EnumDescriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{17, 1}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{19, 1}}type DataSourceExternalSecret_AppRoleAuthOption_SecretType int32@@ -226,7 +226,7 @@ func (x DataSourceExternalSecret_AppRoleAuthOption_SecretType) Number() protoref// Deprecated: Use DataSourceExternalSecret_AppRoleAuthOption_SecretType.Descriptor instead.func (DataSourceExternalSecret_AppRoleAuthOption_SecretType) EnumDescriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{17, 0, 0}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{19, 0, 0}}type DataSource_AuthenticationType int32@@ -281,7 +281,7 @@ func (x DataSource_AuthenticationType) Number() protoreflect.EnumNumber {// Deprecated: Use DataSource_AuthenticationType.Descriptor instead.func (DataSource_AuthenticationType) EnumDescriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{18, 0}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{20, 0}}type DataSource_RedisType int32@@ -333,7 +333,7 @@ func (x DataSource_RedisType) Number() protoreflect.EnumNumber {// Deprecated: Use DataSource_RedisType.Descriptor instead.func (DataSource_RedisType) EnumDescriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{18, 1}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{20, 1}}type GetInstanceRequest struct {@@ -1054,6 +1054,95 @@ func (*BatchSyncInstancesResponse) Descriptor() ([]byte, []int) {return file_v1_instance_service_proto_rawDescGZIP(), []int{12}}+type BatchUpdateInstancesRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // The request message specifying the resources to update.+ Requests []*UpdateInstanceRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *BatchUpdateInstancesRequest) Reset() {+ *x = BatchUpdateInstancesRequest{}+ mi := &file_v1_instance_service_proto_msgTypes[13]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *BatchUpdateInstancesRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*BatchUpdateInstancesRequest) ProtoMessage() {}++func (x *BatchUpdateInstancesRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_instance_service_proto_msgTypes[13]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use BatchUpdateInstancesRequest.ProtoReflect.Descriptor instead.+func (*BatchUpdateInstancesRequest) Descriptor() ([]byte, []int) {+ return file_v1_instance_service_proto_rawDescGZIP(), []int{13}+}++func (x *BatchUpdateInstancesRequest) GetRequests() []*UpdateInstanceRequest {+ if x != nil {+ return x.Requests+ }+ return nil+}++type BatchUpdateInstancesResponse struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Instances []*Instance `protobuf:"bytes,1,rep,name=instances,proto3" json:"instances,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *BatchUpdateInstancesResponse) Reset() {+ *x = BatchUpdateInstancesResponse{}+ mi := &file_v1_instance_service_proto_msgTypes[14]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *BatchUpdateInstancesResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*BatchUpdateInstancesResponse) ProtoMessage() {}++func (x *BatchUpdateInstancesResponse) ProtoReflect() protoreflect.Message {+ mi := &file_v1_instance_service_proto_msgTypes[14]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use BatchUpdateInstancesResponse.ProtoReflect.Descriptor instead.+func (*BatchUpdateInstancesResponse) Descriptor() ([]byte, []int) {+ return file_v1_instance_service_proto_rawDescGZIP(), []int{14}+}++func (x *BatchUpdateInstancesResponse) GetInstances() []*Instance {+ if x != nil {+ return x.Instances+ }+ return nil+}+type AddDataSourceRequest struct {state protoimpl.MessageState `protogen:"open.v1"`// The name of the instance to add a data source to.@@ -1070,7 +1159,7 @@ type AddDataSourceRequest struct {func (x *AddDataSourceRequest) Reset() {*x = AddDataSourceRequest{}- mi := &file_v1_instance_service_proto_msgTypes[13]+ mi := &file_v1_instance_service_proto_msgTypes[15]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1082,7 +1171,7 @@ func (x *AddDataSourceRequest) String() string {func (*AddDataSourceRequest) ProtoMessage() {}func (x *AddDataSourceRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_instance_service_proto_msgTypes[13]+ mi := &file_v1_instance_service_proto_msgTypes[15]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1095,7 +1184,7 @@ func (x *AddDataSourceRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use AddDataSourceRequest.ProtoReflect.Descriptor instead.func (*AddDataSourceRequest) Descriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{13}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{15}}func (x *AddDataSourceRequest) GetName() string {@@ -1133,7 +1222,7 @@ type RemoveDataSourceRequest struct {func (x *RemoveDataSourceRequest) Reset() {*x = RemoveDataSourceRequest{}- mi := &file_v1_instance_service_proto_msgTypes[14]+ mi := &file_v1_instance_service_proto_msgTypes[16]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1145,7 +1234,7 @@ func (x *RemoveDataSourceRequest) String() string {func (*RemoveDataSourceRequest) ProtoMessage() {}func (x *RemoveDataSourceRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_instance_service_proto_msgTypes[14]+ mi := &file_v1_instance_service_proto_msgTypes[16]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1158,7 +1247,7 @@ func (x *RemoveDataSourceRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use RemoveDataSourceRequest.ProtoReflect.Descriptor instead.func (*RemoveDataSourceRequest) Descriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{14}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{16}}func (x *RemoveDataSourceRequest) GetName() string {@@ -1192,7 +1281,7 @@ type UpdateDataSourceRequest struct {func (x *UpdateDataSourceRequest) Reset() {*x = UpdateDataSourceRequest{}- mi := &file_v1_instance_service_proto_msgTypes[15]+ mi := &file_v1_instance_service_proto_msgTypes[17]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1204,7 +1293,7 @@ func (x *UpdateDataSourceRequest) String() string {func (*UpdateDataSourceRequest) ProtoMessage() {}func (x *UpdateDataSourceRequest) ProtoReflect() protoreflect.Message {- mi := &file_v1_instance_service_proto_msgTypes[15]+ mi := &file_v1_instance_service_proto_msgTypes[17]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1217,7 +1306,7 @@ func (x *UpdateDataSourceRequest) ProtoReflect() protoreflect.Message {// Deprecated: Use UpdateDataSourceRequest.ProtoReflect.Descriptor instead.func (*UpdateDataSourceRequest) Descriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{15}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{17}}func (x *UpdateDataSourceRequest) GetName() string {@@ -1278,7 +1367,7 @@ type Instance struct {func (x *Instance) Reset() {*x = Instance{}- mi := &file_v1_instance_service_proto_msgTypes[16]+ mi := &file_v1_instance_service_proto_msgTypes[18]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1290,7 +1379,7 @@ func (x *Instance) String() string {func (*Instance) ProtoMessage() {}func (x *Instance) ProtoReflect() protoreflect.Message {- mi := &file_v1_instance_service_proto_msgTypes[16]+ mi := &file_v1_instance_service_proto_msgTypes[18]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1303,7 +1392,7 @@ func (x *Instance) ProtoReflect() protoreflect.Message {// Deprecated: Use Instance.ProtoReflect.Descriptor instead.func (*Instance) Descriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{16}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{18}}func (x *Instance) GetName() string {@@ -1419,7 +1508,7 @@ type DataSourceExternalSecret struct {func (x *DataSourceExternalSecret) Reset() {*x = DataSourceExternalSecret{}- mi := &file_v1_instance_service_proto_msgTypes[17]+ mi := &file_v1_instance_service_proto_msgTypes[19]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1431,7 +1520,7 @@ func (x *DataSourceExternalSecret) String() string {func (*DataSourceExternalSecret) ProtoMessage() {}func (x *DataSourceExternalSecret) ProtoReflect() protoreflect.Message {- mi := &file_v1_instance_service_proto_msgTypes[17]+ mi := &file_v1_instance_service_proto_msgTypes[19]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1444,7 +1533,7 @@ func (x *DataSourceExternalSecret) ProtoReflect() protoreflect.Message {// Deprecated: Use DataSourceExternalSecret.ProtoReflect.Descriptor instead.func (*DataSourceExternalSecret) Descriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{17}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{19}}func (x *DataSourceExternalSecret) GetSecretType() DataSourceExternalSecret_SecretType {@@ -1603,7 +1692,7 @@ type DataSource struct {func (x *DataSource) Reset() {*x = DataSource{}- mi := &file_v1_instance_service_proto_msgTypes[18]+ mi := &file_v1_instance_service_proto_msgTypes[20]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1615,7 +1704,7 @@ func (x *DataSource) String() string {func (*DataSource) ProtoMessage() {}func (x *DataSource) ProtoReflect() protoreflect.Message {- mi := &file_v1_instance_service_proto_msgTypes[18]+ mi := &file_v1_instance_service_proto_msgTypes[20]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1628,7 +1717,7 @@ func (x *DataSource) ProtoReflect() protoreflect.Message {// Deprecated: Use DataSource.ProtoReflect.Descriptor instead.func (*DataSource) Descriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{18}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{20}}func (x *DataSource) GetId() string {@@ -1921,7 +2010,7 @@ type InstanceResource struct {func (x *InstanceResource) Reset() {*x = InstanceResource{}- mi := &file_v1_instance_service_proto_msgTypes[19]+ mi := &file_v1_instance_service_proto_msgTypes[21]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1933,7 +2022,7 @@ func (x *InstanceResource) String() string {func (*InstanceResource) ProtoMessage() {}func (x *InstanceResource) ProtoReflect() protoreflect.Message {- mi := &file_v1_instance_service_proto_msgTypes[19]+ mi := &file_v1_instance_service_proto_msgTypes[21]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1946,7 +2035,7 @@ func (x *InstanceResource) ProtoReflect() protoreflect.Message {// Deprecated: Use InstanceResource.ProtoReflect.Descriptor instead.func (*InstanceResource) Descriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{19}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{21}}func (x *InstanceResource) GetTitle() string {@@ -2010,7 +2099,7 @@ type SASLConfig struct {func (x *SASLConfig) Reset() {*x = SASLConfig{}- mi := &file_v1_instance_service_proto_msgTypes[20]+ mi := &file_v1_instance_service_proto_msgTypes[22]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2022,7 +2111,7 @@ func (x *SASLConfig) String() string {func (*SASLConfig) ProtoMessage() {}func (x *SASLConfig) ProtoReflect() protoreflect.Message {- mi := &file_v1_instance_service_proto_msgTypes[20]+ mi := &file_v1_instance_service_proto_msgTypes[22]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2035,7 +2124,7 @@ func (x *SASLConfig) ProtoReflect() protoreflect.Message {// Deprecated: Use SASLConfig.ProtoReflect.Descriptor instead.func (*SASLConfig) Descriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{20}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{22}}func (x *SASLConfig) GetMechanism() isSASLConfig_Mechanism {@@ -2079,7 +2168,7 @@ type KerberosConfig struct {func (x *KerberosConfig) Reset() {*x = KerberosConfig{}- mi := &file_v1_instance_service_proto_msgTypes[21]+ mi := &file_v1_instance_service_proto_msgTypes[23]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2091,7 +2180,7 @@ func (x *KerberosConfig) String() string {func (*KerberosConfig) ProtoMessage() {}func (x *KerberosConfig) ProtoReflect() protoreflect.Message {- mi := &file_v1_instance_service_proto_msgTypes[21]+ mi := &file_v1_instance_service_proto_msgTypes[23]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2104,7 +2193,7 @@ func (x *KerberosConfig) ProtoReflect() protoreflect.Message {// Deprecated: Use KerberosConfig.ProtoReflect.Descriptor instead.func (*KerberosConfig) Descriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{21}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{23}}func (x *KerberosConfig) GetPrimary() string {@@ -2170,7 +2259,7 @@ type DataSourceExternalSecret_AppRoleAuthOption struct {func (x *DataSourceExternalSecret_AppRoleAuthOption) Reset() {*x = DataSourceExternalSecret_AppRoleAuthOption{}- mi := &file_v1_instance_service_proto_msgTypes[22]+ mi := &file_v1_instance_service_proto_msgTypes[24]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2182,7 +2271,7 @@ func (x *DataSourceExternalSecret_AppRoleAuthOption) String() string {func (*DataSourceExternalSecret_AppRoleAuthOption) ProtoMessage() {}func (x *DataSourceExternalSecret_AppRoleAuthOption) ProtoReflect() protoreflect.Message {- mi := &file_v1_instance_service_proto_msgTypes[22]+ mi := &file_v1_instance_service_proto_msgTypes[24]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2195,7 +2284,7 @@ func (x *DataSourceExternalSecret_AppRoleAuthOption) ProtoReflect() protoreflect// Deprecated: Use DataSourceExternalSecret_AppRoleAuthOption.ProtoReflect.Descriptor instead.func (*DataSourceExternalSecret_AppRoleAuthOption) Descriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{17, 0}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{19, 0}}func (x *DataSourceExternalSecret_AppRoleAuthOption) GetRoleId() string {@@ -2237,7 +2326,7 @@ type DataSource_ClientSecretCredential struct {func (x *DataSource_ClientSecretCredential) Reset() {*x = DataSource_ClientSecretCredential{}- mi := &file_v1_instance_service_proto_msgTypes[23]+ mi := &file_v1_instance_service_proto_msgTypes[25]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2249,7 +2338,7 @@ func (x *DataSource_ClientSecretCredential) String() string {func (*DataSource_ClientSecretCredential) ProtoMessage() {}func (x *DataSource_ClientSecretCredential) ProtoReflect() protoreflect.Message {- mi := &file_v1_instance_service_proto_msgTypes[23]+ mi := &file_v1_instance_service_proto_msgTypes[25]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2262,7 +2351,7 @@ func (x *DataSource_ClientSecretCredential) ProtoReflect() protoreflect.Message// Deprecated: Use DataSource_ClientSecretCredential.ProtoReflect.Descriptor instead.func (*DataSource_ClientSecretCredential) Descriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{18, 0}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{20, 0}}func (x *DataSource_ClientSecretCredential) GetTenantId() string {@@ -2296,7 +2385,7 @@ type DataSource_Address struct {func (x *DataSource_Address) Reset() {*x = DataSource_Address{}- mi := &file_v1_instance_service_proto_msgTypes[24]+ mi := &file_v1_instance_service_proto_msgTypes[26]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2308,7 +2397,7 @@ func (x *DataSource_Address) String() string {func (*DataSource_Address) ProtoMessage() {}func (x *DataSource_Address) ProtoReflect() protoreflect.Message {- mi := &file_v1_instance_service_proto_msgTypes[24]+ mi := &file_v1_instance_service_proto_msgTypes[26]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2321,7 +2410,7 @@ func (x *DataSource_Address) ProtoReflect() protoreflect.Message {// Deprecated: Use DataSource_Address.ProtoReflect.Descriptor instead.func (*DataSource_Address) Descriptor() ([]byte, []int) {- return file_v1_instance_service_proto_rawDescGZIP(), []int{18, 1}+ return file_v1_instance_service_proto_rawDescGZIP(), []int{20, 1}}func (x *DataSource_Address) GetHost() string {@@ -2386,7 +2475,11 @@ const file_v1_instance_service_proto_rawDesc = "" +"\tdatabases\x18\x01 \x03(\tR\tdatabases\"_\n" +"\x19BatchSyncInstancesRequest\x12B\n" +"\brequests\x18\x01 \x03(\v2 .bytebase.v1.SyncInstanceRequestB\x04\xe2A\x01\x02R\brequests\"\x1c\n" +- "\x1aBatchSyncInstancesResponse\"\xaf\x01\n" ++ "\x1aBatchSyncInstancesResponse\"c\n" ++ "\x1bBatchUpdateInstancesRequest\x12D\n" ++ "\brequests\x18\x01 \x03(\v2\".bytebase.v1.UpdateInstanceRequestB\x04\xe2A\x01\x02R\brequests\"S\n" ++ "\x1cBatchUpdateInstancesResponse\x123\n" ++ "\tinstances\x18\x01 \x03(\v2\x15.bytebase.v1.InstanceR\tinstances\"\xaf\x01\n" +"\x14AddDataSourceRequest\x122\n" +"\x04name\x18\x01 \x01(\tB\x1e\xe2A\x01\x02\xfaA\x17\n" +"\x15bytebase.com/InstanceR\x04name\x12>\n" +@@ -2550,7 +2643,7 @@ const file_v1_instance_service_proto_rawDesc = "" +"\x0eDataSourceType\x12\x1b\n" +"\x17DATA_SOURCE_UNSPECIFIED\x10\x00\x12\t\n" +"\x05ADMIN\x10\x01\x12\r\n" +- "\tREAD_ONLY\x10\x022\xfd\x0e\n" ++ "\tREAD_ONLY\x10\x022\xb0\x10\n" +"\x0fInstanceService\x12\x84\x01\n" +"\vGetInstance\x12\x1f.bytebase.v1.GetInstanceRequest\x1a\x15.bytebase.v1.Instance\"=\xdaA\x04name\x8a\xea0\x10bb.instances.get\x90\xea0\x01\x82\xd3\xe4\x93\x02\x18\x12\x16/v1/{name=instances/*}\x12\x89\x01\n" +"\rListInstances\x12!.bytebase.v1.ListInstancesRequest\x1a\".bytebase.v1.ListInstancesResponse\"1\xdaA\x00\x8a\xea0\x11bb.instances.list\x90\xea0\x01\x82\xd3\xe4\x93\x02\x0f\x12\r/v1/instances\x12\x96\x01\n" +@@ -2560,7 +2653,8 @@ const file_v1_instance_service_proto_rawDesc = "" +"\x10UndeleteInstance\x12$.bytebase.v1.UndeleteInstanceRequest\x1a\x15.bytebase.v1.Instance\"K\x8a\xea0\x15bb.instances.undelete\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02$:\x01*\"\x1f/v1/{name=instances/*}:undelete\x12\x94\x01\n" +"\fSyncInstance\x12 .bytebase.v1.SyncInstanceRequest\x1a!.bytebase.v1.SyncInstanceResponse\"?\x8a\xea0\x11bb.instances.sync\x90\xea0\x01\x82\xd3\xe4\x93\x02 :\x01*\"\x1b/v1/{name=instances/*}:sync\x12\xb0\x01\n" +"\x14ListInstanceDatabase\x12(.bytebase.v1.ListInstanceDatabaseRequest\x1a).bytebase.v1.ListInstanceDatabaseResponse\"C\x8a\xea0\x10bb.instances.get\x90\xea0\x01\x82\xd3\xe4\x93\x02%:\x01*\" /v1/{name=instances/*}:databases\x12\xa2\x01\n" +- "\x12BatchSyncInstances\x12&.bytebase.v1.BatchSyncInstancesRequest\x1a'.bytebase.v1.BatchSyncInstancesResponse\";\x8a\xea0\x11bb.instances.sync\x90\xea0\x01\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/v1/instances:batchSync\x12\x99\x01\n" ++ "\x12BatchSyncInstances\x12&.bytebase.v1.BatchSyncInstancesRequest\x1a'.bytebase.v1.BatchSyncInstancesResponse\";\x8a\xea0\x11bb.instances.sync\x90\xea0\x01\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/v1/instances:batchSync\x12\xb0\x01\n" ++ "\x14BatchUpdateInstances\x12(.bytebase.v1.BatchUpdateInstancesRequest\x1a).bytebase.v1.BatchUpdateInstancesResponse\"C\x8a\xea0\x13bb.instances.update\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02\x1e:\x01*\"\x19/v1/instances:batchUpdate\x12\x99\x01\n" +"\rAddDataSource\x12!.bytebase.v1.AddDataSourceRequest\x1a\x15.bytebase.v1.Instance\"N\x8a\xea0\x13bb.instances.update\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02):\x01*\"$/v1/{name=instances/*}:addDataSource\x12\xa2\x01\n" +"\x10RemoveDataSource\x12$.bytebase.v1.RemoveDataSourceRequest\x1a\x15.bytebase.v1.Instance\"Q\x8a\xea0\x13bb.instances.update\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02,:\x01*\"'/v1/{name=instances/*}:removeDataSource\x12\xa2\x01\n" +"\x10UpdateDataSource\x12$.bytebase.v1.UpdateDataSourceRequest\x1a\x15.bytebase.v1.Instance\"Q\x8a\xea0\x13bb.instances.update\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02,:\x01*2'/v1/{name=instances/*}:updateDataSourceB\x11Z\x0fgenerated-go/v1b\x06proto3"@@ -2578,7 +2672,7 @@ func file_v1_instance_service_proto_rawDescGZIP() []byte {}var file_v1_instance_service_proto_enumTypes = make([]protoimpl.EnumInfo, 6)-var file_v1_instance_service_proto_msgTypes = make([]protoimpl.MessageInfo, 26)+var file_v1_instance_service_proto_msgTypes = make([]protoimpl.MessageInfo, 28)var file_v1_instance_service_proto_goTypes = []any{(DataSourceType)(0), // 0: bytebase.v1.DataSourceType(DataSourceExternalSecret_SecretType)(0), // 1: bytebase.v1.DataSourceExternalSecret.SecretType@@ -2599,86 +2693,92 @@ var file_v1_instance_service_proto_goTypes = []any{(*SyncInstanceResponse)(nil), // 16: bytebase.v1.SyncInstanceResponse(*BatchSyncInstancesRequest)(nil), // 17: bytebase.v1.BatchSyncInstancesRequest(*BatchSyncInstancesResponse)(nil), // 18: bytebase.v1.BatchSyncInstancesResponse- (*AddDataSourceRequest)(nil), // 19: bytebase.v1.AddDataSourceRequest- (*RemoveDataSourceRequest)(nil), // 20: bytebase.v1.RemoveDataSourceRequest- (*UpdateDataSourceRequest)(nil), // 21: bytebase.v1.UpdateDataSourceRequest- (*Instance)(nil), // 22: bytebase.v1.Instance- (*DataSourceExternalSecret)(nil), // 23: bytebase.v1.DataSourceExternalSecret- (*DataSource)(nil), // 24: bytebase.v1.DataSource- (*InstanceResource)(nil), // 25: bytebase.v1.InstanceResource- (*SASLConfig)(nil), // 26: bytebase.v1.SASLConfig- (*KerberosConfig)(nil), // 27: bytebase.v1.KerberosConfig- (*DataSourceExternalSecret_AppRoleAuthOption)(nil), // 28: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption- (*DataSource_ClientSecretCredential)(nil), // 29: bytebase.v1.DataSource.ClientSecretCredential- (*DataSource_Address)(nil), // 30: bytebase.v1.DataSource.Address- nil, // 31: bytebase.v1.DataSource.ExtraConnectionParametersEntry- (*fieldmaskpb.FieldMask)(nil), // 32: google.protobuf.FieldMask- (State)(0), // 33: bytebase.v1.State- (Engine)(0), // 34: bytebase.v1.Engine- (*InstanceRole)(nil), // 35: bytebase.v1.InstanceRole- (*durationpb.Duration)(nil), // 36: google.protobuf.Duration- (*emptypb.Empty)(nil), // 37: google.protobuf.Empty+ (*BatchUpdateInstancesRequest)(nil), // 19: bytebase.v1.BatchUpdateInstancesRequest+ (*BatchUpdateInstancesResponse)(nil), // 20: bytebase.v1.BatchUpdateInstancesResponse+ (*AddDataSourceRequest)(nil), // 21: bytebase.v1.AddDataSourceRequest+ (*RemoveDataSourceRequest)(nil), // 22: bytebase.v1.RemoveDataSourceRequest+ (*UpdateDataSourceRequest)(nil), // 23: bytebase.v1.UpdateDataSourceRequest+ (*Instance)(nil), // 24: bytebase.v1.Instance+ (*DataSourceExternalSecret)(nil), // 25: bytebase.v1.DataSourceExternalSecret+ (*DataSource)(nil), // 26: bytebase.v1.DataSource+ (*InstanceResource)(nil), // 27: bytebase.v1.InstanceResource+ (*SASLConfig)(nil), // 28: bytebase.v1.SASLConfig+ (*KerberosConfig)(nil), // 29: bytebase.v1.KerberosConfig+ (*DataSourceExternalSecret_AppRoleAuthOption)(nil), // 30: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption+ (*DataSource_ClientSecretCredential)(nil), // 31: bytebase.v1.DataSource.ClientSecretCredential+ (*DataSource_Address)(nil), // 32: bytebase.v1.DataSource.Address+ nil, // 33: bytebase.v1.DataSource.ExtraConnectionParametersEntry+ (*fieldmaskpb.FieldMask)(nil), // 34: google.protobuf.FieldMask+ (State)(0), // 35: bytebase.v1.State+ (Engine)(0), // 36: bytebase.v1.Engine+ (*InstanceRole)(nil), // 37: bytebase.v1.InstanceRole+ (*durationpb.Duration)(nil), // 38: google.protobuf.Duration+ (*emptypb.Empty)(nil), // 39: google.protobuf.Empty}var file_v1_instance_service_proto_depIdxs = []int32{- 22, // 0: bytebase.v1.ListInstancesResponse.instances:type_name -> bytebase.v1.Instance- 22, // 1: bytebase.v1.CreateInstanceRequest.instance:type_name -> bytebase.v1.Instance- 22, // 2: bytebase.v1.UpdateInstanceRequest.instance:type_name -> bytebase.v1.Instance- 32, // 3: bytebase.v1.UpdateInstanceRequest.update_mask:type_name -> google.protobuf.FieldMask- 22, // 4: bytebase.v1.ListInstanceDatabaseRequest.instance:type_name -> bytebase.v1.Instance+ 24, // 0: bytebase.v1.ListInstancesResponse.instances:type_name -> bytebase.v1.Instance+ 24, // 1: bytebase.v1.CreateInstanceRequest.instance:type_name -> bytebase.v1.Instance+ 24, // 2: bytebase.v1.UpdateInstanceRequest.instance:type_name -> bytebase.v1.Instance+ 34, // 3: bytebase.v1.UpdateInstanceRequest.update_mask:type_name -> google.protobuf.FieldMask+ 24, // 4: bytebase.v1.ListInstanceDatabaseRequest.instance:type_name -> bytebase.v1.Instance13, // 5: bytebase.v1.BatchSyncInstancesRequest.requests:type_name -> bytebase.v1.SyncInstanceRequest- 24, // 6: bytebase.v1.AddDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource- 24, // 7: bytebase.v1.RemoveDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource- 24, // 8: bytebase.v1.UpdateDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource- 32, // 9: bytebase.v1.UpdateDataSourceRequest.update_mask:type_name -> google.protobuf.FieldMask- 33, // 10: bytebase.v1.Instance.state:type_name -> bytebase.v1.State- 34, // 11: bytebase.v1.Instance.engine:type_name -> bytebase.v1.Engine- 24, // 12: bytebase.v1.Instance.data_sources:type_name -> bytebase.v1.DataSource- 35, // 13: bytebase.v1.Instance.roles:type_name -> bytebase.v1.InstanceRole- 36, // 14: bytebase.v1.Instance.sync_interval:type_name -> google.protobuf.Duration- 1, // 15: bytebase.v1.DataSourceExternalSecret.secret_type:type_name -> bytebase.v1.DataSourceExternalSecret.SecretType- 2, // 16: bytebase.v1.DataSourceExternalSecret.auth_type:type_name -> bytebase.v1.DataSourceExternalSecret.AuthType- 28, // 17: bytebase.v1.DataSourceExternalSecret.app_role:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption- 0, // 18: bytebase.v1.DataSource.type:type_name -> bytebase.v1.DataSourceType- 23, // 19: bytebase.v1.DataSource.external_secret:type_name -> bytebase.v1.DataSourceExternalSecret- 4, // 20: bytebase.v1.DataSource.authentication_type:type_name -> bytebase.v1.DataSource.AuthenticationType- 29, // 21: bytebase.v1.DataSource.client_secret_credential:type_name -> bytebase.v1.DataSource.ClientSecretCredential- 26, // 22: bytebase.v1.DataSource.sasl_config:type_name -> bytebase.v1.SASLConfig- 30, // 23: bytebase.v1.DataSource.additional_addresses:type_name -> bytebase.v1.DataSource.Address- 5, // 24: bytebase.v1.DataSource.redis_type:type_name -> bytebase.v1.DataSource.RedisType- 31, // 25: bytebase.v1.DataSource.extra_connection_parameters:type_name -> bytebase.v1.DataSource.ExtraConnectionParametersEntry- 34, // 26: bytebase.v1.InstanceResource.engine:type_name -> bytebase.v1.Engine- 24, // 27: bytebase.v1.InstanceResource.data_sources:type_name -> bytebase.v1.DataSource- 27, // 28: bytebase.v1.SASLConfig.krb_config:type_name -> bytebase.v1.KerberosConfig- 3, // 29: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType- 6, // 30: bytebase.v1.InstanceService.GetInstance:input_type -> bytebase.v1.GetInstanceRequest- 7, // 31: bytebase.v1.InstanceService.ListInstances:input_type -> bytebase.v1.ListInstancesRequest- 9, // 32: bytebase.v1.InstanceService.CreateInstance:input_type -> bytebase.v1.CreateInstanceRequest- 10, // 33: bytebase.v1.InstanceService.UpdateInstance:input_type -> bytebase.v1.UpdateInstanceRequest- 11, // 34: bytebase.v1.InstanceService.DeleteInstance:input_type -> bytebase.v1.DeleteInstanceRequest- 12, // 35: bytebase.v1.InstanceService.UndeleteInstance:input_type -> bytebase.v1.UndeleteInstanceRequest- 13, // 36: bytebase.v1.InstanceService.SyncInstance:input_type -> bytebase.v1.SyncInstanceRequest- 14, // 37: bytebase.v1.InstanceService.ListInstanceDatabase:input_type -> bytebase.v1.ListInstanceDatabaseRequest- 17, // 38: bytebase.v1.InstanceService.BatchSyncInstances:input_type -> bytebase.v1.BatchSyncInstancesRequest- 19, // 39: bytebase.v1.InstanceService.AddDataSource:input_type -> bytebase.v1.AddDataSourceRequest- 20, // 40: bytebase.v1.InstanceService.RemoveDataSource:input_type -> bytebase.v1.RemoveDataSourceRequest- 21, // 41: bytebase.v1.InstanceService.UpdateDataSource:input_type -> bytebase.v1.UpdateDataSourceRequest- 22, // 42: bytebase.v1.InstanceService.GetInstance:output_type -> bytebase.v1.Instance- 8, // 43: bytebase.v1.InstanceService.ListInstances:output_type -> bytebase.v1.ListInstancesResponse- 22, // 44: bytebase.v1.InstanceService.CreateInstance:output_type -> bytebase.v1.Instance- 22, // 45: bytebase.v1.InstanceService.UpdateInstance:output_type -> bytebase.v1.Instance- 37, // 46: bytebase.v1.InstanceService.DeleteInstance:output_type -> google.protobuf.Empty- 22, // 47: bytebase.v1.InstanceService.UndeleteInstance:output_type -> bytebase.v1.Instance- 16, // 48: bytebase.v1.InstanceService.SyncInstance:output_type -> bytebase.v1.SyncInstanceResponse- 15, // 49: bytebase.v1.InstanceService.ListInstanceDatabase:output_type -> bytebase.v1.ListInstanceDatabaseResponse- 18, // 50: bytebase.v1.InstanceService.BatchSyncInstances:output_type -> bytebase.v1.BatchSyncInstancesResponse- 22, // 51: bytebase.v1.InstanceService.AddDataSource:output_type -> bytebase.v1.Instance- 22, // 52: bytebase.v1.InstanceService.RemoveDataSource:output_type -> bytebase.v1.Instance- 22, // 53: bytebase.v1.InstanceService.UpdateDataSource:output_type -> bytebase.v1.Instance- 42, // [42:54] is the sub-list for method output_type- 30, // [30:42] is the sub-list for method input_type- 30, // [30:30] is the sub-list for extension type_name- 30, // [30:30] is the sub-list for extension extendee- 0, // [0:30] is the sub-list for field type_name+ 10, // 6: bytebase.v1.BatchUpdateInstancesRequest.requests:type_name -> bytebase.v1.UpdateInstanceRequest+ 24, // 7: bytebase.v1.BatchUpdateInstancesResponse.instances:type_name -> bytebase.v1.Instance+ 26, // 8: bytebase.v1.AddDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource+ 26, // 9: bytebase.v1.RemoveDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource+ 26, // 10: bytebase.v1.UpdateDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource+ 34, // 11: bytebase.v1.UpdateDataSourceRequest.update_mask:type_name -> google.protobuf.FieldMask+ 35, // 12: bytebase.v1.Instance.state:type_name -> bytebase.v1.State+ 36, // 13: bytebase.v1.Instance.engine:type_name -> bytebase.v1.Engine+ 26, // 14: bytebase.v1.Instance.data_sources:type_name -> bytebase.v1.DataSource+ 37, // 15: bytebase.v1.Instance.roles:type_name -> bytebase.v1.InstanceRole+ 38, // 16: bytebase.v1.Instance.sync_interval:type_name -> google.protobuf.Duration+ 1, // 17: bytebase.v1.DataSourceExternalSecret.secret_type:type_name -> bytebase.v1.DataSourceExternalSecret.SecretType+ 2, // 18: bytebase.v1.DataSourceExternalSecret.auth_type:type_name -> bytebase.v1.DataSourceExternalSecret.AuthType+ 30, // 19: bytebase.v1.DataSourceExternalSecret.app_role:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption+ 0, // 20: bytebase.v1.DataSource.type:type_name -> bytebase.v1.DataSourceType+ 25, // 21: bytebase.v1.DataSource.external_secret:type_name -> bytebase.v1.DataSourceExternalSecret+ 4, // 22: bytebase.v1.DataSource.authentication_type:type_name -> bytebase.v1.DataSource.AuthenticationType+ 31, // 23: bytebase.v1.DataSource.client_secret_credential:type_name -> bytebase.v1.DataSource.ClientSecretCredential+ 28, // 24: bytebase.v1.DataSource.sasl_config:type_name -> bytebase.v1.SASLConfig+ 32, // 25: bytebase.v1.DataSource.additional_addresses:type_name -> bytebase.v1.DataSource.Address+ 5, // 26: bytebase.v1.DataSource.redis_type:type_name -> bytebase.v1.DataSource.RedisType+ 33, // 27: bytebase.v1.DataSource.extra_connection_parameters:type_name -> bytebase.v1.DataSource.ExtraConnectionParametersEntry+ 36, // 28: bytebase.v1.InstanceResource.engine:type_name -> bytebase.v1.Engine+ 26, // 29: bytebase.v1.InstanceResource.data_sources:type_name -> bytebase.v1.DataSource+ 29, // 30: bytebase.v1.SASLConfig.krb_config:type_name -> bytebase.v1.KerberosConfig+ 3, // 31: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType+ 6, // 32: bytebase.v1.InstanceService.GetInstance:input_type -> bytebase.v1.GetInstanceRequest+ 7, // 33: bytebase.v1.InstanceService.ListInstances:input_type -> bytebase.v1.ListInstancesRequest+ 9, // 34: bytebase.v1.InstanceService.CreateInstance:input_type -> bytebase.v1.CreateInstanceRequest+ 10, // 35: bytebase.v1.InstanceService.UpdateInstance:input_type -> bytebase.v1.UpdateInstanceRequest+ 11, // 36: bytebase.v1.InstanceService.DeleteInstance:input_type -> bytebase.v1.DeleteInstanceRequest+ 12, // 37: bytebase.v1.InstanceService.UndeleteInstance:input_type -> bytebase.v1.UndeleteInstanceRequest+ 13, // 38: bytebase.v1.InstanceService.SyncInstance:input_type -> bytebase.v1.SyncInstanceRequest+ 14, // 39: bytebase.v1.InstanceService.ListInstanceDatabase:input_type -> bytebase.v1.ListInstanceDatabaseRequest+ 17, // 40: bytebase.v1.InstanceService.BatchSyncInstances:input_type -> bytebase.v1.BatchSyncInstancesRequest+ 19, // 41: bytebase.v1.InstanceService.BatchUpdateInstances:input_type -> bytebase.v1.BatchUpdateInstancesRequest+ 21, // 42: bytebase.v1.InstanceService.AddDataSource:input_type -> bytebase.v1.AddDataSourceRequest+ 22, // 43: bytebase.v1.InstanceService.RemoveDataSource:input_type -> bytebase.v1.RemoveDataSourceRequest+ 23, // 44: bytebase.v1.InstanceService.UpdateDataSource:input_type -> bytebase.v1.UpdateDataSourceRequest+ 24, // 45: bytebase.v1.InstanceService.GetInstance:output_type -> bytebase.v1.Instance+ 8, // 46: bytebase.v1.InstanceService.ListInstances:output_type -> bytebase.v1.ListInstancesResponse+ 24, // 47: bytebase.v1.InstanceService.CreateInstance:output_type -> bytebase.v1.Instance+ 24, // 48: bytebase.v1.InstanceService.UpdateInstance:output_type -> bytebase.v1.Instance+ 39, // 49: bytebase.v1.InstanceService.DeleteInstance:output_type -> google.protobuf.Empty+ 24, // 50: bytebase.v1.InstanceService.UndeleteInstance:output_type -> bytebase.v1.Instance+ 16, // 51: bytebase.v1.InstanceService.SyncInstance:output_type -> bytebase.v1.SyncInstanceResponse+ 15, // 52: bytebase.v1.InstanceService.ListInstanceDatabase:output_type -> bytebase.v1.ListInstanceDatabaseResponse+ 18, // 53: bytebase.v1.InstanceService.BatchSyncInstances:output_type -> bytebase.v1.BatchSyncInstancesResponse+ 20, // 54: bytebase.v1.InstanceService.BatchUpdateInstances:output_type -> bytebase.v1.BatchUpdateInstancesResponse+ 24, // 55: bytebase.v1.InstanceService.AddDataSource:output_type -> bytebase.v1.Instance+ 24, // 56: bytebase.v1.InstanceService.RemoveDataSource:output_type -> bytebase.v1.Instance+ 24, // 57: bytebase.v1.InstanceService.UpdateDataSource:output_type -> bytebase.v1.Instance+ 45, // [45:58] is the sub-list for method output_type+ 32, // [32:45] is the sub-list for method input_type+ 32, // [32:32] is the sub-list for extension type_name+ 32, // [32:32] is the sub-list for extension extendee+ 0, // [0:32] is the sub-list for field type_name}func init() { file_v1_instance_service_proto_init() }@@ -2690,14 +2790,14 @@ func file_v1_instance_service_proto_init() {file_v1_common_proto_init()file_v1_instance_role_service_proto_init()file_v1_instance_service_proto_msgTypes[8].OneofWrappers = []any{}- file_v1_instance_service_proto_msgTypes[17].OneofWrappers = []any{+ file_v1_instance_service_proto_msgTypes[19].OneofWrappers = []any{(*DataSourceExternalSecret_AppRole)(nil),(*DataSourceExternalSecret_Token)(nil),}- file_v1_instance_service_proto_msgTypes[18].OneofWrappers = []any{+ file_v1_instance_service_proto_msgTypes[20].OneofWrappers = []any{(*DataSource_ClientSecretCredential_)(nil),}- file_v1_instance_service_proto_msgTypes[20].OneofWrappers = []any{+ file_v1_instance_service_proto_msgTypes[22].OneofWrappers = []any{(*SASLConfig_KrbConfig)(nil),}type x struct{}@@ -2706,7 +2806,7 @@ func file_v1_instance_service_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_instance_service_proto_rawDesc), len(file_v1_instance_service_proto_rawDesc)),NumEnums: 6,- NumMessages: 26,+ NumMessages: 28,NumExtensions: 0,NumServices: 1,},diff --git a/proto/generated-go/v1/instance_service.pb.gw.go b/proto/generated-go/v1/instance_service.pb.gw.goindex c92128d350..aa56ae26c1 100644--- a/proto/generated-go/v1/instance_service.pb.gw.go+++ b/proto/generated-go/v1/instance_service.pb.gw.go@@ -422,6 +422,30 @@ func local_request_InstanceService_BatchSyncInstances_0(ctx context.Context, marreturn msg, metadata, err}+func request_InstanceService_BatchUpdateInstances_0(ctx context.Context, marshaler runtime.Marshaler, client InstanceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq BatchUpdateInstancesRequest+ metadata runtime.ServerMetadata+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := client.BatchUpdateInstances(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_InstanceService_BatchUpdateInstances_0(ctx context.Context, marshaler runtime.Marshaler, server InstanceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq BatchUpdateInstancesRequest+ metadata runtime.ServerMetadata+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ msg, err := server.BatchUpdateInstances(ctx, &protoReq)+ return msg, metadata, err+}+func request_InstanceService_AddDataSource_0(ctx context.Context, marshaler runtime.Marshaler, client InstanceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {var (protoReq AddDataSourceRequest@@ -734,6 +758,26 @@ func RegisterInstanceServiceHandlerServer(ctx context.Context, mux *runtime.Serv}forward_InstanceService_BatchSyncInstances_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})+ mux.Handle(http.MethodPost, pattern_InstanceService_BatchUpdateInstances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.InstanceService/BatchUpdateInstances", runtime.WithHTTPPathPattern("/v1/instances:batchUpdate"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_InstanceService_BatchUpdateInstances_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_InstanceService_BatchUpdateInstances_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })mux.Handle(http.MethodPost, pattern_InstanceService_AddDataSource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -987,6 +1031,23 @@ func RegisterInstanceServiceHandlerClient(ctx context.Context, mux *runtime.Serv}forward_InstanceService_BatchSyncInstances_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})+ mux.Handle(http.MethodPost, pattern_InstanceService_BatchUpdateInstances_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.InstanceService/BatchUpdateInstances", runtime.WithHTTPPathPattern("/v1/instances:batchUpdate"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_InstanceService_BatchUpdateInstances_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_InstanceService_BatchUpdateInstances_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })mux.Handle(http.MethodPost, pattern_InstanceService_AddDataSource_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {ctx, cancel := context.WithCancel(req.Context())defer cancel()@@ -1051,6 +1112,7 @@ var (pattern_InstanceService_SyncInstance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "instances", "name"}, "sync"))pattern_InstanceService_ListInstanceDatabase_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "instances", "name"}, "databases"))pattern_InstanceService_BatchSyncInstances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "instances"}, "batchSync"))+ pattern_InstanceService_BatchUpdateInstances_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "instances"}, "batchUpdate"))pattern_InstanceService_AddDataSource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "instances", "name"}, "addDataSource"))pattern_InstanceService_RemoveDataSource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "instances", "name"}, "removeDataSource"))pattern_InstanceService_UpdateDataSource_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "instances", "name"}, "updateDataSource"))@@ -1066,6 +1128,7 @@ var (forward_InstanceService_SyncInstance_0 = runtime.ForwardResponseMessageforward_InstanceService_ListInstanceDatabase_0 = runtime.ForwardResponseMessageforward_InstanceService_BatchSyncInstances_0 = runtime.ForwardResponseMessage+ forward_InstanceService_BatchUpdateInstances_0 = runtime.ForwardResponseMessageforward_InstanceService_AddDataSource_0 = runtime.ForwardResponseMessageforward_InstanceService_RemoveDataSource_0 = runtime.ForwardResponseMessageforward_InstanceService_UpdateDataSource_0 = runtime.ForwardResponseMessagediff --git a/proto/generated-go/v1/instance_service_grpc.pb.go b/proto/generated-go/v1/instance_service_grpc.pb.goindex 489da790a1..1e60b265e2 100644--- a/proto/generated-go/v1/instance_service_grpc.pb.go+++ b/proto/generated-go/v1/instance_service_grpc.pb.go@@ -29,6 +29,7 @@ const (InstanceService_SyncInstance_FullMethodName = "/bytebase.v1.InstanceService/SyncInstance"InstanceService_ListInstanceDatabase_FullMethodName = "/bytebase.v1.InstanceService/ListInstanceDatabase"InstanceService_BatchSyncInstances_FullMethodName = "/bytebase.v1.InstanceService/BatchSyncInstances"+ InstanceService_BatchUpdateInstances_FullMethodName = "/bytebase.v1.InstanceService/BatchUpdateInstances"InstanceService_AddDataSource_FullMethodName = "/bytebase.v1.InstanceService/AddDataSource"InstanceService_RemoveDataSource_FullMethodName = "/bytebase.v1.InstanceService/RemoveDataSource"InstanceService_UpdateDataSource_FullMethodName = "/bytebase.v1.InstanceService/UpdateDataSource"@@ -47,6 +48,7 @@ type InstanceServiceClient interface {SyncInstance(ctx context.Context, in *SyncInstanceRequest, opts ...grpc.CallOption) (*SyncInstanceResponse, error)ListInstanceDatabase(ctx context.Context, in *ListInstanceDatabaseRequest, opts ...grpc.CallOption) (*ListInstanceDatabaseResponse, error)BatchSyncInstances(ctx context.Context, in *BatchSyncInstancesRequest, opts ...grpc.CallOption) (*BatchSyncInstancesResponse, error)+ BatchUpdateInstances(ctx context.Context, in *BatchUpdateInstancesRequest, opts ...grpc.CallOption) (*BatchUpdateInstancesResponse, error)AddDataSource(ctx context.Context, in *AddDataSourceRequest, opts ...grpc.CallOption) (*Instance, error)RemoveDataSource(ctx context.Context, in *RemoveDataSourceRequest, opts ...grpc.CallOption) (*Instance, error)UpdateDataSource(ctx context.Context, in *UpdateDataSourceRequest, opts ...grpc.CallOption) (*Instance, error)@@ -150,6 +152,16 @@ func (c *instanceServiceClient) BatchSyncInstances(ctx context.Context, in *Batcreturn out, nil}+func (c *instanceServiceClient) BatchUpdateInstances(ctx context.Context, in *BatchUpdateInstancesRequest, opts ...grpc.CallOption) (*BatchUpdateInstancesResponse, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(BatchUpdateInstancesResponse)+ err := c.cc.Invoke(ctx, InstanceService_BatchUpdateInstances_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}+func (c *instanceServiceClient) AddDataSource(ctx context.Context, in *AddDataSourceRequest, opts ...grpc.CallOption) (*Instance, error) {cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)out := new(Instance)@@ -193,6 +205,7 @@ type InstanceServiceServer interface {SyncInstance(context.Context, *SyncInstanceRequest) (*SyncInstanceResponse, error)ListInstanceDatabase(context.Context, *ListInstanceDatabaseRequest) (*ListInstanceDatabaseResponse, error)BatchSyncInstances(context.Context, *BatchSyncInstancesRequest) (*BatchSyncInstancesResponse, error)+ BatchUpdateInstances(context.Context, *BatchUpdateInstancesRequest) (*BatchUpdateInstancesResponse, error)AddDataSource(context.Context, *AddDataSourceRequest) (*Instance, error)RemoveDataSource(context.Context, *RemoveDataSourceRequest) (*Instance, error)UpdateDataSource(context.Context, *UpdateDataSourceRequest) (*Instance, error)@@ -233,6 +246,9 @@ func (UnimplementedInstanceServiceServer) ListInstanceDatabase(context.Context,func (UnimplementedInstanceServiceServer) BatchSyncInstances(context.Context, *BatchSyncInstancesRequest) (*BatchSyncInstancesResponse, error) {return nil, status.Errorf(codes.Unimplemented, "method BatchSyncInstances not implemented")}+func (UnimplementedInstanceServiceServer) BatchUpdateInstances(context.Context, *BatchUpdateInstancesRequest) (*BatchUpdateInstancesResponse, error) {+ return nil, status.Errorf(codes.Unimplemented, "method BatchUpdateInstances not implemented")+}func (UnimplementedInstanceServiceServer) AddDataSource(context.Context, *AddDataSourceRequest) (*Instance, error) {return nil, status.Errorf(codes.Unimplemented, "method AddDataSource not implemented")}@@ -425,6 +441,24 @@ func _InstanceService_BatchSyncInstances_Handler(srv interface{}, ctx context.Coreturn interceptor(ctx, in, info, handler)}+func _InstanceService_BatchUpdateInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(BatchUpdateInstancesRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(InstanceServiceServer).BatchUpdateInstances(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: InstanceService_BatchUpdateInstances_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(InstanceServiceServer).BatchUpdateInstances(ctx, req.(*BatchUpdateInstancesRequest))+ }+ return interceptor(ctx, in, info, handler)+}+func _InstanceService_AddDataSource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {in := new(AddDataSourceRequest)if err := dec(in); err != nil {@@ -522,6 +556,10 @@ var InstanceService_ServiceDesc = grpc.ServiceDesc{MethodName: "BatchSyncInstances",Handler: _InstanceService_BatchSyncInstances_Handler,},+ {+ MethodName: "BatchUpdateInstances",+ Handler: _InstanceService_BatchUpdateInstances_Handler,+ },{MethodName: "AddDataSource",Handler: _InstanceService_AddDataSource_Handler,diff --git a/proto/v1/v1/instance_service.proto b/proto/v1/v1/instance_service.protoindex f25e5184b3..668faac57e 100644--- a/proto/v1/v1/instance_service.proto+++ b/proto/v1/v1/instance_service.proto@@ -97,6 +97,16 @@ service InstanceService {option (bytebase.v1.auth_method) = IAM;}+ rpc BatchUpdateInstances(BatchUpdateInstancesRequest) returns (BatchUpdateInstancesResponse) {+ option (google.api.http) = {+ post: "/v1/instances:batchUpdate"+ body: "*"+ };+ option (bytebase.v1.permission) = "bb.instances.update";+ option (bytebase.v1.auth_method) = IAM;+ option (bytebase.v1.audit) = true;+ }+rpc AddDataSource(AddDataSourceRequest) returns (Instance) {option (google.api.http) = {post: "/v1/{name=instances/*}:addDataSource"@@ -287,6 +297,15 @@ message BatchSyncInstancesRequest {message BatchSyncInstancesResponse {}+message BatchUpdateInstancesRequest {+ // The request message specifying the resources to update.+ repeated UpdateInstanceRequest requests = 1 [(google.api.field_behavior) = REQUIRED];+}++message BatchUpdateInstancesResponse {+ repeated Instance instances = 1;+}+message AddDataSourceRequest {// The name of the instance to add a data source to.// Format: instances/{instance}