Creates a data source.
Operation description
For the on-premises NAS backup feature, the supported data source type is on-premises NAS (COMMON_NAS).
For the CPFS backup feature, the supported data source types are Cloud Parallel File Storage (CPFS), CPFS for AI (BMCPFS), and other large-scale file systems (COMMON_FILE_SYSTEM).
For the archiving feature, the supported data source types are on-premises NAS (COMMON_NAS), HDFS (HDFS), and S3 (S3).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hbr:AddDataSource |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DataSourceType |
string |
Yes |
The data source type. |
COMMON_NAS |
| DataSourceName |
string |
Yes |
The name of the data source. |
MyLocalNas |
| Credential |
string |
No |
The access credential for the data source. Specify this parameter as needed for on-premises NAS data sources that use the SMB protocol, OSS protocol-compatible data sources, and S3 protocol-compatible data sources. Examples:
|
{ "mountUsername": "*****", "mountPassword": "*****" } |
| ConnectionInfo |
string |
No |
The connection information of the data source, which describes how to access the data source. Examples:
|
{ "dataServerAddresses": [ { "host": "123.123.123.123", "port": "8080" } ], "sharePath": "/share", "mountOptions": "vers=3", "fileSystemType": "nfs" } |
| IndexLevel |
string |
No |
The index level. This parameter is used only for data source analysis in the archiving feature. Do not use this parameter in other scenarios. Valid values:
|
META |
| ClusterId |
string |
No |
The ID of the client group used to access the data source. |
cl-0004i0nlngorvgjpl7ck |
| Schedule |
string |
No |
The execution cycle. This parameter is used only for data source analysis in the archiving feature. Do not use this parameter in other scenarios. Format: I{startTime}{interval}. This indicates that a task is executed at an interval of {interval} starting from {startTime}. startTime: the start time, which is a UNIX timestamp in seconds. interval: an ISO 8601 time interval. For example, PT1H indicates an interval of one hour, and P1D indicates an interval of one day. |
I|1729493847|P1D |
| SpeedLimit |
string |
No |
The throttling limit. This parameter is used only for data source analysis in the archiving feature. Do not use this parameter in other scenarios. |
6:21:10240 |
| Options |
string |
No |
The data source analysis options. This parameter is used only for data source analysis in the archiving feature. Do not use this parameter in other scenarios. |
{} |
| Include |
string |
No |
The filter that specifies the files to include. This parameter is used only for data source analysis in the archiving feature. Do not use this parameter in other scenarios. |
["/home/alice", "/home/bob"] |
| Exclude |
string |
No |
The filter that specifies the files to exclude. This parameter is used only for data source analysis in the archiving feature. Do not use this parameter in other scenarios. |
["/home/alice/log"] |
| Path |
array |
No |
The list of paths for data source analysis. This parameter is used only for data source analysis in the archiving feature. Do not use this parameter in other scenarios. |
|
|
string |
No |
The path for data source analysis. This parameter is used only for data source analysis in the archiving feature. Do not use this parameter in other scenarios. |
/home |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The error code. |
200 |
| Message |
string |
The message returned when the data source is added. |
successful |
| RequestId |
string |
The request ID. |
53167AD3-****-****-92C7-CF69A000BA45 |
| Success |
boolean |
Indicates whether the request is successful. |
true |
| DataSourceId |
string |
The ID of the data source. |
ds-000*******xzj |
Examples
Success response
JSON format
{
"Code": "200",
"Message": "successful",
"RequestId": "53167AD3-****-****-92C7-CF69A000BA45",
"Success": true,
"DataSourceId": "ds-000*******xzj"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.