หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
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
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
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
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
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster 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
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
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
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
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
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Obtaining Bucket Metadata

Updated on 2024-09-29 GMT+08:00

Functions

This operation queries the metadata of a bucket. To use this operation, you must have the permission to read the bucket.

Request Syntax

1
2
3
4
HEAD / HTTP/1.1 
Host: bucketname.obs.region.myhuaweicloud.com 
Date: date
Authorization: authorization

Request Parameters

This request contains no parameters.

Request Headers

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

If you want to get CORS configuration information, you must use the headers in Table 1.

Table 1 Request headers for obtaining CORS configuration

Header

Type

Mandatory (Yes/No)

Description

Origin

String

Yes

Explanation:

Origin of the cross-domain request specified by the pre-request. Generally, it is a domain name.

Restrictions:

You can enter multiple origins, with one separated from another using a line break. Each origin can contain at most one wildcard character (*).

Value range:

An HTTP-compliant header value

Default value:

None

Access-Control-Request-Headers

String

No

Explanation:

HTTP headers in a request

Restrictions:

You can enter multiple allowed headers, with one separated from another using a line break. Each header can contain one wildcard character (*) at most. Spaces, ampersands (&), colons (:), and less-than signs (<) are not allowed.

Value range:

An HTTP-compliant header value

Default value:

None

Request Elements

This request contains no elements.

Response Syntax

1
2
3
HTTP/1.1 status_code
x-obs-bucket-location: region
Date: date

Response Headers

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

In addition to the common response headers, the headers listed in Table 2 may be used.

Table 2 Additional response headers

Header

Type

Description

x-obs-bucket-location

String

Explanation:

The region where the bucket resides.

Restrictions:

None

Value range:

None

Default value:

None

x-obs-storage-class

String

Explanation:

Default storage class of the bucket.

Restrictions:

None

Value range:

  • STANDARD (Standard storage)
  • WARM (Infrequent Access storage)
  • COLD(Archive storage)
  • DEEP_ARCHIVE (Deep Archive storage)

Default value:

None

x-obs-version

String

Explanation:

OBS version of the bucket.

Restrictions:

None

Value range:

  • 3.0: bucket of the latest version
  • --: bucket of an earlier version

Default value:

None

x-obs-fs-file-interface

String

Explanation:

Whether it is a parallel file system

Restrictions:

If this header field is not carried, the bucket is not a parallel file system.

Value range:

The value can be Enabled (parallel file system).

Default value:

None

x-obs-epid

String

Explanation:

Enterprise project ID for the current bucket. Users who have enabled the enterprise project function can obtain the ID from the enterprise project service.

Restrictions:

The value is a UUID. This parameter is not required if you have not enabled an enterprise project.

Value range:

See How Do I Obtain an Enterprise Project ID?

Default value:

None

x-obs-az-redundancy

String

Explanation:

Specifies an AZ redundancy type.

Value 3az indicates that data is stored in multiple AZs in the same region.

If this header field is not carried, data is stored in a single AZ.

Restrictions:

Multi-AZ redundancy is not available for Archive and Deep Archive storage. If the region where the bucket is located does not support multi-AZ storage, single-AZ storage is used by default.

Value range:

If multi-AZ storage is configured for the bucket, 3az is returned. If single-AZ storage is configured for the bucket, None is returned.

Default value:

None

Access-Control-Allow-Origin

String

Explanation:

Indicates that the origin is included in the response if the origin in the request meets the CORS configuration requirements when CORS is configured for buckets.

Restrictions:

None

Value range:

The value that complies with the CORS

Default value:

None

Access-Control-Allow-Headers

String

Explanation:

Indicates that the headers are included in the response if headers in the request meet the CORS configuration requirements when CORS is configured for buckets.

Restrictions:

None

Value range:

The value that complies with the CORS

Default value:

None

Access-Control-Max-Age

Integer

Explanation:

Value of MaxAgeSeconds in the CORS configuration of the server when CORS is configured for buckets.

Restrictions:

None

Value range:

An integer greater than or equal to 0, in seconds

Default value:

3000

Access-Control-Allow-Methods

String

Explanation:

Indicates that methods in the rule are included in the response if Access-Control-Request-Method in the request meets the CORS configuration requirements when CORS is configured for buckets.

Restrictions:

None

Value range:

  • GET
  • PUT
  • HEAD
  • POST
  • DELETE

Default value:

None

Access-Control-Expose-Headers

String

Explanation:

ExposeHeader in the CORS rules of the bucket. It specifies additional headers allowed in the response by a CORS rule, which are used to provide extra information to clients. By default, a browser can access only headers Content-Length and Content-Type. If the browser needs to access other headers, you need to configure them in this parameter.

Restrictions:

Spaces, wildcard characters (*), ampersands (&), colons (:), less-than signs (<), and full-width characters are not allowed.

Value range:

None

Default value:

None

Response Elements

This response contains no elements.

Error Responses

No special error responses are returned. For details about error responses, see Table 2.

Sample Request: Getting CORS Configuration (with No Headers Specified)

1
2
3
4
5
6
HEAD / HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.region.myhuaweicloud.com
Accept: */*
Date: WED, 01 Jul 2015 02:30:25 GMT
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:niCQCuGIZpETKIyx1datxHZyYlk=

Sample Response: Getting CORS Configuration (with No Headers Specified)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: BF260000016439C734E0788404623FA8
Content-Type: application/xml
x-obs-storage-class: STANDARD
x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSxwLpq9Hzf3OnaXr+pI/OPLKdrtiQAF
Date: WED, 01 Jul 2015 02:30:25 GMT
x-obs-bucket-location: region
x-obs-version: 3.0
Content-Length: 0

Sample Request: Getting Bucket Metadata and CORS Configuration

1
2
3
4
5
6
7
8
HEAD / HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.region.myhuaweicloud.com
Accept: */*
Date: WED, 01 Jul 2015 02:30:25 GMT
Authorization: OBS H4IPJX0TQTHTHEBQQCEC:niCQCuGIZpETKIyx1datxHZyYlk=
Origin:www.example.com
Access-Control-Request-Headers:AllowedHeader_1

Sample Response: Getting Bucket Metadata and CORS Configuration

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: BF260000016439C734E0788404623FA8
Content-Type: application/xml
x-obs-storage-class: STANDARD
x-obs-id-2: 32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSxwLpq9Hzf3OnaXr+pI/OPLKdrtiQAF
Date: WED, 01 Jul 2015 02:30:25 GMT
x-obs-bucket-location: region
Access-Control-Allow-Origin: www.example.com 
Access-Control-Allow-Methods: POST,GET,HEAD,PUT 
Access-Control-Allow-Headers: AllowedHeader_1 
Access-Control-Max-Age: 100 
Access-Control-Expose-Headers: ExposeHeader_1 
x-obs-version: 3.0
Content-Length: 0

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback