DATASOURCE::OOS::Template类型用于查询单个模板详情。
语法
{
"Type": "DATASOURCE::OOS::Template",
"Properties": {
"TemplateName": String,
"RefreshOptions": String,
"TemplateVersion": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
TemplateName | String | 是 | 是 | 模板名称。 | 无 |
RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值:
|
TemplateVersion | String | 否 | 是 | 模板版本。 | 格式:“v”+数字。取值范围:v1-v200。 |
返回值
Fn::GetAtt
Description:模板描述。
CreatedBy:模板创建者。
ResourceGroupId:资源组 ID。
TemplateFormat:模板格式。
UpdatedDate:模板更新时间。
TemplateType:模板类型。
Hash:模板内容的 SHA256。
UpdatedBy:模板更新者。
HasTrigger:是否含有触发器。
Content:模板内容。
CreatedDate:模板创建时间。
Tags:标签键及值。
TemplateId:模板 ID。
ShareType:模板共享类型。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
TemplateName:
Type: String
Description:
en: The name of the template.
Required: true
Resources:
ExtensionDataSource:
Type: DATASOURCE::OOS::Template
Properties:
TemplateName:
Ref: TemplateName
Outputs:
Description:
Description: The description of the template.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Description
CreatedBy:
Description: The creator of the template.
Value:
Fn::GetAtt:
- ExtensionDataSource
- CreatedBy
ResourceGroupId:
Description: The ID of the resource group.
Value:
Fn::GetAtt:
- ExtensionDataSource
- ResourceGroupId
TemplateFormat:
Description: |-
The format of the template. Valid values:
JSON
YAML
Value:
Fn::GetAtt:
- ExtensionDataSource
- TemplateFormat
UpdatedDate:
Description: The time when the template was last updated.
Value:
Fn::GetAtt:
- ExtensionDataSource
- UpdatedDate
TemplateType:
Description: |-
The type of the template. Valid values:
Automation: the template for automated tasks.
State: the template for configuration inventories.
Package: the template for software packages.
Value:
Fn::GetAtt:
- ExtensionDataSource
- TemplateType
Hash:
Description: The SHA-256 value of the template content.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Hash
UpdatedBy:
Description: The user who last updated the template.
Value:
Fn::GetAtt:
- ExtensionDataSource
- UpdatedBy
HasTrigger:
Description: Specifies whether to query the template that is configured with a trigger.
Value:
Fn::GetAtt:
- ExtensionDataSource
- HasTrigger
Content:
Description: The content of the template.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Content
CreatedDate:
Description: Specifies to query the template that is created at or before the specified time.The value must be in the YYYY-MM-DDThh:mm::ssZ format.
Value:
Fn::GetAtt:
- ExtensionDataSource
- CreatedDate
Tags:
Description: 'The tag keys and values. The number of key-value pairs ranges from 1 to 20. Example: {"k1":"k2","k2":"v2"}'
Value:
Fn::GetAtt:
- ExtensionDataSource
- Tags
TemplateId:
Description: The ID of the template.
Value:
Fn::GetAtt:
- ExtensionDataSource
- TemplateId
ShareType:
Description: |-
The share type of the template. Valid values:
Public
Private
Value:
Fn::GetAtt:
- ExtensionDataSource
- ShareType
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"TemplateName": {
"Type": "String",
"Description": {
"en": "The name of the template."
},
"Required": true
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::OOS::Template",
"Properties": {
"TemplateName": {
"Ref": "TemplateName"
}
}
}
},
"Outputs": {
"Description": {
"Description": "The description of the template.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Description"
]
}
},
"CreatedBy": {
"Description": "The creator of the template.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"CreatedBy"
]
}
},
"ResourceGroupId": {
"Description": "The ID of the resource group.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"ResourceGroupId"
]
}
},
"TemplateFormat": {
"Description": "The format of the template. Valid values:\nJSON\nYAML",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"TemplateFormat"
]
}
},
"UpdatedDate": {
"Description": "The time when the template was last updated.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"UpdatedDate"
]
}
},
"TemplateType": {
"Description": "The type of the template. Valid values:\nAutomation: the template for automated tasks.\nState: the template for configuration inventories.\nPackage: the template for software packages.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"TemplateType"
]
}
},
"Hash": {
"Description": "The SHA-256 value of the template content.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Hash"
]
}
},
"UpdatedBy": {
"Description": "The user who last updated the template.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"UpdatedBy"
]
}
},
"HasTrigger": {
"Description": "Specifies whether to query the template that is configured with a trigger.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"HasTrigger"
]
}
},
"Content": {
"Description": "The content of the template.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Content"
]
}
},
"CreatedDate": {
"Description": "Specifies to query the template that is created at or before the specified time.The value must be in the YYYY-MM-DDThh:mm::ssZ format.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"CreatedDate"
]
}
},
"Tags": {
"Description": "The tag keys and values. The number of key-value pairs ranges from 1 to 20. Example: {\"k1\":\"k2\",\"k2\":\"v2\"}",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Tags"
]
}
},
"TemplateId": {
"Description": "The ID of the template.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"TemplateId"
]
}
},
"ShareType": {
"Description": "The share type of the template. Valid values:\nPublic\nPrivate",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"ShareType"
]
}
}
}
}
该文章对您有帮助吗?