ALIYUN::VPC::TrafficQosRule

更新时间:
复制为 MD 格式

ALIYUN::VPC::TrafficQosRule类型用于创建高速通道QoS规则。

语法

{
  "Type": "ALIYUN::VPC::TrafficQosRule",
  "Properties": {
    "Priority": Integer,
    "Protocol": String,
    "QueueId": String,
    "QosId": String,
    "DstIpv6Cidr": String,
    "DstPortRange": String,
    "DstCidr": String,
    "MatchDscp": Integer,
    "RuleDescription": String,
    "RemarkingDscp": Integer,
    "RuleName": String,
    "SrcIpv6Cidr": String,
    "SrcCidr": String,
    "SrcPortRange": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Priority

Integer

QoS规则的优先级。

取值:1~9000。数值越大优先级越高。同一QoS策略内每个QoS规则的优先级必须唯一。

Protocol

String

QoS规则协议类型,

取值:

  • ALL

  • ICMP(IPv4)

  • ICMPv6(IPv6)

  • TCP

  • UDP

  • GRE

  • SSH

  • Telnet

  • HTTP

  • HTTPS

  • MS SQL

  • Oracle

  • MySql

  • RDP

  • PostgreSQL

  • Redis

QosId

String

QoS策略ID。

QueueId

String

QoS队列ID。

DstCidr

String

QoS规则流量匹配的目的IPv4 CIDR网段。

DstIpv6Cidr

String

QoS规则流量匹配的目的IPv6网段。

DstPortRange

String

QoS规则流量匹配的目的端口号范围。

取值范围:0~65535,如果不匹配时取值为-1。当前只支持指定单个端口号,端口号的起始和终止需要相同。不同的协议类型,对应的目的端口号范围是固定的,取值如下:

  • ALL:-1/-1,不可编辑。

  • ICMP(IPv4):-1/-1,不可编辑。

  • ICMPv6(IPv6):-1/-1,不可编辑。

  • TCP:-1/-1,可编辑。

  • UDP:-1/-1,可编辑。

  • GRE:-1/-1,不可编辑。

  • SSH:22/22,不可编辑。

  • Telnet:23/23,不可编辑。

  • HTTP:80/80,不可编辑。

  • HTTPS:443/443,不可编辑。

  • MS SQL:1443/1443,不可编辑。

  • Oracle:1521/1521,不可编辑。

  • MySql:3306/3306,不可编辑。

  • RDP:3389/3389,不可编辑。

  • PostgreSQL:5432/5432,不可编辑。

  • Redis:6379/6379,不可编辑。

MatchDscp

Integer

QoS规则流量匹配的DSCP值。

取值:0~63。如果没有匹配值,值为-1。

RemarkingDscp

Integer

新的DSCP值。

取值:0~63。如果不修改值,设置为-1。

RuleDescription

String

QoS规则的描述。

长度为0~256个字符,不能以'http://'或'https://'开头。

RuleName

String

QoS规则的名称。

长度为0~128个字符,不能以'http://'或'https://'开头。

SrcCidr

String

QoS规则流量匹配的源IPv4 CIDR网段。

SrcIpv6Cidr

String

QoS规则流量匹配的源IPv6网段。

SrcPortRange

String

QoS规则流量匹配的源端口号范围。

取值范围:0~65535,当不匹配时取值为-1。当前只支持指定单个端口号,端口号的起始和终止需要相同。

返回值

Fn::GetAtt

  • RuleDescription:QoS规则的描述。

  • DstIpv6Cidr:QoS规则流量匹配的目的IPv6网段。

  • MatchDscp:QoS规则流量匹配的DSCP值。取值范围为**0**~**63**。如果不匹配,值为-1。

  • Priority:QoS规则优先级。取值范围为**1**~**9000**。数值越大优先级越高。同一QoS策略内QoS规则的优先级不能重复。

  • RuleId:QoS规则ID。

  • QueueId:QoS队列ID。

  • SrcIpv6Cidr:QoS规则流量匹配的源IPv6网段。

  • DstPortRange:QoS规则流量匹配的目的端口号范围。取值范围为**0**~**65535**。如果不匹配,值为-1。目前仅支持单个端口号,端口起始和终止必须相同。不同协议类型对应的目的端口号范围固定。

  • RemarkingDscp:修改流量中的DSCP值。取值范围为**0**~**63**。如果不修改值,值为-1。

  • SrcCidr:QoS规则流量匹配的源IPv4 CIDR网段。

  • QosId:QoS策略ID。

  • Protocol:QoS规则协议类型。

  • SrcPortRange:QoS规则流量匹配的源端口号范围。取值范围为**0**~**65535**。如果流量不匹配,值为-1。目前仅支持单个端口号,端口起始和终止必须相同。

  • DstCidr:QoS规则流量匹配的目的IPv4 CIDR网段。

  • RuleName:QoS规则的名称。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DstCidr:
    Type: String
    Description:
      en: |-
        The destination IPv4 CIDR block that matches the QoS rule traffic.
        > If this parameter is not supported, enter **SrcIPv6Cidr** or **DstIPv6Cidr * *.
    Default: Null
    Required: false
  QueueId:
    Type: String
    Description:
      en: The QoS queue ID.
    Required: true
  Protocol:
    Type: String
    Description:
      en: |-
        QoS rule protocol type, value:
        - **ALL**
        - **ICMP(IPv4)**
        - **ICMPv6(IPv6)* *
        - **TCP**
        - **UDP**
        - **GRE**
        - **SSH**
        - **Telnet**
        - **HTTP**
        - **HTTPS**
        - **MS SQL**
        - **Oracle**
        - **MySql**
        - **RDP**
        - **PostgreSQL**
        - **Redis**.
    AllowedValues:
      - ALL
      - ICMP(IPv4)
      - ICMPv6(IPv6)
      - TCP
      - UDP
      - GRE
      - SSH
      - Telnet
      - HTTP
      - HTTPS
      - MS SQL
      - Oracle
      - MySql
      - RDP
      - Postgre SQL
      - Redis
    Required: true
  SrcCidr:
    Type: String
    Description:
      en: |-
        The source IPv4 CIDR block that matches the QoS rule traffic.
        > If this parameter is not supported, enter **SrcIPv6Cidr** or **DstIPv6Cidr * *.
    Default: Null
    Required: false
  MatchDscp:
    Type: Number
    Description:
      en: 'The DSCP value that matches the QoS rule traffic. Valid values: 0 to 63. If no value is matched, the value is -1.'
    MinValue: 0
    MaxValue: 63
    Default: Null
    Required: false
  DstPortRange:
    Type: String
    Description:
      en: |-
        QoS rule traffic matches the destination port number range. Value range: **0** to **65535**. If not, the value is -1. Currently, only a single port number is supported, and the start and end of the port number must be the same. The corresponding destination port number range is fixed for different protocol types. The values are as follows:
        - **ALL**:-1/-1, not editable.
        - **ICMP(IPv4)**:-1/-1, non-editable.
        - **ICMPv6(IPv6)**:-1/-1, non-editable.
        - **TCP**:-1/-1, editable.
        - **UDP**:-1/-1, editable.
        - **GRE**:-1/-1, not editable.
        - **SSH**:22/22, not editable.
        - **Telnet**:23/23, not editable.
        - **HTTP**:80/80, non-editable.
        - **HTTPS**:443/443, which cannot be edited.
        - **MS SQL**:1443/1443, which cannot be edited.
        - **Oracle**:1521/1521, non-editable.
        - **MySql**:3306/3306, non-editable.
        - **RDP**:3389/3389, non-editable.
        - **PostgreSQL**:5432/5432, non-editable.
        - **Redis**:6379/6379, non-editable.
    Default: Null
    Required: false
  Priority:
    Type: Number
    Description:
      en: 'The priority of the QoS rule. Valid values: 1 to 9000. A larger value indicates a higher priority. The priority of each QoS rule must be unique in the same QoS policy.'
    MinValue: 1
    MaxValue: 9000
    Required: true
  SrcIpv6Cidr:
    Type: String
    Description:
      en: |-
        The QoS rule traffic matches the source IPv6 network segment.
        > If this parameter is not supported, enter **SrcCidr** or **DstCidr * *.
    Default: Null
    Required: false
  DstIpv6Cidr:
    Type: String
    Description:
      en: |-
        The QoS rule traffic matches the Destination IPv6 network segment.
        > If this parameter is not supported, enter **SrcCidr** or **DstCidr * *.
    Default: Null
    Required: false
  QosId:
    Type: String
    Description:
      en: The QoS policy ID.
    Required: true
  SrcPortRange:
    Type: String
    Description:
      en: The source port number of the QoS rule traffic matching. The value range is **0** to **65535**. If the traffic does not match, the value is -1. Currently, only a single port number is supported, and the start and end of the port number must be the same.
    Default: Null
    Required: false
  RuleName:
    Type: String
    Description:
      en: |-
        The name of the QoS rule.
        The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
    MinLength: 0
    MaxLength: 128
    Default: Null
    Required: false
  RemarkingDscp:
    Type: Number
    Description:
      en: 'The new DSCP value. Valid values: 0 to 63. If you do not change the value, set the value to -1.'
    MinValue: 0
    MaxValue: 63
    Default: Null
    Required: false
  RuleDescription:
    Type: String
    Description:
      en: |-
        The description of the QoS rule.
        The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
    MinLength: 0
    MaxLength: 256
    Default: Null
    Required: false
Resources:
  ExtensionResource:
    Type: ALIYUN::VPC::TrafficQosRule
    Properties:
      DstCidr:
        Ref: DstCidr
      QueueId:
        Ref: QueueId
      Protocol:
        Ref: Protocol
      SrcCidr:
        Ref: SrcCidr
      MatchDscp:
        Ref: MatchDscp
      DstPortRange:
        Ref: DstPortRange
      Priority:
        Ref: Priority
      SrcIpv6Cidr:
        Ref: SrcIpv6Cidr
      DstIpv6Cidr:
        Ref: DstIpv6Cidr
      QosId:
        Ref: QosId
      SrcPortRange:
        Ref: SrcPortRange
      RuleName:
        Ref: RuleName
      RemarkingDscp:
        Ref: RemarkingDscp
      RuleDescription:
        Ref: RuleDescription
Outputs:
  DstCidr:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DstCidr
    Description: The destination IPv4 CIDR block that matches the QoS rule traffic.
  QueueId:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - QueueId
    Description: The QoS queue ID.
  Protocol:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Protocol
    Description: QoS rule protocol type.
  RuleId:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RuleId
    Description: The ID of the QoS rule.
  SrcCidr:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SrcCidr
    Description: The source IPv4 CIDR block that matches the QoS rule traffic.
  MatchDscp:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - MatchDscp
    Description: 'The DSCP value of the traffic matched by the QoS rule. Value range: **0** to **63**. If not, the value is -1.'
  DstPortRange:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DstPortRange
    Description: 'QoS rule traffic matches the destination port number range. Value range: **0** to **65535**. If not, the value is -1. Currently, only a single port number is supported, and the start and end of the port number must be the same. The corresponding destination port number range is fixed for different protocol types.'
  Priority:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Priority
    Description: 'QoS rule priority. Value range: **1** to **9000**. The larger the number, the higher the priority. The priority of a QoS rule cannot be repeated in the same QoS policy.'
  SrcIpv6Cidr:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SrcIpv6Cidr
    Description: The QoS rule traffic matches the source IPv6 network segment.
  DstIpv6Cidr:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DstIpv6Cidr
    Description: The QoS rule traffic matches the Destination IPv6 network segment.
  QosId:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - QosId
    Description: The QoS policy ID.
  SrcPortRange:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SrcPortRange
    Description: The source port number of the QoS rule traffic matching. The value range is **0** to **65535**. If the traffic does not match, the value is -1. Currently, only a single port number is supported, and the start and end of the port number must be the same.
  RuleName:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RuleName
    Description: The name of the QoS rule.
  RemarkingDscp:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RemarkingDscp
    Description: 'Modify The DSCP value in the flow. Value range: **0** to **63**. If the value is not modified, the value is -1.'
  RuleDescription:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RuleDescription
    Description: The description of the QoS rule.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DstCidr": {
      "Type": "String",
      "Description": {
        "en": "The destination IPv4 CIDR block that matches the QoS rule traffic.\n> If this parameter is not supported, enter **SrcIPv6Cidr** or **DstIPv6Cidr * *."
      },
      "Default": null,
      "Required": false
    },
    "QueueId": {
      "Type": "String",
      "Description": {
        "en": "The QoS queue ID."
      },
      "Required": true
    },
    "Protocol": {
      "Type": "String",
      "Description": {
        "en": "QoS rule protocol type, value:\n- **ALL**\n- **ICMP(IPv4)**\n- **ICMPv6(IPv6)* *\n- **TCP**\n- **UDP**\n- **GRE**\n- **SSH**\n- **Telnet**\n- **HTTP**\n- **HTTPS**\n- **MS SQL**\n- **Oracle**\n- **MySql**\n- **RDP**\n- **PostgreSQL**\n- **Redis**."
      },
      "AllowedValues": [
        "ALL",
        "ICMP(IPv4)",
        "ICMPv6(IPv6)",
        "TCP",
        "UDP",
        "GRE",
        "SSH",
        "Telnet",
        "HTTP",
        "HTTPS",
        "MS SQL",
        "Oracle",
        "MySql",
        "RDP",
        "Postgre SQL",
        "Redis"
      ],
      "Required": true
    },
    "SrcCidr": {
      "Type": "String",
      "Description": {
        "en": "The source IPv4 CIDR block that matches the QoS rule traffic.\n> If this parameter is not supported, enter **SrcIPv6Cidr** or **DstIPv6Cidr * *."
      },
      "Default": null,
      "Required": false
    },
    "MatchDscp": {
      "Type": "Number",
      "Description": {
        "en": "The DSCP value that matches the QoS rule traffic. Valid values: 0 to 63. If no value is matched, the value is -1."
      },
      "MinValue": 0,
      "MaxValue": 63,
      "Default": null,
      "Required": false
    },
    "DstPortRange": {
      "Type": "String",
      "Description": {
        "en": "QoS rule traffic matches the destination port number range. Value range: **0** to **65535**. If not, the value is -1. Currently, only a single port number is supported, and the start and end of the port number must be the same. The corresponding destination port number range is fixed for different protocol types. The values are as follows:\n- **ALL**:-1/-1, not editable.\n- **ICMP(IPv4)**:-1/-1, non-editable.\n- **ICMPv6(IPv6)**:-1/-1, non-editable.\n- **TCP**:-1/-1, editable.\n- **UDP**:-1/-1, editable.\n- **GRE**:-1/-1, not editable.\n- **SSH**:22/22, not editable.\n- **Telnet**:23/23, not editable.\n- **HTTP**:80/80, non-editable.\n- **HTTPS**:443/443, which cannot be edited.\n- **MS SQL**:1443/1443, which cannot be edited.\n- **Oracle**:1521/1521, non-editable.\n- **MySql**:3306/3306, non-editable.\n- **RDP**:3389/3389, non-editable.\n- **PostgreSQL**:5432/5432, non-editable.\n- **Redis**:6379/6379, non-editable."
      },
      "Default": null,
      "Required": false
    },
    "Priority": {
      "Type": "Number",
      "Description": {
        "en": "The priority of the QoS rule. Valid values: 1 to 9000. A larger value indicates a higher priority. The priority of each QoS rule must be unique in the same QoS policy."
      },
      "MinValue": 1,
      "MaxValue": 9000,
      "Required": true
    },
    "SrcIpv6Cidr": {
      "Type": "String",
      "Description": {
        "en": "The QoS rule traffic matches the source IPv6 network segment.\n> If this parameter is not supported, enter **SrcCidr** or **DstCidr * *."
      },
      "Default": null,
      "Required": false
    },
    "DstIpv6Cidr": {
      "Type": "String",
      "Description": {
        "en": "The QoS rule traffic matches the Destination IPv6 network segment.\n> If this parameter is not supported, enter **SrcCidr** or **DstCidr * *."
      },
      "Default": null,
      "Required": false
    },
    "QosId": {
      "Type": "String",
      "Description": {
        "en": "The QoS policy ID."
      },
      "Required": true
    },
    "SrcPortRange": {
      "Type": "String",
      "Description": {
        "en": "The source port number of the QoS rule traffic matching. The value range is **0** to **65535**. If the traffic does not match, the value is -1. Currently, only a single port number is supported, and the start and end of the port number must be the same."
      },
      "Default": null,
      "Required": false
    },
    "RuleName": {
      "Type": "String",
      "Description": {
        "en": "The name of the QoS rule.\nThe length is 0 to 128 characters and cannot start with 'http:// 'or 'https."
      },
      "MinLength": 0,
      "MaxLength": 128,
      "Default": null,
      "Required": false
    },
    "RemarkingDscp": {
      "Type": "Number",
      "Description": {
        "en": "The new DSCP value. Valid values: 0 to 63. If you do not change the value, set the value to -1."
      },
      "MinValue": 0,
      "MaxValue": 63,
      "Default": null,
      "Required": false
    },
    "RuleDescription": {
      "Type": "String",
      "Description": {
        "en": "The description of the QoS rule.\nThe length is 0 to 256 characters and cannot start with 'http:// 'or 'https."
      },
      "MinLength": 0,
      "MaxLength": 256,
      "Default": null,
      "Required": false
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::VPC::TrafficQosRule",
      "Properties": {
        "DstCidr": {
          "Ref": "DstCidr"
        },
        "QueueId": {
          "Ref": "QueueId"
        },
        "Protocol": {
          "Ref": "Protocol"
        },
        "SrcCidr": {
          "Ref": "SrcCidr"
        },
        "MatchDscp": {
          "Ref": "MatchDscp"
        },
        "DstPortRange": {
          "Ref": "DstPortRange"
        },
        "Priority": {
          "Ref": "Priority"
        },
        "SrcIpv6Cidr": {
          "Ref": "SrcIpv6Cidr"
        },
        "DstIpv6Cidr": {
          "Ref": "DstIpv6Cidr"
        },
        "QosId": {
          "Ref": "QosId"
        },
        "SrcPortRange": {
          "Ref": "SrcPortRange"
        },
        "RuleName": {
          "Ref": "RuleName"
        },
        "RemarkingDscp": {
          "Ref": "RemarkingDscp"
        },
        "RuleDescription": {
          "Ref": "RuleDescription"
        }
      }
    }
  },
  "Outputs": {
    "DstCidr": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DstCidr"
        ]
      },
      "Description": "The destination IPv4 CIDR block that matches the QoS rule traffic."
    },
    "QueueId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "QueueId"
        ]
      },
      "Description": "The QoS queue ID."
    },
    "Protocol": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Protocol"
        ]
      },
      "Description": "QoS rule protocol type."
    },
    "RuleId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RuleId"
        ]
      },
      "Description": "The ID of the QoS rule."
    },
    "SrcCidr": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SrcCidr"
        ]
      },
      "Description": "The source IPv4 CIDR block that matches the QoS rule traffic."
    },
    "MatchDscp": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "MatchDscp"
        ]
      },
      "Description": "The DSCP value of the traffic matched by the QoS rule. Value range: **0** to **63**. If not, the value is -1."
    },
    "DstPortRange": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DstPortRange"
        ]
      },
      "Description": "QoS rule traffic matches the destination port number range. Value range: **0** to **65535**. If not, the value is -1. Currently, only a single port number is supported, and the start and end of the port number must be the same. The corresponding destination port number range is fixed for different protocol types."
    },
    "Priority": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Priority"
        ]
      },
      "Description": "QoS rule priority. Value range: **1** to **9000**. The larger the number, the higher the priority. The priority of a QoS rule cannot be repeated in the same QoS policy."
    },
    "SrcIpv6Cidr": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SrcIpv6Cidr"
        ]
      },
      "Description": "The QoS rule traffic matches the source IPv6 network segment."
    },
    "DstIpv6Cidr": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DstIpv6Cidr"
        ]
      },
      "Description": "The QoS rule traffic matches the Destination IPv6 network segment."
    },
    "QosId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "QosId"
        ]
      },
      "Description": "The QoS policy ID."
    },
    "SrcPortRange": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SrcPortRange"
        ]
      },
      "Description": "The source port number of the QoS rule traffic matching. The value range is **0** to **65535**. If the traffic does not match, the value is -1. Currently, only a single port number is supported, and the start and end of the port number must be the same."
    },
    "RuleName": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RuleName"
        ]
      },
      "Description": "The name of the QoS rule."
    },
    "RemarkingDscp": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RemarkingDscp"
        ]
      },
      "Description": "Modify The DSCP value in the flow. Value range: **0** to **63**. If the value is not modified, the value is -1."
    },
    "RuleDescription": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RuleDescription"
        ]
      },
      "Description": "The description of the QoS rule."
    }
  }
}