getTemplates

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

argument

A collection of arguments for invoking getTemplates.


suspend fun getTemplates(category: String? = null, createdBy: String? = null, createdDate: String? = null, createdDateAfter: String? = null, hasTrigger: Boolean? = null, ids: List<String>? = null, nameRegex: String? = null, outputFile: String? = null, shareType: String? = null, sortField: String? = null, sortOrder: String? = null, tags: Map<String, Any>? = null, templateFormat: String? = null, templateType: String? = null): GetTemplatesResult

Return

A collection of values returned by getTemplates.

See also

Parameters

category

The category of template.

createdBy

The creator of the template.

createdDate

The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.

createdDateAfter

Create a template whose time is greater than or equal to the specified time. The format is: YYYY-MM-DDThh:mm:ssZ.

hasTrigger

Is it triggered successfully.

ids

A list of OOS Template ids. Each element in the list is same as template_name.

nameRegex

A regex string to filter the results by the template_name.

outputFile

File name where to save data source results (after running pulumi preview).

shareType

The sharing type of the template. Valid values: Private, Public.

sortField

Sort field. Valid values: TotalExecutionCount, Popularity, TemplateName and CreatedDate. Default to TotalExecutionCount.

sortOrder

Sort order. Valid values: Ascending, Descending. Default to Descending

tags

A mapping of tags to assign to the resource.

templateFormat

The format of the template. Valid values: JSON, YAML.

templateType

The type of OOS Template.


Return

A collection of values returned by getTemplates.

See also

Parameters

argument

Builder for com.pulumi.alicloud.oos.kotlin.inputs.GetTemplatesPlainArgs.