diff --git a/x-pack/plugins/index_management/common/types/data_streams.ts b/x-pack/plugins/index_management/common/types/data_streams.ts index 81bd09311a1bd..06e4eb33c4760 100644 --- a/x-pack/plugins/index_management/common/types/data_streams.ts +++ b/x-pack/plugins/index_management/common/types/data_streams.ts @@ -65,5 +65,3 @@ export interface DataStreamIndex { name: string; uuid: string; } - -export type DataStreamPrivileges = Record; diff --git a/x-pack/plugins/index_management/common/types/index.ts b/x-pack/plugins/index_management/common/types/index.ts index cf393ee4222dd..0a6f18be2e030 100644 --- a/x-pack/plugins/index_management/common/types/index.ts +++ b/x-pack/plugins/index_management/common/types/index.ts @@ -12,12 +12,6 @@ export * from './mappings'; export * from './templates'; -export { - DataStreamFromEs, - Health, - DataStream, - DataStreamIndex, - DataStreamPrivileges, -} from './data_streams'; +export { DataStreamFromEs, Health, DataStream, DataStreamIndex } from './data_streams'; export * from './component_templates'; diff --git a/x-pack/plugins/index_management/public/application/constants/index.ts b/x-pack/plugins/index_management/public/application/constants/index.ts index 54fd08208f24a..80c8779f2f020 100644 --- a/x-pack/plugins/index_management/public/application/constants/index.ts +++ b/x-pack/plugins/index_management/public/application/constants/index.ts @@ -17,5 +17,3 @@ export { export const REACT_ROOT_ID = 'indexManagementReactRoot'; export * from './ilm_url_generator'; - -export { DELETE_INDEX_PRIVILEGE } from './privileges'; diff --git a/x-pack/plugins/index_management/public/application/constants/privileges.ts b/x-pack/plugins/index_management/public/application/constants/privileges.ts deleted file mode 100644 index e728cc28c6665..0000000000000 --- a/x-pack/plugins/index_management/public/application/constants/privileges.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -export const DELETE_INDEX_PRIVILEGE = 'delete_index'; diff --git a/x-pack/plugins/index_management/public/application/services/api.ts b/x-pack/plugins/index_management/public/application/services/api.ts index dba7afa06da66..35ded3ea73d91 100644 --- a/x-pack/plugins/index_management/public/application/services/api.ts +++ b/x-pack/plugins/index_management/public/application/services/api.ts @@ -32,12 +32,7 @@ import { UIM_TEMPLATE_CLONE, UIM_TEMPLATE_SIMULATE, } from '../../../common/constants'; -import { - TemplateDeserialized, - TemplateListItem, - DataStream, - DataStreamPrivileges, -} from '../../../common'; +import { TemplateDeserialized, TemplateListItem, DataStream } from '../../../common'; import { IndexMgmtMetricsType } from '../../types'; import { TAB_SETTINGS, TAB_MAPPING, TAB_STATS } from '../constants'; import { useRequest, sendRequest } from './use_request'; @@ -69,23 +64,6 @@ export function useLoadDataStream(name: string) { }); } -export function useLoadDataStreamsPrivileges({ - names, - privileges, -}: { - names: string[]; - privileges: string[]; -}) { - return useRequest>({ - path: `${API_BASE_PATH}/data_streams_privileges`, - method: 'post', - body: JSON.stringify({ - names, - privileges, - }), - }); -} - export async function deleteDataStreams(dataStreams: string[]) { return sendRequest({ path: `${API_BASE_PATH}/delete_data_streams`, diff --git a/x-pack/plugins/index_management/server/client/elasticsearch.ts b/x-pack/plugins/index_management/server/client/elasticsearch.ts index ed5ede07479ca..8b7749335131e 100644 --- a/x-pack/plugins/index_management/server/client/elasticsearch.ts +++ b/x-pack/plugins/index_management/server/client/elasticsearch.ts @@ -11,28 +11,6 @@ export const elasticsearchJsPlugin = (Client: any, config: any, components: any) const dataManagement = Client.prototype.dataManagement.prototype; // Data streams - dataManagement.getDataStreams = ca({ - urls: [ - { - fmt: '/_data_stream', - }, - ], - method: 'GET', - }); - - dataManagement.getDataStream = ca({ - urls: [ - { - fmt: '/_data_stream/<%=name%>', - req: { - name: { - type: 'string', - }, - }, - }, - ], - method: 'GET', - }); // We don't allow the user to create a data stream in the UI or API. We're just adding this here // to enable the API integration tests.