Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::DDoSPro::SceneDefensePolicy

Última atualização: Jun 27, 2026

O recurso ALIYUN::DDoSPro::SceneDefensePolicy crie uma política personalizada específica para cenários.

Sintaxe

{
  "Type": "ALIYUN::DDoSPro::SceneDefensePolicy",
  "Properties": {
    "EndTime": Integer,
    "StartTime": Integer,
    "Name": String,
    "Template": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

EndTime

Integer

Sim

Não

Horário de término da política.

Timestamp UNIX em milissegundos.

Name

String

Sim

Não

Nome da política.

Nenhuma.

StartTime

Integer

Sim

Não

Horário de início da política.

Timestamp UNIX em milissegundos.

Template

String

Sim

Não

Modelo da política.

Valores válidos:

  • promotion: modelo Atividade Importante.

  • bypass: modelo Encaminhar Tudo.

Valores de retorno

Fn::GetAtt

Name: nome da política.

Exemplos

Formato YAML

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  EndTime:
    Type: Number
    Description:
      en: 'The end time of the policy. This value is a UNIX timestamp. Units: milliseconds.'
    Required: true
  StartTime:
    Type: Number
    Description:
      en: 'The start time of the policy. This value is a UNIX timestamp. Units: milliseconds.'
    Required: true
  Template:
    Type: String
    Description:
      en: |-
        The template of the policy. Valid values:
        promotion: important activity
        bypass: all traffic forwarded
    AllowedValues:
      - promotion
      - bypass
    Required: true
  Name:
    Type: String
    Description:
      en: The name of the policy.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::DDoSPro::SceneDefensePolicy
    Properties:
      EndTime:
        Ref: EndTime
      StartTime:
        Ref: StartTime
      Template:
        Ref: Template
      Name:
        Ref: Name
Outputs:
  Name:
    Description: The name of the policy.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Name

Formato JSON

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "EndTime": {
      "Type": "Number",
      "Description": {
        "en": "The end time of the policy. This value is a UNIX timestamp. Units: milliseconds."
      },
      "Required": true
    },
    "StartTime": {
      "Type": "Number",
      "Description": {
        "en": "The start time of the policy. This value is a UNIX timestamp. Units: milliseconds."
      },
      "Required": true
    },
    "Template": {
      "Type": "String",
      "Description": {
        "en": "The template of the policy. Valid values:\npromotion: important activity\nbypass: all traffic forwarded"
      },
      "AllowedValues": [
        "promotion",
        "bypass"
      ],
      "Required": true
    },
    "Name": {
      "Type": "String",
      "Description": {
        "en": "The name of the policy."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::DDoSPro::SceneDefensePolicy",
      "Properties": {
        "EndTime": {
          "Ref": "EndTime"
        },
        "StartTime": {
          "Ref": "StartTime"
        },
        "Template": {
          "Ref": "Template"
        },
        "Name": {
          "Ref": "Name"
        }
      }
    }
  },
  "Outputs": {
    "Name": {
      "Description": "The name of the policy.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Name"
        ]
      }
    }
  }
}