{Alibaba OSS} 署名付きURL

 

https://www.alibabacloud.com/help/ja/oss/user-guide/how-to-obtain-the-url-of-a-single-object-or-the-urls-of-multiple-objects
https://www.alibabacloud.com/help/ja/oss/developer-reference/sign#concept-303817


-- 1. バケットの作成

 

aliyun oss mb oss://backet123 \
--storage-class Standard \
--redundancy-type LRS \
--acl private

 

aliyun oss ls 
aliyun oss ls -s

aliyun oss stat oss://backet123

 

 

-- 2. 動作確認

cat <<-'EOF' > index.html

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <title>My Website Home Page</title>
</head>
<body>
  <h1>Welcome to my website</h1>
  <p>Now hosted on Alibaba Cloud!</p>
</body>
</html>

EOF

 


aliyun oss cp index.html oss://backet123/index.html

aliyun oss ls oss://backet123 
aliyun oss ls oss://backet123 -s 


aliyun oss sign oss://backet123/index.html --timeout 180


curl "http://backet123.oss-ap-northeast-1.aliyuncs.com/index.html?Expires=1710072857&OSSAccessKeyId=LTZI5tCgDTfvW5pvMbfqgqPg&Signature=9ip1VRh6FbsTbetZ1N68jaQSkJ4%3D"

 


-- 3. バケットの削除
※最初にバケットを空にする必要がある

aliyun oss rm oss://backet123 --recursive --force
aliyun oss ls oss://backet123


aliyun oss rm oss://backet123 --bucket --force 

aliyun oss ls -s