呼叫AddSourcesToTrafficMirrorSession介面為鏡像工作階段增加鏡像源。
介面說明
- AddSourcesToTrafficMirrorSession 介面屬於非同步介面,即系統傳回一個請求 ID,但該鏡像源尚未增加成功,系統後台的增加任務仍在進行。您可以呼叫 ListTrafficMirrorSessions 查詢鏡像源的增加狀態:
當鏡像工作階段處於 Modifying 狀態時,表示鏡像源正在增加中。
當鏡像工作階段處於 Created 狀態時,表示鏡像源增加成功。
AddSourcesToTrafficMirrorSession 介面不支援並行為同一個鏡像工作階段增加鏡像源。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
vpc:AddSourcesToTrafficMirrorSession |
update |
*TrafficMirrorSession
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| ClientToken |
string |
否 |
用戶端 Token,用於保證請求的冪等性。 從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。ClientToken 只支援 ASCII 字元。 說明
若您未指定,則系統自動使用 API 請求的 RequestId 作為 ClientToken 標識。每次 API 請求的 RequestId 可能不一樣。 |
0c593ea1-3bea-11e9-b96b-88e9fe63**** |
| DryRun |
boolean |
否 |
是否只預檢此次請求,取值:
|
false |
| TrafficMirrorSessionId |
string |
是 |
需要增加鏡像源的鏡像工作階段執行個體 ID。 |
tms-j6cla50buc44ap8tu**** |
| TrafficMirrorSourceIds |
array |
是 |
需要增加的鏡像源的執行個體 ID,目前支援彈性網卡作為鏡像源。其中 N 的預設值為 1,即一個鏡像工作階段只支援新增一個鏡像源。 |
eni-j6ccmrl8z3xkvxgw**** |
|
string |
否 |
需要增加的鏡像源的執行個體 ID,目前支援彈性網卡作為鏡像源。其中 N 的預設值為 1,即一個鏡像工作階段只支援新增一個鏡像源。 |
eni-j6c8znm5l1yt4sox**** |
|
| RegionId |
string |
是 |
鏡像工作階段的所屬地域 ID。 您可以透過呼叫 DescribeRegions 介面取得地域 ID。 關於流量鏡像支援的地域,請參見流量鏡像概述。 |
cn-hongkong |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
87F70089-5B38-41A8-BAD8-0B55E2F8DC57 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "87F70089-5B38-41A8-BAD8-0B55E2F8DC57"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | IncorrectBusinessStatus.TrafficMirror | The business status of traffic mirror is incorrect. | |
| 400 | OptInRequired.TrafficMirror | You need to subscribe to the traffic mirror service first. | |
| 400 | DuplicatedParam.SourceInstanceIds | The parameter of source instance IDs contains duplicate values. | |
| 400 | ResourceNotFound.TrafficMirrorSession | The specified resource of traffic mirror session is not found. | |
| 400 | IncorrectStatus.TrafficMirrorSession | The status of traffic mirror session is incorrect. | |
| 400 | ResourceAlreadyAssociated.TrafficMirrorSource | The specified traffic mirror source and session are already associated. | |
| 400 | ResourceNotFound.NetworkInterface | The specified resource of %s is not found. | |
| 400 | ResourceNotFound.EcsInstance | The specified resource of ECS instance is not found. | |
| 400 | OperationDenied.EcsNotSupportTrafficMirror | The ECS instance does not support traffic mirroring. | |
| 400 | OperationDenied.DuplicateRole | The network interface must not be the source and the target of traffic mirror sessions at the same time. | |
| 400 | QuotaExceeded.NetworkInterfaceRelatedSession | The quota of the number of traffic mirror sessions related to one network interface is exceeded. | |
| 400 | OperationDenied.FreeNetworkInterface | The network interface is not attached to any ECS instance. | |
| 400 | QuotaExceeded.SourceNumPerSession | The quota of the number of traffic mirror sources per session is exceeded. | |
| 400 | QuotaExceeded.SourceNumPerTarget | The maximum number of traffic mirror sources for a target is exceeded. | |
| 400 | OperationUnsupported.BondingNetworkInterface | The specified traffic mirror source is bonding eni without slave. | |
| 400 | OperationDenied.UnsupportedTargetType | Traffic mirror target must be SLB if traffic mirror sources contain nat gateway network interface. | |
| 400 | OperationDenied.InvalidSourceBondEniType | The traffic mirroring source does not support the entered bond ENI type. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。