Updated on 2026-07-24 GMT+08:00

Changing a Private Network Request

Function

This API is used to change the status of a private network connection request. The status can be APPROVE, REJECT, CANCEL, or RETRY. It is applicable to the scenario where the private network connection approval process needs to be managed. Before calling this API, ensure that you have the corresponding change permission and provide a valid private network request ID and required operation type. After the change is successful, the status of the private network request is updated to the specified operation result, and related logs are recorded. If the provided private network request ID is invalid, the operation type is not supported, or the permission is insufficient, an error message is returned, prompting you to check the validity and permission of the input data.

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::updateIntranetConnection

    Write

    -

    -

    modelarts:intranetConnection:update

    -

URI

PUT /v2/{project_id}/intranet-connection/{id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

id

Yes

String

Definition

Private network connection ID. The ID can be obtained from the id field in the response body of the API for querying the private network connection request list.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request header 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

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

action

Yes

String

Definition

Private network access request.

Constraints

N/A

Range

  • APPROVE: The request is approved. This operation can be performed only when the private network access request is waiting for approval.

  • REJECT: The request is rejected. This operation can be performed only when the private network access request is waiting for approval.

  • CANCEL: The authorization is canceled. You can cancel the authorization only when the private network access request is in the CONNECTED state.

  • RETRY: The request can be retried only when the private network access request is in the abnormal state and the reason is "Connection failed. Try again."

Default Value

N/A

reason

No

String

Definition

Reason for rejection.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 204

The modification is successful.

None

Example Requests

PUT https://{endpoint}/v2/{project_id}/intranet-connection/{id}

{
  "action" : "APPROVE",
  "reason" : "ok"
}

Example Responses

None

Status Codes

Status Code

Description

204

The modification is successful.

Error Codes

See Error Codes.