Deleting a Bucket's Encryption Configurations
API Description
You can use this API to delete the encryption configurations of a bucket.
Method Definition
func (obsClient ObsClient) DeleteBucketEncryption(bucketName string) (output *BaseModel, err error)
Method Definition If a Signed URL Is Used
func (obsClient ObsClient) DeleteBucketEncryptionWithSignedURL(signedURL string, actualSignedRequestHeaders http.Header) (output *BaseModel, err error)
Request Parameters
| Field | Type | Optional or Mandatory | Description |
|---|---|---|---|
| bucketName | string | Mandatory | Bucket name |
Returned Result
| Field | Type |
|---|---|
| output | |
| err | error |
Sample Code
var obsClient, _ = obs.New(ak, sk, endpoint, obs.WithSignature(obs.SignatureObs)) func main() // Delete the encryption configurations of the specified bucket. output, err := obsClient.DeleteBucketEncryption("bucketName") if err == nil { fmt.Printf("RequestId:%s\n", output.RequestId) } else { if obsError, ok := err.(obs.ObsError); ok { fmt.Println(obsError.Code) fmt.Println(obsError.Message) } else { fmt.Println(err) } } }
Last Article: Obtaining a Bucket's Encryption Configurations
Next Article: Objects-Related APIs
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.