Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getAppTemplates

This data source provides the Imp App Templates of the current Alibaba Cloud user.

NOTE: Available in v1.137.0+.

Example Usage

Basic Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.Imp.GetAppTemplates.InvokeAsync());
        this.ImpAppTemplateId1 = ids.Apply(ids => ids.Templates?[0]?.Id);
        var nameRegex = Output.Create(AliCloud.Imp.GetAppTemplates.InvokeAsync(new AliCloud.Imp.GetAppTemplatesArgs
        {
            NameRegex = "^my_AppTemplate",
        }));
        this.ImpAppTemplateId2 = nameRegex.Apply(nameRegex => nameRegex.Templates?[0]?.Id);
    }

    [Output("impAppTemplateId1")]
    public Output<string> ImpAppTemplateId1 { get; set; }
    [Output("impAppTemplateId2")]
    public Output<string> ImpAppTemplateId2 { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/imp"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := imp.GetAppTemplates(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("impAppTemplateId1", ids.Templates[0].Id)
		nameRegex, err := imp.GetAppTemplates(ctx, &imp.GetAppTemplatesArgs{
			NameRegex: pulumi.StringRef("^my_AppTemplate"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("impAppTemplateId2", nameRegex.Templates[0].Id)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.imp.ImpFunctions;
import com.pulumi.alicloud.imp.inputs.GetAppTemplatesArgs;
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 ids = ImpFunctions.getAppTemplates();

        ctx.export("impAppTemplateId1", ids.applyValue(getAppTemplatesResult -> getAppTemplatesResult.templates()[0].id()));
        final var nameRegex = ImpFunctions.getAppTemplates(GetAppTemplatesArgs.builder()
            .nameRegex("^my_AppTemplate")
            .build());

        ctx.export("impAppTemplateId2", nameRegex.applyValue(getAppTemplatesResult -> getAppTemplatesResult.templates()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.imp.get_app_templates()
pulumi.export("impAppTemplateId1", ids.templates[0].id)
name_regex = alicloud.imp.get_app_templates(name_regex="^my_AppTemplate")
pulumi.export("impAppTemplateId2", name_regex.templates[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.imp.getAppTemplates({});
export const impAppTemplateId1 = ids.then(ids => ids.templates?[0]?.id);
const nameRegex = alicloud.imp.getAppTemplates({
    nameRegex: "^my_AppTemplate",
});
export const impAppTemplateId2 = nameRegex.then(nameRegex => nameRegex.templates?[0]?.id);
variables:
  ids:
    Fn::Invoke:
      Function: alicloud:imp:getAppTemplates
      Arguments: {}
  nameRegex:
    Fn::Invoke:
      Function: alicloud:imp:getAppTemplates
      Arguments:
        nameRegex: ^my_AppTemplate
outputs:
  impAppTemplateId1: ${ids.templates[0].id}
  impAppTemplateId2: ${nameRegex.templates[0].id}

Using getAppTemplates

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 getAppTemplates(args: GetAppTemplatesArgs, opts?: InvokeOptions): Promise<GetAppTemplatesResult>
function getAppTemplatesOutput(args: GetAppTemplatesOutputArgs, opts?: InvokeOptions): Output<GetAppTemplatesResult>
def get_app_templates(ids: Optional[Sequence[str]] = None,
                      name_regex: Optional[str] = None,
                      output_file: Optional[str] = None,
                      status: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetAppTemplatesResult
def get_app_templates_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                      name_regex: Optional[pulumi.Input[str]] = None,
                      output_file: Optional[pulumi.Input[str]] = None,
                      status: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetAppTemplatesResult]
func GetAppTemplates(ctx *Context, args *GetAppTemplatesArgs, opts ...InvokeOption) (*GetAppTemplatesResult, error)
func GetAppTemplatesOutput(ctx *Context, args *GetAppTemplatesOutputArgs, opts ...InvokeOption) GetAppTemplatesResultOutput

> Note: This function is named GetAppTemplates in the Go SDK.

public static class GetAppTemplates 
{
    public static Task<GetAppTemplatesResult> InvokeAsync(GetAppTemplatesArgs args, InvokeOptions? opts = null)
    public static Output<GetAppTemplatesResult> Invoke(GetAppTemplatesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAppTemplatesResult> getAppTemplates(GetAppTemplatesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:imp/getAppTemplates:getAppTemplates
  arguments:
    # arguments dictionary

The following arguments are supported:

Ids List<string>

A list of App Template IDs.

NameRegex string

A regex string to filter results by App Template name.

OutputFile string
Status string

Application template usage status.

Ids []string

A list of App Template IDs.

NameRegex string

A regex string to filter results by App Template name.

OutputFile string
Status string

Application template usage status.

ids List<String>

A list of App Template IDs.

nameRegex String

A regex string to filter results by App Template name.

outputFile String
status String

Application template usage status.

ids string[]

A list of App Template IDs.

nameRegex string

A regex string to filter results by App Template name.

outputFile string
status string

Application template usage status.

ids Sequence[str]

A list of App Template IDs.

name_regex str

A regex string to filter results by App Template name.

output_file str
status str

Application template usage status.

ids List<String>

A list of App Template IDs.

nameRegex String

A regex string to filter results by App Template name.

outputFile String
status String

Application template usage status.

getAppTemplates Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Names List<string>
Templates List<Pulumi.AliCloud.Imp.Outputs.GetAppTemplatesTemplate>
NameRegex string
OutputFile string
Status string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Names []string
Templates []GetAppTemplatesTemplate
NameRegex string
OutputFile string
Status string
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
templates List<GetAppTemplatesTemplate>
nameRegex String
outputFile String
status String
id string

The provider-assigned unique ID for this managed resource.

ids string[]
names string[]
templates GetAppTemplatesTemplate[]
nameRegex string
outputFile string
status string
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
names Sequence[str]
templates Sequence[GetAppTemplatesTemplate]
name_regex str
output_file str
status str
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
templates List<Property Map>
nameRegex String
outputFile String
status String

Supporting Types

GetAppTemplatesTemplate

AppTemplateCreator string

Apply template creator.

AppTemplateId string

The first ID of the resource.

AppTemplateName string

The name of the resource.

ComponentLists List<string>

List of components.

ConfigLists List<Pulumi.AliCloud.Imp.Inputs.GetAppTemplatesTemplateConfigList>

List of config.

CreateTime string

Creation time.

Id string

The ID of the App Template.

IntegrationMode string

Integration mode (Integrated SDK:paasSDK, Model Room: standardRoom).

Scene string

Application Template scenario, e-commerce business, classroom classroom.

SdkInfo string

SDK information.

StandardRoomInfo string

Model room information.

Status string

Application template usage status.

AppTemplateCreator string

Apply template creator.

AppTemplateId string

The first ID of the resource.

AppTemplateName string

The name of the resource.

ComponentLists []string

List of components.

ConfigLists []GetAppTemplatesTemplateConfigList

List of config.

CreateTime string

Creation time.

Id string

The ID of the App Template.

IntegrationMode string

Integration mode (Integrated SDK:paasSDK, Model Room: standardRoom).

Scene string

Application Template scenario, e-commerce business, classroom classroom.

SdkInfo string

SDK information.

StandardRoomInfo string

Model room information.

Status string

Application template usage status.

appTemplateCreator String

Apply template creator.

appTemplateId String

The first ID of the resource.

appTemplateName String

The name of the resource.

componentLists List<String>

List of components.

configLists List<GetAppTemplatesTemplateConfigList>

List of config.

createTime String

Creation time.

id String

The ID of the App Template.

integrationMode String

Integration mode (Integrated SDK:paasSDK, Model Room: standardRoom).

scene String

Application Template scenario, e-commerce business, classroom classroom.

sdkInfo String

SDK information.

standardRoomInfo String

Model room information.

status String

Application template usage status.

appTemplateCreator string

Apply template creator.

appTemplateId string

The first ID of the resource.

appTemplateName string

The name of the resource.

componentLists string[]

List of components.

configLists GetAppTemplatesTemplateConfigList[]

List of config.

createTime string

Creation time.

id string

The ID of the App Template.

integrationMode string

Integration mode (Integrated SDK:paasSDK, Model Room: standardRoom).

scene string

Application Template scenario, e-commerce business, classroom classroom.

sdkInfo string

SDK information.

standardRoomInfo string

Model room information.

status string

Application template usage status.

app_template_creator str

Apply template creator.

app_template_id str

The first ID of the resource.

app_template_name str

The name of the resource.

component_lists Sequence[str]

List of components.

config_lists Sequence[GetAppTemplatesTemplateConfigList]

List of config.

create_time str

Creation time.

id str

The ID of the App Template.

integration_mode str

Integration mode (Integrated SDK:paasSDK, Model Room: standardRoom).

scene str

Application Template scenario, e-commerce business, classroom classroom.

sdk_info str

SDK information.

standard_room_info str

Model room information.

status str

Application template usage status.

appTemplateCreator String

Apply template creator.

appTemplateId String

The first ID of the resource.

appTemplateName String

The name of the resource.

componentLists List<String>

List of components.

configLists List<Property Map>

List of config.

createTime String

Creation time.

id String

The ID of the App Template.

integrationMode String

Integration mode (Integrated SDK:paasSDK, Model Room: standardRoom).

scene String

Application Template scenario, e-commerce business, classroom classroom.

sdkInfo String

SDK information.

standardRoomInfo String

Model room information.

status String

Application template usage status.

GetAppTemplatesTemplateConfigList

Key string

Config key.

Value string

Config Value.

Key string

Config key.

Value string

Config Value.

key String

Config key.

value String

Config Value.

key string

Config key.

value string

Config Value.

key str

Config key.

value str

Config Value.

key String

Config key.

value String

Config Value.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.