2024-11-13 22:48:21 +03:00
|
|
|
---
|
2024-11-14 17:27:44 +03:00
|
|
|
sidebar_position: 6
|
2024-11-13 22:48:21 +03:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
|
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
|
|
|
|
|
|
# Get buckets list
|
|
|
|
|
Gets a list of buckets. It is possible to use filters if they are provided by your service
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`Function GetBucketsList(Val BasicData, Val Prefix = "", Val Region = "", Val PageToken = "", Val Headers = Undefined) Export`
|
|
|
|
|
|
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|
|
|
|-|-|-|-|-|
|
|
|
|
|
| BasicData | --data | Structure of KeyAndValue | ✔ | Basic request data. See GetBasicDataStructure |
|
|
|
|
|
| Prefix | --prefix | String | ✖ | Filtering by the beginning of the name, if necessary |
|
|
|
|
|
| Region | --region | String | ✖ | Selection by bucket region, if necessary |
|
|
|
|
|
| PageToken | --ctoken | String | ✖ | Page token if pagination is used |
|
|
|
|
|
| Headers | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from storage
|
|
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
:::tip
|
|
|
|
|
Method at AWS documentation: [ListBuckets](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
|
|
|
|
|
:::
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
|
|
|
URL = "storage-155.s3hoster.by";
|
|
|
|
|
AccessKey = "BRN5RKJE67...";
|
|
|
|
|
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
|
|
|
|
Region = "BTC";
|
|
|
|
|
|
|
|
|
|
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
|
|
|
|
|
|
|
|
|
Result = OPI_S3.GetBucketsList(BasicData);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|