检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
To host your static website on OBS, you can upload static website files to your bucket as objects, configure the public read permission for the objects, and then configure static website hosting for your bucket.
To host your static website on OBS, you can upload static website files to your bucket as objects, configure the public read permission for the objects, and then configure static website hosting for your bucket.
To modify an object, you must be the PFS owner or have the required permission (obs:bucket:PutObject in IAM or PutObject in a policy). For details, see Introduction to OBS Access Control, IAM Custom Policies, and Configuring an Object Policy.
For details, see Introduction to OBS Access Control, IAM Custom Policies, and Creating a Custom Bucket Policy. The mapping between OBS regions and endpoints must comply with what is listed in Regions and Endpoints.
Restrictions To obtain the upload progress, you must have the obs:object:PutObject permission. For details about permission granting, see Typical Permission Control Scenarios. The mapping between OBS regions and endpoints must comply with what is listed in Regions and Endpoints.
For details, see Introduction to OBS Access Control, IAM Custom Policies, and Creating a Custom Bucket Policy. The mapping between OBS regions and endpoints must comply with what is listed in Regions and Endpoints.
The OBS server automatically clears expired objects.
In this example, the bucket uses the default ACL (public read and write), the OBS Standard storage class, and the default global domain region.
Location String Definition: Region where a bucket is located Range: For more information about valid OBS regions and endpoints, see Regions and Endpoints.
Error Responses Table 2 List of OBS access error codes Error Code Description HTTP Status Code RestoreAlreadyInProgress Definition: The object is being restored. The request conflicts with another.
Response Syntax 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 HTTP/1.1 status_code Date: date Server:OBS Content-Length: contentlength <?xml version="1.0" encoding="UTF-8"?
If you use this parameter to change the encryption of an object, OBS returns a 400 error.
Option Description Value in OBS BrowserJS SDK Expedited restore Data can be restored within 1 to 5 minutes. ObsClient.enums.RestoreTierExpedited Standard restore Data can be restored within 3 to 5 hours. This is the default option.
The bucket created in the example is of the default ACL (private), in the OBS Standard storage class, and in the default region.
// require 'obs-autoloader.php'; // Declare the namespace. use Obs\ObsClient; // Create an instance of ObsClient. $obsClient = new ObsClient ( [ //Obtain an AK/SK pair using environment variables or import the AK/SK pair in other ways.
AppendObjectRequest request = new AppendObjectRequest(); request.BucketName = "bucketname"; request.ObjectKey = "objectkey"; request.InputStream = new MemoryStream(Encoding.UTF8.GetBytes("Hello OBS")); AppendObjectResponse response = client.AppendObject(request);
The IAM user does not have OBS operation permissions. Solution Authorize the user with required OBS operation permissions. For details, see Resource Preparation.
/doc/2015-06-30/"> <StorageQuota>10240000</StorageQuota> </Quota> Sample Response 1 2 3 4 5 6 7 HTTP/1.1 100 Continue HTTP/1.1 200 OK Server: OBS x-obs-request-id: BF260000016435E09A2BCA388688AA08 x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSHbmBecv7ohDSvqaRObpxzgzJ9+l8xT Date
/obsutil config -interactive command to update the access keys and OBS endpoint in the default configuration file. .
Table 22 obs_grantee_type Value Description OBS_GRANTEE_TYPE_CANONICAL_USER An OBS user. Bucket or object permissions can be granted to any user who has an OBS account. Authorized users can use the AK and SK to access OBS.