mirror of
https://github.com/versity/versitygw.git
synced 2026-01-05 03:24:04 +00:00
15 lines
421 B
Bash
15 lines
421 B
Bash
#!/usr/bin/env bash
|
|
|
|
get_object_lock_configuration() {
|
|
if [[ $# -ne 1 ]]; then
|
|
log 2 "'get object lock configuration' command missing bucket name"
|
|
return 1
|
|
fi
|
|
lock_config=$(aws --no-verify-ssl s3api get-object-lock-configuration --bucket "$1") || local get_result=$?
|
|
if [[ $get_result -ne 0 ]]; then
|
|
log 2 "error obtaining lock config: $lock_config"
|
|
return 1
|
|
fi
|
|
export lock_config
|
|
return 0
|
|
} |