ALIYUN::CDN::StagingConfig

更新时间:
复制为 MD 格式

ALIYUN::CDN::StagingConfig类型用于设置模拟环境下的加速域名配置。

语法

{
  "Type": "ALIYUN::CDN::StagingConfig",
  "Properties": {
    "DomainName": String,
    "Functions": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

DomainName

String

CDN的域名。

Functions

List

预发布配置的功能列表。

格式如下:

说明

  • functionName(功能名称):可配置功能请参见域名配置功能函数,多个参数之间用半角逗号(,)分隔。

  • argName:functionName 的配置项(可配置多个配置项)。

  • argValue:functionName 的配置项的取值。

示例:

[
  {
    "functionArgs": [
      {
        "argName": "功能参数 A",
        "argValue": "功能参数 A 对应的值"
      },
      {
        "argName": "功能参数 B",
        "argValue": "功能参数 B 对应的值"
      }
    ],
    "functionName": "功能名称"
  }
]

返回值

Fn::GetAtt

  • FunctionName:功能名称。

  • ConfigId:配置ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  DomainName:
    Type: String
    Description:
      en: The domain name of the CDN.
      zh: CDN的域名。
    Required: true
  Functions:
    AssociationPropertyMetadata: {}
    AssociationProperty: List[Parameters]
    Type: Json
    Description:
      en: The functions of the staging config.
      zh: 预发布配置的功能列表。
    Required: true
Resources:
  StagingConfig:
    Type: ALIYUN::CDN::StagingConfig
    Properties:
      DomainName:
        Ref: DomainName
      Functions:
        Ref: Functions
Outputs:
  FunctionName:
    Description:
      en: The function name.
      zh: 功能名称。
    Value:
      Fn::GetAtt:
        - StagingConfig
        - FunctionName
  ConfigId:
    Description:
      en: The config id.
      zh: 配置ID。
    Value:
      Fn::GetAtt:
        - StagingConfig
        - ConfigId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DomainName": {
      "Type": "String",
      "Description": {
        "en": "The domain name of the CDN.",
        "zh": "CDN的域名。"
      },
      "Required": true
    },
    "Functions": {
      "AssociationPropertyMetadata": {},
      "AssociationProperty": "List[Parameters]",
      "Type": "Json",
      "Description": {
        "en": "The functions of the staging config.",
        "zh": "预发布配置的功能列表。"
      },
      "Required": true
    }
  },
  "Resources": {
    "StagingConfig": {
      "Type": "ALIYUN::CDN::StagingConfig",
      "Properties": {
        "DomainName": {
          "Ref": "DomainName"
        },
        "Functions": {
          "Ref": "Functions"
        }
      }
    }
  },
  "Outputs": {
    "FunctionName": {
      "Description": {
        "en": "The function name.",
        "zh": "功能名称。"
      },
      "Value": {
        "Fn::GetAtt": [
          "StagingConfig",
          "FunctionName"
        ]
      }
    },
    "ConfigId": {
      "Description": {
        "en": "The config id.",
        "zh": "配置ID。"
      },
      "Value": {
        "Fn::GetAtt": [
          "StagingConfig",
          "ConfigId"
        ]
      }
    }
  }
}