All Products
Search
Document Center

Cloud Enterprise Network:ListTransitRouters

Last Updated:Oct 22, 2024

Queries the information about transit routers that are connected to a Cloud Enterprise Network (CEN) instance.

Operation description

You can set the RegionId and TransitRouterId parameters based on your requirements.

  • If you do not set RegionId or TransitRouterId, the system queries all transit routers that are connected to the specified CEN instance.
  • If you set only RegionId, the system queries transit routers that are deployed in the specified region.
  • If you set only TransitRouterId, the system queries the specified transit router.
  • If you set both RegionId and TransitRouterId, the system queries the specified transit router in the specified region.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
cen:ListTransitRoutersget
  • CenInstance
    acs:cen:*:{#accountId}:ceninstance/{#ceninstanceId}
  • TransitRouter
    acs:cen:*:{#accountId}:centransitrouter/*
  • TransitRouter
    acs:cen:*:{#accountId}:centransitrouter/{#centransitrouterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PageNumberintegerNo

The number of the page to return. Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page. Valid values: 1 to 50. Default value: 10.

10
CenIdstringYes

The ID of the CEN instance.

cen-j3jzhw1zpau2km****
TransitRouterIdstringNo

The ID of the transit router.

tr-uf654ttymmljlvh2x****
RegionIdstringNo

The ID of the region where the transit router is deployed.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
Tagarray<object>No

The information about the tags.

You can specify at most 20 tags in each call.

objectNo

The information about the tags.

KeystringNo

The tag key.

The tag key cannot be an empty string. The tag key can be up to 64 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

You can specify at most 20 tag keys.

TagKey
ValuestringNo

The tag value.

The tag value can be 0 to 128 characters in length, and cannot start with aliyun or acs:. It cannot contain http:// or https://.

Each tag key must have a unique tag value. You can specify at most 20 tag values in each call.

TagValue
StatusstringNo

The status of the transit router. Valid values:

  • Creating: The transit router is being created.
  • Active: The transit router is available.
  • Modifying: The transit router is being modified
  • Deleting: The transit router is being deleted.
  • Upgrading: The transit router is being upgraded.
Active
TypestringNo

The edition of the transit router. Valid values:

  • Enterprise: Enhance Edition
  • Basic: Basic Edition
Enterprise
TransitRouterNamestringNo

The name of the Enterprise Edition transit router.

The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

testname
FeatureFilterarray<object>No

The field that is used to enable or disable a feature of the transit router.

objectNo

The field that is used to enable or disable a feature of the transit router.

KeystringNo

The value of the field that is used to enable or disable a feature of the transit router. Supported fields:

  • Multicast: the multicast feature.
Multicast
ValuearrayNo

The fields that are used to enable or disable the features of the transit router. The Multicast field supports only one value. Valid values:

  • Enabled: enables multicast.
  • Disabled: disables multicast.
stringNo

The field that is used to enable or disable a feature of the transit router. Valid values of the Multicast field:

  • Enabled: enables multicast.
  • Disabled: disables multicast.
Enabled

Response parameters

ParameterTypeDescriptionExample
object

The response.

PageSizeinteger

The number of entries returned per page.

10
RequestIdstring

The ID of the request.

68521297-5FA6-46CB-B4EB-658F1C68C8CC
PageNumberinteger

The page number of the returned page.

1
TotalCountinteger

The total number of entries returned.

1
TransitRoutersarray<object>

A list of transit routers.

TransitRouterobject

The information about the transfer router.

CreationTimestring

The time when the transit router was created.

The time follows the ISO8601 standard in the YYYY-MM-DDThh:mmZ format. The time is displayed in UTC.

2021-03-15T09:39Z
Typestring

The edition of the transit router. Valid values:

  • Enterprise: Enhance Edition
  • Basic: Basic Edition
Enterprise
Statusstring

The status of the transit router. Valid values:

  • Creating: The transit router is being created.
  • Active: The transit router is available.
  • Modifying: The transit router is being modified
  • Deleting: The transit router is being deleted.
  • Upgrading: The transit router is being upgraded.
Active
TransitRouterIdstring

The ID of the transit router.

tr-bp1su1ytdxtataupl****
TransitRouterDescriptionstring

The description of the transit router.

testdesc
TransitRouterNamestring

The name of the transit router.

testname
CenIdstring

The ID of the CEN instance.

cen-j3jzhw1zpau2km****
AliUidlong

The ID of the Alibaba Cloud account to which the CEN instance belongs.

1210123456123456
RegionIdstring

The ID of the region where the transit router is deployed.

cn-hangzhou
SupportMulticastboolean

Indicates whether multicast is enabled for the transit router. Valid values:

  • true: enabled
  • false: disabled
false
TransitRouterCidrListarray<object>

The CIDR blocks of the transit router.

TransitRouterCidrListobject

The CIDR block of the transit router.

Cidrstring

The CIDR block of the transit router.

192.168.1.0/24
Namestring

The name of the CIDR block.

CIDRname
Descriptionstring

The description of the CIDR block.

CIDRdesc
TransitRouterCidrIdstring

The ID of the CIDR block.

cidr-46p5ceg21e8152****
PublishCidrRouteboolean

Indicates whether the system is allowed to automatically add a route to the route table of the transit router. Valid values:

  • true: yes

    A value of true indicates that after you create a private VPN connection and create a route learning correlation for the private VPC connection, the system automatically adds the following route to the route table of the transit router that is in route learning correlation with the private VPN connection: A blackhole route whose destination CIDR block is the CIDR block of the transit router. The CIDR block of the transit router refers to the CIDR block from which gateway IP addresses are allocated to IPsec-VPN connections.

    The blackhole route is advertised only to the route tables of virtual border routers (VBRs) that are connected to the transit router.

  • false: no

true
Tagsarray<object>

A list of tags.

Tagobject

The information about the tags.

Keystring

The tag key.

TagKey
Valuestring

The tag value.

TagValue

Examples

Sample success responses

JSONformat

{
  "PageSize": 10,
  "RequestId": "68521297-5FA6-46CB-B4EB-658F1C68C8CC",
  "PageNumber": 1,
  "TotalCount": 1,
  "TransitRouters": [
    {
      "CreationTime": "2021-03-15T09:39Z",
      "Type": "Enterprise",
      "Status": "Active",
      "TransitRouterId": "tr-bp1su1ytdxtataupl****",
      "TransitRouterDescription": "testdesc",
      "TransitRouterName": "testname",
      "CenId": "cen-j3jzhw1zpau2km****",
      "AliUid": 1210123456123456,
      "RegionId": "cn-hangzhou",
      "SupportMulticast": false,
      "TransitRouterCidrList": [
        {
          "Cidr": "192.168.1.0/24",
          "Name": "CIDRname",
          "Description": "CIDRdesc",
          "TransitRouterCidrId": "cidr-46p5ceg21e8152****",
          "PublishCidrRoute": true
        }
      ],
      "Tags": [
        {
          "Key": "TagKey",
          "Value": "TagValue"
        }
      ]
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterCombination.TransitRouterRegion ID is required if no TransitRouterId or CenId specified.The error message returned because you must specify at least a region, a transit router ID, or a CEN instance ID.
400InvalidOperation.UnsupportFilterValueThe specified FeatureFilter Value is not supported by this operation.The error message returned because the specified filter value is invalid.
400InvalidOperation.UnsupportFilterThe specified FeatureFilter is not supported by this operation.The error message returned because the specified filter is invalid.
400IllegalParam.TagValueThe tag values are not valid.The error message returned because the specified tag value is invalid.
400IllegalParam.TagKeyThe tag keys are not valid.The error message returned because the specified tag key is invalid.
400InvalidParameterInvalid parameter.The error message returned because the parameter is set to an invalid value.
400UnauthorizedThe AccessKeyId is unauthorized.The error message returned because you do not have the permissions to perform this operation.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-10-18The Error code has changedView Change Details
2023-01-09The Error code has changed. The request parameters of the API has changedView Change Details