Anda dapat memanggil operasi ini untuk mengambil konfigurasi bayar-per-permintaan suatu bucket.
Sintaksis permintaan
GET /? requestPayment HTTP/1.1
Date: GMT Date
Host: BucketName.oss.aliyuncs.com
Authorization: authorization string
Elemen respons
|
Element |
Type |
Description |
|
RequestPaymentConfiguration |
Container |
Menunjukkan container untuk pihak yang membayar. Child: Payer |
|
Payer |
String |
Menunjukkan siapa yang membayar biaya unduh dan permintaan. Nilai valid: BucketOwner dan Requester Parent: RequestPaymentConfiguration |
Contoh
Minta Sampel
GET /? requestPayment
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Thu, 17 Apr 2025 01:23:20 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
Contoh respons
200 (OK)
content-length: 129
server: AliyunOSS
x-oss-request-id: 5D366188B007B79097EC****
date: Tue, 23 Jul 2019 01:23:20 GMT
content-type: application/xml
<? xml version="1.0" encoding="UTF-8"? >
<RequestPaymentConfiguration>
<Payer>BucketOwner</Payer>
</RequestPaymentConfiguration>
OSS SDKs
ossutil
Untuk informasi mengenai perintah ossutil yang sesuai dengan operasi GetBucketRequestPayment, lihat get-bucket-request-payment.
Kode error
|
Error code |
HTTP status code |
Description |
|
NoSuchBucket |
404 |
Pesan error yang dikembalikan karena bucket yang ditentukan tidak ada. |