get Templates
This data source provides a list of OOS Templates in an Alibaba Cloud account according to the specified filters.
NOTE: Available in v1.92.0+.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.oos.OosFunctions;
import com.pulumi.alicloud.oos.inputs.GetTemplatesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = OosFunctions.getTemplates(GetTemplatesArgs.builder()
.hasTrigger(false)
.nameRegex("test")
.shareType("Private")
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "template Test")
))
.build());
ctx.export("firstTemplateName", example.applyValue(getTemplatesResult -> getTemplatesResult.templates()[0].templateName()));
}
}
Return
A collection of values returned by getTemplates.
Parameters
A collection of arguments for invoking getTemplates.
Return
A collection of values returned by getTemplates.
See also
Parameters
The category of template.
The creator of the template.
The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
Create a template whose time is greater than or equal to the specified time. The format is: YYYY-MM-DDThh:mm:ssZ.
Is it triggered successfully.
A list of OOS Template ids. Each element in the list is same as template_name.
A regex string to filter the results by the template_name.
File name where to save data source results (after running pulumi preview
).
The sharing type of the template. Valid values: Private
, Public
.
Sort field. Valid values: TotalExecutionCount
, Popularity
, TemplateName
and CreatedDate
. Default to TotalExecutionCount
.
Sort order. Valid values: Ascending
, Descending
. Default to Descending
A mapping of tags to assign to the resource.
The format of the template. Valid values: JSON
, YAML
.
The type of OOS Template.
Return
A collection of values returned by getTemplates.
See also
Parameters
Builder for com.pulumi.alicloud.oos.kotlin.inputs.GetTemplatesPlainArgs.