1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. edas
  5. getApplications
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.edas.getApplications

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    This data source provides a list of EDAS application in an Alibaba Cloud account according to the specified filters.

    NOTE: Available in 1.82.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const applications = alicloud.edas.getApplications({
        ids: ["xxx"],
        outputFile: "application.txt",
    });
    export const firstApplicationName = applications.then(applications => applications.applications?.[0]?.appName);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    applications = alicloud.edas.get_applications(ids=["xxx"],
        output_file="application.txt")
    pulumi.export("firstApplicationName", applications.applications[0].app_name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/edas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		applications, err := edas.GetApplications(ctx, &edas.GetApplicationsArgs{
    			Ids: []string{
    				"xxx",
    			},
    			OutputFile: pulumi.StringRef("application.txt"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstApplicationName", applications.Applications[0].AppName)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var applications = AliCloud.Edas.GetApplications.Invoke(new()
        {
            Ids = new[]
            {
                "xxx",
            },
            OutputFile = "application.txt",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstApplicationName"] = applications.Apply(getApplicationsResult => getApplicationsResult.Applications[0]?.AppName),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.edas.EdasFunctions;
    import com.pulumi.alicloud.edas.inputs.GetApplicationsArgs;
    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 applications = EdasFunctions.getApplications(GetApplicationsArgs.builder()
                .ids("xxx")
                .outputFile("application.txt")
                .build());
    
            ctx.export("firstApplicationName", applications.applyValue(getApplicationsResult -> getApplicationsResult.applications()[0].appName()));
        }
    }
    
    variables:
      applications:
        fn::invoke:
          Function: alicloud:edas:getApplications
          Arguments:
            ids:
              - xxx
            outputFile: application.txt
    outputs:
      firstApplicationName: ${applications.applications[0].appName}
    

    Using getApplications

    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 getApplications(args: GetApplicationsArgs, opts?: InvokeOptions): Promise<GetApplicationsResult>
    function getApplicationsOutput(args: GetApplicationsOutputArgs, opts?: InvokeOptions): Output<GetApplicationsResult>
    def get_applications(ids: Optional[Sequence[str]] = None,
                         name_regex: Optional[str] = None,
                         output_file: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetApplicationsResult
    def get_applications_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                         name_regex: Optional[pulumi.Input[str]] = None,
                         output_file: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetApplicationsResult]
    func GetApplications(ctx *Context, args *GetApplicationsArgs, opts ...InvokeOption) (*GetApplicationsResult, error)
    func GetApplicationsOutput(ctx *Context, args *GetApplicationsOutputArgs, opts ...InvokeOption) GetApplicationsResultOutput

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

    public static class GetApplications 
    {
        public static Task<GetApplicationsResult> InvokeAsync(GetApplicationsArgs args, InvokeOptions? opts = null)
        public static Output<GetApplicationsResult> Invoke(GetApplicationsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetApplicationsResult> getApplications(GetApplicationsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:edas/getApplications:getApplications
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    An ids string to filter results by the application id.
    NameRegex string
    A regex string to filter results by the application name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Ids []string
    An ids string to filter results by the application id.
    NameRegex string
    A regex string to filter results by the application name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    An ids string to filter results by the application id.
    nameRegex String
    A regex string to filter results by the application name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    ids string[]
    An ids string to filter results by the application id.
    nameRegex string
    A regex string to filter results by the application name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    ids Sequence[str]
    An ids string to filter results by the application id.
    name_regex str
    A regex string to filter results by the application name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    An ids string to filter results by the application id.
    nameRegex String
    A regex string to filter results by the application name.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getApplications Result

    The following output properties are available:

    Applications List<Pulumi.AliCloud.Edas.Outputs.GetApplicationsApplication>
    A list of applications.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of application IDs.
    Names List<string>
    A list of applications names.
    NameRegex string
    OutputFile string
    Applications []GetApplicationsApplication
    A list of applications.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of application IDs.
    Names []string
    A list of applications names.
    NameRegex string
    OutputFile string
    applications List<GetApplicationsApplication>
    A list of applications.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of application IDs.
    names List<String>
    A list of applications names.
    nameRegex String
    outputFile String
    applications GetApplicationsApplication[]
    A list of applications.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of application IDs.
    names string[]
    A list of applications names.
    nameRegex string
    outputFile string
    applications Sequence[GetApplicationsApplication]
    A list of applications.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of application IDs.
    names Sequence[str]
    A list of applications names.
    name_regex str
    output_file str
    applications List<Property Map>
    A list of applications.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of application IDs.
    names List<String>
    A list of applications names.
    nameRegex String
    outputFile String

    Supporting Types

    GetApplicationsApplication

    AppId string
    The ID of the application that you want to deploy.
    AppName string
    The name of your EDAS application. Only letters '-' '_' and numbers are allowed. The length cannot exceed 36 characters.
    ApplicationType string
    The type of the package for the deployment of the application that you want to create. The valid values are: WAR and JAR. We strongly recommend you to set this parameter when creating the application.
    BuildPackageId int
    The package ID of Enterprise Distributed Application Service (EDAS) Container.
    ClusterId string
    The ID of the cluster that you want to create the application.
    ClusterType int
    The type of the cluster that you want to create. Valid values: 1: Swarm cluster. 2: ECS cluster. 3: Kubernetes cluster.
    RegionId string
    The ID of the namespace the application belongs to.
    AppId string
    The ID of the application that you want to deploy.
    AppName string
    The name of your EDAS application. Only letters '-' '_' and numbers are allowed. The length cannot exceed 36 characters.
    ApplicationType string
    The type of the package for the deployment of the application that you want to create. The valid values are: WAR and JAR. We strongly recommend you to set this parameter when creating the application.
    BuildPackageId int
    The package ID of Enterprise Distributed Application Service (EDAS) Container.
    ClusterId string
    The ID of the cluster that you want to create the application.
    ClusterType int
    The type of the cluster that you want to create. Valid values: 1: Swarm cluster. 2: ECS cluster. 3: Kubernetes cluster.
    RegionId string
    The ID of the namespace the application belongs to.
    appId String
    The ID of the application that you want to deploy.
    appName String
    The name of your EDAS application. Only letters '-' '_' and numbers are allowed. The length cannot exceed 36 characters.
    applicationType String
    The type of the package for the deployment of the application that you want to create. The valid values are: WAR and JAR. We strongly recommend you to set this parameter when creating the application.
    buildPackageId Integer
    The package ID of Enterprise Distributed Application Service (EDAS) Container.
    clusterId String
    The ID of the cluster that you want to create the application.
    clusterType Integer
    The type of the cluster that you want to create. Valid values: 1: Swarm cluster. 2: ECS cluster. 3: Kubernetes cluster.
    regionId String
    The ID of the namespace the application belongs to.
    appId string
    The ID of the application that you want to deploy.
    appName string
    The name of your EDAS application. Only letters '-' '_' and numbers are allowed. The length cannot exceed 36 characters.
    applicationType string
    The type of the package for the deployment of the application that you want to create. The valid values are: WAR and JAR. We strongly recommend you to set this parameter when creating the application.
    buildPackageId number
    The package ID of Enterprise Distributed Application Service (EDAS) Container.
    clusterId string
    The ID of the cluster that you want to create the application.
    clusterType number
    The type of the cluster that you want to create. Valid values: 1: Swarm cluster. 2: ECS cluster. 3: Kubernetes cluster.
    regionId string
    The ID of the namespace the application belongs to.
    app_id str
    The ID of the application that you want to deploy.
    app_name str
    The name of your EDAS application. Only letters '-' '_' and numbers are allowed. The length cannot exceed 36 characters.
    application_type str
    The type of the package for the deployment of the application that you want to create. The valid values are: WAR and JAR. We strongly recommend you to set this parameter when creating the application.
    build_package_id int
    The package ID of Enterprise Distributed Application Service (EDAS) Container.
    cluster_id str
    The ID of the cluster that you want to create the application.
    cluster_type int
    The type of the cluster that you want to create. Valid values: 1: Swarm cluster. 2: ECS cluster. 3: Kubernetes cluster.
    region_id str
    The ID of the namespace the application belongs to.
    appId String
    The ID of the application that you want to deploy.
    appName String
    The name of your EDAS application. Only letters '-' '_' and numbers are allowed. The length cannot exceed 36 characters.
    applicationType String
    The type of the package for the deployment of the application that you want to create. The valid values are: WAR and JAR. We strongly recommend you to set this parameter when creating the application.
    buildPackageId Number
    The package ID of Enterprise Distributed Application Service (EDAS) Container.
    clusterId String
    The ID of the cluster that you want to create the application.
    clusterType Number
    The type of the cluster that you want to create. Valid values: 1: Swarm cluster. 2: ECS cluster. 3: Kubernetes cluster.
    regionId String
    The ID of the namespace the application belongs to.

    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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi