Deletes specified traffic classification rules from a traffic marking policy.

Usage note

  • When you call RemoveTrafficMatchRuleFromTrafficMarkingPolicy, take note of the following rules:
    • If you specify the ID of a traffic classification rule in the TrafficMarkRuleIds parameter, the specified traffic classification rule is deleted.
    • If you do not specify a traffic classification rule ID in the TrafficMarkRuleIds parameter, no operation is performed after you call this operation.

      If you want to delete a traffic classification rule, you must specify the rule ID before you call this operation.

  • RemoveTrafficMatchRuleFromTrafficMarkingPolicy is an asynchronous operation. After you send a request, the request ID is returned but the operation is still being performed in the system background. You can call ListTrafficMarkingPolicies to query the status of a traffic classification rule.
    • If traffic classification rule is in the Deleting state, the traffic classification rule is being deleted. In this case, you can query the traffic classification rule but cannot perform other operations.
    • If a traffic classification rule cannot be found, the traffic classification rule is deleted.

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

Parameter Type Required Example Description
Action String Yes RemoveTrafficMatchRuleFromTrafficMarkingPolicy

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

ClientToken String No 123e4567-e89b-12d3-a456-426****

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 all requests. ClientToken can contain only ASCII characters.

Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId may be different for each API request.
DryRun Boolean No false

Specifies whether only to precheck the request. Valid values:

  • true: prechecks the request but does not delete traffic classification rules. The system checks the required parameters, the request format, and the service limits. If the request fails to pass the precheck, an error message is returned. If the request passes the check, the DryRunOperation error code is returned.
  • false (default): sends the request and deletes the specified traffic classification rules after the request passes the precheck.
TrafficMarkingPolicyId String Yes tm-d33hdczo3qo8ta****

The ID of the traffic marking policy.

TrafficMarkRuleIds.N String No tm-rule-15jtgapsat62r9****

The ID of the traffic classification rule.

You can specify at most 20 traffic classification rules.

You can call the ListTrafficMarkingPolicies operation to query the IDs of traffic classification rules in a specified traffic marking policy.

Response parameters

Parameter Type Example Description
RequestId String 6DF9A765-BCD2-5C7E-8C32-C35C8A361A39

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=RemoveTrafficMatchRuleFromTrafficMarkingPolicy
&ClientToken=123e4567-e89b-12d3-a456-426****
&DryRun=false
&TrafficMarkingPolicyId=tm-d33hdczo3qo8ta****
&TrafficMarkRuleIds=["tm-rule-15jtgapsat62r9****"]
&Common request parameters

Sample responses

XML format

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

<RemoveTrafficMatchRuleFromTrafficMarkingPolicyResponse>
    <RequestId>6DF9A765-BCD2-5C7E-8C32-C35C8A361A39</RequestId>
</RemoveTrafficMatchRuleFromTrafficMarkingPolicyResponse>

JSON format

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

{
  "RequestId" : "6DF9A765-BCD2-5C7E-8C32-C35C8A361A39"
}

Error codes

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