Skip to content

Commit 1b3db0e

Browse files
[Backport 8.15] Add specification for delete roles (#2701)
* Add specification for delete roles (cherry picked from commit 1b94182) Co-authored-by: Johannes Fredén <[email protected]>
1 parent 2f72cac commit 1b3db0e

File tree

6 files changed

+298
-11
lines changed

6 files changed

+298
-11
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 76 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 128 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/validation-errors.json

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { RequestBase } from '@_types/Base'
21+
import { Refresh } from '@_types/common'
22+
23+
/**
24+
* The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
25+
* The bulk delete roles API cannot delete roles that are defined in roles files.
26+
* @rest_spec_name security.bulk_delete_role
27+
* @availability stack since=8.15.0 stability=stable
28+
* @availability serverless stability=stable visibility=private
29+
* @cluster_privileges manage_security
30+
*/
31+
export interface Request extends RequestBase {
32+
query_parameters: {
33+
refresh?: Refresh
34+
}
35+
body: {
36+
/**
37+
* An array of role names to delete
38+
*/
39+
names: string[]
40+
}
41+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { Dictionary } from '@spec_utils/Dictionary'
21+
import { ErrorCause } from '@_types/Errors'
22+
import { integer } from '@_types/Numeric'
23+
import { BulkError } from '@security/_types/Bulk'
24+
25+
export class Response {
26+
body: {
27+
/**
28+
* Array of deleted roles
29+
*/
30+
deleted?: string[]
31+
/**
32+
* Array of roles that could not be found
33+
*/
34+
not_found?: string[]
35+
/**
36+
* Present if any deletes resulted in errors
37+
*/
38+
errors?: BulkError
39+
}
40+
}

0 commit comments

Comments
 (0)