Creating a Private Network Connection
Function
This API is used to create a private network connection point in a specified region. It is applicable to scenarios where private network connections need to be configured for applications or services. Before calling this API, ensure that you have the required permission and have provided the necessary parameters, such as the region ID, private access point name, and network configuration information. After the creation is successful, the system generates a private network access point and returns the detailed information about the access point, including the access point ID, creation time, and status. If the provided parameters are invalid or the private network connection configuration conflicts, the system returns the corresponding exception information to prompt the user to check the validity of the input data and the configuration conflict.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
modelarts::createIntranetConnection
Write
-
-
modelarts:intranetConnection:create
-
URI
POST /v2/{project_id}/intranet-connection
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. Constraints N/A Range N/A Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| x-auth-token | Yes | String | Definition User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. For details about how to obtain the token, see Obtaining a User Token Through Password Authentication. Constraints N/A Range N/A Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| service_id | No | String | Definition Service ID, which can be obtained from the response body during service creation or by obtaining services owned by the current user. The service_id field is the service ID. Constraints This parameter is mandatory when type is SERVICE. Range N/A Default Value N/A |
| scene | Yes | String | Definition Private network connection scenario. Constraints N/A Range Default Value N/A |
| vpc_id | No | String | Definition VPC ID, which is mandatory in the VPC scenario. Constraints N/A Range N/A Default Value N/A |
| subnet_id | No | String | Definition Subnet ID, which is mandatory in the VPC scenario. Constraints N/A Range N/A Default Value N/A |
| pool_id | No | String | Definition Resource pool ID, which is mandatory in the pool scenario. Constraints N/A Range N/A Default Value N/A |
| type | No | String | Definition Private network connection granularity. If this parameter is left blank, the default value SERVICE is used. Constraints N/A Range Default Value SERVICE |
| dispatcher_group_id | No | String | Definition ID of the dispatcher group bound to the service. Constraints N/A Range N/A Default Value N/A |
| custom_urls | No | Array of strings | Definition Custom URL. The format is {Protocol}://{Domain}{Path}. Constraints A maximum of 10 URLs are supported. The length of a single URL cannot exceed 1,024 characters. Range
Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| applicant_user_name | String | Definition Username of the requestor. Range N/A |
| id | String | Definition Private network connection ID. Range N/A |
| message | String | Definition Request description. Range N/A |
| owner_domain_name | String | Definition Domain name of the reviewer. Range N/A |
| scene | String | Definition Private network connection scenario. Constraints N/A Range Default Value N/A |
| service_id | String | Definition Service ID. Range N/A |
| service_name | String | Definition Service name. Range N/A |
| status | String | Definition Private network connection status, which can be queried in the list. Constraints N/A Range Default Value N/A |
| subnet_id | String | Definition Subnet ID. Range N/A |
| url_list | Array of strings | Definition Access address list. |
| custom_url_list | Array of strings | Definition Access address list. |
| vpc_id | String | Definition VPC ID. Range N/A |
| dispatcher_group_id | String | Definition ID of the dispatcher group bound to the service. Range N/A |
| type | String | Definition Access granularity. The options are SERVICE and GLOBAL. Range N/A |
| maos_network_name | String | Definition Resource pool network name. Range N/A |
| service_type | String | Definition Service type. Range N/A |
| pool_id | String | Definition Resource pool ID. Range N/A |
| create_at | String | Definition Creation time. Range N/A |
| update_at | String | Definition Modification time. Range N/A |
Example Requests
POST https://{endpoint}/v2/{project_id}/intranet-connection
{
"service_id" : "e78773fa-4b27-446e-801d-****example",
"scene" : "VPC",
"vpc_id" : "15e04c58-45df-44ee-8b5c-****example",
"subnet_id" : "339e64b8-ec66-4a08-b710-****example"
} Example Responses
Status code: 200
Private network access information.
{
"applicant_user_name" : "user_name****example",
"dispatcher_group_id" : "ca29ce14-b475-4bee-93b4****example",
"id" : "566149dd-d0ce-43e6-9f2d-57608a36de80",
"owner_domain_name" : "domain_name****example",
"scene" : "VPC",
"service_id" : "e78773fa-4b27-446e-801d-4****example",
"service_name" : "service-ll-722-10",
"status" : "CONNECTING",
"subnet_id" : "339e64b8-ec66-4a08-b710-c****example",
"type" : "SERVICE",
"vpc_id" : "15e04c58-45df-44ee-8b5c-****example"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Private network access information. |
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