Access tracking (PHP SDK V2)
Updated at:
Use Object Storage Service (OSS) SDK for PHP 2.0 to enable or query access tracking for a bucket.
Prerequisites
Before you begin, make sure that you have:
Installed OSS SDK for PHP 2.0 and its dependencies via Composer
An OSS bucket
Your AccessKey ID and AccessKey secret stored as environment variables
Usage notes
The sample code uses the region ID cn-hangzhou (China (Hangzhou)) with a public endpoint by default. To access OSS from another Alibaba Cloud service in the same region, use an internal endpoint instead. For region-to-endpoint mappings, see Regions and endpoints.
Examples
References
For the API operation used to enable access tracking, see PutBucketAccessMonitor.
For the API operation used to query the access tracking status, see GetBucketAccessMonitor.
Is this page helpful?