MCPcopy Create free account
hub / github.com/aws/aws-cli / _get_bucket_name

Method _get_bucket_name

awscli/customizations/s3/subcommands.py:1013–1025  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

1011 return website_config
1012
1013 def _get_bucket_name(self, path):
1014 # We support either:
1015 # s3://bucketname
1016 # bucketname
1017 #
1018 # We also strip off the trailing slash if a user
1019 # accidently appends a slash.
1020 if path.startswith('s3://'):
1021 path = path[5:]
1022 if path.endswith('/'):
1023 path = path[:-1]
1024 block_unsupported_resources(path)
1025 return path
1026
1027
1028class PresignCommand(S3Command):

Callers 1

_run_mainMethod · 0.95

Calls 1

Tested by

no test coverage detected