All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::OOS::Templates

更新时间:Jul 24, 2025

The DATASOURCE::OOS::Templates type is used to query template lists.

Syntax

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

Properties

Property name

Type

Required

Editable

Description

Constraint

Category

String

No

Yes

The template type.

Valid values:

  • TimerTrigger

  • EventTrigger

  • AlarmTrigger

  • Other

CreatedBy

String

No

Yes

The creator of the template.

None

CreatedDateAfter

String

No

Yes

Templates created on or after the specified time.

Format: YYYY-MM-DDThh:mm:ssZ

CreatedDateBefore

String

No

Yes

Templates created on or before the specified time.

Format: YYYY-MM-DDThh:mm:ssZ

HasTrigger

Boolean

No

Yes

Specifies whether the template is triggered.

None

IsExample

Boolean

No

Yes

Specifies whether the template is an sample template.

None

IsFavorite

Boolean

No

Yes

Specifies whether the template is marked as a favorite.

None

ResourceGroupId

String

No

Yes

The resource group ID.

None

RefreshOptions

String

No

Yes

The data source resources refresh mode when the stack is updated.

Values:

  • Never (default): never refresh data source resources when the stack is updated.

  • Always: always refresh data source resources when the stack is updated.

SortOrder

String

No

Yes

The sort order of the query results.

Valid values:

  • Ascending: ascending order

  • Descending (default): descending order

SortField

String

No

Yes

Available fields for sorting.

Valid values:

  • TotalExecutionCount (default)

  • Popularity

  • TemplateName

  • CreatedDate

  • UpdatedDate

ShareType

String

No

Yes

The sharing type of the template.

All templates currently created by users are set to Private. Valid values:

  • Public

  • Private

TemplateFormat

String

No

Yes

The template format.

Valid values:

  • JSON

  • YAML

TemplateType

String

No

Yes

The template type.

Valid values:

  • Automation

  • State: Configuration checklist

  • Package: Software package

TemplateName

String

No

Yes

The template name.

None

Tags

Map

No

Yes

The tag keys and values.

None

Return values

Fn::GetAtt

  • TemplateNames: The list of template names.

  • Templates: The list of templates.

Property name

Type

Description

Constraint

TemplateNames

List

The list of template names.

None

Templates

List

The list of templates.

None

ResourceGroupId

string

The resource group ID.

None

Description

string

The description of the template.

None

CreatedBy

string

The creator of the template.

None

TemplateFormat

string

The format of the template.

None

TemplateType

string

The template type.

None

Hash

string

The SHA-256 value of the template content.

None

UpdatedBy

string

The user who last updated the template.

None

HasTrigger

string

Specifies whether to query the template that is configured with a trigger.

None

CreatedDate

string

Specifies to query the template that is created at or before the specified time.

None

UpdatedDate

string

The time when the template was last updated.

None

TemplateId

string

The template ID.

None

ShareType

string

The sharing type of the template.

None

Tags

Map

The tag keys and values.

None

Example

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