Deleting a Network Resource
Function
This API is used to remove specified network resources. This API is used when you need to delete a specified network resource when the network resource is no longer required, the configuration is incorrect, or resources need to be cleared. Before using this API, ensure that the network resource exists and you have the administrator permissions. After the deletion, the specified network resource is permanently removed, and related configurations and associations are cleared. If the specified network resource does not exist, you do not have the operation permission, or the resource is depended on by other resources, the API will return an error message.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
DELETE /v1/{project_id}/networks/{network_name}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition: User project ID. For details, see Obtaining a Project ID and Name. Constraints: N/A Range: N/A Default Value: N/A |
|
network_name |
Yes |
String |
Definition: Network resource name. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
apiVersion |
String |
Definition: API version of the resource. Range:
|
|
kind |
String |
Definition: Resource type. Range:
|
|
metadata |
NetworkMetadata object |
Definition: Metadata of a network resource. |
|
spec |
NetworkSpec object |
Definition: Specifications of a network resource. |
|
status |
NetworkStatus object |
Definition: Status of a network resource. |
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
String |
Definition: Network resource ID. Range: N/A |
|
creationTimestamp |
String |
Definition: Network creation time. For example, 2025-11-01T03:49:41Z. Range: N/A |
|
labels |
NetworkMetadataLabels object |
Definition: Network labels. |
|
annotations |
NetworkMetadataAnnotations object |
Definition: Network annotations. |
|
Parameter |
Type |
Description |
|---|---|---|
|
os.modelarts/name |
String |
Definition: Displayed name of a resource pool. *Range: The value can contain 4 to 32 characters. It must start with a lowercase letter and cannot end with a hyphen (-). Digits and hyphens (-) are allowed. |
|
os.modelarts/workspace.id |
String |
Definition: Workspace ID. [For details about how to obtain the ID, see Querying the Workspace List.] (tag:hc) Range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
os.modelarts/description |
String |
Definition: Network description. Range: The value cannot contain these characters: !<>=&"'. |
|
Parameter |
Type |
Description |
|---|---|---|
|
cidr |
String |
Definition: CIDR value of a network. Range
|
|
connection |
NetworkConnection object |
Definition: Connection information between the current network and other resources. |
|
Parameter |
Type |
Description |
|---|---|---|
|
peerConnectionList |
Array of objects |
Definition: Peering connections. |
|
Parameter |
Type |
Description |
|---|---|---|
|
phase |
String |
Definition: Current status of a network resource. Range:
|
|
connectionStatus |
NetworkConnectionStatus object |
Definition: Connection status between the network and other cloud services. |
|
Parameter |
Type |
Description |
|---|---|---|
|
peerConnectionStatus |
Array of PeerConnectionStatus objects |
Definition: Status of peering connections. |
|
sfsTurboStatus |
Array of SfsTurboConnectionStatus objects |
Definition: Status of SFS Turbo accessible to the network. |
|
Parameter |
Type |
Description |
|---|---|---|
|
peerVpcId |
String |
Definition: VPC ID of the peer end. Range: N/A |
|
peerSubnetId |
String |
Definition: Subnet ID of the peer end. Range: N/A |
|
defaultGateWay |
Boolean |
Definition: Specifies whether to create a default route. Range: false (default value, indicating that no default route is created) |
|
phase |
String |
Definition: Connection status of the network. Range:
|
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
String |
Definition: Name of the SFS Turbo instance. Range: N/A |
|
sfsId |
String |
Definition: ID of the SFS Turbo instance. Range: N/A |
|
connectionType |
String |
Definition: association mode. Range:
|
|
ipAddr |
String |
Definition: Access address of SFS Turbo. Range: N/A |
|
status |
String |
Definition: Connection status of SFS Turbo. Range:
|
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Range: N/A |
|
error_msg |
String |
Definition: Error message. Range: N/A |
Example Requests
Delete a network.
DELETE https://{endpoint}/v1/{project_id}/networks/{network_name}
{ }
Example Responses
Status code: 200
OK
{
"kind" : "Network",
"apiVersion" : "v1",
"metadata" : {
"name" : "network-7a03-86c13962597848eeb29c5861153a391f",
"creationTimestamp" : "2022-09-16T09:44:59Z",
"deletionTimestamp" : "2022-09-16T10:06:27Z",
"labels" : {
"os.modelarts/name" : "network-7a03",
"os.modelarts/workspace.id" : "0"
},
"annotations" : { }
},
"spec" : {
"cidr" : "192.168.128.0/17",
"connection" : {
"peerConnectionList" : [ {
"peerVpcId" : "03e4f4d7-fc62-409b-9c52-df885525e30b",
"peerSubnetId" : "42aeebc3-f7c7-45aa-b884-e6e9ac2f841d",
"defaultGateWay" : false
} ]
}
},
"status" : {
"phase" : "Active",
"connectionStatus" : {
"peerConnectionStatus" : [ {
"peerVpcId" : "03e4f4d7-fc62-409b-9c52-df885525e30b",
"peerSubnetId" : "42aeebc3-f7c7-45aa-b884-e6e9ac2f841d",
"defaultGateWay" : false,
"phase" : "Active"
} ]
}
}
}
Status code: 404
Not found.
{
"error_code" : "ModelArts.50025001",
"error_msg" : "Network not exist."
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
404 |
Not found. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot