ALIYUN::VPC::TrafficQosRule

更新时间:
复制 MD 格式

The ALIYUN::VPC::TrafficQosRule resource creates a QoS rule.

Syntax

{
  "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
  }
}

Properties

Parameter

Type

Required

Updatable

Description

Constraints

Priority

Integer

Yes

Yes

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 within a QoS policy.

Protocol

String

Yes

Yes

The protocol type of the QoS rule.

Valid values:

  • ALL

  • ICMP(IPv4)

  • ICMPv6(IPv6)

  • TCP

  • UDP

  • GRE

  • SSH

  • Telnet

  • HTTP

  • HTTPS

  • MS SQL

  • Oracle

  • MySql

  • RDP

  • PostgreSQL

  • Redis

QosId

String

Yes

No

The ID of the QoS policy.

None

QueueId

String

Yes

No

The ID of the QoS queue.

None

DstCidr

String

No

Yes

The destination IPv4 CIDR block to match.

None

DstIpv6Cidr

String

No

Yes

The destination IPv6 CIDR block to match.

None

DstPortRange

String

No

Yes

The destination port range to match.

Valid values: 0 to 65535. To match any port, set the value to -1/-1. Only a single port is supported. The start and end port numbers must be the same. The destination port range is fixed for the following protocol types:

  • ALL: -1/-1, non-editable.

  • ICMP(IPv4): -1/-1, non-editable.

  • ICMPv6(IPv6): -1/-1, non-editable.

  • TCP: -1/-1, editable.

  • UDP: -1/-1, editable.

  • GRE: -1/-1, non-editable.

  • SSH: 22/22, non-editable.

  • Telnet: 23/23, non-editable.

  • HTTP: 80/80, non-editable.

  • HTTPS: 443/443, non-editable.

  • MS SQL: 1433/1433, non-editable.

  • 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.

MatchDscp

Integer

No

Yes

The Differentiated Services Code Point (DSCP) value to match.

Valid values: 0 to 63. To disable DSCP matching, set this to -1.

RemarkingDscp

Integer

No

Yes

The new DSCP value to apply to matched traffic.

Valid values: 0 to 63. To leave the original DSCP value unchanged, set this to -1.

RuleDescription

String

No

Yes

The description of the QoS rule.

The description must be 0 to 256 characters long and cannot start with http:// or https://.

RuleName

String

No

Yes

The name of the QoS rule.

The name must be 0 to 128 characters long and cannot start with http:// or https://.

SrcCidr

String

No

Yes

The source IPv4 CIDR block to match.

None

SrcIpv6Cidr

String

No

Yes

The source IPv6 CIDR block to match.

None

SrcPortRange

String

No

Yes

The source port range to match.

Valid values: 0 to 65535. To match any port, set the value to -1/-1. Only a single port is supported. The start and end port numbers must be the same.

Return values

Fn::GetAtt

  • RuleDescription: The description of the QoS rule.

  • DstIpv6Cidr: The matched destination IPv6 CIDR block.

  • MatchDscp: The matched DSCP value. Valid values: 0 to 63. A value of -1 means no DSCP value is matched.

  • Priority: 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 within a QoS policy.

  • RuleId: The ID of the QoS rule.

  • QueueId: The ID of the QoS queue.

  • SrcIpv6Cidr: The matched source IPv6 CIDR block.

  • DstPortRange: The matched destination port range. Valid values: 0 to 65535. A value of -1/-1 means no port is matched. Only single ports are supported, where the start and end port numbers must be the same. The destination port range is fixed for some protocol types.

  • RemarkingDscp: The new DSCP value applied to the traffic. Valid values: 0 to 63. A value of -1 means the original DSCP value is retained.

  • SrcCidr: The matched source IPv4 CIDR block.

  • QosId: The ID of the QoS policy.

  • Protocol: The protocol type of the QoS rule.

  • SrcPortRange: The matched source port range. Valid values: 0 to 65535. A value of -1/-1 means no port is matched. Only single ports are supported, where the start and end port numbers must be the same.

  • DstCidr: The matched destination IPv4 CIDR block.

  • RuleName: The name of the QoS rule.

Example

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DstCidr:
    Type: String
    Description:
      en: |-
        The destination IPv4 CIDR block to match.
        > You must specify at least one of `SrcCidr`, `DstCidr`, `SrcIpv6Cidr`, or `DstIpv6Cidr`.
    Default: Null
    Required: false
  QueueId:
    Type: String
    Description:
      en: The ID of the QoS queue.
    Required: true
  Protocol:
    Type: String
    Description:
      en: |-
        The protocol type of the QoS rule. Valid values:
        - **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
      - PostgreSQL
      - Redis
    Required: true
  SrcCidr:
    Type: String
    Description:
      en: |-
        The source IPv4 CIDR block to match.
        > You must specify at least one of `SrcCidr`, `DstCidr`, `SrcIpv6Cidr`, or `DstIpv6Cidr`.
    Default: Null
    Required: false
  MatchDscp:
    Type: Number
    Description:
      en: 'The DSCP value to match. Valid values: 0 to 63. Set to -1 to disable DSCP matching.'
    MinValue: 0
    MaxValue: 63
    Default: Null
    Required: false
  DstPortRange:
    Type: String
    Description:
      en: |-
        The destination port range to match. Valid values: 0 to 65535. Set to -1/-1 to match any port. Only single ports are supported; the start and end port numbers must be the same. The destination port range is fixed for the following protocol types:
        - **ALL**: -1/-1, non-editable.
        - **ICMP(IPv4)**: -1/-1, non-editable.
        - **ICMPv6(IPv6)**: -1/-1, non-editable.
        - **TCP**: -1/-1, editable.
        - **UDP**: -1/-1, editable.
        - **GRE**: -1/-1, non-editable.
        - **SSH**: 22/22, non-editable.
        - **Telnet**: 23/23, non-editable.
        - **HTTP**: 80/80, non-editable.
        - **HTTPS**: 443/443, non-editable.
        - **MS SQL**: 1433/1433, non-editable.
        - **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 within the same QoS policy.'
    MinValue: 1
    MaxValue: 9000
    Required: true
  SrcIpv6Cidr:
    Type: String
    Description:
      en: |-
        The source IPv6 CIDR block to match.
        > You must specify at least one of `SrcCidr`, `DstCidr`, `SrcIpv6Cidr`, or `DstIpv6Cidr`.
    Default: Null
    Required: false
  DstIpv6Cidr:
    Type: String
    Description:
      en: |-
        The destination IPv6 CIDR block to match.
        > You must specify at least one of `SrcCidr`, `DstCidr`, `SrcIpv6Cidr`, or `DstIpv6Cidr`.
    Default: Null
    Required: false
  QosId:
    Type: String
    Description:
      en: The ID of the QoS policy.
    Required: true
  SrcPortRange:
    Type: String
    Description:
      en: 'The source port range to match. Valid values: 0 to 65535. Set to -1/-1 to match any port. Only single ports are supported; the start and end port numbers must be the same.'
    Default: Null
    Required: false
  RuleName:
    Type: String
    Description:
      en: |-
        The name of the QoS rule.
        The name must be 0 to 128 characters in length and cannot start with 'http://' or 'https://'.
    MinLength: 0
    MaxLength: 128
    Default: Null
    Required: false
  RemarkingDscp:
    Type: Number
    Description:
      en: 'The new DSCP value to apply to matched traffic. Valid values: 0 to 63. To leave the original DSCP value unchanged, set this to -1.'
    MinValue: 0
    MaxValue: 63
    Default: Null
    Required: false
  RuleDescription:
    Type: String
    Description:
      en: |-
        The description of the QoS rule.
        The description must be 0 to 256 characters in length 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 matched destination IPv4 CIDR block.
  QueueId:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - QueueId
    Description: The ID of the QoS queue.
  Protocol:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Protocol
    Description: The protocol type of the QoS rule.
  RuleId:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RuleId
    Description: The ID of the QoS rule.
  SrcCidr:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SrcCidr
    Description: The matched source IPv4 CIDR block.
  MatchDscp:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - MatchDscp
    Description: 'The matched DSCP value. Valid values: 0 to 63. A value of -1 means no DSCP value is matched.'
  DstPortRange:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DstPortRange
    Description: 'The matched destination port range. Valid values: 0 to 65535. A value of -1/-1 means no port is matched. Only single ports are supported, where the start and end port numbers must be the same. The destination port range is fixed for some protocol types.'
  Priority:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Priority
    Description: '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 within a QoS policy.'
  SrcIpv6Cidr:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SrcIpv6Cidr
    Description: The matched source IPv6 CIDR block.
  DstIpv6Cidr:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - DstIpv6Cidr
    Description: The matched destination IPv6 CIDR block.
  QosId:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - QosId
    Description: The ID of the QoS policy.
  SrcPortRange:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SrcPortRange
    Description: 'The matched source port range. Valid values: 0 to 65535. A value of -1/-1 means no port is matched. Only single ports are supported, where the start and end port numbers must be the same.'
  RuleName:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RuleName
    Description: The name of the QoS rule.
  RemarkingDscp:
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RemarkingDscp
    Description: 'The new DSCP value applied to the traffic. Valid values: 0 to 63. A value of -1 means the original DSCP value is retained.'
  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 to match.\n> You must specify at least one of `SrcCidr`, `DstCidr`, `SrcIpv6Cidr`, or `DstIpv6Cidr`."
      },
      "Default": null,
      "Required": false
    },
    "QueueId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the QoS queue."
      },
      "Required": true
    },
    "Protocol": {
      "Type": "String",
      "Description": {
        "en": "The protocol type of the QoS rule. Valid values:\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",
        "PostgreSQL",
        "Redis"
      ],
      "Required": true
    },
    "SrcCidr": {
      "Type": "String",
      "Description": {
        "en": "The source IPv4 CIDR block to match.\n> You must specify at least one of `SrcCidr`, `DstCidr`, `SrcIpv6Cidr`, or `DstIpv6Cidr`."
      },
      "Default": null,
      "Required": false
    },
    "MatchDscp": {
      "Type": "Number",
      "Description": {
        "en": "The DSCP value to match. Valid values: 0 to 63. Set to -1 to disable DSCP matching."
      },
      "MinValue": 0,
      "MaxValue": 63,
      "Default": null,
      "Required": false
    },
    "DstPortRange": {
      "Type": "String",
      "Description": {
        "en": "The destination port range to match. Valid values: 0 to 65535. Set to -1/-1 to match any port. Only single ports are supported; the start and end port numbers must be the same. The destination port range is fixed for the following protocol types:\n- **ALL**: -1/-1, non-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, non-editable.\n- **SSH**: 22/22, non-editable.\n- **Telnet**: 23/23, non-editable.\n- **HTTP**: 80/80, non-editable.\n- **HTTPS**: 443/443, non-editable.\n- **MS SQL**: 1433/1433, non-editable.\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 within the same QoS policy."
      },
      "MinValue": 1,
      "MaxValue": 9000,
      "Required": true
    },
    "SrcIpv6Cidr": {
      "Type": "String",
      "Description": {
        "en": "The source IPv6 CIDR block to match.\n> You must specify at least one of `SrcCidr`, `DstCidr`, `SrcIpv6Cidr`, or `DstIpv6Cidr`."
      },
      "Default": null,
      "Required": false
    },
    "DstIpv6Cidr": {
      "Type": "String",
      "Description": {
        "en": "The destination IPv6 CIDR block to match.\n> You must specify at least one of `SrcCidr`, `DstCidr`, `SrcIpv6Cidr`, or `DstIpv6Cidr`."
      },
      "Default": null,
      "Required": false
    },
    "QosId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the QoS policy."
      },
      "Required": true
    },
    "SrcPortRange": {
      "Type": "String",
      "Description": {
        "en": "The source port range to match. Valid values: 0 to 65535. Set to -1/-1 to match any port. Only single ports are supported; the start and end port numbers must be the same."
      },
      "Default": null,
      "Required": false
    },
    "RuleName": {
      "Type": "String",
      "Description": {
        "en": "The name of the QoS rule.\nThe name must be 0 to 128 characters in length and cannot start with 'http://' or 'https://'."
      },
      "MinLength": 0,
      "MaxLength": 128,
      "Default": null,
      "Required": false
    },
    "RemarkingDscp": {
      "Type": "Number",
      "Description": {
        "en": "The new DSCP value to apply to matched traffic. Valid values: 0 to 63. To leave the original DSCP value unchanged, set this to -1."
      },
      "MinValue": 0,
      "MaxValue": 63,
      "Default": null,
      "Required": false
    },
    "RuleDescription": {
      "Type": "String",
      "Description": {
        "en": "The description of the QoS rule.\nThe description must be 0 to 256 characters in length 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 matched destination IPv4 CIDR block."
    },
    "QueueId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "QueueId"
        ]
      },
      "Description": "The ID of the QoS queue."
    },
    "Protocol": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Protocol"
        ]
      },
      "Description": "The protocol type of the QoS rule."
    },
    "RuleId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RuleId"
        ]
      },
      "Description": "The ID of the QoS rule."
    },
    "SrcCidr": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SrcCidr"
        ]
      },
      "Description": "The matched source IPv4 CIDR block."
    },
    "MatchDscp": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "MatchDscp"
        ]
      },
      "Description": "The matched DSCP value. Valid values: 0 to 63. A value of -1 means no DSCP value is matched."
    },
    "DstPortRange": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DstPortRange"
        ]
      },
      "Description": "The matched destination port range. Valid values: 0 to 65535. A value of -1/-1 means no port is matched. Only single ports are supported, where the start and end port numbers must be the same. The destination port range is fixed for some protocol types."
    },
    "Priority": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Priority"
        ]
      },
      "Description": "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 within a QoS policy."
    },
    "SrcIpv6Cidr": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SrcIpv6Cidr"
        ]
      },
      "Description": "The matched source IPv6 CIDR block."
    },
    "DstIpv6Cidr": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "DstIpv6Cidr"
        ]
      },
      "Description": "The matched destination IPv6 CIDR block."
    },
    "QosId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "QosId"
        ]
      },
      "Description": "The ID of the QoS policy."
    },
    "SrcPortRange": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SrcPortRange"
        ]
      },
      "Description": "The matched source port range. Valid values: 0 to 65535. A value of -1/-1 means no port is matched. Only single ports are supported, where the start and end port numbers must be the same."
    },
    "RuleName": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RuleName"
        ]
      },
      "Description": "The name of the QoS rule."
    },
    "RemarkingDscp": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RemarkingDscp"
        ]
      },
      "Description": "The new DSCP value applied to the traffic. Valid values: 0 to 63. A value of -1 means the original DSCP value is retained."
    },
    "RuleDescription": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RuleDescription"
        ]
      },
      "Description": "The description of the QoS rule."
    }
  }
}