Deletes a mirror source from a traffic mirror session.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates a sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes RemoveSourcesFromTrafficMirrorSession

The operation that you want to perform. Set the value to RemoveSourcesFromTrafficMirrorSession.

RegionId String Yes cn-hongkong

The ID of the region to which the traffic mirror session belongs. You can call the DescribeRegions operation to query the most recent region list. For more information about regions that support traffic mirroring, see Overview of traffic mirroring.

TrafficMirrorSessionId String Yes tms-j6cla50buc44ap8tu****

The ID of the traffic mirror session from which you want to delete a mirror source.

TrafficMirrorSourceIds.N RepeatList Yes eni-j6c8znm5l1yt4sox****

The ID of the mirror source to be deleted. The maximum value of N is 10.

ClientToken String No 0c593ea1-3bea-11e9-b96b-88e9fe63****

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. ClientToken supports only ASCII characters. It can contain up to 64 ASCII characters.

DryRun Boolean No false

Specifies whether to precheck this request. Valid values:

  • true: only checks the API request. The mirror source is not deleted. The system checks the required parameters, request format, and limits. If the request fails the precheck, the corresponding error code is returned. If the request passes the precheck, the DryRunOperation error code is returned.
  • false: sends the request. After the request passes the precheck, the mirror source is deleted.

Response parameters

Parameter Type Example Description
RequestId String A33B2C6A-89D1-4DEA-A807-A6E8CC552484

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=RemoveSourcesFromTrafficMirrorSession
&RegionId=cn-hongkong
&TrafficMirrorSessionId=tms-j6cla50buc44ap8tu****
&TrafficMirrorSourceIds.1=eni-j6c8znm5l1yt4sox****
&<Common request parameters>

Sample success responses

XML format

<RemoveSourcesFromTrafficMirrorSessionResponse>
  <RequestId>A33B2C6A-89D1-4DEA-A807-A6E8CC552484</RequestId>
</RemoveSourcesFromTrafficMirrorSessionResponse>

JSON format

{
    "RequestId": "A33B2C6A-89D1-4DEA-A807-A6E8CC552484"
}

Error codes

HttpCode Error code Error message Description
400 IncorrectBusinessStatus.TrafficMirror The business status of traffic mirror is incorrect. The error message returned because the mirrored traffic is in an invalid state.
400 OptInRequired.TrafficMirror You need to subscribe to the traffic mirror service first. The error message returned because traffic mirroring is not enabled.
400 DuplicatedParam.SourceInstanceIds The parameter of source instance IDs contains duplicate values. the id parameter of the traffic mirror source instance contains duplicate values.
400 ResourceNotFound.TrafficMirrorSession The specified resource of traffic mirror session is not found. The error message returned because the specified traffic mirror session does not exist.
400 IncorrectStatus.TrafficMirrorSession The status of traffic mirror session is incorrect. The error message returned because the traffic mirror session is in an invalid state.
400 ResourceNotAssociated.TrafficMirrorSource The specified traffic mirror source and session are not associated. The error message returned because the specified mirror source is not associated with the traffic mirror session.
400 ResourceNotFound.NetworkInterface The specified resource of network interface is not found. The error message returned because the specified elastic network interface (ENI) does not exist.
400 ResourceNotFound.EcsInstance The specified resource of ECS instance is not found. The error message returned because the specified Elastic Compute Service (ECS) instance does not exist.

For a list of error codes, visit the API Error Center.