编辑归档服务器
更新归档服务器的配置。
请求 URL
POST {base_url}/{api_path}/archive_server/update?access_token={access_token}
请求参数
| 参数 | 是否必填 | 类型 | 说明 |
|---|---|---|---|
| id | 是 | Integer | 归档服务器的 ID。 注: 可通过 查询归档服务器列表 接口获取该 ID。 |
| name | 否 | String | 归档服务器的名称。 |
| server_type | 否 | String | 归档服务器的类型。 取值范围:
|
| host | 否 | String | 服务器地址。 注: 当 server_type 为
ftp 或 sftp 时,才使用此参数。 |
| port | 否 | Integer | 服务器端口。 注: 当 server_type 为
ftp 或 sftp 时,才使用此参数。 |
| protoc | 否 | String | FTP 服务器使用的协议。 注: 当 server_type 为
ftp 时,才使用此参数。取值范围:
|
| method | 否 | Integer | SFTP 服务器使用的认证方式。 注: 当 server_type 为
sftp 时,才使用此参数。取值范围:
|
| username | 否 | String | FTP 或 SFTP 账户的用户名。 注: 当 server_type 为
ftp 或 sftp 时,才使用此参数。 |
| password | 否 | String | FTP 或 SFTP 账户的密码。 注: 当 server_type 为
ftp,或 server_type 为 sftp 且
method 为 1 时,才使用此参数。 |
| ssh_private_key | 否 | String | 用于 SFTP 认证的 SSH 私钥的文件名。 注:
|
| endpoint | 否 | String | S3 兼容存储的 endpoint。 注: 当 server_type 为
amazon_s3 时,才使用此参数。 |
| region | 否 | String | S3 兼容存储的地域。 注: 当
server_type 为
amazon_s3 时,才使用此参数。 |
| access_key_id | 否 | String | S3 兼容存储账户的 Access Key ID。 注: 当 server_type 为
amazon_s3 时,才使用此参数。 |
| secret_access_key | 否 | String | S3 兼容存储账户的 Secret Access Key。 注: 当 server_type 为
amazon_s3 时,才使用此参数。 |
| tenant_id | 否 | String | Microsoft Entra 租户 ID。 注: 当
server_type 为 sharepoint
时,才使用此参数。 |
| client_id | 否 | String | 在 Microsoft Entra ID 中注册的应用程序 (客户端) ID。 注: 当
server_type 为 sharepoint
时,才使用此参数。 |
| client_secret | 否 | String | 在 Microsoft Entra ID 中注册的应用程序的客户端密钥。 注: 当
server_type 为 sharepoint
时,才使用此参数。 |
| private_key | 否 | String | 用于 Google Cloud Storage 认证的私钥的文件名。 注:
|
响应参数
| 参数 | 类型 | 说明 |
|---|---|---|
| errcode | Integer | 返回错误码。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息。
|
| errmsg | String | 返回信息。
|
示例
请求示例
POST /openapi/v1.0/archive_server/update?access_token=gwakjgu9ZBUfz36wql4ndsVKkryI0kdj HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json
{
"id": 14,
"name": "Google-Cloud-Backgup"
}
响应示例
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"submsg": ""
}