curl --request DELETE \
--url https://storage.{region}.basaltic.sh/v1/buckets/{bucket}/lifecycle \
--header 'Authorization: Bearer <token>' \
--header 'If-Match: <if-match>'import requests
url = "https://storage.{region}.basaltic.sh/v1/buckets/{bucket}/lifecycle"
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'If-Match': '<if-match>', Authorization: 'Bearer <token>'}
};
fetch('https://storage.{region}.basaltic.sh/v1/buckets/{bucket}/lifecycle', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://storage.{region}.basaltic.sh/v1/buckets/{bucket}/lifecycle",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"If-Match: <if-match>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://storage.{region}.basaltic.sh/v1/buckets/{bucket}/lifecycle"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("If-Match", "<if-match>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://storage.{region}.basaltic.sh/v1/buckets/{bucket}/lifecycle")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://storage.{region}.basaltic.sh/v1/buckets/{bucket}/lifecycle")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Excluir configuração de ciclo de vida do bucket
Leia a configuração atual primeiro e, em seguida, forneça sua revisão citada em If-Match. Uma alteração simultânea retorna LIFECYCLE_CONFLICT (412); recarregar e revisar antes de tentar novamente. A API compatível com S3 mantém a substituição incondicional do ciclo de vida.
curl --request DELETE \
--url https://storage.{region}.basaltic.sh/v1/buckets/{bucket}/lifecycle \
--header 'Authorization: Bearer <token>' \
--header 'If-Match: <if-match>'import requests
url = "https://storage.{region}.basaltic.sh/v1/buckets/{bucket}/lifecycle"
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'If-Match': '<if-match>', Authorization: 'Bearer <token>'}
};
fetch('https://storage.{region}.basaltic.sh/v1/buckets/{bucket}/lifecycle', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://storage.{region}.basaltic.sh/v1/buckets/{bucket}/lifecycle",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"If-Match: <if-match>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://storage.{region}.basaltic.sh/v1/buckets/{bucket}/lifecycle"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("If-Match", "<if-match>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://storage.{region}.basaltic.sh/v1/buckets/{bucket}/lifecycle")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://storage.{region}.basaltic.sh/v1/buckets/{bucket}/lifecycle")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}storage:PutLifecycleConfiguration. Consulte permissões de armazenamento para obter a lista completa, o que cada uma abrange e um exemplo de política.Autorizações
Um token bearer OAuth 2.0, enviado como Authorization: Bearer <token>. Esta é a forma recomendada de autenticação.
Obtenha o token trocando o par de chaves de acesso de uma conta de serviço em POST /v1/oauth/token com grant_type=client_credentials. Esse é o fluxo padrão de credenciais de cliente; bibliotecas compatíveis com OAuth podem obter e renovar o token para você.
curl -s -u "$KEY_ID:$SECRET" -d grant_type=client_credentials \
https://iam.basaltic.sh/v1/oauth/token
Os tokens duram uma hora por padrão. O mesmo par de chaves de acesso também serve como credencial AWS SigV4 para o endpoint de objetos compatível com S3, que aceita somente esse método de autenticação.
Cabeçalhos
Revisão exata citada de GET. Não são aceites curingas e tags de entidade fracas.
"\"none\""
Parâmetros de caminho
"my-app-assets"
Resposta
Configuração de ciclo de vida removida.

