文档

ALIYUN::VPC::TrafficMirrorSession

更新时间:

ALIYUN::VPC::TrafficMirrorSession类型用于创建镜像会话。

语法

{
  "Type": "ALIYUN::VPC::TrafficMirrorSession",
  "Properties": {
    "TrafficMirrorTargetId": String,
    "ResourceGroupId": String,
    "VirtualNetworkId": Integer,
    "TrafficMirrorSourceIds": List,
    "Priority": Integer,
    "PacketLength": Integer,
    "Enabled": Boolean,
    "TrafficMirrorSessionDescription": String,
    "Tag": List,
    "TrafficMirrorSessionName": String,
    "TrafficMirrorFilterId": String,
    "TrafficMirrorTargetType": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

TrafficMirrorTargetId

String

镜像目的的实例ID。

目前支持弹性网卡和私网负载均衡实例作为镜像目的。

ResourceGroupId

String

流量镜像所属的资源组ID。

VirtualNetworkId

Integer

指定VNI(VXLAN Network Identifier)。

用来区分不同的镜像流量,取值范围为0~16777215。

您可以通过VNI在镜像目的区分不同会话的镜像流量。您可以自定义VNI的值,也可以由系统随机分配该值。如果由系统随机分配该值,请不要传该参数。

TrafficMirrorSourceIds

List

镜像源的实例ID。

目前支持弹性网卡作为镜像源。一个镜像会话只支持添加一个镜像源。

Priority

Integer

镜像会话的优先级。

取值范围为1~32766。 数字越小,优先级越高。同一账号在同一个地域创建的镜像会话优先级不能重复。

PacketLength

Integer

最大传输单元MTU(Maximum Transmission Unit)。

默认值为1500。

Enabled

Boolean

是否开启流量会话。

取值:

  • false(默认值):不开启流量会话。

  • true:开启流量会话。

TrafficMirrorSessionDescription

String

镜像会话的描述信息。

描述长度为1~256个字符,不能以http://https://开头。

Tag

List

镜像会话的标签。

最多支持添加20个标签。

更多信息,请参见Tag属性

TrafficMirrorSessionName

String

镜像会话的名称。

名称长度为1~128个字符,不能以http://https://开头。

TrafficMirrorFilterId

String

流量镜像筛选条件的实例ID。

TrafficMirrorTargetType

String

镜像目的类型。

取值:

  • NetworkInterface:弹性网卡。

  • SLB:私网负载均衡实例。

Tag语法

"Tag": [
  {
    "Value": String,
    "Key": String
  }
]

Tag属性

属性名称

类型

必须

允许更新

描述

约束

Value

String

标签值。

Key

String

标签键。

长度为0~128个字符,不能以aliyunacs:开头,不能包含http://或者https://

返回值

Fn::GetAtt

TrafficMirrorSessionId:镜像会话的实例ID。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      Priority:
        Description: 'The priority of the traffic mirror session. Valid values: **1 to 32766**.
            A smaller value indicates a higher priority. You cannot specify identical
            priorities for traffic mirror sessions that are created in the same region
            by using the same account.'
        MaxValue: 32766
        MinValue: 1
        Type: Number
        Default: 1
      TrafficMirrorFilterId:
        Description: The ID of the filter.
        Type: String
        Default: tmf-j6cmls82xnc86vtpe****
      TrafficMirrorSourceIds:
        AssociationProperty: List[Parameter]
        AssociationPropertyMetadata:
          Parameter:
            Description: The ID of the traffic mirror source. You can specify only an ENI as
                the traffic mirror source. The default value of N is 1, which means that
                you can add only one traffic mirror source to a traffic mirror session.
            Type: String
        Type: Json
        Default: [eni-j6c2fp57q8rr47rp****]
      TrafficMirrorTargetId:
        Description: The ID of the traffic mirror destination. You can specify only an elastic
            network interface (ENI) or a Server Load Balancer (SLB) instance as a traffic
            mirror destination.
        Type: String
        Default: eni-j6c8znm5l1yt4sox****
      TrafficMirrorTargetType:
        Description: 'The type of the traffic mirror destination. Valid values:
            - **NetworkInterface**: an ENI
            - **SLB**: an SLB instance'
        Type: String
        Default: NetworkInterface
    Resources:
      TrafficMirrorSession:
        Properties:
          Priority:
            Ref: Priority
          TrafficMirrorFilterId:
            Ref: TrafficMirrorFilterId
          TrafficMirrorSourceIds:
            Ref: TrafficMirrorSourceIds
          TrafficMirrorTargetId:
            Ref: TrafficMirrorTargetId
          TrafficMirrorTargetType:
            Ref: TrafficMirrorTargetType
        Type: ALIYUN::VPC::TrafficMirrorSession
    Outputs:
      TrafficMirrorSessionId:
        Description: The ID of the traffic mirror session.
        Value:
          Fn::GetAtt:
          - TrafficMirrorSession
          - TrafficMirrorSessionId
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "Priority": {
          "Description": "The priority of the traffic mirror session. Valid values: **1 to 32766**.\nA smaller value indicates a higher priority. You cannot specify identical priorities for traffic mirror sessions that are created in the same region by using the same account.",
          "MaxValue": 32766,
          "MinValue": 1,
          "Type": "Number",
          "Default": 1
        },
        "TrafficMirrorFilterId": {
          "Description": "The ID of the filter.",
          "Type": "String",
          "Default": "tmf-j6cmls82xnc86vtpe****"
        },
        "TrafficMirrorSourceIds": {
          "AssociationProperty": "List[Parameter]",
          "AssociationPropertyMetadata": {
            "Parameter": {
              "Description": "The ID of the traffic mirror source. You can specify only an ENI as the traffic mirror source. The default value of N is 1, which means that you can add only one traffic mirror source to a traffic mirror session.",
              "Type": "String"
            }
          },
          "Type": "Json",
          "Default": [
            "eni-j6c2fp57q8rr47rp****"
          ]
        },
        "TrafficMirrorTargetId": {
          "Description": "The ID of the traffic mirror destination. You can specify only an elastic network interface (ENI) or a Server Load Balancer (SLB) instance as a traffic mirror destination.",
          "Type": "String",
          "Default": "eni-j6c8znm5l1yt4sox****"
        },
        "TrafficMirrorTargetType": {
          "Description": "The type of the traffic mirror destination. Valid values: - **NetworkInterface**: an ENI - **SLB**: an SLB instance",
          "Type": "String",
          "Default": "NetworkInterface"
        }
      },
      "Resources": {
        "TrafficMirrorSession": {
          "Properties": {
            "Priority": {
              "Ref": "Priority"
            },
            "TrafficMirrorFilterId": {
              "Ref": "TrafficMirrorFilterId"
            },
            "TrafficMirrorSourceIds": {
              "Ref": "TrafficMirrorSourceIds"
            },
            "TrafficMirrorTargetId": {
              "Ref": "TrafficMirrorTargetId"
            },
            "TrafficMirrorTargetType": {
              "Ref": "TrafficMirrorTargetType"
            }
          },
          "Type": "ALIYUN::VPC::TrafficMirrorSession"
        }
      },
      "Outputs": {
        "TrafficMirrorSessionId": {
          "Description": "The ID of the traffic mirror session.",
          "Value": {
            "Fn::GetAtt": [
              "TrafficMirrorSession",
              "TrafficMirrorSessionId"
            ]
          }
        }
      }
    }
  • 本页导读 (1)
文档反馈