in src/mount_efs/__init__.py [0:0]
def check_options_validity(options):
if "tls" in options:
if "port" in options:
fatal_error('The "port" and "tls" options are mutually exclusive')
if "tlsport" in options:
try:
int(options["tlsport"])
except ValueError:
fatal_error(
"tlsport option [%s] is not an integer" % options["tlsport"]
)
if "ocsp" in options and "noocsp" in options:
fatal_error('The "ocsp" and "noocsp" options are mutually exclusive')
if "notls" in options:
fatal_error('The "tls" and "notls" options are mutually exclusive')
if "accesspoint" in options:
if "tls" not in options:
fatal_error('The "tls" option is required when mounting via "accesspoint"')
if not AP_ID_RE.match(options["accesspoint"]):
fatal_error("Access Point ID %s is malformed" % options["accesspoint"])
if "iam" in options and "tls" not in options:
fatal_error('The "tls" option is required when mounting via "iam"')
if "awsprofile" in options and "iam" not in options:
fatal_error(
'The "iam" option is required when mounting with named profile option, "awsprofile"'
)
if "awscredsuri" in options:
if "iam" not in options:
fatal_error('The "iam" option is required when mounting with "awscredsuri"')
if "awsprofile" in options:
fatal_error(
'The "awscredsuri" and "awsprofile" options are mutually exclusive'
)
# The URI must start with slash symbol as it will be appended to the ECS task metadata endpoint
if not options["awscredsuri"].startswith("/"):
fatal_error("awscredsuri %s is malformed" % options["awscredsuri"])