对象存储服务 OBS-下载对象请求参数:参数描述

时间:2023-11-01 16:18:08

参数描述

字段名

类型

约束

说明

Bucket

string

必选

桶名。

Key

string

必选

对象名。

ResponseCacheControl

string

可选

获取对象时重写响应中的Cache-Control头。

ResponseContentDisposition

string

可选

获取对象时重写响应中的Content-Disposition头。

ResponseContentEncoding

string

可选

获取对象时重写响应中的Content-Encoding头。

ResponseContentLanguage

string

可选

获取对象时重写响应中的Content-Language头。

ResponseContentType

string

可选

获取对象时重写响应中的Content-Type头。

ResponseExpires

string

可选

获取对象时重写响应中的Expires头。

VersionId

string

可选

对象的版本号。

ImageProcess

string

可选

图片处理参数。

RangeStart

int64

可选

指定下载对象的起始位置,非负整数。

RangeEnd

int64

可选

指定下载对象的结束位置。如果该值大于对象长度-1,实际仍取对象长度-1。

IfMatch

string

可选

如果对象的ETag值与该参数值相同,则返回对象内容,否则返回错误。

IfNoneMatch

string

可选

如果对象的ETag值与该参数值不相同,则返回对象内容,否则返回错误。

IfModifiedSince

time.Time

可选

如果对象的修改时间晚于该参数值指定的时间,则返回对象内容,否则返回错误。

IfUnmodifiedSince

time.Time

可选

如果对象的修改时间早于该参数值指定的时间,则返回对象内容,否则返回错误。

Origin

string

可选

预请求指定的跨域请求Origin(通常为域名)。

RequestHeader

string

可选

跨域请求可以使用的HTTP头域。

SseHeader

SseCHeader

可选

服务端解密头信息。

  • 如果包含IfUnmodifiedSince并且不符合或者包含IfMatch并且不符合,则下载对象失败,返回错误信息:412 precondition failed。
  • 如果包含IfModifiedSince并且不符合或者包含IfNoneMatch并且不符合,则下载对象失败,返回错误信息:304 Not Modified。
support.huaweicloud.com/sdk-go-devg-obs/obs_33_0366.html