トラフィックマーキングポリシーにトラフィック分類ルールを追加します。
この API は廃止されました。一時的にアクセス可能ですが、更新やバグ修正対応は一切行われません。代わりに Cbn(2017-09-12) - AddTrafficMatchRuleToTrafficMarkingPolicy への移行を推奨します。より強化された機能に加え、サポートも引き続きご利用いただけます。
操作説明
Usage notes
The AddTraficMatchRuleToTrafficMarkingPolicy operation is deprecated and will be discontinued soon. If you need to add a traffic classification rule to a traffic marking policy, call the AddTrafficMatchRuleToTrafficMarkingPolicy operation.
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
cen:AddTraficMatchRuleToTrafficMarkingPolicy |
create |
*All Resource
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ClientToken |
string |
任意 |
リクエストのべき等性を確保するために使用されるクライアントトークン。 クライアントを使用して値を生成できますが、異なるリクエスト間で一意であることを確認する必要があります。トークンには ASCII 文字のみを含めることができます。 説明
このパラメーターを設定しない場合、ClientToken は RequestId の値に設定されます。RequestId の値はリクエストごとに異なる場合があります。 |
123e4567-e89b-12d3-a456-426**** |
| DryRun |
boolean |
任意 |
ドライランを実行するかどうかを指定します。有効な値:
|
false |
| TrafficMarkingPolicyId |
string |
必須 |
トラフィックマーキングポリシーの ID。 |
tm-u9nxup5kww5po8**** |
| TrafficMatchRules |
array<object> |
任意 |
トラフィック分類ルールの情報。 最大 50 個のトラフィック分類ルールを指定できます。 |
|
|
object |
任意 |
The description of the traffic classification rule. |
||
| MatchDscp |
integer |
任意 |
The differentiated services code point (DSCP) value that is used to match packets. Valid values: 0 to 63. The traffic classification rule matches the packets that contain the specified DSCP value. If you do not set this parameter, packets are considered a match regardless of the DSCP value. 説明
The DSCP value that you specify for this parameter is the DSCP value that packets carry before they are transmitted over the inter-region connection. You can specify at most 50 traffic classification rules. |
5 |
| DstCidr |
string |
任意 |
The destination CIDR block that is used to match packets. The traffic classification rule matches the packets whose destination IP addresses fall within the specified destination CIDR block. If you do not set this parameter, packets are considered a match regardless of the DSCP value. You can specify at most 50 traffic classification rules. |
10.10.10.0/24 |
| TrafficMatchRuleDescription |
string |
任意 |
The description of the traffic classification rule. The description must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The description must start with a letter. You can specify at most 50 traffic classification rules. |
desctest |
| Protocol |
string |
任意 |
The protocol that is used to match packets. Valid values: HTTP, HTTPS, TCP, UDP, SSH, and Telnet. For more information, log on to the Cloud Enterprise Network (CEN) console. You can specify at most 50 traffic classification rules. |
HTTP |
| DstPortRange |
array |
任意 |
The destination port range that is used to match packets. Valid values: -1 and 1 to 65535. The traffic classification rule matches the packets whose destination ports fall within the destination port range. If you do not set this parameter, packets are considered a match regardless of the DSCP value. You can specify at most two ports. Take note of the following rules:
You can specify at most 50 traffic classification rules. |
|
|
integer |
任意 |
The destination port range that is used to match packets. Valid values: -1 and 1 to 65535. The traffic classification rule matches the packets whose destination ports fall within the destination port range. If you do not set this parameter, packets are considered a match regardless of the DSCP value. You can specify at most two ports. Take note of the following rules:
You can specify at most 50 traffic classification rules. |
80 |
|
| SrcCidr |
string |
任意 |
The source CIDR block that is used to match packets. The traffic classification rule matches the packets whose source IP addresses fall within the specified source CIDR block. If you do not set this parameter, packets are considered a match regardless of the source IP address. You can specify at most 50 traffic classification rules. |
192.168.10.0/24 |
| SrcPortRange |
array |
任意 |
The source port range that is used to match packets. Valid values: -1 and 1 to 65535. The traffic classification rule matches the packets whose source ports fall within the source port range. If you do not set this parameter, packets are considered a match regardless of the source port. You can specify at most two ports. Take note of the following rules:
You can specify at most 50 traffic classification rules. |
|
|
integer |
任意 |
The source port range that is used to match packets. Valid values: -1 and 1 to 65535. The traffic classification rule matches the packets whose source ports fall within the source port range. If you do not set this parameter, packets are considered a match regardless of the source port. You can specify at most two ports. Take note of the following rules:
You can specify at most 50 traffic classification rules. |
200 |
|
| TrafficMatchRuleName |
string |
任意 |
The name of the traffic classification rule. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter. You can specify at most 50 traffic classification rules. |
nametest |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
The response. |
||
| RequestId |
string |
The ID of the request. |
0876E54E-3E36-5C31-89F0-9EE8A9266F9A |
例
成功レスポンス
JSONJSON
{
"RequestId": "0876E54E-3E36-5C31-89F0-9EE8A9266F9A"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidTrafficMarkingPolicyId.NotFound | Operation is failed because traffic marking policy id is not found. | |
| 400 | InstanceExist.TrafficMatchRules | The instance already exists. | |
| 400 | Duplicated.TrafficMatchRules | The parameter TrafficMatchRules are duplicated. | |
| 400 | IllegalParam.SrcCidr | SrcCidr is illegal. | |
| 400 | IncorrectStatus.TrafficMarkingPolicy | The status of TrafficMarkingPolicy is incorrect. | |
| 400 | IllegalParam.DstCidr | DstCidr is illegal. | |
| 400 | IllegalParam.Protocol | Protocol is illegal. | |
| 400 | InvalidParameter | Invalid parameter. | |
| 400 | Unauthorized | The AccessKeyId is unauthorized. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。