Obtaining Network Resources
Function
This API is used to obtain network resources.
URI
GET /v1/{project_id}/networks
| 
        Parameter  | 
      
        Mandatory  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        project_id  | 
      
        Yes  | 
      
        String  | 
      
        Project ID. For details, see Obtaining a Project ID and Name.  | 
     
| 
        Parameter  | 
      
        Mandatory  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        workspaceId  | 
      
        No  | 
      
        String  | 
      
        Workspace ID. The default value is 0.  | 
     
| 
        labelSelector  | 
      
        No  | 
      
        String  | 
      
        Filter by label.  | 
     
| 
        limit  | 
      
        No  | 
      
        Integer  | 
      
        Number of records returned for a single pagination query.  | 
     
| 
        continue  | 
      
        No  | 
      
        String  | 
      
        Previous query location in pagination query.  | 
     
Request Parameters
None
Response Parameters
Status code: 200
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        apiVersion  | 
      
        String  | 
      
        API version. Options: 
  | 
     
| 
        kind  | 
      
        String  | 
      
        Resource type. Options: 
  | 
     
| 
        metadata  | 
      
        NeworkListMetadata object  | 
      
        Metadata of network resources.  | 
     
| 
        items  | 
      
        Array of Network objects  | 
      
        Network resources.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        continue  | 
      
        String  | 
      
        Next query position in pagination query.  | 
     
| 
        remainingItemCount  | 
      
        Integer  | 
      
        Remaining resources.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        apiVersion  | 
      
        String  | 
      
        API version. Options: 
  | 
     
| 
        kind  | 
      
        String  | 
      
        Resource type. Options: 
  | 
     
| 
        metadata  | 
      
        NetworkMetadata object  | 
      
        Metadata of network resources.  | 
     
| 
        spec  | 
      
        NetworkSpec object  | 
      
        Description of network resources.  | 
     
| 
        status  | 
      
        NetworkStatus object  | 
      
        Status of network resources.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        name  | 
      
        String  | 
      
        Automatically generated network name, which is equivalent to networkId.  | 
     
| 
        creationTimestamp  | 
      
        String  | 
      
        Timestamp, for example, 2021-11-01T03:49:41Z.  | 
     
| 
        labels  | 
      
        NetworkMetadataLabels object  | 
      
        Labels of network resources.  | 
     
| 
        annotations  | 
      
        NetworkMetadataAnnotations object  | 
      
        Annotations of network resources.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        os.modelarts/name  | 
      
        String  | 
      
        Specified network name.  | 
     
| 
        os.modelarts/workspace.id  | 
      
        String  | 
      
        Workspace ID. The default value is 0.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        os.modelarts/description  | 
      
        String  | 
      
        Network resource description, which is used to describe a scenario. The following special characters are not allowed: !<>=&"'  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        ipv6enable  | 
      
        Boolean  | 
      
        Whether to enable IPv6. Once IPv6 is enabled, it cannot be disabled.  | 
     
| 
        cidr  | 
      
        String  | 
      
        Network CIDR.  | 
     
| 
        connection  | 
      
        NetworkConnection object  | 
      
        Automatically interconnected endpoint.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        peerConnectionList  | 
      
        Array of PeerConnectionItem objects  | 
      
        Peering connections  | 
     
| 
        sfsTurboConnectionList  | 
      
        Array of SfsTurboConnectionItem objects  | 
      
        SFS Turbo connections through attached NICs  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        peerVpcId  | 
      
        String  | 
      
        VPC ID of the peer end.  | 
     
| 
        peerSubnetId  | 
      
        String  | 
      
        Subnet ID of the peer end.  | 
     
| 
        defaultGateWay  | 
      
        Boolean  | 
      
        Whether to create a default route. The default value is false.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        name  | 
      
        String  | 
      
        Name of an SFS Turbo instance.  | 
     
| 
        sfsId  | 
      
        String  | 
      
        ID of an SFS Turbo instance.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        phase  | 
      
        String  | 
      
        Current network status. Options: 
  | 
     
| 
        connectionStatus  | 
      
        NetworkConnectionStatus object  | 
      
        Network connection status.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        peerConnectionStatus  | 
      
        Array of PeerConnectionStatus objects  | 
      
        Peering connection status  | 
     
| 
        sfsTurboStatus  | 
      
        Array of SfsTurboConnectionStatus objects  | 
      
        Status of SFS Turbo accessible to the network  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        peerVpcId  | 
      
        String  | 
      
        VPC ID of the peer end.  | 
     
| 
        peerSubnetId  | 
      
        String  | 
      
        Subnet ID of the peer end.  | 
     
| 
        defaultGateWay  | 
      
        Boolean  | 
      
        Whether to create a default route. The default value is false.  | 
     
| 
        phase  | 
      
        String  | 
      
        Network connection status. The options are as follows: 
  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        name  | 
      
        String  | 
      
        Name of an SFS Turbo instance.  | 
     
| 
        sfsId  | 
      
        String  | 
      
        ID of an SFS Turbo instance.  | 
     
| 
        connectionType  | 
      
        String  | 
      
        Connection type. The options are as follows: 
  | 
     
| 
        ipAddr  | 
      
        String  | 
      
        SFS Turbo access address.  | 
     
| 
        status  | 
      
        String  | 
      
        Status of the connection to SFS Turbo. The options are as follows: 
  | 
     
Example Requests
Obtain resource pools.
GET https://{endpoint}/v1/{project_id}/networks
 Example Responses
Status code: 200
OK
{
  "kind" : "NetworkList",
  "apiVersion" : "v1",
  "metadata" : { },
  "items" : [ {
    "kind" : "Network",
    "apiVersion" : "v1",
    "metadata" : {
      "name" : "network-7a03-86c13962597848eeb29c5861153a391f",
      "creationTimestamp" : "2022-09-16T09:44:59Z",
      "labels" : {
        "os.modelarts/name" : "network-7a03"
      },
      "annotations" : { }
    },
    "spec" : {
      "cidr" : "192.168.128.0/17",
      "connection" : { }
    },
    "status" : {
      "phase" : "Active",
      "connectionStatus" : { }
    }
  } ]
}
 Status Codes
| 
        Status Code  | 
      
        Description  | 
     
|---|---|
| 
        200  | 
      
        OK  | 
     
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.