Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ ModelArts/ API Reference/ Resource Management/ Obtaining Network Resources

Obtaining Network Resources

Updated on 2024-06-13 GMT+08:00

Function

This API is used to obtain network resources.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

GET /v1/{project_id}/networks

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID and Name.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

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

Table 3 Response body parameters

Parameter

Type

Description

apiVersion

String

API version. Options:

  • v1

kind

String

Resource type. Options:

  • NetworkList: networks

metadata

metadata object

Metadata of network resources.

items

Array of Network objects

Network resources.

Table 4 metadata

Parameter

Type

Description

continue

String

Next query location in pagination query.

remainingItemCount

Integer

Remaining resources.

Table 5 Network

Parameter

Type

Description

apiVersion

String

API version. Options:

  • v1

kind

String

Resource type. Options:

  • Network

metadata

NeworkMetadata object

Metadata of network resources.

spec

NetworkSpec object

Description of network resources.

status

NetworkStatus object

Status of network resources.

Table 6 NeworkMetadata

Parameter

Type

Description

name

String

Network name automatically generated by the system, which is equivalent to networkId. networkId indicates the unique ID generated by ModelArts based on the network name entered by the user.

creationTimestamp

String

Timestamp, for example, 2021-11-01T03:49:41Z.

labels

NetworkMetadataLabels object

Labels of network resources.

annotations

NetworkMetadataAnnotations object

Annotations of network resources.

Table 7 NetworkMetadataLabels

Parameter

Type

Description

os.modelarts/name

String

Specified network name.

os.modelarts/workspace.id

String

Workspace ID The default value is 0, indicating the default workspace.

Table 8 NetworkMetadataAnnotations

Parameter

Type

Description

os.modelarts/description

String

Network resource description, which is used to describe a scenario. The following special characters are not allowed: !<>=&"'

Table 9 NetworkSpec

Parameter

Type

Description

cidr

String

Network CIDR. Value range:

  • 172.16.0.0/12-172.16.0.0/24

  • 192.168.0.0/16-192.168.0.0/24

connection

NetworkConnection object

Information about the connection between the current network and other cloud services.

Table 10 NetworkConnection

Parameter

Type

Description

peerConnectionList

Array of peerConnectionList objects

List of networks that can be connected in peer mode.

Table 11 peerConnectionList

Parameter

Type

Description

peerVpcId

String

Indicates the ID of the peer VPC.

peerSubnetId

String

ID of the peer subnet.

defaultGateWay

Boolean

Whether the default gateway is enabled.

Table 12 NetworkStatus

Parameter

Type

Description

phase

String

Current network status. Options:

  • Creating: The network is being created.

  • Active: The network is functional.

  • Abnormal: The network malfunctions.

connectionStatus

NetworkConnectionStatus object

Indicates the connection status between the network and other cloud services.

Table 13 NetworkConnectionStatus

Parameter

Type

Description

peerConnectionStatus

Array of peerConnectionStatus objects

Indicates the status information list of the network in peer mode.

sfsTurboStatus

Array of sfsTurboStatus objects

Specifies the list of SFS Turbos that can be connected to the network.

Table 14 peerConnectionStatus

Parameter

Type

Description

peerVpcId

String

Indicates the ID of the peer VPC.

peerSubnetId

String

ID of the peer subnet.

defaultGateWay

Boolean

Whether the default gateway is enabled.

phase

String

Connection status of the network. The options are as follows:

  • Connecting: The network is being connected.

  • Active: The network connection is normal.

  • Abnormal: The network connection is abnormal.

Table 15 sfsTurboStatus

Parameter

Type

Description

sfsId

String

Specifies the SFS Turbo ID.

name

String

Specifies the name of the SFS Turbo.

status

String

Specifies the status of the connection to the SFS Turbo. The options are as follows:

  • Active: The SFS connection status is normal.

  • Abnormal: The SFS connection status is abnormal.

ipAddr

String

Specifies the address for accessing SFS Turbo.

Example Requests

Obtain resource pools.

GET https://{endpoint}/v2/{project_id}/pools

{ }

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",
        "os.modelarts/workspace.id" : "0"
      },
      "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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback