Deleting a Route
Sample Code
You can use the API to delete a route. Sample code is as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | // Import classes:
import com.huaweicloud.cs.java.v1.client.ApiException;
import com.huaweicloud.cs.java.v1.ClusterApi;
ClusterApi apiInstance = new ClusterApi(apiClient);//apiClient is created when initializing a CS API client.
String xProjectId = "xProjectId_example"; // String |
Integer clusterId = 56; // Integer |
String peeringId = "peeringId_example"; // String |
String routeId = "routeId_example"; // String |
try {
apiInstance.deleteRoute(xProjectId, clusterId, peeringId, routeId);
} catch (ApiException e) {
System.err.println("Exception when calling ClusterApi#deleteRoute");
System.err.println(e.getResponseBody());
e.printStackTrace();
}
|
Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| xProjectId | Yes | String | Project ID. This parameter is used to obtain the token for the project. |
| clusterId | Yes | Integer | ID of an exclusive cluster. |
| peeringId | Yes | String | ID of a VPC peering connection. |
| routeId | Yes | String | ID of a route. |
Last Article: Query the List of Routes
Next Article: Deleting a VPC Peering Connection
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.