File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,22 @@ aws_s3_rm_with_hint() {
9494 aws_s3_rm_instruction $( peco_create_menu ' peco_aws_s3_list' )
9595}
9696
97+ #
98+ # TODO aws_s3_get_location for getting bucket location.
99+ # @param TODO The first parameter is the bucket name.
100+ # @return Buckets in Region us-east-1 have a LocationConstraint of null .
101+ #
102+ aws_s3_get_location () {
103+ aws_run_commandline " \
104+ aws s3api get-bucket-location --bucket ${1}
105+ "
106+ }
107+
108+ aws_s3_get_location_with_hint () {
109+ #
110+ aws_s3_get_location $( peco_create_menu ' peco_aws_s3_list' )
111+ }
112+
97113aws_s3_get_bucket_policy () {
98114 aws_s3_bucket_name=$1
99115 aws_run_commandline \
@@ -107,3 +123,19 @@ aws_s3_get_bucket_policy() {
107123aws_s3_get_bucket_policy_with_hint () {
108124 aws_s3_get_bucket_policy $( peco_create_menu ' peco_aws_s3_list' )
109125}
126+
127+ #
128+ # TODO to get presign url for s3 object.
129+ # @param The first parameter is the full path of object including s3 bucket name
130+ # For ex: s3://DOC-EXAMPLE-BUCKET/test2.txt
131+ # The second parameter is the expires-in (integer) Number of seconds until the pre-signed URL expires.
132+ # Default is 3600 seconds.
133+ # @return
134+ #
135+
136+ aws_s3_get_presigned_url () {
137+ aws_run_commandline " \
138+ aws s3 presign $1 --expires-in ${2:- 3600}
139+ "
140+
141+ }
You can’t perform that action at this time.
0 commit comments