Skip to content

Commit 3a32892

Browse files
committed
Updated: 2026-02-19
1 parent 525bfe6 commit 3a32892

11 files changed

Lines changed: 283 additions & 20 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ Class | Method | HTTP request | Description
489489
*S3Api* | [**create_storage**](docs/S3Api.md#create_storage) | **POST** /api/v1/storages/buckets | Создание хранилища
490490
*S3Api* | [**delete_storage**](docs/S3Api.md#delete_storage) | **DELETE** /api/v1/storages/buckets/{bucket_id} | Удаление хранилища на аккаунте
491491
*S3Api* | [**delete_storage_subdomains**](docs/S3Api.md#delete_storage_subdomains) | **DELETE** /api/v1/storages/buckets/{bucket_id}/subdomains | Удаление поддоменов хранилища
492+
*S3Api* | [**get_storage**](docs/S3Api.md#get_storage) | **GET** /api/v1/storages/buckets/{bucket_id} | Получение хранилища по ID
492493
*S3Api* | [**get_storage_subdomains**](docs/S3Api.md#get_storage_subdomains) | **GET** /api/v1/storages/buckets/{bucket_id}/subdomains | Получение списка поддоменов хранилища
493494
*S3Api* | [**get_storage_transfer_status**](docs/S3Api.md#get_storage_transfer_status) | **GET** /api/v1/storages/buckets/{bucket_id}/transfer-status | Получение статуса переноса хранилища от стороннего S3 в Timeweb Cloud
494495
*S3Api* | [**get_storage_users**](docs/S3Api.md#get_storage_users) | **GET** /api/v1/storages/users | Получение списка пользователей хранилищ аккаунта

docs/Bucket.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**id** | **object** | ID для каждого экземпляра хранилища. Автоматически генерируется при создании. |
99
**name** | **object** | Удобочитаемое имя, установленное для хранилища. |
10-
**description** | **object** | Комментарий к хранилищу. | [optional]
10+
**description** | **object** | Комментарий к хранилищу. |
1111
**disk_stats** | [**BucketDiskStats**](BucketDiskStats.md) | |
1212
**type** | **object** | Тип хранилища. |
1313
**preset_id** | **object** | ID тарифа хранилища. |
@@ -24,6 +24,7 @@ Name | Type | Description | Notes
2424
**project_id** | **object** | ID проекта. |
2525
**rate_id** | **object** | ID тарифа. |
2626
**website_config** | [**BucketWebsiteConfig**](BucketWebsiteConfig.md) | |
27+
**is_allow_auto_upgrade** | **object** | Разрешено ли автоматическое повышение тарифа. |
2728

2829
## Example
2930

docs/BucketDiskStats.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
## Properties
66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
8-
**size** | **object** | Размер (в Кб) диска хранилища. |
8+
**size** | **object** | Размер (в Кб) диска хранилища включенного в тариф. |
99
**used** | **object** | Размер (в Кб) использованного пространства диска хранилища. |
10+
**is_unlimited** | **object** | Признак безлимитного размера хранилища. |
1011

1112
## Example
1213

docs/S3Api.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Method | HTTP request | Description
99
[**create_storage**](S3Api.md#create_storage) | **POST** /api/v1/storages/buckets | Создание хранилища
1010
[**delete_storage**](S3Api.md#delete_storage) | **DELETE** /api/v1/storages/buckets/{bucket_id} | Удаление хранилища на аккаунте
1111
[**delete_storage_subdomains**](S3Api.md#delete_storage_subdomains) | **DELETE** /api/v1/storages/buckets/{bucket_id}/subdomains | Удаление поддоменов хранилища
12+
[**get_storage**](S3Api.md#get_storage) | **GET** /api/v1/storages/buckets/{bucket_id} | Получение хранилища по ID
1213
[**get_storage_subdomains**](S3Api.md#get_storage_subdomains) | **GET** /api/v1/storages/buckets/{bucket_id}/subdomains | Получение списка поддоменов хранилища
1314
[**get_storage_transfer_status**](S3Api.md#get_storage_transfer_status) | **GET** /api/v1/storages/buckets/{bucket_id}/transfer-status | Получение статуса переноса хранилища от стороннего S3 в Timeweb Cloud
1415
[**get_storage_users**](S3Api.md#get_storage_users) | **GET** /api/v1/storages/users | Получение списка пользователей хранилищ аккаунта
@@ -438,6 +439,88 @@ Name | Type | Description | Notes
438439

439440
[[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)
440441

442+
# **get_storage**
443+
> CreateStorage201Response get_storage(bucket_id)
444+
445+
Получение хранилища по ID
446+
447+
Чтобы получить хранилище по ID, отправьте GET-запрос на `/api/v1/storages/buckets/{bucket_id}`.
448+
449+
### Example
450+
451+
* Bearer (JWT) Authentication (Bearer):
452+
```python
453+
import time
454+
import os
455+
import timeweb_cloud_api
456+
from timeweb_cloud_api.models.create_storage201_response import CreateStorage201Response
457+
from timeweb_cloud_api.rest import ApiException
458+
from pprint import pprint
459+
460+
# Defining the host is optional and defaults to https://api.timeweb.cloud
461+
# See configuration.py for a list of all supported configuration parameters.
462+
configuration = timeweb_cloud_api.Configuration(
463+
host = "https://api.timeweb.cloud"
464+
)
465+
466+
# The client must configure the authentication and authorization parameters
467+
# in accordance with the API server security policy.
468+
# Examples for each auth method are provided below, use the example that
469+
# satisfies your auth use case.
470+
471+
# Configure Bearer authorization (JWT): Bearer
472+
configuration = timeweb_cloud_api.Configuration(
473+
access_token = os.environ["BEARER_TOKEN"]
474+
)
475+
476+
# Enter a context with an instance of the API client
477+
with timeweb_cloud_api.ApiClient(configuration) as api_client:
478+
# Create an instance of the API class
479+
api_instance = timeweb_cloud_api.S3Api(api_client)
480+
bucket_id = 1051 # object | ID хранилища.
481+
482+
try:
483+
# Получение хранилища по ID
484+
api_response = api_instance.get_storage(bucket_id)
485+
print("The response of S3Api->get_storage:\n")
486+
pprint(api_response)
487+
except Exception as e:
488+
print("Exception when calling S3Api->get_storage: %s\n" % e)
489+
```
490+
491+
492+
### Parameters
493+
494+
Name | Type | Description | Notes
495+
------------- | ------------- | ------------- | -------------
496+
**bucket_id** | [**object**](.md)| ID хранилища. |
497+
498+
### Return type
499+
500+
[**CreateStorage201Response**](CreateStorage201Response.md)
501+
502+
### Authorization
503+
504+
[Bearer](../README.md#Bearer)
505+
506+
### HTTP request headers
507+
508+
- **Content-Type**: Not defined
509+
- **Accept**: application/json
510+
511+
### HTTP response details
512+
| Status code | Description | Response headers |
513+
|-------------|-------------|------------------|
514+
**200** | Объект JSON c ключом `bucket` | - |
515+
**400** | | - |
516+
**401** | | - |
517+
**403** | | - |
518+
**404** | | - |
519+
**429** | | - |
520+
**500** | | - |
521+
522+
[[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)
523+
441524
# **get_storage_subdomains**
442525
> GetStorageSubdomains200Response get_storage_subdomains(bucket_id)
443526

test/test_bucket.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ def make_instance(self, include_optional):
4040
if include_optional :
4141
return Bucket(
4242
id = 1,
43-
name = Cute Quail,
43+
name = c372805f-72c7-416c-918d-ac78c2dde306,
4444
description = Bucket of awesome cats,
4545
disk_stats = timeweb_cloud_api.models.bucket_disk_stats.bucket_disk_stats(
4646
size = 10485760,
47-
used = 486.11328125, ),
47+
used = 486.11328125,
48+
is_unlimited = false, ),
4849
type = public,
4950
preset_id = 389,
5051
configurator_id = 55,
@@ -62,15 +63,18 @@ def make_instance(self, include_optional):
6263
website_config = timeweb_cloud_api.models.bucket_website_config.bucket_website_config(
6364
enabled = true,
6465
index_page = index.html,
65-
error_pages = null, )
66+
error_pages = null, ),
67+
is_allow_auto_upgrade = false
6668
)
6769
else :
6870
return Bucket(
6971
id = 1,
70-
name = Cute Quail,
72+
name = c372805f-72c7-416c-918d-ac78c2dde306,
73+
description = Bucket of awesome cats,
7174
disk_stats = timeweb_cloud_api.models.bucket_disk_stats.bucket_disk_stats(
7275
size = 10485760,
73-
used = 486.11328125, ),
76+
used = 486.11328125,
77+
is_unlimited = false, ),
7478
type = public,
7579
preset_id = 389,
7680
configurator_id = 55,
@@ -89,6 +93,7 @@ def make_instance(self, include_optional):
8993
enabled = true,
9094
index_page = index.html,
9195
error_pages = null, ),
96+
is_allow_auto_upgrade = false,
9297
)
9398
"""
9499

test/test_bucket_disk_stats.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ def make_instance(self, include_optional):
4040
if include_optional :
4141
return BucketDiskStats(
4242
size = 10485760,
43-
used = 486.11328125
43+
used = 486.11328125,
44+
is_unlimited = false
4445
)
4546
else :
4647
return BucketDiskStats(
4748
size = 10485760,
4849
used = 486.11328125,
50+
is_unlimited = false,
4951
)
5052
"""
5153

test/test_create_storage201_response.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ def make_instance(self, include_optional):
4141
return CreateStorage201Response(
4242
bucket = timeweb_cloud_api.models.bucket.bucket(
4343
id = 1,
44-
name = Cute Quail,
44+
name = c372805f-72c7-416c-918d-ac78c2dde306,
4545
description = Bucket of awesome cats,
4646
disk_stats = timeweb_cloud_api.models.bucket_disk_stats.bucket_disk_stats(
4747
size = 10485760,
48-
used = 486.11328125, ),
48+
used = 486.11328125,
49+
is_unlimited = false, ),
4950
type = public,
5051
preset_id = 389,
5152
configurator_id = 55,
@@ -63,17 +64,19 @@ def make_instance(self, include_optional):
6364
website_config = timeweb_cloud_api.models.bucket_website_config.bucket_website_config(
6465
enabled = true,
6566
index_page = index.html,
66-
error_pages = null, ), )
67+
error_pages = null, ),
68+
is_allow_auto_upgrade = false, )
6769
)
6870
else :
6971
return CreateStorage201Response(
7072
bucket = timeweb_cloud_api.models.bucket.bucket(
7173
id = 1,
72-
name = Cute Quail,
74+
name = c372805f-72c7-416c-918d-ac78c2dde306,
7375
description = Bucket of awesome cats,
7476
disk_stats = timeweb_cloud_api.models.bucket_disk_stats.bucket_disk_stats(
7577
size = 10485760,
76-
used = 486.11328125, ),
78+
used = 486.11328125,
79+
is_unlimited = false, ),
7780
type = public,
7881
preset_id = 389,
7982
configurator_id = 55,
@@ -91,7 +94,8 @@ def make_instance(self, include_optional):
9194
website_config = timeweb_cloud_api.models.bucket_website_config.bucket_website_config(
9295
enabled = true,
9396
index_page = index.html,
94-
error_pages = null, ), ),
97+
error_pages = null, ),
98+
is_allow_auto_upgrade = false, ),
9599
)
96100
"""
97101

test/test_s3_api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ def test_delete_storage_subdomains(self):
6464
"""
6565
pass
6666

67+
def test_get_storage(self):
68+
"""Test case for get_storage
69+
70+
Получение хранилища по ID # noqa: E501
71+
"""
72+
pass
73+
6774
def test_get_storage_subdomains(self):
6875
"""Test case for get_storage_subdomains
6976

0 commit comments

Comments
 (0)