Skip to content

Commit fffac37

Browse files
committed
Add specification for delete roles
1 parent 09b5022 commit fffac37

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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 { RequestBase } from '@_types/Base'
22+
import { Refresh } from '@_types/common'
23+
import {RoleDescriptor} from "@security/_types/RoleDescriptor";
24+
25+
/**
26+
* The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
27+
* The bulk delete roles API cannot delete roles that are defined in roles files.
28+
* @rest_spec_name security.bulk_delete_role
29+
* @availability stack since=8.15.0 stability=stable
30+
* @availability serverless stability=stable visibility=private
31+
* @cluster_privileges manage_security
32+
*/
33+
export interface Request extends RequestBase {
34+
path_parts: {
35+
}
36+
query_parameters: {
37+
refresh?: Refresh
38+
}
39+
body: {
40+
/**
41+
* An array of role names to delete
42+
*/
43+
names: string[]
44+
}
45+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
import {Dictionary} from "@spec_utils/Dictionary";
20+
import {ErrorCause} from "@_types/Errors";
21+
import {integer} from "@_types/Numeric";
22+
23+
export class Response {
24+
body: {
25+
/**
26+
* Array of deleted roles
27+
*/
28+
deleted?: string[]
29+
/**
30+
* Array of roles that could not be found
31+
*/
32+
not_found?: string[]
33+
/**
34+
* Present if any deletes resulted in errors
35+
*/
36+
errors?: {
37+
/**
38+
* The number of errors
39+
*/
40+
count: integer
41+
/**
42+
* Details about the errors, keyed by role name
43+
*/
44+
details: Dictionary<string, ErrorCause>
45+
}
46+
}
47+
}

0 commit comments

Comments
 (0)