Enables traffic mirroring.

Usage notes

You can enable traffic mirroring for different regions. You cannot repeatedly call the OpenTrafficMirrorService operation to enable traffic mirroring for one region within the specified period of time.

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 the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesOpenTrafficMirrorService

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

ClientTokenStringNo123e4567-e89b-12d3-a456-426655442222

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
RegionIdStringNocn-hangzhou

The ID of the region to which the mirrored traffic belongs.

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

Response parameters

ParameterTypeExampleDescription
RequestIdString4FCCF008-4C13-4231-BE77-D5203801A9E2

The request ID.

CodeString200

The status code.

MessageStringsuccessful

The information returned after traffic mirroring is enabled.

Examples

Sample requests

http(s)://[Endpoint]/?Action=OpenTrafficMirrorService
&ClientToken=123e4567-e89b-12d3-a456-426655442222
&RegionId=cn-hangzhou
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<OpenTrafficMirrorServiceResponse>
    <RequestId>4FCCF008-4C13-4231-BE77-D5203801A9E2</RequestId>
    <Code>200</Code>
    <Message>successful</Message>
</OpenTrafficMirrorServiceResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "4FCCF008-4C13-4231-BE77-D5203801A9E2",
  "Code" : "200",
  "Message" : "successful"
}

Error codes

HttpCodeError codeError messageDescription
400OperationFailed.ExceedPurchaseLimitYou have reached the limit of purchase quantity.The maximum quantity for purchase is reached.
400Forbidden.RAMUser not authorized to operate on the specified resourceThe Resource Access Management (RAM) user is unauthorized to perform the operation.
400OperationFailed.AliGroupUserCanNotBuyInnerCommodityVpc_flowlog_public has no group cloud product label, and users within the group are not allowed to purchase.vpc_flowlog_public does not have a merchandise tag and cannot be purchased by an internal group user.
400OperationFailed.QuotaNotEnoughYour quota is insufficient. Please contact your channel partner to increase your quotaThe quota is insufficient. You can contact your channel partner to request a quota increase.
400Order.NoRealNameAuthenticationReal-name verification has not been completed for the account.You have not completed real-name verification. Go to User Center to complete real-name verification.
400OperationFailed.BasicInfoUncompletedYou have not completed your basic personal information, please complete the information and try again.Your basic information is incomplete. Specify the information and try again.

For a list of error codes, see Service error codes.