Skip to main content

Put bucket versioning

Sets the versioning settings for bucket objects

Function PutBucketVersioning(Val Name, Val BasicData, Val Status = Undefined, Val MFADelete = Undefined, Val Directory = False, Val Headers = Undefined) Export

ParameterCLI optionTypeRequiredDescription
Name--nameStringBucket name
BasicData--basicStructure Of KeyAndValueBasic request data. See GetBasicDataStructure
Status--statusBooleanEnable and disable versioning, if necessary
MFADelete--mfadBooleanEnable and disable MFA deletion, if necessary
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

Method at AWS documentation: PutBucketVersioning


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

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

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

oint s3 PutBucketVersioning \
--name "45dbe5d6" \
--basic "{'URL':'s3.openintegrations.dev','AccessKey':'***','SecretKey':'***','Region':'BTC','Service':'s3'}" \
--status true
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": "18A00B46235F6744",
"X-Content-Type-Options": "nosniff",
"X-Ratelimit-Limit": "6432",
"X-Ratelimit-Remaining": "6432",
"X-XSS-Protection": "1; mode=block",
"X-Powered-By": "ARR/3.0",
"Date": "Wed, 25 Mar 2026 09:24:08 GMT",
"Content-Length": "0"
}
}