调用UpdateTrafficMirrorSessionAttribute接口修改镜像会话的配置信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | UpdateTrafficMirrorSessionAttribute |
要执行的操作。取值:UpdateTrafficMirrorSessionAttribute。 |
RegionId | String | 是 | cn-hongkong |
镜像会话的所属地域ID。您可以通过调用DescribeRegions接口获取地域ID。关于流量镜像支持的地域,请参见流量镜像概述。 |
TrafficMirrorSessionId | String | 是 | tms-j6cla50buc44ap8tu**** |
要修改的镜像会话的实例ID。 |
TrafficMirrorSessionDescription | String | 否 | This is a new session. |
要修改的镜像会话描述。描述长度为2~256个字符,不能以 |
TrafficMirrorSessionName | String | 否 | abc |
要修改的镜像会话名称。名称长度为2~128个字符,以英文大小写字母或中文开头,可包含数字、下划线(_)和短划线(-)。 |
ClientToken | String | 否 | 0c593ea1-3bea-11e9-b96b-88e9fe63**** |
保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken只支持ASCII字符,且不能超过64个字符。 |
DryRun | Boolean | 否 | false |
是否只预检此次请求,取值:
|
TrafficMirrorTargetId | String | 否 | eni-j6c2fp57q8rr47rp***** |
要修改的镜像目的实例ID。 |
TrafficMirrorTargetType | String | 否 | NetworkInterface |
要修改的镜像目的类型,取值:
|
TrafficMirrorFilterId | String | 否 | tmf-j6cmls82xnc86vtpe**** |
要修改的流量镜像筛选条件的实例ID。 |
VirtualNetworkId | Integer | 否 | 10 |
要修改的指定VNI,用来区分不同的镜像流量,取值范围为0~16777215。 您可以通过VNI在镜像目的区分不同会话的镜像流量。您可以自定义VNI的值,也可以由系统随机分配该值。如果由系统随机分配,该参数无需配置。 |
Priority | Integer | 否 | 2 |
要修改的镜像会话的优先级,取值范围为1~32766。 数字越小,优先级越高。同一账号在同一个地域创建的镜像会话优先级不能重复。 |
Enabled | Boolean | 否 | false |
是否开启流量会话,取值:
|
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 64DCAF03-E2C7-479A-ACEA-38B79876B006 |
请求ID。 |
示例
请求示例
http(s)://[Endpoint]/?Action=UpdateTrafficMirrorSessionAttribute
&RegionId=cn-hongkong
&TrafficMirrorSessionId=tms-j6cla50buc44ap8tu****
&<公共请求参数>
正常返回示例
XML
格式
<UpdateTrafficMirrorSessionAttributeResponse>
<RequestId>64DCAF03-E2C7-479A-ACEA-38B79876B006</RequestId>
</UpdateTrafficMirrorSessionAttributeResponse>
JSON
格式
{
"RequestId": "64DCAF03-E2C7-479A-ACEA-38B79876B006"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | IncorrectBusinessStatus.TrafficMirror | The business status of traffic mirror is incorrect. | 流量镜像的商业状态不正确。 |
400 | OptInRequired.TrafficMirror | You need to subscribe to the traffic mirror service first. | 未开通流量镜像服务。 |
400 | DuplicatedParam.Priority | The specified priority conflicts with the existing priority. | 指定的优先级参数与已有的优先级重复。 |
400 | ResourceNotFound.TrafficMirrorSession | The specified resource of traffic mirror session is not found. | 指定的流量镜像会话不存在。 |
400 | IncorrectStatus.TrafficMirrorSession | The status of traffic mirror session is incorrect. | 流量镜像会话状态不正确。 |
400 | ResourceNotFound.TrafficMirrorFilter | The specified resource of traffic mirror filter is not found. | 指定的流量镜像筛选条件不存在。 |
400 | IncorrectStatus.TrafficMirrorFilter | The status of traffic mirror filter is incorrect. | 流量镜像筛选条件的状态不正确。 |
400 | QuotaExceeded.FilterRelatedSession | The quota of the number of traffic mirror sessions related to one filter is exceeded. | 流量镜像筛选条件所关联的镜像会话数量配额超限。 |
400 | ResourceNotFound.NetworkInterface | The specified resource of network interface is not found. | 指定的网卡不存在。 |
400 | ResourceNotFound.EcsInstance | The specified resource of ECS instance is not found. | 指定的ECS实例不存在。 |
400 | ResourceNotFound.Slb | The specified resource of SLB is not found. | 指定的SLB不存在。 |
400 | OperationDenied.SlbNotInVpc | The specified SLB is not in any VPC. | 指定的SLB不属于任何一个VPC。 |
400 | QuotaExceeded.NetworkInterfaceRelatedSession | The quota of the number of traffic mirror sessions related to one network interface is exceeded. | 单个网卡所能关联的流量镜像会话数量配额超限。 |
400 | QuotaExceeded.SlbRelatedSession | The quota of the number of traffic mirror sessions related to one SLB is exceeded. | 单个SLB所能关联的流量镜像会话数量配额超限。 |
400 | OperationDenied.EcsNotSupportTrafficMirror | The ECS instance does not support traffic mirroring. | ECS实例不支持流量镜像功能。 |
400 | OperationDenied.DuplicateRole | The network interface must not be the source and the target of traffic mirror sessions at the same time. | 网卡不能同时作为流量镜像会话的源和目的。 |
400 | InvalidLoadBalancerId.NotFound | The specified resource of load balancer is not found. | 指定的SLB实例不存在。 |
400 | OperationDenied.FreeNetworkInterface | The network interface is not attached to any ECS instance. | 指定的网卡未绑定任何ECS实例。 |
访问错误中心查看更多错误码。