ListTransitRouterEcrAttachments

Updated at:

Queries the connection information of Express Connect Router (ECR) connections under an Enterprise Edition transit router, including the total number of entries, connection status, connection ID, and payer of the network instance.

Operation description

You can query the information about ECR connections under an Enterprise Edition transit router in the following three ways:

  • Query the information about all ECR connections under the instance by using the Enterprise Edition transit router instance ID.

  • Query the information about all ECR connections under the instance by using the Cloud Enterprise Network (CEN) instance ID and the region ID of the Enterprise Edition transit router.

  • Query specific ECR connection information by using only the TransitRouterAttachmentId parameter.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cen:ListTransitRouterEcrAttachments

list

*CenInstance

acs:cen:*:{#accountId}:ceninstance/{#ceninstanceId}

*TransitRouterEcrAttachment

acs:cen:*:{#accountId}:centransitrouterattachment/*

TransitRouterEcrAttachment

acs:cen:*:{#accountId}:centransitrouterattachment/{#TransitRouterAttachmentId}

None None

Request parameters

Parameter

Type

Required

Description

Example

CenId

string

No

The Cloud Enterprise Network (CEN) instance ID. If you specify this parameter, you must also specify RegionId.

cen-7qthudw0ll6jmc****

RegionId

string

No

The region ID of the transit router. If you specify this parameter, you must also specify CenId.

You can call the DescribeChildInstanceRegions operation to query region IDs.

cn-hangzhou

TransitRouterAttachmentId

string

No

The ID of the ECR connection.

tr-attach-nls9fzkfat8934****

TransitRouterId

string

No

The transit router instance ID.

tr-6ehx7q2jze8ch5ji0****

MaxResults

integer

No

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

20

NextToken

string

No

The token used to start the next query. Valid values:

  • If NextToken is empty, no next query is available.

  • If NextToken returns a value, the value is the token used to start the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

Tag

array<object>

No

The tag information.

You can specify up to 20 tags at a time.

object

No

Key

string

No

The tag key of the resource.

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

You can specify up to 20 tag keys at a time.

TagKey

Value

string

No

The tag value of the resource.

The tag value can be an empty string or a string of up to 128 characters. It cannot start with aliyun or acs:. It cannot contain http:// or https:// .

Each tag key corresponds to a tag value. You can specify up to 20 tag values at a time.

TagValue

Response elements

Element

Type

Description

Example

object

NextToken

string

The token used to start the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

RequestId

string

The request ID.

461EC1B5-04A8-4706-8764-8F5BCEF48A6F

TotalCount

integer

The total number of entries.

4

MaxResults

integer

The number of entries returned per page.

20

TransitRouterAttachments

array<object>

The list of ECR connection information.

array<object>

CreationTime

string

The time when the ECR connection was created.

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

2021-06-15T02:14Z

Status

string

The status of the ECR connection. Valid values:

  • Attached: The connection is attached.

  • Attaching: The connection is being attached.

  • Detaching: The connection is being detached.

Attached

TransitRouterAttachmentId

string

The ID of the ECR connection.

tr-attach-nls9fzkfat8934****

TransitRouterId

string

The Enterprise Edition transit router instance ID.

tr-bp1su1ytdxtataupl****

ResourceType

string

The resource type of the connection. Valid value:

  • ECR: Express Connect Router (ECR) instance.

ECR

TransitRouterRegionId

string

The region ID of the transit router.

You can call the DescribeChildInstanceRegions operation to query the region information represented by the region ID.

cn-shanghai

TransitRouterAttachmentDescription

string

The description of the ECR connection.

desctest

EcrOwnerId

integer

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

1210123456123456

AutoPublishRouteEnabled

boolean

Specifies whether the Enterprise Edition transit router is configured to publish route entry to the ECR instance. Valid value:

  • true: The transit router is configured to publish route entry.

true

EcrId

string

The associated Express Connect Router (ECR) instance ID.

ecr-n78omt2qsko06y****

TransitRouterAttachmentName

string

The name of the ECR connection.

testname

Tags

array<object>

The list of tags.

object

Key

string

The tag key.

test

Value

string

The tag value.

test

CenId

string

The Cloud Enterprise Network (CEN) instance ID.

cen-j3jzhw1zpau2km****

OrderType

string

The payer of the network instance. Valid values:

  • PayByCenOwner: The connection fee and data transfer fee of the ECR instance are paid by the account to which the transit router belongs.

  • PayByResourceOwner: The connection fee and data transfer fee of the ECR instance are paid by the account to which the ECR instance belongs.

PayByCenOwner

Examples

Success response

JSON format

{
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "RequestId": "461EC1B5-04A8-4706-8764-8F5BCEF48A6F",
  "TotalCount": 4,
  "MaxResults": 20,
  "TransitRouterAttachments": [
    {
      "CreationTime": "2021-06-15T02:14Z",
      "Status": "Attached",
      "TransitRouterAttachmentId": "tr-attach-nls9fzkfat8934****",
      "TransitRouterId": "tr-bp1su1ytdxtataupl****",
      "ResourceType": "ECR",
      "TransitRouterRegionId": "cn-shanghai",
      "TransitRouterAttachmentDescription": "desctest",
      "EcrOwnerId": 1210123456123456,
      "AutoPublishRouteEnabled": true,
      "EcrId": "ecr-n78omt2qsko06y****",
      "TransitRouterAttachmentName": "testname",
      "Tags": [
        {
          "Key": "test",
          "Value": "test"
        }
      ],
      "CenId": "cen-j3jzhw1zpau2km****\n",
      "OrderType": "PayByCenOwner"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 IllegalParam.NextToken The specified NextToken is invalid. The error message returned because the NextToken parameter is set to an invalid value.
400 IllegalParam.TrInstance The specified TransitRouter is invalid. The error message returned because the TransitRouter parameter is set to an invalid value.
400 IllegalParam.Region The specified Region is invalid. The error message returned because the specified region is invalid.
400 IllegalParam.CenId The specified CenId is invalid. The error message returned because the ID of the CEN instance is invalid.
400 IllegalParam.TransitRouterId The specified TransitRouterId is invalid. The error message returned because the specified transit router ID is invalid.
400 IllegalParam.CenIdOrRegionId The specified CenId or RegionId is invalid. The error message returned because the specified CEN instance ID or region ID is invalid.
400 IllegalParam.MaxResults The specified MaxResults is illegal. MaxResults illegal.
400 InvalidParameter Invalid parameter. The error message returned because the parameter is set to an invalid value.
400 Unauthorized The AccessKeyId is unauthorized. The error message returned because you do not have the permissions to perform this operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.