Skip to main content

Put bucket tagging

Sets the tag set for the bucket

Function PutBucketTagging(Val Name, Val BasicData, Val Tags, Val Directory = False, Val Headers = Undefined) Export

ParameterCLI optionTypeRequiredDescription
Name--nameStringBucket name
BasicData--basicStructure Of KeyAndValueBasic request data. See GetBasicDataStructure
Tags--tagsetStructure Of KeyAndValueSet of tags (key and value)
Directory--dirBooleanTrue > Path style URL, False > Virtual hosted style URL
Headers--headersMap Of KeyAndValueAdditional request headers, if necessary
Returns

Structure Of KeyAndValue - serialized JSON response from storage

tip

Setting up a new set removes all existing bucket tags

Method at AWS documentation: PutBucketTagging


1C:Enterprise/OneScript code example
URL = "s3.openintegrations.dev";
AccessKey = "bayselo...";
SecretKey = "12we34...";
Region = "BTC";

BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);

TagStructure = New Structure;
TagStructure.Insert("MyTag1", "SomeValue");
TagStructure.Insert("MyTag2", "AnotherOne");

Directory = True; // Formation URL in path-style
Name = "w567hjy1";
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure);
# JSON data can also be passed as a path to a .json file

oint s3 PutBucketTagging \
--name "0272875a" \
--basic "{'URL':'s3.openintegrations.dev','AccessKey':'***','SecretKey':'***','Region':'BTC','Service':'s3'}" \
--tagset "{'MyTag1':'SomeValue','MyTag2':'AnotherOne'}"
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": "18B323822062ED02",
"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:59 GMT",
"Content-Length": "0"
}
}