Queries the IPsec-VPN connections associated with a transit router.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vpc:DescribeVpnAttachments | list |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region where the IPsec-VPN connection is established. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
PageNumber | integer | No | The page number. Default value: 1. | 1 |
PageSize | integer | No | The number of entries per page. Default value: 10. Valid values: 1 to 50. | 10 |
VpnConnectionId | string | No | The ID of the IPsec-VPN connection. Note
If you do not specify an IPsec-VPN connection ID, all IPsec-VPN connections associated with a transit router in the region are queried.
| vco-p0w2jpkhi2eeop6q6**** |
AttachType | string | No | The type of resource that is associated with the IPsec-VPN connection. Default value: CEN. Set the value to CEN, which specifies to query IPsec-VPN connections associated with the transit router. | CEN |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "9F0725BB-186A-3564-91C3-AAE48042F853",
"PageSize": 10,
"PageNumber": 1,
"TotalCount": 1,
"VpnAttachments": [
{
"InstanceId": "vco-p0w2jpkhi2eeop6q6****",
"Name": "nametest1",
"Description": "desctest",
"AttachType": "CEN",
"TransitRouterId": "tr-p0wkh4yryb1dnanqw****",
"TransitRouterName": "nametest2",
"CrossAccountAuthorized": false
}
]
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | Forbidden.TagKey.Duplicated | The specified tag key already exists. | The tag resources are duplicate. |
400 | SizeLimitExceeded.TagNum | The maximum number of tags is exceeded. | The number of tags has reached the upper limit. |
400 | InvalidParameter.TagValue | The specified parameter TagValue is invalid. | The error message returned because the specified tag value is invalid. |
400 | InvalidParameter.TagKey | The specified parameter TagKey is invalid. | The error message returned because the specified tag key is invalid. |
400 | Duplicated.TagKey | The specified parameter TagKey is duplicated. | The error message returned because the specified tag key already exists. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-11-05 | The Error code has changed. The response structure of the API has changed | View Change Details |