You need to enable JavaScript to run this app.
文档中心
私有网络

私有网络

复制全文
下载 pdf
流量镜像
DescribeTrafficMirrorSessions - 查询镜像会话列表
复制全文
下载 pdf
DescribeTrafficMirrorSessions - 查询镜像会话列表
调用 DescribeTrafficMirrorSessions 接口,查询满足指定条件的镜像会话。​
使用说明​
  • 传入多个请求参数,按照传入的参数进行查询,返回符合所有条件的镜像会话,若没有符合条件的镜像会话,则返回空值。​
  • 若请求参数非必选参数均未传入,则按照当前登录账号查询,返回当前账号下的所有镜像会话。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action String 必选 示例值:DescribeTrafficMirrorSessions​
接口名称。当前 API 的名称为DescribeTrafficMirrorSessions。​
​
Version String 必选 示例值:2020-04-01​
接口版本。当前 API 的版本为 2020-04-01。​
​
TrafficMirrorSessionNames.N String 可选 示例值:TM_Session_1​
镜像会话的名称。​
​
TrafficMirrorSessionIds.N String 可选 示例值:tms-j6cmls82xnc86vtpe****​
镜像会话的ID。​
  • 参数 - N:表示镜像会话ID的序号,单次调用数量上限为100个。​
  • 多个镜像会话ID之间用&分隔。​
​
NetworkInterfaceId String 必选 示例值:eni-bp1fgnh68xyz9****​
镜像源网卡的ID。 您可调用 DescribeNetworkInterfaces 查询满足条件的网卡。​
​
TrafficMirrorTargetId String 可选 示例值:tmt-35bvae1r7rv283dy2w2ll****​
镜像目的的ID。​
您可以调用 DeleteTrafficMirrorTarget 接口,查询镜像目的的ID。​
​
TrafficMirrorFilterId String 可选 示例值:tmf-bp1opxu1zkhn00123****​
筛选条件的ID。​
您可以调用 DescribeTrafficMirrorFilters 接口,查询筛选条件的ID。​
​
VirtualNetworkId Integer 可选 示例值:2​
镜像会话VNI。​
​
PacketLength Integer 可选 示例值:9600​
镜像会话数据包大小。​
​
Priority Integer 可选 示例值:1​
镜像会话的优先级。​
​
ProjectName String 可选 示例值:default​
镜像会话所属的项目。​
​
TagFilters.N.Key String 可选 示例值:k1​
标签的标签键。​
  • 参数 - N:表示标签键的序号,取值范围:1~10。​
  • 多个标签键之间用&分隔。多个标签键之间的关系为逻辑“与(AND)”,即查询同时添加多个标签键的镜像会话。​
​
TagFilters.N.Values.N String 可选 示例值:v1​
标签的标签值。​
  • 第一个N:表示标签键的序号。​
  • 第二个N:表示标签值的序号,取值范围:1~3。同一标签键多个标签值之间的关系为逻辑“或(OR)”,即查询同一标签键下添加其中一个标签值的镜像会话。​
  • 多个标签值之间用&分隔。​
说明​
  • 若传入该参数,则必须先传入TagFilters.N.Key。​
  • 传入空字符串时,表示查询标签值为空的镜像会话。​
​
NextToken String 可选 示例值:caeba0bbb2be03f84eb48b699f0a****​
分页查询凭证,用于标记分页的位置。​
  • 不填则从头开始查询。​
  • 传入之前调用本API返回的NextToken,则从该次API调用标记分页的位置往后开始查询。​
​
MaxResults Integer 可选 示例值:50​
查询的数量,默认为 10,最大为100。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId String 示例值:2021062415303301022514515207C4****​
请求ID。​
​
NextToken String 示例值:caeba0bbb2be03f84eb48b699f0a****​
本次API调用返回的查询凭证,标记分页的位置,用于下一次查询。返回为空表示没有下一页。​
​
TrafficMirrorSessions Object[] 示例值:-​
TrafficMirrorSessions的详细信息。​
TrafficMirrorSessionId String 示例值:tms-j6cmls82xnc86vtpe****​
镜像会话的ID。​
​
TrafficMirrorTargetId String 示例值:tmt-35bvae1r7rv283dy2w2ll****​
镜像目的的ID。​
​
TrafficMirrorFilterId String 示例值:tmf-bp1opxu1zkhn00123****​
筛选条件的ID。​
​
TrafficMirrorSourceIds String[] 示例值:eni-35bvae1r7rv283dy2w2ll****​
镜像源网卡列表。​
当前一个镜像会话仅支持关联一个镜像源。​
​
Priority Integer 示例值:1​
镜像会话优先级。​
​
PacketLength Integer 示例值:9600​
镜像会话数据包大小。​
​
TrafficMirrorSessionName String 示例值:TM_Session_1​
镜像会话名称。​
​
Description String 示例值:TM_Session_1_Description​
镜像会话的描述。​
​
Status String 示例值:Active​
镜像会话状态。​
  • Creating :创建中。​
  • Deleting :删除中。​
  • Pending :修改中。​
  • Active :可用。​
  • Inactive :已关停。​
​
BusinessStatus String 示例值:Normal​
镜像会话计费状态。​
  • Normal:正常。​
  • FinancialLocked:被锁定。​
​
LockReason String 示例值:Financial​
锁定原因。​
  • financial:因欠费被锁定。​
  • unlock:欠费关停后充值恢复过程中。​
​
VirtualNetworkId Integer 示例值:2​
镜像会话VNI。​
​
CreatedAt String 示例值:2021-08-05T21:46:55+08:00​
镜像会话的创建时间。​
​
UpdatedAt String 示例值:2021-08-05T21:46:55+08:00​
镜像会话的更新时间。​
​
ProjectName String 示例值:default​
镜像会话所属项目的名称。​
​
Tags Object[] 示例值:-​
镜像会话的标签信息。​
Key String 示例值:k1​
标签的标签键。​
​
Value String 示例值:v1​
标签的标签值。​
​
​
​
​
​
请求示例​
​
GET /?Action=DescribeTrafficMirrorSessions&Version=2020-04-01&NetworkInterfaceId=eni-bp1fgnh68xyz9****&NextToken=caeba0bbb2be03f84eb48b699f0a****&MaxResults=50 HTTP/1.1​
Host: vpc.cn-beijing.volcengineapi.com​
X-Date: 20250804T033538Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20250804/cn-beijing/vpc/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "DescribeTrafficMirrorSessions",​
"Version": "2020-04-01",​
"Service": "vpc",​
"Region": "cn-beijing"​
},​
"Result": {​
"NextToken": "caeba0bbb2be03f84eb48b699f0a****",​
"RequestId": "2021062415303301022514515207C4****",​
"TrafficMirrorSessions": [​
{​
"Tags": [​
{​
"Key": "k1",​
"Value": "v1"​
}​
],​
"Status": "Active",​
"Priority": 1,​
"CreatedAt": "2021-08-05T21:46:55+08:00",​
"UpdatedAt": "2021-08-05T21:46:55+08:00",​
"LockReason": "Financial",​
"Description": "TM_Session_1_Description",​
"ProjectName": "default",​
"PacketLength": 9600,​
"BusinessStatus": "Normal",​
"VirtualNetworkId": 2,​
"TrafficMirrorFilterId": "tmf-bp1opxu1zkhn00123****",​
"TrafficMirrorTargetId": "tmt-35bvae1r7rv283dy2w2ll****",​
"TrafficMirrorSessionId": "tms-j6cmls82xnc86vtpe****",​
"TrafficMirrorSourceIds": [​
"eni-35bvae1r7rv283dy2w2ll****"​
],​
"TrafficMirrorSessionName": "TM_Session_1"​
}​
]​
}​
}​
​
错误码​
​
状态码​
错误码​
错误信息​
说明​
400​
DryRunOperation​
Exception raised to indicate a successfully authorized action when the DryRun flag is set to true.​
该请求设置为DryRun操作,操作授权已获得许可,但未被实际执行。​
400​
InvalidMaxResults.Malformed​
The specified parameter MaxResults is malformed.​
查询数量不合法。​
400​
InvalidNextToken.Malformed​
The specified parameter NextToken is invalid.​
查询 NextToken 不合法。​
400​
InvalidPage.Malformed​
The specified page is malformed.​
指定的分页参数不合法。​
400​
InvalidTagFilter.Disorder​
The specified index order of tag filter is malformed.​
指定标签过滤项的索引顺序参数格式不合法。​
400​
InvalidTagFilterKey.Malformed​
The specified parameter tag filter key is invalid.​
过滤标签键不合法。​
400​
InvalidTagFilterValue.Malformed​
The specified parameter tag filter value is invalid.​
过滤标签值不合法。​
400​
InvalidTrafficMirrorSession.Malformed​
The specified traffic mirror session is malformed. Ensure that IDs and names cannot be specified at the same time.​
指定的流量镜像会话不合法。请确保不能同时指定ID和名称。​
400​
LimitExceeded.TagFilterKey​
You've reached the limit on the number of tag keys that you can filter.​
已达到单次可指定过滤标签键数量的上限。​
400​
LimitExceeded.TagFilterValue​
You've reached the limit on the number of tag values that you can filter.​
已达到单次可指定过滤标签值数量的上限。​
400​
LimitExceeded.TrafficMirrorSessionIds​
You've reached the limit on the number of traffic mirror session IDs that you can describe.​
已达到可查询的镜像流量会话ID数量上限。​
400​
LimitExceeded.TrafficMirrorSessionNames​
You've reached the limit on the number of traffic mirror session names that you can describe.​
已达到可查询的镜像流量会话名数量上限。​
​
​
最近更新时间:2026.09.23 11:11:02
这个页面对您有帮助吗?
有用
有用
无用
无用