Todos os produtos
Search
Central de documentação

Resource Orchestration Service:DATASOURCE::OOS::Template

Última atualização: Jun 27, 2026

Consulta os detalhes de um único modelo do OOS.

Sintaxe

{
  "Type": "DATASOURCE::OOS::Template",
  "Properties": {
    "TemplateName": String,
    "RefreshOptions": String,
    "TemplateVersion": String
  }
}

Propriedades

Nome da propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

TemplateName

String

Sim

Sim

Nome do modelo.

Nenhuma

RefreshOptions

String

Não

Sim

Modo de atualização dos recursos da fonte de dados ao atualizar a pilha.

Valores válidos:

  • Never (padrão): não atualiza os recursos da fonte de dados durante a atualização da pilha.

  • Always: atualiza os recursos da fonte de dados sempre que a pilha é atualizada.

TemplateVersion

String

Não

Sim

Versão do modelo.

Formato: "v"+número. Intervalo de valores: v1-v200.

Valores de retorno

Fn::GetAtt

  • Description: descrição do modelo.

  • CreatedBy: criador do modelo.

  • ResourceGroupId: ID do grupo de recursos.

  • TemplateFormat: formato do modelo. Valores válidos: JSON/YAML.

  • UpdatedDate: hora da última atualização do modelo.

  • TemplateType: tipo do modelo. Valores válidos: Automation/State/Package.

  • Hash: valor SHA-256 do conteúdo do modelo.

  • UpdatedBy: usuário que atualizou o modelo pela última vez.

  • HasTrigger: indica se o modelo tem um gatilho configurado.

  • Content: conteúdo do modelo.

  • CreatedDate: hora de criação do modelo. O valor está no formato AAAA-MM-DDThh:mm:ssZ.

  • Tags: chaves e valores das tags. A quantidade de pares chave-valor varia de 1 a 20. Exemplo: {"k1":"k2","k2":"v2"}.

  • TemplateId: ID do modelo.

  • ShareType: tipo de compartilhamento do modelo. Valores válidos: Public/Private.

Exemplo

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