Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::DDoSPro::SchedulerRule

Última atualização: Jun 27, 2026

Cria uma regra de agendamento para o Sec-Traffic Manager.

Sintaxe

{
  "Type": "ALIYUN::DDoSPro::SchedulerRule",
  "Properties": {
    "ResourceGroupId": String,
    "Param": String,
    "RuleType": Integer,
    "Rules": String,
    "RuleName": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

RuleName

String

Sim

Não

Nome da regra de agendamento.

Nenhuma.

Rules

String

Sim

Não

Detalhes da regra de agendamento em formato de string JSON.

O valor de Rules contém os seguintes campos:

  • Type: tipo de endereço do recurso de interação na regra de agendamento. Obrigatório. String. Valores válidos:

    • A: endereço IP

    • CNAME: nome de domínio

  • Value: endereço do recurso de interação na regra de agendamento. Obrigatório. String.

  • Priority: prioridade da regra de agendamento. Obrigatório. Integer. Valores válidos: 0 a 100. Quanto maior o valor, maior a prioridade.

  • ValueType: tipo do recurso de interação na regra de agendamento. Obrigatório. Integer. Valores válidos:

    • 1: endereço IP de uma instância Anti-DDoS Proxy

    • 2: endereço IP de um recurso de interação em cenário de proteção em camadas

    • 3: endereço IP para acelerar o acesso em cenário de aceleração de rede

    • 5: nome de domínio configurado no Alibaba Cloud CDN (CDN) em cenário de interação com CDN

    • 6: endereço IP do recurso de interação em cenário de interação com serviço em nuvem

  • RegionId: ID da região. Obrigatório quando ValueType for 2. String.

RuleType

Integer

Sim

Não

Tipo da regra de agendamento.

Valores válidos:

  • 2: proteção em camadas

  • 3: aceleração de rede

  • 5: interação com CDN

  • 6: interação com serviço em nuvem

Param

String

Não

Não

Detalhes da regra de interação com CDN em formato de string JSON.

O valor de Param contém os seguintes campos:

  • ParamType: tipo da regra de agendamento. Obrigatório. String. Defina como cdn para especificar uma regra de interação com CDN.

  • ParamData: parâmetros da regra de interação com CDN. Obrigatório. Map. Contém os seguintes campos:

    • Domain: nome de domínio acelerado no CDN. Obrigatório. String.

    • Cname: CNAME atribuído ao nome de domínio acelerado. Obrigatório. String.

    • AccessQps: limiar de QPS para redirecionar o tráfego ao Anti-DDoS Proxy. Obrigatório. Integer. Se o QPS real exceder esse limiar, o sistema redireciona o tráfego ao Anti-DDoS Proxy.

    • UpstreamQps: limiar de QPS para retornar o tráfego ao CDN. Opcional. Integer. Se o QPS real ficar abaixo desse limiar, o sistema retorna o tráfego ao CDN.

Exemplo:

{"ParamType":"cdn","ParamData":{"Domain":"example.aliyundoc.com","Cname":"demo.aliyundoc.com","AccessQps":100,"UpstreamQps":100}}

ResourceGroupId

String

Não

Não

ID do grupo de recursos da instância Anti-DDoS Proxy.

Valor padrão: vazio (indica o grupo de recursos padrão).

Valores de retorno

Fn::GetAtt

RuleName: nome da regra de agendamento.

Exemplos

Formato YAML

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  RuleType:
    Type: Number
    Description:
      en: |-
        The type of the custom defense rule. Valid values: 
        2: tiered protection 
        3: network acceleration 
        5: CDN interaction 
        6: cloud service interaction
    Required: true
  Rules:
    Type: String
    Description:
      en: |-
        The details of the scheduling rule. This parameter is a JSON string. The following list describes the fields in the value of the parameter: 
        Type: the address type of the interaction resource that you want to use in the scheduling rule. This field is required and must be of the string type. Valid values: A: IP address. CNAME: domain name
        Value: the address of the interaction resource that you want to use in the scheduling rule. This field is required and must be of the string type.
        Priority: the priority of the scheduling rule. This field is required and must be of the integer type. Valid values: 0 to 100. A larger value indicates a higher priority.
        ValueType: the type of the interaction resource that you want to use in the scheduling rule. This field is required and must be of the integer type. Valid values: 1: the IP address of the Anti-DDoS Pro or Anti-DDoS Premium instance. 2: the IP address of the interaction resource in the tiered protection scenario. 3: the IP address that is used to accelerate access in the network acceleration scenario. 5: the domain name that is configured in Alibaba Cloud CDN (CDN) in the CDN interaction scenario. 6 the IP address of the interaction resource in the cloud service interaction scenario 
        RegionId: the region where the interaction resource is deployed. This parameter must be specified when ValueType is set to 2. The value must be of the string type.
    Required: true
  RuleName:
    Type: String
    Description:
      en: The name of the rule.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::DDoSPro::SchedulerRule
    Properties:
      RuleType:
        Ref: RuleType
      Rules:
        Ref: Rules
      RuleName:
        Ref: RuleName
Outputs:
  RuleName:
    Description: The name of the rule.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RuleName

Formato JSON

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "RuleType": {
      "Type": "Number",
      "Description": {
        "en": "The type of the custom defense rule. Valid values: \n2: tiered protection \n3: network acceleration \n5: CDN interaction \n6: cloud service interaction"
      },
      "Required": true
    },
    "Rules": {
      "Type": "String",
      "Description": {
        "en": "The details of the scheduling rule. This parameter is a JSON string. The following list describes the fields in the value of the parameter: \nType: the address type of the interaction resource that you want to use in the scheduling rule. This field is required and must be of the string type. Valid values: A: IP address. CNAME: domain name\nValue: the address of the interaction resource that you want to use in the scheduling rule. This field is required and must be of the string type.\nPriority: the priority of the scheduling rule. This field is required and must be of the integer type. Valid values: 0 to 100. A larger value indicates a higher priority.\nValueType: the type of the interaction resource that you want to use in the scheduling rule. This field is required and must be of the integer type. Valid values: 1: the IP address of the Anti-DDoS Pro or Anti-DDoS Premium instance. 2: the IP address of the interaction resource in the tiered protection scenario. 3: the IP address that is used to accelerate access in the network acceleration scenario. 5: the domain name that is configured in Alibaba Cloud CDN (CDN) in the CDN interaction scenario. 6 the IP address of the interaction resource in the cloud service interaction scenario \nRegionId: the region where the interaction resource is deployed. This parameter must be specified when ValueType is set to 2. The value must be of the string type."
      },
      "Required": true
    },
    "RuleName": {
      "Type": "String",
      "Description": {
        "en": "The name of the rule."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::DDoSPro::SchedulerRule",
      "Properties": {
        "RuleType": {
          "Ref": "RuleType"
        },
        "Rules": {
          "Ref": "Rules"
        },
        "RuleName": {
          "Ref": "RuleName"
        }
      }
    }
  },
  "Outputs": {
    "RuleName": {
      "Description": "The name of the rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RuleName"
        ]
      }
    }
  }
}