检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
Console.WriteLine("Delete bucket website response: {0}", response.StatusCode); } catch (ObsException ex) { Console.WriteLine("ErrorCode: {0}", ex.ErrorCode); Console.WriteLine("ErrorMessage: {0}", ex.ErrorMessage); } To handle the error codes possibly returned during the operation, see OBS
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: None Value range: None Default value: None Table 14 obs_response_properties Parameter Type Mandatory (Yes/No) Description request_id const char * No Explanation: The value created by OBS to uniquely identify the request. OBS uses this value to locate the fault.
For details, see Introduction to OBS Access Control, IAM Custom Policies, and Configuring an Object Policy. The mapping between OBS regions and endpoints must comply with what is listed in Regions and Endpoints. An object can have a maximum of 100 rules in its ACL.
// 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.
Parameter Description Method in OBS Android SDK contentType Rewrites Content-Type in HTTP/HTTPS responses. ObjectRepleaceMetadata.setContentType contentLanguage Rewrites Content-Language in HTTP/HTTPS responses.
\t" + rule.getAllowedHeader()); Log.i("GetBucketCors","\t" + rule.getAllowedOrigin()); Log.i("GetBucketCors","\t" + rule.getAllowedMethod()); Log.i("GetBucketCors","\t" + rule.getExposeHeader()); } To handle the error codes possibly returned during the operation, see OBS
You can perform the following to implement website file hosting: Upload a website file to your bucket in OBS as an object and set the MIME type for the object. Set the object ACL to public read. Access the object using a browser.
bucketname"]; [client getBucketMetaData:request completionHandler:^(OBSGetBucketMetaDataResponse *response, NSError *error){ NSLog(@"%@",response); }]; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS
client getBucketStorageInfo:request completionHandler:^(OBSGetBucketStorageInfoResponse *response, NSError *error) { NSLog(@"%@",response.storageInfo); }]; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS
bucketname"]; [client getBucketVersioning:request completionHandler:^(OBSGetBucketVersioningResponse *response, NSError *error) { NSLog(@"%@",response); }]; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS
@"bucketname"]; [client getBucketLifecycle:request completionHandler:^(OBSGetBucketLifecycleResponse *response, NSError *error){ NSLog(@"%@",response); }]; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS
bucketname"]; [client deleteBucketLifecycle:request completionHandler:^(OBSDeleteBucketLifecycleResponse *response, NSError *error){ NSLog(@"%@",response); }]; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS
initWithBucketName:@"bucketname"]; [client getBucketCORS:request completionHandler:^(OBSGetBucketCORSResponse *response, NSError *error) { NSLog(@"%@",response); }]; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS
bucketname"]; [client deleteBucketCORS:request completionHandler:^(OBSDeleteBucketCORSResponse *response, NSError *error) { NSLog(@"%@",response); }]; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS
initWithBucketName:@"bucketname"]; [client getBucketLogging:request completionHandler:^(OBSGetBucketLoggingResponse *response, NSError *error){ NSLog(@"%@",response); }]; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS
bucketname"]; [client setBucketLogging:request completionHandler:^(OBSSetBucketLoggingResponse *response, NSError *error){ NSLog(@"%@",response); }]; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS
initWithBucketName:@"bucketname"]; [client getBucketWebsite:request completionHandler:^(OBSGetBucketWebsiteResponse *response, NSError *error){ NSLog(@"%@",response); }]; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS
bucketname"]; [client deleteBucketWebsite:request completionHandler:^(OBSDeleteBucketWebsiteResponse *response, NSError *error){ NSLog(@"%@",response); }]; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS
initWithBucketName:@"bucketname"]; [client getBucketTagging:request completionHandler:^(OBSGetBucketTaggingResponse *response, NSError *error){ NSLog(@"%@",response); }]; For details about the meanings, causes, and handling methods of possible error codes returned during the operation, see OBS