Skip to content

Commit 7526dd1

Browse files
committed
Addressed PR feedback changes and also updated indices.resolve_cluster.json to match the new spec
1 parent 46e78fb commit 7526dd1

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

specification/_json_spec/indices.resolve_cluster.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"indices.resolve_cluster": {
33
"documentation": {
44
"url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-cluster-api.html",
5-
"description": "Resolves the specified index expressions to return information about each cluster, including the local cluster, if included."
5+
"description": "Resolves the specified index expressions to return information about each cluster. If no index expression is provided, this endpoint will return information about all the remote clusters that are configured on the local cluster."
66
},
77
"stability": "stable",
88
"visibility": "public",
@@ -11,6 +11,10 @@
1111
},
1212
"url": {
1313
"paths": [
14+
{
15+
"path": "/_resolve/cluster",
16+
"methods": ["GET"]
17+
},
1418
{
1519
"path": "/_resolve/cluster/{name}",
1620
"methods": ["GET"],
@@ -26,21 +30,25 @@
2630
"params": {
2731
"ignore_unavailable": {
2832
"type": "boolean",
29-
"description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
33+
"description": "Whether specified concrete indices should be ignored when unavailable (missing or closed). Only allowed when providing an index expression."
3034
},
3135
"ignore_throttled": {
3236
"type": "boolean",
33-
"description": "Whether specified concrete, expanded or aliased indices should be ignored when throttled"
37+
"description": "Whether specified concrete, expanded or aliased indices should be ignored when throttled. Only allowed when providing an index expression."
3438
},
3539
"allow_no_indices": {
3640
"type": "boolean",
37-
"description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
41+
"description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). Only allowed when providing an index expression."
3842
},
3943
"expand_wildcards": {
4044
"type": "enum",
4145
"options": ["open", "closed", "hidden", "none", "all"],
4246
"default": "open",
43-
"description": "Whether wildcard expressions should get expanded to open or closed indices (default: open)"
47+
"description": "Whether wildcard expressions should get expanded to open or closed indices (default: open). Only allowed when providing an index expression."
48+
},
49+
"timeout": {
50+
"type": "time",
51+
"description": "The maximum time to wait for remote clusters to respond"
4452
}
4553
}
4654
}

specification/indices/resolve_cluster/ResolveClusterRequest.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ export interface Request extends RequestBase {
9999
* If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing
100100
* or closed indices. This behavior applies even if the request targets other open indices. For example, a request
101101
* targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
102-
* Note: only supported when specifying an index expression. You will get an error if you specify index options to the
103-
* _resolve/cluster API endpoint that takes no index expression.
102+
* NOTE: This option is only supported when specifying an index expression. You will get an error if you specify index
103+
* options to the `_resolve/cluster` API endpoint that takes no index expression.
104104
* @server_default true
105105
*/
106106
allow_no_indices?: boolean // default: true
@@ -109,28 +109,28 @@ export interface Request extends RequestBase {
109109
* If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
110110
* Supports comma-separated values, such as `open,hidden`.
111111
* Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
112-
* Note: only supported when specifying an index expression. You will get an error if you specify index options to the
113-
* _resolve/cluster API endpoint that takes no index expression.
112+
* NOTE: This option is only supported when specifying an index expression. You will get an error if you specify index
113+
* options to the `_resolve/cluster` API endpoint that takes no index expression.
114114
* @server_default open
115115
*/
116116
expand_wildcards?: ExpandWildcards
117117
/**
118118
* If true, concrete, expanded, or aliased indices are ignored when frozen.
119-
* Note: only supported when specifying an index expression. You will get an error if you specify index options to the
120-
* _resolve/cluster API endpoint that takes no index expression.
119+
* NOTE: This option is only supported when specifying an index expression. You will get an error if you specify index
120+
* options to the `_resolve/cluster` API endpoint that takes no index expression.
121121
* @server_default false
122122
* @deprecated 7.16.0
123123
*/
124124
ignore_throttled?: boolean // default: false
125125
/**
126126
* If false, the request returns an error if it targets a missing or closed index.
127-
* Note: only supported when specifying an index expression. You will get an error if you specify index options to the
128-
* _resolve/cluster API endpoint that takes no index expression.
127+
* NOTE: This option is only supported when specifying an index expression. You will get an error if you specify index
128+
* options to the `_resolve/cluster` API endpoint that takes no index expression.
129129
* @server_default false
130130
*/
131131
ignore_unavailable?: boolean // default: false
132132
/**
133-
* Specify a max wait time for remote clusters to respond.
133+
* The maximum time to wait for remote clusters to respond.
134134
* If a remote cluster does not respond within this timeout period, the API response
135135
* will show the cluster as not connected and include an error message that the
136136
* request timed out.
@@ -139,6 +139,5 @@ export interface Request extends RequestBase {
139139
* as long as the networking layer is configured to wait for remote clusters that are
140140
* not responding (typically 30 seconds).
141141
*/
142-
timeout?: Duration // default: unset
143-
}
142+
timeout?: Duration
144143
}

0 commit comments

Comments
 (0)