Dedicated line
Retrieve Endpoint
Before configuring the endpoint for SDK usage, please refer to the developer guide section on ET Service Domain Name to understand endpoint-related concepts. Baidu AI Cloud currently supports multiple regions. Please refer to the network product ET section in Region Selection Guide.
Retrieve AK/SK
To use Baidu AI Cloud products, you need a Baidu AI Cloud account along with valid AK (Access Key ID) and SK (Secret Access Key) credentials for signature authorization. You can obtain and understand your AK/SK information through the following steps:
Create EtClient
EtClient acts as the client for dedicated line services, providing developers with various methods to interact with these services. To create an EtClient, you must first configure an EtClientConfiguration instance with endpoint, AK, and SK. Then, use this configuration to set up the EtClient. The configuration steps are as follows:
1static final String HOST = "";
2static final String AK = "";
3static final String SK = "";
4EtClientConfiguration config = new EtClientConfiguration();
5config.setCredentials(new DefaultBceCredentials(ak, sk));
6config.setEndpoint(endpoint);
7EtClient etClient = new EtClient(config);
Apply for physical dedicated line
Function declaration
1public ApplyForEtResponse applyForEt(ApplyForEtRequest request) {
2 ......
3}
Parameter meaning
Please refer to the OpenAPI documentation: Request Parameters for Applying for Physical Dedicated Line
Response Value
- Operation succeeded
1{
2 "metadata": For details, refer to the metadata section in the appendix,
3 "id": "dcphy-gq65bz9ip712"
4}
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, refer to ExampleApplyForEt.java
Query dedicated line list
Function declaration
1public ListEtResponse listEts(ListEtRequest request) {
2 ......
3}
Parameter meaning
Please refer to the OpenAPI documentation Request Parameters for Querying Dedicated Line List
Response Value
- Operation succeeded
1{
2 "metadata": For details, refer to the metadata section in the appendix,
3 "nextMarker": "dcphy-gq65bz9ip712",
4 "marker": "dcphy-gq65bz9ie712",
5 "maxKeys": 1,
6 "isTruncated": true,
7 "ets": [{
8 "id": "dcphy-jy1sbnx32ez0",
9 "name": "et_6",
10 "description": "Description",
11 "status": "established",
12 "expireTime": "2019-01-30T08:50:00Z",
13 "isp": "ISP_CTC",
14 "intfType": "10G",
15 "apType": "BAIDU",
16 "apAddr": "BB",
17 "userName": "Zhang San",
18 "userPhone": "133*****333",
19 "userEmail": "1***@123.com",
20 "userIdc": "Beijing|Municipal District|Dongcheng District|2321"
21 }]
22}
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, please refer to: ExampleListEts.java
Query network probe details
Function declaration
1public Et getEtDetail(String etId) {
2 ......
3}
Parameter Meaning
Please refer to the OpenAPI documentation Request Parameters for Querying Dedicated Line Details
Response Value
- Operation succeeded
1{
2 "metadata": For details, refer to the metadata section in the appendix,
3 "id": "dcphy-gq65bz9ip712",
4 "name": "ZX051501-testET",
5 "description": "",
6 "status": "established",
7 "expireTime": 1,
8 "isp": "ISP_CUCC",
9 "intfType": "10G",
10 "apType": "SINGLE",
11 "apAddr": "WHGG",
12 "userName": "Zhang San",
13 "userPhone": "18218796578",
14 "userEmail": "shihuijuan@baidu.com",
15 "userIdc": "Beijing|Municipal Districts|Dongcheng District|Baidu Technology Park K2"
16}
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, please refer to: ExampleGetEtDetail.java
Update physical dedicated line
Function declaration
1public void updateEt(UpdateEtRequest request) {
2 ......
3}
Parameter Meaning
Please refer to the OpenAPI documentation: Request Parameters for Updating Physical Dedicated Line
Response Value
- Operation succeeded
No response value
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, please refer to: ExampleUpdateEt.java
Create dedicated channel
Function declaration
1public CreateEtChannelResponse createEtChannel(CreateEtChannelRequest request) {
2 ......
3}
Parameter Meaning
Refer to the OpenAPI documentation: Request Parameters for Creating Dedicated Channel
Response Value
- Operation succeeded
1{
2 "metadata": For details, refer to the metadata section in the appendix,
3 "id": "vpnconn-ku4cxya6nisq"
4}
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, please refer to: ExampleCreateEtChannel.java
Query dedicated channel list
Function declaration
1public ListEtChannelsResponse listEtChannels(String etId) {
2 ......
3}
Parameter meaning
Please refer to the OpenAPI documentation Request Parameters for Querying Dedicated Channel List
Response Value
- Operation succeeded
1{
2 "metadata": For details, refer to the metadata section in the appendix,
3 "etChannels": [
4 {
5 "authorizedUsers": [
6 "8770d0e94e2728ca81b0ec99db9f4df8"
7 ],
8 "description": "",
9 "baiduAddress": "11.11.11.21/24",
10 "name": "channel_name",
11 "bgpAsn": "45084",
12 "bgpKey": "7kab824",
13 "customerAddress": "11.11.11.12/24",
14 "routeType": "bgp",
15 "vlanId": 56
16 },
17 "id":"dedicatedconn-zy9t7n91k0iq",
18 "status":"building",
19 "enableIpv6": 1,
20 "baiduIpv6Address": "2400:da00:e003:0:1eb:200::1/88",
21 "customerIpv6Address": "2400:da00:e003:0:0:200::1/88"
22 ]
23}
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, refer to ExampleListEtChannels.java
Resubmit the dedicated channel
Function declaration
1public void resubmitEtChannel(ResubmitEtChannelRequest request) {
2 ......
3}
Parameter Meaning
Refer to the OpenAPI documentation: Request Parameters for Resubmitting Dedicated Channel
Response Value
- Operation succeeded
No response value
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, please refer to: ExampleResubmitEtChannel.java
Update dedicated channel
Function declaration
1public void updateEtChannel(UpdateEtChannelRequest request) {
2 ......
3}
Parameter Meaning
Refer to the OpenAPI documentation: Request Parameters for Updating Dedicated Channel
Response Value
- Operation succeeded
No response value
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, please refer to: ExampleUpdateEtChannel.java
Delete dedicated channel
Function declaration
1public void deleteEtChannel(EtChannelIdRequest request) {
2 ......
3}
Parameter Meaning
Please refer to the OpenAPI documentation: Request Parameters for Deleting Dedicated Channel
Response Value
- Operation succeeded
No response value
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, please refer to: ExampleDeleteEtChannel.java
Enable IPv6 function for the dedicated channel
Function declaration
1public void enableEtChannelIpv6(EnableEtChannelIpv6Request request) {
2 ......
3}
Parameter Meaning
Refer to OpenAPI documentation: Request parameters for Enabling Function IPv6 for Dedicated Channel
Response Value
- Operation succeeded
No response value
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, refer to: ExampleEnableEtChannelIpv6.java
Disable dedicated channel IPv6 function
Function declaration
1public void disableEtChannelIpv6(EtChannelIdRequest request) {
2 ......
3}
Parameter Meaning
Refer to OpenAPI documentation: Request Parameters for Disabling IPv6 for Dedicated Channel
Response Value
- Operation succeeded
No response value
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, refer to: ExampleDisableEtChannelIpv6.java
Create routing rules of dedicated channel
Function declaration
1public CreateEtChannelRouteResponse createEtChannelRouteRule(CreateEtChannelRouteRuleRequest request) {
2 ......
3}
Parameter Meaning
Refer to the OpenAPI documentation: Request Parameters for Creating Routing Rules of Dedicated Channel
Response Value
- Operation succeeded
1{
2 "metadata": For details, refer to the metadata section in the appendix,
3 "routeRuleId": "dcrr-5afcf643-94e"
4}
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, please refer to: ExampleCreateEtChannelRouteRule.java
Query list of routing rules of dedicated channel
Function declaration
1public ListEtChannelRouteRulesResponse listEtChannelRouteRules(ListEtChannelRouteRulesRequest request) {
2 ......
3}
Parameter Meaning
Please refer to the OpenAPI documentation Request Parameters for Querying List of Routing Rules Of Dedicated Channel
Response Value
- Operation succeeded
1{
2 "metadata": For details, refer to the metadata section in the appendix,
3 "nextMarker": "14eabc99-dce7-11ec-84d4-6c92bf29c398",
4 "maxKeys": 1,
5 "isTruncated": true,
6 "routeRules": [{
7 "routeRuleId": "dcrr-5afcf643-94e",
8 "ipVersion": 4,
9 "destAddress": "10.0.0.1/32",
10 "nexthopType": "etGateway"
11 "nexthopId": "dcgw-arc647h3014w",
12 "description": "route_1"
13 }]
14}
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, please refer to: ExampleListEtChannelRouteRules.java
Modify the dedicated channel routing rules
Function declaration
1public void updateEtChannelRouteRule(UpdateEtChannelRouteRuleRequest request) {
2 ......
3}
Parameter Meaning
Refer to OpenAPI documentation: Request Parameters for Modifying Dedicated Channel Routing Rules
Response Value
- Operation succeeded
No response value
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, please refer to: ExampleUpdateEtChannelRouteRule.java
Delete routing rules of dedicated channel
Function declaration
1public void deleteEtRouteRule(EtChannelRouteRuleIdRequest request) {
2 ......
3}
Parameter Meaning
Refer to OpenAPI documentation: Request Parameters for Deleting Dedicated Channel Routing Rules
Response Value
- Operation succeeded
No response value
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, please refer to: ExampleDeleteEtRouteRule.java
Associate dedicated channel
Function declaration
1public void associateEtChannel(AssociateEtChannelRequest request) {
2 ......
3}
Parameter Meaning
Please refer to the OpenAPI documentation: Request Parameters for Associating Dedicated Channel
Response Value
- Operation succeeded
No response value
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, please refer to: ExampleAssociateEtChannel.java
Disassociate dedicated channel
Function declaration
1public void disassociateEtChannel(DisassociateEtChannelRequest request) {
2 ......
3}
Parameter Meaning
Please refer to the OpenAPI documentation: Request Parameters for Disassociating Dedicated Channel
Response Value
- Operation succeeded
No response value
- Operation failed
For response exception list of operation failure, refer to the Exception List.
Example code
For specific code examples, please refer to: ExampleDisassociateEtChannel.java
Appendix
Public response information in Metadata format
1 {
2 "bceRequestId":"f5f0821d-45fe-439b-bbf4-fc48b639f84a",
3 "contentLength":28,
4 "contentType":"application/json;charset=UTF-8",
5 "date":1701917695000,
6 "server":"openresty/1.15.8.1"
7 }
