Modifying a VPN Access Policy
Function
This API is used to modify a VPN access policy with a specified ID.
Calling Method
For details, see Calling APIs.
URI
PUT /v5/{project_id}/p2c-vpn-gateways/vpn-servers/{vpn_server_id}/access-policies/{policy_id}
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
String |
Yes |
Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID. |
vpn_server_id |
String |
Yes |
Specifies the ID of a VPN server. |
policy_id |
String |
Yes |
Specifies the ID of an access policy. |
Request
- Request parameters
Table 2 Request parameters Parameter
Type
Mandatory
Description
access_policy
Yes
Specifies the to-be-modified access policy object.
Table 3 UpdateVpnAccessPolicyRequestBodyContent Parameter
Type
Mandatory
Description
name
String
No
Specifies the name of an access policy.
user_group_id
String
No
- Specifies the ID of the associated user group.
- The value is a UUID containing 36 characters.
description
String
No
Specifies access policy description.
dest_ip_cidrs
Array of strings
No
- Specifies the list of destination CIDR blocks.
- The value is in the format of dotted decimal notation/mask, for example, 192.168.1.0/24.
- There must be at least one CIDR block. A maximum of 10 CIDR blocks are supported.
- Example request
PUT https://{Endpoint}/v5/{project_id}/p2c-vpn-gateways/vpn-servers/{vpn_server_id}/access-policies/{policy_id} { "access_policy": { "name": "policy-001-update", "user_group_id": "efb92c43-c2e9-44c0-b2e5-5b980f0ca90a", "description": "AccessPolicy1-update", "dest_ip_cidrs": [ "192.168.12.0/24", "192.168.1.0/24" ] } }
Response
- Response parameters
Returned status code 200: successful operation
Table 4 Parameters in the response body Parameter
Type
Description
access_policy
VpnAccessPolicy object
Specifies the VPN access policy object.
request_id
String
Specifies a request ID.
Table 5 VpnAccessPolicy Parameter
Type
Description
id
String
- Specifies the ID of an access policy.
- The value is a UUID containing 36 characters.
name
String
Specifies the name of an access policy.
user_group_id
String
- Specifies the ID of the associated user group.
- The value is a UUID containing 36 characters.
user_group_name
String
Specifies the name of the associated user group.
description
String
Specifies access policy description.
dest_ip_cidrs
Array of String
- Specifies the list of destination CIDR blocks.
- The value is in the format of dotted decimal notation/mask, for example, 192.168.1.0/24.
created_at
String
- Specifies the creation time.
- The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
updated_at
String
- Specifies the update time.
- The UTC time format is yyyy-MM-ddTHH:mm:ssZ.
- Example response
{ "access_policy": { "id": "36f3f232-9204-4774-be20-84cc94da8535", "name": "policy-001-update", "user_group_id": "efb92c43-c2e9-44c0-b2e5-5b980f0ca90a", "user_group_name": "UserGroupA", "description": "AccessPolicy1-update", "dest_ip_cidrs": [ "192.168.12.0/24", "192.168.1.0/24" ], "created_at": "2024-06-14T08:59:45.598Z", "updated_at": "2024-06-14T09:01:59.539Z" }, "request_id": "2e4cc58a4ea5fe69f62d6d8943b5f99b" }
Status Codes
For details, see Status Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.