对象存储
参数 | 参数类型 | 是否必选 | 示例值 | 说明 |
ak | String | 可选 | AKTPYmI1ZGQwMDA0NjlhNGFkMzhjNzM0N2Q0OTQ3ZTV**** | Access Key ID,即密钥 ID。 |
sk | String | 可选 | T1dJM01UUXpOak0wTVdWak5EUmtOR0poWldJNU1HWmxaV1V5TkdReVl6**** | SecretAccess Key,即私有访问密钥。 |
endpoint | String | 可选 | https://tos-cn-beijing.volces.com | 访问域名。 |
region | String | 必选 | cn-beijing | TOS 服务端所在地域。完整格式:https://{host}:{port}。 |
security_token | String | 可选 | STSeyJBY2NvdW50SWQiOjIxMDAwMDUyMjQsIklkZW50aXR5VHlwZSI6NCwiSWRlbnRpdHlJZCI6MTE3MjI5NiwiQ2hhbm5lbCI6IlVzZXIiLCJBY2Nlc3NLZXlJZCI6IkFLVFBZbUkxWkdRd01EQTBOamxoTkdGa016aGpOek0wTjJRME9UUTNaVFZqTXpFIiwiU2l************ | 临时访问凭证中的安全令牌。 |
control_endpoint | String | 可选 | https://tos-control-cn-beijing.volces.com | TOS 服务端控制面域名,完整格式:https://{host}:{port}。 |
enable_verify_ssl | bool | 可选 | true | 配置是否开启 SSL 证书校验,默认值为 true。 |
auto_recognize_content_type | bool | 可选 | true | 自动识别 MIME 类型,默认值为 true。 |
request_timeout | isize | 可选 | 120000 | 一次 HTTP 请求总超时时间,单位:毫秒,默认 120000ms。 |
connection_timeout | isize | 可选 | 10000 | 设置建立连接超时时间,单位:毫秒,默认值为 10000ms。 |
max_connections | isize | 可选 | 1024 | 连接池中允许打开的最大 HTTP 连接数,默认值为 1024。 |
idle_connection_time | isize | 可选 | 60000 | 连接池中空闲 HTTP 连接时间超过此参数的设定值,则关闭 HTTP 连接,单位:毫秒,默认 60000ms。 |
max_retry_count | isize | 可选 | 3 | 设置最大重试次数,默认值为 3。 |
enable_crc | bool | 可选 | true | 设置开启 CRC 校验,默认值为 true。 |
is_custom_domain | bool | 可选 | false | 是否将桶名拼接到 Endpoint 前,通过虚拟主机域名的方式访问 TOS,取值说明如下:
默认值为 false。 说明 通过自定义域名访问 TOS 时,需要设置 isCustomDomain 为 true。 |
proxy_host | String | 可选 | http://your-proxy.com | 代理服务器的主机地址,当前只支持 http 协议。 |
proxy_port | isize | 可选 | 8080 | 代理服务器的端口号。 |
proxy_username | String | 可选 | username | 连接代理服务器时使用的用户名。 |
proxy_password | String | 可选 | password | 连接代理服务器时使用的用户密码。 |
disable_encoding_meta | bool | 可选 | true | 是否进行对用户自定义元数据(x-tos-meta-*)、Content-Disposition 的编码,为 true 时不进行编码,默认为 false。 |
expect_100_continue_threshold | isize | 可选 | 65536 | 大于 0 时,代表上传对象相关接口对于待上传的数据长度大于该阈值的请求(无法预测数据长度的情况统一判定为大于该阈值)开启 100-Continue 机制,单位:字节,默认为 65536。 |
high_latency_log_threshold | isize | 可选 | 100 | 大于 0 时,代表开启高延迟日志,单位:KB,默认为 100,当单次请求传输总速率低于该值且总请求耗时大于 500 毫秒时打印 WARN 级别日志。 |
user_agent_product_name | String | 可选 | your-product-name | User-Agent 扩展规范中的业务方/产品名。 |
user_agent_soft_name | String | 可选 | your-soft-name | User-Agent 扩展规范中的软件名。 |
user_agent_soft_version | String | 可选 | v1.0.0 | User-Agent 扩展规范中的软件版本号。 |
user_agent_customized_key_values | HashMap<String, String> | 可选 | - | User-Agent 扩展规范中的自定义扩展 KV 键值对。 |
follow_redirect_times | isize | 可选 | 3 | Get/Head 请求跟随 3xx 重定向的最大次数,默认为 0,代表不跟随重定向。 |
client_crt | String | 可选 | - | 客户端 SSL 证书文件路径。 |
client_key | String | 可选 | - | 客户端 SSL 密钥文件路径。 |
ca_crt | String | 可选 | - | 服务端自定义根证书文件路径。 |