DATASOURCE::OOS::Templates类型用于查询模板列表。
语法
{
"Type": "DATASOURCE::OOS::Templates",
"Properties": {
"Category": String,
"CreatedBy": String,
"CreatedDateAfter": String,
"CreatedDateBefore": String,
"HasTrigger": Boolean,
"IsExample": Boolean,
"IsFavorite": Boolean,
"ResourceGroupId": String,
"RefreshOptions": String,
"SortOrder": String,
"SortField": String,
"ShareType": String,
"TemplateFormat": String,
"TemplateType": String,
"TemplateName": String,
"Tags": Map
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Category | String | 否 | 是 | 模板类型。 | 取值:
|
CreatedBy | String | 否 | 是 | 模板创建者。 | 无 |
CreatedDateAfter | String | 否 | 是 | 创建时间大于等于指定时间的模板。 | 格式为:YYYY-MM-DDThh:mm:ssZ |
CreatedDateBefore | String | 否 | 是 | 创建时间小于等于指定时间的模板。 | 格式为:YYYY-MM-DDThh:mm::ssZ |
HasTrigger | Boolean | 否 | 是 | 是否触发。 | 无 |
IsExample | Boolean | 否 | 是 | 是否是示例模板。 | 无 |
IsFavorite | Boolean | 否 | 是 | 是否已收藏。 | 无 |
ResourceGroupId | String | 否 | 是 | 资源组 ID。 | 无 |
RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值:
|
SortOrder | String | 否 | 是 | 排序方向。 | 取值范围:
|
SortField | String | 否 | 是 | 排序字段。 | 取值范围:
|
ShareType | String | 否 | 是 | 模板共享类型。 | 目前用户创建的模板的共享类型均为 Private。取值范围:
|
TemplateFormat | String | 否 | 是 | 模板格式。 | 取值范围:
|
TemplateType | String | 否 | 是 | 模板类型。 | 取值:
|
TemplateName | String | 否 | 是 | 模板名称。 | 无 |
Tags | Map | 否 | 是 | 标签键及值, | 无 |
返回值
Fn::GetAtt
TemplateNames:模板名称列表。
Templates:模板详情列表。
属性名称 | 类型 | 描述 | 约束 |
TemplateNames | List | 模板名称列表。 | 无 |
Templates | List | 模板详情列表。 | 无 |
ResourceGroupId | string | 资源组 ID。 | 无 |
Description | string | 模板说明。 | 无 |
CreatedBy | string | 模板创建者。 | 无 |
TemplateFormat | string | 模板格式。 | 无 |
TemplateType | string | 模板类型。 | 无 |
Hash | string | 模板内容的 SHA256。 | 无 |
UpdatedBy | string | 模板更新者。 | 无 |
HasTrigger | string | 是否成功触发。 | 无 |
CreatedDate | string | 模板创建时间。 | 无 |
UpdatedDate | string | 模板更新时间。 | 无 |
TemplateId | string | 模板 ID。 | 无 |
ShareType | string | 模板共享类型。 | 无 |
Tags | Map | 标签键及值, | 无 |
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
TemplateName:
Type: String
Description:
en: The name of the template.
Required: false
Resources:
ExtensionDataSource:
Type: DATASOURCE::OOS::Templates
Properties:
TemplateName:
Ref: TemplateName
Outputs:
TemplateNames:
Description: The list of template_names.
Value:
Fn::GetAtt:
- ExtensionDataSource
- TemplateNames
Templates:
Description: The list of templates.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Templates
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"TemplateName": {
"Type": "String",
"Description": {
"en": "The name of the template."
},
"Required": false
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::OOS::Templates",
"Properties": {
"TemplateName": {
"Ref": "TemplateName"
}
}
}
},
"Outputs": {
"TemplateNames": {
"Description": "The list of template_names.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"TemplateNames"
]
}
},
"Templates": {
"Description": "The list of templates.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Templates"
]
}
}
}
}