Skip to content

Add indices.disk_usage Enpoint #700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 190 additions & 2 deletions output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion output/schema/validation-errors.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

77 changes: 77 additions & 0 deletions specification/indices/disk_usage/IndicesDiskUsageRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { RequestBase } from '@_types/Base'
import { ExpandWildcards, IndexName, Indices } from '@_types/common'
import { TimeUnit } from '@_types/Time'

/**
* @rest_spec_name indices.disk_usage
* @since 7.15.0
* @stability experimental
*/
export interface Request extends RequestBase {
path_parts: {
/**
* Comma-separated list of data streams, indices, and aliases used to limit the request. It’s recommended to execute this API with a single index (or the latest backing index of a data stream) as the API consumes resources significantly.
*/
index: IndexName
}
query_parameters?: {
/**
* If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar.
* @server_default true
*/
allow_no_indices?: boolean
/**
* Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as open,hidden.
* @server_default open
*/
expand_wildcards?: ExpandWildcards
/**
* If true, the API performs a flush before analysis. If false, the response may not include uncommitted data.
* @server_default true
*/
flush?: boolean
/**
* If true, missing or closed indices are not included in the response.
* @server_default false
*/
ignore_unavailable?: boolean
/**
* Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
* @server_default 30s
*/
master_timeout?: TimeUnit
/**
* Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
* @server_default 30s
*/
timeout?: TimeUnit
/**
* Analyzing field disk usage is resource-intensive. To use the API, this parameter must be set to true.
* @server_default false
*/
run_expensive_tasks?: boolean
/**
* The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (number_of_replicas+1). Default: 1, the primary shard.
*/
wait_for_active_shards?: string
}
}
24 changes: 24 additions & 0 deletions specification/indices/disk_usage/IndicesDiskUsageResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { UserDefinedValue } from '@spec_utils/UserDefinedValue'

export class Response {
body: UserDefinedValue
}