Aliyun.Oss.Bucket.Encryption (aliyun_oss v1.0.3)
Bucket Encryption 相关操作
Link to this section Summary
Functions
DeleteBucketEncryption接口用于删除Bucket加密规则。
GetBucketEncryption 用于获取Bucket加密规则。
PutBucketEncryption接口用于配置Bucket的加密规则。
Link to this section Types
Link to this type
error()
Link to this section Functions
Link to this function
delete(bucket)
DeleteBucketEncryption接口用于删除Bucket加密规则。
examples
Examples
iex> Aliyun.Oss.Bucket.Encryption.delete("some-bucket")
{:ok,
%Aliyun.Oss.Client.Response{
data: "",
headers: [
{"Server", "AliyunOSS"},
{"Date", "Fri, 11 Jan 2019 05:19:45 GMT"},
{"Content-Length", "0"},
{"Connection", "keep-alive"},
{"x-oss-request-id", "5C3000000000000000000000"},
{"x-oss-server-time", "90"}
]
}}
Link to this function
get(bucket)
GetBucketEncryption 用于获取Bucket加密规则。
examples
Examples
iex> Aliyun.Oss.Bucket.Encryption.get("some-bucket")
{:ok, %Aliyun.Oss.Client.Response{
data: %{
"ServerSideEncryptionRule" => %{
"ApplyServerSideEncryptionByDefault" => %{
"SSEAlgorithm" => "AES256"
}
}
},
headers: [
{"Date", "Wed, 05 Dec 2018 02:34:57 GMT"},
...
]
}}
Link to this function
put(bucket, opts \\ [])
PutBucketEncryption接口用于配置Bucket的加密规则。
options
Options
:algorithm
- Accept value::aes256
,:kms
, default is:aes256
:kms_master_key_id
- Should and only be set if algorithm is:kms
examples
Examples
iex> Aliyun.Oss.Bucket.Encryption.put("some-bucket", algorithm: :aes256)
{:ok,
%Aliyun.Oss.Client.Response{
data: "",
headers: [
{"Server", "AliyunOSS"},
{"Date", "Fri, 11 Jan 2019 05:05:50 GMT"},
{"Content-Length", "0"},
{"Connection", "keep-alive"},
{"x-oss-request-id", "5C0000000000000000000000"},
{"x-oss-server-time", "63"}
]
}}