Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.oos.getTemplates
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Declare the data source
const example = alicloud.oos.getTemplates({
nameRegex: "test",
tags: {
Created: "TF",
For: "template Test",
},
shareType: "Private",
hasTrigger: false,
});
export const firstTemplateName = example.then(example => example.templates?.[0]?.templateName);
import pulumi
import pulumi_alicloud as alicloud
# Declare the data source
example = alicloud.oos.get_templates(name_regex="test",
tags={
"Created": "TF",
"For": "template Test",
},
share_type="Private",
has_trigger=False)
pulumi.export("firstTemplateName", example.templates[0].template_name)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oos"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Declare the data source
example, err := oos.GetTemplates(ctx, &oos.GetTemplatesArgs{
NameRegex: pulumi.StringRef("test"),
Tags: map[string]interface{}{
"Created": "TF",
"For": "template Test",
},
ShareType: pulumi.StringRef("Private"),
HasTrigger: pulumi.BoolRef(false),
}, nil)
if err != nil {
return err
}
ctx.Export("firstTemplateName", example.Templates[0].TemplateName)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Declare the data source
var example = AliCloud.Oos.GetTemplates.Invoke(new()
{
NameRegex = "test",
Tags =
{
{ "Created", "TF" },
{ "For", "template Test" },
},
ShareType = "Private",
HasTrigger = false,
});
return new Dictionary<string, object?>
{
["firstTemplateName"] = example.Apply(getTemplatesResult => getTemplatesResult.Templates[0]?.TemplateName),
};
});
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) {
// Declare the data source
final var example = OosFunctions.getTemplates(GetTemplatesArgs.builder()
.nameRegex("test")
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "template Test")
))
.shareType("Private")
.hasTrigger(false)
.build());
ctx.export("firstTemplateName", example.applyValue(getTemplatesResult -> getTemplatesResult.templates()[0].templateName()));
}
}
variables:
# Declare the data source
example:
fn::invoke:
Function: alicloud:oos:getTemplates
Arguments:
nameRegex: test
tags:
Created: TF
For: template Test
shareType: Private
hasTrigger: false
outputs:
firstTemplateName: ${example.templates[0].templateName}
Using getTemplates
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getTemplates(args: GetTemplatesArgs, opts?: InvokeOptions): Promise<GetTemplatesResult>
function getTemplatesOutput(args: GetTemplatesOutputArgs, opts?: InvokeOptions): Output<GetTemplatesResult>
def get_templates(category: Optional[str] = None,
created_by: Optional[str] = None,
created_date: Optional[str] = None,
created_date_after: Optional[str] = None,
has_trigger: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
share_type: Optional[str] = None,
sort_field: Optional[str] = None,
sort_order: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
template_format: Optional[str] = None,
template_type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTemplatesResult
def get_templates_output(category: Optional[pulumi.Input[str]] = None,
created_by: Optional[pulumi.Input[str]] = None,
created_date: Optional[pulumi.Input[str]] = None,
created_date_after: Optional[pulumi.Input[str]] = None,
has_trigger: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
share_type: Optional[pulumi.Input[str]] = None,
sort_field: Optional[pulumi.Input[str]] = None,
sort_order: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
template_format: Optional[pulumi.Input[str]] = None,
template_type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTemplatesResult]
func GetTemplates(ctx *Context, args *GetTemplatesArgs, opts ...InvokeOption) (*GetTemplatesResult, error)
func GetTemplatesOutput(ctx *Context, args *GetTemplatesOutputArgs, opts ...InvokeOption) GetTemplatesResultOutput
> Note: This function is named GetTemplates
in the Go SDK.
public static class GetTemplates
{
public static Task<GetTemplatesResult> InvokeAsync(GetTemplatesArgs args, InvokeOptions? opts = null)
public static Output<GetTemplatesResult> Invoke(GetTemplatesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTemplatesResult> getTemplates(GetTemplatesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:oos/getTemplates:getTemplates
arguments:
# arguments dictionary
The following arguments are supported:
- Category string
- The category of template.
- Created
By string - The creator of the template.
- Created
Date string - The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
- Created
Date stringAfter - Create a template whose time is greater than or equal to the specified time. The format is: YYYY-MM-DDThh:mm:ssZ.
- Has
Trigger bool - Is it triggered successfully.
- Ids List<string>
- A list of OOS Template ids. Each element in the list is same as template_name.
- Name
Regex string - A regex string to filter the results by the template_name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - string
- The sharing type of the template. Valid values:
Private
,Public
. - Sort
Field string - Sort field. Valid values:
TotalExecutionCount
,Popularity
,TemplateName
andCreatedDate
. Default toTotalExecutionCount
. - Sort
Order string - Sort order. Valid values:
Ascending
,Descending
. Default toDescending
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Template
Format string - The format of the template. Valid values:
JSON
,YAML
. - Template
Type string - The type of OOS Template.
- Category string
- The category of template.
- Created
By string - The creator of the template.
- Created
Date string - The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
- Created
Date stringAfter - Create a template whose time is greater than or equal to the specified time. The format is: YYYY-MM-DDThh:mm:ssZ.
- Has
Trigger bool - Is it triggered successfully.
- Ids []string
- A list of OOS Template ids. Each element in the list is same as template_name.
- Name
Regex string - A regex string to filter the results by the template_name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - string
- The sharing type of the template. Valid values:
Private
,Public
. - Sort
Field string - Sort field. Valid values:
TotalExecutionCount
,Popularity
,TemplateName
andCreatedDate
. Default toTotalExecutionCount
. - Sort
Order string - Sort order. Valid values:
Ascending
,Descending
. Default toDescending
- map[string]string
- A mapping of tags to assign to the resource.
- Template
Format string - The format of the template. Valid values:
JSON
,YAML
. - Template
Type string - The type of OOS Template.
- category String
- The category of template.
- created
By String - The creator of the template.
- created
Date String - The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
- created
Date StringAfter - Create a template whose time is greater than or equal to the specified time. The format is: YYYY-MM-DDThh:mm:ssZ.
- has
Trigger Boolean - Is it triggered successfully.
- ids List<String>
- A list of OOS Template ids. Each element in the list is same as template_name.
- name
Regex String - A regex string to filter the results by the template_name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - String
- The sharing type of the template. Valid values:
Private
,Public
. - sort
Field String - Sort field. Valid values:
TotalExecutionCount
,Popularity
,TemplateName
andCreatedDate
. Default toTotalExecutionCount
. - sort
Order String - Sort order. Valid values:
Ascending
,Descending
. Default toDescending
- Map<String,String>
- A mapping of tags to assign to the resource.
- template
Format String - The format of the template. Valid values:
JSON
,YAML
. - template
Type String - The type of OOS Template.
- category string
- The category of template.
- created
By string - The creator of the template.
- created
Date string - The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
- created
Date stringAfter - Create a template whose time is greater than or equal to the specified time. The format is: YYYY-MM-DDThh:mm:ssZ.
- has
Trigger boolean - Is it triggered successfully.
- ids string[]
- A list of OOS Template ids. Each element in the list is same as template_name.
- name
Regex string - A regex string to filter the results by the template_name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - string
- The sharing type of the template. Valid values:
Private
,Public
. - sort
Field string - Sort field. Valid values:
TotalExecutionCount
,Popularity
,TemplateName
andCreatedDate
. Default toTotalExecutionCount
. - sort
Order string - Sort order. Valid values:
Ascending
,Descending
. Default toDescending
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- template
Format string - The format of the template. Valid values:
JSON
,YAML
. - template
Type string - The type of OOS Template.
- category str
- The category of template.
- created_
by str - The creator of the template.
- created_
date str - The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
- created_
date_ strafter - Create a template whose time is greater than or equal to the specified time. The format is: YYYY-MM-DDThh:mm:ssZ.
- has_
trigger bool - Is it triggered successfully.
- ids Sequence[str]
- A list of OOS Template ids. Each element in the list is same as template_name.
- name_
regex str - A regex string to filter the results by the template_name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - str
- The sharing type of the template. Valid values:
Private
,Public
. - sort_
field str - Sort field. Valid values:
TotalExecutionCount
,Popularity
,TemplateName
andCreatedDate
. Default toTotalExecutionCount
. - sort_
order str - Sort order. Valid values:
Ascending
,Descending
. Default toDescending
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- template_
format str - The format of the template. Valid values:
JSON
,YAML
. - template_
type str - The type of OOS Template.
- category String
- The category of template.
- created
By String - The creator of the template.
- created
Date String - The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
- created
Date StringAfter - Create a template whose time is greater than or equal to the specified time. The format is: YYYY-MM-DDThh:mm:ssZ.
- has
Trigger Boolean - Is it triggered successfully.
- ids List<String>
- A list of OOS Template ids. Each element in the list is same as template_name.
- name
Regex String - A regex string to filter the results by the template_name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - String
- The sharing type of the template. Valid values:
Private
,Public
. - sort
Field String - Sort field. Valid values:
TotalExecutionCount
,Popularity
,TemplateName
andCreatedDate
. Default toTotalExecutionCount
. - sort
Order String - Sort order. Valid values:
Ascending
,Descending
. Default toDescending
- Map<String>
- A mapping of tags to assign to the resource.
- template
Format String - The format of the template. Valid values:
JSON
,YAML
. - template
Type String - The type of OOS Template.
getTemplates Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of OOS Template ids. Each element in the list is same as template_name.
- Names List<string>
- (Available in v1.114.0+) A list of OOS Template names.
- Templates
List<Pulumi.
Ali Cloud. Oos. Outputs. Get Templates Template> - A list of OOS Templates. Each element contains the following attributes:
- Category string
- Created
By string - Created
Date string - Created
Date stringAfter - Has
Trigger bool - Name
Regex string - Output
File string - string
- Sort
Field string - Sort
Order string - Dictionary<string, string>
- Template
Format string - Template
Type string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of OOS Template ids. Each element in the list is same as template_name.
- Names []string
- (Available in v1.114.0+) A list of OOS Template names.
- Templates
[]Get
Templates Template - A list of OOS Templates. Each element contains the following attributes:
- Category string
- Created
By string - Created
Date string - Created
Date stringAfter - Has
Trigger bool - Name
Regex string - Output
File string - string
- Sort
Field string - Sort
Order string - map[string]string
- Template
Format string - Template
Type string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of OOS Template ids. Each element in the list is same as template_name.
- names List<String>
- (Available in v1.114.0+) A list of OOS Template names.
- templates
List<Get
Templates Template> - A list of OOS Templates. Each element contains the following attributes:
- category String
- created
By String - created
Date String - created
Date StringAfter - has
Trigger Boolean - name
Regex String - output
File String - String
- sort
Field String - sort
Order String - Map<String,String>
- template
Format String - template
Type String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of OOS Template ids. Each element in the list is same as template_name.
- names string[]
- (Available in v1.114.0+) A list of OOS Template names.
- templates
Get
Templates Template[] - A list of OOS Templates. Each element contains the following attributes:
- category string
- created
By string - created
Date string - created
Date stringAfter - has
Trigger boolean - name
Regex string - output
File string - string
- sort
Field string - sort
Order string - {[key: string]: string}
- template
Format string - template
Type string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of OOS Template ids. Each element in the list is same as template_name.
- names Sequence[str]
- (Available in v1.114.0+) A list of OOS Template names.
- templates
Sequence[Get
Templates Template] - A list of OOS Templates. Each element contains the following attributes:
- category str
- created_
by str - created_
date str - created_
date_ strafter - has_
trigger bool - name_
regex str - output_
file str - str
- sort_
field str - sort_
order str - Mapping[str, str]
- template_
format str - template_
type str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of OOS Template ids. Each element in the list is same as template_name.
- names List<String>
- (Available in v1.114.0+) A list of OOS Template names.
- templates List<Property Map>
- A list of OOS Templates. Each element contains the following attributes:
- category String
- created
By String - created
Date String - created
Date StringAfter - has
Trigger Boolean - name
Regex String - output
File String - String
- sort
Field String - sort
Order String - Map<String>
- template
Format String - template
Type String
Supporting Types
GetTemplatesTemplate
- Category string
- The category of template.
- Created
By string - The creator of the template.
- Created
Date string - The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
- Description string
- Description of the OOS Template.
- Has
Trigger bool - Is it triggered successfully.
- Id string
- ID of the OOS Template. The value is same as template_name.
- string
- The sharing type of the template. Valid values:
Private
,Public
. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Template
Format string - The format of the template. Valid values:
JSON
,YAML
. - Template
Id string - ID of the OOS Template resource.
- Template
Name string - Name of the OOS Template.
- Template
Type string - The type of OOS Template.
- Template
Version string - Version of the OOS Template.
- Updated
By string - The user who updated the template.
- Updated
Date string - The time when the template was updated.
- Category string
- The category of template.
- Created
By string - The creator of the template.
- Created
Date string - The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
- Description string
- Description of the OOS Template.
- Has
Trigger bool - Is it triggered successfully.
- Id string
- ID of the OOS Template. The value is same as template_name.
- string
- The sharing type of the template. Valid values:
Private
,Public
. - map[string]string
- A mapping of tags to assign to the resource.
- Template
Format string - The format of the template. Valid values:
JSON
,YAML
. - Template
Id string - ID of the OOS Template resource.
- Template
Name string - Name of the OOS Template.
- Template
Type string - The type of OOS Template.
- Template
Version string - Version of the OOS Template.
- Updated
By string - The user who updated the template.
- Updated
Date string - The time when the template was updated.
- category String
- The category of template.
- created
By String - The creator of the template.
- created
Date String - The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
- description String
- Description of the OOS Template.
- has
Trigger Boolean - Is it triggered successfully.
- id String
- ID of the OOS Template. The value is same as template_name.
- String
- The sharing type of the template. Valid values:
Private
,Public
. - Map<String,String>
- A mapping of tags to assign to the resource.
- template
Format String - The format of the template. Valid values:
JSON
,YAML
. - template
Id String - ID of the OOS Template resource.
- template
Name String - Name of the OOS Template.
- template
Type String - The type of OOS Template.
- template
Version String - Version of the OOS Template.
- updated
By String - The user who updated the template.
- updated
Date String - The time when the template was updated.
- category string
- The category of template.
- created
By string - The creator of the template.
- created
Date string - The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
- description string
- Description of the OOS Template.
- has
Trigger boolean - Is it triggered successfully.
- id string
- ID of the OOS Template. The value is same as template_name.
- string
- The sharing type of the template. Valid values:
Private
,Public
. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- template
Format string - The format of the template. Valid values:
JSON
,YAML
. - template
Id string - ID of the OOS Template resource.
- template
Name string - Name of the OOS Template.
- template
Type string - The type of OOS Template.
- template
Version string - Version of the OOS Template.
- updated
By string - The user who updated the template.
- updated
Date string - The time when the template was updated.
- category str
- The category of template.
- created_
by str - The creator of the template.
- created_
date str - The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
- description str
- Description of the OOS Template.
- has_
trigger bool - Is it triggered successfully.
- id str
- ID of the OOS Template. The value is same as template_name.
- str
- The sharing type of the template. Valid values:
Private
,Public
. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- template_
format str - The format of the template. Valid values:
JSON
,YAML
. - template_
id str - ID of the OOS Template resource.
- template_
name str - Name of the OOS Template.
- template_
type str - The type of OOS Template.
- template_
version str - Version of the OOS Template.
- updated_
by str - The user who updated the template.
- updated_
date str - The time when the template was updated.
- category String
- The category of template.
- created
By String - The creator of the template.
- created
Date String - The template whose creation time is less than or equal to the specified time. The format is: YYYY-MM-DDThh:mm::ssZ.
- description String
- Description of the OOS Template.
- has
Trigger Boolean - Is it triggered successfully.
- id String
- ID of the OOS Template. The value is same as template_name.
- String
- The sharing type of the template. Valid values:
Private
,Public
. - Map<String>
- A mapping of tags to assign to the resource.
- template
Format String - The format of the template. Valid values:
JSON
,YAML
. - template
Id String - ID of the OOS Template resource.
- template
Name String - Name of the OOS Template.
- template
Type String - The type of OOS Template.
- template
Version String - Version of the OOS Template.
- updated
By String - The user who updated the template.
- updated
Date String - The time when the template was updated.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.