Aliyun.Oss.Bucket.Website.delete

You're seeing just the function delete, go back to Aliyun.Oss.Bucket.Website module for more information.

Specs

delete(String.t()) :: {:error, error()} | {:ok, Aliyun.Oss.Client.Response.t()}

DeleteBucketWebsite操作用于关闭Bucket的静态网站托管模式以及跳转规则。

Examples

iex> Aliyun.Oss.Bucket.Website.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"}
  ]
}}
iex> Aliyun.Oss.Bucket.Website.delete("unknown-bucket")
{:error,
%Aliyun.Oss.Client.Error{
  parsed_details: %{
    "BucketName" => "unknown-bucket",
    "Code" => "NoSuchBucket",
    "HostId" => "unknown-bucket.oss-cn-shenzhen.aliyuncs.com",
    "Message" => "The specified bucket does not exist.",
    "RequestId" => "5C38283EC84D1C4471F2F48A"
  },
  body: "<?xml version="1.0" encoding="UTF-8"?>...</xml>",
  status_code: 404
}}