全部产品
Search
文档中心

资源编排:ALIYUN::DDoSPro::SceneDefensePolicy

更新时间:Aug 12, 2024

ALIYUN::DDoSPro::SceneDefensePolicy类型用于创建定制场景策略。

语法

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

属性

属性名称

类型

必须

允许更新

描述

约束

EndTime

Integer

生效结束时间。

时间戳格式,单位:毫秒。

Name

String

策略名称。

StartTime

Integer

生效开始时间。

时间戳格式,单位:毫秒。

Template

String

策略模板。

取值:

  • promotion:重大活动。

  • bypass:全量转发。

返回值

Fn::GetAtt

Name:策略名称。

示例

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

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