|
| 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 { UserDefinedValue } from '@spec_utils/UserDefinedValue' |
| 22 | +import { RequestBase } from '@_types/Base' |
| 23 | +import { Id, Metadata, Name, Refresh, SequenceNumber } from '@_types/common' |
| 24 | +import { long } from '@_types/Numeric' |
| 25 | +import { UserProfileId } from '@security/_types/UserProfile' |
| 26 | +import { Duration } from '@_types/Time' |
| 27 | +import { RoleDescriptor } from '@security/create_api_key/types' |
| 28 | + |
| 29 | +/** |
| 30 | + * Updates metadata values for an API key |
| 31 | + * @rest_spec_name security.update_api_key |
| 32 | + * @since 8.4.0 |
| 33 | + * @stability stable |
| 34 | + */ |
| 35 | +export interface Request extends RequestBase { |
| 36 | + path_parts: { |
| 37 | + id: Id |
| 38 | + } |
| 39 | + body: { |
| 40 | + /** |
| 41 | + * An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. |
| 42 | + * @doc_id security-api-put-role |
| 43 | + */ |
| 44 | + role_descriptors?: Dictionary<string, RoleDescriptor> |
| 45 | + /** |
| 46 | + * Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage. |
| 47 | + */ |
| 48 | + metadata?: Metadata |
| 49 | + } |
| 50 | +} |
0 commit comments