1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. apigateway
  5. getApps
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.apigateway.getApps

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides the apps of the current Alibaba Cloud user.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const dataApigatway = alicloud.apigateway.getApps({
        outputFile: "outapps",
    });
    export const firstAppId = dataApigatway.then(dataApigatway => dataApigatway.apps?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    data_apigatway = alicloud.apigateway.get_apps(output_file="outapps")
    pulumi.export("firstAppId", data_apigatway.apps[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/apigateway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		dataApigatway, err := apigateway.GetApps(ctx, &apigateway.GetAppsArgs{
    			OutputFile: pulumi.StringRef("outapps"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstAppId", dataApigatway.Apps[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var dataApigatway = AliCloud.ApiGateway.GetApps.Invoke(new()
        {
            OutputFile = "outapps",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstAppId"] = dataApigatway.Apply(getAppsResult => getAppsResult.Apps[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.apigateway.ApigatewayFunctions;
    import com.pulumi.alicloud.apigateway.inputs.GetAppsArgs;
    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 dataApigatway = ApigatewayFunctions.getApps(GetAppsArgs.builder()
                .outputFile("outapps")
                .build());
    
            ctx.export("firstAppId", dataApigatway.applyValue(getAppsResult -> getAppsResult.apps()[0].id()));
        }
    }
    
    variables:
      dataApigatway:
        fn::invoke:
          Function: alicloud:apigateway:getApps
          Arguments:
            outputFile: outapps
    outputs:
      firstAppId: ${dataApigatway.apps[0].id}
    

    Using getApps

    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 getApps(args: GetAppsArgs, opts?: InvokeOptions): Promise<GetAppsResult>
    function getAppsOutput(args: GetAppsOutputArgs, opts?: InvokeOptions): Output<GetAppsResult>
    def get_apps(ids: Optional[Sequence[str]] = None,
                 name_regex: Optional[str] = None,
                 output_file: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 opts: Optional[InvokeOptions] = None) -> GetAppsResult
    def get_apps_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 name_regex: Optional[pulumi.Input[str]] = None,
                 output_file: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetAppsResult]
    func GetApps(ctx *Context, args *GetAppsArgs, opts ...InvokeOption) (*GetAppsResult, error)
    func GetAppsOutput(ctx *Context, args *GetAppsOutputArgs, opts ...InvokeOption) GetAppsResultOutput

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

    public static class GetApps 
    {
        public static Task<GetAppsResult> InvokeAsync(GetAppsArgs args, InvokeOptions? opts = null)
        public static Output<GetAppsResult> Invoke(GetAppsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAppsResult> getApps(GetAppsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:apigateway/getApps:getApps
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of app IDs.
    NameRegex string
    A regex string to filter apps by name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    Ids []string
    A list of app IDs.
    NameRegex string
    A regex string to filter apps by name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Tags map[string]string
    A mapping of tags to assign to the resource.
    ids List<String>
    A list of app IDs.
    nameRegex String
    A regex string to filter apps by name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    ids string[]
    A list of app IDs.
    nameRegex string
    A regex string to filter apps by name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    ids Sequence[str]
    A list of app IDs.
    name_regex str
    A regex string to filter apps by name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    ids List<String>
    A list of app IDs.
    nameRegex String
    A regex string to filter apps by name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    tags Map<String>
    A mapping of tags to assign to the resource.

    getApps Result

    The following output properties are available:

    Apps List<Pulumi.AliCloud.ApiGateway.Outputs.GetAppsApp>
    A list of apps. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of app IDs.
    Names List<string>
    A list of app names.
    NameRegex string
    OutputFile string
    Tags Dictionary<string, string>
    Apps []GetAppsApp
    A list of apps. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of app IDs.
    Names []string
    A list of app names.
    NameRegex string
    OutputFile string
    Tags map[string]string
    apps List<GetAppsApp>
    A list of apps. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of app IDs.
    names List<String>
    A list of app names.
    nameRegex String
    outputFile String
    tags Map<String,String>
    apps GetAppsApp[]
    A list of apps. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of app IDs.
    names string[]
    A list of app names.
    nameRegex string
    outputFile string
    tags {[key: string]: string}
    apps Sequence[GetAppsApp]
    A list of apps. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of app IDs.
    names Sequence[str]
    A list of app names.
    name_regex str
    output_file str
    tags Mapping[str, str]
    apps List<Property Map>
    A list of apps. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of app IDs.
    names List<String>
    A list of app names.
    nameRegex String
    outputFile String
    tags Map<String>

    Supporting Types

    GetAppsApp

    AppCode string
    App code.
    CreatedTime string
    Creation time (Greenwich mean time).
    Description string
    App description.
    Id int
    App ID, which is generated by the system and globally unique.
    ModifiedTime string
    Last modification time (Greenwich mean time).
    Name string
    App name.
    AppCode string
    App code.
    CreatedTime string
    Creation time (Greenwich mean time).
    Description string
    App description.
    Id int
    App ID, which is generated by the system and globally unique.
    ModifiedTime string
    Last modification time (Greenwich mean time).
    Name string
    App name.
    appCode String
    App code.
    createdTime String
    Creation time (Greenwich mean time).
    description String
    App description.
    id Integer
    App ID, which is generated by the system and globally unique.
    modifiedTime String
    Last modification time (Greenwich mean time).
    name String
    App name.
    appCode string
    App code.
    createdTime string
    Creation time (Greenwich mean time).
    description string
    App description.
    id number
    App ID, which is generated by the system and globally unique.
    modifiedTime string
    Last modification time (Greenwich mean time).
    name string
    App name.
    app_code str
    App code.
    created_time str
    Creation time (Greenwich mean time).
    description str
    App description.
    id int
    App ID, which is generated by the system and globally unique.
    modified_time str
    Last modification time (Greenwich mean time).
    name str
    App name.
    appCode String
    App code.
    createdTime String
    Creation time (Greenwich mean time).
    description String
    App description.
    id Number
    App ID, which is generated by the system and globally unique.
    modifiedTime String
    Last modification time (Greenwich mean time).
    name String
    App name.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi