View a markdown version of this page

GetBucketLoggingStatus (SOAP API) - Amazon Simple Storage Service

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

GetBucketLoggingStatus (SOAP API)

注意

Amazon S3 的 SOAP API 不適用於新客戶,並且將於 2025 年 8 月 31 日接近生命週期結束 (EOL)。我們建議您使用 REST API 或 AWS SDKs。

GetBucketLoggingStatus擷取現有儲存貯體的記錄狀態。

如需此功能的一般簡介,請參閱伺服器日誌

範例

Sample Request

<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetBucketLoggingStatus xmlns="https://doc.s3.amazonaws.com/2006-03-01"> <Bucket>mybucket</Bucket> <AWSAccessKeyId>YOUR_AWS_ACCESS_KEY_ID</AWSAccessKeyId> <Timestamp>2006-03-01T12:00:00.183Z</Timestamp> <Signature>YOUR_SIGNATURE_HERE</Signature> </GetBucketLoggingStatus> </soap:Body> </soap:Envelope>

Sample Response

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > <soapenv:Header> </soapenv:Header> <soapenv:Body> <GetBucketLoggingStatusResponse xmlns="https://s3.amazonaws.com/doc/2006-03-01"> <GetBucketLoggingStatusResponse> <LoggingEnabled> <TargetBucket>mylogs</TargetBucket> <TargetPrefix>mybucket-access_log-</TargetPrefix> </LoggingEnabled> </GetBucketLoggingStatusResponse> </GetBucketLoggingStatusResponse> </soapenv:Body> </soapenv:Envelope>

存取控制

只有儲存貯體的擁有者才能叫用此操作。