ALIYUN::ESA::CustomScenePolicy类型用于创建定制场景策略。
语法
{
"Type": "ALIYUN::ESA::CustomScenePolicy",
"Properties": {
"CustomScenePolicyName": String,
"CreateTime": String,
"EndTime": String,
"Objects": String,
"Template": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
CustomScenePolicyName | String | 是 | 是 | 策略名称。 | 无 |
CreateTime | String | 是 | 是 | 策略起始时间。 | 日期格式按照 ISO8601 表示法,并使用 UTC+0 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 |
EndTime | String | 是 | 是 | 策略结束时间。 | 日期格式按照 ISO8601 表示法,并使用 UTC+0 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。 |
Objects | String | 是 | 是 | 要关联的站点 ID 信息。 | 多个站点 ID 间使用英文逗号(,)分隔。 说明 该字段为待废弃字段,建议使用 SiteIds 字段替代。如果 SiteIds 字段有值,则接口操作以 SiteIds 字段内容为准,Objects 字段内容不再生效。为避免接口调用更新操作歧义,SiteIds 字段和 Objects 字段必须至少有一个有值。 |
Template | String | 是 | 是 | 模板名称。 | 取值:
|
返回值
Fn::GetAtt
CustomScenePolicyName:策略名称。
EndTime:策略结束时间。
CreateTime:策略起始时间。
Objects:要关联的站点 ID 信息。
PolicyId:策略 ID。
Template:模板名称。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
CustomScenePolicyName:
Type: String
Description:
en: The policy name.
Required: true
EndTime:
Type: String
Description:
en: |-
The time when the policy expires.
The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
Required: true
CreateTime:
Type: String
Description:
en: |-
The time when the policy takes effect.
The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
Required: true
Objects:
Type: String
Description:
en: The IDs of the websites that you want to associate with the policy. Separate multiple IDs with commas (,).
Required: true
Template:
Type: String
Description:
en: |-
The name of the policy template. Valid value:
promotion: major events.
AllowedValues:
- promotion
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::ESA::CustomScenePolicy
Properties:
CustomScenePolicyName:
Ref: CustomScenePolicyName
EndTime:
Ref: EndTime
CreateTime:
Ref: CreateTime
Objects:
Ref: Objects
Template:
Ref: Template
Outputs:
CustomScenePolicyName:
Description: The name of the policy.
Value:
Fn::GetAtt:
- ExtensionResource
- CustomScenePolicyName
EndTime:
Description: The time when the policy expires.
Value:
Fn::GetAtt:
- ExtensionResource
- EndTime
CreateTime:
Description: The time when the policy takes effect.
Value:
Fn::GetAtt:
- ExtensionResource
- CreateTime
Objects:
Description: The IDs of websites associated.
Value:
Fn::GetAtt:
- ExtensionResource
- Objects
PolicyId:
Description: The Id of the Policy.
Value:
Fn::GetAtt:
- ExtensionResource
- PolicyId
Template:
Description: The name of the policy template.
Value:
Fn::GetAtt:
- ExtensionResource
- Template
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"CustomScenePolicyName": {
"Type": "String",
"Description": {
"en": "The policy name."
},
"Required": true
},
"EndTime": {
"Type": "String",
"Description": {
"en": "The time when the policy expires.\nThe time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC."
},
"Required": true
},
"CreateTime": {
"Type": "String",
"Description": {
"en": "The time when the policy takes effect.\nThe time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC."
},
"Required": true
},
"Objects": {
"Type": "String",
"Description": {
"en": "The IDs of the websites that you want to associate with the policy. Separate multiple IDs with commas (,)."
},
"Required": true
},
"Template": {
"Type": "String",
"Description": {
"en": "The name of the policy template. Valid value:\npromotion: major events."
},
"AllowedValues": [
"promotion"
],
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ESA::CustomScenePolicy",
"Properties": {
"CustomScenePolicyName": {
"Ref": "CustomScenePolicyName"
},
"EndTime": {
"Ref": "EndTime"
},
"CreateTime": {
"Ref": "CreateTime"
},
"Objects": {
"Ref": "Objects"
},
"Template": {
"Ref": "Template"
}
}
}
},
"Outputs": {
"CustomScenePolicyName": {
"Description": "The name of the policy.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"CustomScenePolicyName"
]
}
},
"EndTime": {
"Description": "The time when the policy expires.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"EndTime"
]
}
},
"CreateTime": {
"Description": "The time when the policy takes effect.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"CreateTime"
]
}
},
"Objects": {
"Description": "The IDs of websites associated.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Objects"
]
}
},
"PolicyId": {
"Description": "The Id of the Policy.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"PolicyId"
]
}
},
"Template": {
"Description": "The name of the policy template.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Template"
]
}
}
}
}
该文章对您有帮助吗?