Skip to content

Commit

Permalink
Add specification for delete roles (#2683)
Browse files Browse the repository at this point in the history
* Add specification for delete roles
  • Loading branch information
jfreden authored Jul 10, 2024
1 parent 4cc7adb commit 1b94182
Show file tree
Hide file tree
Showing 6 changed files with 298 additions and 11 deletions.
76 changes: 76 additions & 0 deletions output/openapi/elasticsearch-openapi.json

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

133 changes: 128 additions & 5 deletions output/schema/schema.json

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

6 changes: 0 additions & 6 deletions output/schema/validation-errors.json

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

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

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* 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 { Refresh } from '@_types/common'

/**
* The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
* The bulk delete roles API cannot delete roles that are defined in roles files.
* @rest_spec_name security.bulk_delete_role
* @availability stack since=8.15.0 stability=stable
* @availability serverless stability=stable visibility=private
* @cluster_privileges manage_security
*/
export interface Request extends RequestBase {
query_parameters: {
refresh?: Refresh
}
body: {
/**
* An array of role names to delete
*/
names: string[]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* 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 { Dictionary } from '@spec_utils/Dictionary'
import { ErrorCause } from '@_types/Errors'
import { integer } from '@_types/Numeric'
import { BulkError } from '@security/_types/Bulk'

export class Response {
body: {
/**
* Array of deleted roles
*/
deleted?: string[]
/**
* Array of roles that could not be found
*/
not_found?: string[]
/**
* Present if any deletes resulted in errors
*/
errors?: BulkError
}
}

0 comments on commit 1b94182

Please sign in to comment.