⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Allows a key to do read/write/owner operations on a bucket. Flags in permissions which have the value true will be activated. Other flags will remain unchanged (ie. they will keep their internal value). For example, if you set read to true, the key will be allowed to read the bucket. If you set it to false, the key will keeps its previous read permission. If you want to disallow read for the key, check the DenyBucketKey operation.
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import bucket_api
from garage_admin_sdk.model.bucket_info import BucketInfo
from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest
**allow_bucket_key_request** | [**AllowBucketKeyRequest**](AllowBucketKeyRequest.md)| Aliases to put on the new bucket |
### Return type
[**BucketInfo**](BucketInfo.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** | Bad request, check your request body | - |
**404** | Bucket not found | - |
**200** | Returns exhaustive information about the bucket | - |
[[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)
# **create_bucket**
> BucketInfo create_bucket(create_bucket_request)
Create a bucket
Creates a new bucket, either with a global alias, a local one, or no alias at all. Technically, you can also specify both `globalAlias` and `localAlias` and that would create two aliases.
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import bucket_api
from garage_admin_sdk.model.bucket_info import BucketInfo
from garage_admin_sdk.model.create_bucket_request import CreateBucketRequest
**create_bucket_request** | [**CreateBucketRequest**](CreateBucketRequest.md)| Aliases to put on the new bucket |
### Return type
[**BucketInfo**](BucketInfo.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** | The payload is not formatted correctly | - |
**200** | Returns exhaustive information about the bucket | - |
[[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 bucket.Deletes a storage bucket. A bucket cannot be deleted if it is not empty. **Warning:** this will delete all aliases associated with the bucket!
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**400** | Bucket is not empty | - |
**404** | Bucket not found | - |
**204** | Bucket 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)
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**400** | Bad request, check your request body | - |
**404** | Bucket not found | - |
**200** | Returns exhaustive information about the bucket | - |
[[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)
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**400** | Bad request, check your request body | - |
**404** | Bucket not found | - |
**200** | Returns exhaustive information about the bucket | - |
[[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)
⚠️ **DISCLAIMER**: Garage's developers are aware that this endpoint has an unconventional semantic. Be extra careful when implementing it, its behavior is not obvious. Denies a key from doing read/write/owner operations on a bucket. Flags in permissions which have the value true will be deactivated. Other flags will remain unchanged. For example, if you set read to true, the key will be denied from reading. If you set read to false, the key will keep its previous permissions. If you want the key to have the reading permission, check the AllowBucketKey operation.
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import bucket_api
from garage_admin_sdk.model.bucket_info import BucketInfo
from garage_admin_sdk.model.allow_bucket_key_request import AllowBucketKeyRequest
**allow_bucket_key_request** | [**AllowBucketKeyRequest**](AllowBucketKeyRequest.md)| Aliases to put on the new bucket |
### Return type
[**BucketInfo**](BucketInfo.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** | Bad request, check your request body | - |
**404** | Bucket not found | - |
**200** | Returns exhaustive information about the bucket | - |
[[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)
Given a bucket identifier (`id`) or a global alias (`alias`), get its information. It includes its aliases, its web configuration, keys that have some permissions on it, some statistics (number of objects, size), number of dangling multipart uploads, and its quotas (if any).
id = "b4018dc61b27ccb5c64ec1b24f53454bbbd180697c758c4d47a22a8921864a87" # str | The exact bucket identifier, a 32 bytes hexadecimal string. Incompatible with `alias`. (optional)
alias = "my_documents" # str | The exact global alias of one of the existing buckets. Incompatible with `id`. (optional)
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**404** | Bucket not found | - |
**200** | Returns exhaustive information about the bucket | - |
[[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_buckets**
> [ListBuckets200ResponseInner] list_buckets()
List all buckets
List all the buckets on the cluster with their UUID and their global and local aliases.
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import bucket_api
from garage_admin_sdk.model.list_buckets200_response_inner import ListBuckets200ResponseInner
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**200** | Returns the UUID of the bucket and all its aliases | - |
[[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)
# **put_bucket_global_alias**
> BucketInfo put_bucket_global_alias(id, alias)
Add a global alias
Add a global alias to the target bucket
### Example
* Bearer Authentication (bearerAuth):
```python
import time
import garage_admin_sdk
from garage_admin_sdk.api import bucket_api
from garage_admin_sdk.model.bucket_info import BucketInfo
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**400** | Bad request, check your request body | - |
**404** | Bucket not found | - |
**200** | Returns exhaustive information about the bucket | - |
[[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)
**500** | The server can not handle your request. Check your connectivity with the rest of the cluster. | - |
**400** | Bad request, check your request body | - |
**404** | Bucket not found | - |
**200** | Returns exhaustive information about the bucket | - |
[[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)
All fields (`websiteAccess` and `quotas`) are optional. If they are present, the corresponding modifications are applied to the bucket, otherwise nothing is changed. In `websiteAccess`: if `enabled` is `true`, `indexDocument` must be specified. The field `errorDocument` is optional, if no error document is set a generic error message is displayed when errors happen. Conversely, if `enabled` is `false`, neither `indexDocument` nor `errorDocument` must be specified. In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or set to `null` to remove the quotas. An absent value will be considered the same as a `null`. It is not possible to change only one of the two quotas.
**update_bucket_request** | [**UpdateBucketRequest**](UpdateBucketRequest.md)| Requested changes on the bucket. Both root fields are optionals. |
### Return type
[**BucketInfo**](BucketInfo.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** | Bad request, check your body. | - |
**404** | Bucket not found | - |
**200** | Returns exhaustive information about the bucket | - |
[[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)