调用DescribeVpnConnection接口查询指定的IPsec连接的信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用背景高亮的方式表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
vpc:DescribeVpnConnection | get |
|
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
RegionId | string | 是 | IPsec 连接所在的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 | cn-hangzhou |
VpnConnectionId | string | 是 | IPsec 连接的 ID。 | vco-bp1bbi27hojx80nck**** |
返回参数
示例
正常返回示例
JSON
格式
{
"Status": "ike_sa_not_established",
"RemoteCaCertificate": "-----BEGIN CERTIFICATE----- MIIB7zCCAZW****",
"EnableNatTraversal": true,
"CreateTime": 1492753817000,
"EffectImmediately": true,
"VpnGatewayId": "vpn-bp1q8bgx4xnkm2ogj****",
"LocalSubnet": "10.0.0.0/8",
"RequestId": "F2310D45-BCF6-4E2E-9082-B4503844BA4C",
"VpnConnectionId": "vco-bp1bbi27hojx80nck****",
"RemoteSubnet": "192.168.0.0/16",
"CustomerGatewayId": "cgw-bp1mvj4g9kogwwcxk****",
"Name": "ipsec1",
"EnableDpd": true,
"IkeConfig": {
"RemoteId": "139.34.XX.XX",
"IkeLifetime": 86400,
"IkeEncAlg": "aes",
"LocalId": "116.28.XX.XX",
"IkeMode": "main",
"IkeVersion": "ikev1",
"IkePfs": "group2",
"Psk": "pgw6dy****",
"IkeAuthAlg": "sha1"
},
"IpsecConfig": {
"IpsecAuthAlg": "sha1",
"IpsecLifetime": 86400,
"IpsecEncAlg": "aes",
"IpsecPfs": "group2"
},
"VcoHealthCheck": {
"Status": "failed",
"Dip": "10.0.0.1",
"Interval": 3,
"Retry": 3,
"Sip": "192.168.1.1",
"Enable": "true",
"Policy": "revoke_route"
},
"VpnBgpConfig": {
"Status": "success",
"PeerBgpIp": "169.254.11.1",
"TunnelCidr": "169.254.11.0/30",
"EnableBgp": "true",
"LocalBgpIp": "169.254.11.2",
"PeerAsn": 65530,
"LocalAsn": 65531,
"AuthKey": "AuthKey****"
},
"AttachType": "CEN",
"NetworkType": "public",
"AttachInstanceId": "cen-lxxpbpalc776qz****",
"Spec": "1000M",
"State": "attached",
"ZoneNo": "cn-hangzhou-h",
"InternetIp": "47.XX.XX.162",
"TransitRouterId": "tr-p0we2edef9qr44a85****",
"TransitRouterName": "nametest",
"CrossAccountAuthorized": false,
"Tags": {
"Tag": [
{
"Key": "TagKey",
"Value": "TagValue"
}
]
},
"TunnelOptionsSpecification": {
"TunnelOptions": [
{
"TunnelId": "tun-opsqc4d97wni27****",
"CustomerGatewayId": "cgw-p0wy363lucf1uyae8****",
"EnableDpd": "true",
"EnableNatTraversal": "true",
"InternetIp": "47.21.XX.XX",
"RemoteCaCertificate": "-----BEGIN CERTIFICATE----- MIIB7zCCAZW**** -----END CERTIFICATE-----",
"Role": "master",
"TunnelIndex": 0,
"State": "active",
"Status": "ipsec_sa_established",
"TunnelBgpConfig": {
"BgpStatus": "success",
"LocalAsn": "65530",
"LocalBgpIp": "169.254.10.1",
"PeerAsn": "65531",
"PeerBgpIp": "169.254.10.2",
"TunnelCidr": "169.254.10.0/30"
},
"TunnelIkeConfig": {
"IkeAuthAlg": "sha1",
"IkeEncAlg": "aes",
"IkeLifetime": "86400",
"IkeMode": "main",
"IkePfs": "group2",
"IkeVersion": "ikev1",
"LocalId": "47.21.XX.XX",
"Psk": "123456****",
"RemoteId": "47.42.XX.XX"
},
"TunnelIpsecConfig": {
"IpsecAuthAlg": "sha1",
"IpsecEncAlg": "aes",
"IpsecLifetime": "86400",
"IpsecPfs": "group2"
},
"ZoneNo": "cn-hangzhou-i"
}
]
},
"EnableTunnelsBgp": true,
"ResourceGroupId": "rg-acfmzs372yg****"
}
错误码
HTTP status code | 错误码 | 错误信息 | 描述 |
---|---|---|---|
403 | Forbbiden.SubUser | User not authorized to operate on the specified resource as your account is created by another user. | 您没有权限操作该资源,请您申请操作权限后再试。 |
403 | Forbidden | User not authorized to operate on the specified resource. | 您没有权限操作指定资源,请申请权限后再操作。 |
404 | InvalidVpnConnectionInstanceId.NotFound | The specified vpn connection instance id does not exist. | 指定的VPN连接不存在,请您检查该VPN连接ID是否正确。 |
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|---|---|
2024-10-24 | OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-10-19 | OpenAPI 去除了 deprecated 标记、OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-08-01 | OpenAPI 描述信息更新、OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-06-30 | OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-06-13 | OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |
2023-05-04 | OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |