ALIYUN::SAG::QosPolicy类型用于创建QoS策略流分类规则。
语法
{
"Type": "ALIYUN::SAG::QosPolicy",
"Properties": {
"Description": String,
"EndTime": String,
"SourcePortRange": String,
"SourceCidr": String,
"Priority": Integer,
"StartTime": String,
"DestPortRange": String,
"DpiGroupIds": List,
"Name": String,
"DestCidr": String,
"DpiSignatureIds": List,
"QosId": String,
"IpProtocol": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Description | String | 否 | 是 | 规则的描述信息。 | 长度为1~512个字符,以英文字母或汉字开头,可包含英文字母、汉字、数字、下划线(_)和短划线(-)。 |
EndTime | String | 否 | 是 | 规则生效的结束时间。 | 满足ISO 8601标准,并使用UTC时间+8小时。格式为:YYYY-MM-DDThh:mm:ss+0800 。
|
SourcePortRange | String | 是 | 是 | 源端口范围。 | 取值范围:-1和1~65535。
取值示例:
|
SourceCidr | String | 是 | 是 | 源网段。 | 采用CIDR格式。取值示例:192.168.1.0/24。 |
Priority | Integer | 是 | 是 | 规则所属的限速规则优先级。 | 取值范围:1~3。
取值越小,优先级越高。 |
StartTime | String | 否 | 是 | 规则生效的开始时间。 | 满足ISO 8601标准,并使用UTC时间+8小时。格式为:YYYY-MM-DDThh:mm:ss+0800 。
|
DestPortRange | String | 是 | 是 | 目的端口范围。 | 取值范围:-1或1~65535。
取值示例:
|
DpiGroupIds | List | 否 | 是 | 应用组ID。 | 取值范围:1~100。
您可以调用ListDpiGroups接口查询应用组ID。 |
Name | String | 否 | 是 | 规则的名称。 | 长度为2~100个字符,以英文字母或汉字开头,可包含英文字母、汉字、数字、短划线(-)和下划线(_)。 |
DestCidr | String | 是 | 是 | 目的网段。 | 采用CIDR格式。取值示例:192.168.1.0/24。 |
DpiSignatureIds | List | 否 | 是 | 应用ID。 | 取值范围:1~100。
您可以调用ListDpiSignatures接口查询应用ID。 |
QosId | String | 是 | 否 | QoS策略的实例ID。 | 无 |
IpProtocol | String | 是 | 是 | 规则应用的协议类型。 | 规则支持的协议类型,请以控制台为准。 |
返回值
Fn::GetAtt
QosPolicyId:规则的实例ID。
示例
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"EndTime": {
"Type": "String",
"Description": "The time when the traffic classification rule becomes invalid.\nSpecify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss+0800 format.\nThe time must be in UTC+8.",
"Default": "2019-09-14T16:41:33+0800"
},
"SourcePortRange": {
"Type": "String",
"Description": "The range of source ports.\nValid values: 1 to 65535 and -1.\nSet this parameter in one of the following formats:\n1/200: a port range from 1 to 200\n80/80: port 80\n-1/-1: all ports",
"Default": "80/80"
},
"SourceCidr": {
"Type": "String",
"Description": "The range of the source IP addresses.\nSpecify the value of this parameter in CIDR notation. Example: 192.168.1.0/24.",
"Default": "10.10.10.0/24"
},
"Priority": {
"Type": "Number",
"Description": "The priority of the traffic throttling policy to which the traffic classification\nrule belongs.",
"Default": 3
},
"StartTime": {
"Type": "String",
"Description": "The time when the traffic classification rule takes effect.\nSpecify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss+0800 format.\nThe time must be in UTC+8.",
"Default": "2019-07-14T16:41:33+0800"
},
"DestPortRange": {
"Type": "String",
"Description": "The range of destination ports.\nValid values: 1 to 65535 and -1.\nSet this parameter in one of the following formats:\n1/200: a port range from 1 to 200\n80/80: port 80\n-1/-1: all ports",
"Default": "80/80"
},
"DpiGroupIds": {
"Type": "Json",
"Description": "The ID of the application group.\nYou can enter at most 100 application group IDs at a time.\nYou can call the ListDpiGroups operation to query application group IDs and information about the applications.",
"MaxLength": 100,
"Default": ["20"]
},
"Name": {
"Type": "String",
"Description": "The name of the traffic classification rule.\nThe name must be 2 to 100 characters in length, and can contain digits, underscores\n(_), and hyphens (-). It must start with a letter.",
"Default": "test"
},
"DestCidr": {
"Type": "String",
"Description": "The range of the destination IP addresses.\nSpecify the value of this parameter in CIDR notation. Example: 192.168.10.0/24.",
"Default": "10.10.20.0/24"
},
"DpiSignatureIds": {
"Type": "Json",
"Description": "The ID of the application.\nYou can enter at most 100 application IDs at a time.\nYou can call the ListDpiSignatures operation to query application IDs and information about the applications.",
"MaxLength": 100,
"Default": ["1"]
},
"QosId": {
"Type": "String",
"Description": "The ID of the QoS policy.",
"Default": "qos-xitd8690ucu8ro****"
},
"IpProtocol": {
"Type": "String",
"Description": "The type of the protocol that applies to the traffic classification rule.\nThe supported protocols provided in this topic are for reference only. The actual\nprotocols in the console shall prevail.",
"Default": "TCP"
}
},
"Resources": {
"QosPolicy": {
"Type": "ALIYUN::SAG::QosPolicy",
"Properties": {
"EndTime": {
"Ref": "EndTime"
},
"SourcePortRange": {
"Ref": "SourcePortRange"
},
"SourceCidr": {
"Ref": "SourceCidr"
},
"Priority": {
"Ref": "Priority"
},
"StartTime": {
"Ref": "StartTime"
},
"DestPortRange": {
"Ref": "DestPortRange"
},
"DpiGroupIds": {
"Ref": "DpiGroupIds"
},
"Name": {
"Ref": "Name"
},
"DestCidr": {
"Ref": "DestCidr"
},
"DpiSignatureIds": {
"Ref": "DpiSignatureIds"
},
"QosId": {
"Ref": "QosId"
},
"IpProtocol": {
"Ref": "IpProtocol"
}
}
}
},
"Outputs": {
"QosPolicyId": {
"Description": "The ID of the traffic classification rule.",
"Value": {
"Fn::GetAtt": [
"QosPolicy",
"QosPolicyId"
]
}
}
}
}