Head bucket
Checks if the bucket is available for the current account or account by ID
- Parameters
- Advanced call ?
Function HeadBucket(Val Name, Val BasicData, Val Directory = False, Val AccountID = "", Val Headers = Undefined) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Name | --name | String | ✔ | Bucket name |
| BasicData | --basic | Structure Of KeyAndValue | ✔ | Basic request data. See GetBasicDataStructure |
| Directory | --dir | Boolean | ✖ | True > Path style URL, False > Virtual hosted style URL |
| AccountID | --account | String | ✖ | Account ID to verify that hes the bucket owner |
| Headers | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
Returns
Structure Of KeyAndValue - serialized JSON response from storage
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
tip
Method at AWS documentation: HeadBucket
1C:Enterprise/OneScript code example
URL = "s3.openintegrations.dev";
AccessKey = "bayselo...";
SecretKey = "12we34...";
Region = "BTC";
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
Directory = True; // Formation URL in path-style
Name = "w567hjy1";
Result = OPI_S3.HeadBucket(Name, BasicData, Directory);
Result = OPI_S3.HeadBucket(Name, BasicData, Directory, "1234");
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint s3 HeadBucket \
--name "0272875a" \
--basic "{'URL':'s3.openintegrations.dev','AccessKey':'***','SecretKey':'***','Region':'BTC','Service':'s3'}" \
--dir true \
--account "1234"
:: JSON data can also be passed as a path to a .json file
oint s3 HeadBucket ^
--name "0272875a" ^
--basic "{'URL':'s3.openintegrations.dev','AccessKey':'***','SecretKey':'***','Region':'BTC','Service':'s3'}" ^
--dir true ^
--account "1234"
Result
{
"status": 200,
"response": {},
"headers": {
"Accept-Ranges": "bytes",
"Vary": "Accept-Encoding",
"Server": "Microsoft-IIS/10.0",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Amz-Id-2": "dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8",
"X-Amz-Request-Id": "18B323819DB656C6",
"X-Content-Type-Options": "nosniff",
"X-Ratelimit-Limit": "6518",
"X-Ratelimit-Remaining": "6518",
"X-XSS-Protection": "1; mode=block",
"X-Powered-By": "ARR/3.0",
"Date": "Tue, 26 May 2026 14:21:57 GMT",
"Content-Length": "0",
"Content-Type": "application/xml"
}
}