云服务器内容精选

  • 响应示例 返回状态码为200:创建成功。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "data" : { "id" : "fbb684c8-0d37-496f-bafa-4b06db151e2e", "name" : "TEST", "ikeVersion" : "v1", "ikeEncryptAlgorithm" : "aes-256", "ikeNegotiationMode" : "main", "ikeAuthAlgorithm" : "sha2-256", "ikeIntegrityAlgorithm" : "sha2-256", "ikePrf" : "sha2-256", "ipsecTransformProtocol" : "ah", "ipsecEncapsulationMode" : "tunnel", "ipsecAhAuthAlgorithm" : "sha2-256", "ipsecAuthAlgorithm" : "sha2-256", "ipsecEncryptAlgorithm" : "aes-256", "ipsecPfs" : "group1", "ipsecLifetimeSeconds" : "30", "ipsecLifetimeKilobytes" : "256", "ipsecDpdType" : "periodic", "ipsecDpdMsg" : "seq-hash-notify", "ipsecDpdInterval" : "30", "ipsecDpdTimeout" : "15", "ikeDh" : "group1", "ikeLifeTime" : "60" } }
  • 请求示例 HTTP的示例 POST /controller/campus/v1/networkservice/networkconfig/profile/apvpn/encryptionpolicy HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AC CES S-TOKEN: x-yyyyyy { "id" : "fbb684c8-0d37-496f-bafa-4b06db151e2e", "name" : "TEST", "ikeVersion" : "v1", "ikeEncryptAlgorithm" : "aes-256", "ikeNegotiationMode" : "main", "ikeAuthAlgorithm" : "sha2-256", "ikeIntegrityAlgorithm" : "sha2-256", "ikePrf" : "sha2-256", "ipsecTransformProtocol" : "ah", "ipsecEncapsulationMode" : "tunnel", "ipsecAhAuthAlgorithm" : "sha2-256", "ipsecAuthAlgorithm" : "sha2-256", "ipsecEncryptAlgorithm" : "aes-256", "ipsecPfs" : "group1", "ipsecLifetimeSeconds" : "30", "ipsecLifetimeKilobytes" : "256", "ipsecDpdType" : "periodic", "ipsecDpdMsg" : "seq-hash-notify", "ipsecDpdInterval" : "30", "ipsecDpdTimeout" : "15", "ikeDh" : "group1", "ikeLifeTime" : "60" }
  • 响应参数 返回状态码为200:创建成功。 表3 EncryptitonPolicyResponseDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息 "" data REFERENCE 详细请参见表4。 VPN配置数据 - 表4 EncryptitonPolicyConfigDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 id string 36个字符。 - id "fbb684c8-0d37-496f-bafa-4b06db151e2e" name string 0~15个字符。 - 加密策略名称,请输入1-15位字符,由字母、数字、下划线、短线、点号、@符组成。 "TEST" ikeVersion string 0~3个字符。 - ike版本。取值【v1|v2|all】。只有当取值为v1时,需要配置协商模式,认证算法。 "v1" ikeEncryptAlgorithm string 0~7个字符。 - ike加密算法。取值【des|3des|aes-128|aes-192|aes-256】。 "aes-256" ikeNegotiationMode string 0~10个字符。 - (仅IKEv1)协商模式。取值【main|aggressive】。 "main" ikeAuthAlgorithm string 0~8个字符。 - (仅IKEv1)认证算法。取值【md5|sha1|sha2-256|sha2-384|sha2-512|sm3】。 "sha2-256" ikeIntegrityAlgorithm string 0~11个字符。 - (仅IKEv2)完整性算法。取值【aes-xcbc-96|md5|sha1|sha2-256|sha2-384|sha2-512】。 "sha2-256" ikePrf string 0~12个字符。 - (仅IKEv2)协商伪随机数产生函数(PRF)的算法。取值【aes-xcbc-128|md5|sha1|sha2-256|sha2-384|sha2-512】。 "sha2-256" ipsecTransformProtocol string 0~6个字符。 - ipsec 安全协议。取值【ah|esp|ah-esp】。当取值为ah、ah-esp时,需要配置认证算法。当取值为esp、ah-esp时,需要配置esp加密算法、esp认证算法。 "ah" ipsecEncapsulationMode string 0~8个字符。 - ipsec 封装模式。取值【tunnel|transport】。 "tunnel" ipsecAhAuthAlgorithm string 0~8个字符。 - ipsec 认证算法,ah、ah-esp安全协议下使用。取值【md5|sha1|sha2-256|sha2-384|sha2-512|sm3】。 "sha2-256" ipsecAuthAlgorithm string 0~8个字符。 - ipsec ESP认证算法,esp、ah-esp安全协议下使用。取值【md5|sha1|sha2-256|sha2-384|sha2-512】。 "sha2-256" ipsecEncryptAlgorithm string 0~15个字符。 - ipsec ESP加密算法。取值【3des|des|aes-128|aes-192|aes-256|none|aes-128-gcm-128|aes-192-gcm-128|aes-256-gcm-128】。 "aes-256" ipsecPfs string 0~7个字符。 - ipsec pfs。取值【group1|group2|group5|group14|group15|group16】。 "group1" ipsecLifetimeSeconds string 0~6个字符。 - ipsec sa 存活时间(基于时间)。取值30-604800。 "30" ipsecLifetimeKilobytes string 0~9个字符。 - ipsec sa 允许处理的最大流量(基于流量)。取值256-200000000。 "256" ipsecDpdType string 0~9个字符。 - ipsec dpd检测方式。取值【periodic|on-demand】。 "periodic" ipsecDpdMsg string 0~15个字符。 - ipsec dpd 载 荷顺序。取值【seq-hash-notify|seq-notify-hash】。 "seq-hash-notify" ipsecDpdInterval string 0~4个字符。 - ipsec dpd 检测时间间隔(秒)。取值10-3600。 "30" ipsecDpdTimeout string 0~2个字符。 - ipsec dpd 重传时间间隔(秒)。取值2-60。 "15" ikeDh string 0~7个字符。 - dh组。取值【group1|group2|group5|group14|group15|group16】。 "group1" ikeLifeTime string 0~6个字符。 - SA超时时间。取值30-604800。 "60"
  • 请求参数 表1 body参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 body 是 REFERENCE 详细请参见表2。 AP IPSEC 模板配置参数体。 - 表2 EncryptitonPolicyConfigDto对象的参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 否 string 36个字符。 - id "fbb684c8-0d37-496f-bafa-4b06db151e2e" name 否 string 0~15个字符。 - 加密策略名称,请输入1-15位字符,由字母、数字、下划线、短线、点号、@符组成。 "TEST" ikeVersion 否 string 0~3个字符。 - ike版本。取值【v1|v2|all】。只有当取值为v1时,需要配置协商模式,认证算法。 "v1" ikeEncryptAlgorithm 否 string 0~7个字符。 - ike加密算法。取值【des|3des|aes-128|aes-192|aes-256】。 "aes-256" ikeNegotiationMode 否 string 0~10个字符。 - (仅IKEv1)协商模式。取值【main|aggressive】。 "main" ikeAuthAlgorithm 否 string 0~8个字符。 - (仅IKEv1)认证算法。取值【md5|sha1|sha2-256|sha2-384|sha2-512|sm3】。 "sha2-256" ikeIntegrityAlgorithm 否 string 0~11个字符。 - (仅IKEv2)完整性算法。取值【aes-xcbc-96|md5|sha1|sha2-256|sha2-384|sha2-512】。 "sha2-256" ikePrf 否 string 0~12个字符。 - (仅IKEv2)协商伪随机数产生函数(PRF)的算法。取值【aes-xcbc-128|md5|sha1|sha2-256|sha2-384|sha2-512】。 "sha2-256" ipsecTransformProtocol 否 string 0~6个字符。 - ipsec 安全协议。取值【ah|esp|ah-esp】。当取值为ah、ah-esp时,需要配置认证算法。当取值为esp、ah-esp时,需要配置esp加密算法、esp认证算法。 "ah" ipsecEncapsulationMode 否 string 0~8个字符。 - ipsec 封装模式。取值【tunnel|transport】。 "tunnel" ipsecAhAuthAlgorithm 否 string 0~8个字符。 - ipsec 认证算法,ah、ah-esp安全协议下使用。取值【md5|sha1|sha2-256|sha2-384|sha2-512|sm3】。 "sha2-256" ipsecAuthAlgorithm 否 string 0~8个字符。 - ipsec ESP认证算法,esp、ah-esp安全协议下使用。取值【md5|sha1|sha2-256|sha2-384|sha2-512】。 "sha2-256" ipsecEncryptAlgorithm 否 string 0~15个字符。 - ipsec ESP加密算法。取值【3des|des|aes-128|aes-192|aes-256|none|aes-128-gcm-128|aes-192-gcm-128|aes-256-gcm-128】。 "aes-256" ipsecPfs 否 string 0~7个字符。 - ipsec pfs。取值【group1|group2|group5|group14|group15|group16】。 "group1" ipsecLifetimeSeconds 否 string 0~6个字符。 - ipsec sa 存活时间(基于时间)。取值30-604800。 "30" ipsecLifetimeKilobytes 否 string 0~9个字符。 - ipsec sa 允许处理的最大流量(基于流量)。取值256-200000000。 "256" ipsecDpdType 否 string 0~9个字符。 - ipsec dpd检测方式。取值【periodic|on-demand】。 "periodic" ipsecDpdMsg 否 string 0~15个字符。 - ipsec dpd 载 荷顺序。取值【seq-hash-notify|seq-notify-hash】。 "seq-hash-notify" ipsecDpdInterval 否 string 0~4个字符。 - ipsec dpd 检测时间间隔(秒)。取值10-3600。 "30" ipsecDpdTimeout 否 string 0~2个字符。 - ipsec dpd 重传时间间隔(秒)。取值2-60。 "15" ikeDh 否 string 0~7个字符。 - dh组。取值【group1|group2|group5|group14|group15|group16】。 "group1" ikeLifeTime 否 string 0~6个字符。 - SA超时时间。取值30-604800。 "60"
  • 响应示例 返回状态码为200:查询成功。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "pageIndex" : 1, "pageSize" : 1, "totalRecords" : 1, "data" : [ { "id" : "fbb684c8-0d37-496f-bafa-4b06db151e2e", "name" : "TEST", "ikeVersion" : "v1", "ikeEncryptAlgorithm" : "aes-256", "ikeNegotiationMode" : "main", "ikeAuthAlgorithm" : "sha2-256", "ikeIntegrityAlgorithm" : "sha2-256", "ikePrf" : "sha2-256", "ipsecTransformProtocol" : "ah", "ipsecEncapsulationMode" : "tunnel", "ipsecAhAuthAlgorithm" : "sha2-256", "ipsecAuthAlgorithm" : "sha2-256", "ipsecEncryptAlgorithm" : "aes-256", "ipsecPfs" : "group1", "ipsecLifetimeSeconds" : "30", "ipsecLifetimeKilobytes" : "256", "ipsecDpdType" : "periodic", "ipsecDpdMsg" : "seq-hash-notify", "ipsecDpdInterval" : "30", "ipsecDpdTimeout" : "15", "ikeDh" : "group1", "ikeLifeTime" : "60" } ] }
  • 请求示例 HTTP的示例 GET /controller/campus/v1/networkservice/networkconfig/profile/apvpn/encryptionpolicy?pageIndex=1&pageSize=20 HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy
  • 响应参数 返回状态码为200:查询成功。 表2 QueryEncryptitonPolicyResponseDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string 0~64个字符。 - 错误码。 "0" errmsg string 0~256个字符。 - 错误信息 "" pageIndex int32 [1-100] - 第几页的数据。 1 pageSize int32 [1-20] - 一页多少条数据。 1 totalRecords int32 [0-21] - 总数。 1 data ARRAY_REFERENCE 0-21个列表项,详细请参见表4。 VPN配置数据 -
  • 响应示例 返回状态码为204:配置成功。 HTTP/1.1 204 No Content Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "" }
  • 请求示例 HTTP的示例 DELETE /controller/campus/v1/networkservice/networkconfig/profile/apvpn/encryptionpolicy/fbb684c8-0d37-496f-bafa-4b06db151e2e HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy
  • URI /controller/campus/v1/networkservice/networkconfig/profile/apvpn/encryptionpolicy/{id} 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 是 string 32~36个字符。 - 策略ID。 "fbb684c8-0d37-496f-bafa-4b06db151e2e"
  • 响应示例 返回状态码为200:查询成功。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "data" : { "id" : "fbb684c8-0d37-496f-bafa-4b06db151e2e", "name" : "TEST", "ikeVersion" : "v1", "ikeEncryptAlgorithm" : "aes-256", "ikeNegotiationMode" : "main", "ikeAuthAlgorithm" : "sha2-256", "ikeIntegrityAlgorithm" : "sha2-256", "ikePrf" : "sha2-256", "ipsecTransformProtocol" : "ah", "ipsecEncapsulationMode" : "tunnel", "ipsecAhAuthAlgorithm" : "sha2-256", "ipsecAuthAlgorithm" : "sha2-256", "ipsecEncryptAlgorithm" : "aes-256", "ipsecPfs" : "group1", "ipsecLifetimeSeconds" : "30", "ipsecLifetimeKilobytes" : "256", "ipsecDpdType" : "periodic", "ipsecDpdMsg" : "seq-hash-notify", "ipsecDpdInterval" : "30", "ipsecDpdTimeout" : "15", "ikeDh" : "group1", "ikeLifeTime" : "60" } }
  • 请求示例 HTTP的示例 GET /controller/campus/v1/networkservice/networkconfig/profile/apvpn/encryptionpolicy/fbb684c8-0d37-496f-bafa-4b06db151e2e HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy
  • URI /controller/campus/v1/networkservice/networkconfig/profile/apvpn/encryptionpolicy/{id} 表1 path参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 是 string 0~36个字符。 - 策略ID。 "fbb684c8-0d37-496f-bafa-4b06db151e2e"
  • 请求示例 HTTP的示例 PUT /controller/campus/v1/networkservice/networkconfig/profile/apvpn/encryptionpolicy HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "id" : "fbb684c8-0d37-496f-bafa-4b06db151e2e", "name" : "TEST", "ikeVersion" : "v1", "ikeEncryptAlgorithm" : "aes-256", "ikeNegotiationMode" : "main", "ikeAuthAlgorithm" : "sha2-256", "ikeIntegrityAlgorithm" : "sha2-256", "ikePrf" : "sha2-256", "ipsecTransformProtocol" : "ah", "ipsecEncapsulationMode" : "tunnel", "ipsecAhAuthAlgorithm" : "sha2-256", "ipsecAuthAlgorithm" : "sha2-256", "ipsecEncryptAlgorithm" : "aes-256", "ipsecPfs" : "group1", "ipsecLifetimeSeconds" : "30", "ipsecLifetimeKilobytes" : "256", "ipsecDpdType" : "periodic", "ipsecDpdMsg" : "seq-hash-notify", "ipsecDpdInterval" : "30", "ipsecDpdTimeout" : "15", "ikeDh" : "group1", "ikeLifeTime" : "60" }
  • 响应示例 返回状态码为200:配置成功。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "data" : { "id" : "fbb684c8-0d37-496f-bafa-4b06db151e2e", "name" : "TEST", "ikeVersion" : "v1", "ikeEncryptAlgorithm" : "aes-256", "ikeNegotiationMode" : "main", "ikeAuthAlgorithm" : "sha2-256", "ikeIntegrityAlgorithm" : "sha2-256", "ikePrf" : "sha2-256", "ipsecTransformProtocol" : "ah", "ipsecEncapsulationMode" : "tunnel", "ipsecAhAuthAlgorithm" : "sha2-256", "ipsecAuthAlgorithm" : "sha2-256", "ipsecEncryptAlgorithm" : "aes-256", "ipsecPfs" : "group1", "ipsecLifetimeSeconds" : "30", "ipsecLifetimeKilobytes" : "256", "ipsecDpdType" : "periodic", "ipsecDpdMsg" : "seq-hash-notify", "ipsecDpdInterval" : "30", "ipsecDpdTimeout" : "15", "ikeDh" : "group1", "ikeLifeTime" : "60" } }