) # AddKeyRequest | You can set a friendly name for this key. If you don't want to, you can set the name to `null`. *Note: the secret key is returned in the response.*
**add_key_request** | [**AddKeyRequest**](AddKeyRequest.md)| You can set a friendly name for this key. If you don't want to, you can set the name to `null`. *Note: the secret key is returned in the response.* |
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**400** | Invalid syntax or requested change | - |
**200** | The key has been added | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
Delete a key from the cluster. Its access will be removed from all the buckets. Buckets are not automatically deleted and can be dangling. You should manually delete them before.
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**200** | The key has been deleted | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
Return information about a specific key like its identifiers, its permissions and buckets on which it has permissions. You can search by specifying the exact key identifier (`id`) or by specifying a pattern (`search`). For confidentiality reasons, the secret key is not returned by default: you must pass the `showSecretKey` query parameter to get it.
show_secret_key = "true" # str | Wether or not the secret key should be returned in the response (optional) if omitted the server will use the default value of "false"
**id** | **str**| The exact API access key generated by Garage. Incompatible with `search`. | [optional]
**search** | **str**| A pattern (beginning or full string) corresponding to a key identifier or friendly name. Incompatible with `id`. | [optional]
**show_secret_key** | **str**| Wether or not the secret key should be returned in the response | [optional] if omitted the server will use the default value of "false"
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**200** | Returns information about the key | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **import_key**
> KeyInfo import_key(import_key_request)
Import an existing key
Imports an existing API key. This feature must only be used for migrations and backup restore. **Do not use it to generate custom key identifiers or you will break your Garage cluster.**
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import key_api
from garage_admin_sdk.model.import_key_request import ImportKeyRequest
from garage_admin_sdk.model.key_info import KeyInfo
**import_key_request** | [**ImportKeyRequest**](ImportKeyRequest.md)| Information on the key to import |
### Return type
[**KeyInfo**](KeyInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**400** | Invalid syntax or requested change | - |
**200** | The key has been imported into the system | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **list_keys**
> [ListKeys200ResponseInner] list_keys()
List all keys
Returns all API access keys in the cluster.
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import key_api
from garage_admin_sdk.model.list_keys200_response_inner import ListKeys200ResponseInner
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**200** | Returns the key identifier (aka `AWS_ACCESS_KEY_ID`) and its associated, human friendly, name if any (otherwise return an empty string) | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
**update_key_request** | [**UpdateKeyRequest**](UpdateKeyRequest.md)| For a given key, provide a first set with the permissions to grant, and a second set with the permissions to remove |
### Return type
[**KeyInfo**](KeyInfo.md)
### Authorization
[bearerAuth](../README.md#bearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**400** | Invalid syntax or requested change | - |
**200** | Returns information about the key | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)