すべてのプロダクト
Search
ドキュメントセンター

Cloud Enterprise Network:UpdateTrafficMarkingPolicyAttribute

最終更新日:Jun 10, 2026

トラフィックマーキングポリシーの名前、説明、およびトラフィック分類ルールを変更します。

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

下表に、この API を呼び出すために必要な認証情報を示します。認証情報は、RAM (Resource Access Management) ポリシーを使用して定義できます。以下で各列名について説明します。

  • アクション:特定のリソースに対して実行可能な操作。ポリシー構文ではAction要素として指定します。

  • API:アクションを具体的に実行するための API。

  • アクセスレベル:各 API に対して事前定義されているアクセスの種類。有効な値:create、list、get、update、delete。

  • リソースタイプ:アクションが作用するリソースの種類。リソースレベルでの権限をサポートするかどうかを示すことができます。ポリシーの有効性を確保するため、アクションの対象として適切なリソースを指定してください。

    • リソースレベルの権限を持つ API の場合、必要なリソースタイプはアスタリスク (*) でマークされます。ポリシーのResource要素で対応する ARN を指定してください。

    • リソースレベルの権限を持たない API の場合、「すべてのリソース」と表示され、ポリシーのResource要素でアスタリスク (*) でマークされます。

  • 条件キー:サービスによって定義された条件のキー。このキーにより、きめ細やかなアクセス制御が可能になります。この制御は、アクション単体に適用することも、特定のリソースに対するアクションに適用することもできます。Alibaba Cloud は、サービス固有の条件キーに加えて、すべての RAM 統合サービスに適用可能な一連の共通条件キーを提供しています。

  • 依存アクション:ある特定のアクションを実行するために、前提として実行が必要となる他のアクション。依存アクションの権限も RAM ユーザーまたは RAM ロールに付与する必要があります。

アクション

アクセスレベル

リソースタイプ

条件キー

依存アクション

cen:UpdateTrafficMarkingPolicyAttribute

update

*CenInstance

acs:cen:*:{#accountId}:ceninstance/{#CenId}

なし なし

リクエストパラメーター

パラメーター

必須 / 任意

説明

ClientToken

string

任意

リクエストのべき等性を保証するために使用されるクライアントトークン。

クライアントを使用して値を生成できますが、異なるリクエスト間で一意であることを確認する必要があります。トークンには ASCII 文字のみを含めることができ、64 文字を超えることはできません。

123e4567-e89b-12d3-a456-426****

DryRun

boolean

任意

ドライランを実行するかどうかを指定します。有効な値:

  • true: ドライランを実行します。システムは必須パラメーター、リクエスト構文、および使用制限をチェックします。リクエストがドライランに失敗した場合、エラーメッセージが返されます。リクエストがドライランに合格した場合、DryRunOperation エラーコードが返されます。

  • false (デフォルト): ドライランを実行し、リクエストを送信します。

false

TrafficMarkingPolicyId

string

必須

トラフィックマーキングポリシーの ID。

tm-u9nxup5kww5po8****

TrafficMarkingPolicyName

string

任意

トラフィックマーキングポリシーの新しい名前。

名前は 2 ~ 128 文字で、英字、数字、アンダースコア (_)、ハイフン (-) を使用できます。先頭は英字である必要があります。

nametest

TrafficMarkingPolicyDescription

string

任意

トラフィックマーキングポリシーの新しい説明。

説明は 2 ~ 128 文字で、英字、数字、アンダースコア (_)、ハイフン (-) を使用できます。説明の先頭は英字である必要があります。

desctest

AddTrafficMatchRules

array<object>

任意

トラフィックマーキングポリシーに追加するトラフィック分類ルール。

1 回の呼び出しで最大 50 個のトラフィック分類ルールを追加できます。

object

任意

The traffic classification rules to be added to the traffic marking policy.

MatchDscp

integer

任意

The Differentiated Service Code Point (DSCP) value that is used to match packets. Valid values: 0 to 63.

Requests that carry the specified DSCP value are considered a match. If you do not specify a DSCP value, 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 create up to 50 traffic classification rules in each call. You can specify a DSCP value for each traffic classification rule.

1

DstCidr

string

任意

The destination CIDR block of packets. IPv4 and IPv6 addresses are supported.

Packets whose destination IP addresses fall into the specified destination CIDR block meet the traffic classification rule. If you do not specify a destination CIDR block, all packets meet the traffic classification rule.

You can create up to 50 traffic classification rules in each call. You can specify a destination CIDR block for each traffic classification rule.

172.30.0.0/24

TrafficMatchRuleDescription

string

任意

The description of the traffic classification rule.

You can create up to 50 traffic classification rules in each call. You can specify a description for each traffic classification rule.

This parameter is optional. If you enter a description, it must be 1 to 256 characters in length and cannot start with http:// or https://.

test1

Protocol

string

任意

The protocol that is used to match packets.

Traffic classification rules support the following protocols: HTTP, HTTPS, TCP, UDP, SSH, and Telnet. For more information, log on to the CEN console.

Some protocols use a fixed port. Click to view the protocols and ports.

  • If the protocol is ICMP, set the destination port to -1.

  • If the protocol is GRE, set the destination port to -1.

  • If the protocol is SSH, set the destination port to 22.

  • If the protocol is Telnet, set the destination port to 23.

  • If the protocol is HTTP, set the destination port to 80.

  • If the protocol is HTTPS, set the destination port to 443.

  • If the protocol is MS SQL, set the destination port to 1443.

  • If the protocol is Oracle, set the destination port to 1521.

  • If the protocol is Mysql, set the destination port to 3306.

  • If the protocol is RDP, set the destination port to 3389.

  • If the protocol is Postgre SQL, set the destination port to 5432.

  • If the protocol is Redis, the destination port must be 6379.

You can create up to 50 traffic classification rules in each call. You can specify a protocol for each traffic classification rule.

UDP

DstPortRange

array

任意

The destination port range that is used to match packets. Valid values: -1 and 1 to 65535.

Packets whose destination ports fall within the specified destination port range are considered a match. If you do not specify a destination port range, packets are considered a match regardless of the destination port.

You can enter up to two port numbers. Take note of the following rules:

  • If you enter only one port number, such as 1, packets whose destination port is 1 match the traffic classification rule. A value of -1 specifies all destination ports.

  • If you enter two port numbers, such as 1 and 200, packets whose destination ports fall into 1 and 200 are considered a match.

  • If you enter two port numbers and one of them is -1, the other port number must also be -1. In this case, all packets meet the traffic classification rule.

You can create up to 50 traffic classification rules in each call. You can specify a destination port range for each traffic classification rule.

integer

任意

The destination port range that is used to match packets. Valid values: -1 and 1 to 65535.

Packets whose destination ports fall within the specified destination port range are considered a match. If you do not specify a destination port range, packets are considered a match regardless of the destination port.

You can enter up to two port numbers. Take note of the following rules:

  • If you enter only one port number, such as 1, packets whose destination port is 1 match the traffic classification rule.

  • If you enter two port numbers, such as 1 and 200, packets whose destination ports fall into 1 and 200 are considered a match.

  • If you enter two port numbers and one of them is -1, the other port number must also be -1. In this case, all packets meet the traffic classification rule.

You can create up to 50 traffic classification rules in each call. You can specify a destination port range for each traffic classification rule.

77

SrcCidr

string

任意

The source CIDR block of packets. IPv4 and IPv6 addresses are supported.

Packets whose source IP addresses fall into the specified source CIDR block meet the traffic classification rule. If you do not specify a source CIDR block, all packets meet the traffic classification rule.

You can create up to 50 traffic classification rules in each call. You can specify a source CIDR block for each traffic classification rule.

10.128.32.0/19

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 specify this parameter, packets are considered a match regardless of the source port.

You can enter up to two port numbers. Take note of the following rules:

  • If you enter only one port number, such as 1, packets whose source port is 1 are considered a match. A value of -1 specifies all source ports.

  • If you enter two port numbers, such as 1 and 200, packets whose source ports fall into 1 and 200 are considered a match.

  • If you enter two port numbers and one of them is -1, the other port number must also be -1. In this case, all packets meet the traffic classification rule.

You can create up to 50 traffic classification rules in each call. You can specify a source port range for each traffic classification rule.

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 specify this parameter, packets are considered a match regardless of the source port.

You can enter up to two port numbers. Take note of the following rules:

  • If you enter only one port number, such as 1, packets whose source port is 1 are considered a match.

  • If you enter two port numbers, such as 1 and 200, packets whose source ports fall into 1 and 200 are considered a match.

  • If you enter two port numbers and one of them is -1, the other port number must also be -1. In this case, all packets meet the traffic classification rule.

You can create up to 50 traffic classification rules in each call. You can specify a source port range for each traffic classification rule.

22

TrafficMatchRuleName

string

任意

The name of the traffic classification rule.

You can create up to 50 traffic classification rules in each call. You can specify a name for each traffic classification rule.

The name can be empty or 1 to 128 characters in length, and cannot start with http:// or https://.

Guangzhou Testing

AddressFamily

string

任意

The address family. Valid values: You can set the value to IPv4 or IPv6, or leave the value empty.

IPv4

DeleteTrafficMatchRules

array<object>

任意

トラフィックマーキングポリシーから削除するトラフィック分類ルール。

説明

送信元 CIDR ブロック、送信先 CIDR ブロック、送信元ポート、宛先ポート、DSCP 値など、トラフィック分類ルールの詳細情報を指定します。十分な情報を指定しない場合、システムは削除するトラフィック分類ルールのマッチングに失敗する可能性があります。

object

任意

The traffic classification rules to be deleted from the traffic marking policy.

MatchDscp

integer

任意

The DSCP value that is used to match packets.

3

DstCidr

string

任意

The destination CIDR block of packets. IPv4 and IPv6 addresses are supported.

192.168.200.3/32

TrafficMatchRuleDescription

string

任意

The description of the traffic classification rule.

This parameter is optional. If you enter a description, it must be 1 to 256 characters in length and cannot start with http:// or https://.

Hangzhou-to-Qingdao CAT

Protocol

string

任意

The protocol that is used to match packets.

You can call the ListTrafficMarkingPolicies operation to query the details about a traffic classification rule.

TCP

DstPortRange

array

任意

The destination port range that is used to match packets.

integer

任意

The destination port range that is used to match packets.

-1

SrcCidr

string

任意

The source CIDR block of packets. IPv4 and IPv6 addresses are supported.

10.72.0.0/16

SrcPortRange

array

任意

The source port range that is used to match packets.

integer

任意

The source port range that is used to match packets.

23

TrafficMatchRuleName

string

任意

The name of the traffic classification rule.

The name can be empty or 1 to 128 characters in length, and cannot start with http:// or https://.

test

AddressFamily

string

任意

The address family. Valid values: You can set the value to IPv4 or IPv6, or leave the value empty.

IPv6

レスポンスフィールド

フィールド

説明

object

The response.

RequestId

string

The ID of the request.

60BB11B2-7BF4-54DC-BCC9-F706E1EB02AC

成功レスポンス

JSONJSON

{
  "RequestId": "60BB11B2-7BF4-54DC-BCC9-F706E1EB02AC"
}

エラーコード

HTTP ステータスコード

エラーコード

エラーメッセージ

説明

400 InvalidTrafficMarkingPolicyId.NotFound TrafficMarkingPolicyId is not found.
400 IncorrectStatus.TrafficMarkingPolicy The status of TrafficMarkingPolicy is incorrect.
400 Duplicated.AddTrafficMatchRules The parameter AddTrafficMatchRules are duplicated.
400 Duplicated.DeleteTrafficMatchRulese The parameter DeleteTrafficMatchRules are duplicated.
400 InstanceExist.AddTrafficMatchRules The instance already exists.
400 Duplicated.AddTrafficMatchRulesAndDeleteTrafficMatchRules The same rule in AddTrafficMatchRules and DeleteTrafficMatchRules is not supported..
400 IllegalParam.DstPortRange The specified DstPortRange is illegal.
400 IllegalParam.SrcPortRange The specified SrcPortRange is illegal.
400 AttrMismatching.CidrAddressFamily Attribute SrcCidr or DstCidr of TrafficMarkRule does not match AddressFamily.
400 IllegalParam.AddressFamily AddressFamily is illegal.
400 AttrMismatching.SrcCidrDstCidr Attribute SrcCidr of TrafficMarkRule does not match DstCidr.
400 AttrMismatching.CidrProtocol Attribute SrcCidr or DstCidr of TrafficMarkRule does not match Protocol.
400 InvalidTransitRouterMode.NeedUpgrade TransitRouter need to upgrade.
400 OperationUnsupported.SrcPortRange Current TR version does not support setting source port range.
400 OperationUnsupported.DstPortRange Current TR version does not support setting destination port range.
400 OperationUnsupported.IPv6Cidr The traffic marking policy for current TR type does not support IPv6 CIDR.
400 IllegalParam.DstCidr DstCidr is illegal.
400 IllegalParam.SrcCidr SrcCidr is illegal.
400 InvalidParameter Invalid parameter.
400 Unauthorized The AccessKeyId is unauthorized.
400 MissingParam.TrafficMarkingPolicyId The parameter TrafficMarkingPolicyId is mandatory.
404 InvalidDeleteTrafficMatchRules.NotFound The specified DeleteTrafficMatchRules are not found.

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。