Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.imp.getAppTemplates
Explore with Pulumi AI
This data source provides the Imp App Templates of the current Alibaba Cloud user.
NOTE: Available in v1.137.0+.
Example Usage
Basic Usage
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);
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)
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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Imp.GetAppTemplates.Invoke();
var nameRegex = AliCloud.Imp.GetAppTemplates.Invoke(new()
{
NameRegex = "^my_AppTemplate",
});
return new Dictionary<string, object?>
{
["impAppTemplateId1"] = ids.Apply(getAppTemplatesResult => getAppTemplatesResult.Templates[0]?.Id),
["impAppTemplateId2"] = nameRegex.Apply(getAppTemplatesResult => getAppTemplatesResult.Templates[0]?.Id),
};
});
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()));
}
}
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.
- Name
Regex string - A regex string to filter results by App Template name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- Application template usage status. Valid values: ["attached", "unattached"].
- Ids []string
- A list of App Template IDs.
- Name
Regex string - A regex string to filter results by App Template name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- Application template usage status. Valid values: ["attached", "unattached"].
- ids List<String>
- A list of App Template IDs.
- name
Regex String - A regex string to filter results by App Template name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- Application template usage status. Valid values: ["attached", "unattached"].
- ids string[]
- A list of App Template IDs.
- name
Regex string - A regex string to filter results by App Template name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - status string
- Application template usage status. Valid values: ["attached", "unattached"].
- 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 - File name where to save data source results (after running
pulumi preview
). - status str
- Application template usage status. Valid values: ["attached", "unattached"].
- ids List<String>
- A list of App Template IDs.
- name
Regex String - A regex string to filter results by App Template name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- Application template usage status. Valid values: ["attached", "unattached"].
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.
Ali Cloud. Imp. Outputs. Get App Templates Template> - Name
Regex string - Output
File string - Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Templates
[]Get
App Templates Template - Name
Regex string - Output
File string - Status string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- templates
List<Get
App Templates Template> - name
Regex String - output
File String - status String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- templates
Get
App Templates Template[] - name
Regex string - output
File string - status string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- templates
Sequence[Get
App Templates Template] - 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>
- name
Regex String - output
File String - status String
Supporting Types
GetAppTemplatesTemplate
- App
Template stringCreator - Apply template creator.
- App
Template stringId - The first ID of the resource.
- App
Template stringName - The name of the resource.
- Component
Lists List<string> - List of components.
- Config
Lists List<Pulumi.Ali Cloud. Imp. Inputs. Get App Templates Template Config List> - List of config.
- Create
Time string - Creation time.
- Id string
- The ID of the App Template.
- Integration
Mode string - Integration mode (Integrated SDK:paasSDK, Model Room: standardRoom).
- Scene string
- Application Template scenario, e-commerce business, classroom classroom.
- Sdk
Info string - SDK information.
- Standard
Room stringInfo - Model room information.
- Status string
- Application template usage status.
- App
Template stringCreator - Apply template creator.
- App
Template stringId - The first ID of the resource.
- App
Template stringName - The name of the resource.
- Component
Lists []string - List of components.
- Config
Lists []GetApp Templates Template Config List - List of config.
- Create
Time string - Creation time.
- Id string
- The ID of the App Template.
- Integration
Mode string - Integration mode (Integrated SDK:paasSDK, Model Room: standardRoom).
- Scene string
- Application Template scenario, e-commerce business, classroom classroom.
- Sdk
Info string - SDK information.
- Standard
Room stringInfo - Model room information.
- Status string
- Application template usage status.
- app
Template StringCreator - Apply template creator.
- app
Template StringId - The first ID of the resource.
- app
Template StringName - The name of the resource.
- component
Lists List<String> - List of components.
- config
Lists List<GetApp Templates Template Config List> - List of config.
- create
Time String - Creation time.
- id String
- The ID of the App Template.
- integration
Mode String - Integration mode (Integrated SDK:paasSDK, Model Room: standardRoom).
- scene String
- Application Template scenario, e-commerce business, classroom classroom.
- sdk
Info String - SDK information.
- standard
Room StringInfo - Model room information.
- status String
- Application template usage status.
- app
Template stringCreator - Apply template creator.
- app
Template stringId - The first ID of the resource.
- app
Template stringName - The name of the resource.
- component
Lists string[] - List of components.
- config
Lists GetApp Templates Template Config List[] - List of config.
- create
Time string - Creation time.
- id string
- The ID of the App Template.
- integration
Mode string - Integration mode (Integrated SDK:paasSDK, Model Room: standardRoom).
- scene string
- Application Template scenario, e-commerce business, classroom classroom.
- sdk
Info string - SDK information.
- standard
Room stringInfo - Model room information.
- status string
- Application template usage status.
- app_
template_ strcreator - Apply template creator.
- app_
template_ strid - The first ID of the resource.
- app_
template_ strname - The name of the resource.
- component_
lists Sequence[str] - List of components.
- config_
lists Sequence[GetApp Templates Template Config List] - 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_ strinfo - Model room information.
- status str
- Application template usage status.
- app
Template StringCreator - Apply template creator.
- app
Template StringId - The first ID of the resource.
- app
Template StringName - The name of the resource.
- component
Lists List<String> - List of components.
- config
Lists List<Property Map> - List of config.
- create
Time String - Creation time.
- id String
- The ID of the App Template.
- integration
Mode String - Integration mode (Integrated SDK:paasSDK, Model Room: standardRoom).
- scene String
- Application Template scenario, e-commerce business, classroom classroom.
- sdk
Info String - SDK information.
- standard
Room StringInfo - Model room information.
- status String
- Application template usage status.
GetAppTemplatesTemplateConfigList
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.