Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Cloud Data Center
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Domain Name Service
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
DataArts Studio
Data Warehouse Service
Cloud Search Service
DataArts Lake Formation
DataArts Fabric
Data Ingestion Service
Data Lake Visualization
Data Lake Factory
IoT
IoT Device Access
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Industry Video Management Service
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
Huawei Cloud Astro Canvas
Huawei Cloud Astro Zero
CodeArts Governance
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Business Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance (CCI)
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Meeting
AI
ModelArts
PanguLargeModels
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Cloud Transformation
Cloud Adoption Framework
Well-Architected Framework
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate & Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
MacroVerse aPaaS
CloudDevice
KooDrive
Help Center/ Object Storage Service/ API Reference/ APIs/ Advanced Bucket Settings/ Obtaining Bucket Encryption Configuration

Obtaining Bucket Encryption Configuration

Updated on 2025-08-22 GMT+08:00

Functions

OBS uses the GET method to obtain the encryption configuration of a specified bucket.

To perform this operation, you must have the GetEncryptionConfiguration permission. By default, only the bucket owner can delete the tags of a bucket. The bucket owner can allow other users to perform this operation by setting a bucket policy or granting them the permission.

For more information about permission control, see the permission control in the OBS Permission Configuration Guide.

Request Syntax

1
2
3
4
5
6
GET /?encryption  HTTP/1.1
User-Agent: curl/7.29.0
Host: bucketname.obs.region.myhuaweicloud.com 
Accept: */*
Date: date 
Authorization: authorization string

Request parameters

This request contains no message parameters.

Request Headers

This request uses common headers. For details, see Table 3.

Request Elements

This request involves no elements.

Response Syntax

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
HTTP/1.1 status_code
x-obs-request-id: request id 
x-obs-id-2: id  
Content-Type: application/xml 
Content-Length: length 
Date: date 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<ServerSideEncryptionConfiguration xmlns="http://obs.region.myhuaweicloud.com/doc/2015-06-30/"> 
    <Rule>
        <ApplyServerSideEncryptionByDefault>
            <SSEAlgorithm>kms</SSEAlgorithm>
            <KMSMasterKeyID>kmskeyid-value</KMSMasterKeyID>
            <ProjectID>projectid</ProjectID>
        </ApplyServerSideEncryptionByDefault>
    </Rule>
</ServerSideEncryptionConfiguration>

Response Headers

The response to the request uses common headers. For details, see Table 1.

Response Elements

This response contains the following elements to detail bucket encryption configuration:

Table 1 Configuration elements of bucket encryption

Parameter

Type

Description

ServerSideEncryptionConfiguration

Container

Definition:

Root element of the default bucket encryption configuration. ServerSideEncryptionConfiguration is the parent node of Rule.

Range:

None

Rule

Container

Definition:

Child element of the default bucket encryption configuration. Rule is the parent node of ApplyServerSideEncryptionByDefault.

Range:

For details, see Rule parameters.

Table 2 Rule parameter description

Parameter

Type

Description

ApplyServerSideEncryptionByDefault

Container

Definition:

The child element of the default bucket encryption configuration.

Range:

For details, see Table 3.

Table 3 ApplyServerSideEncryptionByDefault parameters

Parameter

Type

Description

SSEAlgorithm

String

Definition:

Server-side encryption algorithm used for the default encryption configuration of a bucket.

Range:

  • kms: SSE-KMS encryption and the AES256 algorithm are used.
  • AES256: SSE-OBS encryption and the AES256 algorithm are used.

KMSMasterKeyID

String

Definition:

KMS master key ID used in SSE-KMS encryption.

Range:

  • regionID:domainID:key/key_id
  • key_id

In the preceding formats:

ProjectID

String

Definition:

ID of the project where the KMS master key belongs when SSE-KMS is used.

Range:

Project ID that matches KMSMasterKeyID, that is, the ID of the project to which the master key with the specified KMSMasterKeyID belongs

Error Responses

In addition to common error codes, this API also returns others. The following table lists common errors and possible causes. For details, see Table 4.

Table 4 Error codes related to getting bucket encryption configuration

Error Code

Description

HTTP Status Code

NoSuchEncryptionConfiguration

The specified bucket does not have any encryption configurations

404 Not Found

Sample Request

1
2
3
4
5
6
GET /?encryption HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.region.myhuaweicloud.com
Accept: */*
Date:  Thu, 21 Feb 2019 03:05:34 GMT
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:DpSAlmLX/BTdjxU5HOEwflhM0WI=

Sample Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: BF26000001643670AC06E7B9A7767921
x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSvK6z8HV6nrJh49gsB5vqzpgtohkiFm
Date: Thu, 21 Feb 2019 03:05:34 GMT
Content-Length: 788

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<ServerSideEncryptionConfiguration xmlns="http://obs.region.myhuaweicloud.com/doc/2015-06-30/"> 
    <Rule>
        <ApplyServerSideEncryptionByDefault>
            <SSEAlgorithm>kms</SSEAlgorithm>
            <KMSMasterKeyID>4f1cd4de-ab64-4807-920a-47fc42e7f0d0</KMSMasterKeyID>
        </ApplyServerSideEncryptionByDefault>
    </Rule>
</ServerSideEncryptionConfiguration>

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback
咨询盘古Doer

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback