All Products
Search
Document Center

Cloud Enterprise Network:ListTransitRouterVpcAttachments

Last Updated:Jan 19, 2024

Connects a virtual private cloud (VPC) to an Enterprise Edition transit router.

Operation description

You can use the following methods to query VPC connections on an Enterprise Edition transit router:

  • Specify the ID of the Enterprise Edition transit router.
  • Specify the ID of the relevant Cloud Enterprise Network (CEN) instance and the region ID of the Enterprise Edition transit router.
  • Specify the ID of the region where the Enterprise Edition transit router is deployed.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Debug

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:ListTransitRouterVpcAttachmentsList
  • CenInstance
    acs:cen:*:{#accountId}:ceninstance/*
  • CenInstance
    acs:cen:*:{#accountId}:ceninstance/{#ceninstanceId}
  • TransitRouterVpcAttachment
    acs:cen:*:{#accountId}:centransitrouterattachment/*
  • TransitRouterVpcAttachment
    acs:cen:{#regionId}:{#accountId}:transitroutervpcattachment/*acs:cen:*:{#accountId}:centransitrouterattachment/{#centransitrouterattachmentId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
CenIdstringNo

The IDs of the CEN instances.

cen-j3jzhw1zpau2km****
RegionIdstringNo

The region ID of the Enterprise Edition transit router.

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

cn-hangzhou
TransitRouterAttachmentIdstringNo

The ID of the VPC connection.

tr-attach-nls9fzkfat8934****
TransitRouterIdstringNo

The ID of the Enterprise Edition transit router.

tr-bp1su1ytdxtataupl****
MaxResultsintegerNo

The number of entries to return on each page. Default value: 20.

20
NextTokenstringNo

The token that determines the start point of the query. Valid values:

  • If this is your first query and no subsequent queries are to be sent, ignore this parameter.
  • If a subsequent query is to be sent, set the parameter to the value of NextToken that is returned from the last call.
FFmyTO70tTpLG6I3FmYAXGKPd****
Tagobject []No

The information about the tags.

You can specify at most 20 tags in each call.

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.

tagtest
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.

tagtest
VpcIdstringNo

The ID of the VPC.

vpc-bp1kbjcre9vtsebo1****
OrderTypestringNo

The entity that pays the fees of the network instance. Valid values:

  • PayByCenOwner: the Alibaba Cloud account that owns the CEN instance.
  • PayByResourceOwner: the Alibaba Cloud account that owns the network instance.
PayByCenOwner
StatusstringNo

Specifies whether the network instance is attached to the CEN instance. Valid values:

  • Attaching: being attached to the CEN instance.
  • Attached: attached to the CEN instance.
  • Detaching: being detached from the CEN instance.
Attached

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

NextTokenstring

The token that determines the start point of the next query. Valid values:

  • If NextToken is returned, it indicates that no additional results exist.
  • If NextToken was returned in the previous query, specify the value to obtain the next set of results.
FFmyTO70tTpLG6I3FmYAXGKPd****
RequestIdstring

The ID of the region.

C97FF53F-3EF8-4883-B459-60E171924B23
TotalCountinteger

The total number of entries returned.

1
MaxResultsinteger

The number of entries returned per page.

20
TransitRouterAttachmentsobject []

The information about the VPC connection.

CreationTimestring

The time when the VPC connection was created.

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

2021-06-15T02:14Z
Statusstring

The status of the VPC connection. Valid values:

  • Attached
  • Attaching
  • Detaching
  • Detached
Attached
VpcIdstring

The VPC ID.

vpc-bp1h8vbrbcgohcju5****
TransitRouterAttachmentIdstring

The ID of the VPC connection.

tr-attach-nls9fzkfat8934****
TransitRouterIdstring

The ID of the Enterprise Edition transit router.

tr-bp1su1ytdxtataupl****
ResourceTypestring

The type of resource to which the transit router is connected.

Only VPC may be returned, which indicates VPCs.

VPC
TransitRouterAttachmentDescriptionstring

The description of the VPC connection.

testdesc
VpcOwnerIdlong

The ID of the Alibaba Cloud account to which the VPC belongs.

1250123456123456
VpcRegionIdstring

The region ID of the VPC.

cn-hangzhou
TransitRouterAttachmentNamestring

The name of the VPC connection.

testname
ZoneMappingsobject []

The primary and secondary zones of the VPC connection and the vSwitches and elastic network interfaces (ENIs) of the VPC.

ZoneIdstring

The zone ID.

cn-hangzhou-h
VSwitchIdstring

The vSwitch ID.

vsw-bp1a214sbus8z3b54****
NetworkInterfaceIdstring

The ID of the ENI that is associated with the vSwitch of the Enterprise Edition transit router.

eni-bp149hmyaqegerml****
AutoPublishRouteEnabledboolean

Indicates whether the Enterprise Edition transit router automatically advertises routes to VPCs. Valid values:

  • false: (default)
  • true
true
ChargeTypestring

The billing method of the VPC connection.

Only POSTPAY may be returned, which is the default value and specifies the pay-as-you-go billing method.

POSTPAY
Tagsobject []

The tag key.

Keystring

The tag key.

test
Valuestring

The tag value.

test
OrderTypestring

The entity that pays the fees of the network instance. Valid values:

  • PayByCenOwner: the Alibaba Cloud account that owns the CEN instance.
  • PayByResourceOwner: the Alibaba Cloud account that owns the network instance.
PayByCenOwner
CenIdstring

The CEN instance ID.

cen-j3jzhw1zpau2km****

Examples

Sample success responses

JSONformat

{
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId": "C97FF53F-3EF8-4883-B459-60E171924B23",
  "TotalCount": 1,
  "MaxResults": 20,
  "TransitRouterAttachments": [
    {
      "CreationTime": "2021-06-15T02:14Z",
      "Status": "Attached",
      "VpcId": "vpc-bp1h8vbrbcgohcju5****",
      "TransitRouterAttachmentId": "tr-attach-nls9fzkfat8934****",
      "TransitRouterId": "tr-bp1su1ytdxtataupl****",
      "ResourceType": "VPC",
      "TransitRouterAttachmentDescription": "testdesc",
      "VpcOwnerId": 1250123456123456,
      "VpcRegionId": "cn-hangzhou",
      "TransitRouterAttachmentName": "testname",
      "ZoneMappings": [
        {
          "ZoneId": "cn-hangzhou-h",
          "VSwitchId": "vsw-bp1a214sbus8z3b54****",
          "NetworkInterfaceId": "eni-bp149hmyaqegerml****"
        }
      ],
      "AutoPublishRouteEnabled": true,
      "ChargeType": "POSTPAY",
      "Tags": [
        {
          "Key": "test",
          "Value": "test"
        }
      ],
      "OrderType": "PayByCenOwner",
      "CenId": "cen-j3jzhw1zpau2km****\n"
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalParam.NextTokenThe specified NextToken is invalid.The error message returned because the NextToken parameter is set to an invalid value.
400IllegalParam.TrInstanceThe specified TransitRouter is invalid.The error message returned because the TransitRouter parameter is set to an invalid value.
400IllegalParam.RegionThe specified Region is invalid.The error message returned because the specified region is invalid.
400IllegalParam.CenIdThe specified CenId is invalid.The error message returned because the ID of the CEN instance is invalid.
400IllegalParam.TransitRouterIdThe specified TransitRouterId is invalid.The error message returned because the specified transit router ID is invalid.
400IllegalParam.CenIdOrRegionIdThe specified CenId or RegionId is invalid.The error message returned because the specified CEN instance ID or region ID is invalid.
400IllegalParam.MaxResultsThe specified MaxResults is illegal.-
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-08-04The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
2023-03-01API Description Update. The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 400
Output ParametersThe response structure of the API has changed.
2023-01-06The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: OrderType
    Added Input Parameters: Status
Output ParametersThe response structure of the API has changed.
2022-12-02The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: VpcId
2022-10-19The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
Output ParametersThe response structure of the API has changed.